'Too many items' bug

vad said:
When you add some script to some object, Fallout creates new script record in appropriate sequence (replaces junk record or adds new block). If you add one script to two objects, two new records will be created. Each script record has unique for this map identifier and Fallout writes this identifier to object record at offset 0x0040.
Since each sequence is used for definite type of object, if you sum records from all sequences that should be all scripts which are present on the map.
Ah, thanks, I see what did wrong now. I missed that critters have their own section and script counter a bit below.
Where the Obj_dude script goes as well.
So I erroneously thought only one instance of a script was counted.
Checking out a map with more scripts made it easier to see.

It looks as if scenery scripts and items scripts are lumped together though. That should mean that a map with lots of scenery or items scripts should be more prone to crashing. I guess I will check that out later.

EDIT: Damn, why didn't anyone tell me that if I save a map into a text file with the Mapper, I can actually read all this stuff. :(
It obviously don't work for the broken maps, but at least I can see what they normally are supposed to look like.

Edit2: A higher amount of scenery scripts on a map seems to have no effect.

Edit3: Fuck I'm getting annoyed with this. One minute I think I'm on to something and the next everything's wrong.
I'll try again...

I think the problem is that items share the same space as scenery and stationary items in the script section.
I think it has something to do with that space that is reserved for one block of 16 scripts.
Maps that don't have any scripts from the scenery/items group don't have any reserved space there, they don't have a problem removing all scripts, and they don't crash.
I think it starts to happen when you add 17 scripts temporarily (Maps with brahmin poo in the RP was an exception.), ie 1 more script than a full block. I don't know if they get added wrong or if the problem is only removing them.
I saw a script that had 3 blocks (2*16 + 6), it only removed the last block with 6 scripts, even if it was supposed to remove 1 more block.

Oh well, feel free to chip in...
 
How would I go about finding what script is what in the script blocks?
I want to know if some of the scripts that are going to be removed are placed in the first script block (even if the first block is already full before the extra items enters the map).
 
I had some free time and made program which can fix bugged sav files. But I tested it only on Darek's saves. So I need someone to test my program on different maps.
 
Great stuff as usual. :)
I did a quick test and it fixed two other maps as well.
Will test more when I have more time and am in a better mood.
It's so damned tedious. Meh.

If everything works out OK, would it be possible to implement this into sfall? Have it automatically check the maps after exiting them and fix if necessary? It would only need to check the temporary save files in the Maps folder (should be enough to always just check the latest one, or if sfall can tell which one you just left).

Anyway, what does this fix do?
Edit the scripts number value and remove the scripts that shouldn't be there? Did you learn anything new of why this happens?

I was hoping there would be a way to prevent the corruption to start with, but I guess a whole new save routine would be needed.
 
Edit the scripts number value and remove the scripts that shouldn't be there?
Yes.
I was hoping there would be a way to prevent the corruption to start with, but I guess a whole new save routine would be needed.
I don't think that whole new save routine is needed. Change loop counter of script blocks, when Fallout saves map should be enough. But I haven't skills of disassembling.
 
So I broke 20 maps and your program was able to recognize and fix all of them.
Seems to work very well. :clap:

Is there any risk of side effects, like removing something that shouldn't be? I didn't notice anything wrong anyway, but then I didn't play a real game either.
 
I think there is a risk that Fallout not only don’t delete unused block, but also don’t move records from it in another blocks. If that so, then some items may lose attached script, because my program delete unused blocks.

I have asked Ray (he made world map encounters independent of world map travel speed) from TeamX to look at this bug. I hope he is able to fix it.
 
vad said:
I think there is a risk that Fallout not only don’t delete unused block, but also don’t move records from it in another blocks
I think I saw that happening, but wasn't sure I understood it correctly (still isn't).

OK, lets hope Ray can do something.
 
Per said:
Are there a lot of other behind-the-scenes things you've found out exactly how they work? The Jet Antidote bug? The Jinxedes? Night Vision? The pariah dog bug? Sneak and steal?

What's wrong with Night Vision, Sneak, Steal & Jinxed? Frankly, I am aware only of the Jet Antidote Bug among those you mentioned.
 
Nothing wrong with them (that I know of), just that they all have workings or interactions that are non-transparent and (to my knowledge) poorly known.
 
Back
Top