Jump to content
Sign in to follow this  
CamDawg

CRE file format

Recommended Posts

More goodies from the BGEE devs on the creature file format.

 

Header:

  • Flags at 0x20 0x10 - bit 13 is 'large creature', bit 14 is limbo creature, bit 16 is 'save temp item', bit 17 is listed as NEVER_SET_ME with the comment "If I am set un set all of the flags!", bits18-23 are unused. Bits 24-30 appear correct (listed as 'herding allegiance'). An additional value of 0x1f8 (flagging all of the original class bits minues the fallen ones) is listed as inactive_all.
  • Animation at 0x28 is listed as a DWORD instead of a WORD
  • Starting at 6e, there are individual bytes for 20 proficiencies followed by a single byte for undead level, covering the unknown section at 0x76.
  • 0x84 is the SCRIPTNAME of the current tracking target.
  • 0x244 is listed as a WORD for m_mageSpecUpperWord follwoed by a WORD for m_mageSpecialization
  • 0x27c is listed as a LONG of m_instance

Memorized spells table

  • 0x8 is a WORD, not DWORD, and bit 1 is 'disabled'. It's followed by two BYTEs of structureAlignment

Item Table

  • 0x8 is simply listed as a WORD for m_wear

Item Slots

  • There's actually a fourth quiver item defined.

Again, this is just inferences from variable names and comments. It's unverified at present.

Edited by CamDawg
Amended flags address

Share this post


Link to post
Flags at 0x20 - bit 13 is 'large creature', bit 14 is limbo creature, bit 16 is 'save temp item', bit 17 is listed as NEVER_SET_ME with the comment "If I am set un set all of the flags!", bits18-23 are unused. Bits 24-30 appear correct (listed as 'herding allegiance'). An additional value of 0x1f8 (flagging all of the original class bits minues the fallen ones) is listed as inactive_all.

But this conflicts with existing states, so I hope they're not actually used. We don't need another disease/disactivated horror.

Share this post


Link to post

The existing states may be from IWD2/other blackisle games.

I knew about 'save temp item' - it is used only internally, it has not much use in saved games so that's ok

'large creature' would be fun if used (maybe with wing buffet?)

On the other hand, i thought the size was hardcoded into the animation.

We need more info on this bit and its effects.

Herding allegiance bits were already published.

Edited by Avenger

Share this post


Link to post

m_wear in the item entries was already known, it is a countdown for temporary items (like goodberries).

fourth quiver slot - yep, knew it.

spell table - all new info, still need to know what are the implications of this. Probably nothing. There is only 1 bit used in that word (or dword) if you count structure alignment.

So, if all the dword has 1 used bit (which we knew already), then if the rest is kept 0 (should be), there is no problem.

 

The undead level/tracking name is all new info!

Edited by Avenger

Share this post


Link to post

btw, at 0x20 it has the real state flags, the MC ones are at 0x10.

Share this post


Link to post

btw, at 0x20 it has the real state flags, the MC ones are at 0x10.

Yeah, Lynx is correct. You should have said the flags at 0x10 (which we call MC flags)...

 

0x10 is called m_flags (mc flags)

0x20 is called m_generalState (state bits)

Edited by Avenger

Share this post


Link to post

Yes, I meant the flags at 0x10, not 0x20 (I'm having to count up dwords and words and bytes as I go, sorry). I've amended the original post.

Share this post


Link to post

Added to local copy. I've stuck with our names for some fields which are more descriptive, e.g. the affect of 'large creature' is independent of the creature size.

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...