Left 4 Dead 2

Left 4 Dead 2

212 ratings
Editing a 3D Model [ OLD ]
By Waluigi ™
Do you want to edit a L4D2 Character Model?
You don't want to download characters from internet?

Well you found the right guide for that!

And please, don't forget to vote this guide!
Hi, welcome to the Editing a 3D Model guide!
I hope that this guide can help you.
I decided to make this guide because there are no guides that tell you how to edit characters or weapons models.
This guide doesn't tell you how to transfer a 3D Model from Internet to the game, so if you think it is, you can search for other guides.
And please, leave a comment if you have problems; I can't solve some problems but I'll try to help you.
First of all, you must have some tools for this work.
Here's the list of all the tools you need:

Tools in Library:

Left 4 Dead 2 Authoring Tools

External Downloads:

Blender http://store.steampowered.com/app/365670/

MDL Decompiler v0.4.1 http://chaosincarnate.net/cannonfodder/cftools.htm

Notepad ++ https://notepad-plus-plus.org/download/v6.9.2.html

GCFScape http://nemesis.thewavelength.net/files/files/gcfscape183.exe

Crowbar http://steamcommunity.com/groups/CrowbarTool
Extracting and Decompiling
  1. Create a folder with the name of the add-on you want to public on the workshop, like coachtest

  2. Go in C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\ and open pak01_dir with GCFScape.
    A window will open and go in models\survivors (copy this directory in coachtest)
    Here you will find survivors model files.

  3. We want to edit only one survivor, so select coach's files:
    Extract them in the recently created directory in survivors

  4. After that open survivor_coach.mdl (of the created directory) with Notepad ++ and change IDST1 to IDST, and save it

  5. Now copy survivor_coach.dx90.vtf, paste it and then name it survivor_coach.dx80.vtf

  6. Open MDL Decompiler, untoggle the tick from "Use Steam File Access" and choose on the first line the file you edited with Notepad ++, on the second line you have to choose the decompile path, so create a folder named decompile in models\survivors, choose it and press the button Extract

  7. Go in your created decompile folder and delete the lod files because we don't need them
Editing the model
Before we start with the editing of the file we have to install a script for import/export of SMD files. Download the following file and don't extract it.

When you finished the download start Blender and go to File>User Preferences
Now click the Install from File button and go to your downloaded file and select it.
It's important that the box is ticked. If everything looks fine select Save User Settings.

  1. Open Blender and delete the cube

  2. Go on File > Import > Source Engine and import coach_model_merged.dmx.smd, you will see the character model.
    To take a better view of the model press the dot on the other side of the keyboard

  3. Go on the right toolbar and name as your addon folder ( coachtest ) every part with the name coach_model_merged.dmx.
    Don't absolutely change name to _skeleton, you have to change the name only on coach_model_merged.dmx so it should look like this: coachtest_skeleton

  4. Select the only part without _skeleton and change Object Mode to Sculpt Mode,
    You can edit your model how you want with the sculpt tools.

  5. After you've done with it, change Sculpt Mode to Object Mode and Import again the file coach_model_merged.dmx, so we have 2 models of the same character.

  6. This is the most important part: Transfer Weights.
    Hold the button Shift and select first the part coach_model_merged.dmx and then select the part coachtest, change to Weight Paint mode and on the left toolbar you have to click on Transfer Weights

  7. Delete the part coach_model_merged.dmx, choose coachtest and change to Object Mode

  8. Now we have to export our edited model.
    On the right toolbar you will see that your properties panel is set to Render, you must change it to Scene, then search Source Engine Export and do only what I say:

    Set the Export Path as your decompile folder;

    Change in "Export for" DMX to SMD;

    Then click Export and choose coachtest.smd or "whateverisyouraddonname".smd and we finished working with Blender!
Scripting and fixing
  1. Open coachtest.smd with Notepad ++ and search the line 102

  2. Change 24 2.856910 -1.536175 -0.973780 to 24 0 0 0 and save

  3. Delete the file coach_model_merged.dmx.smd and open mdldecompiler with Notepad ++

  4. In the line 3 we must change $model "Coach" "coach_model_merged.dmx.smd" to $model "Coach" "coachtest" or $model "Coach" "whateverisyouraddonname"

  5. Delete from line 8 to 19 because we deleted the lod files

  6. Go to the line 70 and change $sequence coach "coach" fps 30.00 to $sequence coachtest "coachtest" fps 30.00 or $sequence whateverisyouraddonname "whateverisyouraddonname" fps 30.00

  7. Save as coachtest_mdldecompiler.qc or as whateverisyouraddonname_mdldecompiler.qc

  8. After that we must create another directory in our addon folder with coach's textures, so open again the file pak01.dir with GCFScape and copy the directory of them: materials\models\survivors\coach and copy all the textures of coach in your recently created directory.
    We finished with this part!
  1. Now open Crowbar and set as .qc file the file coachtest_mdldecompiler.qc

  2. Set the game to Left 4 Dead 2

  3. Press the button Compile

  4. When it finishes click on GoTo and transfer all the files in the compiled folder to your survivors folder and replace the old files with the new compiled files and... End of this part too!
To the Workshop
  1. Create a new text file in the folder with models and materials and name it addoninfo

  2. Open addoninfo and paste this in it:
    addonversion "1"
    addontitle "Addon title"
    addonDescription "Model Description"
    addontagline "New Model"
    addonauthor "YourName"
    addonauthorSteamID "YourSteamID"
    addonURL0 "http://www.mywebsite.com"
    addonSteamGroupName "GROUP"

    addonContent_Campaign 0
    addonContent_Script 0
    addonContent_Music 0
    addonContent_Sound 0
    addonContent_prop 0 //This Add-on provides new props,
    addonContent_Prefab 0 //Provides new prefabs

    addonContent_BackgroundMovie 0 //Provides a replacement for the background movie.
    addonContent_Survivor 1 "Rochelle" //Provides a new survivor model. 0=false, 1=true, String in quotes if replaces specific single character, i.e. "Francis"
    addonContent_BossInfected 0 //Provides a new boss infected model. Break these out?
    addonContent_CommonInfected 0 //Provides a new common infected model
    addonContent_WeaponModel 0 //Provides a new appearance to existing weapons, but does not change their function
    addonContent_weapon 0 //provides new weapons or new zombie killing functionality, i.e. guns, explosives, booby traps, hot tar,
    addonContent_Skin 1 //0 if no new skin textures for existing models. 1 if multiple skin pack. String in quotes if specific single skin
    addonContent_Spray 0 //Provides new sprays.
    addonContent_Map 0 //Add-on provides a standalone map

  3. After you've done that, we need to conver the file to .vpk
    For doing this we need to take the .vpk "converter" in C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\bin\ and place the file in the Desktop

  4. Take your addon folder and move it on .vpk "converter" and you will see that there's a new file of your addon converted in .vpk

  5. Well, now open Left 4 Dead 2 Authoring Tools and click on Workshop Manager, click then on the plus and compile all the schedule and upload it on the Workshop!

My final product of this guide:
< >
C9H13NO3 Feb 24 @ 8:03am 
А по русски может кто нибудь объяснить процесс замены моделий??
Waluigi ™  [author] Jan 20, 2017 @ 10:04am 
@ZeqMacaw -Thanks for the help, I was actually confused on how to use Crowbar, even with Online resources.

Anyway, this guide is OLD from now because MDL Decompiler doesn't work properly for most people.

I'll try making a NEW guide on how to do that with Crowbar when I have the time.
ZeqMacaw Jan 20, 2017 @ 7:00am 
Yikes! Why in the world does this guide use MDL Decompiler for decompiling L4D2 survivors? This is 2016; use Crowbar. Not only is Crowbar easier to use (no need to figure out where to install the tool and no need to modify any MDL file), Crowbar will keep the existing face animations (talking, blinking, expressions). Also, Crowbar comes with an option to automatically fix the right-hand glitch that occurs when recompiling survivors. (This guide shows it as steps 1 and 2 of "Scripting and fixing" section.)

Also note that there are a few extra tweaks needed for each survivor before re-compiling: https://sites.google.com/site/zeqmacaw/tutorials/modding-a-left-4-dead-2-survivor/setting-up-the-survivor-files-from-l4d2/tweaking-the-decompiled-qc-files

I am glad to help with understanding how to use Crowbar and with modding the survivors.
Game mix Jan 15, 2017 @ 9:40am 
plz video
Jester Nov 18, 2016 @ 9:51am 
I have one problem, cant start MDL Deco..., anyone know how to fix it?
Waluigi ™  [author] Sep 13, 2016 @ 8:51am 
@Melosos -Thanks for the report, I've changed it to the updated site now
El Calitros Sep 12, 2016 @ 6:13pm 
ChiyaIsWaifu #TFlexDobb Aug 31, 2016 @ 9:05pm 
ok, thanks for that ;D
Waluigi ™  [author] Aug 31, 2016 @ 12:24am 
@YORCHspartan117 -I have no time to tell you how to do that, this guide is for editing the model only, not transfering a model to another.
There are other guides for that, just find'em.
ChiyaIsWaifu #TFlexDobb Aug 30, 2016 @ 4:53pm 
you can tell me how?