VERY IMPORTANT: Issues with NPCs with respawnable inventories

Discussion in 'General Modification' started by Agetian, Sep 21, 2005.

Remove all ads!
  1. Agetian

    Agetian Attorney General Administrator

    Joined:
    Aug 14, 2004
    Messages:
    2,526
    Likes Received:
    0
    VERY IMPORTANT:

    An interesting fact about respawning inventories is discovered. The tutorial in ToEEWB says that you MUST specify the following flag for the substitute inventory container:

    OF_DYNAMIC

    In fact, this flag makes the game CRASH at inventory respawn when used with containers whose inventory must be respawnable. Therefore, OF_DYNAMIC MUST NOT BE SET in case you create a NPC with respawnable inventory! If the inventory shouldn't be respawnable, OF_DYNAMIC must be set. Please keep this in mind while developing NPCs with respawnable inventory!

    There are also other flags which are usually not set for NPCs with respawnable inventory: OF_NO_BLOCK, OF_INVISIBLE. I'm not sure if they have any effect on the container validity, but I doubt it.

    Thanks for reading.
    - Agetian
     
    Last edited: Sep 21, 2005
  2. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,655
    Likes Received:
    352
    This, of course, was discovered when Agetian kindly tracked down the problem with Ah Fong - thanks Agetian!! :notworthy
     
Our Host!