Left 4 Dead

Left 4 Dead

Not enough ratings
Making Custom Textures
By Detera
This will guide you through the process of making a custom weapon texture from scratch.
   
Award
Favorite
Favorited
Unfavorite
What you will need.
Note: This guide simply goes over the process of extracting textures from the game and reimporting the modified images back into Left4Dead. I do not go into much detail about actually editing the texture as making your own texture is something you can play around with.

To make custom textures from scratch, you will need a couple of programs..

GCFScape[nemesis.thewavelength.net] to extract the unmodified textures from Left 4 Dead
VTFEdit[nemesis.thewavelength.net] to convert .vtf (valve texture file) files into files you can edit, and back again.
Any program to edit image files, such as photoshop. http://www.getpaint.net/download.html is a very good free alternative.
Any good text editor such as Notepad++[notepad-plus-plus.org].
Important: Do NOT use regular windows notepad or wordpad, as they can break the formatting in the .pak files and can cause your game to not work without a clean installation.
Extracting Textures
For this guide I will be modding my autoshotgun. Weapons are the easiest textures to modify as they are the simple, but changing any texture in the game will follow the same steps.

You should only ever need to do this once.

Open your left 4 dead directory
>SteamApps\common\left 4 dead\left4dead
Find and open the filed pak01_dir.vpk with GCFScape, and extract the 3 folders (materials, models, particles) into your left 4 dead directory, merging all the folders. This extraction could take a few minutes.
Editing textures
Left 4 Dead, along with all other source games, use .vtf format for textures. However .vtf files may not be modified, and must be converted into .tga before they can be edited.

Browse to:
>left4dead\materials\models\v_models\weapons\autoshot

This is the directory for the autoshotgun texture.

Open the .vtf file with VTFEdit, and go file>export as a .tga.
Open the .tga with your favourite image editor and modify the texture the way you want:
I am not going to go into detail on how to use image editors. If you are curious on how to use these tools effectively, you can find plenty of tutorials online.

The following is how I will change my texture file:

This is an attempt to show you what parts of the texture file apply to where on the gun:

When you save the texture, make sure you save it with a Different name the same length as the original. or this will not work. For example, I am saving my file 'm5super.tga' instead of 'm4super.tga'.
Reconvert into .vtf
Open VTFEdit and import your newly modified .tga file. (file > import)
When the 'VTF Options' window pops up, just hit OK and go with default settings.
Under the 'flags' boxes, check 'No Level of Detail' (it makes the texture uneffected by resolution settings. AKA: It looks better).
Go file > save as, and save as m5super.vtf
(if you are changing a different texture, just make sure the name is the same length of the original file name, but don't use the original name.)
Go to Tools > Create VMT File and save m5super.vmt in the same directory as your .vtf file. (with the same name, of course)
Making an Addon
Installing custom textures in other source games, you can simply replace the .vtf file with your new .vtf file in the game's folder, however left 4 dead uses an addon system, which can be convienent for toggling addons on and off at will, but can also be semi-annoying for textures.

Make a folder on your desktop with the name of what you want the addon to be called. In that folder, create subfolders that replicate where you got your .vtf file from in the Left4Dead folder. Make sure everything is placed EXACTLY how you found it.

For example

I got my m4super.vtf from
>left4dead\materials\models\v_models\weapons\autoshot
So I made the folder and subfolders..
>Desktop\RDAutoshotgun\materials\models\v_models\weapons\autoshot
Make sure every file you have is in the correct subfolder.

Every addon also needs an addoninfo.txt file in it's root directory. Make a new text file and modify the following to fit your needs.
This is the addoninfo.txt used in my addon:
// The addoninfo.txt file is a metadata file that is required by all Source Engine Add-ons. "AddonInfo" { addonSteamAppID 500 // 500 is the app ID for Left 4 Dead addontitle "RDAutoShotgun" // Add-on title that shows up in Add-ons list addonversion 1.0 // Version number of add-on version addontagline "RDAutoShotgun" // Short Description addonauthor "Askumi" // Author's name //The following are optional and used to provile download links of your addon if applicable. addonSteamGroupName "The Procrastinators" addonauthorSteamID "" addonContent_Campaign 0 addonURL0 "" // short description that appears in the Add-on list screen... addonDescription "RDAutoshotgun" }

Browse to
>SteamApps\common\left 4 dead\bin
Note: this is left 4 dead\bin, not left 4 dead\left 4 dead\bin
drag your addon folder onto 'vpk.exe' to convert it into addon format. Move your addon into
>left 4 dead\left 4 dead\addons
Getting your addon to work
In order to get your addon to load properly, you must tell the game to look for your newly created texture instead of the default one. Because we modified the file 'm4super' and saved it as 'm5super' we need to change the reference to the texture in the game.

Go to your Left4Dead directory and edit pak01_dir.pak with notepad++. do NOT edit this file with windows notepad, otherwise it will break your game when you save it. It is a very good idea to back up this file just in case! Do a search for 'm4super'. You should find the line
$baseTexture "models\v_models\Weapons\autoshot/m4Super"
twice in the file, on or around lines 26838 and 26852.
Change this line to
$baseTexture "models\v_models\Weapons\autoshot/m5Super"
and save the file.

Launch the game, and turn your addon on by going into extras > addons in Left4Dead

If everything worked, you should be able to see your new texture in game.

Good luck and happy modding!
8 Comments
Detera  [author] Aug 9, 2021 @ 3:30pm 
Hey Republic.
When you're making the .vpk file, you just need to drag the folder containing your addon files onto vpk.exe, located in \left 4 dead\bin. A window should pop up and disappear, this is normal. After this, your newly created vpk file should appear in either the \left 4 dead\bin directory or the directory containing the root folder of your addon files, I don't recall which.
If you don't see your .vpk file, you probably have an error in your folder names. Double check this part of the guide here:


Make sure everything is placed EXACTLY how you found it.

For example

I got my m4super.vtf from
>left4dead\materials\models\v_models\weapons\autoshot
So I made the folder and subfolders..
>Desktop\RDAutoshotgun\materials\models\v_models\weapons\autoshot
Make sure every file you have is in the correct subfolder.[/1]
THE REPUBLIC 501 Aug 8, 2021 @ 9:44am 
any one ?????
THE REPUBLIC 501 Aug 7, 2021 @ 5:42am 
HEY....IAM HAVING TROUBLE WITH MY VPK FILE TO TURN MY FILES INTO ADDONS...BUT WHEN I OPEN THE VPK IT INSTANTLY CLOSES ANY SUGGESTIONS PLEASE!!!:steamsad:
THE REPUBLIC 501 Jul 25, 2021 @ 5:36am 
fantastic guide....thanks:steamthis:
[deleted] Aug 3, 2018 @ 9:10pm 
Great guide, I would never have the patients but glad there are people out there like you that do.
greymatter0001 May 10, 2014 @ 8:37am 
Good tutorial, retarded product.
bacon Mar 16, 2014 @ 3:15am 
nice
{xvc} ƒяεεѕтуlαz Nov 16, 2013 @ 11:03pm 
nice