I can't tell what exactly it is either, but I'm pretty sure it's
BGT also, since the --change-logs report it's one of the earliest mods. I can't tell what the problem is in
BGT's code, but it seems to do something weird with copying files to temp folders, operating on them and who knows what else. Issue was also reported
here.
Edit: ok, I think I found the problem...
BGT uses a revised routine apparently to add to the random treasure tables. Well it probably works fine if few or no mods are installed before
BGT. Maybe it does anyway. But for some reason reevor*.cre ends up with a random treasure he doesn't have in
BG1, though reevor3.cre
does have a rndtre03.itm. Maybe this is some sort of
BGT consistency thing? Anyway, this takes the following code:
COPY + ~BG1CRE~ ~BG1CRE~
...
REPLACE_TEXTUALLY "RNDTRE03" "%dest_tre3%"
And assigns reevor*.cre a
RNDMAG013 instead, which is of course an invalid 9-character reference. Ordinarily, it would record only the first 8 characters, but it inserts an extra byte in the file, throwing the rest of the file off and making it unreadable.
First of all, you want to prevent this from happening. You shouldn't end up with more than 9 rows in the random treasure tables anyway - I'm not sure if higher ones are valid. Maybe only certain mods like
CtB cause this if installed before
BGT. But second of all, there's probably a better way of doing this than REPLACE_TEXTUALLY which can cause fubar files if you're not careful. Aurora's "Realistic Random Treasure" component uses a method by doing various checks and then REMOVE/ADD_CRE_ITEM the variable reference where relevant to INV (the first open inventory slot).
Edited by Miloch, 10 November 2009 - 04:10 PM.