Title    : Clan Arena Server Code
Filename : caserver.zip
Version  : 1.1 BETA
Date     : 11-1-97
Author   : Mungo
Email    : target@radix.net
Webpage  : http://www.planetquake.com/servers/arena
---------------------------------------------------

                                PlanetQuake's
                      Clan Arena mod v1.1 for Net Quake
                      ---------------------------------

Clan arena is like clanring or qwring for the most part. You join a server,
"ready up", and once everybody is set to a team, the match begins.

************
New for v1.1
************

        - new "pickup" command

        - in track cam, your armor and health match the armor and health
          of the person you're tracking

        - "crush" bug fixed

        - All varaibles but "teams" and "rounds" can be set between rounds
          instead of between entire series

        - Server admins can set up their server to be a "pickup" server
          See the section "Server Variables"


********
Features
********

Modes
~~~~~

There are three different modes for clan arena:

- Normal Mode

Normal mode is where there are no teams and there is just one line of people.
People fight, and the winner fights the next player in line. When you lose a
fight, you go to the end of the line.  "players" controls how many people are
put into the arena at once.  If "players" is set to 3, 3 people would play
a 1on1on1.  If set to 4, it would be a 4 way.

- Competition Mode

A certain number of players are chosen from each team, determined by the
"players" setting, and placed into the arena.  When someone dies, someone
from his team replaces him (if there is someone left to replace him), and
everyone in the arena keeps their armor/health.  Once all but one team has
been eliminated, the round ends.  By default, a best of 9 rounds is played.
("rounds" setting controls the number of rounds played).  A different player
from each team starts the next round.  Once the series of rounds ends, the
team with the most wins in given the victory.

- Round Robin Mode

Only one player from each team is put into the arena.  As soon as the fight
ends the winner is teleported out to make room for the next set of players.
The series ends when everyone on a team has had a chance to play against
everyone else.  Keep in mind that this can create a large number of matches.
For example, a 2-team 4on4 would need to play 16 matches.  A 3-team 4on4on4
would be 64 matches long.  This mode should probably only be used for clans
interested in holding "official" matches, with 4 players to a team.
NOTE:  This mode forces "players" to 1, and "rounds" is set automatically

Number of Players
~~~~~~~~~~~~~~~~~

In Clan Arena, the number of players to be put into the arena is fully
configurable.  For example, if "players" is set to "3" on normal arena,
3 people would be put into the arena, making for a 1on1on1, with the last
one standing the winner.
In competition mode, if "players" is set to "2", two players from every
team are put into the arena at once.  For example, if there are 2 teams,
4 people would be put into the arena, making for a 2on2.

Number of Teams
~~~~~~~~~~~~~~~

The number of teams participating at once can be anywhere between 2 and 4.
This controls the MAXIMUM number of teams allowed.  The minimum to start
a game is always 2.

Arena on Any Map
~~~~~~~~~~~~~~~~

Clan Arena doesnt require an arena map to be played.  Clan Arena works
on id maps.  In fact, it can also work on any map, as long as the map
is specified as a "custom" map in the server progs.

Spectators on id Maps
~~~~~~~~~~~~~~~~~~~~~

All non-players are non-solid spectators who can not be seen or heard. All
spectators are color 0 (white). A non-solid spectator cannot move through
a solid player.  While you are a spectator, you can either walk around on
your own, or use the tracking camera. To use the tracking camera, press the
attack button, and then use the jump button to track the various players.
If you want to exit the track cam mode, just press the attack button.

Re-joining a Series
~~~~~~~~~~~~~~~~~~~

If you want to substitute someone on a team that is missing a player, then
in the time between rounds in the series, have them set their colors to
match the colors of the team they will join.  If the team is missing a player,
then the person will be added to the team for the next round.

************
Server Setup
************

To set up a Clan Arena server,
1. Extract the files in the caserver.zip into a 'quake\carena' directory.

If you want to run Rocket Arena maps on your server,
2. Copy the pak0.pak from your Rocket Arena (quake\arena) directory
into your Clan Arena directory (quake\carena).
OTHERWISE:
   Rename the pak1.pak from the caserver.zip to pak0.pak

3. Read the section "Server Variables" to decide what options you want to
   enable.

4. Run the server with: winquake -dedicated 16 -game carena +whatever_other_options_you_want

5. Clients MUST run quake with -game arena to connect.


********
Commands
********

settings
~~~~~~~~

This command is like modstatus in qwring, it shows the current settings of
the clan arena mod.  The descriptions of the settings are:

weapons         shows an abbreviated name for each weapon that's enabled

atype           - armor type. 1 = red armor, 2 = yellow armor,
                              3 = green armor, 4 = no armor

armor		- how much armor you start with.
health		- how much health you start with.

(NOTE: an ammo value of 700 specifies unlimited ammo of that type of ammo.)

shells		- number of shells you start with. 
nails		- number of nails you start with.
rockets		- number of rockets you start with.
cells		- number of cells you start with.

teamplay        - standard teamplay variable.  0 = no teams, 1 = cant hurt own
                  team or self, 2 = teams, no damage avoidance, 3 = cant hurt
                  teammates but can hurt self
players		- number of players from each team to fight at the same time.
NOTE:           There are two different players settings.  One is for Normal
                mode and defaults to 2, the other is for Competition mode and
                defaults to 4.
teams           - maximum number of teams.

mode            - current mode of server.
                  (Normal, Competition, or Round Robin)

playerlist
~~~~~~~~~~

The playerlist command shows which team each player belongs to. If the team
field is blank for a player, it means that player is not on a team.
Thre are 4 fields, labeled "F D H S".  They mean, "fired", "direct hits",
"hits", "self-inflicted", respectively, and are a total accout of all the
rockets the player has fired.  These numbers are reset at the beginning of
each series.

yes
~~~

This command is used to vote yes for an election to admin.

no
~~

This command is used to vote no for an election to admin.

listmaps
~~~~~~~~

Lists the maps in the map loop.  The map loop is defined in the server
progs.

elect
~~~~~

Used by a normal player to become admin.  During the voting time, a person
votes with "yes" and "no".

ready
~~~~~

Creates or adds you to the team with the colors you have.
To specify your team, just set your colors to the colors of the team you
want to create/join.  Once you're committed to a team, you are not
allowed to change your colors.  To be taken off a team, use the "notready"
command.  If your colors are white, you are either added to the smallest
team, or if there are no teams, you are assigned a color.

admin
~~~~~

Use this command to become an admin if you enter the correct admin code. The
admin code is four digits, and you enter one digit at a time.

commands
~~~~~~~~

List available commands, and the impulse for the command.

notready
~~~~~~~~

Removes you from the team you have specified, and if you were the only player
on your team, "notready" clears the old team.

scores
~~~~~~

Only works in either Competition or Round Robin modes.  It shows the teams
participating in the current series and how many wins/losses/forfeits they
have.

sbup, sbdown
~~~~~~~~~~~~

Use these to increase/decrease the resolution of the status bar seen in
trackcam mode.  DO NOT increase the size of the status bar beyond the
resolution of your screen.  At its lowest setting, the status bar is turned
off.


**************
Admin Commands
**************

pickup
~~~~~~

Clears the teams and colors for everyone on a server.  Can only be used
in Competition or Round-Robin modes when a series is not being played.
It clears any teams already created so you will need to set your team
and type "ready" again.
Useful to help set up a pickup game.

modeset
~~~~~~~

This command swicthes the mode of the clan arena mod.
If the server is running in "pickup" mode, this command is disabled.

warp
~~~~

This command is used to change maps. Enter one number at a time.
If you want to choose an id map, enter the episode number for the
first digit, the second digit is the level number.  Deathmatch maps
are chosen with 5, episode 1 with 6, episode 2 with 7, and so on.
For example, to choose dm6, enter:
warp
5
6

To choose e1m2, enter:
warp
6
2

reset
~~~~~

Use this command to reset the mod, without switching through the different
modes.

force
~~~~~

This command is used to start a series even though all players have not
readied up.

kick
~~~~

When you enter this command, a list of players and their associated player
numbers will be displayed. To remove a player from the server, enter the
number of the player you wish to kick. Remember to enter one digit at a time.

lock
~~~~

This command toggles whether or not the server is locked. When the server is
locked, no players are allowed to join the server.  See: autolock.  If the
server is locked manually with this command, autolock will be disabled.
The server automatically unlocks if there are no more players on the server,
or the level is changed.
If the server is running in "pickup" mode, this command is disabled.

tmset
~~~~~

Use this to cycle between the different teamplay settings.

tmup, tmdown
~~~~~~~~~~~~

Use these to increase/decrease the number of the "teams" setting.

atset
~~~~~

Use this to cylce between the different "atype" (armor type) settings.

amup, amdown
~~~~~~~~~~~~

Use these to increase/decrease the armor setting.

hup, hdown
~~~~~~~~~~

Use these to increase/decrease the health setting.

plup, pldown
~~~~~~~~~~~~

Use these to increase/decrease the number of the "players" setting.

rdup, rddown
~~~~~~~~~~~~

Use these to increase/decrease the number of the "rounds" setting.

shells, nails, rockets, cells
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Use these to cycle between the different values for each type of ammo.
The values are 0, 30, 100, 700(infinite).

sg, ssg, ng, sng, gl, rl, lg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Use these to toggle on/off a specific weapon

************
Server Flags
************

Server flags are specified in the "skill" variable.  The "skill" variable
is treated as a bitmask, with each bit having a different meaning

skill & 1 -- #1 (sounds)
~~~~~~~~~

The clan arena mod may be configured to use two sets of sounds. If you prefer
the Street Fighter sounds, set the bit 0 to 1. If you prefer the Mortal Kombat
sounds, set bit 0 to 0. The Mortal Kombat sounds are used by default.

skill & 2 -- #2 (autolock)
~~~~~~~~~

If bit 1 is set to 1, then the server automatically locks iself before
each series begins, and unlocks after each series.  If set to 0, autolocking
is disabled.

skill & 4 -- #4 (pickup server)
~~~~~~~~~

If bit 4 is set to 1, then the server is put into "pikcup" mode, which is
similar to the "dedicated" mode in qwring.
In "pickup" mode, the the mod behaves differently in the following ways:

        - The mod is always in "competition" mode

        - The "modeset" and "lock" commands are disabled

        - There's no server timeout

        - The "autolock" server variable still works, since it's the
          server admin's decision whether or not the server be locked


To figure out the value of "skill", you add the numbers of the different
options together.  For example, if you wanted Street Fighter sounds and
pikcup server mode enabled, you'd add 1 and 4 together, so skill should be
set to "5".  If you wanted autolock enabled and pickup mode enabled, you'd add
2 and 4 together, so skill should be set to "6".


*******
Credits
*******

Authors
~~~~~~~

Mungo   (target@radix.net)      Coding
eof     (apathy@cw.umd.edu)     Server admin, ideas, testing, docs

Thank yous
~~~~~~~~~~

Gemini:                 idea of arena on id maps
Sketch:                 original trackcam idea
crt:                    doc help
Phazer, TvAddict:       suggestions
Zoid:                   street fighter sound effects
Angoris and Gemini:     original arena conecpt
SS|NiOXiN:              original arena map

Testers
~~~~~~~

clan SS:                NiOXiN, Soylent, Rush, BodyCount, MicroMegas, Grunt
clan EW:                Artemis, Glock, Sketch, Monk3y, Cloud, Nitro, Nova
clan EG:                Drakken, Pistdov
clan WD:                RCade
clan Cluck:             Mib, Roadwar
clan FFF:               Psy, DemonX
Phazer, TvAddict, Nacho, P00p, Peaches, Hawk'D, Tess[eh]

NOTE:  This list doesnt have all the names, since we couldnt possibly
       remember them all.  A big thanks goes to all the testers, and
       sorry if we missed your name here!
