Nuclide
Software Development Kit for id Technology
Bot

Multiplayer game opponents, allies. More...

Detailed Description

Multiplayer game opponents, allies.

Computer controlled opponents are called "Bots". If a game supports them, they will be added with either bot_minClients # in the server console, or with the addBot command.

See also

Modules

 Info Tags
 Info tags for bots used to identify objects.
 
 CVars
 Console variable relating to multiplayer AI.
 
 Profiles
 Different userinfo profiles for bot characters.
 

Classes

class  NSBot
 A virtual multiplayer opponent. More...
 

Functions

vector Route_SelectDestination (NSBot target)
 
void _BotLog (string functionName, string msg)
 
void _BotEntLog (string className, string functionName, float edictNum, string warnMessage)
 

Macros

#define BotLog(...)   if (autocvar_bot_developer) _BotLog(__FUNC__, sprintf(__VA_ARGS__))
 Logs an bot system specific log message. More...
 
#define BotEntLog(...)   if (autocvar_bot_developer) _BotEntLog(classname, __FUNC__, num_for_edict(this), sprintf(__VA_ARGS__))
 Logs an bot specific entity class log message. More...
 

Variables

var int autocvar_nav_linksize = 256
 
var int autocvar_nav_radius = 8
 
var string autocvar_bot_prefix = ""
 
entity Bot_AddQuick (void)
 Adds a bot to the game with some basic info. More...
 
void BotLib_Init (void)
 
void Bot_RandomColormap (NSBot target)
 Applies random custom colors to the given bot entity. More...
 
#define BOTROUTE_DESTINATION   -1
 The desired target destination has been reached. More...
 
#define BOTROUTE_END   -2
 Unloading of the route in progress. More...
 
enum  botpersonality_t { BOT_PERSONALITY_NORMAL , BOT_PERSONALITY_AGRESSIVE , BOT_PERSONALITY_DEFENSIVE }
 Bot Personality. More...
 
enum  botstate_t {
  BOT_STATE_IDLE , BOT_STATE_PATROLLING , BOT_STATE_DEFENDING , BOT_STATE_ATTACKING ,
  BOT_STATE_FLEEING
}
 Bot State. More...
 

Function Documentation

◆ _BotEntLog()

void _BotEntLog ( string  className,
string  functionName,
float  edictNum,
string  warnMessage 
)

◆ _BotLog()

void _BotLog ( string  functionName,
string  msg 
)

◆ Bot_AddQuick()

entity Bot_AddQuick ( void  )

Adds a bot to the game with some basic info.

Returns the resulting entity. NULL if unavailable.

◆ Bot_RandomColormap()

void Bot_RandomColormap ( NSBot  target)

Applies random custom colors to the given bot entity.

◆ BotLib_Init()

void BotLib_Init ( void  )

◆ Route_SelectDestination()

vector Route_SelectDestination ( NSBot  target)

Macro Definition Documentation

◆ BotEntLog

#define BotEntLog (   ...)    if (autocvar_bot_developer) _BotEntLog(classname, __FUNC__, num_for_edict(this), sprintf(__VA_ARGS__))

Logs an bot specific entity class log message.

The console variable bot_developer has to be 1 for them to be visible.

Parameters
description(...)contains a formatted string containing a description.

◆ BotLog

#define BotLog (   ...)    if (autocvar_bot_developer) _BotLog(__FUNC__, sprintf(__VA_ARGS__))

Logs an bot system specific log message.

The console variable bot_developer has to be 1 for them to be visible.

Parameters
description(...)contains a formatted string containing a description.

◆ BOTROUTE_DESTINATION

#define BOTROUTE_DESTINATION   -1

The desired target destination has been reached.

◆ BOTROUTE_END

#define BOTROUTE_END   -2

Unloading of the route in progress.

Enumeration Type Documentation

◆ botpersonality_t

Bot Personality.

◆ botstate_t

enum botstate_t

Bot State.

Variable Documentation

◆ autocvar_bot_prefix

var string autocvar_bot_prefix = ""

◆ autocvar_nav_linksize

var int autocvar_nav_linksize = 256

◆ autocvar_nav_radius

var int autocvar_nav_radius = 8