Title	 : FrikBot for Rocket Arena
Filename : frikra.zip
Version  : 0.08
Date	 : 9-19-99
Author	 : Ryan "Frika C" Smith
Email	 : frika-c@earthling.net
Port-by  : Raymond Martineau (bk039@freenet.carleton.ca)

Credits
-------
Frika C, for providing the source code for FrikBot

David 'crt' Wright, for providing the source code for Rocket Arena.

Alan Kivlin for his rankings.qc and step movement
Frog for releasing the Frogbot code and giving me a good goal
to shoot for.

Additional thanks to Wazat, Asdf and MaNiAc who helped immensly with
suggestions, code snipplets and ideas.

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

Format of QuakeC (if a Quake C Mod)
-----------------------------------
unified diff  : no
context diff  : no
.qc files     : yes (bot files only)
progs.dat     : yes


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

From original Frikbot:
> This bot takes a unique approach. Unlike all other bots I've seen,
> FrikBot actually pretends to be a player. When he fires his weapon, it's
> the same function that the player uses. It is all done through his
> button flags. In other words, the bot fakes all client functions, he
> looks like a Quake client not only to the people in the game, but also
> to the Quake C. So why did I make him fake client behavior? Well with
> him using all the player code, he automatically works with hundreds of
> mods with a few short lines of code added or changed. This bot will play
> by the game rules of nearly every mod out there. (though he doesn't
> always know the rules however)

This specific version of the FrikBot is designed to play Rocket Arena.
Rocket Arena was one of my first attempts to port the FrikBot, in order
to get some practice with porting.  Eventually, I plan to port the
FrikBot to other mods that I have, including Team Fortress.

This is the second version of the Rocket Arena Frikbot. This fixes
a few bugs in the Rocket Arena Implementation of the Frikbot.

How to Install the Modification
-------------------------------

Take the progs.dat in this package, and copy it into the base Rocket
Arena directory, and launch Rocket Arena in the usual manner.  When you
want to add some bots, type "impulse 100", until you have a suitable
number of bots.

Impulses
===========

For managing the FrikBot:

IMPULSE 100: Add a bot or add a bot to your team in a team game
IMPULSE 101: Add a bot to an enemy team
IMPULSE 102: Remove a bot
IMPULSE 103: Bot Cam cycle. Cycles through the view of all bots &
	     players currently on the server
IMPULSE 104: Dump Waypoint data to console (see below)

The Rocket Arena impulses are as follows:

IMPULSE 68 - shows simple statistics for the current level.
	     Skill = wins / (wins + loses) * 100
IMPULSE 69 - shows your "position" in line
IMPULSE 70 - step out of line for up to two minutes
IMPULSE 71 - set status bar text for 320x200
IMPULSE 72 - set status bar text for 320x240 or higher

Revision History
----------------

Changes for Second Version
--------------------------
* Code for cooperative play, and team play have been commented out.
* The bots now grab the backpack that gets dropped.
* Increased the detection radius for some large arenas.
* The bots no longer run-up against the player in intermission.
* Fixed some minor bugs.

Changes for Rocket Arena
------------------------
* Bots may sometimes leave to get popcorn. :)
* Some new chat strings implemented.
* Spectator bots no longer get stuck in the teleporters.
* When playing non-Rocket Arena levels, spectators will no longer
  attack the players.
* The bots will watch battles, but get bored by a lack of activity.
* Installed a "hack" that no longer crashes Rocket Arena when finishing
  map "dom2_1ra".  (That map isn't a good one, anyway.)


Changes since v0.07
-------------------
* Removal of Norse movement. Gone. Started work on new movement AI from scratch.
* scratch1 is no longer valid. Don't use it.
* Implementation of ported Quake physics (don't ask, don't tell is all I will say)
* Bots are now MOVETYPE_WALK. They said it couldn't be done, hah!
* Massive code restructuring, moved code into many files instead of cramming it into three. This was done to really help more with development than anything else.
* Various bug fixes. I can't even remember half of them.
* This is a major rewrite of most of the bot.


Changes since v0.06
-------------------
* Bots viewing angle performed more realistically
* Code restructuring, please pay attention to the upgrade.txt and the new instructions in the comment.
* Finally corrected some troubles with the norse movement, including water jumping and gobs of wasted code.
* Integrated botcam. Use impulse 103 to activate.
* Corrected a bug in the installtion comment
* Bots are thrown around by explosions, I can't believe I missed this before :(
* Bots will switch weapons less often to make some mods less confusing
* Bots will switch to a "close range weapon" sometimes rather than backing off in fightstyles 1 & 3
* New bot roaming method called "Hook Navigation", bugs are still being ironed out on this new roaming concept.
* fisible() improved to work properly with SOLID_BSP objects
* Bots will attack secret doors, & buttons . Helps immensly in some levels.
* Implementation of "scratch1" to adjust bot framerates
* Bots will automatically stagger their think times against other bots so they all don't execute their think at the same time, causing a major slowdown.
* Implementation of check_forward() to improve (ahem) standard roaming.
* Special guest appearance of "JamesBond" as a bot name, in honor of the version number (0.07)
* Misc. other bug fixes


Changes since v0.05
-------------------
* Bot colors show in GL Quake!! Woohoo!!
* Implementation of fov(). Bots now have a limited field of view.
* Bots also have damn good hearing :)
* Bot angles correspond to their view.
* FL_ONGROUND hacks allow better compatibility with some mods.
* Bots have a new fightstyle.
* In teamplay, bots will choose the enemy team with the fewest players when using impulse 101
* Misc. bug fixes and movement hacks.

Changes since v0.04
-------------------
* Implementation of fisible(); a minor improvement over the id standard visible code.
* A bug where in very open levels, the bots would not switch targets upon death, fixed
* Impulse comands moved to a function inside bot.qc, to aid in future updates/changes
* Waypointing disabled in single player
* Bots use client connect again!
* Bots know how to play teamplay deathmatch. Set teamplay to nozero and enjoy!

Changes since v0.03
-------------------
* Bot targeting moved to a priority system
* Bots now fight in a variety of fight styles (circle strafe, hold distance)
* Bots have a delayed sight time
* Bug involving clients being added/removed after a bot has spawned fixed
* Bots select weapons via impulses, chance of discharge in water lowered
* Copyright permissions, new readme format.

Changes since v0.02
-------------------
* Bot's Water Jumping really works now!
* Improved roaming
* Different chat messages and bot names
* Improved comments throughout the code
* KickABot(); implemented to remove bots from the server
* Numerous bug fixes

Changes since v0.01
-------------------
* Bot's Water Jumping now works.
* Bug where any weapon fired using self.v_angle would fire at the wrong pitch
* Error in the comment telling you how to install fixed
* General improvements in the comment.

Copyright and Distribution Permissions
--------------------------------------
FrikBot, and all functions and code writen by Ryan "Frika C" Smith are copyrighted (C) 1999. You are allowed to use and distribute this mod as long as this text file remains intact and the mod is provided free of charge. You *are* allowed to modify and incorporate this bot into your own mods, as long as adequate credit is given and the end result of your modifications is also provided free of charge. If you have questions or comments regarding the bot, the code, or just the universe in general, please write me at frika-c@earthling.net.


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

This modification is available in binary format from the following places:

Department 187 at http://www.mdqnet.net/dept187/


