Tes5Mod:Mod File Format/TES4

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

TES4 is the header record for the mod file. It contains info like author, description, file type, and masters list. Record flags indicate the following:

  • 0x1: if set, the file is treated as a master, regardless of what the file extension says.
  • 0x80: whether the file has localized string tables. If this flag is not set, lstrings are treated as zstrings.
  • 0x200: if set, the file is treated as a light master.
C SubRecord Name Type/Size Info
+ HEDR version float 0.94 in most files; 1.7 in recent versions of Update.esm.
numRecords int32 Number of records and groups (not including TES4 record itself).
nextObjectId ulong Next available object ID.
- CNAM author zstring
  • Max size: 512 bytes (including terminator).
- SNAM description zstring
  • Max size: 512 bytes (including terminator).
* MAST master zstring Master filename.
  • Each pair of MAST/DATA subrecords represent a single master of the mod file.
  • Master files are listed in load order at the time the mod was saved.
  • The modindex of formids in the mod file match the order of masters given here.
DATA fileSize uint64
  • Always 0. Probably Vestigial.
  • In Tes3, the file size of the master was recorded here.
- ONAM overrides formid[] Overridden forms
  • This record only appears in ESM flagged files which override their masters' cell children.
  • An ONAM subrecord will list, exclusively, FormIDs of overridden cell children (ACHR, LAND, NAVM, PGRE, PHZD, REFR).
  • Observed in Update.esm as of Patch 1.5.24.
  • Number of records is based solely on field size.
+ INTV unknown uint32 Unknown. Possibly "internal version"?
  • It's unclear if this subrecord is required. Observed in both Skyrim.esm and Update.esm.
- INCC unknown uint32 Unknown.
  • Introduced with the Skyrim 1.6 update in Update.esm.