Author | m00m1n <m00m1n at mousepotato.org> |
Version | 1.1 |
Updated | 23 March, 2005 |
This document is a rough guide to setting up a Defrag 1.91 server. It is not intended as an alternative to the documentation included with the Defrag 1.91 distribution. For more information on any of the Defrag features, cvars or settings mentioned, please see the docs directory in your Defrag installation directory.
This document is a work in progress, so please direct comments and suggestions to me at the email address above.
I've tried to make this as simple as possible to make it useful to as many people as possible - novices to experts - so my apologies if I am teaching you to suck eggs :)
All you need is:
If you haven't already done so, install Quake III and the latest point release. I'm not going to write a tutorial on that :)
Next unzip the Defrag 1.91 distribution zip in the Quake III installation directory, which will extract to a directory called 'defrag' (make sure you extract with folders). Once extracted, your directory tree should look something like this:
Obviously if you're on Linux and using the command line, it wont look much like that at all - but the directory structure will be the same :)
Wow, that was easy :)
Ok, let's hit the nitty gritty already. Defrag is configured like any other Quake III mod, using configuration variables (cvars). In this document, cvars are indicated in red, and values are indiciated in green.
Note: This document is for dedicated servers. If you are running a non-dedicated server, you can also configure the server through the 'Defrag Setup' menu in the Defrag user interface.
First things first, we need to create a configuration file for your server. Open up your favourite editor (notepad will do) and save the following basic configuration in a new file called 'server.cfg' in your 'defrag' directory:
seta sv_hostname "My new Defrag server!" // The name of your server, shown in ASE/Gamespy etc. seta rconpassword "mysecretpassword" // Your remote console password .. keep it secret! seta sv_maxclients "8" // The maximum number of players that can join your server seta sv_floodprotect "0" // Quake III flood protection - I leave it disabled seta sv_fps "125" // This *must* be set to 125 seta pmove_fixed "1" // This *must* be set to 1 seta df_gametype "0" // Game type (see below) seta df_promode "0" // Physics (see below) seta df_ndm_weaponsSet "2046" // Custom weapons set (see below) seta df_ndm_interferenceOff "3" // Player interference (see below)
That in itself is enough for a basic Defrag server. Now lets look at what we can tweak :)
Defrag 1.9 has a total of six different game types, and a special automatic configuration mode. To set the game type, set df_gametype to the appropriate value.
Game type | value |
---|---|
Auto config | 0 |
Single player defrag mode | 1 |
Single player tricks mode | 2 |
Single player fastcaps | 3 |
Multiplayer defrag mode | 5 |
Multiplayer tricks mode | 6 |
Multiplayer fastcaps | 7 |
The best way of running a dedicated Defrag server is in it's automatic configuration mode. In this mode, Defrag will decide itself which game type is appropriate for the map.
Note: Due to the nature of the Quake III engine architecture, Defrag cannot detect a multiplayer game type unless Quake III is running as a dedicated server. If you are running your server as a non-dedicated server, you will need to set the appropriate game type manually.
The game can be customized further by using df_mode in conjunction with df_gametype and df_ndm_weaponsSet. For more information, consult the Defrag documentation. For now, we will set df_mode to 0 (custom settings) so that df_ndm_weaponsSet is enabled (next section).
Another benefit to Defrag's auto configuration mode is that when in Defrag mode, the law of the mapper is obeyed - and players are only provided with weapons that have been specified by the mapper. However in tricks mode and fastcaps mode we can select which weapons players receive by using the cvar df_ndm_weaponsSet.
The configuration for df_ndm_weaponsSet is a little more advanced than most other cvars, but it's not complicated. Each weapon is assigned a value, and you pick a set of weapons by adding the values for the weapons you wish to enable.
Weapon | Value |
---|---|
Gauntlet | 2 |
Machine Gun | 4 |
Shotgun | 8 |
Grenade Launcher | 16 |
Rocket Launcher | 32 |
Lightning Gun | 64 |
Rail Gun | 128 |
Plasma Gun | 256 |
BFG | 512 |
Grappling Hook | 1024 |
For example: to enable all weapons, you would set df_ndm_weaponsSet to 2046 (2+4+8+16+32+64+128+256+512+1024) . Or to enable just the Rocket Launcher and the Grenade Launcher, you would set df_ndm_weaponsSet to 48 (16+32).
Also, you can choose to enable normal item spawning by setting df_ndm_itemsSpawn to 1, and normal weapon pickups by setting df_ndm_weaponsPickup to 1.
Defrag cannot automatically decide which physics are appropriate for a map, you must specify this yourself. Set df_promode to 0 for vanilla Quake III physics, or 1 for Promode physics. The physics can be changed whilst the server is running by setting df_promode or by calling a vote (/callvote df_promode 0|1) - but you must restart the current map or load a new one for the change to take effect.
To enable overbounce and client framerate independent jump heights, the server framerate should be set to 125 frames per second (sv_fps 125) and pmove should be enabled (pmove_fixed 1). By default pmove should already be enabled.
You may want to raise or lower the maximum player limit with sv_maxclients depending on the power and bandwidth of your server. Note that a server with a higher framerate uses more bandwidth.
You may also wish to prevent chat spamming by enabling flood protection (sv_floodprotect 1), although this can be perceived as anti-social.
A new option in Defrag 1.9 allows players to co-exist with minimal interference, allowing us to selectively prevent both player and weapon interference using the cvar df_mp_interferenceOff.
Interference | Value |
---|---|
All interference on | 0 |
Player interference off | 1 |
Weapon interference off | 2 |
Player and weapon interference off | 3 |
It's widely known that Quake III has problems dealing with a large number of PK3's at one time (usually resulting in the engine crashing), but there is hope. It is possible to 'repack' all of the Defrag map PK3's and consolidated them into just a handful of PK3's. Note that this is not advised for a client, as you may encounter problems with older scripts and textures potentially overwriting newer ones - but for a server, this is not a problem (in fact, for a server you can repack only the bsp's).
Note however, that if you repack your PK3's you will need to disable auto download (sv_allowdownload 0), otherwise clients with auto download enabled (cl_allowdownload 1) will end up downloading your repacked pk3's - causing them problems, and sucking your bandwidth.
Defrag includes a tool (WinQ3Repack in the misc/tools directory) to automatically repack for you, but if you want to repack your PK3's manually or you are running Linux (for which we have not yet provided a repacker) you can. Just extract them into directories according to their initial letter (using Winzip or some other Zip archiver - PK3's are just Zip files with a .pk3 extension) and zip up the new directories and give the zip files .pk3 extensions. You can then place these zip files into baseq3 or the Defrag installation directory and all the maps will be available to your server.
Ensure however, that you extract the pk3's into the same directory as shown below:
And not like this:
Otherwise it simply won't work :)
Under Windows, open notepad and enter the following:
@echo off set NET_IP=192.168.1.50 set NET_PORT=27960 set DEDICATED=1 set CONFIG=defrag-mp.cfg set Q3_HOME="d:\games\quake iii arena" cd %Q3_HOME% quake3.exe +set fs_game defrag +set net_ip %NET_IP% +set net_port %NET_PORT% +set dedicated %DEDICATED% +exec %CONFIG%
Make sure you change NET_IP and NET_PORT to match the IP address and port that you wish your server to listen on, and if you want your server to be listed in game server browsers such as ASE, set DEDICATED to 2 - otherwise leave it as 1 and it will not be listed.
Then save the file in your Quake III installation directory, naming it appropriately (with a .bat extension). Feeling endowed with originality, I called mine 'defrag-mp.bat'. Alternatively, you can download the example above and customize it.
To start the server, just double click on the batch file :)
Under Linux, open your favourite editor and enter the following:
NET_IP=192.168.1.50 NET_PORT=27960 DEDICATED=2 CONFIG=defrag-mp.cfg Q3_HOME="/usr/local/quake3" cd $Q3_HOME ./q3ded +set fs_game defrag +set net_ip $NET_IP +set net_port $NET_PORT +set dedicated $DEDICATED +exec $CONFIG 2>&1 >/dev/null &
Again, make sure you change NET_IP and NET_PORT to match the IP address and port that you wish your server to listen on, and Q3_HOME to the path to your Quake III installation directory, and if you do not want your server to be listed in game server browsers such as ASE, set DEDICATED to 1 - otherwise leave it as 2 and it will be listed.
Then save the file in your Quake III installation directory, naming it appropriately. I called mine 'defrag-mp.sh'. Alternatively, you can download the example one above and customize it (dont forget to 'chmod +x defrag-mp.sh').
To start the server, just run the shell script :)
Well. I hope that made at least some sense. Again, please feel free to email me comments and suggestions.
Happy defragging ;-)