Left 4 Dead 2
Оцінок: 273
Editing VPK's
Автор: Zaeryn
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
3
   
Нагородити
До улюбленого
В улюблених
Прибрати
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 ♥♥♥♥♥ 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!
Коментарів: 25
CS2 is Rubbish 11 лют. о 12:14 
How to edit vpks on latest CS2 update? Does anyone can edit them?
trcsdaec 25 серп. 2023 о 11:35 
Noel 1 січ. 2023 о 1:33 
Thanks man def helped me out
Church 10 лип. 2020 о 10:50 
thank you so much for this! was able to follow your instructions and it worked
Spaghetti with too much sauce 7 черв. 2020 о 21:35 
when i drag and drop it says error file does not exist.
Antknee 3 листоп. 2019 о 12:33 
When you say in the same directory at the end, what do you mean by that? I drop the folder into my vpk.exe and it just says some stuff about filesize and nothing else, i cant find the vpk made from that "root" folder
nodraw 19 жовт. 2019 о 3:52 
Thank you very much. Great guide. Its actually quite easy if you pay attention.
Red Tiger 30 квіт. 2019 о 4:43 
Followed all the steps but each time I drag an edited "root" to the vpk shortcut, it always says "tier0.dll" is missing. I tried to reinstalling and verifying but it still said the same issue.

Any help with this?
★JΛKΣ★ 7 квіт. 2019 о 0:25 
Works like a charm. Cheers, mate!
Left4lol2 25 трав. 2018 о 23:39 
how do i edit the weapon Animations?