Capture the Flag Doom(CTFD) v0.70.

CTFDoom Homepage : http://www.captured.com/ctfdoom

CTF Modification by John Cole [jcole@eisa.net.au]
DOSDoom Port by Chi Hoang     [cyhoang@acs.ucalgary.ca]
id Software

Also thanks to Ryan Nunn [triforce@merlin.net.au] who came up with MidDoom 0.02. In
which I used this as a guide for modifying the Heads Up Display code.

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

DISCLAIMER

  The author of the modification takes NO responsiblity for any damages/data loss
  that may occur from the use of this software. Use at your own risk.

-------------------------------------------------------------------------------------
PLEASE DO NOT email id Software about this modification as they have nothing to do
with it.
-------------------------------------------------------------------------------------
Remember to rename DOSDOOM.EXE to either DOOM.EXE or DOOM2.EXE depending on the
maps you are using. (So IPXSETUP can detect it!)

or use the DOOMENV environment variable for IPXSETUP. (set DOOMENV=ctfdoom.exe)

Okay so here it is capture the flag for DOOM.

    CTFDoom(CTFD) is a modification of Chi Hoang's 0.51 DOSDoom to allow 4
on 4 or 2 on 2 (if you REALLY want to?) etc, games of capture the flag. I have 
attempted to keep the rules and playablility similar to it's Quake counterpart
but due to restrictions some things were left out or had to be compromised.

---> All other modes of doom run normally with this modification.


** How to start CTFD **

It's Simple : 
    IPXSETUP -ctf -file <wad's> -nodes <numnodes> .....

or for alternative CTF :
    IPXSETUP -altctf -file <wad's> -nodes <numnodes> .....

or if you are using your own names :
    IPXSETUP -altctf -name <playername> -file <wad's> -nodes <numnodes> .....

Names are set through the new IPXSETUP, failure to use the new IPXSETUP on
every machine will cause the old naming convention to be used.

Also DOSDoomSetup (David Leatherdale, David@Leatherdale.demon.co.uk) now
supports CTFDOOM, at the time of this release though it does not support
the "-player" / "-wstat" / "-name" options. I will be notifying David of
these changes ASAP.

To use it : ddsetup ctf


** Features **

     - Players in "altctf" mode can now specify customised player names
       through the new IPXSETUP 2.00 and the "-name <playername>" parameter.
       - Demo's automatically record the names in the LMP files, but
         compatibility is retained with the previous versions.
     - "-wstat" Write detailed stats at the end of the level to CTFDOOM.LOG.
       Contains :
           - Replay / Record Filename
           - Wad files used
           - Additional parameters eg. teamlimit / fraglimit.
           - CTF Version played.
           - Team Scores.
           - MVP
           - Individual Scores       (Pickups / Returns / Captures)
           - Individual Frag Counts  (Frags)
     - "-altctf" alternative capture the flag mode.
       - Players drop weapons when killed.
       - Uses team colours Green / Indigo, players change to the flag
         colour that they are holding for easy target practice when they
         have the flag :)
     - Use F12 to toggle through your teammates (but not the opposition!)
     - The automap only shows where you're teammates are not the opposition.     
     - Intermission screen, shows Green/Indigo team Totals (returns/pickups/
       captures/total score), and Most valuable player (MVP) with his/her
       scores.
     - Flag holder if killed drops the flag at the point of death,
       if a flag holder dies under a crushing sector, the flag is
       respawned back in the teams base who owns it.
     - Mugs Display, show the players face who has the flag.
       - Opponents mugs display is automatic, teammates mugs display
         is activated by " \ ".
     - Speech, notifies all players when a flag event occurs.
       - "Red/Blue Taken"
       - "Red/Blue Returned"
       - "Red/Blue Captured"
     - 8 Player Network (CTF/Deathmatch/Co-Op)
       - CTF & Co-Op Require Modified Starts.
         - Gold       (Green  Team)
         - Blue       (Indigo Team)
         - Dark Blue  (Green  Team)
         - Pink       (Indigo Team)
     - Level Fraglimits & TeamLimits added through "-fraglimit <X>" or
       "-teamlimit <X>"
     - Heads UP Display showing team scores who has the teams flag.
       (also Individual Frag Scores) toggled by " ` ".
       1. Teams Scores
       2. Green Team Individual Frags
       3. Indigo Team Individual Frags
     - Weapons stay put, whereas items respawn like in -altdeath mode.
     - Only one person can grab the flag at a time(Player is then 
       marked as flag carrier).
     - Flag is automatically returned to base when it is captured.
     - The ability to force IPXSETUP to start up under a different player
       id, through the "-player <X>" command (good for playing CTFD between
       two rooms).
     - Ability to set DOOMENV so you can launch multiple .EXE's without
       having to rename.


** Players ID **

Normal Ctf     /     Altctf (Default)
Green                [DoomGuy]
Indigo               [TheGun]
Brown                [Fragman]
Red                  [Camper]  :)
Gold                 [ImpyBoy]
Blue                 [-X-]
DkBlue               [Hot]
Pink                 [Intense]

When "-name" is used then all this changes.


** Heads up display **

The heads up display is represented like this :

[CTFD] GT:0000 [FLAG HOLDER]  -VS-  IT:0000  [FLAG HOLDER]
 ----------------------------------------------------------------
|                        DOOM Status Bar                         |

- GT is the Green team(Green/Brown/Gold/DKBlue) followed by their overall score.
- IT is the Indigo team(Indigo/Red/Blue/Pink) followed by their overall score.
- [FLAG] Is the opposition team member who has their flag eg. [NONE], Indigo, Red.

And the same goes for the Indigo and Red team.

Pressing '`'(Quake console key) steps through the various other HUD options.


** Flag Capturing and Returning **

    This works slightly different to the Quake version. Usually if you kill someone
they would drop the flag and you would have to touch it to return it back to base,
but here when you kill them it get's returned automatically(I may fix this next time).
    Capturing the flag is identical, just return to your base with the opponents flag
and touch it with yours and your team scores the points.


** Scoring **

    5 Frags/Points - Per Player in team for a successful capture.
    1   "     "    - Per Player for a successful return.
    1   "     "    - For a kill to the inflictor.
   -1   "     "    - For killing yourself, (whether it be by toxic slime
                     or just by using a rocket at close range)

Notes:
    I may change the scoring for self inflicted kills or environment kill
because in the test runs the opposition team decided that the easiest way to get
back to their flag was to commit suicide. I am open to opinions though.


** Map Creation Tips **

    Because it uses a modified co-op mode all that is needed is the four player
co-op start points. Usually you would set them out as players 1,3,5,7 in one base and
the other two (2,4,6,8) in the other base. (I did it this way to have the ability
to test the game on only two computers.)

    When creating player spawns if at all possible make them at a height at which
the player is unable to climb onto, I say this because Doom will spawn a player to the
next free co-op point, if the normal spawn point is occupied by an actor then the
next free spawn point may just be in the opponents base!!! Which I'd say is
a definate no no (and if deliberately used could be seen as a form of cheating).

    Try not to use any keys for locking doors as it just complicates the gameplay
(it's not free flowing) and DO NOT use the RED and BLUE Skull keys for anything other
than the flags for the game as they will not work as anything else in this mode and you
need them to play the game.

   As an example I have slightly modified E1M1 from Doom to accomodate CTF mode, it
is on the website(This is the map I did my testing on).

   If anyone comes up with some maps for this please let me know I'd be really
interested to see how they turned out.


** Miscellaneous Info **
0.6d (1-mar-98)

.exe release only. Removed the Extender from the exe.


0.6

What is new:

     - Merged into DOSDoom 0.51
     - "-altctf" alternative capture the flag mode.
       - Players drop weapons when killed. (As long as they don't have a flag)
       - Uses team colours Green / Indigo, players change to the flag
         colour that they are holding for easy target practice when they
         have the flag :)
     - Cleaned up some more code.

What is fixed:
     - There is a bug(really a typo) in DOSDoom's key handling code, if
       you accidently hit Insert/Delete...... the game would get stuck
       in an infinite loop. (INTRODUCED with the center look key) [FIXED]



0.5b (20-feb-98)

---------------
What is new:

	- Not much :), just merged it with DOSDoom 0.50, and did some
          optimisations to the Flag handling code.
        - Playback.wad now only holds the players backgrounds.
        - CTFD.WAD this replaces CTFSND.WAD and stores all the speech,
          and intermission screen patches.



---------------
0.5 (15-feb-98)

What is new :

  - New 5 player demo.
  - Updated playback.wad file.
  - Intermission screen is easier to understand now (Use of titles).
  - Key '\' brings up mugs display, (shows who on your team has the flag)
  - Fixed (AGAIN!!) HUD, GT = Green Team, IT = Indigo Team.

What is fixed :

  - MVP Players face is shown if the player # is greater than 4.
    (was still using 0.4a8 code)       [FIXED]
  - Opposition mugshot(who has your flag) was not displaying the players
    face for the same reason as above. [FIXED]


I think I'll ease off of the releases a bit now, I know for a fact the
8 player network works, in all DOOM Modes and I've got all the errors
I know of out of the code. Will probably do 1 release a week rather
than 300 :) (Unless something drastic is found to be wrong) I will keep 
updating the page though as to let everyone know what I am doing.


0.4aT8 (14-feb-98)

Whats new in CTF Doom:
     - Player Colours
           Player 5 : Gold
           Player 6 : Blue
           Player 7 : Dark Blue (This looks really good)
           Player 8 : Pink

     - HUD Display displays teams now.
     - CTFSND.WAD & PLAYBACK.WAD Automatically load if needed.
     - Now Supports 8 Players.
       - CTF mode work's (of course!!)
       - Deathmatch mode works
       - Co-op mode works.
     - status bar now updates properly when a player is killed while holding
       the opposition flag.
     - F12 Now toggles between teammates.
     - Team members are only displayed in automap mode now.
     - "-fraglimit" added, allows the setting of a fraglimit to finish a level.
     - "-teamlimit" same as above but works on team scores rather than an
       individuals score.
     - Picking up a weapon now gives the player the same amount of ammo as if
       they were playing in deathmatch mode.

---
8 Player notes.

New THING types added :

            THING #       What it is
            4001          Player 5 Start
            4002          Player 6 Start
            4003          Player 7 Start
            4004          Player 8 Start

If you try to play a normal DOOM/DOOM2 Level with more than 4 players it will
crash as their are not enough start positions or deathmatch positions (depending
on the mode you are playing), the map will have add the extra co-op start
points or if in deathmatch at least put in 8 deathmatch starts (max 10).

If playing a deathmatch when an level is exited, only the first 4 players are
shown, I deliberately did this as at the moment I don't have time to work on
stuff outside of CTF mode. (Same goes for the co-op stats screen)

Example for firing up a 8 player game using "-teamlimit".

ipxsetup -file dm2018.wad -ctf -nodes 8 -teamlimit 100

----

NOTE : From now on you don't need to specify the ctfsnd.wad file, CTFD will
       check to see if it's in the current directory and add it to the file
       list automatically and enable Speech.


0.3c8 (8-feb-98) (unreleased)

- My original 8 Player version.


0.3 (5-feb-98)

- Merged into the DOSDoom 0.47 source.
- "-ctfs" has been removed, "-ctf" now does everything.

Fixed :

- The HUD Display does not overwrite the status bar when using the normal
  map mode.
- I got sick of the record/playdemo/timedemo not using extensions, so I
  fixed it, you can use extensions or no extensions. It now friendly
  for interpreters that do filename completions, eg 4dos.

Modified :

- CTF HUD Display. (Minor cosmetic changes to it)

- ctfsnd.wad sound files are alot smaller reducing the chances of the
  sound being terminated prematurely. (Now that it's this small I think
  I'll just leave it in the .zip files from now on)

Now says :
            Red/Blue Taken
             "   "   Returned
             "   "   Captured

Added :

- Top right hand corner now shows which player has your flag. (Player
  colour with and overlaid grinning face) Alot easier to determine who
  has your flag with the icon displayed and the added speech.


The ctfsnd.wad is included in this zip, but future releases will not
have it, it will be a separate file.


0.2c (1-feb-98)

It fixes :
         - Player scoring, wasn't being calculated properly
         - Resetting of MVP between levels.

Added :
         - Now if -ctf or -ctfs is used nomonsters and deathmatch is
           set to false.
         - "-timer" now works with CTFD.

         - Speech (through -ctfs), now when a flag event occurs it will
           say on everyones machine:

               Red/Blue Flag has been captured.
                "    "    "  has been taken.
                "    "    "  has been returned.

To use this feature you would do :

     IPXSETUP -ctfs -file ctfsnd.wad  ......
or without sounds
     IPXSETUP -ctf -file  ......


0.2a (1-feb-98)

     - Added player frag statistics and Timer to CTF HUD, toggle with
       the "`" key.
     - Now stores statistics such as pickups, returns, captures.
     - Level intermission scores now shown.

       [green  team] <pickups> <returns> <captures> <total>
       [indigo team] <pickups> <returns> <captures> <total>

       [MVP        ] <pickups> <returns> <captures> <frags>

     - All players are notified if an event occurs.

       eg. "GREEN HAS TAKEN THE RED FLAG"
           "GREEN HAS LOST THE RED FLAG"
           "INDIGO HAS RETURNED THE RED FLAG"
           .
           .
           etc.

     - Fixed scoring up, was incrementing the wrong players frags.

     - IPXSETUP can now have a different exe specified rather than just
       doom.exe / doom2.exe through the environment variable DOOMENV.

       eg. To use ctfdoom.exe :

           SET DOOMENV=ctfdoom.exe

BTW : I would like to thank everyone who has been giving feedback, making
      maps and so on, I have been taking note of everything said or done,
      but I just haven't had the time to reply.


0.1c (29-jan-98)

   - 0.1b  b=broken, There was a bug where if you slaughtered someone with the
     chain gun, it would try to spawn an invalid object and make the system die
     not very graciously instead of the player :). [FIXED]

**   If you grabbed 0.1b delete it, as it's basically useless.

   - Now when returning a flag from a dead player the team returning it 
     receives 1 point each.
   - When the level is exited the teams scores are shown as the intermission
     screen rather than the co-op stats. eg. Green Team & Indigo Team

0.1b (28-jan-98)
  
  [in no particular order]

  - Looking more like what CTF should be (IMO).
  - When a player has a flag in their possesion and they die the flag is
    dropped at the point of death.
  - For the the other team to recover the flag they just have to touch it
    and it returns to their base. (Ala Quake CTF)
  - If a player dies under a crushing sector while holding the opponents
    flag, eg a door. the flag will stay there until it is crushed, when
    this occurs it return to the owning teams base.
  - Made the code more modularised. It's now alot easier for me to
    understand :)
  - Re-Implemented the warp function, to allow warps to your teammates start
    point if yours is occupied(otherwise is returns to the old doom code for
    a warp position). This is the part I'm a bit worried about, if anyone get's
    into a situation where the continuously warp into the same position then
    LET ME KNOW PLEASE!!
  - Made some modifications to the new AutoMap HUD (It's like DUKE3D Automap
    overlay) that was incorporated into DOSDoom 0.46, made sure the status
    bar was refreshed, and let the CTF HUD know about the new mode.

0.1a (27-jan-98)
  - Internal test. Just a merge of CTFDoom 0.1 into DOSDoom 0.46. To make
    sure all was well :)

Miscellaneous Notes:

  ** Map Makers try not to place areas on the map where the player can get
     trapped, it will make it near impossible to capture or return keys.
     (At least for the moment)

  This could almost be 0.2, but I couldn't test it properly on two machines,
I'll need plenty of feedback here to see if everyone thinks I'm heading in
the right direction with CTFD.

  I am going to change the source distribution method, rather than including
all the DOSDoom files, from now on all I'm going to include is the code I've
modified. You'll have to get the DOSDoom Source off Chi's Site. Sorry if you
don't like the idea but I just think it's ridiculous people having to d/l
the same thing over and over again.


** Known Bugs **




** Todo's **




** Copyrights **

Doom and Quake is Copyright id Software.


Send Comments and suggestions to :
                                   John Cole
                                   jcole@eisa.net.au
                                   http://www.captured.com/ctfdoom
