Multiplayer mapDefs and addon.conf

Multiplayer mapDefs require a bit more setup than Single Player mapDefs but are still pretty easy. The big consideration is making sure your level is compatible with autodownload support that has been added in Quake 4 1.1.

The addonPak system is virtually identical to that implemented for Doom III, just with some different mapDef keys and slightly different loadscreen support. In a nutshell, making your pk4 an addonPak will allow servers to run your map but only require players to have it installed if it is currently running.

pk4 Structure

First, let's quickly cover the pk4 directory structure. (You can create an empty pk4 file simply by creating a new .zip file in the software of your choice and changing the file extension.) Files in your pk4 need to match the directory structure they would have freely within your q4base directory:

                        -(any custom material files should fall under this path)
                        -(any custom models should fall under this path)
                        -(any custom scripts should fall under this path. Primarily SP)
                        -(any custom sounds should fall under this path.)
                        -(any custom textures should fall under this path.)


addonPaks are defined by including a file named 'addon.conf' to the base of your pk4 file. If no maps are included in the pk4, this file may be left empty:

If you do have a map or multiple maps in the pk4, this file includes an 'addonDef' entry and mapDef entries for all maps in the pk4.

Here is an example addon.conf that you can use as a base for your own map releases:

// Example Quake 4 addonDef
// Feel free to use this as a base for your own releases.

// Marks this pk4 as an addonPak for autodownload.
addonDef        {}

// mapDefs for each map present in the pk4. Use [mapname].def to define loadscreen paths.
mapDef [MAP PATH] {

        // Map name (Displayed in Server Creation window)
        "name"          "[MAP NAME]"
        // Available Gametypes (1 enables, 0 disables)
        "DM"            "1"
        "Team DM"       "1"
        "Tourney"       "1"
        "CTF"           "0"
        "Arena CTF"     "0"

[MAP PATH] should be your map's path and filename relative to q4base/maps/. All our official MP maps are in q4base/maps/mp/ (i.e. mapDef mp/q4dm3), but you're welcome to use whatever path structure you feel like (maps/nickname/, etc.) so long as it is contained within the maps/ folder.

General file naming convention in custom levels for Quake games of the past has been to use an initial or initials plus the iteration of the franchise followed by the gametype and how many maps you've made for that gametype... So for example my third CTF level might be named kfs4ctf3.

[MAP NAME] is whatever the map will be called. If you're on an uncreative streak you can always just use your map's filename or resort to references to obscure movies and/or TV shows.

You'll notice we don't specify a loadscreen here; more on that in a moment. You'll also notice a few keys are missing when compared with our official multiplayer maps' mapDef entries (Gametype_*, mp_thumb). These keys were only used for the Xbox 360 version of Quake and are not required for your own levels for the PC version. (If you've release a map with these already, don't worry, it won't hurt anything)

The .def File and Load Screen

To get your load screen working, you will need to create a new DefinitionFile with a 'duplicate' mapDef entry that points only to your loadscreen (but does not re-define any other element of the addon.conf mapDef):

// Example Quake4 mapDef with addonPak support

mapDef [MAP PATH]       {

        // Map name (Displayed on load screen.)
        "name"          "[MAP NAME]"

        // Load Screen Image
        "loadimage"     "gfx/guis/loadscreens/[LOADSCREEN IMAGE]"

Your loadscreen image should be a 512x512 TGA (and/or DDS) file - just like level textures, power of 2 images play nice with the game's renderer.

You'll also notice the map name is repeated here; this ensures that it displays correctly on the load screen instead of your map's path.

pk4 Dependencies

In the event that your pk4 is dependent on other addonPaks to function (in most cases it will not be), you can modify your addonDef to specify other pk4 files for dependency:

addonDef        {
        // Checksums for pk4 dependency.
        "[CHECKSUM]"    //[YOUR_DEPENDENCY_FILE].pk4

To find the checksum, set "developer 1" in the Quake 4 console and type "path" - this will give you a list of all pk4s and checksums (the crazy numbers/letters by the end) in the game directory, including all addonPaks:


In my example case, I have addon_test.pk4, and addon_test_assets.pk4 on which it depends. My addonDef in addon_test.pk4 would then look like this:

addonDef        {
        // Checksums for pk4 dependency.
        "0xb149cb12"    //addon_test_assets.pk4

and my addon_test_assets.pk4, containing no maps, would look like this:

The comment naming the pk4 file(s) is optional, but may help keep track of filenames in the event you have multiple dependencies.

pk4 Naming

Keep in mind that pk4s with official naming conventions (i.e. pak003.pk4) will not work with autodownload and may create conflicts with official game content if you happened to pick a number being used in a future patch. For simplicity, we recommend using a naming convention of map_mapname.pk4 (Using the above example: map_kfs4ctf3.pk4) to prevent confusion and allow easy sorting of map pak files.

Back to LevelEditor

LevelEditor MPMapDefs (last edited 2006-04-23 02:47:53 by AndrewWeldon)