Nuclide
Software Development Kit for id Tech
Bot

Multiplayer game opponents, allies. More...

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...
 

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...
 

Functions

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

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...
 

Detailed Description

Multiplayer game opponents, allies.

Bot

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.

Enumerator
BOT_PERSONALITY_NORMAL 

this bot will be dynamic

BOT_PERSONALITY_AGRESSIVE 

this bot will always prefer to be attacking

BOT_PERSONALITY_DEFENSIVE 

this bot will always prefer to stay behind

◆ botstate_t

enum botstate_t

Bot State.

Enumerator
BOT_STATE_IDLE 

this should rarely happen

BOT_STATE_PATROLLING 

this is basically most deathmatch cases

BOT_STATE_DEFENDING 

this is for when bots stay put and stay around spawn, or their teams goalitem

BOT_STATE_ATTACKING 

this is for when bots go to the enemy spawn, or to the enemy team's goalitem

BOT_STATE_FLEEING 

this is for when the AI should just get as far away as possible

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)

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