Jump to content

KIT.IDS Correction


SimDing0

Recommended Posts

COPY_EXISTING_REGEXP GLOB ~anomen.*\.cre~ ~override~
      ~imoen.*cre~ ~override~
      ~mazzy.*cre~ ~override~
 READ_LONG 0x244 "current_kit_value"
 PATCH_IF ("%current_kit_value%" = 0x00000000) BEGIN
   WRITE_LONG 0x244 0x40000000
 END
 BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~haer.*\.cre~ ~override~
 READ_LONG 0x244 "current_kit_value"
 PATCH_IF ("%current_kit_value%" = 0x00000020) BEGIN
   WRITE_LONG 0x244 0x400d0000
 END
 BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~korgan.*\.cre~ ~override~
 READ_LONG 0x244 "current_kit_value"
 PATCH_IF ("%current_kit_value%" = 0x00010000) BEGIN
   WRITE_LONG 0x244 0x40010000
 END
 BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~kit.ids~ ~override~
REPLACE_TEXTUALLY ~.*[ \t]TRUECLASS~ ~0x4000 TRUECLASS~
REPLACE_TEXTUALLY ~.*[ \t]BERSERKER~ ~0x4001 BERSERKER~
REPLACE_TEXTUALLY ~.*[ \t]WIZARDSLAYER~ ~0x4002 WIZARDSLAYER~
REPLACE_TEXTUALLY ~.*[ \t]KENSAI~ ~0x4003 KENSAI~
REPLACE_TEXTUALLY ~.*[ \t]CAVALIER~ ~0x4004 CAVALIER~
REPLACE_TEXTUALLY ~.*[ \t]INQUISITOR~ ~0x4005 INQUISITOR~
REPLACE_TEXTUALLY ~.*[ \t]UNDEADHUNTER~ ~0x4006 UNDEADHUNTER~
REPLACE_TEXTUALLY ~.*[ \t]MAGESCHOOL_ABJURER~ ~0x0040 MAGESCHOOL_ABJURER~
REPLACE_TEXTUALLY ~.*[ \t]MAGESCHOOL_CONJURER~ ~0x0080 MAGESCHOOL_CONJURER~
REPLACE_TEXTUALLY ~.*[ \t]MAGESCHOOL_DIVINER~ ~0x0100 MAGESCHOOL_DIVINER~
REPLACE_TEXTUALLY ~.*[ \t]MAGESCHOOL_ENCHANTER~ ~0x0200 MAGESCHOOL_ENCHANTER~
REPLACE_TEXTUALLY ~.*[ \t]MAGESCHOOL_ILLUSIONIST~ ~0x0400 MAGESCHOOL_ILLUSIONIST~
REPLACE_TEXTUALLY ~.*[ \t]MAGESCHOOL_INVOKER~ ~0x0800 MAGESCHOOL_INVOKER~
REPLACE_TEXTUALLY ~.*[ \t]MAGESCHOOL_NECROMANCER~ ~0x1000 MAGESCHOOL_NECROMANCER~
REPLACE_TEXTUALLY ~.*[ \t]MAGESCHOOL_TRANSMUTER~ ~0x2000 MAGESCHOOL_TRANSMUTER~
REPLACE_TEXTUALLY ~.*[ \t]MAGESCHOOL_GENERALIST~ ~0x0000 WILDMAGE~
REPLACE_TEXTUALLY ~.*[ \t]FERALAN~ ~0x4007 FERALAN~
REPLACE_TEXTUALLY ~.*[ \t]STALKER~ ~0x4008 STALKER~
REPLACE_TEXTUALLY ~.*[ \t]BEASTMASTER~ ~0x4009 BEASTMASTER~
REPLACE_TEXTUALLY ~.*[ \t]ASSASIN~ ~0x400A ASSASIN~
REPLACE_TEXTUALLY ~.*[ \t]BOUNTYHUNTER~ ~0x400B BOUNTYHUNTER~
REPLACE_TEXTUALLY ~.*[ \t]SWASHBUCKLER~ ~0x400C SWASHBUCKLER~
REPLACE_TEXTUALLY ~.*[ \t]BLADE~ ~0x400D BLADE~
REPLACE_TEXTUALLY ~.*[ \t]JESTER~ ~0x400E JESTER~
REPLACE_TEXTUALLY ~.*[ \t]SKALD~ ~0x400F SKALD~
REPLACE_TEXTUALLY ~.*[ \t]GODTALOS~ ~0x4013 GODTALOS~
REPLACE_TEXTUALLY ~.*[ \t]GODHELM~ ~0x4014 GODHELM~
REPLACE_TEXTUALLY ~.*[ \t]GODLATHANDER~ ~0x4015 GODLATHANDER~
REPLACE_TEXTUALLY ~.*[ \t]TOTEMIC~ ~0x4010 TOTEMIC~
REPLACE_TEXTUALLY ~.*[ \t]SHAPESHIFTER~ ~0x4011 SHAPESHIFTER~
REPLACE_TEXTUALLY ~.*[ \t]BEASTFRIEND~ ~0x4012 BEASTFRIEND~
REPLACE_TEXTUALLY ~.*[ \t]BARBARIAN~ ~0x0000 BARBARIAN~
REPLACE_TEXTUALLY ~.*[ \t]WILDMAGE~ ~0x0000 WILDMAGE~
BUT_ONLY_IF_IT_CHANGES

APPEND ~kit.ids~ ~0x4000 TRUECLASS~
UNLESS ~TRUECLASS~
APPEND ~kit.ids~ ~0x0000 BARBARIAN~
UNLESS ~BARBARIAN~
APPEND ~kit.ids~ ~0x0000 WILDMAGE~
UNLESS ~WILDMAGE~

 

edit by Cam - updated with the new stuff from the IESDP thread

Link to comment

And updated once again. Confirmed as working with WeiDU 168.

 

COPY_EXISTING_REGEXP GLOB ~^anomen[0-9]*\.cre~ ~override~
                         ~^imoen[0-9]*\.cre~  ~override~
                         ~^mazzy[0-9]*\.cre~  ~override~
 READ_LONG 0x244 "current_kit_value"
 PATCH_IF ("%current_kit_value%" = 0x00000000) BEGIN
   WRITE_LONG 0x244 0x40000000
 END
 BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^haer[0-9]*\.cre~ ~override~
 READ_LONG 0x244 "current_kit_value"
 PATCH_IF ("%current_kit_value%" = 0x00000020) BEGIN
   WRITE_LONG 0x244 0x400d0000
 END
 BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^korgan[0-9]*\.cre~ ~override~
 READ_LONG 0x244 "current_kit_value"
 PATCH_IF ("%current_kit_value%" = 0x00010000) BEGIN
   WRITE_LONG 0x244 0x40010000
 END
 BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~kit.ids~ ~override~
REPLACE_TEXTUALLY ~.*\bTRUECLASS\b~              ~0x4000 TRUECLASS~
REPLACE_TEXTUALLY ~.*\bBERSERKER\b~              ~0x4001 BERSERKER~
REPLACE_TEXTUALLY ~.*\bWIZARDSLAYER\b~           ~0x4002 WIZARDSLAYER~
REPLACE_TEXTUALLY ~.*\bKENSAI\b~                 ~0x4003 KENSAI~
REPLACE_TEXTUALLY ~.*\bCAVALIER\b~               ~0x4004 CAVALIER~
REPLACE_TEXTUALLY ~.*\bINQUISITOR\b~             ~0x4005 INQUISITOR~
REPLACE_TEXTUALLY ~.*\bUNDEADHUNTER\b~           ~0x4006 UNDEADHUNTER~
REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_ABJURER\b~     ~0x0040 MAGESCHOOL_ABJURER~
REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_CONJURER\b~    ~0x0080 MAGESCHOOL_CONJURER~
REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_DIVINER\b~     ~0x0100 MAGESCHOOL_DIVINER~
REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_ENCHANTER\b~   ~0x0200 MAGESCHOOL_ENCHANTER~
REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_ILLUSIONIST\b~ ~0x0400 MAGESCHOOL_ILLUSIONIST~
REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_INVOKER\b~     ~0x0800 MAGESCHOOL_INVOKER~
REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_NECROMANCER\b~ ~0x1000 MAGESCHOOL_NECROMANCER~
REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_TRANSMUTER\b~  ~0x2000 MAGESCHOOL_TRANSMUTER~
REPLACE_TEXTUALLY ~.*\bMAGESCHOOL_GENERALIST\b~  ~0x0000 WILDMAGE~
REPLACE_TEXTUALLY ~.*\bFERALAN\b~                ~0x4007 FERALAN~
REPLACE_TEXTUALLY ~.*\bSTALKER\b~                ~0x4008 STALKER~
REPLACE_TEXTUALLY ~.*\bBEASTMASTER\b~            ~0x4009 BEASTMASTER~
REPLACE_TEXTUALLY ~.*\bASSASIN\b~                ~0x400A ASSASIN~
REPLACE_TEXTUALLY ~.*\bBOUNTYHUNTER\b~           ~0x400B BOUNTYHUNTER~
REPLACE_TEXTUALLY ~.*\bSWASHBUCKLER\b~           ~0x400C SWASHBUCKLER~
REPLACE_TEXTUALLY ~.*\bBLADE\b~                  ~0x400D BLADE~
REPLACE_TEXTUALLY ~.*\bJESTER\b~                 ~0x400E JESTER~
REPLACE_TEXTUALLY ~.*\bSKALD\b~                  ~0x400F SKALD~
REPLACE_TEXTUALLY ~.*\bGODTALOS\b~               ~0x4013 GODTALOS~
REPLACE_TEXTUALLY ~.*\bGODHELM\b~                ~0x4014 GODHELM~
REPLACE_TEXTUALLY ~.*\bGODLATHANDER\b~           ~0x4015 GODLATHANDER~
REPLACE_TEXTUALLY ~.*\bTOTEMIC\b~                ~0x4010 TOTEMIC~
REPLACE_TEXTUALLY ~.*\bSHAPESHIFTER\b~           ~0x4011 SHAPESHIFTER~
REPLACE_TEXTUALLY ~.*\bBEASTFRIEND\b~            ~0x4012 BEASTFRIEND~
REPLACE_TEXTUALLY ~.*\bBARBARIAN\b~              ~0x0000 BARBARIAN~
REPLACE_TEXTUALLY ~.*\bWILDMAGE\b~               ~0x0000 WILDMAGE~
BUT_ONLY_IF_IT_CHANGES

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

Link to comment

I don't think we should be changing MAGESCHOOL_GENERALIST to WILDMAGE. Older mods with scripts that are being compiled on install might be using MAGESCHOOL_GENERALIST instead of TRUECLASS. There is no reason that value cannot have two labels. I think this is a case of tidying up things slightly too much. This should be true for all ids files, we shouldn't simply remove labels just because they're idiotic since some idiot is bound to be using them. We can always add a correct/better label.

Link to comment

Hokay, I've not been satisfied with the switch to 0x0000 from 0x401F (in my kit.ids fix) for Barbarians, so I did a little research. Apparently they are both correct. The problem is that the Barbarian is not a normal kit. When the game creates a Barbarian it uses the usability value in kitlist.2da. Translating that to a working kit.ids gives 0x0000. This value can be used to detect Barbarians using Kit(), but AddKit() doesn't work.

 

As far as I can tell, based on how other kits work, 0x401F is also a valid kit.ids value for Barbarians, I'll explain why. Most kit.ids values are the kit numbers (in the first column) as listed in kitlist.2da. When using 0x401F for Barbarians both the trigger Kit() and the action AddKit() work correctly, but only if the kit has been applied by using AddKit(). (I have yet to determine if the 1D12 hit point rule is applied but everything else works.)

 

You'll notice I said "most kits". Unsurprisingly the exceptions to this rule are the mage kits who have their usabilty values listed in kit.ids. Therefore, Wild Mages can be detected via Kit() using a value of 0x0000, but I have yet to work out how to apply the kit using AddKit().

 

I suggest adding a new Barbarian entry "0x401F BARBARIAN_KIT" to make sure our bases our covered.

Link to comment

0x401F isn't corrent for barbarian, I'm pretty sure.

 

AddKit(0x401F) will *remove* barbarian abilities because it's adding a different, non-existent kit in its place. I'd hazard a guess that you could similarly do AddKit(0xABCD) and Kit(Myself,0xABCD) would return true, but you wouldn't get any kit benefits from it.

Link to comment

Sorry about the previous post. I was pissed off at something else and took it out on you.

 

You are correct in saying that if you AddKit(0x401F) to a Barbarian it will remove the kit. However, if you AddKit(0x401F) to a trueclass fighter or fighter kit (I tried this on a Kensai) then it will add the Barbarian kit.

 

I am not 100% positive but I think for Kit() to work there must be an entry in kit.ids. I was having trouble detecting 0x401F until I added the line "0x401F BARBARIAN_KIT" to kit.ids, then it worked. After removing the kit from a game created Barbarian I could not successfully apply any kit. If I did try none of the abilities were gained but the kit was detectable via Kit().

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...