Difference between revisions of "VPK"

From Valve Developer Community
Jump to: navigation, search
m (corrected comment about usage in vmtb)
Line 1: Line 1:
VPK files are used in [[Left 4 Dead]] instead of [[GCF]]s, apparently something closer to [[NCF]]s. Valve has stated these have supplanted GCFs and NCFs.[http://nemesis.thewavelength.net/index.php?c=254&o=0#c3055]. The VPK.exe is a command line tool located in <Steam folder>\steamapps\common\left 4 dead\bin\vpk.exe.
+
'''VPK''' ("Valve Pak") files are uncompressed archives used to package content (never code). They are the successors to [[GCF]]s, and when passed to the <code>addoninstaller</code> tool are also used to distribute add-ons like custom campaigns.
  
A different VPK file format was originally used in [[Vampire the Masquerade: Bloodlines]], an early Source game.
+
== VPK tool ==
  
==VPK.exe Commands==
+
VPKs can be created with the [[command line]] tool <code>vpk</code>, found at <code><game>\bin\</code>. It is currently available in [[Left 4 Dead (engine branch)|Left 4 Dead]] branch games only.
Its commands are as follows:
 
  
*vpk dirname
+
When you create a VPK source files like TGA, QC and VMF are discarded, as are executables.
:Creates a pack file named <dirname>.vpk located in the parent of the specified directory.
 
*vpk x vpkfile filename1 filename2 ...
 
:Extract file(s).
 
*vpk a vpkfile filename1 filename2 ...
 
:Add file(s).
 
*vpk a vpkfile @filename
 
:Add files listed in a response file.
 
*vpk k vpkfile keyvalues_filename
 
:Add files listed in a keyvalues control file.
 
*vpk l vpkfile
 
:List contents of VPK.
 
*vpk L vpkfile
 
:List contents (detailed) of VPK.
 
Options:
 
*-v Verbose.
 
*-M Produce a multi-chunk pack file
 
  
==MISC==
+
=== Commands ===
Left 4 Dead and Left 4 Dead 2's vpk's are multi-chunk files. If you are looking to extract the contents of those VPK's, extract the pak01_dir.vpk. This will extract the contents of all of the vpk files.
+
 
 +
; <code><dirname></code>
 +
: 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".}}
 +
; <code>x <vpkfile> <filename1> <filename2> ...</code>
 +
: Extract file(s).
 +
; <code>a <vpkfile> <filename1> <filename2> ...</code>
 +
: Add file(s).
 +
; <code>a <vpkfile> @<filename></code>
 +
; <code>k vpkfile <filename></code>
 +
: 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 (<code>C:\etc\</code>) intact - is there a way to avoid this?}}
 +
; <code>l <vpkfile></code>
 +
; <code>L <vpkfile></code>
 +
: List contents of VPK. Uppercase 'L' means more detail.
 +
; <code>-v</code>
 +
: Verbose output.
 +
; <code>-M</code>
 +
: 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 ==
 
== See also ==
  
*[[VPK File Format]]
+
* [[VPK File Format]] (technical details)
 
* [[L4D Campaign Add-on Tutorial]]
 
* [[L4D Campaign Add-on Tutorial]]
 +
* [[Swarm Campaign Add-on Tutorial]]
  
 
+
[[Category:Modding]]
[[Category:Left 4 Dead]]
 
 
 
[[Category:Left 4 Dead]]
 

Revision as of 09:00, 22 July 2010

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 games only.

When you create a VPK source files like TGA, QC and VMF are discarded, as are executables.

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.png Bug: If the location is outside the game's folder, the file will just be called ".vpk".
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.png Bug: They will appear inside the VPK with their full path (C:\etc\) intact - is there a way to avoid this?
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