Dismembering Framework - JSON Files

Table of Contents

Prerequisites

Before starting this tutorial, and to save time, please make sure you have the following skills:

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:

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:

  1. Races: Specify the Editor IDs of the races involved, separated by vertical bars "|" if multiple races are involved.
  2. Skin(s): FormID of the skin(s) that the actor must use. You can use "ANY" to apply this to all skins.
  3. Actor Gender: Choose from "Male", "Female" or "Male|Female" for creatures without gender variants.
  4. 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

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: No

Possible Values: DismemberingFramework or Decapitate

Default Value: DismemberingFramework

LimbFormID

Description: FormID of the item representing the visually severed limb. This value must be linked to a MiscItem from a plugin.

Required: No (but highly recommended)

Possible Values: example: Plugin.esp:0x800 Must be of type MiscItem

Default Value: NULL

RefNode

Description: Name of the reference node that will be used for placing the severed limb "LimbFormID".

Required: No

Possible Values: String (example: NPC R Forearm [RLar])

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: No

Possible Values: String (example: NPC R Hand [RHnd])

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: No

Possible Values: Integer (example: 33 for arms)

Default Value: 0

ActorArmorAddon

Description: FormID of the armor to apply to the dismembered actor (typically, a stump model).

Required: No

Possible Values: example: Plugin.esp:0x800 Must be of type Armor

Default Value: NULL

ActorArtObject

Description: FormID of the visual effect to apply to the dismembered actor (typically, a blood splatter effect).

Required: No

Possible Values: example: Plugin.esp:0x800 Must be of type ArtObject

Default Value: NULL

LimbArtObject

Description: FormID of the visual effect to apply to the severed limb "LimbFormID" (typically, a blood splatter effect).

Required: No

Possible Values: example: Plugin.esp:0x800 Must be of type ArtObject

Default Value: NULL

PlayerEffectSpell

Description: FormID of the spell to apply to the player upon a successful dismemberment (usually used for bullet-time effects).

Required: No

Possible Values: example: Plugin.esp:0x800 Must be of type Spell

Default Value: NULL

TargetEffectSpell

Description: FormID of the spell to apply to the dismembered actor.

Required: No

Possible Values: example: Plugin.esp:0x800 Must be of type Spell

Default Value: NULL

Translation

Description: Relative position of the severed limb "LimbFormID" at the time of its appearance. This is a JSON object containing 3 properties x, y, and z.

Required: No

Possible Values:

  • x: Float
  • y: Float
  • z: Float

Default Value: 0.0 (for each property)

TypeOverride

Description: Allows forcing the armor class of a severed limb (currently used to influence sound effects on creatures wearing undetected heavy armor).

Required: No

Possible Values: Heavy, Light, or Clothing

Default Value: NULL

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: No

Possible Values: A JSON array

Default Value: NULL

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:

  • OneHandSword: FormID for the sound effect of a one-handed sword.
  • OneHandSwordHeavy: FormID for the sound effect of a heavy one-handed sword.
  • TwoHandSword: FormID for the sound effect of a two-handed sword.
  • TwoHandSwordHeavy: FormID for the sound effect of a heavy two-handed sword.
  • OneHandAxe: FormID for the sound effect of a one-handed axe.
  • OneHandAxeHeavy: FormID for the sound effect of a heavy one-handed axe.
  • TwoHandAxe: FormID for the sound effect of a two-handed axe.
  • TwoHandAxeHeavy: FormID for the sound effect of a heavy two-handed axe.
  • OneHandMace: FormID for the sound effect of a one-handed mace.
  • OneHandMaceHeavy: FormID for the sound effect of a heavy one-handed mace.
  • TwoHandMace: FormID for the sound effect of a two-handed mace.
  • TwoHandMaceHeavy: FormID for the sound effect of a heavy two-handed mace.
  • HandToHand: FormID for the sound effect of unarmed attacks.
  • HandToHandHeavy: FormID for the sound effect of heavy unarmed attacks.
  • Dagger: FormID for the sound effect of a dagger.
  • DaggerHeavy: FormID for the sound effect of a heavy dagger.
  • Ranged: FormID for the sound effect of ranged attacks.
  • RangedHeavy: FormID for the sound effect of heavy ranged attacks.
  • Other: FormID for the sound effect of other types of weapons or actions.
  • OtherHeavy: FormID for the sound effect of other types of heavy weapons or actions.
  • Parrying: FormID for the sound effect of parries.

Required: No

Possible Values: A JSON object where each key is a string representing the type of weapon or action, and each value is a FormID (e.g., Plugin.esp:0x800) of type "SoundDescriptor".

Default Value: NULL (no default sound effect specified)

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: Yes

Possible Values: String Example: Humanoid - Base - Male - Tuto - R Forearm

Default Value: NULL

Priority

Description: The priority of the data entry compared to others (a higher priority will always be processed first).

Required: No

Possible Values: Integer Can be positive or negative

Default Value: 0

Conditions

Description: List of conditions required for dismemberment to occur.

Required: No

Possible Values: See the table below

Default Value: NULL (no conditions, therefore always valid)

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

IsEquipped

Parameters: Item

Description: Checks if the actor is wearing (equipped with) a specific item.

Item: FormID Must be of type Armor, ArmorAddon, or Outfit

Example: Plugin.esp:0x800

IsEquippedKeyword

Parameters: Keyword

Description: Checks if the actor is wearing (equipped with) an item that contains a specific keyword.

Keyword: String

Example: ArmorMaterialIron

Note: The BipedSlot property in the associated LIMB file must be specified. Without this information, the condition cannot be evaluated correctly.

IsEquippedItemWeightClass

Parameters: Type

Description: Checks the weight class of the item that the actor is carrying.

Type: String Weight class of the item: Heavy, Light, or Clothing

Note: The BipedSlot property in the associated LIMB file must be specified. Without this information, the condition cannot be evaluated correctly.

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.