***           Railor Mod          *** 
***                               *** 
***         by J. Hoffmann        *** 
***  www.planetquake.com/modifia  *** 
***     juhox@planetquake.com     *** 



Files:
   railor.pk3
   readme.txt
   history.txt

Requirements:
   Quake III Arena 1.29h or later

Features:
   - fast gameplay
   - promotes team-work
   - no violence
   - smarter, more human-like bots
   - stable, reliable code--no beta version

Installation:
   1. Create a directory named "Railor" in your Quake3 directory (which
      is the directory that contains the "baseq3" directory).

   2. Copy "railor.pk3" into the new directory.

   To run the Railor mod start Quake3 and choose "Railor" from the "Mods"
   menu.

Description:
   The basic idea of Railor is: don't kill your opponents--mark them!
   Railor can be played using any of the original game types: single
   player (SP), free for all (FFA), tournament, team deathmatch (TDM),
   and capture the flag (CTF). Each game type has its specific rules, but
   some basic rules hold for all. These are:
   
      (a) Your only weapon is the rail gun, supplied with unlimited
          ammunition. Unlike the original rail gun, it won't go through
          players.
   
      (b) When you hit another player, he/she won't burst, not even be
          hurt. Instead your victim will be marked by a glowing hull.
   
      (c) A marked player cannot shoot nor collect items until he/she
          becomes unmarked. How to become unmarked depends on the game
          type (see below).
   
      (d) You no longer can be hurt by far jumps, lava, nor slime, nor
          drown under water. The only possible way to die is to suicide
          by jumping into the void or fog of death. If the map you play
          doesn't contain these, you just can't die. If you manage to
          die, hit the attack button to respawn as usual, but note, that
          your mark will remain... nice try!
   
      (e) Since you can't use other weapons, need no ammunition, health,
          nor armor, Railor removes all items from the maps you load. The
          only items you'll find (provided the map contains some) are
          haste, flight, invisibility, personal teleporters, and flags.
   
   All other rules depend on the game type.
   
   
   * Non-Team Games (SP, FFA, Tournament)
   
   With these game types your gun not only marks your target, but
   teleports it away to a random location. This means, that non-team
   games actually are played much like the original Q3A. You earn one
   point for every player you mark. The first one hitting the score limit
   wins.
   
   Marks in non-team games are always yellow and are automatically
   removed after 3 seconds. Don't bother about getting hit while being
   marked: the countdown won't reset and the attacker won't score.
   
   
   * Team Games (TDM, CTF)
   
   While non-team games can be fun, team games are what Railor is made
   for. Marked players now have a blue or red hull, according to their
   team color. These marks are no longer self-removing, you need a team
   mate to do this. When a marked player is hit again, the blue (red)
   mark is replaced by a yellow mark which is automatically removed after
   3 seconds. During this period the player can't be marked again nor
   shoot. You better use your "respite" to get out of the line of fire.
   
   If all members of the opponent team are marked, your team earns one
   point. The team first hitting the frag limit wins. Independent of this
   there is a personal score counter for each player. This counter is
   increased by 1 whenever you mark an opponent or unmark a team mate. It
   is decreased by 1 when you mark a team mate or unmark an opponent.
   Your personal score is shown within the usual scoreboard.

   If friendly fire is turned off at the server, you can't mark your team
   mates nor unmark your opponents.
   
   For CTF games some special rules apply. First of all, note that since
   a marked player can't collect items they especially can't take the
   opponent flag nor return the own one. If a flag carrier is marked,
   he/she will drop the flag. So if you manage to mark all members of the
   opponent team, there's no hurry with flag capturing. If this happens
   the program signals that you just achieved a kind of "homerun"! Don't
   even worry about accidentally hitting an opponent: during homerun you
   can't unmark your opponents even if friendly fire is turned on.
   
   If a team scores all players receive a yellow mark that is
   automatically removed after 5 seconds.


About those "smarter, more human-like" bots:
   By far most of the work with this mod concerned with bot AI. All those
   gameplay changes somehow had to take place in the AI code. As I
   learned more about the Q3A AI code I even wanted more and tried to
   implement a more human-like behaviour. Since the original code already
   did a very good job the differences are not noticeable at first sight,
   but once I got used to the new bots I missed them in other mods and
   games.

   Before I explain the changes in detail, here are some general hints
   about using the new bots:

      * The bots as team mates should know what to do even without
        receiving any team order. In fact, the only team order tested is
        "I am the leader".
   
      * For best bot performance a human player should be the team
        leader.

      * However, in CTF, if the team leader gets the enemy flag he/she
        should relinquish command (bots always do this).

   If you just want to play that's all you need to know. If you want to
   learn more about the abilities and limitations of my bots read on.

   To understand bot AI it's generally useful to divide it into three
   categories:

      * physical/subconscious level
         e.g. environment recognition and movement

      * tactical level
         e.g. choosing an enemy, aiming and shooting

      * strategic level
         e.g. choosing a goal

   * Physical/Subconscious Level
   If you ever followed a bot in spectator mode you surely noticed a
   somewhat peculiar behaviour. The bot's movement is nice and smooth as
   long as it doesn't see an enemy. But once it detects an enemy it
   begins to shake as if it would be horribly frightened by its opponent.
   I even began to feel sick after watching a bot for some minutes!

   The reason for this behaviour is the way Q3A implements accuracy: the
   less accurate the bot should be (depending on factors like bot
   difficulty, enemy distance and movement, etc.) the more random
   deviation is added to the aiming direction. Apart from resulting in
   unpleasant shaking this method just doesn't work with the railgun due
   to its high precision, instant hit character, because the code
   responsible for shooting only triggers if the weapon directly points
   to the enemy. This means that nearly every shot hits the opponent, no
   matter how much shaking is added.

   In my opinion, human inaccuracy results mainly because of the
   following reasons:

      * There's a time delay connected with any stimulus on its way
        through the human brain from senses over recognition to decision.
        This delay is commonly called "reaction time" and typically lies
        somewhere in the range 0.15 to 0.25 seconds (for simple decisions
        like pulling a trigger).

      * In order to follow a fast moving target in spite of its
        inevitable reaction delay the human brain is able to predict
        movements. This prediction has certain limits of course and
        therefor is prone to errors.
        I personally think that there's some prediction both at
        subconscious and conscious levels.

      * There's also some physical distortion due to muscle trembling,
        heart beat, etc., but these effects are totally neglectible at
        the level of precision sufficient to play Q3A.

   Interestingly enough, Q3A attends to all of these effects. Not all of
   them are implemented well, though.

   First, the mentioned "shaking" phenomenon could be interpreted as
   physical distortion on a scale much too large. I simply removed that
   code.

   Secondly, Q3A implements a reaction delay, but its values range from 0
   to 4 seconds (depending on difficulty) and it's only used to delay the
   first shot to a new enemy. To overcome this I mapped those values to
   the interval [0.1 ... 0.5] seconds and implemented a kind of
   "reaction pipeline" for more realistic aiming. I also added some extra
   code to make the decision "aiming good/bad" prone to reaction delay.

   Q3A already does movement prediction, but it's only used to compensate
   for projectile transmission time (which doesn't apply to the railgun).
   However, I consider this to be conscious prediction, so I added a kind
   of subconscious prediction by adjusting the code for the reaction
   pipeline.

   * Tactical Level

      * Bots try not to unmark opponents.

      * Bots try to unmark team mates.

      * Decision wheter to mark an opponent or unmark a team mate is
        based on distance to target (bots generally prefer near targets)
        and urgency. So, if you want to become unmarked by a bot simply
        run near to that bot.

      * Waiting bots step aside if a team mate wants to pass.

      * Bots not involved in fighting react upon noise by watching to the
        source.

      * Bots now have a kind of "short term memory". This became
        necessery as I removed a certain bot cheat. You thought, Q3A bots
        weren't cheating? Well, they do! They don't cheat to the same
        extend bots of other games cheat, but they do, and there's one
        "feature" that especially annoyed me. You know, players and bots
        have a limited field of view, i.e. they can't see what's behind
        them. But if a player is shooting (and also in some other, more
        neglectible cases) and provided the bot could see this player if
        faced to it, the bot "magically" knows the exact location and
        team color (sic) of the shooting player. You might think, this
        would be comparable to human players reacting upon noise, but it
        virtually could be considered as bots being able to distinguish
        team mates from opponents just by the sound of their weapon.

        So, I just forced a limited field of view for that special case
        and in exchange for this added a simple kind of short term
        memory, letting bots know about enemies for a few seconds
        (currently three) after they lost sight of.

        Of course, this treatment still isn't perfect.

   * Strategic Level

      * If no opponents are in sight bots try to meet to maximize forces.

      * If no unmarked opponents are in sight bots try to follow marked
        opponents.

      * Marked bots try to find unmarked team mates.

      * There's a new team leader AI that better fits to Railor.
