TF2 Mapper’s Resource: Decompiling, Reskinning, and Recompiling a model – Team Fortress 2

TF2 Mapper’s Resource: Decompiling, Reskinning, and Recompiling a model – Team Fortress 2 1 - steamclue.com
TF2 Mapper’s Resource: Decompiling, Reskinning, and Recompiling a model – Team Fortress 2 1 - steamclue.com

A good model was found but it does not have the right texture for your maps. You are looking to add skins to your map? This guide will help to decompile and reskinning your model for the TF2.
 

Introduction

You are probably here because you want to know how you can reskin the cool prop you got from Gmod. You're in luck as I've already done it with my first jailbreakmap, jb_carnival. This guide will tell you everything you need to know about how to reskinning, edit them, and recompile them into skins of your choice.
 
 
 

Programs required

These tools will be needed to start reskinning models before we begin.
 
 
Models that can be decompiled and recompile:
 
Crowbar
 
This compiler allows us to edit and compile model files. It will be used to decompile or recompile our models for TF2.
 
https://steamcommunity.com/groups/CrowbarTool – [steamcommunity.com] 
 
 
 
Image editing:
 
Paint.net – [Paint.net] 
 
Gimp
 
You can use both to make your own images that you can use in your model
 
https://www.gimp.org/ – [gimp.org] 
 
 
https://www.getpaint.net – [getpaint.net] 
 
 
 
VTFedit
 
This can then be used to create VMT or VTF files for the model to locate.
 
gamebanana.com/tools/95 – [gamebanana.com] 
 
 
 
 

How to get a.mdl format file

Crowbar allows you to open any.mdl format file and decompile it. You can also get its QC file to edit. I will use the Gmod model from Sm Sith Lords Simpson's Arcade Cabinet for my example.
 
(I don’t claim ownership of any models I’m editing. They belong to their creators.
 
https://steamcommunity.com/sharedfiles/filedetails/?id=189926770 – [steamcommunity.com] 
 
 
 
 

Extracting from Gmod.gma

If you don't plan on using Gmod models, skip this step to Decompiling by Crowbar.
 
We will need to find the Gmod Workshop model from its gmod format in order to extract it.
 
steamapps/common/Garrysmod/garrysmod/addons. Search here for the addons you want to pull.
 
 
TF2 Mapper's Resource: Decompiling, Reskinning, and Recompiling a model - Team Fortress 2 - Extracting from Gmod (.gma) - 65B692A
 
 
Next, locate the.exe GMAD in the first bin folder of /Garrysmod. This tool allows you to decompile the model and convert it to a.mdl format that Crowbar can use.
 
 
TF2 Mapper's Resource: Decompiling, Reskinning, and Recompiling a model - Team Fortress 2 - Extracting from Gmod (.gma) - AEB23FA
 
 
Drag your.GMA files with your model onto the GMAD exe. This will create a folder with it.
 
 
TF2 Mapper's Resource: Decompiling, Reskinning, and Recompiling a model - Team Fortress 2 - Extracting from Gmod (.gma) - DAE1699
 
 
To make it easier to find them, I would recommend grouping your Gmod decompiled folders together.
 
 
 

Crowbar v0.71 – Decompiling

Crowbar can be opened once you have your.mdl File. You should see this screen the first time you open Crowbar.
 
 
TF2 Mapper's Resource: Decompiling, Reskinning, and Recompiling a model - Team Fortress 2 - Decompiling with Crowbar v0.71 - B038C94
 
 
Navigate to your Decompile Tab and look for your Input & Output folder path paths. For the input go to the.mdl files you just created. Find the output folder where you want to put your QC file.
 
 
TF2 Mapper's Resource: Decompiling, Reskinning, and Recompiling a model - Team Fortress 2 - Decompiling with Crowbar v0.71 - 1437941
 
 
Sometimes it won’t recognize an output folder. If this happens, place a dupe.zip file within the output folder. It won't even be used for compiling. Crowbar will just recognize the folder.
 
Hit decompile, to find a QC and other files in your output directory.
 
 
 

Making your Reskins

You will notice that the Mdl folder also decompiled the VTFs, VMTs and other files it used to create the model. Look at the VTFEdit sizes for each texture, and notepad layouts for each VMT. This is important to remember when you are creating replacement textures.
 
 
Paint or Gimp will allow you to resize your selected images to the VTF's dimensions. For example, I resized all my files to match the VTF's original size of 512×512.
 
 
TF2 Mapper's Resource: Decompiling, Reskinning, and Recompiling a model - Team Fortress 2 - Making your Reskins - A02D9DE
 
 
Navigate to the materials/models subfolder in TF2’s files. This is where the Gmod Mdl file texture files will be located. Copy all folders within the materials/ folder from the Mdl directory to your tf. This is necessary to make alternates. The model file will then be able locate the required materials.
 
 
TF2 Mapper's Resource: Decompiling, Reskinning, and Recompiling a model - Team Fortress 2 - Making your Reskins - BFA35B6
 
 
Now, open VTFEdit. Add your alternate textures. Hit Format and click Auto Create VMT. This will speed the creation of your VMT. Name your VTF alternatives something similar to the skin that is being replaced, but with a unique name. To match "simpsonsmarquee", one of my alternative names is "digdugmarquee" or "digdugscreenglow".
 
Your reskin photos should be saved in the right folder. My reskins, in this case, will go into the folder smarcade.
 
 
TF2 Mapper's Resource: Decompiling, Reskinning, and Recompiling a model - Team Fortress 2 - Making your Reskins - C807464
 
 
If the model has any other VMTs, copy them and rename it to use in your reskins.
 
Now, copy the OG VMTs' files over to your VMT. Make sure you keep your texture name the original. This applies to all VMT's that are included in the model.
 
Copy the materials that aren't being changed from the Model's Fold to the tf/materials/models Folder.
 
 
 

Editing your .QC model file

https://developer.valvesoftware.com/wiki/$texturegroup – [valvesoftware.com] 
 
 
Notepad is recommended for opening your QC file. You can add $texturegroup Skinfamilies beneath CDmaterials to include new skins.
 
 
TF2 Mapper's Resource: Decompiling, Reskinning, and Recompiling a model - Team Fortress 2 - Editing your .QC model file - 9AE68B4
 
 
Each line is one texture, and each new name within the skin line represents a different skin. Separate each of the lines into a bracket, holding all of your skin names inside. Next, separate each skin with "X". Since my original skin has two textures, it switches between them in this example.
 
 
TF2 Mapper's Resource: Decompiling, Reskinning, and Recompiling a model - Team Fortress 2 - Editing your .QC model file - A3F4E68
 
 
It is possible to also find $staticprop. This tells you whether an object can have physics, dynamic, or static properties. For example, if you wanted to convert a dynamic prop within a game into an static prop, simply put $staticprop inside its qcfile.
 
 
If you want it to go back into a customized folder you have, first go to the named custom folder and then to its Models directory. Wormatty's guide to organizing custom content is helpful if you don’t have a named folder or don’t know what it means.
 
https://steamcommunity.com/sharedfiles/filedetails/?id=2216526350 – [steamcommunity.com] 
 
 
 
Change the $modelname path for the model from whatever it was to (username/insert mod subfolder/model file).
 
 
For example, take the following example:
 
$modelname "props_japan_ow/boss_key.mdl"
 
To
 
alexrox360/props_japan/boss_key.mdl
 
 
TF2 Mapper's Resource: Decompiling, Reskinning, and Recompiling a model - Team Fortress 2 - Editing your .QC model file - D290616
 
 
 

Compiling to Create a Model

Now, return to Crowbar and select the game you want for the Output file. For more information, see First game setup. If you already have it set-up, go to Recompiling
 
 
Click the Compile Button to create the final product. If you're using a custom path, drag and dropped your files into the (username/models).
 
 
Go to Hammer, and place your model there. If you followed the instructions, you should have a brand new model with multiple reskins.
 
 
TF2 Mapper's Resource: Decompiling, Reskinning, and Recompiling a model - Team Fortress 2 - Compiling to a Model - 1A99106
 
 
 

Crowbar Game Setup: First Time

To recompile your model, you'll need to select the TF2 TF2 game in the Game Selector drop-down to find its output /model. It will automatically search within your /C drive for the Steam library and the Game. Crowbar will need you to manually indicate to it where your steam library is located if it's in another drive.
 
(png)
 
Go to your Game Selector and click on Add to add an additional game. It can be labeled something like TF2 ("My Folder") so that it doesn't overwrite Team Fortress 2's current selection.
 
(png)
 
This will allow you to search your TF2 folder and locate the file required to run the program.
 
After this, everything should have been set up for recompiling.
 
(png)
 
 

Written by alexrox360

 
 
I hope you enjoy the TF2 Mapper’s Resource: Decompiling, Reskinning, and Recompiling a model – Team Fortress 2 guide. This is all for now! If you have something to add to this guide or forget to add some information, please let us know via comment! We check each comment manually!
 


Be the first to comment

Leave a Reply

Your email address will not be published.


*