Skyrim Mod:Mod File Format
< Mod / Skyrim: Skyrim Mod: File Formats(Redirected from Skyrim Mod:Mod File Format/GRUP)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.
Record TypesEdit
|
|
|
|
GroupsEdit
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 FormatEdit
Type/Size | Info | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
char[4] | Record type (always "GRUP") | ||||||||||||||||||||||||||||||||||||||||||||
uint32 | Size of the entire group, including the group header (24 bytes). | ||||||||||||||||||||||||||||||||||||||||||||
uint8[4] | Label. Format depends on group type (see next field).
|
||||||||||||||||||||||||||||||||||||||||||||
int32 | Group type:
|
||||||||||||||||||||||||||||||||||||||||||||
uint16 | Timestamp
|
||||||||||||||||||||||||||||||||||||||||||||
uint16 | Version Control Info
|
||||||||||||||||||||||||||||||||||||||||||||
uint32 | Unknown. The values stored here are significantly different than those used in records and appear to be a 32-bit value rather than two 16-bit values. Values break out by group type:
|
||||||||||||||||||||||||||||||||||||||||||||
uint8[groupSize-24] | Records and subgroups. |
Top GroupsEdit
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.
Notes:
- 6 record types have a GRUP but no records: CLDC, HAIR, RGDL, SCPT, SCOL, PWAT.
- There are 2 HAZD groups, the second one has no records.
Dawnguard The following had field order changes and updates. Also pre-existing or new records were added.
- LCTN, INFO, NPC_, RACE, NAVI, QUST, REFR, WRLD
New Fields:
- LCTN added: ACID, ACSR, ACUN, ACEC, ACEP, RCPR
- NAVI added: NVSI
- REFR added: XATR
SubgroupsEdit
The following groups are only found in subgroups of other records:
- REFR, ACHR, NAVM, PGRE, PHZD, LAND, INFO
RecordsEdit
Type/Size | Info | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
char[4] | Type | ||||||||||||||||||||||||||||||||||||||||||||||||||
uint32 | Size of data field | ||||||||||||||||||||||||||||||||||||||||||||||||||
uint32 | Flags
|
||||||||||||||||||||||||||||||||||||||||||||||||||
uint32 | Record (form) identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||
uint16 | Timestamp (see the same field in Groups) | ||||||||||||||||||||||||||||||||||||||||||||||||||
uint16 | Version Control Info (see the same field in Groups) | ||||||||||||||||||||||||||||||||||||||||||||||||||
uint16 | The internal version of the record. This can be used to distinguish certain records that have different field layouts or sizes. | ||||||||||||||||||||||||||||||||||||||||||||||||||
uint16 | Unknown. Values range between 0-15. | ||||||||||||||||||||||||||||||||||||||||||||||||||
uint8[dataSize] | Data
|
FieldsEdit
Type/Size | Info |
---|---|
char[4] | Field type. |
uint16 | Size of data field. † |
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. Many records allow for object bounds (OBND) and scripting (VMAD) fields, but ignore them. It's unclear why. Only those records to which they actually apply will have these fields listed.
See AlsoEdit
- Raw Data: a dump of all records/fields in Skyrim.esm and their associated counts/sizes.
- Raw Function Data: a dump of all script/console functions and events in TESV.exe.