Contents: | This document contains editing information for the Q3A bot. The Q3A bot is an artificial player for the computer game Quake III Arena. |
|
Author: | Mr Elusive |
|
Last update: | 2000-01-04 |
Weapon specifications |
The bot uses the weapon specifications to figure out how to use a weapon. The weapon specifications are stored in the file botfiles/weapons.c
A weapon specification is constructed as follows:
weaponinfo
{
}
The specification fields listed below are placed between the braces.
Every field is assigned a value according to the field type.
However not all fields have to be listed. A default value of 0 is used for integers and floats that are not listed.
An empty string is used if a string field is not listed.
name: type: description:
name
string name of the weapon
model
string model of the weapon
weaponindex
integer index of weapon in inventory
flags
integer special flags
projectile
string projectile used by the weapon
numprojectiles
integer number of projectiles
hspread
float horizontal spread of projectiles (degrees from middle)
vspread
float vertical spread of projectiles (degrees from middle)
speed
float speed of the projectile (0 = instant hit)
acceleration
float "acceleration" * time (in seconds) + "speed" = projectile speed
recoil
3 floats amount of recoil the player gets from the weapon
offset
3 floats projectile start offset relative to eye and view angles
angleoffset
3 floats offset of the shoot angles relative to the view angles
extrazvelocity
float extra z velocity the projectile gets
ammoamount
integer ammo amount used per shot
ammoindex
integer index of ammo in inventory
activate
float time it takes to select the weapon
reload
float time it takes to reload the weapon
spinup
float time it takes before first shot
spindown
float time it takes before weapon stops firing
A projectile specification is constructed as follows:
projectileinfo
{
}
The specification fields listed below are placed between the braces.
Every field is assigned a value according to the field type.
name: type: description:
name
string name of the projectile
model
string model of the projectile
flags
integer special flags
gravity
float amount of gravity applied to the projectile [0,1]
damage
integer damage of the projectile
radius
float radius of damage
visdamage
integer damage of the projectile to visible entities
damagetype
integer type of damage (combination of the DAMAGETYPE_? flags)
healthinc
integer health increase the owner gets
push
float amount a player is pushed away from the projectile impact
detonation
float time before projectile explodes after fire pressed
bounce
float amount the projectile bounces
bouncefric
float amount the bounce decreases per bounce
bouncestop
float minimum bounce value before bouncing stops
An example:
projectileinfo
{
name | "rocket" |
|
damage | 100 |
|
radius | 120 |
|
damagetype | $evalint(DAMAGETYPE_IMPACT|DAMAGETYPE_RADIAL) |
weaponinfo
{
name | "Rocket Launcher" |
|
number | WEAPONINDEX_ROCKET_LAUNCHER |
|
projectile | "rocket" |
|
numprojectiles | 1 |
|
speed | 900 |