PAK



For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.
PAK file formats are package formats previously used by GoldSrc engine games to store content. It was first introduced in
Quake engine which GoldSrc subsequently adopted it. Unlike Quake, GoldSrc prioritizes loose files over those found in a PAK.
This was changed during the WON/Retail to Steam transition in 2003, when the game files were stored inside GCF files located in ...\Steam\steamapps\username\
folder. Since the 2013 SteamPipe update, the game file have been stored directly to the filesystem (example: ...\SteamApps\common\Half-Life\valve
), as opposed to Source and Source 2 engines (which continued to packing game files inside multiple VPK files after SteamPipe transition) as most modern systems are fast enough to load GoldSrc game files quickly.
As of today, the Steam version of Half-Life, along with other GoldSrc games are still able to load the .pak
file despite longer being used to store vanilla game files.




Structs

This work is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License; version 2 as published by the Free Software Foundation. This work is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See version 2 of the GNU General Public License for more details.
C code from
common/qfiles.h
in the original Quake II development tools:
#define IDPAKHEADER (('K'<<24)+('C'<<16)+('A'<<8)+'P')
typedef struct
{
char name[56];
int filepos, filelen;
} dpackfile_t;
typedef struct
{
int ident; // == IDPAKHEADER
int dirofs;
int dirlen;
} dpackheader_t;
#define MAX_FILES_IN_PACK 4096


