Device creation tutorial - IHateMyKite/UnforgivingDevices GitHub Wiki
Foreword
This page will provide some basic information about custom devices, and how you can create new ones
Devious Devices Design
UD works very similarly as DD. But there are still some exception, so let me first explain how Devious Devices work. Every device in devious devices made from 2 separate armors. Inventory armor (device) and render armor (device).
Inventory device
This is the armor which you can interact in game through inventory. It also contains equip script (base script is zadequipscript), which does all lock/unlock related operations. It is important to note that the Inventory device doesn't have 3D model (which you can see on your character)!! It only have inventory model
As you can see from above example, every ID (shortcut for Inventory device) should have
- Name. There allways needs to be some name, as armor without name will not show up in player inventory, preventing player from interacting with it.
- Description. Is optional, as not having it will not break device.
- Inventory keyword zad_InventoryDevice, and other 2 keywords MagicDisallowEnchanting and VendorNoSale. These keywords always needs to be present, otherwise the device will not work properly!!.
- World model (model which is shown when item is viewed in inventory or container). Is optional, as not having it will not break device.
- Equip script zadequipscript or script which extends zadequipscript. Without, the device will not do anything when equipped. I recommend that you read about the scripts properties yourself directly from the script, as it's the quickest way of learning what which property does (and I also can save myself from writting it here). I will only tell you, that you ALLWAYS needs to change at least the 3 following properties (you should always copy existing device and edit, more on this later):
- deviceInventory which should point to the same armor which contains the script.
- deviceRendered which should point to render armor (more about render armor next)
- zad_DeviousDevice which should contain MAIN keyword of the device type (so if you are adding hand restrain, you should add there zad_DeviousHeavyBondage)
Render device
This is device which is actually visibly equipped on actor. In comparison to ID, RD (shortcut for Render Device) is much simpler, as there is no script. It only contains info about 3D model, enchantment, and keywords. IT IS IMPORTANT THAT THE RD DOESN'T HAVE NAME! If the RD will have name, it will show up in player inventory, which is not what should happen! RD can't be directly equipped/unequipped by player. It is manipulated through inventory device script.
- Name should be empty!
- (optional) This armor can have enchantment, as it is not intended to be periodically equip/unequipped (only when device is locked and unlocked)
- Biped model needs to be filled, and it should correspond to the Devious Devices slot nomenclature, more in next section
- Armor type should be clothing, so it doesn't cause incompatibility with other mods which do some crazy shit with actual armors
- Keywords
- Sexlab no strip keyword SexLabNoStrip needs to present, so sexlab animations doesn't automatically undress armor when scene begins
- Keyword zad_Lockable needs to be present if the device is not plug (with exception of lockable plug) (IMO, this is a design flaw, but it can't be fixed at this point)
- Device keyword. This depends on the exact device which you are creating. It should always correspond to the DD nomenclature slots. Note: In case of some devices, additional keywords can or needs to be provided.
- zad_DeviousHeavyBondage = Specific additional keyword needs to be provided. In this case, armbinder have as main keyword zad_DeviousHeavyBondage, but it also needs zad_DeviousArmbinder, otherwise some animations and features will not work correctly. Currently, these keywords are available: zad_DeviousArmbinder, zad_DeviousElbowbinder, zad_DeviousYoke, zad_DeviousStraitjacket (zad_DeviousSuit keyword also needs to be provided), zad_DeviousElbowTie, zad_DeviousYokeBB(Breast yoke) and zad_DeviousPetsuit.
- zad_DeviousGag = Additional ekyword can be provided which specify which exact type of gag is used
- All related keyword can be found by typing zad_Devious , which will list all keywords
- Description can be skipped, as it will not be shown to user. Alternatively, it can be kept for debugging purposes (like in this case)
- Armor weight, armor rating and price should be set to 0, as it will cause confusion when players weight/armor gets increased even when they don't see any armor with weight/armor.
Tips
Creating new devices from the blank state is very hard, and should not be done. Instead, existing similar device should be copied and edited. For example, if we want to create new armbinder device, we can use existing armbinder from Integration or Expansion. You can easily copy the device with xEdit
Don't forget to copy both the ID and RD of the same device! Select where you wan't to copy the device and change editorID. Next, you just do following things
- Rename the device (more in previous ID section) and change the description
- Update deviceInventory and deviceRendered on equip script on the new inventory armor. It should point to the copied armors
- Now, the device should work correctly in-game. You can now just update some properties, 3D model, etc.. to make the device unique
Unforgiving Devices Design
Unforgiving Devices are a little harder to create, as there are many more properties. Every UD (Unforgiving Devices) is also created from Inventory armor and render armor. But main differences are as follows
- RD also have script. This script is named UD_CustomDevice_RenderScript, and it is the main brain of all UD, as it this script which stores all variables about device, contains update functions, and is also responsible for minigame
Inventory device
All rules from DD section should be first fulfilled. Then following things needs have to be done
- Keyword UD_InventoryDevice have to be added
- Existing DD script should be replaced with UD_CustomDevice_EquipScript. This can be done without removing the scipt by simply renaming the script (can't be done in CK, only in xEdit)
Render device
All rules from DD section should be first fulfilled. Then following things needs have to be done