Skyrim Mod:Mod File Format

A UESPWiki – Sua fonte de The Elder Scrolls desde 1995

Mod files (Plugin files) are collections of records, which are further divided into fields.

Records generally correspond to objects (e.g., a creature, a game setting, a dialog entry), with the fine details of the object (e.g., health of a creature, a dialog entry test) being handled by the fields of the record. Records themselves are organized into groups.

At the highest grouping level, a plugin file is generally:

Dawnguard

The following had sub-record order changes and updates. Also pre-existing or new records were added.

  • LCTN, INFO, NPC_, RACE, NAVI, QUST, REFR, WRLD

New SubRecords:

  • LCTN added: ACID, ACSR, ACUN, ACEC, ACEP, RCPR
  • NAVI added: NVSI
  • REFR added: XATR

Record Types

Type Data Object
AACT Action
ACHR Actor Reference
ACTI Activator
ADDN Addon Node
ALCH Potion
AMMO Ammo
ANIO Animated Object
APPA Apparatus (probably unused)
ARMA Armature (Model)
ARMO Armor
ARTO Art Object
ASPC Acoustic Space
ASTP Association Type
AVIF Actor Values/Perk Tree Graphics
BOOK Book
BPTD Body Part Data
CAMS Camera Shot
CELL Cell
CLAS Class
CLFM Color
CLMT Climate
COBJ Constructible Object (recipes)
COLL Collision Layer
CONT Container
CPTH Camera Path
CSTY Combat Style
DEBR Debris
DIAL Dialog Topic
DLBR Dialog Branch
DLVW Dialog View
Type Data Object
DOBJ Default Object Manager
DOOR Door
DUAL Dual Cast Data (possibly unused)
ECZN Encounter Zone
EFSH Effect Shader
ENCH Enchantment
EQUP Equip Slot (flag-type values)
EXPL Explosion
EYES Eyes
FACT Faction
FLOR Flora
FLST Form List (non-leveled list)
FSTP Footstep
FSTS Footstep Set
FURN Furniture
GLOB Global Variable
GMST Game Setting
GRAS Grass
GRUP Form Group
HAZD Hazard
HDPT Head Part
IDLE Idle Animation
IDLM Idle Marker
IMAD Image Space Modifier
IMGS Image Space
INFO Dialog Topic Info
INGR Ingredient
IPCT Impact Data
IPDS Impact Data Set
KEYM Key
Type Data Object
KYWD Keyword
LAND Landscape
LCRT Location Reference Type
LCTN Location
LGTM Lighting Template
LIGH Light
LSCR Load Screen
LTEX Land Texture
LVLI Leveled Item
LVLN Leveled Actor
LVSP Leveled Spell
MATO Material Object
MATT Material Type
MESG Message
MGEF Magic Effect
MISC Misc. Object
MOVT Movement Type
MSTT Movable Static
MUSC Music Type
MUST Music Track
NAVI Navigation (master data)
NAVM Nav Mesh
NPC_ Actor (NPC, Creature)
OTFT Outfit
PACK AI Package
PERK Perk
PGRE Placed grenade
PHZD Placed hazard
PROJ Projectile
QUST Quest
Type Data Object
RACE Race / Creature type
REFR Object Reference
REGN Region (Audio/Weather)
RELA Relationship
REVB Reverb Parameters
RFCT Visual Effect
SCEN Scene
SCRL Scroll
SHOU Shout
SLGM Soul Gem
SMBN Story Manager Branch Node
SMEN Story Manager Event Node
SMQN Story Manager Quest Node
SNCT Sound Category
SNDR Sound Reference
SOPM Sound Output Model
SOUN Sound
SPEL Spell
SPGD Shader Particle Geometry
STAT Static
TACT Talking Activator
TES4 Plugin info
TREE Tree
TXST Texture Set
VTYP Voice Type
WATR Water Type
WEAP Weapon
WOOP Word Of Power
WRLD World Space
WTHR Weather

Groups

GRUPs are collections of records, and are used to improve scanning of files to make it easier to skip over records that the reading program is not interested in. In addition to this, subgroups for WRLD and CELLS provide some useful structural information (e.g., the division of cell data into persistent and non-persistent references.)

File Format

Name Type/Size Info
type char[4] Always "GRUP"
groupSize uint32 Size of the entire group, including the group header (24 bytes).
  • This is in contrast to records and fields, whose sizes does not include their header sizes.
label uint8[4] Format depends on group type.
groupType int32 Group type...
Type Info Label Type Description
0 Top (Type) char[4] Record type
1 World Children formid Parent (WRLD)
2 Interior Cell Block long Block number
3 Interior Cell Sub-Block long Sub-block number
4 Exterior Cell Block short[2] Grid Y, X (Note the reverse order)
5 Exterior Cell Sub-Block short[2] Grid Y, X (Note the reverse order)
6 Cell Children formid Parent (CELL)
7 Topic Children formid Parent (DIAL)
8 Cell Persistent Childen formid Parent (CELL)
9 Cell Temporary Children formid Parent (CELL)
10 Cell Visible Distant Children formid Parent (CELL)
stamp uint16 Date stamp, presumably of the last file modification. Low byte = day; high byte = number of months since December 2002 (i.e., 1 = January 2003).
unknown uint16
version uint16
unknown uint16
data uint8[groupSize-24] Records and subgroups.

Top Groups

In Skyrim.esm, the top, or highest level groups are stored in the following order:

GMST, KYWD, LCRT, AACT, TXST, GLOB, CLAS, FACT, HDPT, HAIR, EYES, RACE, SOUN, ASPC, MGEF, SCPT, LTEX, ENCH, SPEL, SCRL, ACTI, TACT, ARMO, BOOK, CONT, DOOR, INGR, LIGH, MISC, APPA, STAT, SCOL, MSTT, PWAT, GRAS, TREE, CLDC, FLOR, FURN, WEAP, AMMO, NPC_, LVLN, KEYM, ALCH, IDLM, COBJ, PROJ, HAZD, SLGM, LVLI, WTHR, CLMT, SPGD, RFCT, REGN, NAVI, CELL, WRLD, DIAL, QUST, IDLE, PACK, CSTY, LSCR, LVSP, ANIO, WATR, EFSH, EXPL, DEBR, IMGS, IMAD, FLST, PERK, BPTD, ADDN, AVIF, CAMS, CPTH, VTYP, MATT, IPCT, IPDS, ARMA, ECZN, LCTN, MESG, RGDL, DOBJ, LGTM, MUSC, FSTP, FSTS, SMBN, SMQN, SMEN, DLBR, MUST, DLVW, WOOP, SHOU, EQUP, RELA, SCEN, ASTP, OTFT, ARTO, MATO, MOVT, HAZD, SNDR, DUAL, SNCT, SOPM, COLL, CLFM, REVB

Whether the game engine expects this order is unknown, but it's probably safer to use this order than not.

All top groups contain records matching their label (e.g., the GMST top group contains GMST records). For most top groups, only the matching record types are present. However, in the CELL, WRLD and DIAL top groups, each main record can be followed by one or more child groups which contain additional records of a different type. Unlike Oblivion, WRLD groups in Skyrim no longer contain ROAD records.

The following groups are only found in subgroups of other records:

REFR, ACHR, NAVM, PGRE, PHZD, LAND, INFO

Notes:

  • 6 record types have a GRUP but have no records:CLDC, HAIR, RGDL, SCPT, SCOL, PWAT.
  • There are 2 HAZD groups, the second one has no records.

Records

Name Type/Size Info
type char[4] Type
dataSize uint32 Size of data field.
flags uint32 Flags...
Flag Meaning
0x00000001 (TES4 record only) Master (ESM) file.
0x00000020 Deleted
0x00000040 Constant / (REFR) Hidden From Local Map (Needs Confirmation: Related to shields)
0x00000080 (TES4) Localized / Is Perch / (PHZD) Turn off fire
(TES4 record only) Is localized. This will make Skyrim load the .STRINGS, .DLSTRINGS, and .ILSTRINGS files associated with the mod. If this flag is not set, lstrings are treated as zstrings.
0x00000100 Must Update Anims / (REFR) Inaccessible
0x00000200 (REFR) Hidden from local map / (ACHR) Starts dead /(REFR) MotionBlurCastsShadows
0x00000400 Quest item / Persistent reference / (LSCR) Displays in Main Menu
0x00000800 Initially disabled
0x00001000 Ignored
0x00008000 Visible when distant
0x00010000 (ACTI) Random Animation Start
0x00020000 (ACTI) Dangerous / Off limits (Interior cell)
Dangerous Can't be set withough Ignore Object Interaction
0x00040000 Data is compressed
0x00080000 Can't wait
0x00100000 (ACTI) Ignore Object Interaction
Ignore Object Interaction Sets Dangerous Automatically
0x00800000 Is Marker
0x02000000 (ACTI) Obstacle / (REFR) No AI Acquire
0x04000000 NavMesh Gen - Filter
0x08000000 NavMesh Gen - Bounding Box
0x10000000 (FURN) Must Exit to Talk / (REFR) Reflected By Auto Water
0x20000000 (FURN/IDLM) Child Can Use / (REFR) Don't Havok Settle
0x40000000 NavMesh Gen - Ground / (REFR) NoRespawn
0x80000000 (REFR) MultiBound
id uint32 Record (form) identifier.
  • TES4 records have a FormId of 0.
revision uint32 Used for revision control by the CS (only if enabled)
  • Probably the same format as Oblivion's
version uint16
unknown uint16 unknown
data uint8[dataSize] Data
  • For uncompressed records, this is a sequence of fields.
  • Compressed data is the same, except that the fields are compressed using ZLIB, and stored into the data field like so...
Name Type/Size Info
decompSize uint32 Size of decompressed data.
compData uint8[dataSize-4] Compressed collection of fields.

Fields

Name Type/Size Info
type char[4] Field type.
dataSize uint16 Size of data field.
data uint8[dataSize] Data.
  • Format depends on record and field type.

If the preceding field has the type XXXX, then dataSize will be 0 and the size of the data is in fact the 32 bit quantity stored in the XXXX field. This feature is commonly used to store large navmesh fields in Skyrim.esm.

Commonly used fields and their definitions can be found here.

See Also

  • Raw Data: a dump of all records/subrecords in Skyrim.esm and their associated counts/sizes.
  • Raw Function Data: a dump of all script/console functions and events in TESV.exe.