Dismembering Framework - JSON Files
Table of Contents
- Prerequisites
- Introduction
- LIMBS Files (
_LIMBS.json
) - DATA Files (
_DATA.json
) - TEMPLATES Files (
_TEMPLATES.json
) - JSON File Parameters
- Testing in the Game
Prerequisites
Before starting this tutorial, and to save time, please make sure you have the following skills:
- Experience with the Creation Kit: You must have a good understanding of the Creation Kit, particularly how to create and modify elements in this environment.
- Basic knowledge of JSON: An understanding of JSON files and their structure is essential for correctly creating and modifying the files necessary for the Dismembering Framework.
- 3D modeling skills with Blender: You must know how to import, export, and modify models in Blender. These skills are crucial for modeling the severed limbs and integrating them into the Creation Kit.
- Proficiency with NifSkope: Knowledge of NifSkope is required to manipulate and verify the NIF files associated with your models.
If you are not comfortable with any of these tools or skills, I recommend acquiring them before following this tutorial.
Introduction
The Dismembering Framework uses JSON files to configure the behavior of dismemberments in the game. These files must be placed in the Data\SKSE\DismemberingFramework
directory. You can name them as you wish, but the names must end with a suffix corresponding to their use:
- LIMBS files end with
_LIMBS.json
- DATA files end with
_DATA.json
- TEMPLATES files end with
_TEMPLATES.json
This documentation will guide you through the creation and configuration of these JSON files for any type of mod.
In this case, we will use the right hand gauntlet from the "Northern God Armor SE" mod as an example to illustrate the various steps and configurations needed.
🔗 A complete archive of the tutorial can be downloaded from the following link.
LIMBS Files (_LIMBS.json
)
LIMBS files define the objects and their properties that will be used to represent severed limbs in the game. Each entry must be identified by a UNIQUE key. These files specify the asset that will replace the severed limb, the reference node to which it will be attached, and its relative position when it appears.
Minimal Example TutoPack_LIMBS.json
{
"Humanoid - Base - Male - Tuto - R Forearm": {
"LimbFormID": "DF - Tuto Pack.esp:0x803"
}
}
In this example, the file contains a single entry with the key "Humanoid - Base - Male - Tuto - R Forearm". This key must be unique and correspond to the one used in the DATA file to link to its properties. The LimbFormID
property is a FormID of an item created with the Creation Kit, visually representing the severed limb.
DATA Files (_DATA.json
)
DATA files are more complex and structured in a hierarchy to define the actors affected by dismemberments. They include information about races, skins, actor genders, and reference nodes for calculating dismemberments.
Minimal Example TutoPack_DATA.json
{
"NordRace": {
"ANY": {
"Male": {
"NPC R Forearm [RLar]": [
{
"IDLimb": "Humanoid - Base - Male - Tuto - R Forearm",
"Conditions": [
{
"Name": "IsEquipped",
"Item": "1NGarmor.esl:0x813"
}
]
}
]
}
}
}
}
This hierarchy consists of four levels:
- Races: Specify the Editor IDs of the races involved, separated by vertical bars "|" if multiple races are involved.
- Skin(s): FormID of the skin(s) that the actor must use. You can use "ANY" to apply this to all skins.
- Actor Gender: Choose from "Male", "Female" or "Male|Female" for creatures without gender variants.
- Reference Node: Used by the framework to determine if the dismemberment should occur based on the impact.
The fourth element is an array allowing the linking of items created in the LIMBS files.
Details of Properties
- IDLimb: The key corresponding to the limb object created previously in the LIMBS file.
- Conditions: List of conditions to be met for the dismemberment to be triggered. Typically, a single condition is used.
In the example, the "IsEquipped" condition checks if the actor is wearing the item specified by the FormID "Item". This FormID can be of type "Armor", "ArmorAddon" or "Outfit". In this case, 0x813 refers to the ArmorAddon of the gauntlets from the "1NGarmor.esl" mod.
TEMPLATES Files (_TEMPLATES.json
)
TEMPLATES files simplify the creation of LIMBS files by allowing you to use predefined parameters. This makes the process faster and more readable.
Example without Templates TutoPack_LIMBS.json
{
"Humanoid - Base - Male - Tuto - R Forearm": {
"RefNode": "NPC R Forearm [RLar]",
"BipedSlot": 33,
"CollisionNode": "NPC R Hand [RHnd]",
"LimbArtObject": "DF - Official Humanoid Pack.esp:0x810",
"Translation": {
"x": -0.681143,
"y": -0.9665,
"z": -13.366818
},
"PlayerEffectSpell": "Dismembering Framework.esm:0x809",
"DismemberingSFX": {
"OneHandSword": "Dismembering Framework.esm:0x819",
"OneHandSwordHeavy": "Dismembering Framework.esm:0x81A",
"TwoHandSword": "Dismembering Framework.esm:0x819",
"TwoHandSwordHeavy": "Dismembering Framework.esm:0x81A",
"OneHandAxe": "Dismembering Framework.esm:0x819",
"OneHandAxeHeavy": "Dismembering Framework.esm:0x81A",
"TwoHandAxe": "Dismembering Framework.esm:0x819",
"TwoHandAxeHeavy": "Dismembering Framework.esm:0x81A",
"OneHandMace": "Dismembering Framework.esm:0x815",
"OneHandMaceHeavy": "Dismembering Framework.esm:0x816",
"TwoHandMace": "Dismembering Framework.esm:0x815",
"TwoHandMaceHeavy": "Dismembering Framework.esm:0x816",
"HandToHand": "Dismembering Framework.esm:0x815",
"HandToHandHeavy": "Dismembering Framework.esm:0x816",
"Dagger": "Dismembering Framework.esm:0x819",
"DaggerHeavy": "Dismembering Framework.esm:0x81A",
"Ranged": "Dismembering Framework.esm:0x818",
"RangedHeavy": "Dismembering Framework.esm:0x818",
"Other": "Dismembering Framework.esm:0x815",
"OtherHeavy": "Dismembering Framework.esm:0x816",
"Parrying": "Dismembering Framework.esm:0x817"
},
"ActorArmorAddon": "DF - Official Humanoid Pack.esp:0x80A",
"ActorArtObject": "DF - Official Humanoid Pack.esp:0x80F",
"LimbFormID": "DF - Tuto Pack.esp:0x803"
}
}
Given the number of parameters, it is more practical to use template files to simplify the configuration:
Example with Templates TutoPack_LIMBS.json
{
"Humanoid - Base - Male - Tuto - R Forearm": {
"Templates": [
"DF - Base data",
"Humanoid - Male - Base data - R Forearm",
"Humanoid - Male - Actor addons data - R Forearm"
],
"LimbFormID": "DF - Tuto Pack.esp:0x803"
}
}
By using template files, you can include predefined parameters, greatly facilitating the creation of LIMBS files. You can use existing templates or create your own.
For this example, I have simply taken the 3 TEMPLATE files from the official pack for humanoids because it is very likely that you will want to use them to convert your armors. I recommend doing the same if your goal is to create variations for one or more armors for humanoid actors.
Note: Do not include the template files from the official packs in your project because if a pack is updated, the versions might get mixed up. Simply instruct your users to download the pack from which you are using the templates.
JSON File Parameters
The JSON files used with the Dismembering Framework contain various parameters that control the behavior of dismemberments and assets in the game. Here is an overview of the commonly used parameters in LIMBS, DATA, and TEMPLATES files:
Parameters for LIMBS (_LIMBS.json
) and TEMPLATES (_TEMPLATES.json
) Files
Parameter | Description and Possible Values |
---|---|
Method |
Description: Method to use for dismemberment. Decapitate only applies to humanoid NPCs. Required: Possible Values: Default Value: |
LimbFormID |
Description: FormID of the item representing the visually severed limb. This value must be linked to a MiscItem from a plugin. Required: Possible Values: example: Default Value: |
RefNode |
Description: Name of the reference node that will be used for placing the severed limb "LimbFormID". Required: Possible Values: Default Value: If absent, the value will be the same as the parent DATA file node |
CollisionNode |
Description: Name of the node from which collision will be disabled. Required: Possible Values: Default Value: If absent, the value will be the same as RefNode |
BipedSlot |
Description: Biped slot to which the limb is attached (necessary if you intend to use conditions to generate this limb). Required: Possible Values: Default Value: |
ActorArmorAddon |
Description: FormID of the armor to apply to the dismembered actor (typically, a stump model). Required: Possible Values: example: Default Value: |
ActorArtObject |
Description: FormID of the visual effect to apply to the dismembered actor (typically, a blood splatter effect). Required: Possible Values: example: Default Value: |
LimbArtObject |
Description: FormID of the visual effect to apply to the severed limb "LimbFormID" (typically, a blood splatter effect). Required: Possible Values: example: Default Value: |
PlayerEffectSpell |
Description: FormID of the spell to apply to the player upon a successful dismemberment (usually used for bullet-time effects). Required: Possible Values: example: Default Value: |
TargetEffectSpell |
Description: FormID of the spell to apply to the dismembered actor. Required: Possible Values: example: Default Value: |
Translation |
Description: Relative position of the severed limb "LimbFormID" at the time of its appearance. This is a JSON object containing 3 properties Required: Possible Values:
Default Value: |
TypeOverride |
Description: Allows forcing the armor class of a severed limb (currently used to influence sound effects on creatures wearing undetected heavy armor). Required: Possible Values: Default Value: |
Templates |
Description: A JSON array containing the names of the elements present in the template files to include them. Note that if the parameters imported from the templates have already been declared in the LIMB, they will not be replaced. In other words, the templates are always secondary. Required: Possible Values: Default Value: |
DismemberingSFX |
Description: A JSON object containing the FormIDs of sound effects associated with different types of weapons and actions during dismemberment. Each key represents a type of weapon or action, and the associated value is the FormID of the sound effect. You can specify sound effects for each type of weapon and action using the following keys:
Required: Possible Values: Default Value: |
Parameters for DATA files (_DATA.json
)
Parameter | Description and Possible Values |
---|---|
IDLimb |
Description: Key corresponding to the limb object created in the LIMBS file. Required: Possible Values: Default Value: |
Priority |
Description: The priority of the data entry compared to others (a higher priority will always be processed first). Required: Possible Values: Default Value: |
Conditions |
Description: List of conditions required for dismemberment to occur. Required: Possible Values: Default Value: |
Available Conditions for DATA Files
Conditions are used in JSON files to determine if dismemberment should occur based on the actor's state or the items they are carrying. Here is a summary table of the different conditions you can specify:
Condition and Parameters | Description |
---|---|
Parameters: |
Description: Checks if the actor is wearing (equipped with) a specific item. Item: Example: |
Parameters: |
Description: Checks if the actor is wearing (equipped with) an item that contains a specific keyword. Keyword: Example: Note: The
|
Parameters: |
Description: Checks the weight class of the item that the actor is carrying. Type: Note: The
|
Testing in the Game
After configuring your JSON files, it is crucial to test your changes in the game to ensure they work as intended. If you encounter a crash when launching the game, it likely means that the structure of one of your JSON files is malformed (possibly an extra comma). Feel free to use tools like JSON Formatter to validate your JSON files or find potential errors.
Once the game is running, be sure to check the DismemberingFramework.log
file (located in Documents\My Games\Skyrim Special Edition\SKSE
) for any errors or issues with your asset packs. Regularly check this file during your testing to identify and quickly correct errors. This will help you refine your configuration and ensure smooth integration of dismembered limbs into the game.