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:
- A single TES4 record (plugin information).
- A collection of top groups.
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
|
|
|
|
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). | ||||||||||||||||||||||||||||||||||||||||||||||||
label | uint8[4] | Format depends on group type. | ||||||||||||||||||||||||||||||||||||||||||||||||
groupType | int32 | Group type...
|
||||||||||||||||||||||||||||||||||||||||||||||||
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:
Records
Name | Type/Size | Info | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type | char[4] | Type | ||||||||||||||||||||||||||||||||||||||||||||||||
dataSize | uint32 | Size of data field. | ||||||||||||||||||||||||||||||||||||||||||||||||
flags | uint32 | Flags...
|
||||||||||||||||||||||||||||||||||||||||||||||||
id | uint32 | Record (form) identifier.
|
||||||||||||||||||||||||||||||||||||||||||||||||
revision | uint32 | Used for revision control by the CS (only if enabled)
|
||||||||||||||||||||||||||||||||||||||||||||||||
version | uint16 | |||||||||||||||||||||||||||||||||||||||||||||||||
unknown | uint16 | unknown | ||||||||||||||||||||||||||||||||||||||||||||||||
data | uint8[dataSize] | Data
|
Fields
Name | Type/Size | Info |
---|---|---|
type | char[4] | Field type. |
dataSize | uint16 | Size of data field. † |
data | uint8[dataSize] | Data.
|
†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.