Title    : Elohim Server V4.0
Filename : elohim40.zip
Version  : 4.0
Date     : March 2, 1998
Author   : J.P. Grossman (a.k.a. Mephistopheles)
Email    : jpg@ai.mit.edu
URL      : http://elo.home.ml.org

============
User's Guide
============

    ----------
1.0 Play Modes
    ----------

The Elohim server supports the following three play modes:

Normal   -  Standard FFA deathmatch mode.

Match    -  Match mode for tournament play (see section 2)

Practice -  Phat respawns (200 armour, 100 health, all weapons)
         -  Unlimited ammo
         -  When you damage another player, the player name and the
            amount of damage are displayed on the screen
         -  When you are killed, the health of the person who killed you
            is displayed on the screen
         -  Weapon, ammo and backpack items do not appear (this reduces
            network traffic)

By default, the server starts up in normal mode.  To start it in match mode
use +samelevel 2 in the command line.  To start it in practice mode use
+samelevel 4.  Note: these command line settings only work for dedicated 
servers.

    ----------            
2.0 Match Mode
    ----------

Match mode provides tournament play between two teams.  All players are
gibbed at the start and end of a match, and a team's score is the sum of the
frags of each player on the team.

2.1 Joining a Match

As in Clanring, all players start in observer mode.  To join a team, first
choose a colour by typing 'color <shirt> <pants>' in the console, or just
'color <pants>' (e.g. 'color 8 2').  Then type 'ready' to commit to the
team with the specified pant colour.  To uncommit yourself type 'notready';
this only works *before* the match begins.  At any point before or during
the match type 'observer' to leave the match and become an observer.

2.2 Timer

By default, the timer starts when there are two teams and all non-observers
are ready.  The match begins one minute after the timer starts.  If a player
uncommits the timer stops; it will restart (at T minus one minute) once
all players are ready.  All items will respawn at T minus 30 seconds.

If there are two teams present but someone is not ready, players may vote
to force the timer to start using the 'timerstart' command.  During
the match players may vote to pause the match using the 'timerstop'
command, then restart it using the 'timerstart' command.  At any point if
both teams become empty then the match is aborted and the timer is stopped.

2.3 Team Size

Team size is set dynamically; when the match begins the teamsize is taken
to be the size of the larger of the two teams.  Once the match has started,
a player may only join a team whose size is less than this teamsize.  To
remove this restriction and allow players to join at will, match participants
must vote to unlock the match using the 'unlock' command.  After new players
have been joined, the teamsizes can be re-capped using the 'lock' command.

2.4 Ghosts

When a player commits to a team they are assigned a three digit ghost code.
If the player becomes disconnected during the match, they can reconnect and
enter their ghost code using the 'ghost' command to rejoin the match and
restore their colour, frags and statistics.  This is the ONLY circumstance
under which a player may ghost themselves; in particular a ghost code
cannot be used if the owner of the ghost is still connected to the server,
and if a player leaves a match by becoming an observer their ghost is
destroyed.

2.5 Match Start Points

Match start points may be specified in addition to the usual spawn point to
prevent telefrags at the start of a match.  They are ONLY used at the start
of a match, and they are only used if there are more players than spawn
points.  Match start points for a level are specified in that level's
entity file (see section 8).

2.6 Spawning

All players spawn simultaneously at the start of the match independant of
whether or not they are pressing jump/fire.  Durint the match, press jump or
fire to respawn after being killed.  Players are respawned automatically
after being dead for 5 seconds.

2.7 Overtime

Administrators may specifiy an overtime of 1, 2, 3, 4, 5 or 10 minutes.  If
the match is tied at the end the overtime automatically starts; the overtime
period will repeat until the tie has been broken.

    -------------
3.0 User commands
    -------------

help          impulse   description
----          -------   ------------
help-server     100     Show main help commnds
help-match      139     Match mode help
help-misc       105     Misc commands
help-observer   101     Show observer commands
help-walk       144     Show observer walk mode controls
help-fly        145     Show observer fly mode controls
help-chase      146     Show observer chase mode controls
commands        106     List all commands and impulses
levels          107     List all levels recongnized by the server
vinfo           117     Show server version info

match         impulse   description
-----         -------   ------------
ready           120     Used to commit in match mode
notready        121     Used to uncommit in match mode
unlock          122     Request to unlock match (allows new players to join)
lock            130     Request to re-cap the team sizes
ready?          123     List the players that are not ready
timerstop       124     Request to pause a match
timerstart      125     Request to start/restart the timer
ghostcode       126     Display your ghost code
ghost           127     Restore yourself from a ghost
score           128     Show time left and score in match
timelimit5      215     Request change in match timelimit to 5 minutes
timelimit10     216     Request change in match timelimit to 10 minutes
timelimit15     217     Request change in match timelimit to 15 minutes
timelimit20     218     Request change in match timelimit to 20 minutes
timelimit25     219     Request change in match timelimit to 25 minutes
timelimit30     220     Request change in match timelimit to 30 minutes

observer      impulse   description
--------      -------   ------------
observer        140     Toggle observer mode
walk            141     Enter walk mode
flyme           142     Enter fly mode
chase           143     Enter chase mode
eyecam          149     Enter eyecam mode
cycle           147     Cycle through walk/fly/chase modes
headsup         148     Enable/disable heads up display

misc          impulse   description
----          -------   ------------
admin           108     Enter admin code
motd            109     Show the message of the day
yes             120     Used for voting
no              121     Used for voting
normal          208     Request to set playmode to 'normal' (FFA)
practice        209     Request to set playmode to 'practice'
match           210     Request to set playmode to 'match'
setquad         221     Request to enable/disable quad
setpent         222     Request to enable/disable pentagram
setring         223     Request to enable/disable ring of shadows
nogibs          225     Request to disable gibs
lowgibs         226     Request to set gibs to 'low' (less network traffic)
highgibs        227     Request to set gibs to 'high' (default quake gibs)
killstats       110     View kill statistics for each player
efficiency      111     View weapon efficiency statistics for each player
stats           112     View kill/weapon summary statistics for each player

To request a level change, enter the name of the level in the console.
Valid level names are:

    start       - Start level; stairs appear if all runes are present
    start0      - Start level; force no stairs
    start1      - Start level; force stairs
    end         - End level
    e1m1-e1m8   - Episode 1
    e2m1-e2m7   - Episode 2
    e3m1-e3m7   - Episode 3
    e4m1-e4m8   - Episode 4
    dm1-dm6     - Deathmatch levels
    <any user specified level>

User specified levels are defined in userdefs.cfg and added to progs.dat
using the crmake utility.

All requests (timelimit, gibs, level change, etc.) are followed by a vote.
Votes are passed by majority; observers only get 1% of a vote (i.e. the
observer votes will only count as tie-breakers).

    ------------------
4.0 Administrator Mode
    ------------------

To become an administrator, use the command 'admin' and then enter the code
digits in the console one at a time.  The file admin.scr will do this
automatically for the supplied password - to use it place it in your id1
directory and type "exec admin.scr" in the console (it is recommended that
you change the password by editing crmod.cfg and admin.scr). Administrators
can participate in the game.

All user commands are available to administrators.  Requests are granted
immediately (there is no vote).  In addition, if a non-administrator
initiates a vote, then the vote is either passed or cancelled immediately
if the administrator enters 'yes' or 'no' in the console.

The following commands are available to administrators only:

command       impulse   description
-------       -------   ------------
ghostlist       212     List all ghosts in the database
kick!           213     Kick a player
abortmatch      214     Aborts a match in progress
modevote        228     Enable/disable voting to change modes
options         229     Brings up the on-screen options menu
nextspawn       246     Go to the next spawn point
makespawn       247     Create a new spawn point
nextcam         248     Go to the next camera
makecam         249     Create a new camera
spot            250     View coordinates and angles for current location

The options menu can be used to set playmode, timelimit (for all modes),
fraglimit, overtime, gibs, teamplay, noexit, pausable, quad, pent, ring,
modevote and sys_ticrate.

Note that cameras are not supported in Elohim 4.0 (you can create them,
but they never get used).  They will be supported in Clanring CRMod++ 4.0.

    -------------
5.0 Observer Mode
    -------------

Anyone can become an observer by typing "observer" in the console.  There are
four observer modes; walk mode, fly mode, chase mode and eyecam mode.  The
observer moves around on their own in walk and fly mode; in chase and
eyecam modes movement is automatic and follows a player of the observer's
choice.  In all modes it is possible to watch the status of any player with
the status bar or a heads-up display; in chase and eyecam modes this is
the player being chased. The heads-up display includes the player name,
health, armour type and value, quad/ring/suit flags, current weapon and
current ammo.  In both walk mode and fly mode the observer automatically
moves through doors, and teleports are functional.

5.1 Walk Mode Controls

In walk mode the observer moves exactly as if they were a regular player, but 
of course they don't interact with the game at all.  This includes jumping
and moving in water.  The only difference is that up and down motion is
faster under water.  The following controls are used in walk mode:

attack      - fly
impulse 1   - pop down through obstacle
impulse 2   - pop forward through obstacle
impulse 3   - pop up through obstacle
impulse 4   - select previous player
impulse 5   - select next player
impulse 6   - move to selected player (in case you lose them)
impulse 7   - select player in line of sight
impulse 8   - deselect player (get rid of heads-up display)

5.2 Fly Mode Controls

In fly mode the observer moves exactly as if they were under water - this 
includes moving up and down (although the up/down motion, as in walk mode, is 
faster than in normal quake).  The following controls are used in fly mode:

attack      - select player in line of sight
jump        - move up
impulse 1   - pop down through obstacle
impulse 2   - pop forward through obstacle
impulse 3   - pop up through obstacle
impulse 4   - select previous player
impulse 5   - select next player
impulse 6   - move to selected player (in case you lose them)
impulse 7   - select player in line of sight
impulse 8   - deselect player (get rid of heads-up display)

5.3 Chase Mode Controls

In chase mode movement is automatic.. the observer chases the currently 
selected player.  The player being chased is remembered across level changes.  
The following controls are used in chase mode:

attack      - freelook
jump        - select next player
impulse 4   - select previous player
impulse 5   - select next player
impulse 7   - select player in line of sight

5.4 Eyecam Mode Controls

eyecam mode is the same a chase mode except that the observer sees through
the eyes of the selected player, rather than chasing them from behind.  The
controls are the same as for chase mode.

    -----------------------
6.0 Server Console Commands
    -----------------------

The following commands can be entered in the console of a dedicated
server:

sping      - VERY approximate client ping times (usually a bit too high)
time       - Show how much time has elapsed on the current level
s          - Show server status, including elapsed time
score      - Show time left and score in match
ghostlist  - List all ghosts in the database
killstats  - View kill statistics for each player
efficiency - View weapon efficiency statistics for each player
stats      - View kill/weapon summary statistics for each player
normal     - Change playmode to 'normal' (FFA)
practice   - Change playmode to 'practice'
match      - Change playmode to 'match'
setspooge  - Enables/Disables discharging in practice mode
vinfo      - Show server version info
commands   - Show list of commands

    ------------
7.0 Config files
    ------------

The file "elohim.cfg" sets the administrator password using the command

temp1 <password>

The password can be any combination of four to seven digits; the first
digit must be non-zero.

The file "levels.cfg" sets the order of levels for normal (FFA) or practice
mode.  The file should contain a list of levels to loop through, one level
per line.  Valid level names are those listed in section 3.  This feature
is only available for dedicated servers.

The file "userdefs.cfg" set the maximum number of suicides per level, the
user-specified levels and the user MOTD.

elohim.cfg and levels.cfg are read by the server directly.  userdefs.cfg is
not read by the server; it is incorporated directly into progs.dat using the
elomake utility.

    -----------------------
8.0 Entity and Camera Files
    -----------------------

When running a dedicated server it is possible to add entites to levels.
The entities directory contains, optionally, one entity file for each
level.  When a level starts, the server attempts to read the entity file
which contains entity definitions.  The format for an entry in an entity file
is as follows:

scr_ofsx <x-coord>
scr_ofsy <y-coord>
scr_ofsz <z-coord>
v_ipitch_level <pitch>
v_iyaw_level   <yaw>
v_iroll_level  <roll>
<entity declaration>

Version 4.0 supports two types of entities: match start points (described in
section 2.5) and regular spawn points; the declarations are 'newstart' and
'newspawn' respectively.  pitch and roll are not used for these entities
(they are forced to 0).  It is also possible to remove spawn points by
specifying the coordinates and using the 'killspawn' declaration (see
e3m7.ent).

The cameras directory also contains one file (optionally) per level which
adds cameras to the level.  The format of the entries in camera files is
the same as the format of the entries in level files; the entity
declaration is 'newcam'.

Note that cameras are not supported in Elohim 4.0 (you can create them,
but they never get used).  They will be supported in Clanring CRMod++ 4.0.

    --------------------------
9.0 Other Features / Bug Fixes
    --------------------------

9.1 Statistics

The server maintains kill and weapon statistics for each player.  The kill
statistics are: total frags, number of enemies killed, number of teammates
killed, number of times killed self, and number of times killed by enemy.
The weapon statistics give efficiencies for bullets, nails, rockets and
lightning gun.  For each of these, efficiency is equal to the total damage
done to enemies and shootable switches divided by the total damage fired.
'damage fired' is computed as follows:

    attack          damage fired
    ------          ------------
    shotgun             24
    super shotgun       56
    nailgun             9 per nail
    super nailgun       18 per nail
    rocket hit          100 + 20 * random()
    rocket splash       120
    rocket jump         0
    lightning gun       30 per frame
    discharge           not counted

Note that rocket jumps not counted towards efficiency statistics.  Statistics
for each player may be viewed using the 'killstats', 'efficiency' and 'stats'
commands.

9.2 Autokicking

In normal and match modes, the server will automatically kick any player
who suicides more than three times on the same level.  In all modes the
server will also kick any player that becomes disconnected for 20 seconds.

9.3 Player Name Check

Clients that connet with names "" or "unconnected" are renamed to "player".

9.4 Suicide during intermission

In original Quake you can suicide ("kill" command in console) during the 5 
second interval between levels.  It's very strange because you reappear with 
size zero and you can move around.. try it the next time you suspect you are
on a server that might not have this bug fixed!

9.5 Impulse 11

This is the cheat command that makes runes appear in the bottom right hand 
corner.  In original Quake, the cheat command was not disabled for deathmatch 
play and any player could enter it.  Due to another bug in original quake,
this could lead to a "trapped at start with stairs showing" condition.

9.6 Non-zero velocity on respawn

In original quake, gibbed players who respawned before their heads stopped
bouncing would respawn with their old velocity.  This has been fixed.

9.7 Teleport time

There is supposed to be a delay time after teleporting during which you
cannot teleport again, but this was not fully implemented.  HPB's are quite
familiar with the result of this on DM5.  This has been fixed.

9.8 Autoswitching

The code has been modified so that when you acquire a lightning gun
underwater (either by picking it up directory or by getting a backpack) you
will NOT switch to that weapon.  You will also not switch to rocket or
grenade launcher when these items are obtained from a backpack.

9.9 Bad respawns in e3m7

Players who were killed in e3m7 often respawned exactly where they died
(which is particularly bad if they died in lava).  This was due to a bad
spawn point which has been removed (see section 8.0).

9.10 IP logging

Every time a new player connect the "status" command is issued to the console
which will display their IP address.  This provides a quick and dirty 
approach to IP logging for those who are able to log the server console.

9.11 Disconnect ghosts

A bug in quake occaisionally causes players to disconnect improperly, leaving
behind a white ghost that players can walk through.  These ghosts are
automatically cleaned up by the Elohim Server.

     --------------
10.0 Bugs not fixed
     --------------

Some QuakeC bugs were found but not fixed because they weren't too drastic
and fixing them would affect game play.  They are mentioned here for the sake
of completeness and interest.

10.1 Reverse Telefrag

Players who teleport onto a player protected by the pentagram were originally
supposed to get fragged themselves with the message "Satan's power deflects
<player>'s telefrag".  However, this was never quite implemented.  The result
is that 50,000 damage points are done to the player with the pentagram (the
usual telefrag).  However, the pentagram keeps the player alive, so the only
effect that the damage has is to nuke whatever armour was left and give the
player one HELL of a push (the momentum that is added when damage is
sustained is proportional to the amount of damage, in this case 50,000).  The
result is that the player suddenly finds himself in a very different place.
This obviously doesn't happen very often, but it's strange as heck when it
does.

10.2 Start with Stairs

There was never supposed to be a start deathmatch level with the stairs 
showing.  The floor of that area has a special flag that causes it to 
dissapear when all four runes are present; this opens the way to the
teleporter that takes you to Shub-Niggurath in non-deathmatch play.  But
there is also a wall which has a flag that causes it to appear in deathmath
play.  The result is stairs that don't lead anywhere!  The original QuakeC
code tried to avoid this by never going back to start with all four runes.
It failed.  The result was a start with stairs, and the "trapped at start"
problem mentioned earlier.  Since some players may actually enjoy this odd
level, it has been included as 'start1' in the Elohim server.

     --------------------
11.0 Recommended Settings
     --------------------

The following settings are recommended for FFA play:

-dedicated 12 -deathmatch 1 +pausable 0 +noexit 1 +sv_aim 2 +timelimit 30 
+fraglimit 50

dedicated 12 allows for a reasonable number of players.  The maximum allowed 
by Quake is 16; this is almost always too many.  Most good servers set the 
limit to 10 or 12.  deathmatch 1 is pretty standard and self-explanatory.  
pausable 0 prevents players from pausing the game, which can be badly abused.  
noexit 1 prevents a rapid progression through levels when there's always one 
person who doesn't like such and such a level.  sv_aim 2 allows players to 
shoot where they aim - it removes the vertical correction that is annoying to 
all experienced quake players.  timelimit and fraglimit are of course more 
subjective.. I have found 30, 50 to be quite reasonable.  Note the *absence* 
of teamplay 1; all serious quake servers use teamplay 0 to prevent really 
cheap tactics with grenades, rocket launchers and lightening gun discharges.

If the server is to be run in match mode, then -dedicated 16 is recommended
to allow for the maximum number of observers, and teamplay will be set to 2
automatically.



Send questions/comments/suggestions/bug reports to jpg@ai.mit.edu
