| << ModelChanger |
Tutorial - Reskinning CSS Player Models for use with Model Changer plugins
|
|||||||||
|
|
"vertexlitgeneric" { "$baseTexture" "models/player/ct_urban/ct_urban" "$envmap" "env_cubemap" "$bumpmap" "models/player/ct_urban/ct_urban_normal" "$normalmapalphaenvmapmask" 1 "$envmapcontrast" 0.3 "$envmapsaturation" 0.7 "$envmaptint" "[ 0.36 0.36 0.36 ]" } |
to this
|
|
"vertexlitgeneric" { "$baseTexture" "models/player/lduke/urbancityct_v1/ct_urban" "$envmap" "env_cubemap" "$bumpmap" "models/player/lduke/urbancityct_v1/ct_urban_normal" "$normalmapalphaenvmapmask" 1 "$envmapcontrast" 0.3 "$envmapsaturation" 0.7 "$envmaptint" "[ 0.36 0.36 0.36 ]" } |
and change urban_glass.vmt from this
|
|
"vertexlitgeneric" { "$baseTexture" "models/player/ct_urban/ct_urban_glass" // Specularity // Transparency |
to this
|
|
"vertexlitgeneric" { "$baseTexture" "models/player/lduke/urbancityct_v1/ct_urban_glass" // Specularity // Transparency |
Notice that I did not change the path to ct_urban_glass_spec.vmt since Darkelfa's skin did not include that texture file.
Make sure you are logged into steam. Copy the Cannonfodder's mdldecompiler.exe to your ...\Steam\SteamApps\USERNAME\counter-strike source\bin directory and double click on it. We need to decompile the player model so choose either the urban or terrorist mdl file as the "Model File" and choose a temporary "Output Directory" where the decompiled files will be saved.

Use a text editor (like notepad) to open the mdldecompiler.qc file.
Find the line:
$modelname "player/urban.mdl"
and change it to your model name:
$modelname "player/lduke/urbancityct_v1/urban.mdl"
Find the line:
$cdmaterials "models\player\ct_urban\"
and add your materials path to THE LINE ABOVE IT:
$cdmaterials "models\player\lduke\urbancityct_v1\"
$cdmaterials "models\player\ct_urban\"
Adding the new path instead of replacing the old one means that any textures your skin does not include will still be located in the steam cache files.
You're ready to compile. You need to run ...\Steam\SteamApps\USERNAME\sourcesdk\bin\studiomdl.exe with the mdldecompiler.qc file as the input. The easiest way to do that is to paste this into a text file, edit it to match your paths, and save it as compile.bat. Double-click on the bat file and a text window will appear displaying information as it compiles your model.
Check to see if it compiled correctly. Click on Steam > Play Games > Source SDK > Model Viewer. Open your model (in this case models/player/lduke/urbancityct_v1/urban.mdl) and make sure it loads correctly.

Create any setup files required by your plugin (check the documentation).
Post them in the L. Duke forums.