Tes5Mod talk:Mod File Format

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

Pre-Release Notes[edit]

The working assumption at the moment is that Skyrim will use a mod file format similar to that used by Oblivion. However, various changes introduced for Fallout 3 are likely to be incorporated into Skyrim, too. The best documentation of the Fallout3.esm format that I can find is here.

Key differences that I've noted with Fallout3 are:

  • The headers for both records and groups (but not subrecords) are 4 bytes longer than in Oblivion (24 bytes total instead of 20). The extra 4 bytes is assumed to be flags, but the meaning of the flags does not appear to be known.
    • This is the only change that was made to the fundamental structure of the file -- GRUPs, records, and subrecords are used in the exact same way; XXXX subrecords are used for oversized subrecord lengths; compressed subrecords exist and are identified with the same flag.
  • References to magical effects use the effect's refID instead of the EDID, making magical effects more consistent with all other references. The data is still stored as 4 bytes, but the 4 bytes are an integer instead of a string such as 'FIDG'.
  • There are no SKIL records in Fallout3 -- AVIF (Actor Value Info) records are used instead.
  • Skill perk information is in PERK records.

Of course, there are also differences in various details of the individual subrecords -- although fewer than might be expected.

--NepheleTalk 04:59, 6 October 2011 (UTC)

In case anyone's interested, here's a breakdown of the different types of record used by Fallout3.
I agree that the new field in each record's header is almost certainly flags. The number of records with bits 0, 1, 2 and 3 set is huge - about 75% of them. Bits 4-15 are only set in a tiny fraction - roughly 0.5%. There's another large group with the first few bits of the upper 16 bits set too. rpeh •TCE 07:11, 8 October 2011 (UTC)
* Probably more than this but my code crashed
If anyone has got updated .NET code for ZLib 1.2.5 I'd love to have it. I'm on the old 1.0.4 version and I think that's why things stopped working part way through Fallout:New Vegas' import. rpeh •TCE 12:30, 11 October 2011 (UTC)
Updated with information from TES5Edit/fopdoc as of 2 Jun 2014 documents the FO3, FNV, and FO4 plugin file formats known to the xEdit team. Only FO3 & FNV records edited.
Dubious (talk) 06:26, 23 April 2017 (UTC)

Page name[edit]

This is me just nitpicking, but would it not be better to have the page (and sub-pages) named 'Plugin File Format' rather than 'Mod File Format'? Seems more appropriate. —Rick 05:28, 10 November 2011 (UTC)

It might be good to have a redirect from Plugin File Format to here, but I'm not sure about actually renaming the page. Although I suppose I don't feel too strongly either way. --NepheleTalk 05:43, 10 November 2011 (UTC)
I figured I would bring it up before the pages started being created and getting fleshed out. —Rick 05:54, 10 November 2011 (UTC)

General Skyrim Changes[edit]

Just wanted to make some quick notes about some key things that are different processing Skyrim data.

  • Strings, which have already been covered elsewhere.
  • Keywords
    • Used for a lot of flags/type information (e.g. weapon types all tracked via 'WeapType%' keywords; armor types tracked via 'ArmorHeavy'/'ArmorLight')
    • Keywords themselves are in rectype KYWD
    • Vast majority of rectypes contain KSIZ and KWDA subrecords. KSIZ is the number of keywords. KWDA is then 4*KSIZ bytes in size, containing KSIZ formids pointing to KYWD records.
  • All creature-related information has been wiped out. No CREA, ACRE, LVLC rectypes exist. Instead there are now 99 races -- including Wolf, Fox, Giant, Wisp, Draugr etc.
  • No CLOT records any more. All included in ARMO, with ArmorClothing and ArmorJewelry keywords (generally) identifying the non-armor items.

--NepheleTalk 07:31, 11 November 2011 (UTC)


Sorry about not discussing it, but I was attempting to clean the page up to use official terminology (they're called forms by the game engine). —Rick 06:09, 13 November 2011 (UTC)

Yeah, I realized with the FormID that we've got somewhat of an inconsistency there. But at first I had no idea what the page was talking about with forms, so I'm guessing other readers might have the same issue. --NepheleTalk 07:56, 13 November 2011 (UTC)
No problem with having it as record for clarity then. —Rick 08:34, 13 November 2011 (UTC)


I'm extending CBash 0.6 for Skyrim support, could serve as reference-implementation.

12 mystery record types[edit]

Thes were in the main record type table. No grup, no records, maybe these came from FO3/FONV?

  • NOTE - Note
  • PCON -
  • PARW -
  • PBAR -
  • PBEA -
  • PFLA -
  • PMIS - Placed missile
  • SKIL - Skill
  • TLOD -
  • TOFT -
  • MICN - Menu Icon — Unsigned comment by Themendios (talkcontribs)

oh they came from here: http://www.uesp.net/wiki/Tes5Mod:Forms/

well since this is the mod file format and they're not in mod files i assume there's no objections? if not then i'll just delete this note in a couple days —Themendios 16:48, 27 December 2011 (UTC)

Stamp Property[edit]

As near as I can determine, the stamp property isn't in MS-DOS format as I understand it (e.g. [1]). Suspiciously, the first of the four bytes in the sequence has a range of 1 to 30 in Skyrim.esm, the second and third bytes seem to have a very narrow range of values, and the last byte is always 0. Does anybody else have any thoughts on this? For reference, I've posted the full list of stamp data from the top-level groups below.

At a cursory glance of Oblivion.esm, the dates in TES 4 also don't look to be MS-DOS format, so either I have a different understanding of what MS-DOS formatted dates are, or we'll need to correct the information there as well once we figure it out. Robin Hoodtalk 21:21, 29 March 2012 (UTC)

Poking around some more, I found the Revision format, and that seems like a more likely bet for the stamp format. Using that, I get dates ranging from January 17, 2008 to September 29, 2010 in Skyrim.esm (with the exception of the very last GRUP record, which is February 1, 2003), and October 12, 2011 to February 9, 2012 in Update.esm. Robin Hoodtalk 21:54, 29 March 2012 (UTC)
Okay, this almost certainly is the same format as the revision, and it looks like we've got it wrong on Oblivion. As I've stated in the article, the high byte of the 16-bit value is the number of months since December 2002, not the complicated thing we have currently in Tes4Mod. I seem to be having some oddness with testing this in Oblivion right now, though, as everything is reverting to month 03. All the old stuff I have saved, though, the calculated date matches (or at least is similar to) the last release date of the mod. Same with all the Skyrim mods I tested. I'm assuming the other 16 bits is the check-out log, like in Oblivion, but I have no way of confirming that. Robin Hoodtalk 00:40, 30 March 2012 (UTC)

Character encoding[edit]

Just want to note here that based on inspections of Japanese ESP files, the game seems to use UTF-8 for strings, with a null terminating byte. DavidJCobb (talk) 20:19, 22 August 2018 (UTC)