• Hey, guest user. Hope you're enjoying GameParadise! Have you considered registering for an account? Come join us and add your take to the daily discourse.

How to make Weapon Mods (+ Casual Compatibility)

 
 


66c6484887f31.jpg


PLEASE FOLLOW THE YOUTUBE VIDEO INCLUDED!

Hello everyone , today i will show you how to make tf2 mods including how to make them casual compatible

This is going to be a remake of a video made by BoyOhBoy that some have found a bit confusing including myself

In this tutorial i will take an example of a weapon that i want to replace the scout's pistol with
this tutorial should work with any model replacement that you would want , although for player models it can be a little complicated

I will only show how to replace models without any lightning effects or normal maps , if you don't know what that means then don't worry!

This tutorial should be helpful if you're not too familiar with blender

For this tutorial you will need :
-your custom model
-blender
-blender source tools (link installation in desc)
-gcfscape
-vtfedit
-crowbar
-winrar (optional)

STEP 1: Decompiling the model

First you'll need to decompile the in-game model that you want to replace: in this case it's scout's pistol
The reason we do this is because we cannot work on the compiled model.

to do that , we need to go to the tf2 folder , then the tf folder , then open tf2_misc_dir with gcfscape , this is where all in-game models reside.
then we'll need to find our model , you can use this list : https://steamcommunity.com/sharedfiles/filedetails/?id=395367659
->here scout's pistol name is c_pistol

Click the search icon and type the name of your model
Find the corresponding .mdl file to your model name
Once you do , right click and open file location

-weapon models usually are located in "models/weapons/c_models" as you can see here , but some are in the workshop folder

Once you're in the folder (in gcfscape) select all files and drag them onto a folder in your desktop
Open the folder you made and make a new folder called "decompile" just to not get lost , you can name this anything

Now open crowbar and go to the decompile section
For "MDL Input" click on browse then the .mdl file from the folder you made
And "output to" click on browse and select the "decompile" folder
click decompile
We have successfully decompiled scout's pistol model


You will find .smd files in the decompile folder now , those are the models we can work on
the one you need usually contains "reference" in the name

Enter the "decompile" folder , if there's any lod's delete them
Open the .qc file
Remove anything mentioning LOD's in the qc file.

STEP 2 : Model manipulation

Now open your custom model in blender , for me its the Polar Star from Cave Story
Make sure your model is only 1 mesh (this is the technique i use)
Note the texture's name as it will be important for later! you can have many textures , here i only used one

Now click on file -> import -> source engine -> select the .smd that contains reference in the name
Note that on the right , both the model and the skeleton are present :
-The model is well self explanatory , but the skeleton determines the position of the model

You will now have 2 models in blender , your custom model and the game's model
I assume you already know what object mode and edit mode are , but if you don't you just have to look at the top left corner to know which mode you are in , and you can switch back and forth between edit mode and object mode using TAB (this is very important)


Now you will need to make both models overlap as good as you can , you can move your model in object mode by selecting a model by clicking on it , then pressing "G" then either "X" "Y" or "Z" depending on with axis you want to move the object in then moving your mouse , then you can use rotating by selecting the model then pressing "R" (still in object mode) then either "X" "Y" "Z"

Here i'm taking in consideration scout's hand placement so it might look a bit off

After you've aligned both models , in object mode on the right : hold ctrl then select your model and the original model's skeleton , then press ctrl+p and select "armature deform"


Now this is the tricky part so be careful :


in Object mode : select your model on the right then go to "Data" section that looks like a triangle
, you'll find vertex groups there.
-Switch to edit mode using tab , then click on each vertex group then deselect to avoid any errors
-Click on the first vertex group then click select , memorize the name of the vertex group
-Switch to Object mode using tab , then click on your custom model then in the "Data" section
still in object mode , create a vertex group with the same name as the one in the original model
-Switch to edit mode , then click assign
-Switch to object mode , deselect the vertex group you just worked with then repeat the operation on all the vertex groups

After you've done that , you can now delete the original model
Then move your custom model to the original model's folder/collection as those are called in blender
Click on the scene menu , then select "Source Engine Export"
Select "smd" as an export format
Click on the folder icon next to export path , then select the "decompile" folder from before
Then click on export

We have now successfully finished the modeling part

STEP 3 : Compiling and QC file manipulation
Now go to the "decompile" folder and open your .qc file in notepad
The .qc file is a configuration file for compiling the model
What interests us here is the $cdmaterials , as this will hold the path for the texture of your custom model to be loaded

If you already know how to do this and want to know how to make your mod casual compatible , skip to Step 5.
if you have never made a mod work on tf2 before , its highly recommeneded that you dont skip this part

You can close your .qc file for now
Create a folder in your custom tf2 folder with any name you want , this will be the folder we'll use for the mod
Create a folder called "materials" in that folder
Then follow the $cdmaterials names and create folders accordingly

Ex :If $cdmaterials "models\weapons\c_models\c_pistol"
Your directory for the textures of your custom model should be tf\custom\my_mod\materials\models\weapons\c_models\c_pistol\

Open crowbar then select compile
Select your .qc file as input
And select your newly made folder in custom as your output
Click compile


We have now successfully compiled our custom model.

STEP 4 : Textures

Now we'll need to put the textures in their correct place
TF2 doesn't use png or jpg as image formats for textures , but it uses the .vtf format for the texture image and the .vmt format for configuring the texture

Open vtfedit
Click on file -> import
Import the texture/textures you used on your custom model
Press OK
Click on file -> save as
Then go to your custom folder
Enter your mod folder that you created earlier
Enter the materials folder , then enter all those folders
Set the texture's name to the same name that you used in blender (case sensitive)
Then in vtfedit : click on "tools" -> "Create VMT file"
Click on "Options" ->"Shader" and select "Vertexlitgeneric" , this is essential for the texture to appear or else it will be invisible
Click "Create" , the vmt file should have the same name as the vtf file

We have now successfully setup the texture and the model
We can now launch tf2 and test it to see if it works

Take in consideration that the mod you just made wont work on causal , if you want to see how to do that i will show it in the next part

STEP 5 - Casual Compatibility

A mod is "casual compatible" when it functions in casual using the Modern Casual Preloader
To make a mod casual compatible , in our case we will just need to change the texture path


Open your .qc file and change the cdmaterials path to vgui/replay/thumbnails then the rest of the path

Ex : $cdmaterials "models\weapons\c_models\c_pistol"
Needs to be $cdmaterials "vgui\replay\thumbnails\models\weapons\c_models\c_pistol"
-And therefore , your new texture directory is "tf\custom\my_mod\"vgui\replay\thumbnails\models\weapons\c_models\c_pistol"


Create those folders and move your textures to the new location then compile the model using Crowbar

And now your mod should work with the preloader!
About author
admin
Avid gamer.

Comments

There are no comments to display.
 

PC/MAC Tutorial information

Author
Chad Waliser
Article read time
6 min read
Views
7,321
Last update

More in PC/MAC

More from Chad Waliser

Share this pc/mac tutorial

Back
Top