
========================================================================================
Title                   : Base Defence
Filename                : QBDsv91.zip
Version                 : 0.91 (beta)
Release date            : 13/12/97
Author                  : Tom "Lab Rat" McKeown
Email                   : tom@jmckeown.demon.co.uk
Quake Clan              : The Peace Corps

Only servers need download this patch.  The original QBD.zip is needed for clients (and
in ADDITION to this file for servers).

Introduction
------------

"A few men defending their home are greater than an army fighting without cause."

Teamplay and co-operation are key to this deathmatch mod.  Teams take it in turns to 
defend a fortified base.  Access to the enemy base requires the successfull distruction of
a perimiter wall or doorway.  A button deep within the base triggers the fall of the 
base to an attacking player.  Bonuses are structured to reward teamplay and make it 
advantageous to take the base quickly and to hold it for as long as possible.
(Note Base Defence is NOT Team Fortress.)

This patch has been designed using Threewave's CTF code.  This was intentional so that
setting up a Base Defence server will be as similar as possible to setting up a 
CTF server.  Also, so that players of CTF will quickly be able to settle into playing QBD.

Credits
-------

The Peace Corps are:- 

Tom 'Lab Rat' McKeown - tom@jmckeown.demon.co.uk
     Programming, Art work and levels.
Tim 'TricksteR' Moxon - trickster@naff.demon.co.uk
     Original Base Defence idea, levels (to come soon).
Warren 'Waz' Moore
     Levels (to come soon).
Steve 'Gandlaf' Masters
     Levels (to come soon).
Naff 
     Levels (to come soon).

Thanks to:- 

Dave 'Zoid' Kirsch - zoid@threewave.com
     For Capture the Flag, the code on which this mod based.
John 'Guru' Spickes - jspickes@eng.umd.edu
     For improving Quake's teamplay options in the JTEAM patch.
Michael 'McBain' Peckman 
     Previous weapon command.
Ryan 'Ridah' Feltrin - ridah@frag.com
     Advice on Quake graphics editing.
Cable Hicks - hicks@goldrush.com
     Author of AdQuedit <http://goldrush.com/~hicks/adquedit/> an excellent editor 
     which replaced several other utilities.

Type of Mod
-----------
Quake C  : yes
Sound    : yes
MDL      : yes

Format of QuakeC
----------------
.qc files     : yes
progs.dat     : yes

Installation
------------

READ THESE INTRUCTIONS CAREFULY BEFORE ATEMPTING TO INSTALL THIS MOD.

1)      Make a directory parallel to QUAKE/id1 named 'base'.

2)      Place the files from this archive into this directory.

3)      Use shortcuts or command line options to run Quake with a '-game base' command.

4)      Connect to a server running base defence.

Description of the Modification
-------------------------------

Teamplay 
        (much of this documentation comes from John Spickes Complete
        Enhanced Teamplay Patches).
        
        The Complete Enhanced Teamplay is a QuakeC mod which is intended
        to provide a great deal of flexibility in teamplay settings.  I've
        retained all of the original functionality of [Quake v1.06] and my
        previous Enhanced Teamplay, and added many more features.  My aim
        is to have lots of useful teamplay options which the server can
        select at will, while minimizing my modification to the original
        QuakeC code.  The options included in this release are:

        * Players' health can be protected from friendly fire damage
        * Players' armor can be protected from friendly fire damage
        * Damage inflicted to teammates can be mirrored on the attacker
        * Frags can be deducted for the killing of teammates
        * Players can be killed for killing their teammates
        * Players can be required to use only colors specified by the server
        * Players can be prohibited from changing teams
        * Players can be allowed to drop ammo and weapons

        All these options can be turned on and off individually.

        Teamplay feature use:

        A lot of options can be configured with this mod.  The majority of
        these options are configurable using the teamplay variable.
        This mod uses the teamplay variable as a bitfield, with each bit
        associated with a different teamplay option.  The bits are as follows:

        1       Health Protect
                Players receive no health damage from teammates' attacks.
        2       Armor Protect
                Players receive no armor damage from teammates' attacks.
        4       Damage to Attacker
                A player who attacks his teammate will receive the same
                damage the teammate would have received, had he not been
                protected.
        8       Frag Penalty
                Any player who kills his teammate will be penalized frags.
                The number of frags to penalize is adjustable by a simple
                edit in the teamplay.qc file.
        16      Death Penalty
                Any player who kills his teammate will burst apart in a
                bloody mess.
        32      Team Color Lock
                Players will only be allowed to be certain colors.  Team
                colors can be specified for up to four teams in the
                teamplay.qc file.  Players who have illegal colors
                when they enter will be put into the team with the fewest
                members.  Any player who changes team (pants color) will
                be fragged and their frag count is reset to zero.
        64      Static Teams
                Players will not be allowed to change teams.  
        128     Drop Items
                Players will be allowed to drop ammo and weapons.  
                IMPULSE 20 will drop a backpack and IMPULSE 21 will 
                drop the current weapon.
        256     Base Defence
                This enables Base Defence support.
        512     Removed for Base Defence.
        1024    Enable the ability for players to select a team
        
        Obviously, not all these options make sense together.  teamplay 9
        doesn't really make sense, because you couldn't ever kill a
        teammate, and thus you could never incur the one frag penalty.
        To select multiple options, add the numbers of the options together.

        Examples:
        teamplay 96     Team Color Lock, Static Teams
                This results in players being automatically assigned to
                teams and not allowed to change to other teams.
        teamplay 3      Health Protect, Armor Protect
                You can't hurt your teammates' health OR armor.
        teamplay 28     Mirror Damage, Frag Penalty, Death Penalty
                When you shoot your teammates, you take damage and so
                do they.  If you kill a teammate, you'll take a frag
                penalty and you'll be killed.
        teamplay 483    Static Teams, Color Lock, Health Protect, Armour
                Protect, Base Defence, Drop Items
        teamplay 419    Color Lock, Health Protect, Armour
                Protect, Base Defence, Drop Items

        [I personaly use teamplay 1505; Health protect, Lock Colors, Static Teams
        Drop Items, Base Defence and Team Select.]

        Besides the teamplay setting, there are some other options that can
        be modified by editing the source.  These options are constants at
        the beginning of teamplay.qc and are marked so you can find them.
        One option specifies the default frag penalty.  This is the number
        of frags that will be deducted by the bit-field Frag Penalty setting.

        There are four constants in teamplay.qc which allow configuration of
        the teamlock settings.  TEAM_COLOR1 thru TEAM_COLOR4 have values
        indicating a legal team color, or -1.  A value of -1 indicates that
        this team is not used.  Thus, the number of teams is adjustable
        from 1 to 4.

        Example:

        float   TEAM_COLOR1 =   4;
        float   TEAM_COLOR2 =   13;
        float   TEAM_COLOR3 =   -1;
        float   TEAM_COLOR4 =   -1;

        This setting indicates that there should be two teams.  Team 1's
        color is red and team 2's color is blue.  Teams 3 & 4 are not used
        and thus have a value of -1.

        If you change any of the constant values, you must recompile before
        your changes will take effect.

                      THE COMPLETE ENHANCED TEAMPLAY

                              Programming by
                          John Spickes aka Guru
                          jspickes@eng.umd.edu                               
        [Please send any comments about this patch to Lab Rat.
        Don't bug John about my mods].

Base Defence

        Base Defence (QBD), is a variation of Quake's teamplay mode, partialy
        inspired by Zoid's teamplay modifications in Capture the Flag.  

        Each level contains some sort of base; a castle, stockade, fort, etc.
        The players are split into teams, one of which is in defence of this 
        base.  The attcking players may be able to access the base in several 
        ways, the main one being some sort of weakness in the structure of this
        base.  Once this weakness has been distroyed a button within the base 
        will cause the teams to be swapped and bonuses to be scored.  The defending 
        team is - of course - trying to prevent this from happening.

        Rules:
        
        - A section of the map is designated as a Base.
        - Upon joining a game you will be assigned to a team (you may be able to 
          choose which).  Changing teams may or may not be allowed depending on 
          the setting of the teamplay variable.
        - You will always be spawned in a relivent place on the map.  This prevents 
          attakers from gaining early access to the base button.
        - When an attacker presses the base button the teams are swapped.  All of
          the defending team are gibbed, the person who pressed the button gaining this
          number of frags.  All the players on his or her team recive a bonus 
          and are teleported into the base.
        - There are a number of bonus scores to reward teamplay.  These are weighted
          towards the defending team to make holding the base an advantage.
        - Some bases may be equiped with motion sensors and alarm systems to aid defence.
        - The defending team may repair their wall by attacking it with an axe.
        - Teams are automaticaly swapped on a level change.  The team that defended
	  least reacently taking the base.

MOTD
        Message of the day function.  To change it edit client.qc
        and edit the text near the top.  There are different messages for
        regular deathmatch, team mode and base defence.

Telefrag Delay
        When telefragged, the person who was killed stays dead for two to
        five seconds.  This is needed to get rid of the "frag snowball" effect
        one sees at the beginning of a new level, when 16 players try to
        fit into five deathmatch spots.  The telefrags would snowball and
        eventually crash the server.  With this delay, it is eliminated.

Impulses
        The new impulses in Base Defense take the same number as any analogous 
        function in Capture the Flag.

        Impulse Default Key  Function
           20       A        Throw a backpack of ammo.
           21       W        Throw your current weapon.
           23       R        Displays the status of the wall. 
           25       O        Lists the server set teamplay options in operation.
           69       None     Select the last weapon in use.
          141       I        Identifies the player in front.
         
        Note; these impulses are loaded before the config.cfg and autoexec.cfg
        files are implimented.  Any uses you already have for these keys will
        over-bind these functions. 

History
-------

What's new in 0.91
Rewrote a large portion of the code so that QBD can support up to four teams.  Hard coded
the level changes since I forgot to place a changelevel trigger in my maps.  Removed 
in-game team color changes.

Version 0.90
First beta releace of QBD.

Copyright and Distribution Permissions
--------------------------------------

Authors MAY use these modifications as a basis for other
PUBLICALLY available work.

You MAY distribute this patch over any electronic distribution network.  You MAY NOT charge
money for this patch other than to cover the cost of the distribution.

You MAY set up Internet servers running this beta version, but please look out for the 
release version since this will no doubt contain more levels and better balanced gameplay.

Tom 'Lab Rat' McKeown clams no responsibility for the correct spelling of defence/defense, 
nor color/colour and will take NO undue action to change any occurrence of one to the other.
Comments on any other part of this patch are welcome.
