Vpk.exe
VPK ("Valve Pak") files are uncompressed archives used to package content (never code). They are the successors to GCFs, and when passed to the addoninstaller
tool are also used to distribute add-ons like custom campaigns.
VPK tool
VPKs can be created with the command line tool vpk
, found at <game>\bin\
. It is currently available in Left 4 Dead branch and Alien Swarm branch games.
When you create a VPK source files like TGA, QC and VMF are discarded, as are executables.
Also is possible to pack files into .vpk archive by downloading "Left 4 Dead (2) VPK Creator (VPK.EXE)" from http://www.mediafire.com/?mydymgjgjd0 . Just need to drug folder with files onto vpk.exe and wait till archive will be created in directory from what folder was druged. It's doesn't matter how much parts have original archive, it still can be replace with name "pak01_dir" in L4d 2. For extracting need to use GCFSpace also by choosing "pak01_dir.vpk".
Commands
<dirname>
- Creates a new VPK in the directory given, containing the contents of that directory. Must be an existing location. Alternatively, drag a folder onto the tool in Explorer to trigger this command.
Bug:If the location is outside the game's folder, the file will just be called ".vpk". [todo tested in ?]
x <vpkfile> <filename1> <filename2> ...
- Extract file(s).
a <vpkfile> <filename1> <filename2> ...
- Add file(s).
a <vpkfile> @<filename>
k vpkfile <filename>
- Add files listed in a response file ('a' - note the @) or a keyvalues file ('k').
Bug:They will appear inside the VPK with their full path (
C:\etc\
) intact - is there a way to avoid this? [todo tested in ?] l <vpkfile>
L <vpkfile>
- List contents of VPK. Uppercase 'L' means more detail.
-v
- Verbose output.
-M
- Produce a multi-chunk VPK that is split across several files and has an index. To inspect a multi-chunk VPK look at the '_dir' file.
See also
- VPK File Format (technical details)
- L4D Campaign Add-on Tutorial
- Swarm Campaign Add-on Tutorial