User Tools

Site Tools


q3aserver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
q3aserver [2006/11/07 23:13] – removed 84.142.251.254q3aserver [2007/11/03 07:43] (current) – old revision restored 83.236.4.57
Line 1: Line 1:
 +====== Quake 3 Arena dedicated Server ======
  
 +Here's a quickguide to running a Q3A dedicated server on a debian system.
 +
 +I assume you have running [[Quake3Arena]] for linux running on your client computer already. We'll use this installation as base.
 +
 +  * Create a user and it's home dir
 +
 +  #> useradd -u 666 -g games -d /opt/games/quake3 quake3
 +  #> mkdir -p /opt/games/quake3
 +  #> chown games:games /opt/games
 +  #> chown quake3:games /opt/games/quake3
 +
 +  * Copy the needed files over from your workstation
 +
 +  #> su - quake3
 +  $> scp -r you@workstation:games/quake3 .
 +
 +  * Create a link to make Q3A happy (this fixes some maybe problems)
 +
 +  $> ln -s /opt/games/quake3 .q3a
 +
 +  * Create a **new** ''baseq3/autoexec.cfg'' with the following basic values
 +
 +<file>
 +set vm_game 2
 +set vm_cgame 2
 +set vm_ui 2
 +set dedicated 1       //dedicated but no announce
 +set com_hunkmegs 32   //How much RAM for your server
 +set net_port 32000    //The network port
 +</file>
 +
 +  * Create a ''base3/server.cfg'' file with additonal parameters
 +
 +<file>
 +seta sv_hostname "My Q3A Server"
 +seta sv_maxclients 8
 +seta g_motd "=== Happy fragging ==="
 +seta g_quadfactor 4
 +
 +//### team deathmatch ###
 +//seta g_gametype 3
 +//seta g_teamAutoJoin 1
 +//seta g_teamForceBalance 1
 +//seta timelimit 15
 +//seta fraglimit 25
 +
 +//### free for all ###
 +seta g_gametype 0
 +seta timelimit 10
 +seta fraglimit 15
 +
 +seta bot_nochat 1
 +
 +seta g_weaponrespawn 2
 +seta g_inactivity 3000
 +seta g_forcerespawn 0
 +seta g_log server.log
 +seta logfile 3
 +seta rconpassword "secret"
 +
 +seta rate "12400"
 +seta snaps "40"
 +seta cl_maxpackets "40"
 +seta cl_packetdup "1"
 +</file>
 +
 +  * Create a ''baseq3/levels.cfg'' file which contains all maps you want to use in rotation
 +
 +<file>
 +set dm1 "map q3dm1; set nextmap vstr dm2"
 +set dm2 "map q3dm2; set nextmap vstr dm3"
 +set dm3 "map q3dm3; set nextmap vstr dm1"
 +vstr dm1
 +</file>
 +
 +  * Set up some bots in a ''baseq3/bots.cfg''
 +
 +<file>
 +seta bot_enable 1
 +seta bot_minplayers 4
 +
 +addbot doom 3 blue 10
 +addbot orbb 3 red 10
 +addbot bones 3 blue 10
 +addbot major 3 red 10
 +</file>
 +
 +Okay thats it. Now you can run your server with
 +
 +  $> ./quake3.x86 +exec server.cfg +exec levels.cfg +exec bots.cfg
 +
 +To automate this have a look at the init script below. Oh and be sure to open your firewall or your buddies can't connect.
 +
 +===== Init Script =====
 +
 +This script starts and stops the dedicated server. Installed to ''/etc/init.d/q3a_server'' and optionally linked to the default runlevel.
 +
 +<file>
 +#! /bin/sh
 +set -e
 +
 +BASEPATH="/opt/games/quake3"
 +BINARY="quake3.x86"
 +DAEMON="$BASEPATH/$BINARY"
 +OPTIONS="+exec server.cfg +exec levels.cfg +exec bots.cfg"
 +RUNAS="quake3:games"
 +PIDFILE="$BASEPATH/$BINARY.pid"
 +
 +test -x $DAEMON || exit 0
 +
 +export HOME=$BASEPATH
 +
 +case "$1" in
 +  start)
 +        echo -n "Starting Q3A"
 +        cd $BASEPATH
 +        start-stop-daemon --start --quiet -c $RUNAS --pidfile $PIDFILE \
 +                -N -10 -m -b -d $BASEPATH --exec $DAEMON -- $OPTIONS
 +        echo "."
 +        ;;
 +  stop)
 +        echo -n "Stopping Q3A"
 +        start-stop-daemon --stop --quiet --pidfile $PIDFILE \
 +                --exec $DAEMON
 +        echo "."
 +        ;;
 +  restart|force-reload)
 +        $0 stop
 +        sleep 3
 +        $0 start
 +        ;;
 +  *)
 +        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
 +        exit 1
 +        ;;
 +esac
 +
 +exit 0
 +</file>