-------------------------------------------------------------------------

###### HOW TO INSTALL:
----------------------

This section assumes that you are a server administrator.

# TESTING:
------------
  For testing purposes you may first want to try the precompiled "progs.dat".
  To do so just follow instructions in the two sections
  "EXTRACTING THE ARCHIVE" and "STARTING THE SERVER" below. You can skip all
  intermediate sections.
  Note that no root password is used in the precompiled "progs.dat",
  therefore remote server administration is not available in this test 
  version.

# CUSTOMIZATION:
------------------
  This version of ServerModules is based on Quake 1.06.
  The sources included in this archive are self-contained.
  If you only want to make minor changes you merely have to
  edit and recompile the sources contained in this archive.
  Note that most of the monster sources are not included
  here since they are not needed to compile ServerModules.

# EXTRACTING THE ARCHIVE
------------------------
  Assuming that your quake executable lives in the directory
  "c:\games\quake\", you should unzip the archive in the directory
  "c:\games\quake\".
  This creates the subdirectory "c:\games\quake\modules". The sources
  of "ServerModules" are located in "c:\games\quake\modules\src"

# PREPARING AUTOEXEC.CFG
------------------------
  Some server properties are triggered by the variable 'teamplay'
  defined in the file "c:\games\quake\modules\autoexec.cfg".
  Please modify the defaults there according to your wishes.

# ENABLING/DISABLING MODULES
----------------------------
  To disable/enable specific modules and settings not already specified
  via the 'teamplay' variable you should edit the "use_module_*"
  constants in file "_modules.qh".
  By default you'll find there
     float use_module_admin			= 1;
     float use_module_burn			= 1;
     float use_module_ctf			= 1;
     float use_module_drone			= 1;
     float use_module_exitrules			= 1;
     float use_module_hook			= 1;
     float use_module_init			= 0;
     float use_module_kicksuicider		= 1;
     float use_module_levelselect		= 1;
     float use_module_lightning			= 1;
     float use_module_messages			= 1;
     float use_module_motd			= 1;
     float use_module_observer			= 1;
     float use_module_protect			= 1;
     float use_module_rank			= 1;
     float use_module_random			= 1;
     float use_module_serverhelp		= 1;
     float use_module_skin			= 1;
     float use_module_serverconsole		= 1;
     float use_module_shrapnel			= 1;
     float use_module_telefrag			= 1;
     float use_module_vote			= 1;
     float     use_submodule_vote_exit		= 1;
     float     use_submodule_vote_exitrules	= 1;
     float use_module_weldgun			= 1;
  which means that except of module 'Init' all modules are enabled.
  The" use_submodule_vote_*" constants above enable/disable submodules
  of the the module 'Vote'. Setting  use_submodule_vote_exit" disables
  voting for exiting but voting for overriding ExitRules will
  still be allowed.
  Note that not all of the settings have any effect since the 'teamplay'
  variable will override some of the above specifications.

# LEVEL SELECTION
-----------------
  The Module 'LevelSelect' allows to specify which maps are offered on
  the server and in which order they are played.
  To achieve this the function 'LevelSelectSelectLevel' in the file
  "_levsel.qc" is used. The file also contains a commented example
  which tells you how to set up you own conditions (for instance how
  to exclude certain not-so-good maps).
  By default this module is set up so that for regular deathmatch
  everything works like in the original version of Quake, except that
  when a player selects the 'end' level the map sequence 'dm1'-...-'dm6'
  is played instead. Also by default only regular id levels are played
  in CTF mode.

# CAPTURE THE FLAG TEAMPLAY
---------------------------
  There are no special requirements to play CTF, provided you enabled
  the module via the 'teamplay' variable in your "autoexec.cfg".
  You especially don't need to patch any of the standard id levels
  for CTF compatibility since all relevant information is included in
  the source code of module CTF already.
  Certainly you may also provide specialized external CTF levels.
  If you want to do so I recommend to change the level selection
  accordingly (see 'LEVEL SELECTION' above).
  Note that you may also switch between CTF and ordinary deathmatch
  from level to level. 
  Also, CTF teamplay is automatically disabled if a level doesn't provide 
  all required information (like flag positions). CTF will then be enabled
  on the next 'CTF playable' level.

# REMOTE SERVER ADMINISTRATION
------------------------------
  Choose your password for remote server administration if you are using
  module 'Admin'. To do so please consult the section 'Defaults' found
  at the beginning of the file '_admin.qc'.

# MESSAGE OF THE DAY
--------------------
  To change the message-of-the-day displayed when a player connects to
  the server you should edit the file "_motd.qc" and change the variable 
  'motd_motd' in the function 'MotdInit'.

# HOOK CUSTOM SOUNDS AND CUSTOM MODEL
-------------------------------------
  David Kirsch's CTF package (found on http://www.threewave.com)
  provides a few specialized sounds and a nice new model for
  the hook (files: weapons/chain1.wav,weapons/chain2.wav,
  weapons/chain3.wav,weapons/bounce2.wav,progs/star.mdl).
  If you have these files and want to use these enhancements on your
  server just set the appropriate flags at the beginning of the file
  "_hook.qh".
  Be aware that this requires that every client has these files
  as well, otherwise he will not be able to connect or play properly.

# PROVIDING HELP FOR PLAYERS
----------------------------
  To change the help text about server settings (which is displayed when
  connecting to a server or when typing 'help-server') just edit
  the function 'ServerHelpShowServerSettings' in the file "_servhlp.qc".

# PROVIDING MORE HELP FOR PLAYERS
---------------------------------
  If you want to inform players about more special properties of your 
  server have a look at the function 'ModulesShowInfo' in the file 
  "_modules.qc". You can freely add your own messages there.

# MISCELLANEOUS
---------------
  - The module 'Messages' by default takes care that a player receives no
    messages when picking up ammunition, armor,  etc.
    If you want to allow for some or all of these messages you should edit
    the file "_message.qh" and change the value of the flag 'messages_flag'.
  - Changing the formula used by the module 'Rank' for calculating the total
    score requires you to edit the function 'RankCountEvent' in the file
    "_rank.qc" in an obvious way.
  - Updating the module 'Skin' may become desirable if new skins become
    available in the file "player.mdl" which is distributed as part of the
    MultiSkin package. The changes you will have to make are trivial,
    just consult the file "_skin.qc".

# COMPILING THE SOURCES
-----------------------
  Copy the executable of the QuakeC compiler into the directory
  "c:\games\quake\modules\src".
  Change directory to "c:\games\quake\modules\src" and start the compiler.
  This will generate the file "c:\games\quake\modules\progs.dat".

# STARTING THE SERVER
---------------------
  Change directory to "c:\games\quake" and type
     quake -game modules -listen 2
  If you're sure that everything works as expected start your
  dedicated server as usual, for instance by typing
     quake -game modules -dedicated 8 +map e1m2
  or according to your wishes.

-------------------------------------------------------------------------
      
###### Resources Used:
----------------------

The following impulses are used:

    impulse 23      for CTF status report
    impulse 97      to release the hook.
    impulse 98      to throw the hook.
    impulse 100-180 for root password used by module 'Admin'
    impulse 151     for command 'root-restart'
    impulse 152     for command 'root-nextlevel'
    impulse 153     for command 'root-kick'
    impulse 154     for command 'root-logout'
    impulse 155     for command 'root-teamplay'
    impulse 156     for command 'root-fraglimit'
    impulse 157     for command 'root-timelimit'
    impulse 158     for command 'root-noexit'
    impulse 159     for command 'root-gravity '
    impulse 160     for command 'root-friction'
    impulse 161     for command 'root-level'
    impulse 162     for command 'root-teams'
    impulse 200     for command 'skin-next'
    impulse 201     for command 'skin-prev'
    impulse 202     for command 'help-skin'
    impulse 203     for command 'rank'
    impulse 204     for command 'help-rank'
    impulse 205     for command 'help-observer'
    impulse 206     for command 'observer-noclip'
    impulse 207     for command 'help-server'
    impulse 208     for command 'init-nextcall'
    impulse 209     for command 'init-nextskin'
    impulse 210     for command 'help-exitrules'
    impulse 211     for command 'help-vote'
    impulse 212     for command 'votes'
    impulse 213     for command 'vote-exit'
    impulse 214     for command 'vote-exitrules'
    impulse 215     for command 'help-drone'
    impulse 216     for command 'help-shrapnel'
    impulse 217     for command 'help-weld'
    impulse 218     for command 'help-modules'
    impulse 219     for command 'help-hook'
    impulse 220     for command 'help-ctf'

-------------------------------------------------------------------------

###### Files:
-------------

_modules.qh
_modules.qc       Deals with internal structure of ServerModules.
_omit.qc          Contains dummy spawn functions for excluded monsters.
_plystat.qh
_plystat.qc       Deals with internal structure of ServerModules.
_admin.qh         Module Admin (Header)
_admin.qc         Module Admin (Code)
_burn.qh          Module Burn (Header)
_burn.qc          Module Burn (Code)
_ctf.qh           Module CTF (Header)
_ctf.qc           Module CTF (Code)
_drone.qh         Module Drone (Header)
_drone.qc         Module Drone (Code)
_exitrls.qh       Module ExitRules (Header)
_exitrls.qc       Module ExitRules (Code)
_hook.qh          Module Hook (Header)
_hook.qc          Module Hook (Code)
_init.qh          Module Init (Header)
_init.qc          Module Init (Code)
_kckscdr.qh       Module KickSuicider (Header)
_kckscdr.qc       Module KickSuicider (Code)
_levsel.qh        Module LevelSelect (Header)
_levsel.qc        Module LevelSelect (Code)
_lightng.qh       Module Lightning (Header)
_lightng.qc       Module Lightning (Code)
_message.qh       Module Messages (Header)
_message.qc       Module Messages (Code)
_motd.qh          Module Motd (Header)
_motd.qc          Module Motd (Code)
_protect.qh       Module Protect (Header)
_protect.qc       Module Protect (Code)
_observe.qc       Module Observer (Header)
_observe.qh       Module Observer (Code)
_random.qh        Module Random (Header)
_random.qc        Module Random (Code)
_rank.qh          Module Rank (Header)
_rank.qc          Module Rank (Code)
_servhlp.qh       Module ServerHelp (Header)
_servhlp.qc       Module ServerHelp (Code)
_servcon.qh       Module ServerConsole (Header)
_servcon.qc       Module ServerConsole (Code)
_shrap.qh         Module Shrapnel (Header)
_shrap.qc         Module Shrapnel (Code)
_skin.qh          Module Skin (Header)
_skin.qc          Module Skin (Code)
_telefrg.qh       Module Telefrag (Header)
_telefrg.qc       Module Telefrag (Code)
_vote.qh          Module Vote (Header)
_vote.qc          Module Vote (Code)
_weld.qh          Module WeldGun (Header)
_weld.qc          Module WeldGun (Code)
_COPYING          GNU General Public License
_MANUAL           Documentation of ServerModules patches.
_CHANGES          History of changes.
_patch.txt        Provides information how to patch and where
                  to get a free copy of the program PATCH.

All standard QuakeC sources needed to compile 'ServerModules'
are included also.

-------------------------------------------------------------------------
      
###### Copyright:
-----------------

/*
**
** Copyright (C) 1996 Johannes Plass
** 
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
** 
** Author:   Johannes Plass (plass@dipmza.physik.uni-mainz.de)
**
*/

-------------------------------------------------------------------------


