Left 4 Dead 2

Left 4 Dead 2

120 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!
< >
11 Comments
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 @ 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?
An Alaskan Bull Worm Jul 9 @ 3:33am 
so do you rename the newly created add on as the original add on and remove the original
Not Mugman Jul 8 @ 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?
peT Oct 9, 2016 @ 1:58am 
gj
SireSourd Sep 6, 2016 @ 12:07pm 
thank you so much man !
Clemie Aug 26, 2016 @ 6:16am 
I don't really understand how I should pack the VPK. I already edited my folders: Materials, Models, resource. Could everyone help me out?
Ibo Jul 14, 2016 @ 8:28am 
Tell me your windows theme :O
Linkatchu Dec 17, 2014 @ 1:03pm 
Thanks! You saved my day ;) Now i won't have that Problem anymore, to use the superb Weapon Sound Mods with superb Weapon Mods ! Thank you alot! :3