Title    : Threewave QuakeWorld Capture
Filename : 3wqw10.zip
Version  : 1.00
Date     : 96-12-27
Author   : Dave 'Zoid' Kirsch
Email    : zoid@threewave.com
Credits  : 

John Spickes aka Guru <jspickes@eng.umd.edu> for JTEAM
Aegis - moral support and general overexcited Quake guy
Beowulf - my cat who keeps getting me fragged when he jumps on my keyboard 
  or starts chasing my mouse
"Mike" <amichael@asu.alasu.edu> for Morning Star (Hook)
Tom "Bjorn" Klok <tomtom@mindlink.net> for original ideas such as the runes 
  and capture games, various suggestions and bug fixes.  Check his server at 
  quake.mindlink.net, 204.174.17.22
Kevin "Trojan[CampQ]" Hodgson <kevin@caseware.com> for modifing e4m5.
Byron "Wonko" Long <byron@caseware.com> for adding Flag Status reports 
  via impulse 23.
Michael "McBain" Peckman for the PreviousWeaponCommand (impulse 69)

The level editing team for the 3.0 custom release:
ctf1  McKinley Base          Dave 'Zoid' Kirsch <zoid@threewave.com>
ctf2  The Kiln               Brian Wight <briwig@odc.net>
ctf3  DySpHoRiA              Chris 'b0rt' Thibodeaux <chrislt@u.washington.edu>
ctf4  The Forgotten Mines    Brian Wight <briwig@odc.net>
ctf5  Da Ancient War Grounds Matthew 'DaBug' Hooper <junebug@linknet.net>
ctf6  Vertigo                Dale 'Midiguy' B. <midiguy@crl.com>
ctf7  Tale of Two Cities     Jamie Mactaggart <Maareck@msn.com>
ctf8  The StrongBox          Brent '[Drizzt]' Mcleod <mcleod@westworld.com>

The custom Skin man:  Ryan 'Grey_Ghost' Lacouture <vallore@wt.net>

                 +---------- The ThreeWave Web Dudes ----------+
                 |  Blake 'Coder' Winton <news@threewave.com>  |
                 |  Synthesizer Punk <anarchy@wasteland.org>   |
                 +---------------------------------------------+

                           - And Special Thanks To -
                           Brian 'Whaleboy' Cozzens
                                    - of -
                                    QuakeX
                            The Quake Expansion Group
                        http://www.planetquake.com/quakex/
                       For his work on the Team Logo textures
                               And the Flag models


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

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


QUICKSTART
----------

1.  This patch supports serveral modes of operating all related to Capture
    the Flag.  It can also provide an enhanced form of normal DeathMatch
    as well.  In the default configuration, it is set up for using the
    custom CTF maps 50% of the time and the specially modify id levels
    the other 50%.  In order to use the default configuration, you must
    perform steps 6 through 10 in order to modify the existing id
    levels for CTF support.

    NOTE: For custom CTF support, you need this server side package AND
    the client side one for the special levels.  In other words, to install
    this on a server you need 3wave30.zip and 3wctfc30.zip (server side
    and client side).  See step 5 for more information.

    Even though this is a Quickstart, I really, really recommend one reads
    this entire file.

2.  Go into your central Quake directory and make a subdirectory called
    "qwctf"

        cd quake
        mkdir qwctf

3.  Unzip this file into that directory (pkunzip users, make sure you use -d).  
    You should have progs.dat, server.txt (this file), a subdirectory called
    src that contains the Quake-C source, a subdirectory called maps that
    contains several *.ent files for adding CTF support to id's levels and 
    autoexec.cfg (load time server settings).

4.  Download the client patch (3wctf301.zip) and unzip it into this directory
    as well.  It should add pak0.pak and readme.txt.  DO NOT OVERWRITE YOUR
    EXISTING pak0.pak FILE IN THE id1 DIRECTORY.

5.  Steps 6 through 9 are only needed if you are going to support id's
    levels.  If you are going only use the custom levels, set the temp1
    variable to 100 in the server.cfg file and skip to step 11. 
 
6.  Unpack the pak0.pak and pak1.pak files from the id1 subdirectory.
    Linux users can use
    ftp://ftp.cdrom.com/pub/quake/utils/bsp_pak_tools/wreckdum.tar.gz
    and Windows 95/NT users can use
    ftp://ftp.cdrom.com/pub/quake/utils/bsp_pak_tools/winpak12.zip
    [Be certain to check for newer versions there as well].

7.  Copy the *.bsp files you extracted from id's pak0.pak and pak1.pak in step
    6 to quake/ctf/maps:
        Linux:  cp quake/id1/maps/*.bsp quake/ctf/maps
        DOS/Win: copy \quake\id1\maps\*.bsp \quake\ctf\maps

8.  Get a copy of qbsp in order to modify the id's bsp files that you copied
    in step 8 for CTF support.  Win95/NT users can get qbsp.exe from
    ftp://ftp.idsoftware.com/idstuff/source/qutils.zip.  Linux users can look
    around or email me for a qbsp Linux binary I compiled myself.

9.  Make sure that qbsp is in your path, then:
    Windows 95/NT users should do this following:
        cd \quake\qwctf\maps
        dobsp.bat
    Linux users should do this:
        cd quake/qwctf/maps
        sh dobsp.sh
    This will use qbsp to modify the *.bsp files you cpied in step 8 with the
    *.ent files that come with the server kit.
    It shouldn't take more than a minute to do them all.
    [NOTE: This would be a bit easier if I could distribute the already 
    modified bsp files, but id's licensing does not permit that.  I 
    emailed Jay Wilbur (the biz guy) about this and his response was:
            There is no problem in what you intend to do if the file you 
            intend to distribute is nothing more then a glorified text file 
            that registered server running users use to modify their maps. 
    So that's the official party line].

10. Load the server.cfg file in the qwctf directory into your favorite text
    editor (NOTE to Win95/NT users.  Notepad will barf on this file because it
    is in Unix text format.  Use the DOS based EDIT to work on it).  The
    default one looks like this:

		deathmatch 1
		teamplay 483?QWCTF1.0
		hostname ThreeWave-QW-CTF-Custom
		timelimit 35
		fraglimit 150
		pausable 0
		//choose ctf lvls 60% of the time
		samelevel 60
		maxclients 16
		map ctf1

    Detailed description follows:

        teamplay 483
            The teamplay variable has been overloaded a lot.  It's a set of
            bit flags that indicate the team configuration options.  See the
            section on the teamplay variable below.  Essentially, you figure
            out which options you want enabled, add them all together and set
            the teamplay variable to that value.

        hostname Noname-CTF
            This is the hostname of your Quake server that people see when
            they query it.  I recommend you use something that identifies it
            as your server.  It is best to leave CTF in the title so people
            know your server is running CTF.

        timelimit 35
            If no one gets to the fraglimit in 35 minutes, change levels
            anyway.

        fraglimit 100
            Change levels when someone gets to 100 frags.

        pausable 0
            Stop those annoying people from playing pause games.
        
        map ctf1
            Start on custom map 1.  If you aren't using custom maps, change
            this to e1m1

        samelevel 60          
            60 indicates that 50% of the time, select a
            CTF level as the next level or and id level the remaining 40%.  If
            you set it to 100%, you will only get custom levels.  If you set
            it to 0%, you get nothing but id levels.  This is ignored if
            custom CTF is not enabled in the teamplay variable (value 512).

11. You will probably want to modify the message of the day displayed upon
    connection, or enable the remote adminstration functions in admin.qc.  To
    do this, you must edit the files client.qc for the MOTD and admin.qc to
    enter an admin code.

    After you have made the changes, you must compile the Quake-C source.  qcc
    comes with the qutils package mentioned in 9.  Just run qcc in the
    quake/ctf/src directory.  Assuming a succesful compile, copy the new
    progs.dat to quake/ctf.

13. Run the server.

    Windows 95/NT:

        cd \quake
        qwsv -dedicated 16 -game qwctf

14. Enjoy!

[What's new section moved near the end]

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

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.01 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.  You can't drop the axe or
                single-shotgun.
        256     Capture the Flag
                This enables Capture the Flag support.
        
        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 120    Static Teams, Color Lock, Frag Penalty, Death Penalty
        teamplay 355    Static Teams, Color Lock, Health Protect, Armour
                Protect, Capture the Flag
        teamplay 483    Static Teams, Color Lock, Health Protect, Armour
                Protect, Capture the Flag, Drop Items
        teamplay 419    Color Lock, Health Protect, Armour
                Protect, Capture the Flag, Drop Items

        [I use teamplay 483 on my server.  You must have team color lock
        for capture the flag.  Anything else is very confusing.
        Another common setting is 419, which is the same except players
        are allowed to switch between teams.  -Zoid] 

        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.

        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 direct any comments about this package to *me*, Zoid at
        zoid@mindlink.net.  Don't bug John about my mods].

Capture the Flag

   Capture the flag offers an exciting variation on team play.  It gives
   meaning to base defense along with offensive positioning and strikes.
   The implementation is an extension of John Spickes JTEAM patches.

   The basic premise is: attack the enemy base, grab their flag than
   take it back to your base.  In the variation I've written into Quake,
   you must touch your base flag when carrying the enemy flag in order
   to score.

   Map modifications have to be done in order to enable Capture the Flag
   play on a map.  See the accompaning file capture.txt for information
   on how to modify maps for flag support.
   
   Rules:

   - Two sections of the map are designated as base encampments.  
   - When you join the game (or enter the level) you are assigned to a
     team (Using John Spickes JTEAM patches, with many modifications).
     Changing teams may or may not be allowed depending on the setting
     of the teamplay variable.  You are spawned at the base (this is were 
     my map mods come in).  If you die, you are not spawned at the base, 
     but at one of the deathmatch start spots.
      This way, you don't kill a guy trying to get the flag at the base and he
     comes back to life immediately there.
   - The flags are based on the key models.  If you pick up the enemy flag,
     you must touch your flag in order to win.  Note that if you get
     back to the base, your flag might not be there if the other team
     has it!  Get the rest of your team to go get their flag back!  The
     player who touches his base flag when carrying the other team's gets
     20 frags, and everyone on his team gets 10 frags.  
     Also, when you get a flag, you have that nice glow around you (such as 
     when you get the quad damage.) If you kill an opposing team player who 
     has your flag, he drops it.  If you touch your flag, it will teleport 
     back to your base.
   - Since everyone starts at their base after level change, or joining the
     game, the team will have to work out who is going to go and try to get
     the enemy flag (offensive strike), and who will stay to defend.  
     Yes, this is camping, but its camping with a cause!  Remember, you can 
     communicate only with teammates by using messagemode2.  Put this in your
     id1\autoexec.cfg file
        bind r "messagemode2"
     When you hit "r", you will get the usually talk prompt, except your 
     message will only go to your teammates.

Runes
   The rune game (several functions near the end of items.qc).  Runes are
   spawned randomly, one of each with an unique power.  Currently there are
   four:
     - Earth (resistance, half damage)
     - Black (strength, double damage)
     - Hell (haste, double fire rate) 
     - Elder (regeneration)
   When someone dies, the rune pops out and can be picked up.  You can only 
   carry one rune at a time.

MOTD
   MOTD (Message of the day) function added.  To change it edit client.qc
   and edit the text near the top.  There are different messages for
   regular deathmatch, team mode and capture the flag mode.

Suicide protection.  
   A person can suicide four times, then can't suicide anymore.
   Resets after level change (there are legitmate reasons to suicide,
   but rarely more than four times in a level).

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, its eliminated.

Server Logging
   Server logging.  This is really useful in for a Linux server, since
   I save the log files.  Reports on why a client connects, how they died,
   etc.  This is still being fine tuned.

   Windows 95/NT server operators:  use the -condebug Quake command line
   paramter to dump the log to a file.
 
What's new in 1.00
------------------

- QWCTF 1.00 is basically a port of CTF3.2.

- Grappling hook removed.  Doesn't work in QuakeWorld's predicted physics
  model.

- Server logging stuff removed.  Doesn't make much sense since the console now
  prints all game messages anyway.

- Color stuff redone to use setinfo.

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

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

Use this in a commercial endevour and become a friend of Satan.  Talk to me
first, ok?

DISCLAIMER:  Dave 'Zoid' Kirsch is not responsible for any harm or
psychological affects, loss of sleep, fatigue or general
irresponsibility from playing this patch.

If you put this on a CD, you owe me three free copies of the CD.
You also owe a free copy of the CD to all the contributed authors listed at
the top of the document.  At last count, that's ten CDs.  You pay postage,
too.  Don't like this?  Don't put it on a CD!

If you take my work and rip my name off, you will burn in hell.

Availability
------------

This modification is available from the following places:

WWW   : http://www.planetquake.com/quakex/threewave/

