Server Configuration

The Quake2World server is a hardened and streamlined reincarnation of its predecessor. Dedicated versus Listen Servers A dedicated server is an instance of Quake2World which only hosts a game for other players; no one is sitting in front of the machine and playing. These are what you'll find when you type the servers command in the client. To run a dedicated server, you'll want a spare (GNU/Linux) computer and a relatively static IP address. The command will look something like:

        quake2world +set dedicated 1 +exec server.cfg

You may want to consider running your dedicated server with the GNU Screen utility, in which case the command would become:

        screen -S q2w quake2world +set dedicated 1 +exec server.cfg

A listen server is one which runs on your client computer. Listen servers are suitable for small LAN games with your friends. To start one, simply increase sv_maxclients to a value of e.g. 4, and load a level:

        sv_maxclients 4
        map fractures

Gameplay, Teams & Matches The default game module encapsulates some of the most popular classic Quake II gameplay modes: Deathmatch, Capture, Instagib, and Rocket Arena. It also offers teams support, and match mode where players must ready up for a game to begin. You can imagine some interesting permutations of these settings:

        #instagib with teams
        g_gameplay instagib; g_teams 1
        #rocket arena with balanced teams
        g_gameplay arena; g_rounds 1; g_teams 2
        #team deathmatch, match mode
        g_gameplay deathmatch; g_teams 1; g_match 1

Map Rotations The Quake2World server uses default/maps.lst to iterate through levels. The file format is rather straight forward, with level configurations specified within curly braces {}. As many as 64 levels can be specified and active within maps.lst. Maps may optionally have a floating point weight associated to them via default/maps.lst. This impacts their probability for selection when g_randommap is 1. Setting a map's weight to 0 will prevent it from being selected in either random or incremental rotations, but it will still be available via the vote command. HTTP Downloading The Quake2World client supports HTTP downloading of game content via libcURL. This enables players to download levels, sounds, etc.. from a web server, preferably on a different network than the game server, at high speeds. Setting this up is relatively simple; all you need is some web space. Copy any custom game media to a web-accessible location on your web server, maintaining the Quake2World directory structure, e.g.

        /var/www/htdocs/quake2world/default/ven_dm3.pak
        /var/www/htdocs/quake2world/default/maps/broken1.bsp
        /var/www/htdocs/quake2world/default/maps/ztn2dm4.bsp

To inform clients of this resource, set sv_downloadurl in server.cfg to the base directory of this resource, e.g. http://my.host.com/quake2world. Obey Thy Master In order for your server to be seen by the public, you must tell the master server about it. Set sv_public 1 in server.cfg. You should then see some messages in the console about heartbeats and pings:

        Sending heartbeat to 81.169.143.159:1996                                      
        Ping acknowledge from 81.169.143.159:1996

Logging and Statistics The server supports two different logging mechanisms: flat files, and a MySQL database. While flat files are easy to work with, a database enables much more interesting and flexible (i.e. realtime) analysis. To produce an old-school QuakeWorld fraglog file, set g_fraglog 1. For logging to MySQL, you must first provision a suitable database and install the schema found in src/default/schema.sql. Then, set the following in server.cfg:

        g_mysql 1
        g_mysqlhost localhost
        g_mysqluser user
        g_mysqlpassword password
        g_mysqldb q2w

For producing realtime statistics from the database, see the Stats package.