Abrir menu principal

UESPWiki β

Skyrim Mod:Mod File Format/TES4

< File Formats: Mod File Format

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

  • Flags indicate whether a file is a master (Flags & 1) or plugin, regardless of what the file extension says.
  • Flags also indicate whether a file has localized string tables (Flags & 128). If this flag is not set, lstrings are treated as zstrings.
C SubRecord Name Type/Size Info
+ HEDR header struct
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.