Jump to content


Photo

Fixing the KIT.IDS Megamod style


  • Please log in to reply
33 replies to this topic

#1 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 04 January 2016 - 08:56 AM

Reference topics: (in descending chronological order)

NPCKitpack borking with EE KIT.IDS

Refinements borking any KIT.IDS (already BWPFixpack'd)

Aurora borking ToBEx'd KIT.IDS (already BWPFixpack'd)

 

So yeah, stuff seems to be breaking because everyone and their mother uses the BG2Fixpack's extremely destructive block for their own KIT.IDS patching: (which I'll point out is not BG2Fixpack's fault because you're EXPECTED to install it before anything else)

 

Line 336 in setup-bg2fixpack.tp2 (from BG2Fixpack v10)

Spoiler

 

 

Why this be bad you ask?

 

1) Lines like this: (like the Imp pointed out in the NPCKitpack thread)

 

  REPLACE_TEXTUALLY ~.*\bBLADE\b~                  ~0x400D BLADE~

will fix kits containing the word blade, which includes the vanilla Blade as well as the Blademaster, Bladesinger, Bladesinmapants, Shadowblade, Yomommasblade etc.

 

 

2) Older mods (like NPCkitpack & aurora threads linked above) do not take into account that ToBEx unlocks the secondary byte for kits (so you can have long ass kit IDs like 0x40000000 instead of just 0x4000) - this has been currently handled in most mods by the BWPFixpack

 

So what do we do?

 

We improvise 8)

 

Give me a vanilla non-modded KIT.IDS from BG2ToB, BGEE & BG2EE, we'll do a swift comparison and make the BG2Fixpack block affect only vanilla BG2ToB IDs while making it compatible with the EEs.

 

TL;DR : Someone please donate a vanilla non-modded KIT.IDS from BG2:ToB (non-EE), BGEE & BG2EE :cheers:


"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


#2 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 04 January 2016 - 09:14 AM


Reference topics: (in descending chronological order)

NPCKitpack borking with EE KIT.IDS

Refinements borking any KIT.IDS (already BWPFixpack'd)

Aurora borking ToBEx'd KIT.IDS (already BWPFixpack'd)

 

So yeah, stuff seems to be breaking because everyone and their mother uses the BG2Fixpack's extremely destructive block for their own KIT.IDS patching: (which I'll point out is not BG2Fixpack's fault because you're EXPECTED to install it before anything else)

 

Line 336 in setup-bg2fixpack.tp2 (from BG2Fixpack v10)

Spoiler

 

 

Why this be bad you ask?

 

1) Lines like this: (like the Imp pointed out in the NPCKitpack thread)

 

  REPLACE_TEXTUALLY ~.*\bBLADE\b~                  ~0x400D BLADE~

will fix kits containing the word blade, which includes the vanilla Blade as well as the Blademaster, Bladesinger, Bladesinmapants, Shadowblade, Yomommasblade etc.

 

 

2) Older mods (like NPCkitpack & aurora threads linked above) do not take into account that ToBEx unlocks the secondary byte for kits (so you can have long ass kit IDs like 0x40000000 instead of just 0x4000) - this has been currently handled in most mods by the BWPFixpack

 

So what do we do?

 

We improvise 8)

 

Give me a vanilla non-modded KIT.IDS from BG2ToB, BGEE & BG2EE, we'll do a swift comparison and make the BG2Fixpack block affect only vanilla BG2ToB IDs while making it compatible with the EEs.

 

TL;DR : Someone please donate a vanilla non-modded KIT.IDS from BG2:ToB (non-EE), BGEE & BG2EE :cheers:

Here are the ones from my BWS backups


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#3 agb1

agb1
  • Member
  • 1623 posts

Posted 04 January 2016 - 09:19 AM

Here is the KIT.IDS from BG2EE.

Attached Files

  • Attached File  KIT.IDS   875bytes   229 downloads

BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip


#4 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 04 January 2016 - 09:24 AM


Reference topics: (in descending chronological order)

NPCKitpack borking with EE KIT.IDS

Refinements borking any KIT.IDS (already BWPFixpack'd)

Aurora borking ToBEx'd KIT.IDS (already BWPFixpack'd)

 

So yeah, stuff seems to be breaking because everyone and their mother uses the BG2Fixpack's extremely destructive block for their own KIT.IDS patching: (which I'll point out is not BG2Fixpack's fault because you're EXPECTED to install it before anything else)

 

Line 336 in setup-bg2fixpack.tp2 (from BG2Fixpack v10)

Spoiler

 

 

Why this be bad you ask?

 

1) Lines like this: (like the Imp pointed out in the NPCKitpack thread)

 

  REPLACE_TEXTUALLY ~.*\bBLADE\b~                  ~0x400D BLADE~

will fix kits containing the word blade, which includes the vanilla Blade as well as the Blademaster, Bladesinger, Bladesinmapants, Shadowblade, Yomommasblade etc.

 

 

2) Older mods (like NPCkitpack & aurora threads linked above) do not take into account that ToBEx unlocks the secondary byte for kits (so you can have long ass kit IDs like 0x40000000 instead of just 0x4000) - this has been currently handled in most mods by the BWPFixpack

 

So what do we do?

 

We improvise 8)

 

Give me a vanilla non-modded KIT.IDS from BG2ToB, BGEE & BG2EE, we'll do a swift comparison and make the BG2Fixpack block affect only vanilla BG2ToB IDs while making it compatible with the EEs.

 

TL;DR : Someone please donate a vanilla non-modded KIT.IDS from BG2:ToB (non-EE), BGEE & BG2EE :cheers:

Here are the ones from my BWS backups

attachicon.gifBG2TOB_Unmodded_KIT.IDS


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#5 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 04 January 2016 - 09:26 AM

Here is the KIT.IDS from BG2EE.

0x4027 GRIZZLY_BEAR
0x4028 OHTYR
0x4029 ESxKit

You sure this is unmodded? :blink:


"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


#6 agb1

agb1
  • Member
  • 1623 posts

Posted 04 January 2016 - 09:28 AM

Attached unmodded BG2EE KIT.IDS (I extracted my original backup copy of BG2EE folder and used NI to extract KIT.IDS from the biffed data).

 

I wonder how 0x4029 ESxKit snuck into the previous copy.

Attached Files


Edited by agb1, 04 January 2016 - 09:34 AM.

BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip


#7 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 04 January 2016 - 09:41 AM

Attached unmodded BG2EE KIT.IDS (I extracted my original backup copy of BG2EE folder and used NI to extract KIT.IDS from the biffed data).

 

I wonder how 0x4029 ESxKit snuck into the previous copy.

Here is mine for comparrison, it has those three files at the end as well.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#8 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 04 January 2016 - 09:51 AM

Many thanks guys :) This will help lots!


"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


#9 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 04 January 2016 - 09:55 AM

Please explain.

APPEND kit.ids ~0x0000 BLADEMASTER~
COPY_EXISTING kit.ids override
  REPLACE_TEXTUALLY ~.*\bBLADE\b~ ~0x400D BLADE~

BLADEMASTER is still 0x0000. Removing the second \b makes the patch affect BLADEMASTER as well. That said, \b does not work as you'd expect and is best avoided (use [ %TAB%] instead).



#10 The Imp

The Imp

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

  • Member
  • 5155 posts

Posted 04 January 2016 - 10:07 AM

Please explain.

Sorry, but that's just code that hangs around places... it's all bad. It's the whole point of the 1) .

 

Could you give a better way to make it so that no blademasters etc get's sliced and diced by a mods ?
Well, the explanation for it is that it's allowed to be in the BG2Fixpack cause you have to have something(original, fixed), and assuming there's no kits installed before the (g3)BG2Fixpack, it's "fine".

 

"But of course no other mod should have it". Hypocrisy intended.


Edited by The Imp, 04 January 2016 - 10:11 AM.

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.


#11 The Imp

The Imp

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

  • Member
  • 5155 posts

Posted 04 January 2016 - 10:19 AM


Here is the KIT.IDS from BG2EE.

 
0x4027 GRIZZLY_BEAR
0x4028 OHTYR
0x4029 ESxKit
You sure this is unmodded? :blink:
 
 


The last one is, but not the others. As here's the [gameinstalldirectory]/data/Default.bif's (v1.3.2064) kit ids file:
 
IDS
0x4000 TRUECLASS
0x4001 BERSERKER
0x4002 WIZARDSLAYER
0x4003 KENSAI
0x4004 CAVALIER
0x4005 INQUISITOR
0x4006 UNDEADHUNTER
0x0040 MAGESCHOOL_ABJURER
0x0080 MAGESCHOOL_CONJURER
0x0100 MAGESCHOOL_DIVINER
0x0200 MAGESCHOOL_ENCHANTER
0x0400 MAGESCHOOL_ILLUSIONIST
0x0800 MAGESCHOOL_INVOKER
0x1000 MAGESCHOOL_NECROMANCER
0x2000 MAGESCHOOL_TRANSMUTER
0x4000 MAGESCHOOL_GENERALIST
0x4007 FERALAN
0x4008 STALKER
0x4009 BEASTMASTER
0x400A ASSASIN
0x400B BOUNTYHUNTER
0x400C SWASHBUCKLER
0x400D BLADE
0x400E JESTER
0x400F SKALD
0x4013 GODTALOS
0x4014 GODHELM
0x4015 GODLATHANDER
0x4010 TOTEMIC
0x4011 SHAPESHIFTER
0x4012 BEASTFRIEND
0x40000000 BARBARIAN
0x80000000 WILDMAGE
0x4020 Blackguard
0x4021 SHADOWDANCER
0x4022 DWARVEN_DEFENDER
0x4023 DRAGON_DISCIPLE
0x4024 DARK_MOON
0x4025 SUN_SOUL
0x4027 GRIZZLY_BEAR
0x4028 OHTYR
There's a funny explanation for why the entries are missing between the 0x4012 and 0x4020, it's because the kits in BG2EE were programmed using weidu.exe which is set to skip all the way up to the 0x401f and start from the 0x4020... adding new kits.

Edited by The Imp, 04 January 2016 - 10:54 AM.

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.


#12 khelban12

khelban12
  • Member
  • 33 posts

Posted 04 January 2016 - 10:25 AM

Forgive my stupid question, but what is the problem with the original BG2:TOB kit.ids (the one shown in the link the imp gave) ?

It looks to me like a simple "bitmask" using powers of 2 that is common for this kind of stuff (although unnecessary since you can't have a combination of 5 kits for example). If i have read correctly, in the original engine you couldn't use the full dword, but doesn't tobex and BGxEE allow that ? If yes, then does it need to change to sequential numbers like 4009,400a, etc ?

#13 The Imp

The Imp

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

  • Member
  • 5155 posts

Posted 04 January 2016 - 10:33 AM

Forgive my stupid question,
Erhm, that's not so stupid than you make it sound. As it has no simple answer.
A part of the complex answer is, "let's try to manage this BS as much as we can and see what the hells up, whup-di-doo", there's a lot.

My best guess is to why the whole thing is such a mess is that, like said, there was a system that originally handled the kit.ids as a bit, one on, 0 off, aka the ids also worked as the kits usability flag, but the design was cut as well there was no one capable to code paladin-ranger-mage-cleric-druid-monk-thief-bard-sorcerer ... multi-duals like there can be in IWD2, well up to a point.
So the redesign then made due with the numbers that the .cre's already had, and added stuff, or forgot to add, like with the ToB's Wildmage. :devil:

Edited by The Imp, 04 January 2016 - 10:44 AM.

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.


#14 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 04 January 2016 - 11:15 AM


Please explain.

Sorry, but that's just code that hangs around places... it's all bad. It's the whole point of the 1) .


How is it all bad? 1) does not seem to be accurate. The Fixpack code does, in fact, not change kits like BLADEMASTER or SHADOWBLADE.
 
Could you give a better way to make it so that no blademasters etc get's sliced and diced by a mods ?
Before I can offer suggestions for improvements (aside from the [ %TAB%] thing), I need to know what behaviour the code exhibits that you find undesirable.

#15 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 04 January 2016 - 11:22 AM

Forgive my stupid question, but what is the problem with the original BG2:TOB kit.ids (the one shown in the link the imp gave) ?

It looks to me like a simple "bitmask" using powers of 2 that is common for this kind of stuff (although unnecessary since you can't have a combination of 5 kits for example). If i have read correctly, in the original engine you couldn't use the full dword, but doesn't tobex and BGxEE allow that ? If yes, then does it need to change to sequential numbers like 4009,400a, etc ?
The problem with the original KIT.IDS is that the numbers are wrong. They do not work. They never worked. The numbers in the fixed file do work. Essentially, the numbers are partly hardcoded and the fixed file aligns with the hardcode.

Edited by Wisp, 04 January 2016 - 11:23 AM.


#16 The Imp

The Imp

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

  • Member
  • 5155 posts

Posted 04 January 2016 - 12:54 PM

How is it all bad? 1) does not seem to be accurate. The Fixpack code does, in fact, not change kits like BLADEMASTER or SHADOWBLADE.

Could you give a better way to make it so that no blademasters etc get's sliced and diced by a mods ?

Before I can offer suggestions for improvements (aside from the [ %TAB%] thing), I need to know what behaviour the code exhibits that you find undesirable.


I don't know about the others, but when I recreated a kit that had this problem, I ran into it again.
.tp2 -file:
BACKUP ~ij#blade/backup~
AUTHOR ~The Imp~

BEGIN ~Recreation of an example kit, domething bery bad~
ADD_KIT ~IJ#BLADE ~
 ~IJ#BLADE                1           0           1           1           0           0           0           0~
 ~IJ#BLADE 5 5 5 0 5 0 0 5 0 5 5 0 0 5 0 5 0 0 0 0 0 0 5 5 5 0 0 0 2 0 2 3 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5~
 ~IJ#BLADE                9       0       0       9       0       9~
 ~IJ#BLADE                0       0       0       0       0       0~
 ~IJ#BLADE                0       0       0       0       0       0~
 ~IJ#BLADE                0       0       0       0       0       0~
 ~IJ#BLADE                1       1       1       1       1       1       1       1       1~
 ~IJ#BLADE                0       0       0       0       0       0~
 ~ij#blade/ij#blade.2da~
 ~K_F_H K_F_HE~
 ~0x00004000 2~
 ~fi0~		//lufi0.2da
 ~* * * * * * * * * * * * * * * * * * * *~
 SAY ~blade bad~ 
 SAY ~Blade Bad~ 
 SAY ~BLADE BAD:
Being evil required you to be better than being bad at being good.~
Install that to an unmodified non-EE BG2 game, and then install the BG2Fixpack-v10 to it, resulting kit.ids:
After the custom kit:
IDS
0x00004000 TRUECLASS                    
0x00000001 BERSERKER                    
0x00000002 WIZARDSLAYER                 
0x00000004 KENSAI                       
0x00000008 CAVALIER                     
0x00000010 INQUISITOR                   
0x00000020 UNDEADHUNTER                 
0x00000040 MAGESCHOOL_ABJURER           
0x00000080 MAGESCHOOL_CONJURER          
0x00000100 MAGESCHOOL_DIVINER           
0x00000200 MAGESCHOOL_ENCHANTER         
0x00000400 MAGESCHOOL_ILLUSIONIST       
0x00000800 MAGESCHOOL_INVOKER           
0x00001000 MAGESCHOOL_NECROMANCER       
0x00002000 MAGESCHOOL_TRANSMUTER        
0x00004000 MAGESCHOOL_GENERALIST        
0x00008000 FERALAN                      
0x00010000 STALKER                      
0x00020000 BEASTMASTER                  
0x00040000 ASSASIN                      
0x00080000 BOUNTYHUNTER                 
0x00100000 SWASHBUCKLER                 
0x00200000 BLADE                        
0x00400000 JESTER                       
0x00800000 SKALD                        
0x01000000 GODTALOS                     
0x02000000 GODHELM                      
0x04000000 GODLATHANDER                 
0x08000000 TOTEMIC                      
0x10000000 SHAPESHIFTER                 
0x20000000 BEASTFRIEND                  
0x40000000 BARBARIAN                    
0x4020 IJ#BLADE 

After BG2Fixpack v10:
IDS
0x4000 TRUECLASS                    
0x4001 BERSERKER                    
0x4002 WIZARDSLAYER                 
0x4003 KENSAI                       
0x4004 CAVALIER                     
0x4005 INQUISITOR                   
0x4006 UNDEADHUNTER                 
0x0040 MAGESCHOOL_ABJURER           
0x0080 MAGESCHOOL_CONJURER          
0x0100 MAGESCHOOL_DIVINER           
0x0200 MAGESCHOOL_ENCHANTER         
0x0400 MAGESCHOOL_ILLUSIONIST       
0x0800 MAGESCHOOL_INVOKER           
0x1000 MAGESCHOOL_NECROMANCER       
0x2000 MAGESCHOOL_TRANSMUTER        
0x4000 MAGESCHOOL_GENERALIST        
0x4007 FERALAN                      
0x4008 STALKER                      
0x4009 BEASTMASTER                  
0x400A ASSASIN                      
0x400B BOUNTYHUNTER                 
0x400C SWASHBUCKLER                 
0x400D BLADE                        
0x400E JESTER                       
0x400F SKALD                        
0x4013 GODTALOS                     
0x4014 GODHELM                      
0x4015 GODLATHANDER                 
0x4010 TOTEMIC                      
0x4011 SHAPESHIFTER                 
0x4012 BEASTFRIEND                  
0x40000000 BARBARIAN                    
0x400D BLADE 
0x80000000 WILDMAGE
Yeah, well, it might be just that we should ban the imp created custom kits... :devil:

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.


#17 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 04 January 2016 - 01:39 PM

This issue is on account of the aforementioned \b suckage. Replace with [ %TAB%]. (Technically, \b works as expected here; it's just used very inappropriately.)

Edited by Wisp, 04 January 2016 - 01:41 PM.


#18 The Imp

The Imp

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

  • Member
  • 5155 posts

Posted 04 January 2016 - 03:15 PM

So:

REPLACE_TEXTUALLY ~.*[%TAB%]BLADE~                  ~0x400D BLADE~

would do.. or ?

And of course that should then be set for all the kits...


Edited by The Imp, 04 January 2016 - 03:18 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.


#19 agb1

agb1
  • Member
  • 1623 posts

Posted 04 January 2016 - 03:21 PM

I think you want to keep tabs on both sides:

REPLACE_TEXTUALLY ~.*[%TAB%]BLADE[%TAB%]~ ~0x400D BLADE~

Can you use [%TAB%] in the replacement text too?

REPLACE_TEXTUALLY ~.*[%TAB%]BLADE[%TAB%]~ ~0x400D[%TAB%]BLADE[%TAB%]~
 

Edited by agb1, 04 January 2016 - 03:21 PM.

BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip


#20 agb1

agb1
  • Member
  • 1623 posts

Posted 04 January 2016 - 03:33 PM

This is why \b is bad but works for BG2Fixpack if installed before any other mods: a # (very commonly used in mod identifiers) is considered a non-word character, so \b matches it.

http://www.regular-e...boundaries.html

BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip