Jump to content
Sign in to follow this  
Endurium

IWD2 Kit Exclusions in ITM 2.0

Recommended Posts

public static final String[] s_kituse201 = {"None", "", "", "", "", "", "", "", ""};

public static final String[] s_kituse202 = {"None",
    "Cleric of Lathander", "Cleric of Selune", "Cleric of Helm", "Cleric of Oghma",
    "Cleric of Tempus", "Cleric of Bane", "Cleric of Mask", "Cleric of Talos"};

public static final String[] s_kituse203 = {"None",
    "Mage Diviner", "Mage Enchanter", "Mage Illusionist", "Mage Evoker",
    "Mage Necromancer", "Mage Transmuter", "Mage Generalist", "Cleric of Ilmater"};

public static final String[] s_kituse204 = {"None",
    "Paladin of Ilmater", "Paladin of Helm", "Paladin of Mystra", "Monk Old Order",
    "Monk Broken Ones", "Monk Dark Moon", "Mage Abjurer", "Mage Conjurer"};

This is a paste from my local Near Infinity source (Java SE) for ITM 2.0 after I took the time today to test all of this.

In case it's not clear,

"Usability" byte 1 (0x29) is not used.

"Usability" byte 2 (0x2B) is as s_kituse202 above: bit 0 = Cleric of Lathander ... bit 7 = Cleric of Talos

"Usability" byte 3 (0x2D) is as s_kituse203 above: bit 0 = Mage Diviner ... bit 7 = Cleric of Ilmater

"Usability" byte 4 (0x2F) is as s_kituse204 above: bit 0 = Paladin of Ilmater ... bit 7 = Mage Conjurer

Feel free to do what you want with this. The labels I used were just for quick convenience while I was testing. As a side note, IWD2 kits don't have swapped dwords so if you look at them with NI as it is available now, they will show up wrong. I added a check for IWD2 in my local NI and the kits appear in the structure display perfectly.

On a related note, I also looked at SPL 2.0 exclusion (0x1E) and so far was only able to confirm alignment is working. I took a cleric of Ilmater completely through all other bits and nothing was ever blocked, but he was blocked by alignment flags. None of the player-accessible Wizard spells use the exclusion flags.

  public static final String[] s_exclude_20 = {"None",
    "Chaotic*", "*Evil", "*Good", "*Neutral", "Lawful*", "Neutral*", "?", "?", "?", "?", "?", "?",
    "?", "?", "?", "", "?", "?", null, null, null, null, null, null, null, null, null, null, null,
    null, null, null};

So here's where I left off with my code after testing/confirming all 32 bits. Chaotic* includes Chaotic Good, Chaotic Neutral, Chaotic Evil, etc. *Good includes Lawful Good, Neutral Good, Chaotic Good, etc. The question marks are the unknown bits specified by a few priest spells.

And, since I can't seem to focus anymore, here's another one I just remembered. The primary exclusion flags (ITM 2.0 offset 0x1E) left out Half-Orc at bit 29, right after Gnome. Actually, since the IESDP is lacking a few other bits as well (NI has them already) here's more code...

  public static final String[] s_usability20 = {"Normal",
    "Barbarian", "Bard", "Cleric", "Druid", "Fighter", "Monk", "Paladin", "Ranger", "Rogue", "Sorcerer",
    "Wizard", null, "Chaotic*", "*Evil", "*Good", "*Neutral", "Lawful*", "Neutral*", null, null, null,
    null, null, "Elf", "Dwarf", "Half-Elf", "Halfling", "Human", "Gnome", "Half-Orc", null, null};

with Barbarian at bit 0 and Half-Orc at bit 29.

Edited by Endurium
Corrected offsets

Share this post


Link to post

Are you sure you're referring to the usability stored in the header? https://gibberlings3.github.io/iesdp/file_formats/ie_formats/itm_v2.0.htm#Header_Usability

If you check out for example Cera Sumat the Famous, you can see that it nicely restricts all classes except for paladins. So I doubt the previous authors made such a blunder.

If you are searching kit usabilities in general, since the tables are useless, you can grab them from gemrb:

https://github.com/gemrb/gemrb/blob/master/gemrb/unhardcoded/iwd2/classes.2da

 

I don't know anything about the spl exclusion field though.

Share this post


Link to post

The only thing I referred to in the header is the missing Half-Orc racial flag. The kit exclusion flags, which I posted the offsets to, are separate, as in BG2. I looked at Cera Sumat and indeed it blocks classes in the header, but it also blocks all but the Paladin kits in the four kit usability fields further into the file (starting at offset 0x41)

I posted this because IESDP and NI don't cover these fields for IWD2. I also tested all of this in-game.

Share this post


Link to post

You didn't post any sensible offset for that. Do you mean the (marked unused) usability at 0x29? IOW decimal 41, not 0x41?

Share this post


Link to post

I double-checked with NI including Cera Sumat and it looks great, order included. Thanks for the update and for putting up with me. Modding is easy, documenting is hard.

Share this post


Link to post

Crap, the current lore within gemrb is that iwd2 kit IDs equal to their usability, but this says no.

Share this post


Link to post

I noticed the weird pattern too.

GemRB list (in order) runs from Bits 0 to 7 of 4th Field, Bits 0 to 7 of the 3rd Field, then Bits 0 to 7 of the 2nd Field. It's like the devs started filling in the exclusion data from the final field back to the first.

Share this post


Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...