Divine Skins
Divine Skins Wiki

Recolor with material values

Change colors, metalness, and roughness in the Material Editor without painting a texture. Example: a gold briefcase for Pocket.

Beginner

Recolor part of a hero by changing material values in CSDK 12, without painting any images. In this guide you turn Pocket's briefcase into shiny gold. First set up your tools with Set up your creator tools.

What you need

Source 2 Viewer

CSDK 12

The hero's codename

Source 2 Viewer finds the hero's material and decompiles it. CSDK 12 opens it in the Material Editor and compiles it. Pocket's briefcase uses the codename synth.

What a material is

A material tells the game how a surface looks. It names a shader (pbr.vfx for heroes), lists the texture images, and holds values like color, roughness, and metalness. The game reads the compiled .vmat_c. You decompile it, change values in the Material Editor, and compile it again. Hero material settings reference explains every setting.

Keep it fair

You see a recolor on every copy of that hero, enemies included, so a bright skin can make an enemy easier to spot.

No glowing, bright, see-through, or very dark skins

Do not turn on self-illumination or make a hero glow. Do not make a hero much brighter, near-transparent, or very dark. These change how easy a hero is to see. Read What's allowed and how to stay safe.

Make the mod

Pick a route. The full workflow changes the material values themselves. The quick options work in Deadlock Mod Manager or your browser.

Find the material

  1. Open Source 2 Viewer.
  2. Open Deadlock/game/citadel/pak01_dir.vpk.
  3. Go to models/heroes_staging/synth/materials/.
  4. Find pocket_suitcase.vmat_c.

Materials do not always sit next to the model: Pocket's model is in models/heroes_wip/pocket/, but the briefcase material is in synth. For other heroes, look up the codename in Hero names and file paths. Then open the hero's model and check its References tab for the real material paths.

Decompile it into your addon

  1. Open the CSDK 12 launcher and create a new addon. Name it in lowercase with no spaces, for example goldcase.
  2. Right-click the addon and choose Explore Content Folder.
  3. Inside it, rebuild the material's path: models/heroes_staging/synth/materials/.
  4. In Source 2 Viewer, right-click pocket_suitcase.vmat_c and choose Decompile & export.
  5. Save it into the folder you made in step 3.

Your addon's content folder now looks like this:

pocket_suitcase.vmat

Open it in the Material Editor

  1. In the CSDK 12 launcher, select goldcase and click Launch Tools. The Asset Browser opens.
  2. Set the Asset Browser to show only your addon's files.
  3. Type type=material_asset in the search box to show only materials.
  4. Double-click pocket_suitcase to open it in the Material Editor.
  5. Check that the shader at the top is pbr.vfx. A decompiled hero material should already use it.
  6. Set the preview model to Pocket, models/heroes_wip/pocket/pocket.vmdl, to see the briefcase on the hero.

Change the values

Each setting can read from a texture image or use a fixed value. For polished gold, change three settings:

  1. Change Roughness from texture to Color. Pick pure black. This makes the surface smooth and shiny.
  2. Change Metalness from texture to Slider. Set it to 1.0. This makes the surface look like metal.
  3. Change Color to the gold you want. The example uses 255 192 47.
  4. Check the preview and adjust the values until you like the result.
  5. Press Ctrl+S to save. Close the Material Editor.
Tint instead of replace

Materials also have a color tint value (g_vColorTint1 in the file). It multiplies the texture's color, so details stay visible. Many hero materials have a tint mask, so the tint only shows on some parts.

Compile and collect the files

  1. In the Asset Browser, right-click the material and choose Recompile, then Full.
  2. Right-click goldcase in the CSDK 12 launcher and choose Explore Game Folder.
  3. Open models/heroes_staging/synth/materials/. You see the new pocket_suitcase.vmat_c and new .vtex_c texture files.
  4. Make a staging folder, such as goldcase_pack, with the same path inside: models/heroes_staging/synth/materials/.
  5. Copy the new .vmat_c and every new .vtex_c into it.

The new material points to its textures by their compiled names, which include a code, like abrams_coat_color_png_63291cfb.vtex_c. Ship the material without them, and the game cannot find its textures.

pocket_suitcase.vmat in the content folder compiles to pocket_suitcase.vmat_c plus new .vtex_c files in the game folder. You copy all of them into goldcase_pack at the same path and pack it as pak05_dir.vpk.

Pack and test

  1. Pack your staging folder into a VPK with Pack your mod into a VPK.
  2. Load the mod and look at Pocket's briefcase in game with Test your mod in game.

Always check in game: Source 2 Viewer's preview does not match Deadlock's lighting exactly.

These need no CSDK 12 but give you less control. More in Make mods without installing tools.

Mod Foundry in Deadlock Mod Manager. Open Settings, then Experimental, then Mod Foundry. It recolors a hero's body and weapon and exports a VPK. See the Mod Foundry docs.

DeadMod in your browser. Recolor a texture image you exported with Source 2 Viewer. In DeadMod, paste the texture's game path, upload your image, and click Save mod as VPK. This edits images, not material values.

DeadMod in the browser, with a file path field, an upload button, the mod file name pak50_dir.vpk, and the Save mod as VPK button

Common problems

More fixes are in Model and skin problems.

Next steps

Credits

This guide is based on the work of these creators. Check out their original guides.