Recolor with material values
Change colors, metalness, and roughness in the Material Editor without painting a texture. Example: a gold briefcase for Pocket.
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
- Deadlock, installed and up to date.
- Source 2 Viewer and CSDK 12. Install them with Set up your creator tools.
- The hero's codename. Pocket's briefcase uses
synth. Other heroes are in Hero names and file paths.
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.
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
- Open Source 2 Viewer.
- Open
Deadlock/game/citadel/pak01_dir.vpk. - Go to
models/heroes_staging/synth/materials/. - 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
- Open the CSDK 12 launcher and create a new addon. Name it in lowercase with no spaces, for example
goldcase. - Right-click the addon and choose Explore Content Folder.
- Inside it, rebuild the material's path:
models/heroes_staging/synth/materials/. - In Source 2 Viewer, right-click
pocket_suitcase.vmat_cand choose Decompile & export. - Save it into the folder you made in step 3.
Open it in the Material Editor
- In the CSDK 12 launcher, select
goldcaseand click Launch Tools. The Asset Browser opens. - Set the Asset Browser to show only your addon's files.
- Type
type=material_assetin the search box to show only materials. - Double-click
pocket_suitcaseto open it in the Material Editor. - Check that the shader at the top is
pbr.vfx. A decompiled hero material should already use it. - 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:
- Change Roughness from texture to Color. Pick pure black. This makes the surface smooth and shiny.
- Change Metalness from texture to Slider. Set it to 1.0. This makes the surface look like metal.
- Change Color to the gold you want. The example uses 255 192 47.
- Check the preview. Adjust the values until you like the result.
- Press Ctrl+S to save. Close the Material Editor.
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
- In the Asset Browser, right-click the material and choose Recompile > Full.
- Right-click
goldcasein the CSDK 12 launcher and choose Explore Game Folder. - Open
models/heroes_staging/synth/materials/. You see the newpocket_suitcase.vmat_cand new.vtex_ctexture files. - Make a new folder for your mod, for example
goldcase_pack. - Inside it, rebuild the same path:
models/heroes_staging/synth/materials/. - Copy the new
.vmat_cand every new.vtex_cinto 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
- Pack your mod folder into a VPK. Follow Pack your mod into a VPK.
- 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
.vmatsource file, or you forgot to recompile. Pack the compiled.vmat_cfrom 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_cfiles are missing from your VPK. Copy them next to the.vmat_cand pack again. - It worked before an update. Game updates can move hero files. Find the material again and check the path.
Next steps
- Pack your mod into a VPK
- Test your mod in game
- Retexture a hero by painting its images (coming soon)
Credits
This guide is based on the work of these creators. Check out their original guides.
- Guide: How I Make Shiny Metal Materials by ShockHub.
- Guide: Neutral's General Guide for Modding Deadlock (Models, Textures, Sounds) by Neutraldrift.
- Data: GameTracking-Deadlock by SteamTracking, for the shader settings and file paths.
- Docs: Customization (Mod Foundry) from Deadlock Mod Manager.
- Tool: DeadMod by RedMser.
- Tool: Source 2 Viewer by the ValveResourceFormat team.
