Jump to content


Photo

Who is doing what to kitlist.2da?


  • Please log in to reply
9 replies to this topic

#1 subtledoctor

subtledoctor
  • Modder
  • 656 posts

Posted 25 September 2018 - 07:12 AM

I have once again received a bug report about a mod that failed to install.  And once again the failure involves an inability to process a basic READ_2DA_ENTRIES_FORMER operation on kitlist.2da.  And once again I was totally unable to reproduce the bug - the mod installs fine on my copy of BG2EE.

 

Here's an older example:

http://www.shsforums...forum/?p=601868

 

I made a workaround for that one, but here comes the problem again.  This is like playing whack-a-mole, and I'm kind of tired of it.  I shouldn't have to avoid using READ_2DA_ENTRIES_FORMER, it's a perfectly normal and useful Weidu command...

 

The only thing in common that I've seen so far are 1) it's always EET; and 2) it always comes from users of BWS or Roxanne's BWS fork.


Edited by subtledoctor, 25 September 2018 - 06:17 PM.


#2 Lassal

Lassal
  • Modder
  • 100 posts

Posted 25 September 2018 - 08:33 AM

I think for EET it's better to forget BWS and install mods from compatible mods list manually.


SetGlobal("BodhiRomance","GLOBAL",2)
 
Mods:
Vampire World for EET - http://www.shsforums...-world-for-eet/
Mercenaries of Sword Coast for EET - http://www.shsforums...-coast-for-eet/
Bank of Baldurs Gate for EEThttp://www.shsforums...s-gate-for-eet/
Caelar's Fall for EEThttp://www.shsforums...2-caelars-fall/
Pregnancy for EE/EET - http://www.shsforums...or-bg1bg2eeeet/
Sister of Bhaalspawn for EEThttp://www.shsforums...lspawn-for-eet/
 


#3 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 25 September 2018 - 12:29 PM

What do EET/old mods do to kitlist.2da?
Well, they won't add in the kitlist entry that's the last entry on the file. Ouh, and the grizzly_bear kit doesn't have it either (in my v2.3. BG2EE game, so )...

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#4 subtledoctor

subtledoctor
  • Modder
  • 656 posts

Posted 25 September 2018 - 01:03 PM

Well, they won't add in the kitlist entry that's the last entry on the file. Ouh, and the grizzly_bear kit doesn't have it either (in my v2.3. BG2EE game, so )...

 

The missing entry for grizzly_bear doesn't stop this code:

 

COPY_EXISTING - ~kitlist.2da~ ~override~
    COUNT_2DA_COLS num_cols
        READ_2DA_ENTRIES_NOW ~r2en_kitlist~ num_cols
        FOR (row = 1; row < r2en_kitlist; row += 1) BEGIN
            READ_2DA_ENTRY_FORMER ~r2en_kitlist~ row 1 kitname
            PATCH_IF (~%kitname%~ STRING_EQUAL_CASE ~ABJURER~) BEGIN
                READ_2DA_ENTRY_FORMER ~r2en_kitlist~ row 4 str_abjurer
            END

 

And other mods failing to add an entry in the 9th column shouldn't either.  I don't know what problems in kitlist.2da can cause that to fail... so I need to see a copy of the file from the time it failed so I can figure out what is being done to it.


Edited by subtledoctor, 25 September 2018 - 01:03 PM.


#5 subtledoctor

subtledoctor
  • Modder
  • 656 posts

Posted 25 September 2018 - 03:35 PM

Hmmm... looks like some mod is adding an extraentry to kitlist.2da, which creates one row with too many columns, which results in a bad result for COUNT_2DA_COLS, which makes it impossible to effectively read the 2da table.

Just need to know which mod is doing that...

Edited by subtledoctor, 25 September 2018 - 03:36 PM.


#6 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 25 September 2018 - 04:22 PM

Which you can with the help of the --change-log command in weidu, as in insert this command to Windows command console in the game directory with a weidu.exe in it... alter what you need to on other OS:

mkdir change-log
WeiDU.exe --log nul --change-log kitlist.2da >change-log/change-log.txt --out change-log

Yes, the mkdir is of course "make directory" in windows command-promp command.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#7 subtledoctor

subtledoctor
  • Modder
  • 656 posts

Posted 25 September 2018 - 05:19 PM

Well it should be easy enough to simply look at the file and see which kit has an extra column. But I can do neither from a phone when the file was uploaded to megaupload in .zip format. Once I'm on a computer I'll get to the bottom of this confounded problem.

#8 subtledoctor

subtledoctor
  • Modder
  • 656 posts

Posted 25 September 2018 - 06:25 PM

Took a look: some mod is trying to "fix" the GRIZZLY_BEAR row by adding an entry in the KITIDS column... but either it's doing it twice, or two mods are both trying to fix it, or it was "fixed" in 2.5 and the change is no longer needed.  So that one row has 1 columns, and when the typical 2DA parsing code runs COUNT_2DA_COLS it counts 11 columns.   Problem is, READ_2DA_ENTRY_FORMER then evaluates all rows with that column count... which is only 1 row. 

 

So the options are:

 

1) Every mod that reads kitlist.2da should remove the COUNT_2DA_COLS line and process READ_2DA_ENTRIES_FORMER on rows that havea specific number of columns.

 

2) Find out which mod is doing that and stop it.  (I got scared it might be one of mine, because once upon a time I mistakenly thought it was necessary to "fix" the GRIZZLY_BEAR row :new_bottom: ... but none of my mods appear in the proffered weidu.log.  :whistling:



#9 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 26 September 2018 - 05:16 AM

or it was "fixed" in 2.5 and the change is no longer needed.

 

Ding, ding, ding.


Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#10 subtledoctor

subtledoctor
  • Modder
  • 656 posts

Posted 26 September 2018 - 06:12 AM

Looks like it is the Wilson Chronicles mod.  Probably what happened is, the author included the "fix" (the comments in the code actually say "just for good measure" or words to that effect) and then stopped work on the mod before the 2.5 update.  And now this will break any mod that comes after that uses COUNT_2DA_COLS on kitlist.2da.

 

Probably worth fixing that in the BWFixPack for the time being.  Meanwhile I'm in the process of updating all of my mods to change every single instance of COUNT_2DA_COLS to get around the malformed kitlist file.  (And my mods do that sort of thing a lot.)