Naughty Familiar

Discussion in 'The Temple of Elemental Evil' started by MrPhil, May 30, 2021.

Remove all ads!
  1. MrPhil

    MrPhil Member

    Joined:
    Sep 18, 2020
    Messages:
    56
    Likes Received:
    3
    My suspicion, although I have no evidence, is that the problem occurs after the familiar goes into and out of the pack many times.
    I saw the problem at around level 11/12
     
  2. MrPhil

    MrPhil Member

    Joined:
    Sep 18, 2020
    Messages:
    56
    Likes Received:
    3
    Help! I've had a look round the forum but I can't find the instructions on how to post a save game.
    Please will someone kindly post a link?
    My familiar is once again refusing to hop back in the pack, so if I can figure out how, I'll post the save game.
     
  3. Pygmy

    Pygmy Established Member Supporter

    Joined:
    Oct 8, 2010
    Messages:
    752
    Likes Received:
    81
  4. MrPhil

    MrPhil Member

    Joined:
    Sep 18, 2020
    Messages:
    56
    Likes Received:
    3
    Thanks Pygmy, that worked a treat.
    Here's my save.
    The story so far:
    Nolyn the wizard is investigating the ice node. She comes to a bridge and is set upon by a bunch of very rude bandits. Fight ensues and then Nolyn pops out her familiar to help collect the loot. We're in hostile territory, so she puts him straight back in the pack.
    We're not finished with bandits, Grank is up next and this is a shorter fight.
    Familiar is again required to help with the loot collection, so he jumps out of the pack.
    Loot collected and stashed in the extraplanar chest.
    Ready to continue, Nolyn asks the rat to go back in the pack. He gives an affirmative answer, but doesn't go.
     

    Attached Files:

  5. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    Thanks for the save.
    I see that the reason you can't make it go back into the pack is that the inventory item familiar has ID set to 0, i.e. does not match the critter familiar. This is also why you are able to summon another one.

    I'm not yet clear on how that happens, but I did notice that every time you cast Summon Familiar (by using the radial menu option) the spell is never actually terminated. I suspect this is the root cause, but will have to investigate some more, in particular getting 100% reliable reproduction steps.
     
  6. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    Alright I found the exact sequence which triggers this bug. It's:

    1. Summon familiar
    2. Talk to familiar critter, back into pack
    3. SAVE
    4. Summon familiar again (must do this before changing map or loading the save!)

    This also occurs without Temple+.

    As I had guessed it's indeed related to the spell not actually ending when the familiar gets back in the pack. The ID is erased inside the Summon Familiar OnBeginRound script, but this only occurs when the familiar NPC is no longer in the party. However, the familiar is destroyed in step 2 and no longer has OnBeginRound events due to that (as destroying an object removes it from the dynamic objects registry), so that's why simple testing misses this bug.

    Now's the part where a possible vanilla bug rears its head in step 3: when saving, the game refreshes the dynamic object registry, and re-inserts the destroyed familiar. This causes it to start getting Begin Round events again, and as mentioned this causes the new familiar's ID to be cleared (and so on).

    I'll fix the unterminated spell issue, which should solve this, but I wonder if the real core issue is that the game re-adds destroyed objects to the registry. Gotta be careful with that sort of change however.

    Thanks for the report!
     
    Shiningted and FDR4PREZ like this.
  7. Endarire

    Endarire Ronald Rynnwrathi

    Joined:
    Jan 7, 2004
    Messages:
    983
    Likes Received:
    120
    @Sitra Achara
    Is this familiar bug similar to how invisibility's graphical effect (notable with a Ring of Invisibility) turns off between maps even though the mechanical effect is active?
     
  8. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    Not really, that one is straightforward.
     
Our Host!