Respawn Bug Explained

Discussion in 'General Modification' started by Shiningted, Apr 26, 2010.

Remove all ads!
  1. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,655
    Likes Received:
    352
    Ok, something Spider Dwarf said triggered something so I tested it and I believe I am now in a position to explain the Respawn bug.

    Problem: Merchant's inventories are meant to periodically respawn, clearing out the dross and refreshing what is available. Some (if not most) Merchants' inventories do not do this reliably.

    Current Workaround: Inventories have to be refreshed by script.

    Explanation: What people may or may not realise is that merchants do respawn their inventories, but they do exactly that: they respawn their own inventories rather than their shop ones. Since this leaves them wearing and owning exactly the same stuff, unless you have pickpoketed the shirt off their back, or beaten them down and stolen everything, the player never notices this. Plus, this is the cause of the problem.

    Some time back, I took a couple of merchants - Brother Smythe (well known for not having the bug) and Jakk Borton (well known for having it) - and compared them to the nth degree in ToEEWB to see what the difference was. Alas, there was none, and I went off I disgust.

    Today, I did it again, only this time I took into account where they were. That is to say, I compared the merchants who stand around outside in a World Map area (such as Brother Smythe and Otis) with those indoors (Calmert, Jakk, Armario and the tailor in this particular test).

    I found that the outside guys both respawn and the indoor ones don't! And thats the problem!

    The thing is, the game treats WorldMap areas and non-WorldMap areas slightly differently (long aeons chasing the KotB CTD bug has attested to that many times over). I have no idea why, or how, but it does. It appears to be this that is at the root of the problem.

    To confirmate this, I took the mobs for Jakk Borton and stuck them into the Temple House (WorldMap) map. Then I bought some stuff, sold some stuff, and generally changed his inventory. Then I went to Nulb and killed time in the nearest building for a couple days. When I got back, Jakk Borton, that most non-respawning of men, had a brand new inventory!

    How does this help us fix it? Well, it doesn't. I only bring it up because my new merchant in the Moathouse Respawn is in such an outdoor area and was not meant to respawn, but probably will. I may have to make her a temporary figure, one who sells to you a couple times then wanders off for browner pastures.

    If I find anything else conclusive I will post it here.
     
  2. Kneller1

    Kneller1 Established Member

    Joined:
    Feb 25, 2006
    Messages:
    196
    Likes Received:
    1
    Not knowing any modding at all but still willing to make a unedgucated guess:
    Cant you just set all of the areas with the 'important' shopsellers as outdoors 'worldmap' areas? This was their inventories will work and you can set them not to show up on the worldmap by never scripting in a "found area thing".
     
  3. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,655
    Likes Received:
    352
    Not easily, no. Worth testing though.
     
  4. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    Good stuff, Ted. :thumbsup:

    I guess Ah Fong will no longer be refreshing his inventory, since I removed his script to do so because it seemed to cause the "I won't be selling the cool new stuff after all" bug.
     
  5. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,655
    Likes Received:
    352
    Ahhh, him again... I'll give him a good overhaul in coming days and see what I find.

    Pursuant of what Kneller said, the wider community should keep in mind, we can respawn by script, so its not like this bug is here to stay, I'd just like to kill it at the root if possible.
     
Our Host!