Jump to content


Photo

Messed up Reevor2.cre


  • Please log in to reply
10 replies to this topic

#1 White Agnus

White Agnus
  • Modder
  • 76 posts

Donator

Posted 26 October 2009 - 11:26 AM

Hi,
by our BWP Tests a strange problem occured...
BGT messes up the REEVOR.cre and the REEVOR2.cre, the original vanilla BG1 REEVOR.cre and REEVOR2.cre are okay and I didn't find an error in the BGT debug files... :(
That problem comes and goes (by the one installation, the file messes up, by the other not...)
Can somebody watch over it, I attached the files. ;)

Regards
White Agnus

Attached Files


Edited by White Agnus, 26 October 2009 - 11:26 AM.


#2 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 10 November 2009 - 03:28 PM

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.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#3 White Agnus

White Agnus
  • Modder
  • 76 posts

Donator

Posted 13 November 2009 - 05:02 AM

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).


Thanks Miloch, I think this problem is caused, when Exnem's Vault is installed before BGT (we have moved it before the big BG2 Mods, beacuse it overwrite the RNDTREAS.2DA)...
This error appears, since we have done that...

I will do a patch for the BWFixpack to solve this problem. :)

#4 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 13 November 2009 - 03:14 PM

I will do a patch for the BWFixpack to solve this problem. :)

Might want to nerf some of those items while you're at it :D. Otherwise it's the sort of mod that can completely ruin any attempt at balance in someone's game.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#5 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 24 November 2009 - 05:34 PM

I have modified the BGT code for the next update so that if the row number is > 9, then it won't do patching. This means that if any mod adds too many rows to any of the RND tables, then BGT won't apply a random treasure patch to overflow tables at all. I can't really change how BGT patches without stuffing up the 1D20 and 2D10 rules (which are already stuffed up if CtB is installed prior to BGT).

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#6 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 11 January 2010 - 03:10 AM

continued from here ...

While it seems BGT solved the 9-byte issue by only considering upto 9 rows, it seems to now give null values to stuff that have items in 10+ (because ... methinks, it doesn't consider them??)

So, in effect, REEVOR still bugs the game out :crying:

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#7 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 12 January 2010 - 05:35 AM

And apparently, BWP's reevorfixer.tp2 can't fix this too :lol: Btw, this is its .tp2 (if anyone wanted :P)
Copying and patching 2 files ...
ERROR: [REEVOR.cre] -> [override] Patching Failed (COPY) (Invalid_argument("index out of bounds"))
Stopping installation because of error.

ERROR Installing [Fix Reevor if he is messed up], rolling back to previous state
Will uninstall   0 files for [SETUP-REEVORFIXER.TP2] component 0.
Uninstalled      0 files for [SETUP-REEVORFIXER.TP2] component 0.
ERROR: Invalid_argument("index out of bounds")
PLEASE email the file SETUP-REEVORFIXER.DEBUG to me
Automatically Skipping [Fix Reevor if he is messed up] because of error.

NOT INSTALLED DUE TO ERRORS Fix Reevor if he is messed up

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#8 ScuD

ScuD
  • Member
  • 492 posts

Posted 12 January 2010 - 07:33 AM

I've just done the expert install using latest versions and fixes and strangely enough I don't get any problems with REEVOR.CRE.

#9 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 12 January 2010 - 07:37 AM

This thing seems to come from Exnem's Vault, do you have it?? :unsure: I'm doing an install without exnem's right now, will report when BGT finishes :lol:

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#10 ScuD

ScuD
  • Member
  • 492 posts

Posted 12 January 2010 - 09:01 AM

Ah no, I do not use Exnem's Vault :)

#11 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 12 January 2010 - 09:08 AM

And I forgot to report :doh: BGT finished an hour ago and well, it IS Exnem's vault then. This install of mine now the reevorfixer.tp2 working for it :coolthumb:

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod