Left 4 Dead 2

Left 4 Dead 2

125 ratings
How to Mod Textures
By мяFunreal
Want to learn how to make Texture mods?
   
Award
Favorite
Favorited
Unfavorite
Requirements
Before you start; here's a list of software you will need:

  • Crowbar
  • GCFScape* (Crowbar works aswell.)
  • L4D2 Authoring Tools (Steam Library)
  • VTFEdit*
    Alternatively, VTFEdit Reloaded[github.com]. Same tool, but more functions.
  • Image editing program, such as Photoshop, Gimp or Paint-net
  • VTF Plugin for Photoshop 32bit*, Gimp[www.tophattwaffle.com] or Paint-net*

Nem'sTools website where GCFScape, VTFEdit, Photoshop VTF plugin and Paint-net VTF Plugin can be downloaded is down.
Here's[nemstools.github.io] a Github Clone instead.
If the clone is down; HERE[gamebanana.com] is a gamebanana submission which acts as an archive for his tools.
GCFScape is in: Nem's Tools Archives\GCFScape\gcfscape131.zip
VTFEdit is in: Nem's Tools Archives\VTFEdit\vtfedit125-11.zip
The Paint-net plugin is in: Nem's Tools Archives\Others\pdnvtfplugin111-source.zip
The Photoshop plugin is in: Nem's Tools Archives\Others\psvtfplugin1011.zip
Getting files to modify
All textures are in the pak01_dir.vpk files, which can be opened with GCFScape and Crowbar.
Some things like L4D1 players, M60, Golfclub and general L4D1 content are part of the DLC. those are in their respective DLC pak files.


Survivors are in "Materials/Models/Survivors"
L4d1 ones are in the DLC1 pak01_dir.vpk, same folder location.
Infected are in "Materials/Models/Infected"
Guns are in "materials/Models/V_Models, W_models
Melee weapons are in "Materials/models/Weapon/Melee"
M60 and golfclub are also in the DLC1 pak01_dir.vpk
Carryable items are in the materials/models/props_junk
TLS skins are in the "Update" pak01

If you don't know the location of some item, but someone made a mod of it, download their addon and unpack it to check what file has been changed, then fetch the original file from the pak01_dir.vpk.

If you cannot find the files, you can try using Ctrl+F in GCFScape to search for a keyword that might appear in the name.
Using Hammer and Crowbar to find textures
If you could not find the material in GCFScape, you might try this step here.
If you did find the textures, skip this step entirely.

If the name search in GCFScape doesn't help, you can use Hammer map editor's (Part of SDK/Authoring Tools) model browser to search for the model instead.
Make a new empty map, then open Tools - Model browser
In the filter field enter some words that might be in your modelname.



In case you still cannot find the model that way, you can just decompile the map and go to where the model is located, double click on the entity and check what name it has.



The materials are usually in the same folder, but within the materials folder.
Model is: "models/props_urban/big_wheel001.mdl"
Texturtes are: "materials/models/props_urban/big_wheel001.vmt + .vtf"

If you found the model, but the materials are not where you expected them, open the model with Crowbar. The "View" tab shows you where the material folder is.
You can easily open mdl files in Crowbar if you assigned mdl files to always open with crowbar. that allows you to double click the mdl inside of GCFScape and have Crowbar open


In the example above the texturename has the entire folder tree in it. Usually that part only has the actual VMT name, while the line above would have the folder tree. But it doesn't matter.
Pre-building the addon
In order for your mod to actually modify the game files, you must create an addon.

First make a folder with whatever name you want the addon to have later.
I'll call mine "Prop_Bigwheel_Reskin"
Inside that folder you will re-create the original foldertree. Then put your files in there.
In this example, the VMT and VTF files were found in "Materials/Models/Props_Urban"


The "Root" folder (in my case "Prop_Bigwheel_Reskin") needs an addoninfo.txt file.
For texture mods it does one single thing: it makes the addon show up in the addon menu.
Its entire content will be ignored when some downloads the mod via workshop. Users will get the description of the workshop submission instead.
Here's a prebuilt addoninfo that has everything a texture mod needs:
"AddonInfo" { addonSteamAppID 550 //L4D2 Don't Change addontitle "ADDON_NAME" //Name for Addon Menu addonversion 1 addonauthor "AUTHOR_NAME" addonauthorSteamID "AUTHOT_STEAM_ID" //Optional. the number of your steam profile URL addonDescription "DESCRIPTION_GOES_HERE" }

You could also have an addonimage.jpg file. It's a thumbnail for the addon menu.
It is also ignored when downloaded via steam workshop and mods work without it.

But if you really want one, import a 128x128 jpg into VTFedit, compress it as DXT5 and then export it as "addonimage.jpg". Only VTFEdit compressed jpegs work.
Converting VTF to TGA
If you have a VTF Plugin for your image editor, Skip this step. Otherwise continue.

Most image editors cannot open VTF files, that's why using a plugin is reccomended. But just in case your software doesn't have that plugin, or you don't know how to use it, here's a guide on how to do it without that plugin.

Open the VTF file in VTFEdit.
Click "File - Export" or press Ctrl+E



Then pick any folder where you want to temporarily save the TGA file. I like to put mine right next to the VTF file, but it does not matter.
Editing Texture
Open the VTF or TGA file in the image editor of your choice.

You can now do whatever you want to the image.
The only tip i would give you is "Do not use actual black, only use dark colors"
Because even in real life, black color can still get shadows on it that are darker, but if your texture is already the darkest color your screen can display, your model can't get shadows in that black part. This will look strange.

Also, there's a bunch of different textures you can pull off.
Translucent, Glowing, Moving, Animated...
Here is info about glowing textures.
Here is info about translucent textures.

There's way more info on the VDC, but i won't link all relevant pages.
Saving Texture
When you're happy with your changes, save it as a VTF Texture, replacing the original file.
Reccomended settings are DXT5 format with the "Anisotropic" and "No Level of Detail" flags.
BGR888 and BGRA8888 are uncompressed formats, for when you do not want any compression. But they come with a massive file size.


IF you have no VTF plugin, save as TGA instead.
Unless your texture uses an alpha channel. In that case export the texture as a DDS file instead, because TGA sometimes doesn't export the alpha channel (at least for me, gotta find out yourself I guess)

Open VTFEdit again and hit "File - Import" or click CTRL+ i
After picking the file you are prompted to select your settings, i reccomend leaving it at default.


Texture flags, such as "Anisotropic" and "No Level of Detail" can be set by clicking the checkboxes on the left hand side. Then save the VTF.
Packing the addon.
For the addon to work, you must pack it into a vpk file. Crowbar can do that for you.
Just open crowbar in the "Pack" tab and drag your Root folder onto it and press the "pack" button.


Alternatively, you can make a right-click promt. I made a guide about that already.
https://steamproxy.net/sharedfiles/filedetails/?id=1544981726

You'll get a vpk file that holds the same name as your root folder.
This vpk file can now be dragged into your addons folder, located in steamapps\common\Left 4 Dead 2\left4dead2\addons.

That's all.
Closing words
If you need more help, join the Dead 4 Mods Discord server[discord.gg].
21 Comments
мяFunreal  [author] 29 Jul @ 4:04am 
i compiled a whole new model and loaded that in hlmv.
DVI 28 Jul @ 3:30pm 
how did you made it so there's a correct preview of a texture? Or you photoshopped it so it looked more understandable?
Kludo 24 Sep, 2023 @ 7:13am 
Oki, thanks for the help
мяFunreal  [author] 24 Sep, 2023 @ 6:57am 
that would do it :v
Btw, you don't need a "vmt editor" it's just a text file. I personally use notepad++ wit hth eVMT syntax highlighting.
Kludo 24 Sep, 2023 @ 6:21am 
Well, thanks for the help and the reason google wasnt helping was because my absolute dumbass was putting "with VTFEdit" in the search and not a vmt editor.
мяFunreal  [author] 24 Sep, 2023 @ 6:11am 
shiny as in "mirror finish"?
$envmaptint"[]" in the VMT makes it less reflective.

Also, I find it funny how you said google isn't helping, even though I literally said at the very finish of the guide where to go if you need help.
Furthermore, the BEST website for any kind of info on the source engine, the Valve Developer Wiki, is also linked in this guide.

So either you flat out lied and didn't even try to use google, or you really do not know how to use google at all.
Kludo 24 Sep, 2023 @ 5:25am 
Well it works now but its too shiny for my liking, any idea how to fix this?, because google isnt giving me any help.
мяFunreal  [author] 24 Sep, 2023 @ 1:43am 
Well then that means you packed the mod and it realizes that it should be altered, but it just can't read the files you gave it.
Perhaps you used VTFEdit to make VTF version 7.5, which L4D2 cannot read. use 7.4 instead.
Kludo 23 Sep, 2023 @ 7:18pm 
I love how whenever I try editing a texture and putting it back into Left For Dead 2 it just shows as a missing error.
Enu 5 Apr, 2023 @ 6:09am 
Thanks for your guides my lord.
Through these complex branchesss.