This step covers the three plugin types (ESP, ESM, ESL), their differences, and how one can be converted to another with special emphasis on creating ESLs.
You may have noticed that we have plugins with three different extensions in our load order.
ESP, ESM, and ESL files are Bethesda plugins. They share the same basic structure of records with Form IDs arranged in layers and overwrite each other according to their load order.
There are, however, notable differences between them which we will discuss in this step.
Elder Scrolls Plugins (ESP) like our previously created Disable USSEP Book.esp are the most common type of plugin. If you create a mod in the Creation Kit, it will be exported in this format and most plugin-based mods use a simple ESP. In the load order in MO2 they will appear without any text decoration (like bold or italic).
Elder Scrolls Master plugins (ESM) appear in bold italics in Mod Organizer 2 - see, for example, the official master files. They will always load above ESPs and therefore ESPs will always overwrite them in case of conflicts. If you try to swap the load order of the USSEP and our modification for it in MO2 you will notice that you cannot place an ESP above an ESM.
The total number of ESM and ESP plugins in your load order cannot exceed 256 plugins.
This is due to the hexadecimal system used to define them: Each plugin’s Index (the first two characters in their form ID) is made up of a combination of two numbers and letters which in turn is based on their load order. The hexadecimal system has 16 unique characters and there are exactly 256 possible combinations for two characters from 00 to FF (see table below).
The hexadecimal FF is the decimal 255, so the maximum amount of plugins from 0 (00) to 255 (FF) is 256.
In Skyrim LE the plugin limit could be overcome by merging the records of multiple plugins into a single one.
In Skyrim SE plugin merging has become redundant for all but the largest of load orders thanks to the new ESL format of plugins introduced with the 2016 engine update.
Elder Scrolls Light plugins (ESL) were initially added for the Creation Club (Fallout 4 and Skyrim SE) and they were a game-changer for the modding scene because the plugin limit for ESLs is about ten times that as for ESPs and ESMs.
All ESL plugins have the index FExxx
. The hexadecimal FE is the decimal 254, so all ESL plugins load in plugin slot 254.
This is possible because their index was extended to the third, fourth, and fifth character in their eight character form ID: An ESL’s index could be FE000
or FE08F
. Thus, the limit for ESLs is a whopping 4096 plugins - which is why we no longer need to merge plugins.
The downside of ESLs is that they can store fewer records.
Remember that each record must have a unique Form ID. ESLs only have three digits left for a combination of the 16 hexadecimal characters whereas ESPs and ESMs have six digits. This means every ESL can only store 4096 unique Form IDs of which the first 2048 are reserved by the engine.
The remaining 2048 slots are still more than enough for small- to medium-size mods. Many separate ESL plugins are infinitely easier to handle than a few big plugin merges (imagine having many small drawers for screws of different types and sizes instead of dumping all of them into a single big drawer).
Additionally, this limit only affects new records, i.e., records defined in the ESL plugin. There is no limit on how many records defined in other plugins an ESL can hold. Many mods, especially patches, function mostly by editing existing (vanilla or mod-added) records and adding few or no new records of their own. These types of plugins are especially suited to being ESL-ified.
We learned that ESM plugins are distinguished in the load order by being displayed in bold italics.
But here is something strange: The Unofficial Skyrim Special Edition Patch.esp is displayed in bold italics in our MO2 load order tab when it actually has the ESP file extension.
So, is it an ESM or an ESP? Actually, it is both. This is where Plugin Flags come into play.
That sounds a little confusing, so let’s break it down.
Imagine you created a mod that is a resource to be used by other mods: It just contains a few keywords, maybe a dozen records. You can easily use the ESL format for this plugin.
However, your resource is also a master to various dependent plugins which should be lower in the mod order, so preferably your plugin should load very early. It therefore makes sense to flag it as an ESM to automatically place it in the ESM space at the top of the load order.
The result is an ESM-ESL which will show up as Example.esl in the load order - like ccBGSSSE037-Curios.esl.
Now imagine your example mod is definitely one that should load very early to be overwritten by other mods but you have far too many original Form IDs to use the ESL format.
In that case, you can either opt for a full ESM or an ESP that is flagged as an ESM, that is, an ESM-ESP - like the Unofficial Skyrim Special Edition Patch.esp.
Finally, you may have a plugin that is just fine to load in ESP space because it is not intended as a sort of baseline or framework. If it does not contain many new Form IDs, you can usually flag the plugin as an ESL, turning it into an ESP-ESL or ESP-FE (because ESLs always have an Index beginning with FE).
Which plugins can be flagged as ESL and how this can be done will be discussed in the following steps.
Should you ever find yourself reaching the ESP/ESM plugin limit, you will no longer be able to launch the game - try to avoid that.
You can track your plugins via the neat little counter above your load order (hover for details):
With 9 plugins currently counting toward the 256 hard limit, we are in no danger of breaking the game anytime soon. Then again, load orders have the tendency to balloon to obscene dimensions so it is tends to be a good idea to ESL-ify as many plugins as possible.
Hey, that sounds like our Disable USSEP Book.esp which only modifies a single reference.
Plugin Type is determined by file extension and plugin flags. You can see the file extension in the left pane and plugin flag(s) in the Plugin Header which is what you see when you select a plugin in SSEEdit.
Below, you can see the Plugin Header of our Disable USSEP Book.esp. It is a bog-standard ESP, so there are no plugin flags (or Record Flags as they are called here).
If you select the Unofficial Skyrim Special Edition Patch.esp, you will see that it is flagged as an ESM.
Two of the CC plugins, ccBGSSSE037-Curios.esl and ccQDRSSE001-SurvivalMode.esl, are additionally flagged as ESLs.
Going back to our Disable USSEP Book.esp, we can now simply turn it into an ESL (that is, an ESP-ESL because it still has the ESP file extension) by adding the flag.
Back in MO2, our plugin now appears in italics in the load order and the little yellow icon 🟡 that appeared in the Flags column for the plugin confirms that it is ESL-flagged. You can also check this by hovering over it. And, of course, you can see the FE index.
A major differences between plugins in ESM and ESP space is how references are handled.
There are two types of references:
The cap for references that are active at the same time is 1048576. Anything above that will cause issues and instability.
The way references are handled is the most important difference between plugins in ESP space (.ESP with or without ESL flag) and plugins in ESM space (any plugin with ESM-flag: ESM, ESL, ESM-ESP). Temporary references in ESP space are actually handled like persistent references and always loaded at the start of the game. You can see how adding a great number of temporary references to ESP plugins could quickly bring the overall amount of active references closer to the cap.
Temporary references defined in ESM space but overwritten by a plugin in ESP space will also be always active. This makes sense if you think about how layers work and how the game only really cares about the one that overwrites all others.
(There is a mod which will warn you when you approach the active references cap, we will install it later.)
The book disabled in our custom plugin is a temporary reference. While I am not sure if an initially disabled reference is still being loaded, we are going to pretend it is for the sake of the argument.
Right now, our plugin is an ESP-FE so all references it contains are loaded, regardless of whether they are temporary or persistent.
Since it is already flagged as an ESL, the only missing piece to make it a full ESL is the file extension.
(This view is where you can see the contents of the mod folder.)
After renaming a plugin (name or file extension), MO2 will disable in the load order, so make sure to enable it again.
The plugin is now being recognised as a full ESL which means it belongs in ESM space. Where before you were unable to change its load order position, you can now drag it above the USSEP which is also in ESM space. Of course, the book plugin should stay below the USSEP plugin because it requires that as a master and plugins must always load below their masters.
Let’s hop into the game to make sure this worked. You know the drill: Use coc whiteruntempleofkynareth
from the main menu to quickly jump to the correct cell, then check the room to the left.
But, oh no! The book is back. What could possibly have gone wrong?
Turning an ESL-flagged ESP into a full ESL by changing the file extension works in 99% of cases - unless the plugin overwrites a reference. When that is the case, the affected references have to be added to the list of Overriden Forms (ONAM) in the plugin header.
If you create an ESM space plugin or flag a plugin as ESM in SSEEdit, this happens automatically. Unfortunately, we cheated a little by simply changing the file name extension so we are actually missing the ONAM entries which means the game skips our plugin’s modification to the temporary reference.
Here, you can see that the ONAM sub record is empty.
The solution to the problem is manually ESM-flagging the plugin SSEEdit so the ONAM list is populated. The plugin will still be an ESL and not count toward the 256 plugin limit, so there is no downside to doing this.
We now have an ESM-flagged ESL. Close SSEEdit and save your change.
When you re-open the plugin in SSEEdit and check the Plugin Header, you will see that SSEEdit automatically added the affected temporary ref to the list.
Finally, jump back into the game, coc whiteruntempleofkynareth
, and, sure enough, the plugin works again.
Any plugin can be turned into an ESL (ESP-FE or full ESL) with one exception. A demonstration is in order.
In the Myrwatch plugin, you can see two types of records: Cells (interior locations) and Worldspaces (the outside world). Both consist of CELL records populated by persistent and temporary references.
[FE00183B] ccEEJSSE002MageTowerMain "Myrwatch"
.This is a CELL record (see the Signature at the top).
We will use this CELL as our guinea pig. Remember that you can quickly jump to any cell using the coc
command if you have the cell’s Editor ID which is ccEEJSSE002MageTowerMain
in this case.
coc ccEEJSSE002MageTowerMain
through the console.Yep, we are in the tower. It looks really comfy, I hope nothing bad will happen to it.
qqq
through the console.Now it is time to horribly break the CELL for demonstration purposes.
ccEEJSSE002MageTowerMain
CELL record again.FoodApple02 "Green Apple" [ALCH:00064B2F]
near the top.An apple a day is important and all that, but what if you prefer red over green apples? We can easily switch that out.
So, given that we are modifying a single record, using the ESL format seems appropriate. When creating an ESL plugin through SSEEdit, it will automatically be given the ESM flag as well so that any modifying temporary refs are added to the ONAM list.
In our new Apple.esl layer we can now modify the base object placed in this temporary reference.
FoodApple02 "Green Apple" [ALCH:00064B2F]
base object in the new layer.FoodApple "Red Apple" [ALCH:00064B2E]
from the list.Back in MO2, the Overwrite will have caught your new plugin. Since we are (spoiler alert) not going to keep it, you can leave it in its temporary location, but do remember to activate the plugin in the load order.
Once again, jump ingame and coc ccEEJSSE002MageTowerMain
.
Oh, no.
After closing the game with qqq
, you can delete Apple.esl from your Overwrite simply because it could never work. Also remember to disable Myrwatch again in the mod order.
In other words, while a CELL record can be created in an ESL, it cannot be overwritten. This has important implications when ESL-ifying plugins to circumvent the 256 ESP/ESM limit because it means that you should generally avoid ESL-ifying any plugin in which a new CELL is created.
One final concern about ESL plugins concerns the Form ID format. This is only an issue when converting a regular ESM or ESP into an ESL. Remember that an ESP has a Form ID with six out of eight unique characters, i.e., xx03A88F
, while an ESL’s Index extends to the fifth character, i.e., xxxxx88F
.
When you want to turn an ESP that adds new Forms into an ESL, you have to compact Form IDs before you can add the ESL flag.
We need an example mod for this:
After installing and activating the new mod, another plugin (a normal ESP) will show up in the load order.
Go ahead and load up your plugins in SSEEdit.
Checking our new mod, we will notice that it not only removes grass, but also adds new flora to make up for that. Statics like these plants are lit differently from grass (they can be affected by point lighting, cast by, for example, a torch and will not look black in low ambient light areas).
As we would expect, the Form IDs for the temporary references added by the mod begin with the plugin’s two-character Index, 08
.
Trying to add the ESL flag and save the plugin would cause SSEEdit to throw the following error:
[00:00] Saving: NoGrassINCaves.esp.save.2023_07_04_10_44_50
[00:00] Error saving NoGrassINCaves.esp.save.2023_07_04_10_44_50: Record [REFR:080148ED] (places TreeSwordFern01 [TREE:000B73B8] in GRUP Cell Temporary Children of BlindCliffCaveCOC [CELL:00021EFA] (in BlindCliffCaveWorld "Blind Cliff Cave" [WRLD:00020DCB] at -36,4)) has invalid ObjectID 0148ED for a light module. You will not be able to save this file with ESL flag active
[00:00] Errors have occured. At least one file was not saved.
The Form IDs are, in other words, not the correct format for ESL space. Thankfully, this is something SSEEdit can adjust for us.
Another warning will follow and this one merits some discussion.
Remember that records are identified by their Form IDs, also by other plugins. If we renumber the Form IDs here and later install a mod that touches the hand-placed flora from No Grass In Caves that second mod would dissolve into a mess of errors because it would be unable to locate the original records it was trying to edit. For example, it was looking for 08002FE7
but that Form is now FE00381E
.
There are two possible solutions:
In the latter case, those dependent plugins would be updated automatically.
Since I never encountered a mod that modifies No Grass In Caves’ hand-placed flora, I will go ahead and click Yes to the warning about changing Form ID. The process will only take a few seconds.
Afterwards, you can add the ESL flag in the Plugin Header. Close SSEEdit and save your changes.
ESL-flagging a plugin (regardless of whether Form IDs are compacted) obviously always requires modifying the original plugin which is something we could so far avoid by overwriting with new plugins. Of course, any changes you make to a given plugin are lost upon updating.
This does not necessarily mean that you should never change an original plugin (though try to do it only if there is no other option), but I recommend documenting the changes you made.
Mod Organizer 2 features a very helpful Notes tab for each mod.
There are two empty spaces here for notes. The bottom one offers ample room for detailed jottings, whatever you are looking to document, while the top one is better suited to a few short keywords which will be visible at a glance in the mod order’s Notes column.
Compacted Form IDs and ESL-flagged the plugin.
to the space at the top.Once you close the window, the note will show up in your mod order.