Quake 3 pk3 loading

A description of how pk3 files are loaded by quake 3 and in what order – taken from my posts on various forums

First off a pk3 file is just a zip file with a different extension. A program like winrar is great for examining the contents without actually unzipping it first.

pak0.pk3, pak1.pk3, pakX.pk3 (where X is a number) are standard quake pk3 files that contain all the game data such as models, maps and sounds.

When quake starts up it looks in baseq3 for any pk3 files. The ones it finds will be loaded in alphabetical order, so if two pk3 files contain the same named file the one which is loaded will come from the pk3 file with the latest alphabetical name. This is why id software released extra pakX.pk3 files with newer point releases – they just contain updates/additions to pak0.pk3 so as not to redistribute the whole 450mb!

The most common thing for mod developers to rewrite is the virtual machine files for game, cgame and ui. These 3 files (cgame.qvm, ui.qvm, game.qvm) are stored in the vm within a pk3 file. A mod like Nemesis needs to assure its pk3 file is loaded last which is why it is prefixed with zzz-, just like osp pk3 files.

Extra pk3 files may get loaded (servers running 1.11 don’t force this) when you join a server which is running something other than standard quake 3. Mod folders are stored in a directory alongside baseq3 (i.e damned_arena) and when you join a server running a particular mod, it’s pk3 files are also loaded.

For example, if I had zzz-nemesis-core.pk3 in a freezeplus mod directory quake 3 would start and act as normal. When I joined a server running freezeplus, Nemesis would get loaded from the pk3 file and I would be able to use it’s commands.

Maybe this explanation will shed some light for some people. I hope you realise you don’t often need to delete every pk3 file to get a particular mod to work, just rename them correctly or remove only the ones with similar files (e.g. a map pk3 will hardly ever interfer with a cgame modification like nemesis).

Leave a Reply

Your email address will not be published. Required fields are marked *

Security Question * Time limit is exhausted. Please reload the CAPTCHA.