How to make mods for Left 4 Dead 2

Table of contents:

Intro

If you've ever decided to download mods for a game, the Steam Workshop can make it pretty easy, and you can use an official mod-making tool to make mods like that, which is how I made some of my first mods. These mods were sound mods for Left 4 Dead 2, since I don't know how to use Blender. This guide is going to cover sounds, textures and models, as well as making addoninfo.txt and publishing your mod to the workshop. Other things, such as maps and scripts, are a bit more complex. I'll include links to Youtube videos or playlists on those, as well as videos in case you need further instruction on what I cover. Don't worry if it seems confusing, I myself was confused before doing research for this. However, I think I should go over the requirements first, and I will note which one it's for by adding (S) for sounds, (T) for textures, (Sp) for sprays or (M) for models.

Requirements

Oh, and one last thing. I'm neither a cop nor your mom, but I discourage using this knowledge for NSFW mods.

Sounds

Difficulty 2/10

Requirements:

Instructions

  1. Pick your song or sound effect of choice, and download it in WAV format.
  2. Open up Audacity, and make it the same length as the song or sound in the L4D2 files that you're replacing.
  3. Save it in a new folder with the same name as the WAV file you're replacing. EG. If you're replacing the Tank theme from the campaign finale, name it "taank.wav" and put it in modfolder/sound/music/tank/taank.wav
  4. Make a file in Notepad called "addoninfo.txt" and put it in the same folder.
  5. In the "bin" folder of the game files, you will find a file called "vpk.exe", pin it to your desktop and drag the folder to it, this will make your folder a VPK file.
  6. Put your VPK in the "addons" folder in the game files, boot up the game, and test it out.
  7. If it works, you're good to go.

Custom Sprays

Difficulty 2/10

Requirements

Instructions

  1. Go to the files and look for "left4dead2/materials/vgui/logos", make a folder there called "custom", this is where your spray will go.
  2. Get your picture ready, if it's transparent, save it as a PNG, otherwise it won't be transparent, same goes with an animated picture being saved as a GIF.
  3. Convert your picture into a VTF, via Spraygen, VTFEdit, or some other application/website, then put it in "materials/vgui/logos/custom"
  4. Open the game, and go to Options > Multiplayer, the spray should work.
  5. If not, move your spray from "custom" to "logos", restart the game, and click "Import Spray" in Options > Multiplayer, then go to "logos" and import it.
  6. Now, if you want to upload this as part of a custom spray pack, repeat this for all the pictures you'll use as part of that spray pack. Now read below...

Preparing your sprays to upload

That was for getting your spray to use yourself, however, what if you want to upload a spray pack for some reason? Well, that's why this part is being made.

  1. Make your mod folder, it should include folders called "materials" and "scripts".
  2. In "materials", make a folder called "vgui", and inside that, make one called "logos". Here's where your sprays will be, remember to add the VTFs rather than the PNGs/JPGs/GIFs.
  3. In "scripts", make a .txt file called "sprays_manifest.txt".
  4. It should look something like this...
  5. As usual, make an addoninfo.txt file and test it.
  6. Finally, if it works, your spray pack is ready to upload.

Textures

Difficulty 3/10

Requirements

Instructions

  1. Look in the game files and open pak01_dir.VPK via GCFScape.
  2. Search for the thing you're replacing the texture of in GCFScape with CTRL + F.
  3. Extract the texture files, then put them in your mod folder, using the same directory names as the original files.
  4. Open your image editor and change the textures, I like to use GIMP since it's open source, and therefore also free.
  5. Export as a TGA file, then import it to VTFEdit, click "save as", and save them as the VTF files in your mod folder.
  6. Now add addoninfo.txt to the folder.
  7. Put your mod folder into vpk.exe, which you hopefully have on your desktop.
  8. Just like before, test it out. If it works, you're ready to upload it.

Models

Difficulty 7/10

Requirements

Instructions

  1. Look in the game files and open pak01_dir.VPK via GCFScape.
  2. Extract your survivor or infected of choice.
  3. Make your mod folder, using the same directory names as the file of choice starting with the "left4dead2" folder, replacing the "left4dead2" directory with your mod folder's name
  4. Decompile the model with Crowbar, there will be multiple file types, for now you want to focus on the SMD file.
  5. Import the SMD into the 3D software. Once this is done, you don't need to repeat steps 1-5 if you're making multiple mods replacing the same survivor/infected.
  6. Get your model ready, look it up or make it.
  7. Import the model, now would also be a good time to check the textures
  8. Match the models, like scaling and such.
  9. Add some bone weights and adjust the hand so the weapon bone isn't all janky.
  10. Merge the meshes, and now you can edit the bone weights (and maybe add jiggle bones, such as to the hair [yes, they could also be in those places, ya freaks]) if you want.
  11. Now you finally export the model.
  12. Prepare the model to compile, you'll need to change a couple things in a text editor or programming/coding software like Notepad++.
  13. Compile your model with Crowbar.
  14. Edit some things in Notepad again to get the textures ready. Including making the survivor and incap icons if your model is replacing a survivor.
  15. Turn the TGA files into VTF files via VTFEdit.
  16. Now we're in the final stretch, copy the model files from the game into your mod folder, and add addoninfo.txt to your folder.
  17. Drag your mod folder into vpk.exe.
  18. Finally, test it out once more.
  19. If it works, congrats! Time to upload it.

addoninfo.txt

Your addoninfo.txt file, which goes in the mod folder, not any directories inside it, should say something like this (made a list so they're on different lines). Make it in a text editor like Notepad or Notepad++.

You can also add an image saved as addonimage.jpg as a thumbnail for your mod while still testing it out, just put it in the mod folder alongside the other directories your mod is going through and the addoninfo.txt, this is optional though.

Publishing Your Mod

Once you've tested your mod and made sure it works, the next step is to publish it to the Workshop. Here's how to do it:

  1. Open the Left 4 Dead 2 Authoring Tools.
  2. Click "Workshop Manager" then click the [+].
  3. Fill the details out, the name, description, mod thumbnail (not necessarily your addonimage.jpg, if you even added one), and categories (the checkboxes).
  4. Check "I accept the terms of the Steam Workshop Contribution Agreement" and click "Upload".

Congrats, you just uploaded your mod to the Workshop, you can now take the VPK out of the "addons" folder and subscribe to it on the Workshop, and other people can enjoy it too.