Admin skin replacement


shaggydog
01-02-2008, 11:50 AM
Hi guys/gals (only met 2 though, shame that)

i help run a small dod source server and a member recently asked for admin skins to be implemented.

after going through many tutorials and messing up a few times i eventually got them working.

btw i recommend this tutorial

http://www.ics-base.net/dods_guide/admin_skins.php

my question is simple.

i like to modify skins and do so quite a lot, the admin skins i am using are generic ones but there is a demand for clan custom ones which i will gladly do.

if i replace the server admin skins with new ones via ftp will players when joining download the new version of the skin ?

thx

shaggy

coldair
01-03-2008, 03:37 PM
no it will not change anything if u replace the original files. becouse every player that has dod already has the files.
to see difrent skins on the server u will have to recompiel the models that meens change the directory of the files .
than use an admin plugin to be able to give them to ur admins
i recomend mani admin or beetles mod .

shaggydog
01-03-2008, 03:41 PM
thx for the info, have to be honest i came across the same info earlier on but great that you replied, do you know any guides on such things that could further assist ?

shaggy

coldair
01-04-2008, 03:07 PM
First of all, this will only work with complete models NOT only with reskins, if you want to use this tutorial with reskins, you've to extract the default used model from your Steam cache (via GCF Scape) and then contine the tutorial. Be aware that you need the path of the model to be set as a unique one as well as you've to rename the model itself in the .qc (for example from ct_gign.mdl to whateveryouwant.mdl), so it will be recognized as complete new model with own paths etc, not as a default one from Valve.

This tutorial is written for Windows, sorry, don't have Linux installed at the moment

What we need already installed and working:

Cannonfodders MDL Decompiler or StudioCompiler installed into LocalInstallPath\SteamApps\Accountname\sourcesdk\b in

*Note* If the error "Extra AppID set to 211 but no SteamAppID" when opening the decompiler you've to open your GameInfo.txt and remove the Tools in front of ToolsAppId, save the file, and restart the Decompiler. Make sure you add the Tools in front of ToolsAppId back, before starting the HalfLife2 Model Viewer*/Note*

*2nd Note* If the error "Could not find filesystem_steam.dll occurs, launch your SDK set up for your desired game mod once so that this file will get created */2nd Note*
A texteditor like notpad or Textpad

The SourceSDK is available via Steam under Tools, if you've got Half Life 2

To recompile a model, three basics steps are needed:
Part A. Adapt the mdldecompiler.qc
Part B. Adapt the materials a model uses in the .vmt's
Part C. Recompile the model
Part D. Create a .txt with everything the model uses

What has to be done before starting with recompiling

1. Step: Create a folder called
Code:
moddingas your main folder, DIRECTLY on C:\
2. Step: Create a folder called
Code:
mdltmpas a subfolder of modding
3. Step: Create a folder called
Code:
decompiledas a subfolder of modding
4. Step: Create a link to the file
Code:
GameInfo.txtlocated in LocalInstallPath\SteamApps\AccountName\counter-strike source\cstrike as a shortcut in modding
5. Step: Create a link to the file
Code:
hlmv.exelocated in LocalInstallPath\SteamApps\AccountName\sourcesdk\b in as a shortcut in modding
6. Step: Create a link to the file
Code:
mdldecompiler.exelocated in LocalInstallPath\SteamApps\Accountname\sourcesdk\b in as a shortcut in modding
7. Step: Start your local Steam

Part A. Adapt the mdldecompiler.qc[\b]

1. Download your model you want to decompile

2. Extract your model into your mdltmp folder

3. Locate the *.mdl file of your model, normally under models\player

4. Start the Modeldecompiler from Cannonfodder and paste the complete path to the *.mdl file into it, for example
Code:
C:\modding\mdltmp\modelname\models\player\ct_gsg9. mdl, choose your output folder of the mdldecompiler.qc, for example
Code:
C:\modding\decompiledthen hit "Extract", after it replied
Quote
Completed Dumping Modelclose the Modeldecompiler

5. Open the mdldecompiler.qc located in your decompiled folder with your texteditor, there are three settings that need to be adapted

Overview
5.1 $modelname "player/ct_gsg9.mdl" (this is the name of your model afterwards, set this as unique as possible)
5.2 $cdmaterials "models\player\combine_super\" (this is the path to the custom material used by the model)
5.3 Add
Code:
$bonemerge "ValveBiped.Bip01_R_Hand"
$bonemerge "ValveBiped.Bip01_L_Hand"
$bonemerge "ValveBiped.weapon_bone"
$bonemerge "ValveBiped.weapon_bone_Clip"after the $cdmaterials settings

5.1 rename $modelname "player/ct_gsg9.mdl" to
Code:
$modelname "player/YourNickName/Fraction(CT or T)/UniqueFolderName/NameYouWantYourModelToBeCalled.mdl"
5.2 rename $cdmaterials "models\player\combine_super\" to
Code:
$cdmaterials "models\player\YourNickName\Fraction(CT or T)\UniqueFolderName\"
5.3 add Add
Code:
$bonemerge "ValveBiped.Bip01_R_Hand"
$bonemerge "ValveBiped.Bip01_L_Hand"
$bonemerge "ValveBiped.weapon_bone"
$bonemerge "ValveBiped.weapon_bone_Clip"after the $cdmaterials settings

Now we're done with adapting the mdldecompiler.qc, close it, good job

Part B. Adapt the materials a model uses in the .vmt's

1. Open the .vmt files with your Texteditor and update all $baseTexture and eventually all $bumpmap paths etc. included in there with your new path you specified in your $cdmaterials setting in your mdldecompiler.qc,

for example:
"$baseTexture" "models/player/OldModelname/NameOfTheTexture" now is
Code:
"$baseTexture" "models/player/YourNickName/Fraction(CT or T)/UniqueFolderName/NameOfTheTexture"
Now you're done with adapting the textures, close them, good job

Part C. Recompile the model

1. Click Start -> Execute, type cmd

2. type cd\, hit return

3. type cd name of the folder, hit return, until you reached the folder
Code:
DriveName:\Installpath\SteamApps\Accountname\sourc esdk\binfolder

4. Now type
Code:
studiomdl.exe C:\modding\decompiled\mdldecompiler.qcand hit return, now your model will be recompiled

Now you're done with recompiling the models, good job

You can find your new recompiled model now, where you specified it to be in your $modelname in your mdldecompiler.qc

Move your redone materials exactly to the place you specified in your $cdmaterials in your mdldecompiler.qc

Now open the Half Life Model Viewer (hlmv.exe) and point it to your new model to see if it works.
*Note* If there occurs an error when opening hlmv.exe, make sure you reverted your GameInfo.txt back to its defaults like described in the beginning (add the Tools back in front of ToolsAppId)*/Note*

Test the animations and look for missing textures. If you've done anything wrong, you'll see it there. Check for mistakes in the folderpaths then.

The major work is done, you recompiled your model for Mani, great!

Part D. Create a .txt with everything the model uses

This is pretty simple, create a new file named
Code:
modelname_fraction.txt[\code]and add the path to all files (materials, meaning the vmt's & vtf's + model itself) it uses into it, for example:[code]models\player\YourName\YourFraction(Ct or T)\YourMaterialsFolder\YourModelName.dx80.vtx
Good Job, you're done, have fun with your new Admin Model!

Please share your work.

I've redone and attached the combine Model (Author is Valve, redone for Cs:S by Predator, recompiled for Mani by me), maybe this will make it clear how things work.

It can be downloaded from the german support homepage.

I've attached the unmodified mdldecompiler.qc and the redonce mdldecompiler.qc so you can have a look at how things work and how it has to look like.

Once you know how to do this, a new model can be done in about 3 minutes, so don't give up.




this tutorial was made by Isias

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.