About: This document contains editing information for the Gladiator bot.
The Gladiator bot is an artificial player for Quake2.
Author: Mr Elusive (MrElusive@demigod.demon.nl)
Gladiator page: http://www.botepidemic.com/gladiator
Last update: 1999-06-04




Game source description


The game source code incorporates the following parts:

1. The Quake2 v3.20 game source code by id Software.
ftp://ftp.idsoftware.com/idstuff/quake2/source/
2. The additional Quake2 v3.20 mission pack 1 "The Reckoning" game source code by Xatrix.
ftp://ftp.idsoftware.com/idstuff/quake2/source/
3. The additional Quake2 v3.20 mission pack 2 "Ground Zero" game source code by Rogue.
ftp://ftp.idsoftware.com/idstuff/quake2/source/
4. The Quake2 CTF game source code.
ftp://ftp.idsoftware.com/idstuff/quake2/ctf/source/
5. Parts of the Rocket Arena 2 Bot Support Routines by David Wright
http://www.planetquake.com/arena
6. The Gladiator Bot game source code by MrElusive.

The source code of the Gladiator Bot DLL is NOT included!


Game source code notes

The source file g_local.h includes several defines at the top. These defines have been used in combination with conditional compilation to mark the different parts of the source code added to the Quake2 v3.20 game source code. The following defines have been used:

#define BOT//Gladiator Bot
#define BOT_IMPORT//bot import redirection
#define BOT_DEBUG//bot debug
#define OBSERVER//observer mode
#define TRIGGER_COUNTING//trigger counting
#define TRIGGER_LOG//trigger log
#define FUNC_BUTTON_ROTATING//rotating button
#define LOGFILE//log file
#define VWEP//VWep patch
#define ZOID//CTF
#define CTF_HOOK//CTF offhand hook
#define ROCKETARENA//Rocket Arena 2
#define CH//crazy color mod
#define XATRIX//Xatrix mission pack 1
#define ROGUE//Rogue mission pack 2

Makefiles for MSVC, LCC and Linux-i386 are included with the game source code.


Game source compile trouble shooting

compiling with Microsoft Visual C++ 5.0/6.0

Problem: Compiling the source the compiler generates up to 18 "unresolved external symbol" errors.
Solution: Open the 'm_move2_rogue.c' module, save it and build again.
Problem: In Quake2 the following error message appears when loading a map:
****************
ERROR: failed to load game DLL
****************
Solution: Make sure you included the game.def in your project.
Problem: Quake2 crashes when loading the first bot.
Solution 1: do NOT use the compile option "/Gz", this option changes the calling convention. The GetBotAPI function from the gladiator.dll should be called with the right calling convention.
Solution 2: do NOT use the compile option "/O2", with this option the fastest code is created in the majority of cases (it's a default setting for release builds). For some dark and mysterious reason this can cause problems.
Problem: Quake2 crashes with the following message when loading the first bot:
Debug Error!
The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
Solution: do NOT use the compile option "/Gz", this option changes the calling convention. The GetBotAPI function from the gladiator.dll should be called with the right calling convention.


Library Interface


In the future the documentation of the bot library interface will be available here.


Library Variables

The library variables are used for several (game specific) settings. For instance physics settings, buffer sizes and game mode settings. The value of a library variable can be set with the interface function BotLibVarSet.

name: default value:   description:
"basedir" "" Quake2 base directory
"gamedir" "" Quake2 game directory
"cddir" "" Quake2 CD directory
"autolaunchbspc" "0" automatically launch (Win)BSPC
"log" "1" enable/disable creating a log file
"maxclients" "4" maximum number of clients
"maxentities" "1024" maximum number of entities
"sv_friction" "6" ground friction
"sv_stopspeed" "100" stop speed
"sv_gravity" "800" gravity value
"sv_waterfriction" "1" water friction
"sv_watergravity" "400" gravity in water
"sv_maxvelocity" "300" maximum velocity
"sv_maxwalkvelocity" "300" maximum walk velocity
"sv_maxcrouchvelocity" "100" maximum crouch velocity
"sv_maxswimvelocity" "150" maximum swim velocity
"sv_maxacceleration" "2200" maximum acceleration
"sv_airaccelerate" "0" maximum air acceleration
"sv_maxstep" "18" maximum step height
"sv_maxbarrier" "50" maximum barrier height
"sv_maxsteepness" "0.7" maximum floor steepness
"sv_jumpvel" "224" jump z velocity
"sv_maxwaterjump" "20" maximum waterjump height
"max_aaslinks" "4096" maximum links in the AAS
"max_bsplinks" "4096" maximum links in the BSP
"notspawnflags" "2048" entities with these spawnflags will be removed
"weaponconfig" "weapons.c" weapon configuration file
"itemconfig" "items.c" item configuration file
"soundconfig" "sounds.c" sound configuration file
"matchfile" "match.c" file with match strings
"max_messages" "1024" console message heap size
"max_weaponinfo" "32" maximum number of weapon info
"max_projectileinfo" "32" maximum number of projectile info
"max_iteminfo" "256" maximum number of item info
"max_levelitems" "256" maximum number of level items
"max_weights" "256" maximum number of item weights
"max_soundinfo" "256" maximum number of sound info
"max_aassounds" "256" maximum number of playing AAS sounds
"framereachability" "" number of reachabilities to calucate per frame
"forceclustering" "0" force recalculation of clusters
"forcereachability" "0" force recalculation of reachabilities
"forcewrite" "0" force writing of aas file
"nooptimize" "0" no aas optimization
"usehook" "0" enable/disable grapple hook
"laserhook" "0" 0 = CTF hook, 1 = laser hook
"rocketjump" "1" enable/disable rocket jumping
"techs" "0" enable/disable bot CTF tech ussage
"teamplay" "0" enable/disable tourney teamplay
"teamplay_shell" "0" enable/disable teamplay based on shell color
"assimilation" "0" enable/disable assimilation
"dmflags" "0" deathmatch flags
"ctf" "0" enable/disable CTF
"ch" "0" enable/disable Colored Hitman
"ra" "0" enable/disable Rocket Arena 2
"nochat" "0" enable/disable bot chatting
"altnames" "0" have the bots use their alternative names
"fastchat" "0" fast chatting for debugging