Editing .pak

From Quake Wiki

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 
'''.pak''' is Quake's container file format. It is an exceedingly simple uncompressed archive format (collection of folders & files) which preserves file paths and that's about it. There are many [[Quake_tools#PAK_Editors|tools for working with .pak files]].
 
'''.pak''' is Quake's container file format. It is an exceedingly simple uncompressed archive format (collection of folders & files) which preserves file paths and that's about it. There are many [[Quake_tools#PAK_Editors|tools for working with .pak files]].
  
== Overview ==
 
 
PAK files are commonly used to store data to be loaded by a Quake game [[engines|engine]]. The data may include graphics, objects, textures, sounds, and other game data.
 
PAK files are commonly used to store data to be loaded by a Quake game [[engines|engine]]. The data may include graphics, objects, textures, sounds, and other game data.
  
Line 9: Line 8:
  
 
PAK files are typically named ''pak0.pak'', ''pak1.pak'', ''pak2.pak'', and so on. The [[pak0.pak]] which comes with Quake and lives in the ID1 folder is required by all Quake game engines.
 
PAK files are typically named ''pak0.pak'', ''pak1.pak'', ''pak2.pak'', and so on. The [[pak0.pak]] which comes with Quake and lives in the ID1 folder is required by all Quake game engines.
 
== File precedence ==
 
[[File:Quake_File_Folders_Hierarchy.png|right|200px|caption]]
 
Since a file might exist in the same path in multiple pak files and the game directories (ID1 and mod), precedence is important to know about.
 
 
Consider a map <code>maps/start.bsp</code> existing in the following files and paths:
 
* <code>id1/pak0.pak:maps/start.bsp</code>
 
* <code>id1/pak1.pak:maps/start.bsp</code>
 
* <code>mod/pak0.pak:maps/start.bsp</code>
 
* <code>mod/maps/start.bsp</code>
 
 
Generally the engine will prefer the one from the last PAK file in the path hierarchy, so in this case the file from the mod's <code>pak0.pak</code>.
 
 
But some modern engines will actually prefer a file outside PAK files over PAK files in the same mod path. So for example [[FTE]], [[Darkplaces]] or [[QuakeSpasm-Spiked]] will use the unpacked <code>mod/maps/start.bsp</code> which (editor's subjective opinion) is infinitely more reasonable.
 
  
 
== Format specification ==
 
== Format specification ==

Please note that all contributions to Quake Wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see Quake Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)