Apparently, the engine's *Kit() actions only read kit as a word (2-byte) value on .cre files, when it is really a dword (4-byte) value. Actually, it's only the upper half of the dword or something, not a proper word. This leads to glitches - one noted being barbarian, wildmage and in some cases, no kit or trueclass all get interpreted as "0" thus there's no way to distinguish amongst them. Is it fixable (without breaking existing behaviour, when it works)?
The coding can easily be changed to check the entire DWORD. I don't think that will break stuff, because KIT.IDS appears to be unused by the game anyway except for use by the script compiler outside the game (and it was noted that it listed the unusability flags as opposed to actual kit ID). As a result, 0x40000000 would be BARBARIAN, and 0x80000000 would be WILDMAGE.
Isn't no kit (0) distinguishable from TRUECLASS (0x4000)? The only difference here seems to be that unkitted CRE files use NO_KIT whereas chargen'd characters use TRUECLASS.
For reference, if I the kit is stored as 0x12345678 in the CRE file, the kit is read as 0x34127856 (account for big endian, and then high WORD-low WORD).
Edited by Ascension64, 19 January 2011 - 04:04 AM.