Skip to main content

1. Set up

Here's what we used. Newer versions will probably work. These are the ones we saw work.

ToolVersion we usedWhat for
7 Days to DieV3.4 (b10)The game, and its files for reference
Python3.12Exporting the body, making the mesh and texture
Unity2022.3.62f3Building the asset bundle
.NET SDK8.0Building the wardrobe DLL (it targets .NET Framework 4.8)

Stay on the game's Unity line. V3.4's own bundles say 2022.3.62f2; we built with 2022.3.62f3 and the game loaded it fine. A bundle from a different major Unity version is asking for trouble.

Python packages​

py -3.12 -m pip install numpy scipy scikit-image fast-simplification UnityPy pillow matplotlib
  • UnityPy reads the game's asset bundles, so we can get the player body and skeleton out.
  • numpy, scipy and scikit-image do the geometry: distance fields, marching cubes, nearest neighbours.
  • fast-simplification cuts the mesh down to a sensible triangle count.
  • pillow paints the texture, matplotlib draws preview images so you can check the shape before going near Unity.

Art​

You need a picture for the print. We generated ours locally with an image model (Qwen-Image through ComfyUI), asking for an original cat, not a known meme photo. Anything you made yourself or have the rights to is fine.

:::warning Don't ship what you don't own If you bought an asset, its license almost certainly says you can't redistribute it, and a mod is redistribution. Same for anything pulled out of the game. Make it, generate it, or get permission. :::

The project folder​

kitsune-tee/
├─ tools/ Python: export the body, make the mesh, the print, the texture
├─ unity/ copies of the Unity editor script and shader
├─ UnityProject/ a Unity project that only builds gear bundles
├─ src/ the wardrobe DLL (C#)
├─ art/prints/ the generated prints
├─ build/ everything generated: meshes, textures, previews
└─ KitsuneTee/ the mod itself, ready to drop into Mods/
├─ ModInfo.xml
├─ KitsuneTee.dll
├─ Config/items.xml
├─ Config/Localization.csv
└─ Resources/KitsuneTee.unity3d

And one folder that lives outside the project: the reference folder, where the game's body ends up. More on why in the next step.

A Unity project just for gear​

Make an empty project from the command line:

& "C:\Program Files\Unity\Hub\Editor\2022.3.62f3\Editor\Unity.exe" -batchmode -quit -createProject UnityProject

Copy KitsunePlayerGear.shader into UnityProject/Assets/ and BuildKitsuneTee.cs into UnityProject/Assets/Editor/. You'll see both later. The build script switches the project to the Linear colour space the first time it runs, and that matters a lot (step 6 explains).