KatsBits Community

Quake 4 "addon.conf" configuration file

kat · 1 · 8748

0 Members and 1 Guest are viewing this topic.

Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2709
    • KatsBits
IMPORTANT NOTE: Quake 4 custom maps created on and for the PC version of the game cannot be played, nor are they compatible with the XBox 360 version of Quake 4; levels needs to be specially compiled for the XBox 360



The addon.conf file used to get custom Quake 4 maps to load up and display properly in the in game map list menu is actually one of two files that you need in order for this all to work. The two files are;

Code: [Select]
mapname.def
addon.conf

mapname.def
After the 1.1 update (which was actually moved up to 1.2) custom maps needed to use a 'new' file called 'addon.conf'. However, not all the information needed to list a map fully in game is present in that file so mappers and modders still need to make use of the [mapname].def file which essentially only now holds information to do with loadscreen images and thumbnails.

The following is a typical example of a map list *.def file (you replace '[mapname]' with the name of your images and map);

Code: [Select]
mapDef
mp/[mapname]
{
"loadimage" "gfx/guis/loadscreens/[mapname]"
"mp_thumb" "gfx/guis/mainmenu/thumb_[mapname]"
}

Note the file path which indicates the locations you should put the images you need to use; 'loadimage' is the larger load screen seen when a map loads and should be a *.TGA file sized to 512x512 pixels. To save confusion it's always best to name the images the same as the map file; if you get a 'no show' in game, check the file names are the same. Place in;
 
Code: [Select]
installation/path to/Quake 4/q4base/gfx/guis/loadscreens/
installation/path to/Quake 4/q4base/gfx/guis/mainmenu/

Quote
Design note: when taking the screen shot it'll be in 'screen' dimensions, i.e. 800x600 which means when you resize it to 512x512 it'll distort slightly. Don't readjust or edit the image to try and compensate for this when looking at the 512x512 load image because once it loads into the menu it'll get re-stretched back to the correct proportions.

The mapname.def files need to go in a folder called 'def' and should be named with the same name applied to the map file itself. So if you had a map called;
  • "too_much_rust.bsp"
The *.def would need to be called;
  • too_much_rust.def
And placed in;
  • installation/path to/Quake 4/q4base/def/
Quote
Design note: make sure you don't have any space in the names used for anything to do with the mapname.def file; use underscores '_' where necessary rather than leaving spaces.

addon.conf
The addon.conf file is the most important of the two files as this contain all the details to do with the game type information the game uses to list the map fully in the menu.A typical addon.conf files looks like the following;

Code: [Select]
addonDef
{
// if this PK4 uses other '3rd party'
// PK4 files then their 'checksums'
// need to be listed below
"0xdf3223a"
}
mapDef   mp/[mapname*]
{
"name"   "[mapname**]"
"DM"   "1"
"Team DM"  "0"
"Tourney"  "1"
"CTF"   "0"
"Arena CTF"  "0"
}

Quote
Design note: * is the actual name of the *.map file itself; e.g. "kat_q4dm2.map" - note the extension is not actually required
** is the name of the map as it appears in the map list in game; e.g. "Kat's Cradle". The two can be the same but more often than not they are different depending on the map and mapper.

Make sure that any MP maps you create that are not part of any mods are placed in the following location;

Code: [Select]
q4base/maps/mp/[mapname]
 The various 'tags' "DM", "Tourney" etc. denote game types that map has been built to support; they're simply 'yes/no' checks so the game knows what modes the map will play in by default.

Quote
Design note: the old ""Gametype_Deathmatch" "1"" etc. information you may see in some older mapdefs and addon.conf's (pre 1.2/1.2 updates) are configuration parameters that are exclusive to the XBox 360 and as such are redundent for the PC version of the game. It's best to remove them altogether to save confusion and potential problems in the future (although official word is that leaving them in shouldn't be a problem).

Unlike the *.def file above, the addon.conf file doesn't use the same name as the map file itself, it remains 'addon.conf'. It is however, placed in a different location, needing to be in the 'root' q4base folder of Quake 4's installation directory like this (it basically goes in the same place you'd normally put the readme that accompanies your map - q4base/readme.txt);
 
Code: [Select]
installation/path to/Quake 4/q4base/addon.conf
 Once you've done all this just pack up the files into a PK4 and you should find the file now lists and works correctly in 1.2 patch Quake 4 and above (doesn't work with default unpatched Quake 4).

Complete set Using our example map, "too_much_rust", and having done all the changes above, we should end up with two text files as follows;

addon.conf file in q4base/addon.conf
Code: [Select]
addonDef
{
// if this file uses other '3rd party'
// PK4 files then their 'checksums'
// need to be listed below
"0xdf3223a"
}
mapDef
mp/too_much_rust
{
"name"   "too_much_rust"
"DM"   "1"
"Team DM"  "0"
"Tourney"  "1"
"CTF"   "0"
"Arena CTF"  "0"
}

Click here to download a sample addon.conf

mapname.def file in q4base/def/too_much_rust.def
Code: [Select]
mapDef
mp/too_much_rust
{
"loadimage" "gfx/guis/loadscreens/too_much_rust"
"mp_thumb" "gfx/guis/mainmenu/thumb_too_much_rust"
}

Click here to download a sample mapname.def file

For more details on using the addon.conf file read through the following resources;
Also worth mentioning here is a community measure to have a centralised location from where auto downloaded files can be sought whilst in game (the game will auto seek the missing files from this depository);
  • Quake 4 map repository for servers >>