Left 4 Dead 2

Left 4 Dead 2

107 ratings
Replace survivors and infected models with 3D Max (Blender tut. in the future)
By _MaZ_TeR_
This guide explains how to replace survivors with custom models. The same principle should apply in theory to all models that use bipeds as skeletons, such as the infected (can confirm that it works as I've made in the past a bunch of addons replacing standard and special infected.)

I originally intended for this guide to work with 3D Max, but I have found that it works pretty much the same as in Blender, though the tools and the process are different in that software. The downside to using Max is that it costs a hefty sum of money, where as Blender is free.
   
Award
Favorite
Favorited
Unfavorite
Required software
Here is a list of required software:

To get this first started, I recommend to use 3D Max for the easiest (perhaps the only) way of getting this done. If you can't get it, you might as well back out now and not when you have spent 2 hours getting a model only to figure out you can't add it to this game.[/b]

Edit: Since Blender has become much more user-friendly since I've made this guide, it works just as well. I may or may not update the guide to include Blender 2.9x, since the modding process is the exact same, though the tools are different in Blender obviously.

3D Max:
http://www.autodesk.com/education/free-software/3ds-max

WallWorm:
http://dev.wallworm.com/topic/2/wall_worm_model_tools.html

This is a tool that allows you to import and export the QC models into 3D max. In the other outdated tutorial, you were supposed to download two different softwares and do some additional work to get your models working. I will not guide you to get the tool set-up so you have to figure out that on your own (I may include tutorial though).

Edit: There have been a bunch of alternative tools released after I've made this guide. Here are some:
https://www.wunderboy.org/3d-modelling-tools-plug-ins/

https://github.com/NeilJed/3DSMax-VTA-Exporter-Plugin

https://github.com/NeilJed/3DSMax-SMD-Exporter-Plugin

Blender:

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

https://www.blender.org

VTFEdit:
http://nemesis.thewavelength.net/index.php?p=41

You need VTFEdit to convert your textures to Source compatible .vtf-format.

Crowbar:
http://steamcommunity.com/groups/CrowbarTool/discussions/0/282992562607892824/

Crowbar is a compiler/decompiler tool for Source games, like Left 4 Dead 2. You need this in order to unpack the MDL file of your desired model and then repack it.

GCFScape
https://developer.valvesoftware.com/wiki/GCFScape

You need this software to extract the .vpk-archives.

Optional:

Gimp:
https://www.gimp.org/

If your normal maps are in green color, use this free image editor to convert them to Source-compatible blue color.
Getting started
For this tutorial, we want to replace Rochelle, but you can choose anything else. I will change her into Caveira from Rainbow Six: Siege as I have the necessary things already done.

As mentioned before, this tutorial applies to the infected as well and pretty much any animated model.

Presumably you already have a plan to what you want to make, since you made it this far already.

-------------------------------------------------

Tip: When you have to add space between words, put a lowercase _ instead. The game most likely adds automatically a _ as space but you probably don't want to go back to fix a minor error like that

-------------------------------------------------

To get started, you should make a shortcut of the .VPK packer. It is located in here:

C:\HIHOWAREYOU\Steam\steamapps\common\Left 4 Dead 2\bin

Its executable is called "vpk.exe". Drag and drop the source folder of the mod (the folder where materials/models/sound/whatever -folder is/are located) on top of the exe (or the shortcut) and it will take a few seconds to pack it into a .vpk file. After the mod is in a VPK archive, drag and drop it into the addons folder in the left4dead2 folder.

First, go to this file path:

C:\YOURNAME\Steam\steamapps\common\Left 4 Dead 2\left4dead2

and find an archive called pak01_dir.vpk. It is at the bottom of the folder, on top of the other non-vpk archives. Now open it. You will see a bunch of folders in the software to have opened up. Rochelle is located in models/survivors and is called "the producer". Select all the producer aka Rochelle model files by either first clicking the highest Rochelle file, holding shift and pressing the lowest Rochelle file to select them all or just select them one by one by pressing CTRL+left mouse button/LMB.

Make a new folder anywhere you can find it easily, like your desktop and name it to whatever you desire. I will name it to R6Caveira. Open the folder and make two new folders in it, one is called materials and the other models.

The materials folder is where the textures are placed. You don't have to make the file path exactly the same as Rochelle or what ever you are replacing has. You can make one or ten different sub-folders if you please. My custom folder is called "Caveira".

In the models folder, you want to make a new folder called survivors. Don't make a new folder with a custom name, or the mod will not work. This folder is where the 3D model files go, which have the same file name as the files you got from the vpk archive earlier. The reason you had to do this is because you have to replicate the path of the files in the original vpk archive.

Now, back to the VPK archive viewever, drag and drop the files you selected before into the models/survivors folder. You could place it anywhere else but you may forget where you placed them so to be sure, place them here. It will take a second to load and now you have the files in your hands.

-------------------------------------------------

Infected files are located in "models/infected". Special and male common infected are in the base "infected" folder, the female commons are in the "female" folder.
Adding models to 3D Max
Now that you have extracted Rochelle, you have to decompile the MDL file of her's. Open up Crowbar and go to "Decompile" tab. Make sure everything looks like this:
(remove "texture BMP file option")



Of course make sure the MDL file's path is in the input place and where you want to extract the content of that file is in the output path. Preferably, I'd make a decompile folder on your desktop.

Once everything is ready, hit decompile. Hopefully everything goes smoothly. Once the console below says everything is done, minimze Crowbar (or close, do as you wish) and open up the decompile folder where you decompiled the MDL file.

You should have bunch of files there and a new folder called producer_anims. What we are interested in is the QC file.

Now, open 3D Max and assuming you have WallWorm properly installed, you should have a new tab-button at the top of the screen. Go there and select the import option. Then, select "QC and SMD file import". This will open up a new window. Do not click anything but check only "animated model" at the very top. If you want, you can check "skip LODs". For this basic tutorial, you do not need to mess with the LODs, so you might as well check it. This will basically not include the Level of Detail models with the Rochelle model or whatever you are importing. The LOD model is the model you see when you are at a certain distance from that spesific model. It will look deformed and low-quality, but the purpose of it is to save memory.

After we are done with that, you want to click the import QC/SMD button below. This will open up a window where you want to find the QC file you decompiled. Select that file and open it, it takes some time to import.

After the model has loaded, you can close the QC import window. If everything went right, you will have the Rochelle model and skeleton.
Adjusting skeleton to custom model
Alright, now that we have our Rochelle model (or whatever model you extracted), we are ready for the most important parts of this tutorial.

Now, import the model you want to add to the game, mine is Caveira. First thing you notice is that the model is either too big, too small or in a completely wrong position. Depending on your need, you have to move the custom model at the center of the screen, on the platform where Rochelle/your model is located. The custom model has to be the same lenght as the skeleton (ignore the originall Rochelle mesh, we don't need to worry about it, hide it from being visible to make things less annoying) and the skeleton should be placed in a similar manner as it is in your own, real body, meaning arm bones are located in the middle and so on.

Once the model is in the middle of the skeleton and is approximately the same size, you have to rotate the bones to to the same manner as to how the mesh looks like. For my model, I have to rotate the arm and the leg bones to fit the mesh. Also the neck and the head needs adjustments. Do not forget the fingers, they are important, especially if you are making a first person view model as you will be looking at the fingers most of the times and you don't want them to look like the character came out of Chernobyl :)

Once you are done rotating the bones, we can move to the next part which is adjusting the weights.
Prepairing for weight editing
Making the weights properly is very important in making the animations look good. Another impotant aspect in making the weights look good is moving the skeleton (or in our case, the model) in the middle of any body parts so that the movement is smooth. If any bone is outside for example the thigh-bone, when you add the maximum movement to that bone (red-color), the verticels will deform and go around the bone, making the leg look really weird. It's hard to explain so you have to see it for yourself.

Enough chatter, let's go into business.

If your model is all-in-one and not in pieces, ignore what I have underlined. If not, read what I say below.

If your model is in parts, for example the legs, the arms and the head are seperated from the torso, you have to attach them together in order to attach the skeleton to the mesh. I think there is a way of attaching the skeleton to each mesh-part one by one but that is beyond what we are doing so I think it's best if you attach the model together.

First, click on any part of your custom model. Assuming your model doesn't have the editable mesh option, you have to add it to the part you have selected. Look up and you will see a tab called "Modifiers". Hover your moues on it and move it on top of "Mesh editing". Find "Edit mesh" and click that. Now we have our part available for editing. On the right, if you have the part selected where you just applied the edit mesh parameter, you should see bunch of buttons and red icons have appeared. In the "Edit geometry" section, either click "Attach list" or "Attach".

  • If you choose the list option, it will open up a new window. Select all the parts of the model by left clicking on them and then click "attach" on the left hand corner of the new window (or press enter, I think it works too). Once you are done, the model has a blue out-line.
  • If you choose just the attach option, you the mouse turns into a cross-hair and you have to select the parts of the model you have not selected. Just click on any part and it will become part of the editable mesh -part you selected at first. Make sure you select only your custom model. You can either choose the parts from the main window or you can choose them from the list of parts on the left. Once you are done, the model has a blue out-line.


Not part of above text:

Once your model is together, make sure you have the edit mesh modifier on and press the +-icon next to editable mesh in the modifiers list. Then select "element" and find smoothing groups. Make sure your custom model has the edit mesh modifier applied and press CTRL+A to select your entire model. Your model will now turn into beautiful blood color. Now, back in the smoothing groups, once your model is red, press auto smooth. Max might hang for a minute but it is normal. Once it clears out, we are ready.

What the smoothing did is that in a simple way of saying, it made sure the model doesn't look like it is from Minecraft when you see it in the game.

On the right, you press the "Command panel" button (it looks like the typical wifi-signal logo with a blue stripe) and click on the modifier list. Search for "Skin wrap" and click on it. The tab names are in alphabetical order. Once this modifier is selected, you will notice different sections having appeared below. There is a section called "Parameters" with add and remove buttons. Press add and click on the Rochelle model (or whatever survivor/infected/whoknowswhat) which has the name "reference". Select ONLY reference, not physics or the world will end and your pet hamster will start a nuclear attack against the United States of America.

Depending on your computer and how complex the model is, 3D Max will load and possibly even freeze, this is perfectly normal so if it says it is not responding, do NOT click close. Once it is done, the reference model appears in the parameters list. Scroll below and you see convert to skin and weight all points -buttons. Check the weight all points option and hit convert to skin. 3D Max is now applying Rochelle's weights to your custom model. Once this is ready, you have a new modifier called "Skin". You can now remove the "Skin wrap" modifier by right clicking on it and hitting "delete":

We can begin editing the weights.
Editing weights
Once your custom model has the weights of the original model applied, you have to press the skin modifier. You want to remove the physics and the survivor reference models or they will glitch out the model.

WAIT! Before you do this, you should move to a new frame. Press "auto" button so that the bottom of the viewport turns red and move the slider one frame forwards. What we have done is that we can reverse the model to its default pose without pressing CTRL+Z constantly or remembering how everything was. Make sure the first frame is when the model is in its default pose and the second is for custom poses what you will be using to check the movement of body parts.



Below you see bunch of options and a list of the bones. To edit the weights, press the "edit envelopes" button, What this does is it removes the shaders from your custom model and depending on the bone you have selected from the list below, adds bunch of colors around it.

The more red the colors are, the more movement thoes verticles have. None means there is no movement, blue means there is a bit of movement and completely red means it moves with the bone to the direction it is facing. Anything between those colors have a custom amount of movement, perfect for making the movement of the verticles for example around the knee look smooth.

Make sure everything looks like this minus the bones as they will look different depending on the model:


Tip: "select element" will select the envelopes of a spesific part in your model. For example, if your model was in parts before and you assemebeled it, this option will select the envelopes on the part that was seperate before.

Moving on, go below and you see a wrench icon called weight too. Click that and it opens a new window. Buttons ranging from 0 to 1 are the colors I mentioned before. 0 is no movement and 1 is maximum movement.

What we want to do now is make sure no un-wanted verticles move with a wrong bone. For example, the chest verticles will not start moving when your model moves the leg. Select a bone and you will see areas that have movement infulence in colors. To remove movement from an unwanted area, select the dots that have colors one by one or dragging and letting go. You probably should select the lasso selector tool for more control over your selection, so to do this, follow this image.



Select the frame meant for custom poses and move any body bone to see if any verticles has unwanted movement. If this happens, for example when you move the right leg, the left leg partially goes with the right one. Remove the movement from the left leg's envelopes by hitting 0 to remove the coloring. Oh and make sure you have the bone selected of what the unwanted verticles are following, otherwise you will be wondering why the movement infulence will not be removed from unwanted parts like I did for 2 hours :D Also if you cannot remove the infulence of movement from a part even if you clicked the 0 button, you have to exclude the verticle. It's hard to tell what this does exactly so to make it short, if you can't remove the infulence of a spesific part, this option will do it.



I won't go everything through about weighting process so you have to figure our the right options for your model. Move the bones and see that the verticles have the right amount of movement according to where the bone moves. Make use of all the colors, not just the blue and red colors to make the model smooth.

Once you are done with the weights, we can move over to the last parts.
Adding textures
Once your model has a skeleton and the correct weights, you can move over to the last parts before finishing up.

To apply the texture to the model, you have to open the material editor. Press M to open it or its icon:


Select the standard material and then the bitmap. Find the texture and select it. You will see a ball on the right side of the bitmap option, hold it down and move the red line to "diffuse map" option on the standard material. To apply the texture, select editable mesh and element and select the part where you want the texture to be applied on. Right click the material and select the assign material to selection button.

The to make the textures show up, press the "show realistic material in viewport" -button:


We are almost ready with the textures. In order for the textures to show up in the game, you have to give each material the name of the bitmap, or more like the name of the vmt file. If your vmt is called "potato.vmt", you name the material as "potato". Don't put .vmt to the name.

Do this process to each part of your model.

We are ready with the textures.
Exporting
We finally have our model and the textures.

We can begin exporting them into format Left 4 Dead 2 can read.

Press the Wall Worm button and hit "Export SMD file".

Make sure only your custom model's mesh and the bones are selected. Do not touch any of the settings around it. My exporter looks like this:


Hit "export" and choose where you want to export the model, in this tutorial, we want to export it to the decompile folder we made earlier. In SMD format. Also make sure it has a unqiue name. Then begin the convertion. Depending on the model and your computer, it will take some time. Once it is ready, you can select buttons or move the model in the editor to make sure it is done.

Now, go where you exported the model, in this case, the decompile folder. We notice we have our custom model there, but also other files. Open up the QC file in notepad.

Remove every facial movement code there, and if your model doesn't have any jiggle-bones (in Rochelle's place, her jiggle bones make her ear-rings and the bonytail shake when she moves)., remove the jiggle bone code.

---------------------------------------

Facial movement code looks like this:

%AU18R = right_puckerer * (1 - right_part * (1 / 2 - right_funneler * 1 / 6) - right_funneler * 1 / 4) * %right_lip_suppressor
%AU18L = left_puckerer * (1 - left_part * (1 / 2 - left_funneler * 1 / 6) - left_funneler * 1 / 4) * %left_lip_suppressor
%AU22R = right_funneler * (1 - right_part * (1 / 2 - right_puckerer * 1 / 3) - right_puckerer * 1 / 2) * %right_lip_suppressor
%AU22L = left_funneler * (1 - left_part * (1 / 2 - left_puckerer * 1 / 3) - left_puckerer * 1 / 2) * %left_lip_suppressor
%right_raiser_suppressor = (1 - 0.3 * %AU22R) * (1 - 0.5 * %AU18R) * (1 - presser) * (1 - %biter) * (1 - right_corner_puller) * (1 - 0.5 * jaw_drop)
%left_raiser_suppressor = (1 - 0.3 * %AU22L) * (1 - 0.5 * %AU18L) * (1 - presser) * (1 - %biter) * (1 - left_corner_puller) * (1 - 0.5 * jaw_drop)
%AU9R = right_wrinkler * %right_raiser_suppressor * (1 - right_upper_raiser)
%AU9L = left_wrinkler * %left_raiser_suppressor * (1 - left_upper_raiser)
%AU10R = right_upper_raiser * %right_raiser_suppressor
%AU10L = left_upper_raiser * %left_raiser_suppressor
%AU25R = %AU25R * (1 - %AU10R) * (1 - %AU9R)
%AU25L = %AU25L * (1 - %AU10L) * (1 - %AU9L)
%AU17R = chin_raiser * (1 - jaw_drop * 0.5) * (1 - %biter) * max(0, (1 - 2 * (%AU25R + %AU12AU25R + %AU18R + %AU22R + %AU10R)))
%AU17L = chin_raiser * (1 - jaw_drop * 0.5) * (1 - %biter) * max(0, (1 - 2 * (%AU25L + %AU12AU25L + %AU18L + %AU22L + %AU10L)))
%right_depressor_suppressor = 1 / (%AU18R * 0.8 + %AU22R * 0.8 + %AU17R + %biter + right_corner_puller + right_stretcher + right_corner_depressor)
%left_depressor_suppressor = 1 / (%AU18L * 0.8 + %AU22L * 0.8 + %AU17L + %biter + left_corner_puller + left_stretcher + left_corner_depressor)
%AU15R = right_corner_depressor * right_corner_depressor *
%AU32 = bite
%AU24 = presser + (1 - presser) * tightener
%AU31 = jaw_clencher * jaw_clencher / (jaw_clencher + min(jaw_drop, 1))
%AD96L = max(-mouth_sideways, 0) * (1 - 0.5 * %right_au_open) * (1 - %right_drop * jaw_drop * 0.25) * (1 - 0.5 * %biter)
%AD96R = max(mouth_sideways, 0) * (1 - 0.5 * %left_au_open) * (1 - %right_drop * jaw_drop * 0.25) * (1 - 0.5 * %biter)
%AD30L = max(-jaw_sideways, 0)
%AD30R = max(jaw_sideways, 0)
%jaw_overage = max(0, ((jaw_drop - 1) * (1 - presser) * (1 - %biter) * (1 - 0.5 * max(%right_au_open, %left_au_open))))
%jaw_underage = min(jaw_drop, 1) - %jaw_overage
%jaw_blend = jaw_drop / (jaw_clencher + jaw_drop)
%AU26R = %jaw_underage * (1 - %right_drop) * %jaw_blend
%AU26L = %jaw_underage * (1 - %left_drop) * %jaw_blend
%AU27R = %jaw_underage * %right_drop * %jaw_blend
%AU27L = %jaw_underage * %left_drop * %jaw_blend
%AU26ZR = %jaw_overage * (1 - %right_drop) * %jaw_blend
%AU26ZL = %jaw_overage * (1 - %left_drop) * %jaw_blend
%AU27ZR = %jaw_overage * %right_drop * %jaw_blend
%AU27ZL = %jaw_overage * %left_drop * %jaw_blend
%AU22ZR = max(0, (%AU22R - 1))
%AU22ZL = max(0, (%AU22L - 1))
%AU22R = min(%AU22R, 1) - %AU22ZR
%AU22L = min(%AU22L, 1) - %AU22ZL
%AU16L = %lower_lip_active * %left_lip_suppressor
%AU16R = %lower_lip_active * %right_lip_suppressor
%mouth = %AU27R * 0.5 + %AU27L * 0.5 + %AU27ZR * 0.5 + %AU27ZL * 0.5 + %AU26ZR * 0.35 + %AU26ZL * 0.35 + %AU22R * 0.35 + %AU22L * 0.35 + %AU18R * 0.25 + %AU18L * 0.25 + %AU25R * 0.35 + %AU25L * 0.35 + %AU32 * 0.5 + %AU12AU25R * 0.5 + %AU12AU25L * 0.5 + %AU16L * 0.3 + %AU16R * 0.3 + %AU10R * 0.5 + %AU10L * 0.5
%AU13R = right_cheek_puffer * max(0, (1 - %mouth * 3))
%AU13L = left_cheek_puffer * max(0, (1 - %mouth * 3))

and this

localvar left_corner_suppressor
localvar right_drop_suppressor
localvar left_drop_suppressor
localvar right_drop
localvar left_drop
localvar right_au_open
localvar left_au_open
localvar jaw_overage
localvar jaw_underage
localvar jaw_blend
%biter = bite

flexcontroller phoneme range 0 1 right_mouth_drop
flexcontroller phoneme range 0 1 left_mouth_drop
flexcontroller mouth range 0 1 right_cheek_puffer
flexcontroller mouth range 0 1 left_cheek_puffer
flexcontroller mouth range -1 1 mouth_sideways
flexcontroller mouth range -1 1 jaw_sideways
flexcontroller mouth range 0 1 lower_lip
flexcontroller eyes range -30 30 eyes_updown

This code is useless as even if you would like to make facial anims, you need to make new ones for your new model. These will not fit the new model.

Edit: It's probably not completely useless as you need to use the same names for the facial expressions with modified values. However, I'm uncertain how to make it work properly.

---------------------------------------

Texture-group parameter decided what textures the game uses during a special event, such as when a survivor gets puked on by a Boomer. If you do not have these textures, remove the texture-group lines completely.

In CD materials section, add the file path where you want the texture to be. In my case, it looks like this:

$CDMaterials "models\survivors\Caveira_Rochelle_BOPE\"
$CDMaterials ""

It doesn't have to use extra sub-folders (except of course the Caveira part where you want the textures to be found).

Make sure you set it to be the same as to what your material VMT files utilize.

If there is a:
$Model "producer" ".smd" {
}

line, add the name of the custom model on front of the .smd part. In my case, it looks like this:
$Model "producer" "R6RochelleCaveira.smd" {
}

Also remove the LOD lines. If you hadn't made a level of detail model, the character will disappear at the distance where the original model would start using the LOD variant of the model if you leave this code in. LOD model is basically how the game saves up memory by reducing the level of detail (LOD) of the model when you travel enough distannce.

In the end, you only want to remove the texture group and jiggle bone lines (unless you set something to the jiggle bones) and edit the materials and the model parts to suit your own model. Do not touch anything else unless you know what you are doing.

Hit CTRL+S to save the file. The floppy disk icons will now turn from red (file has been modified) to blue (file has been saved). Then close that.

We have our model ready, at last.

Now, we begin the final couple processes.
Setting up the textures for the game
Make sure you have VTFEdit installed.

If you do, open up the program and click "Tools". Then convert folder.

This will open up a new window. Do not touch the options button unless you know what you are doing.

Select the input folder, where your textures are located and the output folder, where you want the converted textures to be placed, most likely you want them to the same place where the original textures are.

Where it says "To VTF", add what ever the file extension of your original texture file has to the bar next to the * mark. You want to create material files of each color texture so tick the "Create VMT files" option and begin the conversion process.

This process will take some time depending on how many files there are, how big they are and how fast your computer is. Once it is ready, you should be able to interact with the program once more and the console should say that the process is finished.

Now we are ready with the conversion part.

Now, we want to adjust the material files. However, before we do that, make sure you remove any unnecessary material files, if you have normal or specular maps. Make sure you have only VMTs of the base texture which has colors. If you are done with this part, we may continue to the second part.

Make sure each VMT has the proper name of the material that you assigned to any potential part in 3D Max. For example, if your model has torso and leg materials, you want to make two VMTs which are called exactly what those materials on 3D Max are called. Even if they both use the same texture.

Remove any unnecessary materials, such as the ones made for the bump and specular maps your model might have.

---------------------------------

Here are the meanings of different map types you may come accross:


N = normal bump map, basically creates an effect that makes it look like parts of the model have depth by creating shadows in affected areas

S/SP = specular map, gives certain areas a color that is displayed when bump map is applied

CO = color (occlusion?) map, your base texture that is displayed

CA = color alpha map, used with partially transparent textures such as hair and eye lashes, you have to add $transparent command to activate the transparency

---------------------------------

Here is the content of a general VMT I use on my models:

"VertexLitGeneric"
{
"$basetexture"
"$bumpmap"
"$phongexponenttexture"
"$phong" "1"
"$phongboost" ".2"
"$phongfresnelranges" "[.3 2.65 4]"
"$ambientocclusion" "1"
"$halflambert" "1"
"$nodecal" "1"
}

basetexture is the texture you want to assign on the part where you assigned this spesific material.

bumpmap gives the model the illusion that it has a rough surface.

Phongexponenttextue is the specular map. This tells the game how different light presets appear on the surface of the model, for example, phongboost makes the model look like its soaked, depending on how big the set value is. I had it set to .2 which is basically 0.2 (you don't have to put 0 on it).

The rest is hebrew to me, although ambient occlusion is pretty self-explanitory. I haven't tried to see if the model looks different without it but considering there's no negative loss to turning it on, eave it at that. Nodecal means the model does not display blood on it if it gets shot. Good for parts or models that are non-organic.

Here's is the full list and meanings of shader commands you can add to your materials:
https://developer.valvesoftware.com/wiki/Category:List_of_Shader_Parameters

Make sure the texture paths in the material files are exactly the same where you want the texture to be. Just exclude the material name from the path as well as the file extension. Make sure also that the material uses the same path as the QC file does (make sure you didn't make it so that the QC file uses a spesific texture's path as the general texture path such as "poop/cat/hi.vtf").

If you are done with all your material files, it is time to move on.
Packing and uploading to workshop
Now that we have everything we need, it is time to compile our mod.

Open up Crowbar and go to "Compile" tab. Set the proper paths of your QC file and where you want the compiled files to be exported. Ignore everything else unless you know what to do. Then hit "Compile".

Make sure there are no erros coming up in the console. If there arer any, it can be caused even by a missing } marker in the QC file. The console tells where the issue is located to making diagnostics easier.

If everything went correctly, you should have 4 files with these extensions:

-.mdl
-.phy
-.vtx
-.vvd

Make sure the model files are located in "models/survivors" sub-folder, this cannot be user-desirable or the mod will not work. Custom sub-folders only work on materials, do not ask me why :)

Now we have our material and model folders

If you have a survivor model, make sure the mod archive will contain "models/survivors" subfolders and the materials folder contains the textures or thee sub-folders.

It is time to give the mod its finishing touches.¨

Make a text-file called "addoninfo" and add this text to it (CTRL+C / COPY and CTRL+V / PASTE):

"AddonInfo"
{
AddonTitle "NAME OF THE MOD"
AddonVersion "ADD WHATEVER AMOUNT YOU WANT HERE, I HAVEN'T EXPERIMENTED WITH THIS OPTION SO I'VE LEFT IT TO JUST 1.0"
AddonDescription "ADD WHATEVER YOU WANT TO HERE, IF YOU WANT, COPY AND PASTE YOUR WORKSHOP PAGE'S DESCRIPTION HERE"
AddonAuthor "YOUR STEAM NAME"
AddonAuthorSteamID "YOURSTEAMPROFILE'SID"
AddonURL0 "ADDON_DOWNLOAD_LINK_OR_WEBSITE_ADDRESS"

AddonSteamAppID 550
}

Edit the text inside ""-marks to your wish. Then save the text file (CTRL+S).

Without this text file, the mod will not display in the "Addons" section of the game, I'm not sure would it work at all without this.

Now that our mod is finally ready, it is time to pack it. Find the .vpk exe from which you hopefully made a shortcut of to your desktop and then drag the folder with the mod files in it onto the .exe file and wait. A CMD window pops up for a moment (depending on how much stuff it has to process) and once it is done, where you dragged and dropped the mod folder, the new .vpk file has appeared.

You might want to test if everything is alright before uploading it to workshop. Move the vpk to "addons" folder in l4d2 folder and launch the game. See if everything is as you want them to be. If everything is ready, it is time to move over to the grand finale.

Open up Left 4 Dead 2 Authoring Tools from the tools section of Steam and open up Workshop editor. From there, you will see all your potential mods listed in alphabetical order. Click the + icon to add a new addon to l4d2 workshop. Edit the content to your wish and of course include the mod. Then upload it.

Depending on your uploading speed, time to upload it to the workshop varies. If I am corect, max file size can be 500MB or else the Authoring Tools continues to upload the mod forever (according to other peope). Once the upload process is done, your default browser opens up with the mod's workshop page.

You're done! Leave a like and favorite this guide if it helped you. Here is a sack of potatoes.
Editing models in Blender 2.9+
To be added...
24 Comments
_MaZ_TeR_  [author] Aug 12, 2023 @ 3:21am 
And as for giving them all the same model, just delete all the names from the model section that gives them unique models and leave a single entry with your single custom one.
_MaZ_TeR_  [author] Aug 12, 2023 @ 3:20am 
You don't need to rename anything in Blender, the same principles work there as they do in 3D Max, just with different UI and tools. Just make sure you set up the QC file correctly and follow the model and material names you gave to your custom models.
Mike Aug 11, 2023 @ 8:50pm 
I'm following this in blender rn with Blender Source Tools. Do you know what I should do if I'm trying to replace all common infected? Do I have to copy and rename the files for every single common infected type if I want my model to apply to all of them? Or is there an easy way to replace all of them? TY for the guide.
quite_a_gecko49 Nov 13, 2022 @ 1:18pm 
can't even extract the 4 survivor files, any help?
_MaZ_TeR_  [author] Nov 29, 2021 @ 12:43pm 
I've updated the guide a bit, there's the download link directly to the download page. Not sure why I didn't link it years ago.
_MaZ_TeR_  [author] Nov 29, 2021 @ 8:27am 
It's an old tool, so no, I don't have alternative links. You should be able to find a mirror link elsewhere.
Holiness Nov 29, 2021 @ 8:16am 
VTFEdit

cant download the tool

error: 403 You don't have permission to access /index.php on this server.
do you have other link??? plz
_MaZ_TeR_  [author] Sep 26, 2021 @ 10:54pm 
It works the exact same in Blender, just some slight differences
LOGANN THE BIG ICE CREAM Sep 26, 2021 @ 5:42pm 
im not spending 1k a month do you think we all are rich
_MaZ_TeR_  [author] Jul 6, 2021 @ 11:37am 
You're welcome