If you're using Sentinel casually, you don't need to read this. This article is written for moderately experienced mod authors.

Master Plugin and Proxy Leveled Lists

Sentinel - Master Plugin.esm contains an annex of leveled lists, each labeled with the editorID "TH_[Material][ArmorPiece]" and containing one entry of the labeled item. For example, TH_IronHelmet is a leveled list containing one Iron Helmet.

These leveled lists we'll call Proxy Leveled Lists (PLLs). They are the primary infrastruture of the mod.

Sentinel - Master Plugin.esm.ini is a SkyPatcher configuration file that uses the 'formsToReplace' function to scan the base game's leveled lists, swapping out items for their respective PLLs.

Continuing our example, most base game leveled lists which contain an Iron Helmet will, at runtime, have that entry replaced with TH_IronHelmet.

At this stage, the effect of this change should be invisible to the end user. When the game rolls on a leveled list and lands on an entry that has been swapped with a PLL, it then rolls the PLL and returns its only option - the original item.

In our example, a bandit rolls for the helmet it will wear, lands on TH_IronHelmet, then rolls that PLL and must land on an Iron Helmet.

PLLs exist for most armors and weapons in Skyrim that aren't associated with a faction.

Footnote
Spoiler:  
Show
In rare cases, PLLs can be slightly more complex.

Iron and steel armor sets have PLLs representing entire outfits, containing the helmet, cuirass, gauntlets, and boots.

Leather armor entries in Solstheim are swapped out for PLLs representing netch leather equipment, but which only contain normal leather items. When using the Memories of Morrowind module, those leather items are replaced by netch leather ones. This prevents Sentinel - Master Plugin.esm from requiring the Netch Leather Armor creation.


Equipment Selection and Distribution

Sentinel.esp, and most of its addon modules, contain all of the new equipment featured in the mod.

These items are always loaded in game and can be pulled using the console or equivalent testing tools, like AddItemMenu, but they cannot be crafted and do not appear anywhere during normal play.

When the user installs Sentinel and selects their equipment, they are choosing to install SkyPatcher ini files that, at runtime, add the selected equipment to their appropriate PLL.

For example, selecting Northern Iron Armor installs SkyPatcher/leveledList/Iron1/Sentinel.esp.ini, which instructs SkyPatcher to add the Northern Iron Helmet to TH_IronHelmet. Now, when a bandit tries to equip TH_IronHelmet, rolling that PLL could result in either the classic Iron Helmet or the Northern Iron Helmet.

It also installs SkyPatcher/constructibleObject/Iron1/Sentinel.esp.ini, which instructs SkyPatcher to add the appropriate workbench keyword to Northern Iron Armor crafting recipes so it may be forged in game.

If Grimoire is installed, SkyPatcher will read SkyPatcher/leveledList/Iron1/Grimoire.esp.ini to add the appropriate enchanted items. Grimoire treats the game's original enchantment leveled lists as built-in PLLs to which Grimoire items are added at runtime.

All Sentinel and Grimoire do is repeat this at scale. By swapping most armors with PLLs in most leveled lists, then adding hundreds more armor variants to those PLLs, the users selections will appear seamlessly throughout the world.

NPC Outfits

Changes to named NPC outfits aren't complicated, and if you review SkyPatcher's article on NPC patching, you'll basically understand how it works already. Using the 'defaultOutfit' function, Sentinel replaces an NPC's outfit with one containing Sentinel's new armor variants.

During installation, selecting an armor variant activates a flag in the fomod. The SkyPatcher configuration for an NPC's outfit will only be selectable if the fomod flags for the armor that outfit contains are activated.

Third-Party Addons & Example

If you've followed the above explanation, you already know how to add armors to Sentinel's distribution system. Simply take the armor set you want to distribute and, using SkyPatcher, add the set's component pieces to the appropriate PLLs.

For example, if you're adding a variant set of iron equipment, your ini file would contain something like this:

;MyMod Iron Armor Set Variant
filterByLLs=TH_IronBoots:addOnceToLLs=MyMod.esp|X00
filterByLLs=TH_IronCuirass:addOnceToLLs=MyMod.esp|X01
filterByLLs=TH_IronCuirassBanded:addOnceToLLs=MyMod.esp|X02
filterByLLs=TH_IronGauntlets:addOnceToLLs=MyMod.esp|X03
filterByLLs=TH_IronHelmet:addOnceToLLs=MyMod.esp|X04
filterByLLs=TH_IronShield:addOnceToLLs=MyMod.esp|X05
filterByLLs=TH_IronShieldBanded:addOnceToLLs=MyMod.esp|X06

;MyMod Iron Weapon Set Variant
filterByLLs=TH_IronSword:addOnceToLLs=MyMod.esp|X07
filterByLLs=TH_IronWarAxe:addOnceToLLs=MyMod.esp|X08
filterByLLs=TH_IronMace:addOnceToLLs=MyMod.esp|X09
filterByLLs=TH_IronDagger:addOnceToLLs=MyMod.esp|X0A
filterByLLs=TH_IronGreatsword:addOnceToLLs=MyMod.esp|X0B
filterByLLs=TH_IronBattleaxe:addOnceToLLs=MyMod.esp|X0C
filterByLLs=TH_IronWarhammer:addOnceToLLs=MyMod.esp|X0D

Then they'll appear in game, just like that. Don't forget to adjust crafting recipes as appropriate, and if you want to, make an outfit or two to add to suitable NPCs. Happy modding!

Article information

Added on

Edited on

Written by

Thuldor3621