|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)
In Quake2 the inventory stores for every ammo type, weapon, powerup, armor type etc. the amount available of the item.
The decisions the Gladiator bot makes are partly based on the inventory. The inventory is stored as an array of values.
Each value denotes the amount of a specific item. To have fast access to these amounts the array is indexed directly
using the index values defined below. These defines are stored in the file inv.h in
the .pak file included with the Gladiator bot.
When using the Gladiator bot, typing "sv inventory" in the console will print all the inventory indexes. The indexes shown below should be exactly the same as those printed indexes.
Adding new items.
A list with items (gitem_t itemlist) is stored in the file g_items.c in the game source code.
This list stores item definitions. New definitions should always be added to the end of this list.
When a new item is added the Gladiator bot inventory indexes should be updated as well.
Just add a new define to the inv.h file for the new item. For instance if a new weapon is added with the name
"Flame Thrower" the define "#define INVENTORY_FLAMETHROWER 75" should be added to the inv.h file.