Jump to content

Retrieve correct values from kit.ids

Recommended Posts

I've tried to add a correct kit to a creature, but with my code


The written value is 0x40010000 which is incorrect in NI. It should be 0x4001. How do i specify the correct value ? I know i'm missing something specific here but i don't know what it is. 

Link to comment

Kit IDs are a little wonky there, as the order between the two sets of 16 bits varies. Whatever value you read from the IDS, you then have to swap the two halves before writing to that field in the CRE file. So for BERSERKER (0x4001 = 0x00004001), you fill that four-byte field with the number 0x40010000. Or, as it actually writes in the raw binary, 0x 00 00 01 40; bytes are ordered from least significant to most significant when writing a number. BARBARIAN (0x40000000) becomes 0x00004000 and then 0x 00 40 00 00.

I'm sure someone's written a quick little function that'll do the conversion automatically, but it's not usually a big deal; most kits (all of the vanilla kits except WILDMAGE and BARBARIAN) only use half of the kit ID field so you can just do a WRITE_SHORT of the IDS value at 0x246.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

  • Create New...