Jump to content


Photo

v3.31's ALWAYS block in the Refinements can flip the kit.ids badly


  • Please log in to reply
1 reply to this topic

#1 The Imp

The Imp

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

  • Member
  • 5155 posts

Posted 12 December 2013 - 05:00 AM

The code:

    // Corrections to KIT.IDS. Translates in WeiDU the corrections originally
    // made by Dyara	
COPY_EXISTING     ~KIT.IDS~                  ~override/KIT.IDS~
		REPLACE_TEXTUALLY ~0x00004000 TRUECLASS~     ~0x4000 TRUECLASS~
		REPLACE_TEXTUALLY ~0x00000001~         ~0x4001~
		REPLACE_TEXTUALLY ~0x00000002~         ~0x4002~
		REPLACE_TEXTUALLY ~0x00000004~         ~0x4003~
		REPLACE_TEXTUALLY ~0x00000008~         ~0x4004~
		REPLACE_TEXTUALLY ~0x00000010~         ~0x4005~
		REPLACE_TEXTUALLY ~0x00000020~         ~0x4006~
		REPLACE_TEXTUALLY ~0x00000040~         ~0x0040~
		REPLACE_TEXTUALLY ~0x00000080~         ~0x0080~
		REPLACE_TEXTUALLY ~0x00000100~         ~0x0100~
		REPLACE_TEXTUALLY ~0x00000200~         ~0x0200~
		REPLACE_TEXTUALLY ~0x00000400~         ~0x0400~
		REPLACE_TEXTUALLY ~0x00000800~         ~0x0800~
		REPLACE_TEXTUALLY ~0x00001000~         ~0x1000~
		REPLACE_TEXTUALLY ~0x00002000~         ~0x2000~
		REPLACE_TEXTUALLY ~0x00008000~         ~0x4007~
		REPLACE_TEXTUALLY ~0x00010000~         ~0x4008~
		REPLACE_TEXTUALLY ~0x00020000~         ~0x4009~
		REPLACE_TEXTUALLY ~0x00040000 MAGESCHOOL_GENERALIST~   ~0x4000 MAGESCHOOL_GENERALIST~
		REPLACE_TEXTUALLY ~0x00080000~         ~0x400B~
		REPLACE_TEXTUALLY ~0x00100000~         ~0x400C~
		REPLACE_TEXTUALLY ~0x00200000~         ~0x400D~
		REPLACE_TEXTUALLY ~0x00400000~         ~0x400E~
		REPLACE_TEXTUALLY ~0x00800000~         ~0x400F~
		REPLACE_TEXTUALLY ~0x01000000~         ~0x4013~
		REPLACE_TEXTUALLY ~0x02000000~         ~0x4014~
		REPLACE_TEXTUALLY ~0x04000000~         ~0x4015~
		REPLACE_TEXTUALLY ~0x08000000~         ~0x4010~
		REPLACE_TEXTUALLY ~0x10000000~         ~0x4011~
		REPLACE_TEXTUALLY ~0x20000000~         ~0x4012~
		// Added by the_bigg, further corrections by Littiz. Some installations have a
		// different (and still wrong) version of KIT.IDS, so they require a different patch:
		REPLACE_TEXTUALLY ~0x00004000 BARBARIAN~         ~0x40000000 BARBARIAN~
		REPLACE_TEXTUALLY ~0x0000 BARBARIAN~         ~0x40000000 BARBARIAN~
		REPLACE_TEXTUALLY ~0x00008000 WILDMAGE~         ~0x80000000 WILDMAGE~
		REPLACE_TEXTUALLY ~0x0000 WILDMAGE~         ~0x80000000 WILDMAGE~
		REPLACE_TEXTUALLY ~0x40010000~ 	       ~0x4001~
		REPLACE_TEXTUALLY ~0x40020000~ 	       ~0x4002~
		REPLACE_TEXTUALLY ~0x40030000~ 	       ~0x4003~
		REPLACE_TEXTUALLY ~0x40040000~ 	       ~0x4004~
		REPLACE_TEXTUALLY ~0x40050000~ 	       ~0x4005~
		REPLACE_TEXTUALLY ~0x40060000~ 	       ~0x4006~
		REPLACE_TEXTUALLY ~0x00400000~ 	       ~0x0040~
		REPLACE_TEXTUALLY ~0x00800000~ 	       ~0x0080~
		REPLACE_TEXTUALLY ~0x01000000~ 	       ~0x0100~
		REPLACE_TEXTUALLY ~0x02000000~ 	       ~0x0200~
		REPLACE_TEXTUALLY ~0x04000000~ 	       ~0x0400~
		REPLACE_TEXTUALLY ~0x08000000~ 	       ~0x0800~
		REPLACE_TEXTUALLY ~0x10000000~ 	       ~0x1000~
		REPLACE_TEXTUALLY ~0x20000000~ 	       ~0x2000~
		REPLACE_TEXTUALLY ~0x40000000 TRUECLASS~ 	       ~0x4000 TRUECLASS~
		REPLACE_TEXTUALLY ~0x40000000 MAGESCHOOL_GENERALIST~   ~0x4000 MAGESCHOOL_GENERALIST~
		REPLACE_TEXTUALLY ~0x40070000~ 	       ~0x4007~
		REPLACE_TEXTUALLY ~0x40080000~ 	       ~0x4008~
		REPLACE_TEXTUALLY ~0x40090000~ 	       ~0x4009~
		REPLACE_TEXTUALLY ~0x400A0000~ 	       ~0x400A~
		REPLACE_TEXTUALLY ~0x400B0000~ 	       ~0x400B~
		REPLACE_TEXTUALLY ~0x400C0000~ 	       ~0x400C~
		REPLACE_TEXTUALLY ~0x400D0000~ 	       ~0x400D~
		REPLACE_TEXTUALLY ~0x400E0000~ 	       ~0x400E~
		REPLACE_TEXTUALLY ~0x400F0000~ 	       ~0x400F~
		REPLACE_TEXTUALLY ~0x40130000~ 	       ~0x4013~
		REPLACE_TEXTUALLY ~0x40140000~ 	       ~0x4014~
		REPLACE_TEXTUALLY ~0x40150000~ 	       ~0x4015~
		REPLACE_TEXTUALLY ~0x40100000~ 	       ~0x4010~
		REPLACE_TEXTUALLY ~0x40110000~ 	       ~0x4011~
		REPLACE_TEXTUALLY ~0x40120000~ 	       ~0x4012~
		REPLACE_TEXTUALLY ~0x401F0000~ 	       ~0x401F~
	BUT_ONLY_IF_IT_CHANGES

The issue comes up because the mod is not verifying what the entire start value is the one it thinks it is supposed to be aka: the "0x00000001" might not always belong to the "0x00000001 BERSERKER" -line... as the .2da table consists of the number AND the identifier, but the code just edits the numbers, in most cases. Also as this is one directional .2da overwrite the .bcs values might get squashed, but that's another issue on it's own.

Spoiler


The fix is simple: Just replacing all with this:

COPY_EXISTING ~kit.ids~ ~override~ //Kit fixes (CamDawg & the bigg & The Imps tweak)
/* snip */
  REPLACE_TEXTUALLY ~0x0000 BARBARIAN~			  ~0x40000000 BARBARIAN~
  REPLACE_TEXTUALLY ~0x0000 WILDMAGE~			   ~0x80000000 WILDMAGE~
BUT_ONLY

CLEAR_INLINED

APPEND ~kit.ids~ ~0x4000 TRUECLASS~ UNLESS ~\bTRUECLASS\b~
APPEND ~kit.ids~ ~0x40000000 BARBARIAN~ UNLESS ~\bBARBARIAN\b~
APPEND ~kit.ids~ ~0x80000000 WILDMAGE~ UNLESS ~\bWILDMAGE\b~

Yes, I am very aware that this is very much in Refinements because the weidu.exe didn't have the variables in the .2da editing for it's time.
And yes for everyone to know, the later code is direct code by the_bigg himself stolen here from the other thread, so I actually had nothing to do with this but Imp-lying it here.... ahh the bed is so nice and rocky.
 
I also think the CLEAN_INLINED term needs to be there so the kit.ids file gets re-read before the later appends get applied so there won't be double, or dozens of more and wrong entries for the BARBARIAN & wildmage kits.
 
To know the exact extend of a parts of this problem, I'll keep this list of all the mods that change the kit.ids badly other than kit mods themselves:
1. In the ALWAYS block:
BG2Fixpack,
Refinements,
Psionics Unleashed(v0.03),
Big Picture(v1.81-b4611),
The BiG World Install.bat tries to fix all of this, with a variety of results, but lack of the final result.
d0tweak, v21, the v22 should fix this completely, the v21 also messes up the MAGESCHOOL_TRANSMUTER to be always the wildmage.
 
2. The insidious, the BG2Fixpacks "fix" went to the Enhanced Edition, so:
BGEE
BG2EE
 
3. Main component, or with contingencies:
Oversight(v13)
Rogue Rebalance, only if the BG2 Fixpack is not detected.
Aurora's Shoe's.
Level 1 NPCs.
 
4. Suspects, with verified problems in their past that the BiG World Fixpack tries to fix, with a replacing their .tp2 code and still getting the fix wrong, thanks Lollorian:
Amber
BDToBv168
CtB
d0questpack
darian
Divine_Remix
fadingpromises
Faren
gavin
gavin_bg2
haerdalisromance
haldamir
Kido
Kitanya
Kivan
LuxleySoA
Nathaniel
nephele
npckit
RoT
SOS
tashia
TDD
virtue.


Edited by The Imp, 08 September 2014 - 12:44 PM.

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.


#2 Jenavee

Jenavee

    Little Fire Kitten

  • Member
  • 178 posts

Posted 19 December 2013 - 12:26 PM

[Content deleted]

 

Woops, just noticed I'd posted this in the wrong tab of Firefox. Gahhhh, why is my day so crappy?!


Edited by Jenavee, 19 December 2013 - 12:36 PM.

Join us on the Baldur's Gate Discord @ https://discord.gg/Rp7Cu5k

 

c2oJYXg.gif