Plugin Management Guidelines
Redirect to:
This page details the idiosyncrasies of dealing with Morrowind's two content file types – .esm
and .esp
. Most developers starting out will only work with .esp
files, but others wil including how the engine(s) handle the load order for said files, how
ESP and ESM Basics
Elder Scrolls Master (.esm
) and Elder Scrolls Plugin (.esp
) are the content file formats of Morrowind. The original game files are .esm
files. Mods can be .esm
or .esp
files. Public releases of Tamriel Rebuilt's and Project Tamriel's playable content (e.g., TR_Mainland) use the ESM
format; internal versions of the file (stilL) use the ESP
format.
- File with
.esm
extension: master file - File with
.esp
extension: plugin file
Note:
What's the difference?
ESM and ESP files are identical except for a single byte in the header of the file. Wrye Mash and tes3cmd can instantly turn a master into a plugin, or the other way around.
The difference is how the game and the CS (Construction Set) treat the files.
Load order
Vanilla engine: Load order is defined by modified date and oldest files are loaded first, but master files are loaded before all plugin files.
OpenMW: Currently, load order is explicit or by default alphabetical. Master files aren't loaded before all plugins on principle, but are loaded before plugins that depend on them.
Auto-loading
If a file is listed as a "Parent master" for a file that is being loaded, the game will load the parent master automatically, and fail if it isn't found. This is called a dependency.
The CS will also properly load at most four Parent masters automatically when loading a plugin (Morrowind.esm, Tribunal.esm, Bloodmoon.esm, +Tamriel_Data.esm will load on their own if a file has them for parents) but will fail to load with five or more masters if they haven't been manually selected.
The game and the CS will give a warning if the master file is different from the one that was recorded as parent. (see below in "Parenting")
Editing
Master files cannot be set as "Active file" in the CS, so the CS will only directly edit plugin files. To edit a master file in the CS, turn it into ESP with Wrye Mash or tes3cmd, edit it, then turn it back into ESM.
Merge to Master
To merge an ESP into an ESM, you need to enable the Merge to Masters button in the CS. This is a straightforward ini tweak. Once enabled the button can be found in the Data Files popup.
WhoCanMerge
Open Morrowind.ini
and find or add [WhoCanMerge]
. This section defines a list of Windows users who can use the CS to merge to master. The syntax for each line is username=1
where username is the name of the Windows user who can merge. So if your username is "EE", the section would look as follows:
[WhoCanMerge] EE=1
Merging an ESP
Open the Data Files menu and check the ESM you want to merge into, its master files, and the ESP you want to merge into it. Just as you would if you wanted to load them for regular editing/viewing. Note that the ESP to be merged should be set as the active file. Proceed to click the Merge to Masters button. You will be shown a file selection menu, select the ESM you want to merge into and press Save. Your ESP should now be part of your ESM. Be aware that doing this overwrites your original ESM and deletes your ESP. Making a backup of both prior to merging is advisable.