Server Guide
From PromodeWiki
Basic Challenge ProMode Dedicated Server Guide
April 2008
This guide is intended for people looking for info on using dedicated servers for local bot play as well as new server administrators looking for information on CPMA server configs. The current version of this guide focuses on Linux, Windows users have to change paths/binary accordingly.
For Linux users: This basic guide doesn't work well for multiple servers on one machine. Each Quake 3 server has to use an unique homepath, otherwise logging (and punkbuster) won't work properly. A guide for multi server environment will follow if I have the time or someone else writes it.
Contents |
Preparations
A working and fully patched (Pointrelease 1.32c) Quake 3 installation is presupposed. All paths we use are examples and might differ from your installation. In our example the Quake 3 installation is located in "/usr/local/games/quake3".
By the way, a Quake 3 dedicated server doesn't need a CD Key!
CPMA installation
Unpack the Mod into the Quake 3 directory (e.g. /usr/local/games/quake3). If done correctly there should now be a cpma sub-directory ("/usr/local/games/quake3/cpma"). Mappacks (the pk3 files) always go to the baseq3 directory, otherwise other Mods can't use them.
Important: ALL CPMA mappacks are mandatory for CPMA servers, otherwise the server doesn't start!
Download links for all CPMA mappacks can be found on [http://www.promode.org].
Even MORE important: Server admins should always read the changelog.
It contains useful information regarding changes! (hence it's name)
CPMA Updates
Updating CPMA is easy. Just unpack the new version and transfer all changed files to your server. Be careful not to overwrite any existing configs (like map configs or maplists). There should be only the most recent version of z-cpma-pakXXX.pk3 (the mod) in your CPMA directory. Older pk3s should be deleted, otherwise clients without those files get kicked from the server for being unpure. Don't forget to read the changelog.
q3config.cfg (Quake 3's standard config) and dedicated servers
Quake 3 always writes a q3config.cfg which sometimes pollutes your server configuration (especially after map start). It's a common config pollution and is a real pain in the a**. You can prevent Quake 3 writing its q3config.cfg by creating an empty q3config.cfg and by removing write access to it. The q3config.cfg is located in the baseq3 and cpma directory of your Quake 3 installation (Windows only). On Linux, these directories are located in the user's homeshare (e.g. /home/master/.q3a). All log files and the punkbuster installation go here. Keeping your installation clean is mandatory!
Info: Challenge Q3 (CQN3) doesn't write a q3config.cfg
Starting the dedicated server by command-line
./q3ded +set dedicated 2 +set fs_game cpma +set fs_basepath <path> +set fs_homepath <path> +set com_hunkmegs 30 +set net_port 27960 +exec <cfg>
Explanation
- +set dedicated
- 1 = LAN (no communication with master server), 2 = Internet server, communicates with master server
- +set fs_game
- Q3 starts CPMA as mod
- +set fs_basepath
- Path to your Quake 3 installation (important for linux users!, e.g. /usr/local/games/quake3)
- +set fs_homepath
- Path to your Homeshare, important for linux users, logs/configs go here (e.g. /home/master/.q3a/cpma)
- +set sv_punkbuster
- Punkbuster sucks (and needs special configuration for linux). CQN3 (Challenge Q3) users can ignore this
- +set com_hunkmegs
- How much MB the server is allowed to use, for 1v1/2v2 servers with small maps, 12 is sufficient, TDM/CTF should use 24/30, CA servers should use even more. If you set this too low, the server crashs with an ERROR: Hunk_Alloc failed.
- +set net_port
- If you run more than one server on one box, each server needs its own port (e.g. 27960, 27961).
- +exec <config>
- Executes the server configuration file (e.g. cpma_server.cfg)
Server configuration file (short: server config)
CPMA doesn't need "special" configuration because most gameplay settings are standardised. The following example config is very basic but should be sufficient for most installations. Just copy the content in a text file and save it as "cpma_server.cfg". Put the config into your cpma directory. Details on all variables can be found on this Wiki or the CPMA documentation (CPMA/docs/server.txt)
// ==============================
// STARTUP
// ==============================
set sv_pure "1"
set sv_strictAuth "0"
set bot_enable "0"
set dmflags "0"
set osp_gamename "1"
set server_chatfloodprotect "2"
set sv_maxRate "25000" // Higher values possible but consider the servers bandwidth (bytes/sec per client)
set sv_allowdownload "1"
set server_customclient "10"
set sv_lanForceRate "0" // Never set to 1 on an internet server!
// ==============================
// SERVER
// ==============================
set server_record "0"
set server_gameplay "CPM"
set server_altgraphics "1"
set server_maxpacketsmin "100"
set server_maxpacketsmax "125"
set server_gfxspecfile "none"
set server_ratemin "6000"
set server_optimiseBW "1"
set server_motdfile "motd.txt" // I'm using my own motd.txt file, the file goes into your cpma dir.
set map_cfgdir "mapcfgs" // Default is "cfg-maps", it's a SubDir of CPMA, I've changed it,
// so it's impossible to overwrite Mapconfigs by accident
// (e.g. during an update)
set log_pergame 1
sets ".Administrator" "Guess Who?" // As shown in server browser, not necessary but sometimes useful
sets ".Email" "admin@some-domain.fqdn" // As shown in server browser, not necessary but sometimes useful
sets ".URL" "http://some-domain.fqdn" // As shown in server browser, not necessary but sometimes useful
// ==============================
// ADMIN
// ==============================
set ref_password "<change>"
set rconPassword "<change>"
set sv_privateClients "0"
set filter_file ""
// ==============================
// VOTING
// ==============================
set g_allowVote "1"
set vote_percent "51"
set vote_limit "3"
// =============================
// GENERAL
// =============================
set g_inactivity "0"
set g_gametype "3"
set sv_hostname "Great server for sure!"
set admin_log "./logs/tdm_admin.log"
set g_password "none"
set sv_maxclients "14"
// ==============================
// TEAMPLAY
// ==============================
set team_maxplayers "5"
set team_allcaptain "0"
set g_teamAutoJoin "0"
set g_teamForceBalance "0"
set g_friendlyFire "1"
set match_hurtself "1"
set match_readypercent "100"
set server_availmodes "1v1 2v2 HM CTF PUBCTF NTF FFA TDM"
set mode_start "TDM"
map cpm21
//EOF