Left 4 Dead 2

Left 4 Dead 2

240 ratings
L4D2_Custom_Survivors
By Oachkatzlschwoaf™
This guide will show you how to create a custom survivor for L4D2 step by step and with freeware.
2
   
Award
Favorite
Favorited
Unfavorite
Language Selection/Sprachauswahl
Select your preferred language/Wähle deine bevorzugt Sprache aus!

If you understand this you are right with this version.

(Zur deutschen Variante kommt ihr über den folgenden Link)

http://steamcommunity.com/sharedfiles/filedetails/?id=233814761
Required Programs
Download in Steam Tools Section:
Left 4 Dead 2 Authoring Tools
Source SDK
Source SDK Base 2007

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

MDL Decompiler v0.4.1 (not the latest release)
http://www.chaosincarnate.net/cannonfodder/cftools.htm

Notepad ++
http://download.tuxfamily.org/notepadplus/6.1.8/npp.6.1.8.Installer.exe

Blender
http://www.blender.org/download/

XNALara (to convert XNA Models for Blender)
http://www.chip.de/downloads/XNALara_44315776.html

Microsoft .NET Framework
http://www.chip.de/downloads/Microsoft-.NET-Framework-3.5_20894571.html

Microsoft XNA Framework
http://www.microsoft.com/en-us/download/details.aspx?id=22588

Crowbar
http://steamcommunity.com/groups/CrowbarTool

GUIStudioMDL
http://www.mrlanky.com/GUIStudioMDL.exe


VTF Edit
http://nemesis.thewavelength.net/files/files/vtfedit125-11.exe


I recommend that you download, install and make shortcuts of every program before we continue here.

Let's start!
Exporting the model

I will explain this tutorial, based on my Lara 2013 mod, it's nearly the same process for every mod, only the names will be different.

Let's start to extract the base model, in this case it's Rochelle.
To do this, we need the program GCFScape which you should have downloaded already.
So start the program, and load the model file.
Click on the folder icon and navigate to this path.(May be different on your system)

C:\Program Files\Steam\SteamApps\common\Left 4 Dead 2\left4dead2\pak01_dir.vpk

If you found the file open it, then you should see something like in the image below


But we only need the model files of Rochelle so we navigate to models → survivors → then select all four producer files and press the right mouse button and select Extract


Now a new window should appear where you have to select the path where you want to save it.
So choose Desktop and create the following folder structure Lara2013 → models → survivors
now save the files and close GCFScape.
Decompiling
I hope you really downloaded version 0.4.1 and not 0.5 of the MDL Decompiler, otherwise you will get in trouble :D
So start the MDLDecompiler and untick Use Steam File Access.


Prepairing for Decompiling
Before we continue, navigate to the folder structure we created a few seconds before, select survivor_producer.mdl and hit the right mouse button → Edit with Notepad ++
When it opens up it should look like this


Important: We'll replace the 0 or 1 (may varies a bit) with a ,
Should look like this afterwards: IDST,
Save and overwrite if necessary.
Now select and copy the file survivor_producer.dx90.vtx and paste it again.
Should be called survivor_producer.dx90 – Copy.vtx but we'll rename it to
survivor_producer.dx80
Now create a folder called decompile.
Back in MDLDecompiler
Click on the three dots near Choose Model File and choose the MDL file we edited previously.
Now we select the Output Directory, which will be our decompile folder we created before.
After you have set everything correctly hit the Extract button.
Should look similar to this.


Editing the Decompiled Files
The decompile folder should look like this now


Delete all files with the beginning lod which we don't need.

I got my Lara model file from the following website
http://xnalara-customized.deviantart.com/gallery/37232906
You can choose a Lara model you like, so you don't have to create an already existing mod :D
So download a model file and extract it (in my case it's an XNALara file so I have to convert it in XNALara first to use it in Blender, if you have an .obj file already you can skip next step).
After that copy the folder with the textures and mesh files into the data folder of XNALara.
Prepairing in XNALara
Start XNALara and open with File → Add Model the model file you downloaded
You don't have to pose or anything like that, we just need to convert into a Blender compatible file format.
In case of Lara we make an exception because we need to move Lara’s ponytail into a more natural pose.
Select Lara's ponytail in the 3D window which should be called hair ponytail 1 or similar.
Now we move the Bone with the slide control in the control window until we like the pose
To save the file: File → Export scene as .obj
Save it where you can find it easily for example on Desktop.


Preparation of Blender
We continue now in Blender.
Before we start with the editing of the file we have to install a script for import/export of SMD files. Download following file, but DON'T EXTRACT it.
http://steamreview.org/BlenderSourceTools/

After 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.
After you did that, it should look like in the following image. It's important that the box is ticked. If everything looks fine select Save User Settings.


Importing the Mesh files
Now select all objects with the A key → objects turn into orange → X key to delete → Enter key to confirm.
After that we import our base model: File → Import → Source Engine
Go to your decompile folder and open producer_model_merged.dmx.smd


If you're done with that, do the same thing again but now select Wavefront (.obj) and select your Lara model.
Edit the Mesh File
In the 3D area, you should see the huge Rochelle model and a small Lara between her shoes


At this point I will teach you some shortcuts, which you will often need. As shown in the image you have to select Object Mode in the Mode Selection (MS).

A= select all/unselect all
B + draw area with the mouse = everything in the marked area will be selected
S + move mouse = scale the selected object
R + move mouse = rotate objects (in Pose Mode) double tap R to have 3D rotation, very helpful
STRG + P = addict objects (create parent)
ALT + P = clear addiction of objects
STRG + Z = Undo the last step
G = move selected object
STRG + J = connect single mesh parts to one
SHIFT + right mouse button = select more objects

In Weight Paint Mode:
F + move mouse = change brush size
STRG + left mouse button on a painted area = get this tint

Now we continue with editing the mesh file. To scale Lara to the size of Rochelle, select her and press S and move your mouse to scale her up.
IMPORTANT: When scaling it's important that the shoulder height is matching.
If your mesh contains multiple parts, select all of them and press STRG + J to connect them to one.
Now change to the Pose Mode in the MS
In the mesh structure untick the visibility of the Rochelle model like in the image below.


Now try to match the skeleton as close to the mesh of Lara as you can. The shortcuts above will help you to do so ;)
Don't hurry, and really try to work accurate.
If you're finished select the button left of the MS: Pose → Apply → Apply Pose as Rest Pose
After that activate the visibility of Rochelle again and don't be shocked if the mesh looks weird now :D

Assign the Weight Paint
If the skeleton part is done we go on to the next step, assign of the Weight Paint. It's important because otherwise your model won't move in game. For doing so, select FIRST the source(Rochelle) and then the target(Lara). Change to Weight Paint Mode and choose Transfer Weights in the left Toolbar. Should be similar to the image below.


After that you can delete the mesh of Rochelle. Select it → press X → confirm with Enter
Now we have to connect the mesh of Lara with the skeleton.
Select the mesh → select the skeleton → change to Object Mode → press STRG + P → with Empty Groups → Lara and skeleton are connected :)
Weight Painting
Maybe you're lucky and anything is fine now with your weight paint, if not we have to edit it now.
Select the mesh of Lara → Change to Weight Paint Mode
The easiest way to learn how weight painting is working is to open Rochelle in another Blender instance and compare every single body part with Lara.
Weight 1 = red color = very movable body area
Weight 0 = blue color = non movable body area
Every shading between (orange to light blue) changes the effect a bit more → learning by doing ;)
If Weight Painting is finished the part of Blender is nearly complete.


Export the SMD file
To save our hard work, select Scene in the right Toolbar and go down to the area of Source Engine Export.
Choose as Export path your decompile folder → change to SMD → select your Lara mesh → hit the export button → select Lara2013.smd and not Scene Export → wait a few seconds until it's finished.
Go to your decompile folder and check if it's exported. If so, of course it is :D, go back to Blender
File → New → Reload Startup File
Then Import → Source Engine → go to your created Lara2013.smd
Check the texture links
Now we check if the texture link in the smd model file is working, of course it's not they are broken by the export :( Nevertheless, open the .obj file of your Lara model, or whatever you have chosen, to see the working texture links. Search identical file names in both (.smd and .obj ) mesh files and copy (STRG +C) the names of the textures from the .obj file and paste (STRG +V) them in the identical entry in the .smd file. You have to double click the texture names to select them. The image should make it a bit easier to understand.


If you have fixed all texture links it should look like this.


Export the .smd file again and you are finished with the Blender part.
Right hand fix
The next step is the right hand fix.
Open your .smd file with Notepad++ and search in the nodes section for the line called ValveBiped.weapon_bone.
For example it looks like this: 24 "ValveBiped.weapon_bone" 8
In this example we keep the number 24 in mind and go down to the skeleton section and search the number 24.
In this example it looks like this:
24 2.856899 -1.536200 -0.973800 -1.501147 -0.272558 -1.578261
to fix it, we replace the three, first numbers with a 0
Should look like this:
24 0 0 0 -1.501147 -0.272558 -1.578261
Then save your Lara2013.smd file and delete the producer_model_merged.dmx.smd file.
Convert the textures
Because the textures of our Lara model are in .tga format we have to convert them to the L4D2 .vtf format.
So open VTFEdit and select Tools → Convert Folder
Set the settings like in the image, except the input and output folder.
As input folder select the path of your basic Lara model with the texture files.
For the output folder create following folder structure in the same place where you have created your models folder in the beginning.
materials → models → custom → your name → rochelle_lara
Hit the convert button and wait until it's finished.


Edit the textures
Because the program isn't able to convert it correctly we have to edit every texture file a bit.
So open the folder of your converted textures and open the .vmt files with Notepad++ and make them look similar to the following example, except the file paths.
"VertexlitGeneric"
{
"$basetexture" "models/custom/Oachkatzlschwoaf/rochelle_lara/Lara_bandage_d"
"$bumpmap" "models\custom\Oachkatzlschwoaf/rochelle_lara/Lara_bandage_n"
// "$envmapmask" "models\custom\Oachkatzlschwoaf/rochelle_lara/Lara_bandage_s"
"$model" 1
$ambientocclusion 1
}

In this example I have also added the normal and light maps which where included in the base model of Lara. They are not necessary but make the textures look better :)
If you have edited all files at least with the VertexlitGeneric you are done with the main textures.
The last texture part is to add texture information about the case of getting boomt with boomer bile.
So duplicate every diffuse .vmt file and insert following patch (overwrite the content in the file)
patch
{
include "materials/models/survivors/survivors_it_shared.vmt"
insert
{
"$basetexture" "models/custom/Oachkatzlschwoaf/rochelle_lara/Lara_bandage_d"
}
}
Preparation for Compiling
Now we have to edit the manual for the compiler, so go to your decompile folder and open the mdldecompiler.qc file with Notepad++
In the first line should be the decompile path, so no need to edit if you haven't moved your folder.
In line three it should look like this:
$model "Lara" "Lara2013.smd"
Delete the lines 8-19 because we have deleted the LOD models anyway :D
The next line to edit starts with $cdmaterials and should look similar to this
$cdmaterials "models\custom\DeinNAME\rochelle_lara\"
Next line starts with $texturegroup skinfamilies
This is the section where you list all your .vmt and _it.vmt files
For example:
$texturegroup skinfamilies
{
{"Lara_bandage_d.vmt"
"Lara_boot_d.vmt"
"Lara_eye_d.vmt"
"Lara_face_d.vmt"
"Lara_gear_d.vmt"
"Lara_hair1_d.vmt"
"Lara_hair2_d.vmt"
}
{"Lara_bandage_d_it.vmt"
"Lara_boot_d_it.vmt"
"Lara_eye_d.vmt"
"Lara_face_d_it.vmt"
"Lara_gear_d_it.vmt"
"Lara_hair1_d_it.vmt"
"Lara_hair2_d_it.vmt"


}
}
Last but not least, line $sequence:
$sequence Lara2013 "Lara2013" fps 30.00

Save it in your decompile folder as Lara2013_mdldecompiler.qc and quit the program.
Compiling
To compile your hard work open Crowbar and follow the instructions of the following images

Create AddonInfo
Now we are nearly finished with our mod. We are just two steps away :D
Okay, so create a new .txt file called addoninfo in your Lara2013 folder.
Open it, copy following content into it and edit the personal thing.
"AddonInfo"
{
addonversion "1"
addontitle "Lara 2013 (Replaces Rochelle)"
addonDescription "New Model Lara Croft from Tomb Raider Reboot 2013 (Replaces Rochelle)"
addontagline "New Model (Replaces Rochelle)"
addonauthor "DeinName"
addonauthorSteamID "DeinSTEAMName"
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
}

Create VPK file
Yeah! We are at the last step!
Now we are able to create our Add-On file in .vpk format.
First create a shortcut of vpk.exe on your Desktop which is located here
C:\Program Files\Steam\steamapps\common\left 4 dead 2\bin
Now just drag and drop your Lara2013 folder on the shortcut of vpk.exe
Now you will get a .vpk file at the location of your Lara2013 folder.
Drag and drop it in C:\Program Files\Steam\steamapps\common\left 4 dead 2\left4dead2\addons
Guess what, you are finished with the hardest work!
You can start testing your own mod now and beg to god it works ;P
Of course it will if you worked carefully.
I hope I was able to teach you how to create your own survivor, if yes don't forget to rate this tutorial.
Also don't forget to upload your work and share and with the community :)
Copyright, Sources and Credits
This tutorial is protected by copyright and you are not allowed to publish it on other websites or in your name!!
Dieses Tutorial ist das geistige Eigentum von Oachkatzlschwoaf™ und darf nicht auf anderen Seiten oder unter anderem Namen veröffentlicht werden!!!


Sources and credits:
Splinks for his tutorial (learnt the most things from it)
http://steamcommunity.com/sharedfiles/filedetails/?id=142457190#50441
ZeqMacaw for some important tips, and his crowbar tool
https://sites.google.com/site/zeqmacaw/tutorials/modding-a-left-4-dead-2-survivor/setting-up-the-survivor-files-from-l4d2/applying-the-right-hand-fix

Every youtuber out there who created blender tutorials, haven't got specific links or names but THANK YOU!
http://www.youtube.com/results?search_query=blender%20tutorial&sm=3
242 Comments
SpitFire101 Jul 29, 2022 @ 10:34pm 
i know this is also a dead guide but if you can please make an updated version i would really appreciate it because i have spent hours upon hours trying to make my own survivors and its been nothing but pain since every guide, video, tutorial, ect have either been outdated, using another app, or had broken downloads.

and if you can is it possible using steam blender? i have models that i really would like in the game. please and thank you
Wrench Dressing Mar 22, 2022 @ 6:04pm 
I know this is a dead guide, but I can't seem to transfer weights in Blender 2.93
Foxhound Jan 1, 2021 @ 4:44am 
Here guys i managed to do the Weight Paint correctly this is how: https://i.imgur.com/N6fJT9T.png


In case image is down just do this: once you hit Transfer Weights a lil window/tab/tool shows up

That the lil tab that shows its named and appears like this down left

🔽 Transfer Mesh Data

once you click set these 2 values

change this

Source Layers Selec..> By Name
Destination Layer.. > All Layers

:chainsaw::witch: tip... if you need to edit that Weight Paint to make it move correctly here a good video about how to https://www.youtube.com/watch?v=VmBPYoHq4wY anyway enjoy :boomer:
Oncogene Dec 24, 2020 @ 9:35pm 
Trying this... the tools and UI change a lot now so a lot of trial and error. Still can't get the weight transfer/paint, and textures to work. For textures, after exporting from Blender, even after modifying the materials names, still no texture files ever show up or attached. Any idea why?
jayzenko Oct 11, 2020 @ 12:40am 
brown
LunarAbyss Aug 19, 2020 @ 12:34pm 
Alright thanks man.
DemonicDevilDiran Aug 18, 2020 @ 11:59pm 
@LunarAbyss Same problem here. All of these guides are so inconsistent and dated I don't even know if I'm going to be able to have a functional mod at this point. I'll let you know if I end up cracking it.
LunarAbyss Aug 13, 2020 @ 7:30pm 
I honestly can't get my mod to work, I've tried and restarted about 5 times these past few days. I don't know the issue of why, but I was hoping someone would give me some insight on what to look at and fix.
LunarAbyss Aug 13, 2020 @ 6:25pm 
I mean editing the textures