Morrowind Mod:Mod File Format/CREA

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

CREA records contain information on creatures.

C Field Type/Size Info
+ NAME zstring ID string
+ MODL zstring NIF model
- CNAM zstring Sound Gen Creature
- FNAM zstring Name
- SCRI zstring Script name
+ NPDT struct
(96 bytes)
Creature data
uint32 - Type
0 = Creature
1 = Daedra
2 = Undead
3 = Humanoid
uint32 - Level
uint32[8] - Attributes (in order of Attribute ID, as found on Morrowind:Attributes)
uint32 - Health
uint32 - SpellPts
uint32 - Fatigue
uint32 - Soul
uint32 - Combat
uint32 - Magic
uint32 - Stealth
uint32 - AttackMin1
uint32 - AttackMax1
uint32 - AttackMin2
uint32 - AttackMax2
uint32 - AttackMin3
uint32 - AttackMax3
uint32 - Gold
+ FLAG uint32 Creature flags
0x0001 = Biped
0x0002 = Respawn
0x0004 = Weapon and shield
0x0008 = None
0x0010 = Swims
0x0020 = Flies
0x0040 = Walks
0x0048 = Default flags
0x0080 = Essential
0x0400 = Blood Type 1 (Dust)
0x0800 = Blood Type 2 (Sparks)
0x0C00 = Blood Type 3
0x1000 = Blood Type 4
0x1400 = Blood Type 5
0x1800 = Blood Type 6
0x1C00 = Blood Type 7
Blood is stored as a value from 0-7, shifted 10 bits in. The actual names, textures, and models for the blood are not hardcoded and are stored in Morrowind.ini. By default the game uses values of Red (0), Dust (1) and Sparks (2).
- XSCL float32 Scale (1.0 if missing)
* NPCO struct
(36 bytes)
Carried object
uint32 - Object count (negative counts are restocking)
char[32] - Object name
* NPCS char[32] Spells
+ AIDT struct
(12 bytes)
AI data
uint8 Hello
uint8 Unknown
uint8 Fight
uint8 Flee
uint8 Alarm
[3]uint8 alignment padding (junk)
uint32 Flags
0x00001 = Weapon
0x00002 = Armor
0x00004 = Clothing
0x00008 = Books
0x00010 = Ingredient
0x00020 = Picks
0x00040 = Probes
0x00080 = Lights
0x00100 = Apparatus
0x00200 = Repair Items
0x00400 = Misc
0x00800 = Spells
0x01000 = Magic Items
0x02000 = Potions
0x04000 = Training
0x08000 = Spellmaking
0x10000 = Enchanting
0x20000 = Repair
Remaining bits appear to be filled with junk data
* DODT struct
(24 bytes)
Cell Travel Destination
float32 - Position X
float32 - Position Y
float32 - Position Z
float32 - Rotation X
float32 - Rotation Y
float32 - Rotation Z
DNAM
zstring Cell name for previous DODT, if interior
AI Packages - the following fields can appear in any order, one per AI package, with the order defining the package priority.

Note: duration parameters in all packages are in hours. Any value greater than 24 should be divided by 100, and set to 24 if still greater than 24. The unknown value for each package seems to be an end-of-data marker; it is always a byte value set to 1 with any remaining data in the structure undefined and ignored.

* AI_A struct
(33 bytes)
Activate package:
char[32] - Name
uint8 - Unknown (always 1)
AI_E struct
(48 bytes)
Escort package:
float32 - X
float32 - Y
float32 - Z
uint16 - Duration
char[32] - ID
uint8 - Unknown (always 1)
uint8 - Unused
CNDT
zstring Cell escort string (optional)
AI_F struct
(48 bytes)
Follow package:
float32 - X
float32 - Y
float32 - Z
uint16 - Duration
char[32] - ID
uint8 - Unknown (always 1)
uint8 - Unused
CNDT
zstring Cell follow to string (optional)
AI_T struct
(16 bytes)
Travel package:
float32 - X
float32 - Y
float32 - Z
uint8 - Unknown (always 1)
uint8[3] - Unused
AI_W struct
(14 bytes)
Wander package:
uint16 - Distance
uint16 - Duration
uint8 - Time of Day
uint8[8] - Idles
uint8 - Unknown (always 1)