
                          Quake2 Battleground v1.36

                                by Ernie Pistor

Intro
-----

Quake2 Battleground was written with a single purpose in mind: clan matches.
That means that there will always be two teams, and only two teams.  The mod is,
of course, server-side only.  The server will enforce team skins, keep track of 
team scores, and announce the winner at the end of a match.  And multi-round 
matches are fully automated.  Just tell the server what maps will be played, and
it will do the rest!  Of course, if you don't run matches, or there are none
going on, you can swith to deathmatch mode from within the mod and still have 
access to many of its optional enhancements.

Check out the Overview for a partial feature list.  The Commands section 
contains a complete description of all available client and admin commands, 
which will give you a more complete picture of what this mod is made of.

This mod is officially supported by the folks at the Online Gaming League 
(http://www.ogl.org) as the standard for its Quake2 Deathmatch ladder matches.
Feel free to post your thoughts/comments about Quake2 Battleground on the OGL's
Quake2 Battleground discussion forum (which can be found in the "Rant Forum" 
section of their site), or email the author at punisher@ogl.org.

The latest version of Quake2 Battleground may always be found at 
http://www.planetquake.com/battle.

Overview of Features
--------------------

 - Configurable team names and skins
 - Team scores displayed both on the scoreborad and in the HUD
 - Server-enforced team skins to prevent cross-dressing
 - Admin mode allows clients (with the proper password) to perform server- and 
   match-related administrative functions remotely, without rcon
 - Three distinct security levels to control who (clients, admins) may change 
   what settings
 - Frags collected by a player are not dropped from the team score if the player
   is disconnected during a match
 - Joincodes generated at the start of a match allow disconnected players to 
   rejoin their teams while the match is in progress
 - Clients will not be allowed to join a team while a match is in progress 
   without the proper joincode
 - Observer mode and Chase, Track, Eye, and Auto Cameras allow spectators at
   matches and during normal deathmatch
 - Optional Threewave CTF2-style player identification ("id" command) and team 
   status messages
 - Server keeps track of team scores and announces the winner at match end
 - Multi-round matches are fully automated.  The winner is announced after each 
   round
 - Admin commands for common administrative functions (setting dmflags, 
   timelimit, fraglimit, kicking users, changing maps)
 - Random teammate-kill messages
 - Voting for map changes and to switch between match and deathmatch modes
 - Extensive online help ("commands" and "acommands")
 - IP banning, including subnet banning
 - Private messages-- say something to a specific player!
 - Can switch between match mode and normal id deathmatch
 - Configurable "Message of the Day"
 - Config file for server customization
 - Player statistics (deaths, kills, teammate kills, suicides, net score, and
   kill-to-death ratio) recorded during gameplay and available to all clients
 - Map restriction
 - Vwep-enabled
 - Support for Quake2 v3.17's automatic vwep detection
 - GibStats fraglogging support
 - Match pausing (admin only)
 - Server-enforced minimum and maximum player pings, for modem and LPB leagues
 - Support for QWComp-style dm/tp mode settings
 - Team names and scores shown in HUD during matches
 - Optional mode-switching when server is idle for an extended period of time
 - Separate timelimit, fraglimit, and dmflags for match and deathmatch modes
 - Full-combat "warmup" prior to the beginning of a match
 - Automatic match overtime (either sudden death or timed)
 - ClanRing-style ghost codes to allow disconnected players to rejoin a match
 - Full control over which Quake2 items are allowed in the game
 - Optional temporary spawn protection
 - Previous match scores available on scoreboard for 1 minute after the match
 - Zbot detection!
 - Server can control minimum and maximum client "rate"
 - Matches can auto-pause if a team disconnects, to give disconnected players
   time to reconnect (optional)
 - Individual mode allows FFA-style matches
 - Support for up to 64 teams in match mode


Installation & Execution
------------------------

IMPORTANT NOTE: Due to the nature of the Quake2 engine, if a client takes a
   screenshot on a server running a server-side-only mod, but the client does
   not have a directory under its Quake2 directory with the same name as the
   server's "gamedir" variable (usually "battle" for Quake2 Battleground),
   the client will crash.  This is because Quake2 does not check for the
   existence of such a directory before trying to write the screenshot to it.
   As a result, it is *strongly* recommended that server admins make clients
   aware of this fact and suggest that they create a "battle" directory
   (possibly in the MOTD) or run Quake2 Battleground directly out of the 
   "baseq2" directory.

Like any other Quake2 mod, this mod is installed simply by placing the game
library in a directory under your Quake2 directory, typically named "battle".
To run a Quake2 Battleground server, start Quake2 with "+set game battle" on 
the command line.  Any config files associated with Quake2 Battleground must
also reside in the "battle" directory (battle.cfg, maps.txt, motd.txt, etc.).

Note that if you want to control the mod remotely using its admin features
(this is rather necessary unless you intend to sit at the console and use the
"sv" commands), you must set the "admin_password" Quake2 variable.  This can
be done using "set admin_password <password>" from the server console or by
adding "+set admin_password <password>" to your startup command line.  It is
also possible to acheive the same effect by adding "sv admincode <password>"
to your battle.cfg, described below.  If you neglect to set an admin password,
no admins will be allowed (don't worry, your server is not insecure by 
default).

Upon startup, a Quake2 Battleground server will try to read its own 
configuration file ("battle.cfg" by default).  The (optional) 
configuration file should contain Quake2 and/or Battleground-specific
commands, just like the standard id configuration files.  This file is
needed, in addition to the standard files, because at startup the Quake2
engine does not recognize Battleground server commands.  The name of the
configuration file may be changed by setting the console variable 
"cfg_file" to the desired filename either on your startup command-line or in 
a config file specified on the command line ("+exec server.cfg").  Note that 
the server ("sv") versions of the Quake2 Battleground commands rather than the 
client versions must be used in this config file, i.e. "sv teamname A new"
rather than just "teamname A new".  Most Battleground admin and client 
commands are also available as server commands, so this should not cause any 
problems.  A sample battle.cfg file is provided with Quake2 Battleground.

A "Message of the Day" may be set on the server by placing the desired text 
in the file "motd.txt".  If you wish to use a different filename, you may
change it by setting the server console variable "motd_file".  The message will
be shown automatically to each client at connection time, and it will also 
appear as an option on the Join Menu.  The message may also be displayed by a 
client at any time using the "motd" command.  The message will remain on a
client's screen for a minimum of 3 seconds and a maximum of 15 seconds by
default, but this can be changed using the "min" and "max" options to the
"motd" command.

A list of valid maps may be stored on the server so that the mod will not try
to change to an unwanted or nonexistent map.  By default, the file is called
"maps.txt", but its name may be changed using the "mapfile" server command. The
mapfile shipped with Quake2 Battleground contains the names of all standard id
Software single-player and deathmatch maps.  Maps may be added or deleted at
the discretion of the server admin, but they must be represented one per line,
and only the symbolic name (i.e. q2dm1) should be included on the line.  Note
that this is *not* a map queue.  Rather, it simply prevents the server from
attempting to change to a map not on the list.  If the file does not exist, the
server will treat any map name as a valid map, but specifying an invalid map in
this situation will cause a server shutdown.

Bans are written by default to the file "bans.txt" in the mod's directory.  The
name of the ban file may be changed by setting the server console variable
"ban_file", but currently it is not possible to turn off ban-writing entirely
other than by specifying a file that cannot be written.  This will be changed 
once Zoid is finished with the Quake2 3.17 source code and I merge my ban code
with his.

GibStats-compatible frag logging may be turned on by setting the server
variable "stdlogfile" to "1".  The name of the logfile is "StdLog.txt" by
default, but it may be changed by setting the "stdlogname" server variable to 
the name of the file you wish to write to.  Note that the logfile will be
created in the Quake2 directory, *not* in the battle directory, unless the
"stdlogname" variable is specified as "battle/StdLog.txt", where StdLog.txt may
of course be replaced with whatever you wish to call your logfile.  The logged
statistics may be viewed using GibStats or any compatible log parser.  Note
that in addition to the normal logging of deaths, kills, suicides, etc.,
teammate kills are also logged during matches with the label "TeamKill".

By default, your Quake2 Battleground server will periodically report that it is
running to the Quake2 Battleground master server, and its address will appear on
the server list at http://www.ogl.org/battle/servers.html.  If you do not wish
your server's address to appear on the servers page or in the GameSpy listing,
set the console variable "private" to "1".  This will exclude your server from
the GameSpy list and replace its address on the web page with "<PRIVATE>".  To
completely turn off reporting to the master, set the variable "nomaster" to "1".
Please use "private 1" rather than "nomaster 1" if you wish to run a private
server, though, so that an accurate server count will be shown on the web page.

To set separate timelimits/fraglimits/dmflags for match and deathmatch modes,
use the tl, fl, and dmf commands with the "match" or "dm" options.  The values
set this way will be restored any time the server is switched to the
appropriate mode.  See the "Admin Commands" section for details or the
included battle.cfg file for examples.

The Game
--------

Upon connection to a Quake2 Battleground server, clients will be presented 
with a menu that will allow them to join a team if they so desire.  If a 
match is in progress, the client will not be allowed to join a team using the 
menu.  If a client elects not to join a team, he/she will start out in observer
mode.  Pressing the FIRE button will cause the client to cycle through TrackCam,
EyeCam, and ChaseCam modes one at a time.  In any of the camera modes, the JUMP
button may be used to follow the next player.

Once both teams are populated, a match may begin when all members of both
teams have set themselves ready using the "ready" command, or when an admin uses
the "start" command.  A brief countdown (the default is 15 seconds) will 
precede a match unless an admin has forced the start of a match with "start 
match".  Unless the adminmode is set to "strict", any player may break a 
countdown by issuing the "noready" command at the console.  Once a match is 
started, however, it will be continued until its timelimit or fraglimit is 
reached unless it is stopped by an admin.  A match will also end if all players 
on one or both of the teams disconnect from the server.

The server provides the facility for team names and skins to be changed in order
to allow clans to "personalize" their matches.  If the adminmode (see below) is 
set to "client", then any member of a team may change its name or skin prior to 
a match.  If the adminmode is "admin" or "strict", then only an admin may alter 
the team settings.  An adminmode setting of "strict" additionally disallows the 
starting of a match by clients (i.e. using the "ready" command).

The normal sequence of events is as follows: clients connect to the server; 
clients join teams; once all clients are ready, the countdown begins; the match 
is played; the winner is announced.  For multi-round matches, the level is 
changed at the end of each round, and the server waits a short (60 seconds by 
default) period of time ("pregame") before beginning the next round, to allow 
all players to re-enter the game before the start of a match.  At any time 
before a match, game settings and team settings may be changed.  Once a match 
starts, however, the current settings are frozen for its duration.

Note that each team has the option to choose a joincode before a match begins.
It may be set by any member of the team, and it will be displayed to all of the
members of that team at the time of its setting.  If no joincode is set before
the beginning of a match, a four-character code will be randomly generated at
the start of the match.  In either case, each team's joincode is displayed to
all members of the team it is for at the beginning of a match.  It would be
a very good idea for all players to take the time to write this code down, 
because you will need it to rejoin your team if you are disconnected.  If you
miss the joincode when it first appears, or if you decide to wait 'til you die
to write it down, you may recover it with the "joincode" command.  A joincode
will be retained for all rounds of a multi-round match, so player substitutions
may be made between rounds by giving the team joincode to the new player(s) (the
"talk" command is ideal for this purpose) and then having them join the team.
Joincodes are cleared after every match, so if a team is playing multiple
single-round matches, it must be re-entered after each one.  A manually-set 
joincode may be up to 8 charactrs long.

Additionally, each client is given a unique 3-digit "ghost code" once he
has readied up.  If the client disconnects after that point, he may reconnect
to his old body, complete with his original frag total, health, weapons, and
all other stats by using the "ghost" command with his code.  This is similar to
the behavior of the original "ghost" command in CRMod for classic Quake.

Client Commands
---------------

NOTE: In addition to the commands listed here, clients may also use the admin 
      commands teamname and teamskin when the adminmode is set to "client"
      (the default) or "admin".  Also, many of the admin commands will print the
      current value of the settings they control, regardless of the adminmode.

acommands :
   Show a list and brief description of all admin commands.
accuracy [player] :
   Show a player's shooting accuracy with each weapon.  If no player argument is
   given, your own accuracy is displayed.
admin <password> :
   Become a server admin.  This command must be successfully executed before 
   you may use the admin commands.  However, the admin commands teamname and
   teamskin may be used by all clients if the adminmode is set to "client".
autocam [args] :
   Enable autocam or control its settings.  With no argument (or the "on"
   argument), switches player to auto-camera mode and starts following the
   action.  The arguments are as follows:
      "on"        : enable camera
      "off"       : disable camera
      "normal"    : auto-position mode
      "follow"    : follow players
      "max_xy"    : set max. X/Y delta
      "max_z"     : set max. Z delta
      "max_angle" : set max. yaw angle
captain [player] :
   With no arguments, displays the name of the team captain.  If a player
   argument is given and the caller is the captain or an admin, the chosen
   player will become the team's captain.  Admins may insert a "team" argument
   before the player argument to set the captain for a specific team.
chasecam [playernum] :
   Switch to chase camera mode.  If the optional player number argument is
   given, then that player is chased.
commands :
   Show a list and brief description of all client commands.
create <teamname> :
   Create a new team, and become its captain.  If the server's "maxteams" is
   then the 2 teams are pre-created and this command has no effect.
deathstats [player] :
   Show a player's deaths by each weapon as well as by telefrag, quad,
   teammates, and suicides.  If no player argument is given, your own
   deathstats are displayed.
eyecam [playernum] :
   Switch to eye camera mode.  If the optional player number argument is
   given, then the view is from that player's eyes.
ghost <code> :
   Reconnect to your old body and stats after becoming disconnected during a 
   match (or anytime after readying up).  Knowledge of your 3-digit ghost code,
   given to you when you ready up, is required.
ghostcode :
   Display your ghost code.  Only you will see it.
id :
   Turn on player identification.
join [team] [joincode]:
   In battlemode "dm", allows an observer to become a player.  In battlemode
   "match", functions much like the "team" command.
joincode [code] :
   Display or set the joincode for your team.  If the optional [code] 
   argument is present, your team's joincode will be set/changed to its
   value.  Otherwise, the joincode will be displayed.
kickplayer <name> [team] :
   Remove a player from your team.  If multiple players have the same name, the
   first one found that is on the team is kicked.  Admins may specify a team
   argument to remove a player from a specific team.
killstats [player] :
   Show a player's kills by each weapon as well as by telefrag, quad,
   teammates, and suicides.  If no player argument is given, your own
   killstats are displayed.
lockteam [team]:
   Prevent new players from joining a team unless they are picked, use the
   joincode, or use their ghost code (former members only).  Admins may specify
   a team argument, otherwise only captains may lock their own teams.
menu :
   Pop up the Join Menu.
motd [min|max] [value] :
   Display the server's "Message of the Day".  The command recognizes the
   following optional arguments:
      "min"  : display or set (admin only) the minimum time the MOTD will be
               displayed on a user's screen
      "max"  : display or set (admin only) the maximum time the MOTD will be
               displayed on a user's screen
noready :
   Declare yourself not ready for a match.  This command is only valid prior to 
   and during a countdown.  If a countdown is in progress when a player issues 
   this command, it will be stopped (unless adminmode is "strict").  During a 
   match, however, this command has no effect.  The same effect may be achieved
   by using "unready" or "notready", for compatibility with other popular
   teamplay mods.
pickplayer <name> [team] :
   Add a player to your team.  If multiple players have the same name, the
   first one found that is not yet on a team is picked.  Admins may specify
   a team argument to put a player on a specific team.
observer :
   Become an observer.  This command has no effect during a match.
ready :
   Set yourself ready to begin a match.  Unless the adminmode is set to 
   "strict", the countdown will begin once all players (except observers and 
   chasers) have issued this command at the console.
readyteam :
   Set your entire team ready for a match (captain only).
settings :
   Display the current server settings.  Dmflags, battlemode, adminmode,
   timelimit, fraglimit, maxclients, and extras are displayed.
stats :
   Display player stats, including score, total kills (not including teammate
   kills or suicides), teammate kills (i.e. the player killed a teammate),
   suicides, deaths (not including suicides), net score (score - deaths), and
   kill-to-death ratio.
talk <userid> <message> :
   Send a message to a specific player.  Your name will appear in {}'s along
   with the message.  If invoked with no arguments, this command will print a 
   list of current players and their userids.
team <team> [joincode] :
   Join the team whose name is <team>.  If a match is in progress, the joincode
   for that team is required.  If the team does not exist, and more teams are
   allowed, then the team will be created.
teamname <name> :
   Change the name of your team to <name>.  May also be called in the same
   manner as the admin version of the command.
teams :
   Display the names of the 2 teams.  They are also shown on the scoreboard.
teamskin <skin> :
   Change the skin for your team to <name>.  May also be called in the same
   manner as the admin version of the command.
teamskins :
   Display the names of the skins of the 2 teams.  They are also shown in the
   scoreboard.
time :
   Call a timeout (captain only).
timein :
   End a timeout (captain only).
timeleft :
   Display the elapsed and remaining time in a match, deathmatch, or pregame to
   a multi-round match.
trackcam [playernum] :
   Switch to track camera mode.  If the optional player number argument is
   given, then that player is tracked.
unlockteam [team]:
   Allow new players to join a previously-locked team.  Admins may specify
   a team argument, otherwise only captains may unlock their own teams.
unreadyteam :
   Unready your entire team (captain only).
vote <command> [option] :
   The vote command may be used to initiate or cast a vote unless the adminmode
   is "strict".  Voting may be initiated on either a map change, a battlemode
   change, or a change in the allowed enhancements.  If more than half of the 
   connected clients vote "yes" the requested change will be carried out.  If 
   more than half vote "no", the change will not be carried out and the vote 
   will end.  To cast your vote, use "vote yes" or "vote no".  If a vote does 
   not complete within one minute, it will be considered defeated and the 
   requested change will not happen.  Admins may also use "vote cancel" to 
   cancel the current vote.

   The following forms of the "vote" command are acceptable:
      vote map <mapname> :
          A vote will be initiated on a map change, unless <mapname> is the 
          current map.
      vote mode <match|dm> :
          A vote will be initiated to change the battlemode, unless the current
          mode is the same as the supplied mode.
      vote allow <id|status|all> :
          A vote will be initiated to allow the specified feature, unless it is
          already allowed.
      vote disallow <id|status|all> :
          A vote will be initiated to disallow the specified feature, unless it
          is not allowed.
      vote tl <timelimit> :
          A vote will be initiated to change the timelimit, unless the current
          timelimit is the same as the supplied one.
      vote fl <fraglimit> :
          A vote will be initiated to change the fraglimit, unless the current
          fraglimit is the same as the supplied one.
      vote dm <0|1> :
          A vote will be initiated to change the "dm" mode, unless the supplied
          value is the same as the current value.  See the "dm" command for
          further details.
      vote tp <1-4> :
          A vote will be initiated to change the teamplay mode, unless the
          supplied mode is the same as the current mode.  See the "tp" command
          for further details.
      vote powerups <0|1> :
          A vote will be initiated to change the "powerups" setting to the
          supplied value.  0 means no powerups, 1 means powerups spawn as
          usual.
      vote bfg <0|1> :
          A vote will be initiated to toggle whether or not the BFG is allowed
          to spawn.  0 means no BFG, 1 means the BFG will be allowed as usual.
      vote yes :
          Cast your vote in favor of a requested change.
      vote no :
          Cast your vote against a requested change.
      vote cancel :
          Cancel the current vote.  Admin-only.

Admin Commands
--------------

NOTE: Most admin commands (as well as the client commands "commands" and 
      "acommands") are also available as "sv" commands on the server

admincode <password> :
   Change the admin password to <password>.  This may also be accomplished by 
   updating the variable "admin_password" on the server itself.
adminmode <client|admin|strict> :
   Set the security level.  The security levels are as follows:
      - "client" : Allows all clients to use the "teamname" and "teamskin"
                   commands to modify their team's name and skin.  Allows
                   clients to use the "vote" command to alter various server
                   settings.  A match will be started once all players have 
                   issued the "ready" command.  This is the default mode.
      - "admin"  : Clients are prevented from voting (i.e. an admin must be
                   present to alter server settings).  Otherwise similar to
                   adminmode "client".
      - "strict" : Only admins may modify team names and skins, change server
                   settings, and start matches or countdowns (using the 
                   "start" command).  The "ready" and "noready" commands have
                   no effect when this mode is set.
   If issued with no arguments, the current adminmode will be printed.
admins :
   Display a list of players who are currently admins.
allow <id|status|all> :
   Control use of non-standard deathmatch features.  The following features are 
   available:
      - "id"      : CTF-style player identification.  If "id" is allowed, 
                    clients may enable the feature for themselves by issuing the
                    "id" command at the console.
      - "status"  : Allow CTF-style team status messages. 
      - "all"     : Enable all of the above enhancements.
ban <IP|subnet|userid> :
   Add a specific IP a player's IP, or an entire subnet to the ban list.  If 
   the argument is a player number, that player's IP will be added.  If it is an
   IP, the IP will be added (doh!).  If the supplied IP ends in 0 (i.e.
   111.111.111.0), the entire subnet will be banned.
bans :
   Show all banned IPs.
battlemode <match|dm|individual> :
   Switch between match mode and standard id deathmatch.  If the mode is 
   set to "match", the level will be restarted, players will be presented with 
   the join menu, and players will not be able to touch weapons until a match 
   is begun.  If it is set to "dm", the teamplay features of this mod will be 
   disabled.  If it is set to "individual", the server will be switched to a
   mode similar to match mode, but without teams (i.e. a match-like FFA mode).
   If called with no arguments, the current battlemode will be printed.
bfg <0|1> :
   An argument of 0 will prevent the BFG from respawning on the current level,
   and prevent it from being spawned in the first place on future levels.  An
   argument of 1 (the default) allows the BFG to spawn as usual.
botdetect <flags> :
   Control Zbot detection settings.  A flags value of 0 turns off detection.
   The supplied sum of the following values controls what action is performed
   when a bot is detected:
      1 : log bot usage to BotDetect.log
      2 : report bot usage to the server console
      4 : kick bots
      8 : ban bots
   The default setting is 7 (log, report, and kick).
break :
   Stop a match or countdown.
changemap <map> :
   Change the map.
counttime [time] :
   Set or display the countdown time in seconds.  If issued with no arguments,
   the current value will be printed.
defaultname <num> [name] :
   Set the default team names for 2-team mode (i.e. match mode with "maxteams"
   of 2).  The team names will automatically be set to the values specified
   here when the mode is switched from dm or individual mode to match mode when
   maxteams is 2.  For example, "defaultname 1 A"  would cause the name for the
   first team to be set to "A" at mode switch time.
defaultskin <num> [name] :
   Set the default team skins for 2-team mode (i.e. match mode with "maxteams"
   of 2).  The team skins will automatically be set to the values specified
   here when the mode is switched from dm or individual mode to match mode when
   maxteams is 2.  For example, "defaultskin 2 male/grunt"  would cause the
   second team's skin to be set to "male/grunt" at mode switch time.
details :
   Display server status information.  Similar to the basic Quake2 "status"
   command, except the status information is printed directly to the admin's
   console rather than that of the server.  This command is mainly used to get
   player number of IP address information for use with the "kickuser", "ban",
   and "kickban" commands.
disallow <id|status|all> :
   Control use of non-standard deathmatch features.  Exactly the opposite of 
   "allow".
dm [match|dm] <0|1> :
   Set the "dm" mode as defined in many popular Quake/QuakeWorld teamplay mods.
   See the "dmf" command for a description of the "dm" and "match" arguments.
   The modes are as follows:
      0 : Weapons disappear when picked up and later respawn
      1 : Weapons do not disappear when picked up
   Note that modifications to the "dmflags" using "dmf" or the console variable
   may affect the "dm" mode.
dmf [match|dm] <dmflags> :
   Set the dmflags.  This allows admins to control such features as whether
   team damage is on or off, and whether weapons stay or respawn.  All dmflags
   values valid in Threewave CTF2 are valid here.If called with no dmflags
   argument, prints the current dmflags.  This command has three forms:
      dmf <limit>       : Set the dmflags for the current mode.  This does
                          not alter the default value for that mode, and it
                          will not be retained across a mode switch.
      dmf match <limit> : Set the default match mode dmflags.  This value
                          will be restored each time the server is switched
                          to match mode.
      dmf dm <limit>    : Set the default deathmatch mode dmflags.  This 
                          value will be restored each time the server is 
                          switched to deathmatch mode.
   NOTE that directly changing the "dmflags" console variabe will have the same
   effect as "dmf <limit>".
fl [match|dm] <limit> :
   Set the fraglimit.  If called with no limit argument, prints the current
   fraglimit.  This command has three forms:
      fl <limit>       : Set the fraglimit for the current mode.  This does
                         not alter the default value for that mode, and it
                         will not be retained across a mode switch.
      fl match <limit> : Set the default match mode fraglimit.  This value
                         will be restored each time the server is switched
                         to match mode.
      fl dm <limit>    : Set the default deathmatch mode fraglimit.  This 
                         value will be restored each time the server is 
                         switched to deathmatch mode.
   NOTE that directly changing the "fraglimit" console variabe will have the
   same effect as "fl <limit>".
ghostlist :
   Display a list of the names and codes of all ghosts.  Useful when a player
   reconnects and has forgotten his code.
hold :
   Toggle to pause/unpause the game.
item <itemname> <0|1> :
   Allow or disallow the use of any valid Quake2 item (weapons, health,
   powerups, etc.).  Currently you must specify the name of the item as it is
   known to Quake2 (for example, "super shotgun" or "quad damage").  The
   exception is health; "item health 0" will prevent *all* types of health
   from spawning, and "item health 1" will allow all types of health to spawn.
   The effect of this command is immediate-- any allowed item will be spawned
   into the game, and any disallowed item will be removed from the level and
   all player inventories.

   Also, to enable or disable any individual type of health, use the names
   "Small Health", "Normal Health", "Large Health", and "Megahealth".  The
   keywords "powerups" and "armor" may be used to control the settings of all
   powerups (quad, invulnerability, power shield, rebreather, and envirosuit)
   and all types of armor, respectively.  The keyword "ammo" may be used to
   control the settings for all types of ammo, and the keyword "all" may be
   used to control the settings of all items in the game.  Finally, the keyword
   "weapons" may be used to control the settings of all weapons.
itemflags <flags> :
   Quicker item control than provided by the "item" command, but this command
   requires the use of basic addition skills.  The flag values for each item
   are as follows:
      Blaster               0           (ALWAYS allowed)
      Shotgun               1
      Super Shotgun         2
      Machinegun            4
      Chaingun              8
      Grenade Launcher      16
      Rocket Launcher       32
      Hyperblaster          64
      Railgun               128
      BFG10K                256
      Grenades              512
      Bullets               1024
      Shells                2048
      Cells                 4096
      Rockets               8192
      Slugs                 16384
      Small Health          32768
      Health                65536
      Large Health          131072
      Megahealth            262144
      Armor Shard           524288
      Jacket Armor          1048576
      Combat Armor          2097152
      Body Armor            4194304
      Power Shield          8388608     (also handles Power Screen)
      Quad Damage           16777216
      Invulnerability       33554432
      Silencer              67108864
      Rebreather            134217728
      Enviroment Suit       268435456
      Ammo Pack             536870912
      Bandolier             1073741824
      Adrenaline            2147483648
   To control items using itemflags, add up the values of all items you wish
   to allow, and give that value to the itemflags command.  The sum of all
   item values is 4294967295.
joincodes :
   Display the joincodes for both teams.
kickban <userid> :
   Simultaneously kick and ban a user.
kickuser <userid> :
   Kick a user off the server.
maxping <ping> :
   Set the maximum allowable ping for players.  If a player's average ping
   rises above this value for a sustained period of time, the player is removed
   from gameplay.  The default ping-maximum is 0, which causes all pings to be
   allowed.
maxplayers <max> :
   Set the maximum number of players that may join each team.  The value must
   not be greater than half of the server's "maxclients" value.  The default
   value of 0 does *not* impose a maximum number of players per team.  The 
   value may be set to less than maxclients/2 to reserver some number of spots
   for observers.  Note that if the value is changed such that one or more 
   teams already has more players than the new value, the extra players will
   *not* be kicked from the offending team.  It is up to the admin to kick the
   extras, if desired.  If called with no arguments, this command will print 
   the current value.
maxrate <rate> :
   Set the maximum allowed client "rate" setting.  If a client's "rate" is
   greater than this value, it is automatically adjusted.  The default is 0
   (no maximum).
maxteams <num> :
   Set the maximum number of teams allowed on the server.  The default is 2
   (traditional Quake2 Battleground limit), but it may be changed to allow up
   to 64 teams.  If the value is changed to be smaller than the current number
   of teams, extra teams are destroyed.
minping <ping> :
   Set the minimum allowable ping for players.  If a player's average ping
   falls below this value for a sustained period of time, the player is removed
   from gameplay.  The default ping-minimum is 0, so all pings are allowed.
minplayers <min> :
   Set the minimum number of players that must be on a team before a match may
   begin.  The value must be between 0 and half of the server's "maxclients",
   and it may not be greater than "maxplayers" (unless of course maxplayers is
   0).  This setting is useful for preventing a match from starting before all
   players have arrived.  The default value is 0 (no minimum).  NOTE: an admin
   may force a match to start even if one or both of the teams does not have
   the minimum number of players.
minrate <rate> :
   Set the minimum allowed client "rate" setting.  If a client's "rate" is less
   than this value, it is automatically adjusted.  The default is 0 (no
   minimum).
minteams <num> :
   Set the minimum number of teams needed before a match may start.  The
   default is 2.
mode <match|dm|individual> :
   Switch between match mode and standard id deathmatch.  If the mode is 
   set to "match", the level will be restarted, players will be presented with 
   the join menu, and players will not be able to touch weapons until a match 
   is begun.  If it is set to "dm", the teamplay features of this mod will be 
   disabled.  If it is set to "individual", the server will be switched to a
   mode similar to match mode, but without teams (i.e. a match-like FFA mode).
   If called with no arguments, the current battlemode will be printed.
multi <map1> <map2> ... :
   Set the maps to be played in a multi-round match.  The number of rounds is 
   determined automatically based on the number of maps specified.  Called with
   no arguments, this command will print the maps to be played.
noadmin :
   Revoke your admin privileges.
obsmode <speak|whisper|shutup> :
   If set to "speak", observers will be able to speak to players during matches.
   If set to "whisper", observers will only be able to speak with other
   observers during matches.  The default setting is "speak".  If set to
   "shutup", observers simply may not speak.  This setting does not prevent
   admins from speaking if they are observers.
overtime <mode> [time] :
   Set the overtime mode.  Valid modes are "none" (no overtime, match may end
   in a tie), "timed" (if tied at the end of a match, the round is extended
   for a given number of minutes), and "death" (sudden death -- next frag wins).
   If no time is given for "timed" mode, the match is extended for 5 minutes.
   The default overtime mode is "death".
pretime [time] :
   Set or display the pregame time in seconds.  This is the time that will be 
   allowed between rounds of a multi-round match, to give clients a chance to 
   reconnect.  If issued with no arguments, the current value will be printed.
resume :
   Resume a paused game.
selfdamage [match|dm] <0|1> :
   If set to 0 (the default), players may cause harm to themselves.  If set to 1,
   they are protected from their own weapons' fire.
   See the "dmf" command for a description of the "dm" and "match" arguments.
spawnprot <time> :
   Set the number of seconds a player will be invulnerable after respawn.  Note
   that if the player picks up any item prior to the end of this period, the
   protection will be removed.  Default is 0 (no spawn protection).
start <match|countdown|multi> :
   Begin a match or countdown, whether or not all players are ready.
stoptime <time> :
   Set the time (in minutes) to wait for players to return before stopping a
   match if only one team is left.  The server will auto-pause for the duration
   of the time (or until a player from the other team rejoins).  This feature is
   most useful for 1-on-1 matches, when an accidental disconnect would otherwise
   stop the match.  The default stoptime is 0 (disabled), which means that
   matches end immediately if only one team has players.
switch <time> :
   Set the amount of time the server can be idle before automatically switching
   to DM mode.  The server is considered "idle" if there are no players on it.
   The default of 0 means "do not automatically switch".
teamname [team] <name> :
   Change the name for <team> to <name>.  If the team argument is omitted, 
   assumes you wish to chage the name of your own team.
teamskin [team] <skin> :
   Change the skin for <team> to <skin>.    If the team argument is omitted, 
   assumes you wish to chage the name of your own team.
timeouts <num> [duration] :
   Set the number of timeouts allowed per team, and the duration in seconds
   of each.  The default is no timeouts, and the default duration is 30
   seconds.  The "timeouts" command with no arguments will display the total
   timeouts per team and the number remaining for each team.
tl [match|dm] <limit> :
   Set the timelimit.  If called with no limit argument, prints the current
   timelimit.  This command has three forms:
      tl <limit>       : Set the timelimit for the current mode.  This does
                         not alter the default value for that mode, and it
                         will not be retained across a mode switch.
      tl match <limit> : Set the default match mode timelimit.  This value
                         will be restored each time the server is switched
                         to match mode.
      tl dm <limit>    : Set the default deathmatch mode timelimit.  This 
                         value will be restored each time the server is 
                         switched to deathmatch mode.
   NOTE that directly changing the "timelimit" console variabe will have the
   same effect as "tl <limit>".
tp <1-4> :
   Set the teamplay mode as defined in many popular Quake/QuakeWorld teamplay
   mods.  The modes are as follows:
      1 : Players cannot cause damage to themselves, their teammates, their 
          armor, or their teammates' armor.
      2 : No self or teammate health or armor protection.  A player's frag 
          total is decremented by 1 for each teammate kill.  This is the 
          default "dm" setting.
      3 : Players can cause damage to themselves and their own armor but can 
          only damage teammates' armor.  (Only teammate health protection is 
          enabled.)
      4 : Players can cause damage to themselves and their own armor but cannot
          cause damage to teammates or their armor.  (Teammate health and armor
          protection enabled.)
   Note that modifications to the "dmflags" using "dmf" or the console variable
   may affect the teamplay mode.     See the "dmf" command for a description of
   the "dm" and "match" arguments.
unban <IP> :
   Remove an IP from the ban list.
unreadyall :
   Remove the "ready" status of all players.
warmup <pct> :
   Set the percentage of players that must ready up before the server
   switches from full-combat warmup to no-fire pregame.  A value of 100
   causes warmup to last until the countdown bagins, and a value of 0
   disables warmup mode.  The default is 50.

KNOWN BUGS
----------

None, unless the commands and acommands menus still overflow modem players
(I don't believe they do as of v1.03).  Many improvements are on the way,
though...

Acknowledgements
----------------

Well, I put the whole thing together myself, but (obviously) none of it would
have been possible had id Software not been kind enough to release the Quake2
library source code.  This mod was built by dismantling Zoid's Threewave CTF2
source, rather than by starting from the original deathmatch source.

The inspiration for this mod came from a combination of the Ionic Teamplay mods
(http://www.fragzone.se/ionic), the Rancor QuakeII mod (formerly known as the 
LA QuakeII mod) (http://www.notgod.com/rancor), and the Q2Ring mod 
(http://www.planetquake.com/q2ring).  I liked certain features of each of them
(those familiar with each respective mod can probably see the similarities), 
but I felt that none of them was exactly what I wanted.  All code in this 
release (aside from the Quake2 source itself, vwep, and GibStats support), 
however, is my own original work.  After version 0.99, I also took a look at 
the QDevelS site (http://www.planetquake.com/qdevels) to get a start on the 
MOTD stuff (though my code turned out quite different).

Visible weapons support was written by Hentai (hentai@intelegenesis.com).  More
info (and the client pak2.pak file) may be found at 
http://www.telefragged.com/vwep.

GibStats, GSLogMod, and the Quake2 Log Standard were developed by fragitz and
Mark Davies.  The GibStats log parser and further information may be obtained
at http://www.planetquake.com/gibstats.

The EyeCam and TrackCam used in Quake2 Battleground are those written by crt
(David Wright - wrightd@stanford.edu) for Rocket Arena 2 
(http://www.planetquake.com/arena), and they appear here with his permission.

The AutoCam appearing in versions greater than 1.26 is heavily derived from
Paul Jordan's q2cam, whose copyright follows:

   "The Client Camera is a product of Paul Jordan, and is available from
   the Quake2 Camera homepage at http://www.prismnet.com/~jordan/q2cam, 
   or as part of the Eraser Bot at http://impact.frag.com.

   This program is a modification of the Quake2 Client Camera, and is
   therefore in NO WAY supported by Paul Jordan.

   This program MUST NOT be sold in ANY form. If you have paid for 
   this product, you should contact Paul Jordan immediately, via
   the Quake2 Camera Client homepage."

Since I added the "accuracy", "deathstats", and "killstats" commands to
Quake2 Battleground, I should probably mention that the concepts come from
the GX Tournament Mod (http://www.gamers.com/gxmod), though the code used
in the Quake2 Battleground versions is my own, and that they were added at
the request of many Quake2 Battleground users.

The spawn protection that appears in this version of Quake2 Battleground was
developed in conjunction with Philip (a.k.a. Maj.Bitch), peblair@gv.net, and
was inspired by his tutorial on very basic spawn protection that appeared
on the QDevelS (http://www.planetquake.com/qdevels) web board.

I'd like to thank clans VxK, FLEA, TUF2, and OLYMPUS for their extensive 
playtesting and moral support over the course of the development of Quake2 
Battleground through version 1.03, particularly Erick Waldchen (a.k.a.
fester[VxK]), who coordinated many tests in my absence and who spent quite a
few nights stress-testing this thing with me on my testing port.

Thanks go out to clans Abuse (http://abuse.woo-hoo.com) and Mainstream
Resistance (http://www.clanmr.com) for beta-testing the Win32 version of
Quake2 Battleground v1.20.  Their bug reports and suggestions helped make
v1.20 what it is...

Of course, everyone thanks WhiteFang for ZbotCheck.  The Zbot detection in
Quake2 Battleground, while based on a similar concept, is *not* his plug-in.
In versions greater than v1.29, detection is done using a different scheme,
based loosely on both ZbotCheck and on the methods used by Riviera (Peter
Engstrm, riviera@earthling.net, check out RivCTF at
http://http://www.d.kth.se/~d94-pen/RivCTF).

I am very grateful to Simon Taylor aka [NKO]Jesus (simon@quake.skirmishhq.co.uk)
and Greg Fedyck aka {abfab}Pyro (greg@quake.skirmishhq.co.uk) for the
Linux/Alpha port of Quake2 Battleground.

Finally, I need to thank James D. Stearns (Oops) of the Online Gaming League 
for his continued support, both verbal and material (i.e. the discussion forum 
and the server space), for this project.

As of v1.35, Quake2 Battleground is hosted by PlanetQuake
(http://www.planetquake.com).

Thanks also to all of you who have sent me bug reports, suggestions, and other
feedback.

Contact Information
-------------------

Ernie Pistor
Email: punisher@ogl.org
Web site: http://www.planetquake.com/battle
Web forum: http://www.ogl.org/cgi-bin/bbs/forumdisplay.cgi?action=intro
