Tes4Mod:Mod File Format/TES4
The UESPWiki – Your source for The Elder Scrolls since 1995
TES4 is the header record for the mod file. It contains info like author, description, file type, and masters list.
- Unlike TES3, author and description fields are no longer of fixed size. If you edit their content, you'll almost certainly have to rewrite the entire file.
- In Progress -- some info may be inaccurate.
| C | SubRecord | Name | Type/Size | Info |
|---|---|---|---|---|
| + | HEDR | header | struct |
|
| version | float | 0.8 | ||
| numRecords | long | Number of records and groups (not including TES4 record itself). | ||
| nextObjectId | ulong | Next available object id. ?But large variation has been seen? | ||
| - | OFST | typeOffsets? | struct[*] |
If you look a little closer, the last two bytes of the first long are a counter that starts at zero for type NONE increasing to x38 for QUST. And that's about the last thing that makes sense: |
|
ubyte[3] | Unknown.
|
||
|
byte | Count/number of following record type. Starts at 0 and increments by one with each type. | ||
|
char[4] | Type name? Except there are several "types" (TLOD, SNDG) that don't exist in the Oblivion.esm. | ||
|
ulong | Always 0, except for type CELL which is very large. | ||
| - | DELE | deleted? | ?? |
Unknown. List of deleted formids?
|
| - | CNAM | author | zstring |
|
| - | SNAM | description | zstring |
|
| * | MAST | master | zstring | Master filename.
|
|
fileSize | uint64 |
|

![[Content is available under Attribution-ShareAlike]](http://www.uesp.net/w/images/Somerights.png)