The Kraze Documentation
=======================

Kraze Author:		Connor "RiEvEr" Caple <connor@botgod.org.uk>
Kraze Version:		0.05 Beta

//  ORIGINAL BOT BASE:	ACEBot by Steve Yeager [Required text follows]
//
//	The ACE Bot is a product of Steve Yeager, and is available from
//	the ACE Bot homepage, at http://www.axionfx.com/ace.
//
//	This program is a modification of the ACE Bot, and is therefore
//	in NO WAY supported by Steve Yeager.
//
//	This program MUST NOT be sold in ANY form. If you have paid for 
//	this product, you should contact Steve Yeager immediately, via
//	the ACE Bot homepage.
//

How To Use This Bot
===================

Unzip the bot gamex86.dll and any associated files into a subdirectory of your
KingPin installation directory (e.g.: c:\program files\kingpin\kraze ). Make sure
a directory called "routes" exists inside the bot directory if it not there already.

Start KingPin with some extra command line parameters (or make a shortcut to do it) e.g.:
kingpin.exe +game kraze +maxclients 16 +deathmatch 1 +map kpdm1

Once the game starts, call down the console and type "sv addbot" as many times as you want bots.
If you get killed too much, change the skill level (ya wimp!) by typing "bot_skill <NUM>"
where NUMis a value from 0 to 10 (it starts at level 4).

Go play. Any other information you need can be found in the KingPin documentation.

Documentation convention
------------------------
[VALUE]		= optional parameter
<VALUE>		= required parameter

Commands
========
[ These may change as time progresses - check them carefully! ]

sv addbot [STRING]			Spawns a bot called [STRING] into normal deathmatch
sv addbot <INT>[STRING]		Spawns a bot called [STRING] on team <INT> in TeamPlay 
sv removebot <STRING>		Removed the bot named <STRING>.
sv removebot all			Remove all bots.
bot_skill <0 .. 10>			[SERVER CVAR] Set the bots' skill level - range is 0 to 10 
							(default is 4)
bot_version					Reports the current build version of the Kraze!
sv botdebug on				Turns on debug mode.
sv botdebug					Turns off debug mode.
							*NOTE: When debug mode is on, NEW nodes will appear as glowing balls in
							the level. Too many at once will cause overflows - you have been warned.

sv writenodes				Save the current route file to disk.

Last Man Standing deathmatch:
-----------------------------
deathmatch 2				Starts the server in LastManStanding (LMS) deathmatch mode.
lms_frags <1..N>			Sets starting frags for LMS deathmatch.
lms_secs <1..N>				Sets time allowed to connect and join an LMS deathmatch.

Route File Handling:
--------------------
These commands require "botdebug on"

bot_showpath <0/1>		Shows you the paths bots are following. (OverFlow hungry!)
addnode					Adds a new Node at your current position
showpath <INT>			Shows path from your current location to Node<INT>
findnode				Prints information about the nearest Node to your position
movenode <INT><F><F><F>	Moves the Node<INT> to new co-ordinates <F><F><F>

Route File Creation
===================

This is fairly simple. The internal node creation code automatically creates a node at
every ITEM in the game. You just need to walk round the level visiting every room or area.
Collect as many items as you like on the way. If you use the debug mode you will be able 
to see the "trail" of coloured nodes to show where you have been. If it overflows, pull 
down the console, type "sv writenodes" and then reload the level. You will then only see
the new nodes you create once you turn the debug mode back on.

To debug a path (if you suspect it is broken) reload the level and then use the showpath
command. Give it the node number you think the path is broken to. If you just get a green
line through the wall, or ceiling/floor, then the path is broken. Walk to the target node
and back again to see if this will fix things - it's often all that's needed.

Route files can get pretty huge (up to 2 megs??) but once archived are less than 100K.
This makes them small enough (zipped) to pass around, but they need a large routes directory
when uncompressed.

Bot Configuration file
======================

The Kraze! now reads a file from the "kraze/bots" directory called "[LEVELNAME].cfg" if it 
exists, if not then it will look for "botdata.cfg" in the same place. Sample files are included.

This file is a line by line description of the bots you want to spawn. Each line is a comma
seperated list of the information about that bot terminated by a SEMICOLON. Any line (except the first) 
beginning with a HASH (#) is ignored and can be used for comments. the format of one line of
information is:

"Name", "model/skin", team, accuracy, weapon;

Accuracy is a number from 1 to 10 and modifies the basic accuracy of the bot when compared to the 
skill setting. This means that at skill 5 a bot with accuracy 10 will fight at level 8 and a bot 
with accuracy 1 will fight at level 2. This allows for a skill variation among the bots. Set this
to 5 if you want no variation for this bot.

Weapon choice is a number from 1 to 6 and specifies weapons in this order:
SHOTGUN, TOMMYGUN, HEAVYMACHINEGUN, GRENADELAUNCHER, BAZOOKA, FLAMETHROWER

The first thing in the file MUST be the file version number after a "!". 
Sample file here:

---------------start of file -----------------
!1
# Team 1 - the BadAss brothers
"Joshua BadAss", "male_thug/003 013 015", 1, 5, 1;
"Jimmy BadAss", "male_thug/003 013 015", 1, 5, 1;
"Jackie BadAss", "male_thug/003 013 015", 1, 5, 1;
# Team 2 - Mix n Match
"Kim AssKicka", "female_chick/015 015 004", 2, 10, 2;
"Aaron Korn", "male_thug/006 013 015", 2, 10, 5;
"Kyle Cool Tip", "male_thug/008 013 015", 2, 10, 6;

--------------- end of file -------------------

In deathmatch games the team number will be ignored and all other information used.
In Teamplay games the skin information will be ignored.

YOU CANNOT PUT ANYTHING ELSE IN THIS FILE - YOU DO NOT "exec" IT!

Last Man Standing Deathmatch
============================

I've added a new deathmatch mode which most of us will be familiar with. The rules are
simple:
1) You have a set time allowed to join a game or "round". (set by "lms_secs" - default is 30)
2) You start with a set number of frags (set by "lms_frags" - default is 5)
3) No one can be killed until the match starts (there is an onscreen countdown in 5 second
intervals).
4) Once the match starts, each time you die you lose a frag. New players have to wait 
for the next match. You automatically respawn in LMS after 1 second.
5) Once your frag count is ZERO you become a spectator.
6) The winner is the Last Man Standing, even if she's female :)
7) This can be played in teams by setting teamplay to 4 and loading up a teamplay map.

I've played this game version in Quake, Quake II, SiN and now KingPin and I love it. I was planning
on implementing it here eventually but was spurred on by WiseGuy who wants to build a server side
mod round this code with new maps etc. Once his stuff is available this DLL will work with it, with
bots - yippee!

LMS does need some more "frag-happy" maps so feel free to hassle WiseGuy about it! In the meantime, 
try out some other maps and let me know which ones work well.

CREDITS:
========

ACEBot base:		Steve Yeager
KingPin DLL:		Ridah and the boys at Xatrix
KPDM* RouteFiles:	Fred from Q2RFD (www.botepidemic.com/q2rfd) - Thanks!
Kickin' my ass to write the LMS code:	WiseGuy (hehe...)

//  ACEBot credits:
//  John Cricket    - For ideas and swapping code.
//  Ryan Feltrin    - For ideas and swapping code.
//  SABIN           - For showing how to do true client based movement.
//  BotEpidemic     - For keeping us up to date.
//  Telefragged.com - For giving ACE a home.
//  Microsoft       - For giving us such a wonderful crash free OS. [He was joking, right??]
//  id              - Need I say more.

LINKS:
======

Good KingPin information can be obtained from many sites. The two I use most often are:

http://www.planetkingpin.com
http://www.poisonville.com

DISCLAIMER
==========

I, Connor "RiEvEr" Caple, hold no responsibility for any harm caused by the
use of this source code or DLL, especially to small children and animals.
It is provided as-is with no implied warranty or support.
(Thanks Steve - nice disclaimer text!)

$Header: /kingpin bot/readme.txt 7     7/11/99 11:50 Riever $
