CRE file format

Applies to:
IWD2

General Description
This file format describes a "creature". Creatures can move, have an animation, hold items, run scripts, cast spells and initiate dialog. Creatures have several stats (some visible through the game UI) which are generally mapped to IDS or 2DA files.

Detailed Description


Offset Size (datatype) Description
0x00000 4 (char array) Signature ('CRE ')
0x0004 4 (char array) Version ('V2.2')
0x0008 4 (strref) Long name
0x000c 4 (strref) Short name (tooltip)
0x0010 4 (dword) Creature flags
  • bit 0 Damage don't stop casting
  • bit 1 No corpse
  • bit 2 Keep corpse
  • bit 3 Original class was Fighter
  • bit 4 Original class was Mage
  • bit 5 Original class was Cleric
  • bit 6 Original class was Thief
  • bit 7 Original class was Druid
  • bit 8 Original class was Ranger
  • bit 9 Fallen Paladin
  • bit 10 Fallen Ranger
  • bit 11 Exportable
  • bit 12 unused
  • bit 13 Quest critical
  • bit 14 Can activate "Can not be used by NPC" triggers
  • bit 15 Enabled
  • bit 16 Seen party
  • bit 17 Invulnerable
  • bit 18 Non threatening enemy
  • bit 19 No talk
  • bit 20 Ignore return to start
  • bit 21 Ignore inhibit AI
  • bit 22 unused
  • bit 23 unused
  • bit 30 corpse related?
The way a multiclass char is indicated is by the absence of any of the "original class" flags being set. Since they don't cover all classes, you are better of checking via levels or class masks.
These bits can be checked using the IsCreatureAreaFlag trigger, and set using the SetCreatureAreaFlag action.
0x0014 4 (dword) XP (gained for killing this creature)
0x0018 4 (dword) Creature Power Level (for summoning spells) / XP of the creature (for party members)
0x001c 4 (dword) Gold carried
0x0020 4 (dword) Permanent status flags (STATE.IDS)
0x0024 2 (word) Current Hit Points
0x0026 2 (word) Maximum Hit Points
0x0028 4 (dword) Animation ID (ANIMATE.IDS)
0x002c 1 (byte) Metal Colour Index (BG1 animations)
0x002d 1 (byte) Minor Colour Index (BG1 animations)
0x002e 1 (byte) Major Colour Index (BG1 animations)
0x002f 1 (byte) Skin Colour Index (BG1 animations)
0x0030 1 (byte) Leather Colour Index (BG1 animations)
0x0031 1 (byte) Armor Colour Index (BG1 animations)
0x0032 1 (byte) Hair Colour Index (BG1 animations)
0x0033 1 (byte) EFF structure version
  • 0: Version 1 EFF
  • 1: Version 2 EFF
0x0034 8 (resref) Small Portrait (BMP)
0x003c 8 (resref) Large Portrait (BMP)
0x0044 1 (signed byte) Reputation (minimum value: 0)
0x0045 1 (byte) Hide In Shadows (base)
0x0046 2 (signed word) Armor Class
0x0048 2 (signed word) Armor Class (Crushing Attacks Modifier)
0x004a 2 (signed word) Armor Class (Missile Attacks Modifier)
0x004c 2 (signed word) Armor Class (Piercing Attacks Modifier)
0x004e 2 (signed word) Armor Class (Slashing Attacks Modifier)
0x0050 1 (byte) Base Attack Bonus (BAB) for non party characters
0x0051 1 (byte) Number of attacks (0-10)
0x0052 1 (byte) Save versus Fortitude (0-20)
0x0053 1 (byte) Save versus Reflex (0-20)
0x0054 1 (byte) Save versus Will (0-20)
0x0055 1 (byte) Resist fire (0-100)
0x0056 1 (byte) Resist cold (0-100)
0x0057 1 (byte) Resist electricity (0-100)
0x0058 1 (byte) Resist acid (0-100)
0x0059 1 (byte) Resist magic (0-100)
0x005a 1 (byte) Resist magic fire (0-100)
0x005b 1 (byte) Resist magic cold (0-100)
0x005c 1 (byte) Resist slashing (0-100)
0x005d 1 (byte) Resist crushing (0-100)
0x005e 1 (byte) Resist piercing (0-100)
0x005f 1 (byte) Resist missile (0-100)
0x0060 1 (byte) Resist magic damage (0-100)
0x0061 4 (bytes) Unknown. Further resistances?
0x0065 1 (byte) Fatigue
0x0066 1 (byte) Intoxication
0x0067 1 (byte) Luck
0x0068 1 (byte) Turn undead level
0x0069 33 (bytes) Unknown
0x008a 1 (byte) Total Levels
0x008b 1 (byte) Barbarian Levels
0x008c 1 (byte) Bard Levels
0x008d 1 (byte) Cleric Levels
0x008e 1 (byte) Druid Levels
0x008f 1 (byte) Fighter Levels
0x0090 1 (byte) Monk
0x0091 1 (byte) Paladin Levels
0x0092 1 (byte) Ranger Levels
0x0093 1 (byte) Rogue Levels
0x0094 1 (byte) Sorcerer Levels
0x0095 1 (byte) Wizard Levels
0x0096 22 (bytes) Unknown
0x00ac 64 * 4 (dword) Strref's - most are connected with the sound-set
0x01ac 8 (resref) Team Script
0x01b4 8 (resref) Special Script 1
0x01bc 1 (byte) Creature enchantment level
0x01bd 3 (bytes) Unknown
0x01c0 4 (dword) Feats 1
0x01c4 4 (dword) Feats 2
0x01c8 4 (dword) Feats 3
0x01cc 3 * 4 (dword) Unknown
0x01d8 1 (byte) MW: Bow
0x01d9 1 (bytes) SW: Crossbow
0x01da 1 (byte) SW: Missile
0x01db 1 (byte) MW: Axe
0x01dc 1 (byte) SW: Mace
0x01dd 1 (byte) MW: Flail
0x01de 1 (byte) MW: Polearm
0x01df 1 (byte) MW: Hammer
0x01e0 1 (byte) SW: Quarterstaff
0x01e1 1 (byte) MW: Great Sword
0x01e2 1 (byte) MW: Large Sword
0x01e3 1 (byte) SW: Small Blade
0x01e4 1 (byte) Toughness
0x01e5 1 (byte) Armored Arcana
0x01e6 1 (byte) Cleave
0x01e7 1 (byte) Armor Proficiency
0x01e8 1 (byte) SF: Enchantment
0x01e9 1 (byte) SF: Evocation
0x01ea 1 (byte) SF: Necromancy
0x01eb 1 (byte) SF: Transmutation
0x01ec 1 (byte) Spell Penetration
0x01ed 1 (byte) Extra Rage
0x01ee 1 (byte) Extra Wild Shape
0x01ef 1 (byte) Extra Smiting
0x01f0 1 (byte) Extra Turning
0x01f1 1 (byte) EW: Bastard Sword
0x01f2 38 (bytes) Unknown
0x0218 1 (byte) Alchemy
0x0219 1 (byte) Animal Empathy
0x021a 1 (byte) Bluff
0x021b 1 (byte) Concentration
0x021c 1 (byte) Diplomacy
0x021d 1 (byte) Disable Device
0x021e 1 (byte) Hide
0x021f 1 (byte) Intimidate
0x0220 1 (byte) Knowledge (Arcana)
0x0221 1 (byte) Move Silently
0x0222 1 (byte) Open Lock
0x0223 1 (byte) Pick Pocket
0x0224 1 (byte) Search
0x0225 1 (byte) Spellcraft
0x0226 1 (byte) Use Magic Device
0x0227 1 (byte) Wilderness Law
0x0228 50 (bytes) Unknown
0x025a 1 (byte) XP category (values from moncrate.2da)
0x025b 1 (byte) Favoured Enemy 1
0x025c 1 (byte) Favoured Enemy 2
0x025d 1 (byte) Favoured Enemy 3
0x025e 1 (byte) Favoured Enemy 4
0x025f 1 (byte) Favoured Enemy 5
0x0260 1 (byte) Favoured Enemy 6
0x0261 1 (byte) Favoured Enemy 7
0x0262 1 (byte) Favoured Enemy 8
0x0263 1 (byte) Subrace (subrace.ids)
0x0264 2 (byte) Unknown
0x0266 1 (byte) Strength (1-25)
0x0267 1 (byte) Intelligence (1-25)
0x0268 1 (byte) Wisdom (1-25)
0x0269 1 (byte) Dexterity (1-25)
0x026a 1 (byte) Constitution (1-25)
0x026b 1 (byte) Charisma (1-25)
0x026c 4 (byte) Unknown
0x0270 4 (dword) Kit (bitfield)
0x0274 8 (resref) Creature script - Override
0x027c 8 (resref) Creature script - Special Script 3
0x0284 8 (resref) Creature script - Special Script 2
0x0283 8 (resref) Creature script - Combat Script
0x0294 8 (resref) Creature script - Movement Script
0x029c 1 (byte) Visible (0 = No, 1 = Yes)
0x029d 1 (byte) Set <scriptname>_DEAD variable on death (0 = no, 1 = yes)
Also increment KILL_<scriptname>_CNT by one
0x029e 1 (byte) Set KILL_<racename>_CNT on death (0 = no, 1 = yes)
0x029f 1 (byte) Unknown
0x02a0 5 * 2 (word) 'Internals' - as used by SetInternal
0x02aa 32 (byte) Secondary death variable (set to 1 on death)
0x02ca 32 (char array) Tertiary death variable (incremented by 1 on death)
Note: Two death variables can be stored here, if they are separate by a colon, e.g. FOO:BAR would set both FOO_DEAD and BAR_DEAD.
0x02ea 2 (word) Unknown
0x02ec 2 (word) Saved Location X coordinate
0x02ef 2 (word) Saved Location Y coordinate
0x02f0 2 (word) Saved Location orientation
0x02f2 15 (byte) Unknown
0x0301 1 (byte) Minimum transparency (fade in/fade out)
0x0302 1 (byte) Fade speed (fade in/fade out)
0x0303 1 (byte) Specflag values
  • bit 0: Automatic concentration success, no morale failure
  • bit 1: Immune to critical hits
  • bit 2: Disable paladin choice in level-up
  • bit 3: Disable monk choice in level-up
0x0304 1 (byte) Visible
0x0305 1 (byte) Unknown
0x0306 1 (byte) Unknown
0x0307 1 (byte) Remaining skill points (after level up)
0x0308 124 (byte) Unknown
0x0384 1 (byte) Enemy-Ally (EA.IDS)
0x0385 1 (byte) General (GENERAL.IDS)
0x0386 1 (byte) Race (RACE.IDS)
0x0387 1 (byte) Class (CLASS.IDS) — not updated when you multiclass
0x0388 1 (byte) Specific (SPECIFIC.IDS)
0x0389 1 (byte) Sex (GENDER.IDS)
0x038a 5 (bytes) OBJECT.IDS references
0x038f 1 (byte) Alignment (ALIGNMEN.IDS)
0x0390 2 (word) Global actor enumeration value
0x0392 2 (word) Local (area) actor enumeration value
0x0394 32 (char array) Death Variable
0x03b4 2 (word) AVClass value (duplicate of class, used for object matching)
0x03b6 2 (word) ClassMsk bitfield value (duplicate of class, used for object matching)
0x03b8 2 (word) Unknown
0x03ba 4 (dword) Bard Spell Offset (Level 1)
0x03be 4 (dword) Bard Spell Offset (Level 2)
0x03c2 4 (dword) Bard Spell Offset (Level 3)
0x03c6 4 (dword) Bard Spell Offset (Level 4)
0x03ca 4 (dword) Bard Spell Offset (Level 5)
0x03ce 4 (dword) Bard Spell Offset (Level 6)
0x03d2 4 (dword) Bard Spell Offset (Level 7)
0x03d6 4 (dword) Bard Spell Offset (Level 8)
0x03da 4 (dword) Bard Spell Offset (Level 9)
0x03de 4 (dword) Cleric Spell Offset (Level 1)
0x03e2 4 (dword) Cleric Spell Offset (Level 2)
0x03e6 4 (dword) Cleric Spell Offset (Level 3)
0x03ea 4 (dword) Cleric Spell Offset (Level 4)
0x03ee 4 (dword) Cleric Spell Offset (Level 5)
0x03f2 4 (dword) Cleric Spell Offset (Level 6)
0x03f6 4 (dword) Cleric Spell Offset (Level 7)
0x03fa 4 (dword) Cleric Spell Offset (Level 8)
0x03fe 4 (dword) Cleric Spell Offset (Level 9)
0x0402 4 (dword) Druid Spell Offset (Level 1)
0x0406 4 (dword) Druid Spell Offset (Level 2)
0x040a 4 (dword) Druid Spell Offset (Level 3)
0x040e 4 (dword) Druid Spell Offset (Level 4)
0x0412 4 (dword) Druid Spell Offset (Level 5)
0x0416 4 (dword) Druid Spell Offset (Level 6)
0x041a 4 (dword) Druid Spell Offset (Level 7)
0x041e 4 (dword) Druid Spell Offset (Level 8)
0x0422 4 (dword) Druid Spell Offset (Level 9)
0x0426 4 (dword) Paladin Spell Offset (Level 1)
0x042a 4 (dword) Paladin Spell Offset (Level 2)
0x042e 4 (dword) Paladin Spell Offset (Level 3)
0x0432 4 (dword) Paladin Spell Offset (Level 4)
0x0436 4 (dword) Paladin Spell Offset (Level 5)
0x043a 4 (dword) Paladin Spell Offset (Level 6)
0x043e 4 (dword) Paladin Spell Offset (Level 7)
0x0442 4 (dword) Paladin Spell Offset (Level 8)
0x0446 4 (dword) Paladin Spell Offset (Level 9)
0x044a 4 (dword) Ranger Spell Offset (Level 1)
0x044e 4 (dword) Ranger Spell Offset (Level 2)
0x0452 4 (dword) Ranger Spell Offset (Level 3)
0x0456 4 (dword) Ranger Spell Offset (Level 4)
0x045a 4 (dword) Ranger Spell Offset (Level 5)
0x045e 4 (dword) Ranger Spell Offset (Level 6)
0x0462 4 (dword) Ranger Spell Offset (Level 7)
0x0466 4 (dword) Ranger Spell Offset (Level 8)
0x046a 4 (dword) Ranger Spell Offset (Level 9)
0x046e 4 (dword) Sorcerer Spell Offset (Level 1)
0x0472 4 (dword) Sorcerer Spell Offset (Level 2)
0x0476 4 (dword) Sorcerer Spell Offset (Level 3)
0x047a 4 (dword) Sorcerer Spell Offset (Level 4)
0x047e 4 (dword) Sorcerer Spell Offset (Level 5)
0x0482 4 (dword) Sorcerer Spell Offset (Level 6)
0x0486 4 (dword) Sorcerer Spell Offset (Level 7)
0x048a 4 (dword) Sorcerer Spell Offset (Level 8)
0x048e 4 (dword) Sorcerer Spell Offset (Level 9)
0x0492 4 (dword) Wizard Spell Offset (Level 1)
0x0496 4 (dword) Wizard Spell Offset (Level 2)
0x049a 4 (dword) Wizard Spell Offset (Level 3)
0x049e 4 (dword) Wizard Spell Offset (Level 4)
0x04a2 4 (dword) Wizard Spell Offset (Level 5)
0x04a6 4 (dword) Wizard Spell Offset (Level 6)
0x04aa 4 (dword) Wizard Spell Offset (Level 7)
0x04ae 4 (dword) Wizard Spell Offset (Level 8)
0x04b2 4 (dword) Wizard Spell Offset (Level 9)
0x04b6 4 (dword) Bard Spell Count (Level 1)
0x04ba 4 (dword) Bard Spell Count (Level 2)
0x04be 4 (dword) Bard Spell Count (Level 3)
0x04c2 4 (dword) Bard Spell Count (Level 4)
0x04c6 4 (dword) Bard Spell Count (Level 5)
0x04ca 4 (dword) Bard Spell Count (Level 6)
0x04ce 4 (dword) Bard Spell Count (Level 7)
0x04d2 4 (dword) Bard Spell Count (Level 8)
0x04d6 4 (dword) Bard Spell Count (Level 9)
0x04da 4 (dword) Cleric Spell Count (Level 1)
0x04de 4 (dword) Cleric Spell Count (Level 2)
0x04e2 4 (dword) Cleric Spell Count (Level 3)
0x04e6 4 (dword) Cleric Spell Count (Level 4)
0x04ea 4 (dword) Cleric Spell Count (Level 5)
0x04ee 4 (dword) Cleric Spell Count (Level 6)
0x04f2 4 (dword) Cleric Spell Count (Level 7)
0x04f6 4 (dword) Cleric Spell Count (Level 8)
0x04fa 4 (dword) Cleric Spell Count (Level 9)
0x04fe 4 (dword) Druid Spell Count (Level 1)
0x0502 4 (dword) Druid Spell Count (Level 2)
0x0506 4 (dword) Druid Spell Count (Level 3)
0x050a 4 (dword) Druid Spell Count (Level 4)
0x050e 4 (dword) Druid Spell Count (Level 5)
0x0512 4 (dword) Druid Spell Count (Level 6)
0x0516 4 (dword) Druid Spell Count (Level 7)
0x051a 4 (dword) Druid Spell Count (Level 8)
0x051e 4 (dword) Druid Spell Count (Level 9)
0x0522 4 (dword) Paladin Spell Count (Level 1)
0x0526 4 (dword) Paladin Spell Count (Level 2)
0x052a 4 (dword) Paladin Spell Count (Level 3)
0x052e 4 (dword) Paladin Spell Count (Level 4)
0x0532 4 (dword) Paladin Spell Count (Level 5)
0x0536 4 (dword) Paladin Spell Count (Level 6)
0x053a 4 (dword) Paladin Spell Count (Level 7)
0x053e 4 (dword) Paladin Spell Count (Level 8)
0x0542 4 (dword) Paladin Spell Count (Level 9)
0x0546 4 (dword) Ranger Spell Count (Level 1)
0x054a 4 (dword) Ranger Spell Count (Level 2)
0x054e 4 (dword) Ranger Spell Count (Level 3)
0x0552 4 (dword) Ranger Spell Count (Level 4)
0x0556 4 (dword) Ranger Spell Count (Level 5)
0x055a 4 (dword) Ranger Spell Count (Level 6)
0x055e 4 (dword) Ranger Spell Count (Level 7)
0x0562 4 (dword) Ranger Spell Count (Level 8)
0x0566 4 (dword) Ranger Spell Count (Level 9)
0x056a 4 (dword) Sorcerer Spell Count (Level 1)
0x056e 4 (dword) Sorcerer Spell Count (Level 2)
0x0572 4 (dword) Sorcerer Spell Count (Level 3)
0x0576 4 (dword) Sorcerer Spell Count (Level 4)
0x057a 4 (dword) Sorcerer Spell Count (Level 5)
0x057e 4 (dword) Sorcerer Spell Count (Level 6)
0x0582 4 (dword) Sorcerer Spell Count (Level 7)
0x0586 4 (dword) Sorcerer Spell Count (Level 8)
0x058a 4 (dword) Sorcerer Spell Count (Level 9)
0x058e 4 (dword) Wizard Spell Count (Level 1)
0x0592 4 (dword) Wizard Spell Count (Level 2)
0x0596 4 (dword) Wizard Spell Count (Level 3)
0x059a 4 (dword) Wizard Spell Count (Level 4)
0x059e 4 (dword) Wizard Spell Count (Level 5)
0x05a2 4 (dword) Wizard Spell Count (Level 6)
0x05a6 4 (dword) Wizard Spell Count (Level 7)
0x05aa 4 (dword) Wizard Spell Count (Level 8)
0x05ae 4 (dword) Wizard Spell Count (Level 9)
0x05b2 4 (dword) Domain1 Spell Offset
0x05b6 4 (dword) Domain2 Spell Offset
0x05ba 4 (dword) Domain3 Spell Offset
0x05be 4 (dword) Domain4 Spell Offset
0x05c2 4 (dword) Domain5 Spell Offset
0x05c6 4 (dword) Domain6 Spell Offset
0x05ca 4 (dword) Domain7 Spell Offset
0x05ce 4 (dword) Domain8 Spell Offset
0x05d2 4 (dword) Domain9 Spell Offset
0x05d6 4 (dword) Domain1 Spell Count
0x05da 4 (dword) Domain2 Spell Count
0x05de 4 (dword) Domain3 Spell Count
0x05e2 4 (dword) Domain4 Spell Count
0x05e6 4 (dword) Domain5 Spell Count
0x05ea 4 (dword) Domain6 Spell Count
0x05ee 4 (dword) Domain7 Spell Count
0x05f2 4 (dword) Domain8 Spell Count
0x05f6 4 (dword) Domain9 Spell Count
0x05fa 4 (dword) Abilities Offset
0x05fe 4 (dword) Abilities Count
0x0602 4 (dword) Song Offset
0x0606 4 (dword) Song Count
0x060a 4 (dword) Shapes Offset
0x060e 4 (dword) Shapes Count
0x0612 4 (dword) Item slots Offset
0x0616 4 (dword) Item Offset
0x061a 4 (dword) Item Count
0x061e 4 (dword) Effects Offset
0x0622 4 (dword) Effects Count
0x0626 8 resref Dialog


This section details which spells the creature knows, and it consists of an array of entries formatted as follows.

Offset Size (data type) Description
0x0000 4 (dword) Spell Index (index into the relevant 2da file - listspll, listdomm, listinnt, listshap, listsong)
0x0004 4 (dword) Amount Memorised
0x0008 4 (dword) Amount Remaining
0x000c 4 (dword) Unknown


This section details how many spells the creature can memorize, and how many it has memorized. It consists of an array of entries formatted as follows.

Offset Size (data type) Description
0x0000 4 (dword) Total memorization slots
0x0004 4 (dword) Free memorization slots


This section details which items the character has. It consists of an array of entries formatted as follows:

Offset Size (data type) Description
0x0000 8 (resref) Resource name of the ITM file
0x0008 1 (byte) Item expiration time - item creation hour (replace with drained item)
0x0009 1 (byte) Item expiration time - (elapsed hour count divided by 256, rounded down) + 1 (replace with drained item)
When the game hour and elapsed hour count for the current game time exceed these values, the item is removed.
0x000a 2 (word) Quantity/Charges 1
0x000c 2 (word) Quantity/Charges 2
0x000e 2 (word) Quantity/Charges 3
0x0010 4 (dword) Flags
  • bit 0: Identified
  • bit 1: Unstealable
  • bit 2: Stolen
  • bit 3: Magical


This is an array keeping track of which items are located in each particular location in the CRE's inventory. There are 52 slots, and they are NOT the same as the order specified in specified in SLOTS.IDS. The actual order is:
  • Helmet
  • Armor
  • Shield
  • Gloves
  • L.Ring
  • R.Ring
  • Amulet
  • Belt
  • Boots
  • Weapon 1
  • Shield 1
  • Weapon 2
  • Shield 2
  • Weapon 3
  • Shield 3
  • Weapon 4
  • Shield 4
  • Quiver 1
  • Quiver 2
  • Quiver 3
  • Quiver 4 (cannot be accesed from GUI)
  • Cloak
  • Quick item 1
  • Quick item 2
  • Quick item 3
  • Inventory item (1 to 24)
  • Magic weapon
  • Selected weapon
  • Selected weapon ability
Each entry will be either 0xFFFF ("empty") or an index into the Items table. Selected is a dword indicating which weapon slot us currently selected. Values are from slots.ids - 35, with 1000 meaning "fist".