Divine Skins
Divine Skins Wiki
Textures & materials

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. You do not paint any images. In this guide you turn Pocket's briefcase into shiny gold. Set up your tools first with Set up your creator tools.

What you need

What a material is

A material is a small file that tells the game how a surface looks. It names a shader, lists the texture images, and holds values like color, roughness, and metalness. Hero materials use the pbr.vfx shader.

The game reads compiled materials, which end in .vmat_c. You decompile one, change its values in the Material Editor, and compile it again.

Keep it fair

A recolor changes that hero for you everywhere, enemies included. Nobody else sees it. 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.

Quick options

These need no CSDK 12. They give you less control than the full steps.

  • Mod Foundry in Deadlock Mod Manager. Open Settings > Experimental > Mod Foundry. It recolors a hero's body and weapon and exports a VPK. See the Mod Foundry docs.
  • DeadMod in your browser. Export a texture image with Source 2 Viewer and recolor it in an image editor. Then DeadMod builds a VPK from your edited image. This edits images, not material values.

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 the synth folder. For other heroes, 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.

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. Now you 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. 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 > 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 new folder for your mod, for example goldcase_pack.
  5. Inside it, rebuild the same path: models/heroes_staging/synth/materials/.
  6. Copy the new .vmat_c and every new .vtex_c into it.

The new material points to its textures by their compiled names. Those names include a code, like abrams_coat_color_png_63291cfb.vtex_c. If you ship the material without its new textures, the game cannot find them.

Pack and test

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

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

Common problems

  • Nothing changes in game. You packed the .vmat source file, or you forgot to recompile. Pack the compiled .vmat_c from the game folder.
  • The old look stays. Your folder path is different from the original. Check every folder name against Source 2 Viewer.
  • Purple checkerboard in the Material Editor. A texture slot lost its image. Click the magnifier on that slot and pick the image that came with the material.
  • Checkerboard or missing texture in game. The new .vtex_c files are missing from your VPK. Copy them next to the .vmat_c and pack again.
  • It worked before an update. Game updates can move hero files. Find the material again and check the path.

Next steps

Credits

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