Skip to content

Your own model

Three ways, from easiest to most work.

No Unity. Use the body that ships with NPC Utilities:

<property name="Mesh" value="#@modfolder(DSD_NPCUtilities):Resources/dsdnpcutilities.unity3d?dsdNpcSurvivor"/>
<property name="PhysicsBody" value="dsdNpcSurvivor"/>

Any character rigged with Adobe Mixamo's auto-rigger gets the built-in human animations, weapon holds, hit areas and ragdoll without any animation work. Steps below.

Any model with a Unity Humanoid avatar works with DSDNpcAnimBody. Weapon holds follow the vanilla player only if your rig has a RightWeapon bone at the same path as the Mixamo skeleton; hit areas and the ragdoll need their own physics body. Follow the Mixamo steps and the checklist, adapting bone names.

Mixamo step by step

1. Rig it

Upload your character to Mixamo, auto-rig it, and download it as FBX (T-pose, no animation).

2. Clean it in Blender

  1. Import the FBX.
  2. Rename every bone to drop the mixamorig: prefix: mixamorig:LeftUpLeg becomes LeftUpLeg. Rename the vertex groups the same way. (A short script does this in one go; the game finds limbs by these plain names for gore and dismemberment.)
  3. Name the armature object Armature.
  4. Scale the character to about 1.8 m tall with the feet at 0, then apply the scale.
  5. Export FBX: armature + mesh, no leaf bones, no animation.
import bpy
for b in bpy.data.objects["Armature"].data.bones:
    b.name = b.name.replace("mixamorig:", "")
for o in bpy.data.objects:
    if o.type == "MESH":
        for vg in o.vertex_groups:
            vg.name = vg.name.replace("mixamorig:", "")

3. Set it up in Unity

Use Unity 2022.3.62f2 (the game's version).

  1. Import the FBX. Rig: Animation Type Humanoid, Avatar Create From This Model. Open Configure and check every bone is green. Model: tick Read/Write.
  2. Drag it into a scene and make a prefab of it.
  3. Under RightHand add an empty child named RightWeapon. Its path must be Armature/Hips/Spine/Spine1/Spine2/RightShoulder/RightArm/RightForeArm/RightHand/RightWeapon (it is, on a standard Mixamo skeleton).
  4. Tag Armature (the hips' direct parent) E_BP_BipedRoot. Add the game's tags to your project first: every E_BP_ tag below must exist in the Tag Manager.
  5. Hit areas and ragdoll: on each of these bones add a collider, a kinematic Rigidbody and (except on Hips) a CharacterJoint connected to the nearest body above it, and tag the bone:

    Bone Tag Collider
    Hips, Spine1 E_BP_Body box
    Head E_BP_Head sphere
    LeftArm, RightArm E_BP_LArm, E_BP_RArm capsule
    LeftForeArm, RightForeArm E_BP_LLowerArm, E_BP_RLowerArm capsule
    LeftUpLeg, RightUpLeg E_BP_LLeg, E_BP_RLeg capsule
    LeftLeg, RightLeg E_BP_LLowerLeg, E_BP_RLowerLeg capsule
  6. Materials: use a shader you ship in the same bundle. The game strips many built-in shader variants from mod bundles; a missing shader draws pink.

  7. Set the prefab's AssetBundle to e.g. mynpcs, build for Windows, and copy mynpcs to your mod as Resources/mynpcs.unity3d.

4. Use it

<property name="Mesh" value="#@modfolder:Resources/mynpcs.unity3d?myHeroPrefab"/>
<property name="PhysicsBody" value="dsdNpcSurvivor"/>
<property name="DSDNpcAnimBody" value="Survivor"/>

PhysicsBody dsdNpcSurvivor works because your skeleton matches the survivor's. DSDNpcAnimBody Survivor gives your model the full animation set: walk, run, rifle, pistol, melee and aim poses, switched by the weapon held.

Checklist

  • [x] Humanoid avatar, all bones mapped, facing +Z, feet at 0, about 1.8 m.
  • [x] Hips' direct parent tagged E_BP_BipedRoot; the hips bone's name contains "Hips".
  • [x] RightWeapon under the right hand at the Mixamo path.
  • [x] Plain limb names: Neck, LeftUpLeg, LeftLeg, RightUpLeg, RightLeg, LeftArm, LeftForeArm, RightArm, RightForeArm.
  • [x] Colliders + kinematic Rigidbodies + CharacterJoints, tagged E_BP_*.
  • [x] Read/Write on the meshes, shader shipped in the bundle.
  • [x] Unique asset names in your bundle.

Licences

Only ship models you are allowed to redistribute, and credit their authors. Mixamo characters you made yourself are yours; downloads from model sites carry their own licence.