Compiling Player Models w/ Custom Skins

Updated Again!!!

Spearmeat’s Tutorial for Compiling Player Models Using Custom Skins

How to use custom skins and recompile them for use as server side models, for use as admin or public custom models in skin choosing programs like mani-admin-plugin.

What you will need for this tutorial:

  1. Cannonfodders MDLDecompiler Here
  2. Cannonfodders StudioCompiler Here
  3. Nem’s Tools GCFScape Here (Sometimes the GCFScape link will not work. I do not know why, if that is the case for you I suggest trying to find it on Google.)
  4. Valve’s Source SDK, instructions Here

Put both of Cannonfodders applications into your SDK folder like this.

(Hard drive letter):\Program Files\Valve\Steam\SteamApps(your steam account)\sourcesdk\bin\ep1\bin\

Install GCFScape to your computer.

Start Steam and then start your Source SDK.

I don’t have the Orange Box so on the Source SDK menu, In the drop down boxes I have selected ‘Half-Life 2 Episode 1' and ‘Counter-Strike Source’. After you’ve got your selections made you can close the SDK. Your settings will be remembered after it’s closed.

Lets get started:

You need to find a custom skin that you would like to compile onto your model. I used: Custom Reskin: by Battle Cat Here Custom Orange Transparent Glasses: by v137pr1d3 Here Urban model: Valve and Turtle Rock Studios

Place the skin .vtf files that you want to use in your server side model into:

\Steam\SteamApps\USERNAME\counter-strike source\cstrike\materials\models\player\YourName\custommodelnameandversion_number

Mine was placed here:

\Steam\SteamApps\USERNAME\counter-strike source\cstrike\materials\models\player\spearmeat\spearmeaturbanv2

Note: If you ever update the model with custom glass or because of a Valve update, the version should be changed so clients will download the newer version.

Most Skins don't come with .vmt files so you will have to extract them from the GCF files using GCFScape.

Run GCFScape then click File > Open and browse to your (Hard drive letter):\Program Files\Valve\Steam\SteamApps\ folder and open the file called:

counter-strike source shared.gcf

Once open (as it pertains to my example) go to:

root\cstrike\materials\models\player\ct_urban

folder and extract the .vmt files from there to the same folder you have the custom skins you are going to compile. This is because the custom skin I used was for the ct_urban model.

Now open the .vmt files you have just extracted and adjust so it points to your .vtf files. You can use Notepad to open your .vmt files.

Screenshot 1. This is what the original ct_urban.vmt file is set up like.

Screenshot 2. The custom ct_urban.vmt file should look like this.

Now as you know I used v137pr1d3's custom orange transparent glass. So I had to change the ct_urban glass.vmt file to point at my custom skin file also.

Screenshot 3. Here's how the original cturbanglass.vmt file looks:

Now to point it to the custom glass skin file that I’m going to compile.

Screenshot 4. The custom cturbanglass.vmt file should look like this:

I did not change the folder setting for cturbanglass_spec because there was no custom .vtf file for that, if there were I would have.

Create your modding folder:

For me I created a folder in D: drive called modding and looked like this:

D:\modding

Inside I had a folder called decompiled.

D:\modding\decompiled

Inside the modding folder create shortcuts to these files: GameInfo.txt Which can be found in:

driveletter:\Program Files\Valve\Steam\SteamApps\your_email\counter-strike source\cstrike folder.

hlmv.exe (which is your half-life model viewer) Which can be found in:

driveletter:\Program Files\Valve\Steam\SteamApps\your_email\sourcesdk\bin\ep1\bin folder.

mdldecompiler.exe (which is your model decompiler) Which can be found in:

driveletter:\Program Files\Valve\Steam\SteamApps\your_email\sourcesdk\bin\ep1\bin folder.

StudioCompiler.exe (which is your model compiler) Which can be found in:

driveletter:\Program Files\Valve\Steam\SteamApps\your_email\sourcesdk\bin\ep1\bin folder.

Decompiling and Compiling your model:

Now before you can decompile your model use the GameInfo.txt shortcut created in your modding folder and delete the word ‘Tools’ as I will show you here: Screenshot 5.

If this is not done you will get an error saying "Extra App Id set to 211, but no SteamAppId"

Now save the GameInfo.txt file.

To decompile your model, use the mdldecompiler.exe shorcut in your modding folder, and input folder options like this: Screenshot 6.

Press the Extract button and it will dump your model files into your D:\modding\decompiled folder.

Go to the D:\modding\decompiled folder and open with notepad the mdldecompiler.qc file.

Change the line:

$modelname "player/ct_urban.mdl"

to:

$modelname "player/spearmeat/spearmeaturbanv2/ct_urban.mdl"

Then find the line:

$cdmaterials "models\player\ct_urban\"

and type above it:

$cdmaterials "models\player\spearmeat\spearmeaturbanv2\"

and type below it: ( this removes those red error lines in console) $bonemerge "ValveBiped.Bip01RHand" $bonemerge "ValveBiped.Bip01LHand" $bonemerge "ValveBiped.weaponbone" $bonemerge "ValveBiped.weaponbone_Clip"

and save the file.

To compile your model with your custom skin use the StudioCompiler.exe shortcut in your modding folder.

Once the application is running, click the button ‘Compile w/ Existing QC’ and use the small window below it to browse to the mdldecompiler.qc file you’ve just finished adjusting.

Click on the compile button just below the small window. If you get an error saying you cannot write to the specified file, you have to go into your ‘driveletter:\Program Files\Valve\Steam\SteamApps\your_email\counterstrike source\cstrike\models\player\’ folder and create the folders:

‘spearmeat\spearmeaturbanv2\’ there before you click the compile button.

Once the compiling is finished you have to open your GameInfo.txt using your shortcut in the modding folder and replace the ‘Tools’ that you removed earlier.

Now use the hlmv.exe shortcut to open your Model Viewer. Once the application is running you go to File > Load Model and browse to

‘player\spearmeat\spearmeaturbanv2' folder and double-click the model file there to view your newly skinned model.

Now you can set up your admin program on your server and use the custom model for Admins or whatever.

Don’t forget to assess and comment on the tutorial.

Go Here to see the finished product.

Enjoy!!

Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Tutorial.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Tutorial a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Tutorial.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

Comments

  • Spearmeat's Levels
    • P2: Drudge
      Points: 1,551
    • C1: Member
    • A6: Elder
      Account Age: 6 years
    Posted 1 year ago

    Posted by Chev Chelios

    Hi I like your tutorial,Im all new to this a few days back I rigged my first ever model to a skeleton with 3dsmax (just to try it out so I got something covered) and now- its probably the dumbest thing someone asked you but I do need to do THIS (decompile) the models first right? I want to port only NPCs and ragdolls from garrysmod to css.Also right now I have a 30 day trial version of 3dsmax I will get 3dsmax 8 soon but It wont load the smd import plugin saying that Unable to load component:This application has failed to start because MSVCR100.dll was not found and then autodesk error error code 126 the specified module couldnt be found.please help

    Hi, sorry for late reply. I've never used any 3d modelling software so I'm afraid I'm not much help. Try the Autodesk Forums for 3DS.

    User Title
    Need coffee.
  • Chev Chelios's Levels
    • P1: Beggar
      Points: 2
    • C1: Member
    • A3: Apprentice
      Account Age: 1 year
    Posted 1 year ago

    Hi I like your tutorial,Im all new to this a few days back I rigged my first ever model to a skeleton with 3dsmax (just to try it out so I got something covered) and now- its probably the dumbest thing someone asked you but I do need to do THIS (decompile) the models first right? I want to port only NPCs and ragdolls from garrysmod to css.Also right now I have a 30 day trial version of 3dsmax I will get 3dsmax 8 soon but It wont load the smd import plugin saying that Unable to load component:This application has failed to start because MSVCR100.dll was not found and then autodesk error error code 126 the specified module couldnt be found.please help

    Bananite
  • pr0gadget's Levels
    • P1: Beggar
      Points: 41
    • C1: Member
    • A5: Veteran
      Account Age: 5 years
    Posted 2 years ago

    How can i fix this???

    Bad ragdoll for player/name/name/ct_gign.mdl

    ZeppeR
  • Jeredo's Levels
    • C1: Member
    • A4: Graduate
      Account Age: 2 years
    Posted 2 years ago

    thx man!! i love it :D

    Bananite
  • Sargent Bash's Levels
    • P2: Drudge
      Points: 4,089
    • E1: Helper
      EF: 7
    • C1: Member
    • A6: Elder
      Account Age: 8 years
    Posted 3 years ago

    Absolutly awsome submission supplies all the relevent information and links for what you need to do.

    Banging job!

    User Title
  • Spearmeat's Levels
    • P2: Drudge
      Points: 1,551
    • C1: Member
    • A6: Elder
      Account Age: 6 years
    Posted 3 years ago
    Posted by jodokast82 I followed your tut to the letter but my compiled model has come out all shiny. As far as I can tell it has something to do with bumpmapping or the cube map. I have no clue how to fix this and any insight would be helpful

    I was wondering if you have any Phong entries inside the .vmt file for your model.

    User Title
    Need coffee.
  • jodokast82's Levels
    • C1: Member
    • A6: Elder
      Account Age: 7 years
    Posted 3 years ago

    I followed your tut to the letter but my compiled model has come out all shiny. As far as I can tell it has something to do with bumpmapping or the cube map. I have no clue how to fix this and any insight would be helpful

    Bananite
  • Spearmeat's Levels
    • P2: Drudge
      Points: 1,551
    • C1: Member
    • A6: Elder
      Account Age: 6 years
    Posted 4 years ago
    Posted by Ver$acE Well when i had completed all the steps till the compiling part.. when i click "compile" after i eidited the qc it says some thing like that : http://i44.tinypic.com/oietqd.jpg I seriously dont know what to do :( i already checked 3 tut's and every one is different from the other .. my xfire is versace0f so if you can explain here or just pm me :( Hope you will help me thx ahead.

    "Within the tutorial it mentions this problem, although it may be worded different, all you have to do is create the folders needed for your model inside the 'models\player' folder before you compile or you will get the error opening-write enable error message."

    Click on the compile button just below the small window. If you get an error saying you cannot write to the specified file, you have to go into your ‘driveletter:\Program Files\Valve\Steam\SteamApps\your_email\counterstrike source\cstrike\models\player\’ folder and create the folders:

    ‘spearmeat\spearmeaturbanv2\’ there before you click the compile button.

    User Title
    Need coffee.
  • Ver$acE's Levels
    • C1: Member
    • A5: Veteran
      Account Age: 4 years
    Posted 4 years ago

    Well when i had completed all the steps till the compiling part.. when i click "compile" after i eidited the qc it says some thing like that : http://i44.tinypic.com/oietqd.jpg I seriously dont know what to do :( i already checked 3 tut's and every one is different from the other .. my xfire is versace0f so if you can explain here or just pm me :( Hope you will help me thx ahead.

    Bananite
  • Spearmeat's Levels
    • P2: Drudge
      Points: 1,551
    • C1: Member
    • A6: Elder
      Account Age: 6 years
    Posted 4 years ago
    Posted by BF2iskool Wtf i installed the compiler where it said but it still says vstdlib not in library how do i fix that

    Copy the 'vstdlib.dll' file from the 'sourcesdk/bin' folder into the 'sourcesdk/bin/ep1' folder. It should be within that folder.

    User Title
    Need coffee.

Credits

Submitter
Spearmeat's Levels
  • P2: Drudge
    Points: 1,551
  • C1: Member
  • A6: Elder
    Account Age: 6 years
Spearmeat (Creator/Co-creator)
Key Authors
Spearmeat
Unknown

Rating

9.9/10
Based off 9 rating(s)

Additional Info

Genre
Compiling
Difficulty Level
Beginner

Stats

Post Count
71
ViewCount
33,320
Date Added
6 years ago
Date Modified
4 years ago

Share

Embed Code
Code to use:

More embeddable images

Bookmark and Share