Porting models to Custom Survivor Models (CSM): Difference between revisions
No edit summary |
mNo edit summary |
||
| Line 31: | Line 31: | ||
# Open that VPK file in GCFScape. You should see a models folder and a materials folder.<br><br>[[File:2_gcfscape.png|frameless|800px]]<br><br>If you do not have a models folder, then you might be trying to port a reskin of an existing survivor. In that case, you'll need to dig through pak01_dir.vpk and find the model of the survivor the mod is reskinning.<br><br> | # Open that VPK file in GCFScape. You should see a models folder and a materials folder.<br><br>[[File:2_gcfscape.png|frameless|800px]]<br><br>If you do not have a models folder, then you might be trying to port a reskin of an existing survivor. In that case, you'll need to dig through pak01_dir.vpk and find the model of the survivor the mod is reskinning.<br><br> | ||
# Extract the contents to some folder. Inside the models/survivors folder, there should be at least 4 files: (mdl phy vvd dx90.vtx). You do not need to worry about the weapons folder; those are for viewmodels (hands), which the plugin does not support.<br><br> | # Extract the contents to some folder. Inside the models/survivors folder, there should be at least 4 files: (mdl phy vvd dx90.vtx). You do not need to worry about the weapons folder; those are for viewmodels (hands), which the plugin does not support.<br><br> | ||
# Open Crowbar, go to the Decompile. Drag that survivor_biker.mdl file into Crowbar. Depending on the mod you're porting, the filename might be different, but you want to decompile the .mdl file.<br><br> | # Open Crowbar, go to the Decompile tab. Drag that survivor_biker.mdl file into Crowbar. Depending on the mod you're porting, the filename might be different, but you want to decompile the .mdl file.<br><br> | ||
# Toggle the settings below, then hit Decompile.<br><br>[[File:3_decompile.png|frameless|800px]]<br><br> | # Toggle the settings below, then hit Decompile.<br><br>[[File:3_decompile.png|frameless|800px]]<br><br> | ||
# Go to the output folder of whatever model you decompiled. Open the survivor_biker.qc file.<br><br>[[File:4_editqc.png|frameless|800px]]<br><br> | # Go to the output folder of whatever model you decompiled. Open the survivor_biker.qc file.<br><br>[[File:4_editqc.png|frameless|800px]]<br><br> | ||
Revision as of 01:57, 4 April 2024
Preamble
This guide is meant to help people who want to turn a client-side survivor model replacement for Left 4 Dead 2 into a Survivor Chat Select 2 compatible model for a dedicated server. It is only applicable for server administrators or users who intend to send the files to an admin.
We will be porting the following model:
https://steamcommunity.com/sharedfiles/filedetails/?id=867260537
I assume that the model you are porting to the SCS2 plugin is already converted for Left 4 Dead 2 specifically. If you want to port a model from another game like Garry's Mod or even L4D1, the steps are more complicated and will involve Blender. That will require another guide.
This guide also assumes you have permission from the addon's author to port whatever model you're doing.
Requirements
- Steam
- Crowbar
- GCFScape (or anything that will let you open and extract files from VPKs)
- Some kind of text editor (I use Notepad++)
- grepWin (optional, but recommended)
Steps
If you already have the VPK of the model you want to port, (eg. it's on gamebanana or something) skip to step 5.
If you already have the extracted files (mdl, phy, etc), skip to step 7.
- Find the workshop ID of the model you want to port. This can be found in the URL: https://steamcommunity.com/sharedfiles/filedetails/?id=867260537
In this case, write down the number 867260537. - Subscribe to the model on Steam.
- Navigate to your L4D2 steam workshop cache folder. Below is an example, assuming your installation is somewhat standard:
steamapps\common\Left 4 Dead 2\left4dead2\addons\workshop
. - Look for the VPK file with the same filename as the ID you pulled from step 1. In this case, look for 867260537.vpk.

- Open that VPK file in GCFScape. You should see a models folder and a materials folder.

If you do not have a models folder, then you might be trying to port a reskin of an existing survivor. In that case, you'll need to dig through pak01_dir.vpk and find the model of the survivor the mod is reskinning. - Extract the contents to some folder. Inside the models/survivors folder, there should be at least 4 files: (mdl phy vvd dx90.vtx). You do not need to worry about the weapons folder; those are for viewmodels (hands), which the plugin does not support.
- Open Crowbar, go to the Decompile tab. Drag that survivor_biker.mdl file into Crowbar. Depending on the mod you're porting, the filename might be different, but you want to decompile the .mdl file.
- Toggle the settings below, then hit Decompile.

- Go to the output folder of whatever model you decompiled. Open the survivor_biker.qc file.

- Change the $modelname from "survivors/survivor_biker.mdl" to "serioussaturdays/survivors/postal_dude_v1/postal_dude_v1.mdl".
I like to use the following folder structure:
- serioussaturdays - for any mods I port
- survivors - for survivor models
- postal_dude_v1 - the name of the model file as its own folder, to keep the files contained and make it easier to set things up for fastdl.
I recommend tacking on a _v1 to the end of the model name; if you ever want to update the model or need to make changes, then change it to v2, v3, v27, etc.
- Note down the path name for any instance of $cdmaterials. I would actually recommend changing this value to something that matches the model structure above - for example, I will change it to "models/serioussaturdays/survivors/postal_dude_v1/". If you don't understand the implications of this, or you're a lazy fuck, just keep note of the path. Backslashes (\) are interchangable with forward slashes (/).
- In Crowbar, switch to the Compile tab and drag the QC file into Crowbar.
- Toggle the settings below, then hit Compile.

If you did not rename any materials, go to step 18. Otherwise, go to step 14. - If you renamed the materials folder, recreate the cdmaterials path (materials\models\serioussaturdays\survivors\) in your base L4D2 install.
- Go to where you extracted the files from the VPK. Go into materials\models\ex-mo and rename the postal2_dude folder to postal_dude_v1.
- Move the postal_dude_v1 into the path you created in step 15 into the materials path you created in step 14.
- For every .vmt file, you will need to open the file in a text editor and change every instance of "models/ex-mo/postal2_dude/" to "models/serioussaturdays/survivors/postal_dude_v1/". My personal tool of choice for this is grepWin; see the screenshot below for what the operation would look like.

- Go back to Crowbar. Open the View tab, set the model viewer to Left 4 Dead 2, then click View.
- You should see your model load in.

Open the Sequences tab and make sure you didn't horribly break animations somehow.
If everything looks good, you're done! Take the two folders "materials\models\serioussaturdays\survivors\postal_dude_v1" and "models\serioussaturdays\survivors\postal_dude_v1", zip them up (maintain the folder structure), and add them to the server or send them to the admin.