Left 4 Dead 2

Left 4 Dead 2

133 ratings
Editing VPK's
By Doktor haus
So, you downloaded my latest super-awesome mod, but it has sounds, icons or something else you don't want. Since I'm not going to upload 500 different versions of the same mod to please everyone, why not learn how to remove it yourself?

What you can do:
  • change/remove HUD icons
  • change/remove scripts
  • change/remove sounds
  • change materials (VMT's)
  • change textures (VTF's)
  • remove part of a model assigned to one material

What you can't do (without recompiling):
  • switch/edit animations
  • remove part of a model assigned to multiple materials
  • move parts of a model around
  • make one survivor replace another
 
Rate  
Favorite
Favorited
Unfavorite
Setup
Download and install these:

GCFScape.[nemesis.thewavelength.net]

Left 4 Dead 2 Authoring Tools



Make sure you run Model Viewer at lease once before continuing.


Now we're done with model viewer and authoring tools; you can close them.

Let's make things as simple as possible. Once you associate VPK's with GCFScape, any time you double-click one, it will open using that program. Find any VPK, right-click it and choose Open with... > Choose default program.

Select GCFScape and make sure "always use the selected program" is checked on.

If GCFScape isn't here, click browse to manually locate its EXE file.

Navigate to your Left 4 Dead 2 tools directory. It's usually in
C:\Program Files (x86)\Steam\SteamApps\common\Left 4 Dead 2\bin

Right-click vpk.exe and select "create shortcut". Now cut (ctrl + x) and paste (ctrl + p) it into
C:\Program Files (x86)\Steam\SteamApps\common\Left 4 Dead 2\left4dead2\addons
Unpack the VPK
Addon VPK's are in your addons folder and the workshop crud you're subscribed to is in addons/workshop. Simple, right?

If it's from the workshop, go to addons/workshop and look at the JPG images. If you see a picture of a big fat turd on the workshop mod you want to edit, find that JPG of a big fat turd in addons/workshop. Its filename consists of a bunch of numbers. The VPK with the same set of numbers is the one you want, so cut+paste that into addons then unsubscribe from it on the workshop.

Either way, find the VPK you want to edit and double-click that biznatch. Drag and drop the "root" folder wherever you want (I recommend addons). If GCFScape sheets itself and crashes, right-click the "root" folder and choose extract.

All VPK's are extracted as the "root" folder, so you may want to rename it afterwards.
Remove some shi t
Open your newly-extracted addon folder (called "root" if you've been a dummy and haven't renamed it). Don't move shi'ht around unless you know what you're doing. Anyway, if you don't want the sounds, delete the sound folder. If you don't want the icons, delete scripts. You get the picture.
Optional: Make sh it invisible with $no_draw 1
What if you want to remove a super awesome scope because it's totes not realisitc, bro? Read on.

Open root/materials and find the material (VMT) of the model you want to hide. All you have to add is "$no_draw 1". Here's an example.
VertexLitGeneric { $no_draw 1 $baseTexture "models/v_models/weapons/trh1911/laserdot" }
These are the only lines you need; you can delete any others. Just make sure to retain both brackets { } or L4D2's console will swear at you.
Pack the VPK
If you've payed attention so far and made a shortcut to vpk.exe, now all you have to do is drag & drop your addon (root) folder onto the shortcut and it will be packed into a VPK in the same directory as the folder.

That's it! Merry Christmas/Hanukkah/Kwanzaa/Festivus/Flyingspaghettimonstermas to everyone!
< >
16 Comments
Left4lol2 May 25 @ 11:39pm 
how do i edit the weapon Animations?
nov3 - twitch.tv/bruno93 Mar 18 @ 10:29am 
it really works! but the outline still showing the original model, so its a little bit annoying, can i remove those parts from the outline too? (sorry my bad english)
Rionell Feb 16 @ 9:10am 
Thanks so much for this guide! It's easy to follow and learn. I'm interested in learning how to make one survivor replace another though, do you think you'll make a guide for that sometime or know a guide that teaches it? Many modders create awesome character mods but it's a shame that we can't pick which survivor it mods, so it would be great to learn so we can assign it ourselves.
itschaboy21 Jan 27 @ 7:12am 
I know I'm a bit late but...THANK YOU DOCTOR!
2B 世界の重さ Nov 26, 2017 @ 8:04pm 
I just made a escape music mod...but the loop is terrible...when the music start it sounds good....after the music was about to loop it will start in the middle of the song and not at the beginning...how can i fix this?
Johnsonville Sausage™ Nov 11, 2017 @ 5:22pm 
So i'm trying to get rid of the menu icons for http://steamcommunity.com/sharedfiles/filedetails/?id=1171884937 , because theyre stupid. and after reading this guide i wasn't sure what to pin down to make it work. help pls.
StormChaser Sep 16, 2017 @ 8:09pm 
So i'm trying to hide a scope that's ruining an otherwise perfect weapon, i tried your "$no_draw 1" thing and it (just the scope) is now just completely white, any ideas?
jaundice gang Jul 9, 2017 @ 3:33am 
so do you rename the newly created add on as the original add on and remove the original
Arvo Jul 8, 2017 @ 12:57pm 
I'm unable to pack the VPK due to errors.
"The procedure entry point StackToolsNotify_LoadedLibrary could not be located in the dynamic link library C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\bin\vpk.exe."
"The procedure entry point ThreadGetCurrendProcessld could not be located in the dynamic link library C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\bin\vstdlib.dll."
Cynical Uke Dec 7, 2016 @ 3:22pm 
Thanks. This has helped me a lot with several mods so far.

Though I do have one question: Is it possible to change the weapon a mod was originally made to modify?
As in, if a mod replaces the hunting rifle, can I edit the vpk to make it so that the mod replaces the military rifle instead?