New Temple+ Available

Discussion in 'General Modification' started by _doug_, May 6, 2020.

Remove all ads!
Tags:
  1. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Originally I'd copied it from IWD2 so that might be why...

    @florian1 you just click it and it should heal your party and replenish all spells... is it not working?
     
    florian1 likes this.
  2. florian1

    florian1 Established Member

    Joined:
    Mar 15, 2010
    Messages:
    460
    Likes Received:
    17
    I was looking in the wrong places for the "rest party" option. I have now found it.
    Thanks
     
  3. kovat

    kovat Member

    Joined:
    May 18, 2018
    Messages:
    13
    Likes Received:
    3
    Could you please explain how the drow skin works? From where does it read the default PC skin and all the different skins and meshes for the armors? I did some graphic alterations for the human and elf armors but they do not apply on the drow.
     
  4. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,001
    Likes Received:
    250
    In addition, as Outsiders Teifling and Aasimar characters are immune to spells which target Humanoids specifically, such as Hold Person, Charm Person, Enlarge Person, Reduce Person, Raise Dead, Resurrection, and Reincarnation spells.

     
    Last edited: Jun 27, 2020
  5. sigofmugmort

    sigofmugmort Established Member Supporter

    Joined:
    Aug 18, 2015
    Messages:
    328
    Likes Received:
    66
    Actually, Tieflings, Aasimar, and Genasi are classed as Native outsiders and as such Raise Dead and Resurrection does work on them
     
  6. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,001
    Likes Received:
    250
    Ah yes, I missed the Native subtype.

     
  7. _doug_

    _doug_ Established Member

    Joined:
    Jul 9, 2009
    Messages:
    290
    Likes Received:
    117
    Interesting. Thanks for the info. I should be able to add the additional immunity.
     
  8. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    I think it works out of the box due to the type checking in the spell script.
     
  9. _doug_

    _doug_ Established Member

    Joined:
    Jul 9, 2009
    Messages:
    290
    Likes Received:
    117
    I just checked and indeed it does. :)
     
  10. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    Hey Doug, did Temple+ fix the inventory-respawn issues for shops or is Co8's workaround still needed?
     
  11. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Nope, wasn't fixed.
    IIRC the issue occurs when you enter the map in the same sector as the chest that's supposed to respawn. Or was it the opposite? I think @marc1967 found out that one, and the solution was to move the invisible chest critter suitably.
     
  12. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    I doubt it, I tried that fix many years ago when I first created Ah Fong and he wasn't respawning, but I dare say it's worth trying again. I mainly found that the issue had to do with outdoor maps (which are all Worldmap locations): you could move, say, the leather worker's mobs to the Ruined Tower Temple map, which is an outdoor Worldmap location, and it then respawns fine. (I use that example because that's how I proved it many years ago).

    Anyways, we have the workaround so I will use that.
     
  13. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    I took a peek in the code, and it's a bit convoluted but I think it postpones the respawn if the container is on screen when you enter the map (not necessarily visible, just in terms of the coords).
    There's also an interesting container flag - OCOF_INVEN_SPAWN_INDEPENDENT- I think it might solve the issue. Can you try?
     
  14. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    Yeah sure, I'll give it a go and let you know. I 'm doing the shop inventories for Anatoliy's mod atm (obviously).
     
  15. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    I've done the test myself and it seems to work. But I have to wonder why the original code postpones the item respawn when it's onscreen... maybe there's a bug they worked around?
    Then again it could just be a bullshit arcanum leftover. If you recall, arcanum usually had large outdoor maps that mostly contained the interiors seamlessly, so that would be less of a concern.

    Here's the decompiled code:
    Code:
    void __cdecl ObjSpawnItemsFromInvensource(ObjHndl obj)
    {
      int objType; // eax@3
      int objType_; // esi@3
      int v3; // eax@6
      ObjectNode *listObj; // esi@12
      unsigned int containerOwnerHi; // esi@15
      signed int containerOwnerLo; // ebp@15
      signed int skipRespawn; // [sp+8h] [bp-B0h]@12
      unsigned int v8; // [sp+Ch] [bp-ACh]@0
      TigRect rect; // [sp+10h] [bp-A8h]@7
      ObjListResult listResult; // [sp+20h] [bp-98h]@12
    
      if ( obj.handle && GetInvenSource(obj) )
      {
        objType = GetInt32(obj, obj_f_type);
        objType_ = objType;
        if ( objType == obj_t_npc || objType == obj_t_pc )
        {
          if ( !IsObjDeadNullDestroyed(obj) && (objType_ != 14 || !GetPcLeaderForNpc(obj.handle).handle) )
            goto SPAWN_INVENSOURCE;
        }
        else
        {
          if ( objType != obj_t_container )
            return;
          v3 = GetInt32(obj, obj_f_container_flags);// obj is container
          if ( BYTE1(v3) & 4 )                      // OCOF_INVEN_SPAWN_INDEPENDENT
            goto SPAWN_INVENSOURCE;
          ObjectGetRect(obj, 8, &rect);             // gets screen-space bounding rect for obj
          if ( rect.x < itemSysX + itemSysWidth     // itemSysX, itemSysY are always 0
                                                    // so this basically checks if the obj is onscreen
            && rect.y < itemSysHeight + itemSysY
            && itemSysX < rect.x + rect.width
            && itemSysY < rect.y + rect.height )
          {
            NPCInventoryRespawnSchedule(obj);       // postpones the respawn... wonder why
            return;
          }
          skipRespawn = 1;
          ObjListVicinity(obj, OLC_NPC, &listResult);// obj list vicinity - 
                                                    // look for the container's owner
          listObj = listResult.objects;
          if ( listResult.objects )
          {
            while ( Obj_Get_Substitute_Inventory(listObj->item.handle).handle != obj.handle )// looks for the owner, tile delta <= 20
            {
              listObj = listObj->item.next;
              if ( !listObj )
                goto LABEL_15;
            }
            containerOwnerLo = listObj->item.handle.handle;
            containerOwnerHi = HIDWORD(listObj->item.handle.handle);
            if ( !IsObjDeadNullDestroyed(__PAIR__(containerOwnerHi, containerOwnerLo))
              && !GetPcLeaderForNpc(__PAIR__(containerOwnerHi, containerOwnerLo)).handle )
            {
              skipRespawn = 0;
            }
          }
          else
          {
    LABEL_15:
            containerOwnerHi = v8;
            containerOwnerLo = 1;
          }
          ObjListFree(&listResult);
          if ( !skipRespawn )
          {
            ObjSpawnItemsFromInvensource(__PAIR__(containerOwnerHi, containerOwnerLo));
    SPAWN_INVENSOURCE:
            SpawnInvenSourceItems(obj);
            return;
          }
        }
      }
    }
    
     
Our Host!