Configuration System

Excessive Plus is very customizable. You can create your very own personal settings, change the weapon behavior, the gameplay, items, nearly everything to fit your needs. All these settings are saved in configuration files inside the conf/ directory, but their format is quite different from normal q3config files, so they can't be executed with the /exec command.

You can also use the pre-made configurations inside the conf/ directory.

To load a configuration, use /load yourconfig.cfg or if you are admin of a remote server /rcon load yourconfig.cfg.

Alternatively, you can set the xp_config server cvar and the config will be loaded on map change.

If there are errors while loading the file, then those errors will be printed on the console and will be visible only if you are testing in local server or the config has been loaded with with an rcon console. Additionally, if the error happens on the parsing stage, it corresponds to a syntax error, and the execution of the file is aborted and default.cfg is loaded instead.

Note: The following configurations are static and cannot be changed, to modify one of these you'll need to copy or rename it!

baseq3.cfg, default.cfg, excessive1.cfg, excessive2.cfg, excessive3.cfg, excessive4.cfg and excessive5.cfg.

Syntax overview

The syntax for the configuration system has been completely reimplemented since 1.03. In its simplest form, you can just modify the value of a bunch of configuration options, like the following:

key1 = 1;
KEY1 = 1;
k E y 1 = 1;
 
topic1->key3 = 3;
topic1 { key3 = 3; }
t o p i c 1 -> key3 = 3;
 
exec("quake_command");
 
$quake_cvar = "10";
exec("set quake_cvar 10");

Semicolons ; at the end of sentences are mandatory, but white spaces are ignored, so multiple expressions and sentences can be specified on the same line. Also, everything after double slashes // until the end of the line is a comment and is ignored. Additionally, an slash followed by an asterisk /* indicates the start of a comment, which can be spread across multiple lines until an asterisk followed by an slash */ is found.

The key names are configuration options, which can only be accessed from inside the configuration system and are not available as quake cvars. This greatly reduces the load of having lots of cvars to configure the game. Key names are case insensitive, and are also insensitive to spaces on it.

When several options are related, it's common to find them grouped inside topics or categories. To modify an option inside a category, you can access it directly by writing the category name, followed by the arrow operator -> and the key name, or alternatively you can start a block after the category with brackets { } and access multiple keys directly inside that bracket without prefixing the category name.

When an identifier begins with a dollar sign $, it's interpreted as a quake cvar, and can be used either to access its value or to set it.

To execute commands, you have to use the exec function and add the command as a parameter.

Constants

Constants are a way to encapsulate values with identifiers, so the expressions become self documenting. Its usage is optional, but it greatly increases the readability of the code. For example, consider the following example:

$xp_unlagged = 204;
$xp_unlagged = WP_MACHINEGUN | WP_SHOTGUN | WP_LIGHTNING | WP_RAILGUN;

These two sentences are equivalent, but clearly the second one is more understandable. The pipes | are or operators and they are very useful for bitmask values, so in the second line it is easily noticeable that unlagged is being enabled only for hitscan weapons.

Most of the constants are listed (and explained when necessary) in the Available Options section, so we will only list the missing ones:

  • VERSION - Excessive Plus short version string.
  • Gametype constants:
    GT_FFA              // Free For All
    GT_TOURNAMENT       // Tournament
    GT_SINGLE_PLAYER    // Single Player
    GT_TEAM             // Team Deathmatch
    GT_CTF              // Capture The Flag
    GT_RTF              // Return The Flag
    GT_1FCTF            // One Flag CTF
    GT_CA               // Clan Arena
    GT_FTAG             // Freeze Tag
    GT_PTL              // Protect The Leader

Advanced syntax

The configuration system is pretty much an scripting language by itself, so their possibilities are a lot deeper. However, to understand all of this, a certain programming background is suggested, and since we won't turn this document into a programing tutorial, we include here some sample code to cover most of this advanced features:

// this all might look like php but always keep in mind, this is not php :)
//
// but you can edit this with your favourite editor supporting php syntax
// higlighting as it almost fits perfectly.
 
// access or assign cvars, its the same as "/set sample 0"
$sample = 0;
 
// to connect strings use the dot operator
$sample = "string1" . " string2";
 
// accessing or assigning attributes
railGun {
    cycle = 1100;
}
 
// is the same as
railGun->cycle = 1100;
// or
Rail Gun    ->   C y c l e = 1100;
 
// ternary operator.. this
$sample = ( $g_gametype == GT_FFA ? 1 : 2 );
 
// is the same as
if ( $g_gametype == GT_FFA ) {
    $sample = 1;
}
else {
    $sample = 2;
}
 
// calculations of any kind
$sample = railGun->cycle * 0.5;
$sample += railGun->cycle / railGun->damage;
 
$sample *= (float)VERSION;
 
// comparsion of any complexity
if ( $g_gametype == GT_TEAM || $mapname == "q3dm1" || ($timelimit > 10 && $fraglimit <= 30 && !$capturelimit) || $g_gametype >= GT_FTAG ) {
    // do something
}
 
// there are some "functions" you can call
// if you know any others that could be useful, tell me
 
/* debug( message ) */
debug("^1will print this message \n   with \"line breaks\" \n   to the console including the line number");
 
/* include( filename ) 
 *
 * parse the config file and returns 1 if parsing was successful, 0 in case of error
 * max recursion level is 8, so avoid any deeper cyclic includes since they will fail
 **/
if ( include( "default.cfg" ) ) {
    debug( "Default settings loaded again!" );
}
 
/* match( pattern, subject )
 *
 * wildcard matching.
 *   ? - matches one character
 *   * - matches none or any amount of characters
 *  \? - matches a ?
 *  \* - matches a *
 **/
if ( match("q3dm*", $mapname) ) {
}
// is the same as
if ( $mapname ~= "q3dm*" ) {
}
 
/* in( needle, value1 [, value2...] )
 *
 * check against multiple values
 **/
if ( in($g_gametype, GT_FFA, GT_FTAG, GT_CTF) ) {
}
 
/* exec( command ) */
if ( !match("*(sample cfg)", $sv_hostname) ) {
    // would be more simple without exec()
    //$sv_hostname .= " (sample cfg)";
 
    exec('set sv_hostname "'. $sv_hostname .' (sample cfg)"');
}
 
/* modifyitem( id, classname, newClassname [ , respawnTime = -1 [ , amount = -1 [ , x, y, z ] ] ] )
 *
 * id - 0 will replace all items that match
 * classname - case insensitive, can contain wildcards like "weapon_*"
 * newClassname - case insensitive, will replace the item, use empty string to ignore
 * respawnTime - time in seconds, default -1, argument is optional
 * amount - amount given on pickup, default -1, argument is optional
 * x, y, z - will adjust the items position, only makes sense if id > 0, arguments are optional
 *
 * the complete item classname list is the following:
 *
 * ARMOR
 *   item_armor_shard          item_armor_jacket        item_armor_combat
 *   item_armor_body
 * HEALTH
 *   item_health_small         item_health              item_health_large
 *   item_health_mega
 * WEAPONS
 *   weapon_gauntlet           weapon_shotgun           weapon_machinegun
 *   weapon_grenadelauncher    weapon_rocketlauncher    weapon_lightning
 *   weapon_railgun            weapon_plasmagun         weapon_bfg
 *   weapon_grapplinghook
 * AMMO
 *   ammo_shells               ammo_bullets             ammo_grenades
 *   ammo_cells                ammo_lightning           ammo_rockets
 *   ammo_slugs                ammo_bfg
 * HOLDABLE ITEMS
 *   holdable_teleporter       holdable_medkit
 * POWERUPS
 *   item_quad                 item_enviro              item_haste
 *   item_invis                item_regen               item_flight
 * FLAGS
 *   team_CTF_redflag          team_CTF_blueflag        team_CTF_neutralflag
 **/
// replace all weapons with mega health
modifyitem(0, "weapon_*", "item_health_mega");
 
// replace second rocket launcher with bfg and place it to the given coordinates (100, 125, 520)
modifyitem(2, "weapon_rocketlauncher", "weapon_bfg", -1, -1, 100, 125, 520);
 
// change mega health to give +200
modifyitem(0, "item_health_mega", "", -1, 200);
 
// matching is always based on the original item
// so the below would just switch the locations, not removing the grenades
modifyitem(0, "weapon_shotgun", "weapon_grenadelauncher");
modifyitem(0, "weapon_grenadelauncher", "weapon_shotgun");
 
/* abs( value )
 * min( value1, value2 [, value3...] )
 * max( value1, value2 [, value3...] )
 * clamp( min, max, value )
 **/
$sample = abs(-3);		// 3
 
$sample = min(5, 9, 1, 3);	// 1
$sample = max(5, 9, 1, 3);	// 9
 
$sample = clamp(5, 9, 1);	// 5
$sample = clamp(5, 9, 45);	// 9
 
// maybe a usefull introduction to the bitwise operators
if ( startWeapons & WP_MACHINEGUN ) {
    debug("we have the machinegun");
}
 
// set all the weapons except grapple
startWeapons = WP_ALL & ~WP_GRAPPLING_HOOK;
 
// add rocket launcher to our startweapons
// yes, we have it already but unlike the '+' operator, this will not break it
startWeapons |= WP_ROCKET_LAUNCHER;
 
// remove it
startWeapons &= ~WP_ROCKET_LAUNCHER;
 
/* "switch" syntax
 *
 * we have a complex switch syntax which differs from other languages.
 *
 * we allow to modify the comparison function for each case (like ==, <, >=, ~= etc)
 * also our switch has a different fall through behaviour, see the example below
 **/
$sample = "q3dm3";
 
switch ( $sample ) {
    case ~= "q3dm*":
        debug("^2we loaded settings for all q3dm* maps");
 
        // no break here, we will fall through
 
    case ~= "q3ctf*":
        // we did fall through but this will not match!
 
        debug("^2we loaded settings for all q3ctf* maps");
 
        // no break here, we will fall through
 
    // now lets have individual settings for some maps
    case "q3dm17":
        debug("^3we loaded special settings for q3dm17");
        break;
 
    case "q3dm1":
    case "q3dm3":
        debug("^3we loaded settings for q3dm1 or q3dm3");
        break;
 
    default:
        // this will only be reached if none of the above apply, for
        // example q3dm9 will not match because it already did in
        //    case ~= "q3dm*"
        //
        // but q3tourney2 will
        debug("^1we don't know the map");
}
 
// the above is the same as
if ( $sample ~= "q3dm*" ) {
    //debug("^2we loaded settings for all q3dm* maps");
 
    if ( $sample == "q3dm17" ) {
        //debug("^3we loaded special settings for q3dm17");
    }
    else if ( $sample == "q3dm1" || $sample == "q3dm3" ) {
        //debug("^3we loaded settings for q3dm1 or q3dm3");
    }
}
else if ( $sample ~= "q3ctf*" ) {
    //debug("^2we loaded settings for all q3ctf* maps");
}
else {
    //debug("^1we don't know the map");
}
 
// there are the for, while, do..while loops.. but maybe they will be
// removed as i cant think of any use
for ( $sample = 1; $sample <= 2; $sample++ ) {
    //debug("for-loop #". $sample);
}
 
while ( ++$sample <= 5 ) {
    //debug("while-loop #". $sample);
}
 
do {
    //debug("do-while-loop #". $sample);
    $sample++;
} while ( $sample < 8 );

Configuration of config voting

You can add the xp_config string to the xp_vote cvar anytime, and that will enable the players to /callvote the config they want. However, players will be able to vote any configuration they want, even non-existant ones.

To limit this, add the conf string instead, and put all the available configurations for voting inside the file specified by the xp_voteconf cvar (voteconf.txt by default). The syntax is pretty simple, as shown in the example:

// Add configurations you want to be voted.
// /callvote conf [filename]
 
// Format: filename  description
 
baseq3.cfg		Quake III Arena (baseq3)
default.cfg		Default Settings
excessive1.cfg		Mr. Pants Excessive Overkill v001
excessive2.cfg		Mr. Pants Excessive Overkill v002
excessive3.cfg		Mr. Pants Excessive Overkill v003
excessive4.cfg		Mr. Pants Excessive Overkill v004
excessive5.cfg		Excessive Overkill v005

Available options

Here is the default.cfg with self-explaining comments of all available options:

/* Default Settings
 *
 * THESE SETTINGS ARE EXECUTED PRIOR TO CUSTOM CONFIGURATIONS
 **/
 
Config {
    /* Name of the configuration
     *
     * Full name of the config. Will be added to the xp_config server cvar and 
     * displayed on the client loading screen and scoreboard
     **/
    Name = "Default Settings";
 
    /* Some info for the config
     *
     * Just for documenting purposes since they are not accessible by any server cvar
     **/
    Date = "7 August 2009";
    Author = "easy <easy@excessiveplus.net>";
}
 
Misc {
    /* Physics
     *
     * Bitmask to modify physics behaviour. Available flags are:
     *
     * 1    PHYSICS_CONTROL_FORWARD     Enables forward physics control
     * 2    PHYSICS_CONTROL_SIDEWARD    Enables sideward physics control
     * 4    PHYSICS_CONTROL_STOP        Enables air stopping control
     * 8    PHYSICS_NO_RAMP_JUMPS       Disables ramp jumps
     *
     * A baseq3-alike physics config would have PHYSICS_NO_RAMP_JUMPS set as its value,
     * which is the same as 8, whereas a cpma-alike config would have PHYSICS_CONTROL_FORWARD | 
     * PHYSICS_CONTROL_SIDEWARD | PHYSICS_CONTROL_STOP, which is the same as 7 (1+2+4).
     **/
    //$xp_physics = PHYSICS_NO_RAMP_JUMPS;
 
    /* Unlagged
     *
     * Bitmask to turn on/off unlagged specifically for each weapon. Available
     * flags include (they are self explanatory):
     *
     * 4     WP_MACHINEGUN
     * 8     WP_SHOTGUN
     * 16    WP_GRENADE_LAUNCHER
     * 32    WP_ROCKET_LAUNCHER
     * 64    WP_LIGHTNING
     * 128   WP_RAILGUN
     * 256   WP_PLASMAGUN
     * 512   WP_BFG
     * 1024  WP_GRAPPLING_HOOK
     * 
     * 0     WP_NONE
     * 2046  WP_ALL
     *
     * If you don't want to mess with these values, a value of 1 is the shorthand for WP_ALL,
     * which delags all weapons, including all projectiles. If you prefer old unlagged for
     * which only the hitscan weapons are delagged, use instead WP_MACHINEGUN | WP_SHOTGUN | 
     * WP_LIGHTNING | WP_RAILGUN, which is the same as 204 (4+8+64+128).
     **/
    //$xp_unlagged = 1;
 
    /* Solids
     *
     * Bitmask to control how the player interacts with other solid entities on the world.
     * Available flags are:
     *
     * 1    SOLIDS_PLAYER       Removes map clips, so you have access to more places on the map
     * 2    SOLIDS_BODY         Removes collisions with other players and bodies (including
     *                          frozen ones), useful for a faster-paced game and to remove
     *                          lagged collisions for high pingers
     * 4    SOLIDS_WEAPON       Removes weapon hit tests, so weapons will not hit an enemy,
     *                          useful on trick maps
     **/
    //$xp_solids = no;
 
    /* Warmup Respawn
     *
     * Controls what is respawned at the end of warmup time. Available flags are:
     *
     * 1    WARMUPRESPAWN_PLAYERS
     * 2    WARMUPRESPAWN_ITEMS
     *
     * To reproduce 1.03, you would like to disable this option.
     **/
    //$xp_warmupRespawn = WARMUPRESPAWN_PLAYERS | WARMUPRESPAWN_ITEMS;
 
    /* You will start with this weapon in your hands
     *
     * If the weapon is not in your inventory when you respawn, then the highest available
     * weapon below your currently selected one will be used instead.
     *
     * WP_GAUNTLET
     * WP_MACHINEGUN
     * WP_SHOTGUN
     * WP_GRENADE_LAUNCHER
     * WP_ROCKET_LAUNCHER
     * WP_LIGHTNING
     * WP_RAILGUN
     * WP_PLASMAGUN
     * WP_BFG
     * WP_GRAPPLING_HOOK
     *
     * WP_LAST_USED
     **/
    Start Weapon = WP_BFG;
 
    /* Weapons in your inventory
    *
    * WP_GAUNTLET
    * WP_MACHINEGUN
    * WP_SHOTGUN
    * WP_GRENADE_LAUNCHER
    * WP_ROCKET_LAUNCHER
    * WP_LIGHTNING
    * WP_RAILGUN
    * WP_PLASMAGUN
    * WP_BFG
    * WP_GRAPPLING_HOOK
    *
    * WP_NONE
    * WP_ALL
    **/
    Start Weapons = WP_GAUNTLET | WP_MACHINEGUN;
 
    /* Your powerups on every spawn
     *
     * PW_QUAD
     * PW_BATTLESUIT
     * PW_HASTE
     * PW_INVIS
     * PW_REGEN
     * PW_FLIGHT
     *
     * PW_NONE
     * PW_ALL
     **/
    Start Powerups = no;
 
    // Duration of start powerups
    Start Powerups Duration = 30;
 
    /* Map Weapons
     *
     * WP_MACHINEGUN
     * WP_SHOTGUN
     * WP_GRENADE_LAUNCHER
     * WP_ROCKET_LAUNCHER
     * WP_LIGHTNING
     * WP_RAILGUN
     * WP_PLASMAGUN
     * WP_BFG
     *
     * WP_NONE
     * WP_ALL
     **/
    Weapons = WP_ALL;
 
    /* Map Items
     *
     * IT_ARMOR_SHARD
     * IT_ARMOR_JACKET
     * IT_ARMOR_COMBAT
     * IT_ARMOR_BODY
     * IT_HEALTH_SMALL
     * IT_HEALTH
     * IT_HEALTH_LARGE
     * IT_HEALTH_MEGA
     * IT_TELEPORTER
     * IT_MEDKIT
     *
     * IT_NONE
     * IT_ALL
     **/
    Items = IT_ALL;
 
    /* Map Ammos
     *
     * AM_BULLETS
     * AM_SHELLS
     * AM_GRENADES
     * AM_ROCKETS
     * AM_LIGHTNING
     * AM_SLUGS
     * AM_CELLS
     * AM_BFG
     *
     * AM_NONE
     * AM_ALL
     **/
    Ammos = AM_ALL;
 
    /* Map powerups
     *
     * PW_QUAD
     * PW_BATTLESUIT
     * PW_HASTE
     * PW_INVIS
     * PW_REGEN
     * PW_FLIGHT
     *
     * PW_NONE
     * PW_ALL
     **/
    Powerups = PW_ALL;
 
    /* Enables the /drop command
     *
     * DR_FLAG          Enables /drop flag
     * DR_WEAPON        Enables /drop weapon [<weaponNum>]
     * DR_AMMO          Enables /drop ammo [<weaponNum>] [<amount>]
     * DR_POWERUP       Enables /drop powerup [<name>]
     * DR_HOLDABLE      Enables /drop holdable
     * DR_ARMOR         Enables /drop armor <amount>
     * DR_HEALTH        Enables /drop health <amount>
     *
     * DR_NONE
     * DR_ALL
     **/
    Drop Enable = DR_NONE;
 
    /* Spawn protection in seconds
     *
     *   0 - No protection
     * > 0 - Dual way protection. No points or freezes for spawnkills
     * < 0 - Shield protection
     **/
    Spawn Protection = no;
 
    /* Weapon change time in milliseconds
     *
     * Settings for modifying the behavior of weapon switch time
     *
     * Converstion from 1.03
     *
     *      SwitchTime = 150;        Dropping = -150;
     *                               Raising = -1 - 100;
     *                               Ammo = -150 - 100;
     *
     *      SwitchTime = -150;       Dropping = 150;
     *                               Raising = 150;
     *                               Ammo = 150 + 100;
     **/
    Weapon Time {
        /* How long does it take to stow away the current weapon
         *
         * > 0 - Adds (value - 1) to the current time
         * < 0 - Sets (+value - 1) as the current time. This allows switching even just
         *       after firing the weapon
         *   0 - Same as 201
         **/
        Dropping = 0;
 
        /* How long does it take to pull out the next weapon
         *
         * > 0 - Adds (value - 1) to the current time. In combination with negative
         *       dropping weapon times, you can use this when you want to allow
         *       a weapon switch to bypass the weapon reload time
         * < 0 - Adds the maximum of (+value - 1) and global weapon time to the current 
         *       time, so the switch will not bypass the weapon reload time
         *   0 - Same as 251
         **/
        Raising = 0;
 
        /* Out of Ammo slowdown
         *
         * 0 - Same as 501
         **/
        Ammo = 0;
 
        /* How long does it take to start switching right after firing the weapon
         * 
         * Used only in combination with positive dropping weapon times, ignored otherwise
         *
         * 0 - Use weapon cycle time
         **/
        Shooting = 0;
    }
 
    // Multiple Air-Jumps
    Multi Jumps = no;
 
    /* DM Flags
     *
     * Miscellaneous flags to modify several aspects of the game. Available flags are:
     *
     * DM_NO_SELF_DAMAGE        Weapons don't do self damage
     * DM_NO_FALLING_DAMAGE     No falling damage
     * DM_INFINITE_HEALTH       Infinite health (can only be killed by falling or crushed)
     * DM_INFINITE_ARMOR        Infinite armor
     * DM_INFINITE_AMMO         Infinite ammo
     * DM_DROP_WEAPONS          Drop used weapon on death if it was picked up
     * DM_DROP_START_WEAPONS    Drop used weapon on death if it was an starting weapon
     * DM_DROP_HOLDABLES        Drop holdables on death
     * DM_DROP_POWERUPS         Drop powerups on death
     * DM_TELEPORT_SPEED        Keep speed when jumping into a teleport
     * DM_TELEPORT_DIRECTION    Keep the direction when jumping into a teleport
     * DM_NO_FOOTSTEPS          Disable footsteps sounds
     * DM_NO_FALLING_SOUND      Disable falling (land crashing) sounds
     * DM_NO_QUAD_KNOCKBACK     Disable quad factor effect in self knocback
     **/
    DM Flags = DM_DROP_WEAPONS | DM_DROP_HOLDABLES | DM_DROP_POWERUPS;
 
    /* Team self damage factor
     *
     * When $g_friendlyFire is on, damage inflicted to teammates will hurt ourselves by the
     * value of this option
     **/
    Team Self Damage = 0.0;
 
    // Respawn in seconds
    Respawn Time = 1.7;
 
    // If specified, replaces Respawn Time after suicide
    //Respawn Time Suicide = Respawn Time;
 
    /* Player hitbox
     *
     *   1.0 - default
     * < 1.0 - smaller box
     * > 1.0 - larger box
     **/
    Hit Box = 1.0;
 
    /* Floating Speed is a stepwise (smooth) speed adjustment used when
     * various speed factors take effect (like weapon weight or haste factor).
     * Floating Speed Rate is measured in UPS per second and it defines how fast
     * the speed will go to the final value. Null or negative rates are treated
     * as infinite (leading to one-step speed changes).
     **/
    Floating Speed Rate = 0;
 
    // Damage taken from world
    World Damage {
        Fall Medium = 5;
        Fall Far = 10;
        Lava = 30;
        Slime = 10;
        Water = 15;
    }
 
    /* Speed factor with Haste powerup
     *
     * Will be applied to player speed, weapon fire rate and weapon regeneration
     **/
    Haste Factor = 1.3;
 
    // Regen powerup amounts every second
    Regen Factors {
        // How much to increase health when it is under soft limit value
        Soft Health = 15;
 
        // How much to increase health when it is over soft limit value
        Hard Health = Soft Health / 3;
 
        // How much to increase armor when it is under soft limit value
        Soft Armor = 0;
 
        // How much to increase armor when it is over soft limit value
        Hard Armor = 0;
    }
 
    // Protection against damage with Battlesuit powerup
    Suit Factors {
        // Factor applied to damage inflicted directly
        Direct = 0.5;
 
        // Factor applied to damage provoked by splash hits
        Splash = 0;
    }
 
    // Speed fly factor with Flight powerup
    Flight Factor = 1.0;
 
    // Speed factor while swimming
    Swim Factor = 1.0;
 
    // Spawn with this amount of health, also medkit will heal the player until this value
    Health = 125;
 
    // Rot rate in milliseconds when health is over soft limit value
    Health Rot Rate = 1000;
 
    // Limit for regeneration/soft pickups
    Health Soft Limit = 100;
 
    // Maximum possible health
    Health Hard Limit = 200;
 
    // Regeneration in milliseconds
    Health Regen = no;
    Health Regen Amount = 1;
 
    // Spawn with this amount of armor
    Armor = 0;
 
    // Rot rate in milliseconds when armor is over soft limit value
    Armor Rot Rate = 1000;
 
    // Limit for regeneration/soft pickups
    Armor Soft Limit = 0;
 
    // Maximum possible armor
    Armor Hard Limit = 0;
 
    // Regeneration in milliseconds
    Armor Regen = 0;
    Armor Regen Amount = 1;
 
    Armor System {
        /* Armor System
         *
         *  0 - Regular VQ3 System
         *  1 - Quake I / CPMA System
         *  2 - Quake II System
         **/
        System = 0;
 
        /* Spawn with this Armor
         *
         * IT_ARMOR_JACKET (green)
         * IT_ARMOR_COMBAT (yellow)
         * IT_ARMOR_BODY   (red)
         **/
        Spawn Quality = IT_ARMOR_JACKET;
 
        // Limits for item pickups
        Jacket Limit = 100;
        Combat Limit = 150;
        Body Limit = 200;
 
        // Protection against damage
        Jacket Quality = 0.5;
        Combat Quality = 0.66;  // This applies for all systems, as you always have the combat armor
        Body Quality = 0.75;
    }
 
    Corpse {
        // Gib death bodys ($com_blood must be enabled)
        Gib = no;
 
        // Time in seconds until corpse dissapears
        Time = 5;
    }
 
    Missiles {
        // Made missiles destroyable by other weapons
        Destroyable = 0;
 
        // Teleport missiles through teleporters
        Teleport = 0;
    }
 
    Anti Camp {
        // Time in seconds, 0 disables camp protection
        Time = 0;
 
        // Apply camp protection to a max of this radius
        Radius = 500;
 
        // Damage to inflict every second after time is run out if the user keeps camping
        Damage = 65;
    }
 
    // Specific options for team red
    Team Red {
        Start Weapon = 0;
        Start Weapons = 0;
        Start Powerups = 0;
        Start Powerups Duration = 0;
    }
 
    // Specific options for team blue
    Team Blue {
        Start Weapon = 0;
        Start Weapons = 0;
        Start Powerups = 0;
        Start Powerups Duration = 0;
    }
 
    // Points applied if a team scores
    Team Score {
        Team = 1;
        Members = 0;
 
        Other Team = 0;
        Other Members = 0;
    }
 
    /* Tournament
     *
     * The opponent will score if you die, regardless of the way it happens
     **/
    Tournament -> Death Score = no;
 
    /* Capture the Flag
     *
     * Settings applied for flag gametypes
     **/
    Capture the Flag {
        // Auto return time in seconds
        Flag Time = 30;
 
        // Return flag on suicide
        Suicide Return = true;
 
        // Scores
        Kill Carrier = 2;
        Defend Hurt Carrier = 2;
        Defend Carrier = 2;
        Defend Base = 1;
        Defend Flag = 1;
        Flag Return = 1;
        Flag Capture = 5;
        Flag Assist Return = 1;
        Flag Assist Frag = 2;
 
        if ( $g_gametype == GT_RTF ) {
            Flag Return *= 2;
        }
    }
 
    /* Freeze Tag
     *
     * Thaw times in seconds.
     *
     *   0 - No thawing
     * > 0 - Continue the thaw
     * < 0 - Forces a restart
     **/
    Freeze Tag {
        Thaw Time = -3;
 
        Self Thaw Time = Water Thaw Time = 120;
        Lava Thaw Time = Slime Thaw Time = 5;
        Void Thaw Time = 10;
        Crushed Thaw Time = 0.001;
 
        // Distance needed to defrost your team mate
        Thaw Distance = 100;
 
        // Points for defrosting
        Thaw Score = 2;
 
        // Thaw if the frozen body touches a teleport?
        Teleport Thaw = no;
 
        /* Defrost if you reach the damage.
         * You won't get any points for that.
         *
         *   0 - Disabled
         * > 0 - You can defrost your enemys, be careful were you are shooting at
         * < 0 - Only own team
         **/
        Damage Thaw = 1000;
 
        // Freeze player if teamkilled? If disabled, player will be crushed
        Teamkill Freeze = no;
    }
 
    /* Protect the Leader
     *
     * The current leader will have these settings applied
     **/
    Protect the Leader {
        Start Health = 125;
        Start Armor = 100;
        Start Armor Quality = IT_ARMOR_JACKET;
        Start Weapon = WP_GAUNTLET;
        Start Weapons = WP_GAUNTLET;
        Start Powerups = PW_REGEN;
 
        // Scores
        Kill Leader = 4;
        Defend Leader = 1;
        Assist Kill Leader = 1;
 
        // Score on leader suicide/teamkill?
        Leader Suicide Score = yes;
 
        /* Control which player stats are cleared when he stops being the leader
         *
         * RESET_HEALTH
         * RESET_ARMOR
         *
         * RESET_NONE
         * RESET_ALL
         **/
        Reset Flags = RESET_HEALTH | RESET_ARMOR;
    }
 
    /* Round end actions
     *
     * Settings applied to all round based gametypes
     **/
    Round {
        /* Items that are reset
         *
         * IT_ARMOR_SHARD
         * IT_ARMOR_JACKET
         * IT_ARMOR_COMBAT
         * IT_ARMOR_BODY
         * IT_HEALTH_SMALL
         * IT_HEALTH
         * IT_HEALTH_LARGE
         * IT_HEALTH_MEGA
         * IT_TELEPORTER
         * IT_MEDKIT
         *
         * IT_NONE
         * IT_ALL
         **/
        Items = IT_NONE;
 
        /* Controls which player stats are cleared
         *
         * RESET_HEALTH
         * RESET_ARMOR
         * RESET_WEAPONS
         * RESET_POWERUPS
         *
         * RESET_NONE
         * RESET_ALL
         **/
        Reset Flags = RESET_ARMOR | RESET_WEAPONS | RESET_POWERUPS;
 
        // Round warmup time, only when $xp_matchmode is 2
        Warmup = 4;
 
        // Shuld players respawn after round warmup? Only when $xp_matchmode is 2
        Warmup Respawn = $xp_warmupRespawn & WARMUPRESPAWN_PLAYERS;
 
        // Call for draw when all players are dead instead of deciding with the latest frag
        Draw Enable = no;
    }
 
    Items {
        // Make items shootable
        Shootable = no;
 
        // Speed at which items will be dropped
        Drop Speed = 500;
 
        // Bounce damping factor [1...0...-1] that is equivalent to
        // [infinite bouncing...no bounce at all...infinite reflecting]
        Drop Bouncy = 0.45;
 
        // if Drop Gravity = no, then item will initially fly with no gravity
        // (straight forward) until the first bounce, and fall then
        Drop Gravity = yes;
 
        // These Attackerward drop settings control the flag dropping on death.
        // When the Attackerward Drop Speed is not null, then on death the flag will
        // be dropped right to the attacker with these speed, bouncy and gravity.
        // Certain settings are specified in the same way as for the item dropping
        Attackerward -> Drop Speed = 0;
        Attackerward -> Drop Bouncy = 0.45;
        Attackerward -> Drop Gravity = yes;
    }
}

/* Weapon Settings
 *
 * Common settings:
 *
 * - Cycle                 Weapon reload time
 *
 * - Damage                Amount of damage inflicted
 *
 * - Knockback             Damage and Knockback have been separated. You can have high damage
 *                         weapons but disable or lower the pushing effect. A negative value
 *                         will pull the player instead of pushing him. If not specified,
 *                         value is taken from Damage setting
 *
 * - Radius                Radius to apply to splash damage and for within splash and self
 *                         knockback have effect
 *
 * - Splash Damage         Max amount of splash damage to inflict, real damage will vary 
 *                         depending on the distance of the enemy to the explosion
 *
 * - Splash Knockback      Max amount of splash knockback to apply to other players. If not
 *                         specified, value is taken from Splash Damage setting
 *
 * - Self Knockback        Amount of splash knockback to apply only to self. A positive value
 *                         means radial knockback, whereas a negative value means a fixed value
 *                         regardless of the distance of the explosion. If not specified,
 *                         value is taken from Splash Knockback setting
 *
 * - Self Knockback HV     Horizontal/Vertical asymmetry control for the Self Knockback
 *                         It may vary in range [1...0...-1] and that is equivalent to
 *                         [just horizontal...symmetric...just vertical] knockback proportion
 *
 * - Self Slide Factor     Multiplier to the time to slide with no control, no friction
 *                         and no gravity after being kicked by self
 *
 * - Firing Knockback      Amount of knockback to apply to self when firing the gun, wich 
 *                         produces a kick effect
 *
 * - Firing Knockback HV   Horizontal/Vertical asymmetry control for the Firing Knockback.
 *                         Range and meanings see the Self Knockback HV description.
 *                         While standing on ground the vertical portion of firing knockback
 *                         will be not greater than (limited to) its horizontal portion
 *
 * - Team Knockback        Same as Knockback but applied to your teammates when you attack them.
 *                         If specified, it will replace the Knockback for the team attack
 *
 * - Team Splash Knockback Same as Splash Knockback but applied to your teammates when you 
 *                         attack them. If specified, it will replace the Splash Knockback
 *                         for the team attack
 *
 * - Ammo                  Amount of ammo to spawn for with that weapon
 *
 * - Ammo Limit            Limit ammo pickups up to this value
 *
 * - Regen                 Number of milliseconds for which to regenerate 1 ammo unit up to
 *                         the value of the Ammo. Weapon must not be firing to take effect
 *
 * - Sky                   If enabled, the weapon and missiles will hit the sky/black box
 *
 * - Weight                Weitgh of the weapon. Player Speed = Player Speed / Weapon Weight
 *
 * - Bounce                Number of times to bounce the shots/missiles before they explode.
 *                         A value of -1 will bounce max times alowed by the mod
 *
 * - Speed                 Only for missiles. Speed at which missiles move
 *
 * - Gravity               Only for missiles. If enabled, the missile will be affected by
 *                         gravity
 *
 * - Time To Live          Only for missiles. Number of seconds for the missile to run before
 *                         it explodes
 *
 * - Time -> *             Weapon switch time specific settings. A value of 0 for any of these
 *                         setting will use global value instead
 *
 * - Style                 Weapon style bitmask. Available flags (some weapons do have addition 
 *                         styles available, see the specific weapon section):
 *                             WPS_RAILTRAIL           Produce a rail trail (available only for
 *                                                     machinegun, shotgun and railgun)
 *                             WPS_IMPACT_MACHINEGUN   Produce a machinegun bullet impact
 *                             WPS_IMPACT_SHOTGUN      Produce a shotgun bullet impact
 *                             WPS_IMPACT_GRENADE      Produce a grenade explosion
 *                             WPS_IMPACT_ROCKET       Produce a rocket explosion
 *                             WPS_IMPACT_PLASMA       Produce a plasma explosion
 *                             WPS_IMPACT_RAIL         Produce a rail impact
 *                             WPS_IMPACT_BFG          Produce a bfg explosion
 **/
 
// Explosion produced when a player is killed, regardless of the way he dies
Suicide {
    Damage = no;
    //Knockback = Damage;
    Radius = no;
    Style = no;
    //Team Knockback = Knockback;
}
 
Grapple {
    Offhand = no;
    Cycle = 400;
    Damage = 300;
    //Knockback = Damage;
    Splash Damage = 0;
    //Splash Knockback = Splash Damage;
    Radius = no;
    Self Damage = 0.5;
    //Self Knockback = Splash Knockback;
    Self Knockback HV = 0.0;
    Self Slide Factor = 1.0;
    Firing Knockback = 0;
    Firing Knockback HV = 0.8;
    //Team Knockback = Knockback;
    //Team Splash Knockback = Splash Knockback;
    Speed = 2000;
 
    // Release the hook in seconds
    Time = 10;
 
    Pull Speed = 800;
 
    /* Grapple Style
     *
     * WPS_GRAPPLE_ROPE     You will swing around like hanging on a rope
     **/
    Style = 0;
 
    // The hook is auto-released if you receive at least this amount of knockback
    // (negative==infinite). However the hook is always released with any self knockback
    Breaking Knockback = 0;
 
    Gravity = no;
    Sky = no;
    Time to Live = 10;
    Weight = 1.0;
    Firing Weight = 1.0;
    Time -> Dropping = 0;
    Time -> Raising = 0;
    Time -> Shooting = 0;
}
 
Gauntlet {
    Cycle = 400;
    Damage = 50;
    //Knockback = Damage;
    //Team Knockback = Knockback;
    Weight = 1.0;
 
    // How long-distance is the gauntlet attack (in game units, while a player is normally 30x30x56)
    Distance = 32;
 
    /* Gauntlet Style
     *
     * WPS_GAUNTLET_DYNAMIC_WEIGHT  Gauntlet Firing Weight will be applied only while
     *                              you are contacting with ground or swimming
     **/
    Style = 0;
 
    Firing Weight = 1.0;
    Time -> Dropping = 0;
    Time -> Raising = 0;
    Time -> Shooting = 0;
}
 
Machinegun {
    Cycle = 100;
    Damage = ( $g_gametype != GT_TEAM ? 7 : 5 );
    //Knockback = Damage;
    Splash Damage = 0;
    //Splash Knockback = Splash Damage;
    Radius = no;
    Self Damage = 0.5;
    //Self Knockback = Splash Knockback;
    Self Knockback HV = 0.0;
    Self Slide Factor = 1.0;
    Firing Knockback = 0;
    Firing Knockback HV = 0.8;
    //Team Knockback = Knockback;
    //Team Splash Knockback = Splash Knockback;
    Regen = no;
    Ammo = 100;
    Ammo Limit = 200;
    Style = WPS_IMPACT_MACHINEGUN;
    Bounce = no;
 
    // Machinegun spread factor
    Spread = 200;
 
    // Use radial spread? If disabled, it will use quadratic spread (old mods before 1.29)
    Radial = yes;
 
    Sky = no;
    Weight = 1.0;
    Firing Weight = 1.0;
    Time -> Dropping = 0;
    Time -> Raising = 0;
    Time -> Ammo = 0;
    Time -> Shooting = 0;
}
 
Shotgun {
    Cycle = 1000;
    Damage = 10;
    //Knockback = Damage;
    Splash Damage = 0;
    //Splash Knockback = Splash Damage;
    Radius = no;
    Self Damage = 0.5;
    //Self Knockback = Splash Knockback;
    Self Knockback HV = 0.0;
    Self Slide Factor = 1.0;
    Firing Knockback = 0;
    Firing Knockback HV = 0.8;
    //Team Knockback = Knockback;
    //Team Splash Knockback = Splash Knockback;
 
    // Number of pellets that come out from a single shot
    Pellet Count = 11;
 
    // Shotgun spread factor
    Spread = 700;
 
    // Use radial spread? If disabled, it will use quadratic spread (default)
    Radial = no;
 
    Regen = no;
    Ammo = 0;
    Ammo Limit = 200;
    Style = WPS_IMPACT_SHOTGUN;
    Bounce = no;
    Sky = no;
    Weight = 1.0;
    Firing Weight = 1.0;
    Time -> Dropping = 0;
    Time -> Raising = 0;
    Time -> Ammo = 0;
    Time -> Shooting = 0;
}
 
Grenade Launcher {
    Cycle = 800;
    Damage = 100;
    //Knockback = Damage;
    Splash Damage = 100;
    //Splash Knockback = Splash Damage;
    Radius = 150;
    Self Damage = 0.5;
    //Self Knockback = Splash Knockback;
    Self Knockback HV = 0.0;
    Self Slide Factor = 1.0;
    Firing Knockback = 0;
    Firing Knockback HV = 0.8;
    //Team Knockback = Knockback;
    //Team Splash Knockback = Splash Knockback;
    Regen = 0;
    Speed = 700;
    Ammo = 0;
    Ammo Limit = 200;
 
    /* Grenade Launcher Style
     *
     * WPS_GRENADE_STICKY   Grenades will stick to walls, like mines
     **/
    Style = WPS_IMPACT_GRENADE;
 
    Bounce = -1;
    Gravity = yes;
    Time to Live = 2.5;
    Sky = no;
    Weight = 1.0;
    Firing Weight = 1.0;
    Time -> Dropping = 0;
    Time -> Raising = 0;
    Time -> Ammo = 0;
    Time -> Shooting = 0;
}
 
Rocket Launcher {
    Cycle = 800;
    Damage = 100;
    //Knockback = Damage;
    Splash Damage = 100;
    //Splash Knockback = Splash Damage;
    Radius = 120;
    Self Damage = 0.5;
    //Self Knockback = Splash Knockback;
    Self Knockback HV = 0.0;
    Self Slide Factor = 1.0;
    Firing Knockback = 0;
    Firing Knockback HV = 0.8;
    //Team Knockback = Knockback;
    //Team Splash Knockback = Splash Knockback;
    Regen = no;
    Speed = 900;
    Ammo = 0;
    Ammo Limit = 200;
 
    /* Rocket Launcher Styles
     *
     * WPS_ROCKET_GUIDED    Allows to control the rocket with your mouse
     * WPS_ROCKET_HOMING    Rocket will hunt your enemys
     **/
    Style = WPS_IMPACT_ROCKET;
 
    // Rocket launcher homing factor (only for WPS_ROCKET_HOMING style)
    Homing Factor = 0.3;
 
    Bounce = no;
    Gravity = no;
    Time to Live = 15;
    Sky = no;
    Weight = 1.0;
    Firing Weight = 1.0;
    Time -> Dropping = 0;
    Time -> Raising = 0;
    Time -> Ammo = 0;
    Time -> Shooting = 0;
}
 
Lightning Gun {
    Cycle = 50;
    Damage = 8;
    //Knockback = Damage;
    Splash Damage = 0;
    //Splash Knockback = Splash Damage;
    Radius = no;
    Self Damage = 0.5;
    //Self Knockback = Splash Knockback;
    Self Knockback HV = 0.0;
    Self Slide Factor = 1.0;
    Firing Knockback = 0;
    Firing Knockback HV = 0.8;
    //Team Knockback = Knockback;
    //Team Splash Knockback = Splash Knockback;
    Regen = no;
    Ammo = 0;
    Ammo Limit = 200;
    Style = no;
    Sky = no;
 
    // Lightning gun beam length
    Range = 768;
 
    // Lightning gun bounce. THIS WILL CRASH ALL CLIENTS WITHOUT MOD!
    Bounce = no;
 
    Weight = 1.0;
    Firing Weight = 1.0;
    Time -> Dropping = 0;
    Time -> Raising = 0;
    Time -> Ammo = 0;
    Time -> Shooting = 0;
}
 
Railgun {
    Cycle = 1500;
    Damage = 100;
    //Knockback = Damage;
    Splash Damage = 0;
    //Splash Knockback = Splash Damage;
    Radius = no;
    Self Damage = 0.5;
    //Self Knockback = Splash Knockback;
    Self Knockback HV = 0.0;
    Self Slide Factor = 1.0;
    Firing Knockback = 0;
    Firing Knockback HV = 0.8;
    //Team Knockback = Knockback;
    //Team Splash Knockback = Splash Knockback;
    Regen = no;
    Ammo = 0;
    Ammo Limit = 200;
    Style = WPS_RAILTRAIL | WPS_IMPACT_RAIL;
    Bounce = no;
    Sky = no;
    Weight = 1.0;
    Firing Weight = 1.0;
    Max Hits = 4;
    Time -> Dropping = 0;
    Time -> Raising = 0;
    Time -> Ammo = 0;
    Time -> Shooting = 0;
}
 
Plasma Gun {
    Cycle = 100;
    Damage = 20;
    //Knockback = Damage;
    Splash Damage = 15;
    //Splash Knockback = Splash Damage;
    Radius = 20;
    Self Damage = 0.5;
    //Self Knockback = Splash Knockback;
    Self Knockback HV = 0.0;
    Self Slide Factor = 1.0;
    Firing Knockback = 0;
    Firing Knockback HV = 0.8;
    //Team Knockback = Knockback;
    //Team Splash Knockback = Splash Knockback;
    Regen = no;
    Speed = 2000;
    Ammo = 0;
    Ammo Limit = 200;
 
    /* Plasma Gun Styles
     *
     * WPS_PLASMA_SPLIT     Adds 3 plasma streams
     **/
    Style = WPS_IMPACT_PLASMA;
 
    // Plasmagun spread (only for WPS_PLASMA_SPLIT style)
    Spread = 300;
 
    Bounce = no;
    Gravity = no;
    Time to Live = 10;
    Sky = no;
    Weight = 1.0;
    Firing Weight = 1.0;
    Time -> Dropping = 0;
    Time -> Raising = 0;
    Time -> Ammo = 0;
    Time -> Shooting = 0;
}
 
BFG {
    Cycle = 200;
    Damage = 100;
    //Knockback = Damage;
    Splash Damage = 100;
    //Splash Knockback = Splash Damage;
    Radius = 120;
    Self Damage = 0.5;
    //Self Knockback = Splash Knockback;
    Self Knockback HV = 0.0;
    Self Slide Factor = 1.0;
    Firing Knockback = 0;
    Firing Knockback HV = 0.8;
    //Team Knockback = Knockback;
    //Team Splash Knockback = Splash Knockback;
    Regen = no;
    Speed = 2000;
    Ammo = 0;
    Ammo Limit = 200;
 
    /* BFG Styles
     *
     * WPS_BFG_PANTS    Mr. Pants' Excessive
     * WPS_BFG_SOD      SoD MoD
     **/
    Style = WPS_IMPACT_BFG;
 
    /* Grenade Settings
     *
     * Only valid if WPS_BFG_PANTS or WPS_BFG_SOD is set
     **/
    Grenade Count = 7;        // valid for WPS_BFG_PANTS only, WPS_BFG_SOD will always use 4
    Grenade Damage = 80;
    //Grenade Knockback = Grenade Damage;
    Grenade Splash Damage = 200;
    //Grenade Splash Knockback = Grenade Splash Damage;
    Grenade Radius = 80;
    //Grenade Self Knockback = Grenade Splash Knockback;
    Grenade Style = WPS_IMPACT_GRENADE;
    //Grenade Team Knockback = Grenade Knockback;
    //Grenade Team Splash Knockback = Grenade Splash Knockback;
 
    Bounce = no;
    Gravity = no;
    Time to Live = 10;
    Sky = no;
    Weight = 1.0;
    Firing Weight = 1.0;
    Time -> Dropping = 0;
    Time -> Raising = 0;
    Time -> Ammo = 0;
    Time -> Shooting = 0;
}

Inner loading of other configs

You can load another config inside your own config file with the following syntax :

/* include( filename )
*
* parse the config file and returns 1 if parsing was successful, 0 in case of error
* does not limit the recursion level, so avoid any cyclic includes
**/
if ( include( "default.cfg" ) ) {
    debug( "default settings successfully loaded !" );
} else {
    debug( "ERROR : default settings could not be loaded !" );
}

An altenative is by issuing a :

exec("load default"); 

But with exec(), the config will be loaded after your config will be processed by the engine. With include(), it will be processed wherever you place it in your code.