Morrowind Mod:Mod File Format

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

Mod files (also called plugin files) for the TES3 Construction Set are essentially collections of records which are further divided into fields. Records generally correspond to objects in the Construction Set (e.g., a creature, a game setting, a dialogue entry), with the fine details of the object (e.g., health of a creature, a dialog entry text) being handled by the fields of the record.

A plugin file uses the following format:

  • A single TES3 record (plugin information).
  • A collection of records of varying types, as detailed below.

Note that the information on these pages is intended for mod files and may or may not apply to saved game files, which use a slightly different structure. In particular, saved game files include record types not documented here (e.g., CNTC, CREC, and NPCC, which record changes to containers, creatures, and NPCs). Also, saved games sometimes emit fields in a different order or include fields not present in plugins at all.

Record Types[edit]

Type Data Object
ACTI Activator
ALCH Potion
APPA Alchemy Apparatus
ARMO Armor
BODY Body Parts
BOOK Book
BSGN Birthsign
CELL Cell
CLAS Class
CLOT Clothing
CONT Container
CREA Creature
DIAL Dialog Topic
DOOR Door
ENCH Enchantment
Type Data Object
FACT Faction
GLOB Global
GMST Game Setting
INFO Dialog response
INGR Ingredient
LAND Land
LEVC Leveled Creature
LEVI Leveled Item
LIGH Light
LOCK Lockpicking Items
LTEX Land Texture
MGEF Magic Effect
MISC Misc. Item
NPC_ Non-Player Character
PGRD Path grid
Type Data Object
PROB Probe Items
RACE Race
REGN Region
REPA Repair Items
SCPT Script
SKIL Skill
SNDG Sound Generator
SOUN Sound
SPEL Spell
SSCR Start Script
STAT Static
TES3 Tes3 Header
WEAP Weapon

Records[edit]

Internally, the readers in both the game and the Construction Set take the approach of looping through all fields and then taking action based on the field name found. This means that fields can appear in almost any order, and unrecognized fields will be ignored. The Construction Set writes files in a specific order, though, which is described on the individual record pages. If your application is writing a mod file, it is suggested that you follow this preferred format if possible.

In addition to the fields listed on each record's page, all records support a DELE tag, indicating that a mod is deleting a record from one of its master files. This is always a uint32. It usually has a 0 value, but SSCR and CELL records can have other values; these values are unused and appear to be vestigial.

Type/Size Info
char[4] Record type
uint32 Size of data field. (Must be at least 1)
uint32 Appears to be completely unused. May have been intended for additional flags.
uint32 Flags
0x0020 = Deleted (used internally, usually flagged in files by DELE field instead)
0x0400 = Persistent reference
0x0800 = Initially disabled (only used internally, but see CELL)
0x2000 = Blocked
uint8[dataSize] Data (see Fields, below)

Fields[edit]

Type/Size Info
char[4] Field type
uint32 Size of data field (Size of 0 is treated as 1)
uint8[dataSize] Data (format depends on record and field type)