<?xml version="1.0"?>
<rss version="2.0"><channel><title/><link>https://www.loverslab.com/blogs/blog/2560-skyrim-mod-author-guides/</link><description/><language>en</language><item><title>How to make a Custom Devious Device - Part 1: Simple Devices</title><link>https://www.loverslab.com/blogs/entry/23905-how-to-make-a-custom-devious-device-part-1-simple-devices/</link><description><![CDATA[<p>
	<span> </span><span style="font-size:10px;"><em>(Written for Devious Devices v5.2, and/or Devious Devices NG 0.4.1)</em></span>
</p>

<p>
	 
</p>

<p>
	This guide assumes that you already have an existing piece of equipment in Skyrim that you would like to make into a Devious Device, or that you know how to make one. If you don’t, you will need to figure that out first.
</p>

<p>
	 
</p>

<p>
	This guide will show the steps as you would take them in <a href="https://www.nexusmods.com/skyrimspecialedition/mods/164" rel="external nofollow">xEdit</a>. You can achieve the same using Creation Kit (CK) and I generally prefer it over xEdit, but CK can be a fickle beast and xEdit may be more accessible for a beginner.
</p>

<p>
	 
</p>

<p>
	Okay, so you’ve got an awesome piece of equipment that you want to make Devious. The key feature of Devious Devices is that they are <em>lockable</em>. They cannot simply be removed by clicking them in the equipment menu, but require something else like keys or struggling to remove. How does DD do that?
</p>

<p>
	 
</p>

<p>
	<span style="color:#2ecc71;"><strong>How does DD make something lockable?</strong></span><br />
	Clicking the equipment menu is coded at an engine level to equip/unequip armor. To make equipment lockable, DD uses a trick: there are actually <em>two </em>pieces of Armor for each device: one that is displayed in your inventory, and one that is rendered onto your character.<br />
	    1. The <em><strong>inventory device</strong></em> is invisible on your character (it has no attached meshes) but has scripts attached that handle the locking, unlocking, escape and device interaction logic.<br />
	    2. The <em><strong>rendered device</strong></em> has meshes that display on your character and keywords that describe the device type, but it is set up to not display in your inventory.<br />
	This is how a devious device becomes lockable: because you cannot unequip the rendered device from the inventory, you have to go through the inventory device, and it is here that DD applies all of its logic.
</p>

<p>
	 
</p>

<p>
	To make a custom lockable device, we will need to mimic this setup. We will create two Armors, setting one up as an <em>inventory device</em> and another as the<em> rendered device</em>.
</p>

<p>
	 
</p>

<p>
	<span style="color:#27ae60;"><strong>The easy way (if your custom device is similar to an existing one):</strong></span><br />
	The simplest way to make a custom Devious Device is to copy an existing one. I would strongly recommend doing it this way if your custom device is similar to an existing one, but just has to look different. Even if this is not quite the case and you want some custom functionality, copying a similar existing device will provide you with a good starting point for modifications.
</p>

<p>
	Let’s work out an example. Say you have a cool-looking collar that you want to make Devious. I will be using this runic collar mesh shown below (made by Layam, shown here rendered in Nifskope).
</p>

<p>
	 
</p>

<p>
	<img alt="Fig_1_Collar.jpg.b84c460791388e3d75ab49552cddf1d0.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="2361412" data-ratio="55.64" width="692" src="https://www.loverslab.com/uploads/monthly_2025_05/Fig_1_Collar.jpg.b84c460791388e3d75ab49552cddf1d0.jpg" />
</p>

<p>
	<br />
	As a starting point I will take an .esp file where this collar is made available in-game as a standard equippable Armor. In xEdit that looks like this:
</p>

<p>
	 
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<a class="ipsAttachLink ipsAttachLink_image" data-fileext="jpg" data-fileid="2361413" href="https://www.loverslab.com/uploads/monthly_2025_05/Fig_2.jpg.656cb9fb0e5d436849f7344cfd15e352.jpg" rel=""><img alt="Fig_2.thumb.jpg.032b64bb910c6e604811fb7b800645a0.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="2361413" data-ratio="114.77" width="941" src="https://www.loverslab.com/uploads/monthly_2025_05/Fig_2.thumb.jpg.032b64bb910c6e604811fb7b800645a0.jpg" /></a>
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	There are two records: an ArmorAddon that provides the data on how to render something on the character, and the Armor that provides the item itself. <u>Note that these are not the inventory device and rendered device we mentioned earlier!</u> Skyrim’s engine itself already has a split in how it handles this, and we’ll be making a further split by changing this one Armor for the collar into two.
</p>

<p>
	 
</p>

<p>
	Okay, let’s make this a devious device. To do this, we load the DD mod files into xEdit along with our own mod file, and copy over a similar collar from DD into our mod as a new record. Note the suffixes “_Inventory” and “_Rendered” on the screenshot, these are the two versions we discussed earlier that are needed to make the device lockable. Copy both!
</p>

<p>
	 
</p>

<p>
	You’ll get some additional screens to remove prefix/suffixes from the editorID, this isn’t needed but I will remove “zadx_” as prefix and replace it by “Fray_” as a good modding habit. You’ll get another screen for which mod to copy to: choose your own. It will probably prompt you that it will add the Devious Devices mods as a master mod for yours – click yes.
</p>

<p>
	 
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<img alt="Fig_3.jpg.eea79c1c112d6a49c11f46062e6e285e.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="2361414" data-ratio="46.24" width="1116" src="https://www.loverslab.com/uploads/monthly_2025_05/Fig_3.jpg.eea79c1c112d6a49c11f46062e6e285e.jpg" />
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	After, we’ll have the copies in our own mod, ready to modify.
</p>

<p>
	 
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<img alt="Fig_4.jpg.4f6198c71547e96bd160b3ee87c194fb.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="2361415" data-ratio="34.52" width="730" src="https://www.loverslab.com/uploads/monthly_2025_05/Fig_4.jpg.4f6198c71547e96bd160b3ee87c194fb.jpg" />
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	Since we already had an ArmorAddon set up and our new custom device matches an existing type (collar) one-to-one, there’s not much we need to change. We can use xEdit’s handy feature to select both our existing normal collar and the _Rendered Armor by clicking them while holding CTRL and view them side-by-side (I’ve right-clicked the side-by-side view and selected “hide no conflict and empty rows” here):
</p>

<p>
	 
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<img alt="Fig_5.jpg.54774068fe0062fb2fd5b12b1da374a6.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="2361416" data-ratio="57.93" width="1816" src="https://www.loverslab.com/uploads/monthly_2025_05/Fig_5.jpg.54774068fe0062fb2fd5b12b1da374a6.jpg" />
		</p>
	</div>
</div>

<p>
	<br />
	Here we can see a few interesting things. Our non-locking collar has a name, a different world model (this is the model used for when the item is lying on the ground), no keywords, and a different “armature” (i.e. ArmorAddon). DD’s locking collar doesn’t have a name because it’s never shown in the inventory anyway, and it has a number of keywords. You can probably guess what <em>MagicDisallowEnchanting</em>, <em>VendorNoSale </em>and <em>SexlabNoStrip </em>do, but there are also two additional keywords from DD: <em>zad_Lockable </em>and <em>zad_DeviousCollar</em>. <br />
	    • <em>zad_Lockable </em>former describes that this is a lockable item. The keyword is used to track whether an item is set up with this _Inventory and _Rendered split to be lockable. Every lockable device should have this keyword.<br />
	    • <em>zad_DeviousCollar </em>describes the type of device, in this case a collar. Every devious device should use at least one of the existing device keywords (“<em>zad_Devious[...]</em>”). If it doesn’t, you may run into issues with equipping, unequipping and conflicting devices. Some devices can have multiple keywords (e.g. hoods with <em>zad_DeviousHood </em>and <em>zad_DeviousGag</em>), but not all combinations will work.
</p>

<p>
	 
</p>

<p>
	To make our custom collar, we’ll copy over the world model and armature fields from our non-locking collar to the DD one, remove its other armatures (they are different meshes for Argonian and Khajits, but we probably don’t have those for our custom collar), and change its editorID to <em>Fray_RunicCollar_Rendered</em>:
</p>

<p>
	 
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<a class="ipsAttachLink ipsAttachLink_image" data-fileext="jpg" data-fileid="2361417" href="https://www.loverslab.com/uploads/monthly_2025_05/Fig_6.jpg.1d835df8c38169199c483d09bf2057bb.jpg" rel=""><img alt="Fig_6.thumb.jpg.67ee60bd077504b647b4f1f87531b454.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="2361417" data-ratio="126.32" width="855" src="https://www.loverslab.com/uploads/monthly_2025_05/Fig_6.thumb.jpg.67ee60bd077504b647b4f1f87531b454.jpg" /></a>
		</p>
	</div>
</div>

<p>
	<br />
	That’s it for the rendered device. Next is the inventory device.
</p>

<p>
	 
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<a class="ipsAttachLink ipsAttachLink_image" data-fileext="jpg" data-fileid="2361418" href="https://www.loverslab.com/uploads/monthly_2025_05/Fig_7.jpg.22776e6fd2969b4ece7ea27ba8918a74.jpg" rel=""><img alt="Fig_7.thumb.jpg.5144a49a91e1d25c6a315cbd6c1236d0.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="2361418" data-ratio="60.95" width="1772" src="https://www.loverslab.com/uploads/monthly_2025_05/Fig_7.thumb.jpg.5144a49a91e1d25c6a315cbd6c1236d0.jpg" /></a>
		</p>
	</div>
</div>

<p>
	<br />
	Let’s again first compare the differences between the non-locking collar and the DD device:<br />
	    • The inventory device has a name because it should show up in the inventory, it has a world model because it can be dropped onto the ground, and it has keywords (but not <em>zad_Lockable </em>or <em>zad_DeviousCollar</em>!).<br />
	    • However, it doesn’t have an armature or a “biped body template” (a.k.a. slotmask) because it should not be rendered onto the character when equipped. We’ll need to preserve that in order to keep it functioning as an inventory-only device.<br />
	    • Lastly, there is one field I’ve kept hidden here: the “<em>VMAD – Virtual Machine Adapter</em>” field, which is the script field. The inventory device has a Papyrus script attached to it, and the VMAD field contains this script’s data. If you open this up it will show A LOT of data. This is the main reason you want to start from an existing device if possible: copying an existing device will make sure most of those fields are correctly filled in already.
</p>

<p>
	 
</p>

<p>
	To make our custom inventory device, we again only need to change a few fields: we change the name to “<em>Lockable Runic Collar</em>”, the description to “<em>A lockable metal collar with runes</em>”, and copy over the world model. Do not copy over the armature or the biped body template! Afterwards, it should look like this:
</p>

<p>
	 
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<a class="ipsAttachLink ipsAttachLink_image" data-fileext="jpg" data-fileid="2361419" href="https://www.loverslab.com/uploads/monthly_2025_05/Fig_8.jpg.5199a685607eb56443d7c18a7e899bee.jpg" rel=""><img alt="Fig_8.thumb.jpg.28d031c057be8d7817b6329ad0f8905b.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="2361419" data-ratio="74.48" width="1450" src="https://www.loverslab.com/uploads/monthly_2025_05/Fig_8.thumb.jpg.28d031c057be8d7817b6329ad0f8905b.jpg" /></a>
		</p>
	</div>
</div>

<p>
	 
</p>

<p>
	Finally, we need to change two script properties: the <em>deviceInventory </em>and <em>deviceRendered </em>ones, which point the script to the correct inventory and rendered devices so that it can equip the right ones. You don’t need to touch the other properties for now.
</p>

<p>
	 
</p>

<div class="ipsSpoiler" data-ipsspoiler="">
	<div class="ipsSpoiler_header">
		<span>Spoiler</span>
	</div>

	<div class="ipsSpoiler_contents">
		<p>
			<a class="ipsAttachLink ipsAttachLink_image" data-fileext="jpg" data-fileid="2361420" href="https://www.loverslab.com/uploads/monthly_2025_05/Fig_9.jpg.93d44a47e9f04d7181dfcf63f0857a53.jpg" rel=""><img alt="Fig_9.thumb.jpg.321d25767ed911eceb567329c007dbbe.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="2361420" data-ratio="151.90" width="711" src="https://www.loverslab.com/uploads/monthly_2025_05/Fig_9.thumb.jpg.321d25767ed911eceb567329c007dbbe.jpg" /></a>
		</p>
	</div>
</div>

<p>
	<br />
	<strong><span style="color:#2ecc71;">And that’s it!</span></strong> Save your esp plugin, fire up the game and you should have a lockable collar.<br />
	    
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="jpg" data-fileid="2361421" href="https://www.loverslab.com/uploads/monthly_2025_05/fig_10.jpg.87eef0386d60f42b6e38fd5e2be5671f.jpg" rel=""><img alt="fig_10.thumb.jpg.4a4518b24a5f4ea94f1af163d6245730.jpg" class="ipsImage ipsImage_thumbnailed" data-fileid="2361421" data-ratio="55.26" width="1920" src="https://www.loverslab.com/uploads/monthly_2025_05/fig_10.thumb.jpg.4a4518b24a5f4ea94f1af163d6245730.jpg" /></a>
</p>

<p>
	 
</p>

<p>
	 
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">23905</guid><pubDate>Thu, 29 May 2025 11:47:03 +0000</pubDate></item></channel></rss>
