/tg/ Station 13 - Modules - TypesVar Details - Proc Details

ai_controller

Vars

ai_movementReference to the movement datum we use. Is a type on initialize but becomes a ref afterwards.
ai_statusCurrent status of AI (OFF/ON)
ai_traitsBitfield of traits for this AI to handle extra behavior
behavior_cooldownsCurrent actions and their respective last time ran as an assoc list.
blackboardThis is a list of variables the AI uses and can be mutated by actions. When an action is performed you pass this list and any relevant keys for the variables it can mutate.
continue_processing_when_clientCan the AI remain in control if there is a client?
current_behaviorsCurrent actions being performed by the AI.
current_movement_targetCurrent movement target of the AI, generally set by decision making.
max_target_distancedistance to give up on target
movement_cooldownCooldown until next movement
movement_delayDelay between movements. This is on the controller so we can keep the movement datum singleton
movement_pathA list for the path we're currently following, if we're using JPS pathing
pathing_attemptsTracks recent pathing attempts, if we fail too many in a row we fail our current plans.
pawnThe atom this controller is controlling
repath_cooldownCooldown for JPS movement, how often we're allowed to try making a new path

Procs

PerformIdleBehaviorAre we close enough to engage? Perform some dumb idle behavior.
PossessPawnProc to move from one pawn to another, this will destroy the target's existing controller.
SelectBehaviorsThis is where you decide what actions are taken by the AI.
TryPossessPawnAbstract proc for initializing the pawn to the new controller
UnpossessPawnProc for deinitializing the pawn to the old controller
able_to_runReturns TRUE if the ai controller can actually run at the moment.
get_accessUse this proc to define how your controller defines what access the pawn has for the sake of pathfinding, likely pointing to whatever ID slot is relevant
processGenerates a plan and see if our existing one is still valid.
set_ai_statusThis proc handles changing ai status, and starts/stops processing if required.

Var Details

ai_movement

Reference to the movement datum we use. Is a type on initialize but becomes a ref afterwards.

ai_status

Current status of AI (OFF/ON)

ai_traits

Bitfield of traits for this AI to handle extra behavior

behavior_cooldowns

Current actions and their respective last time ran as an assoc list.

blackboard

This is a list of variables the AI uses and can be mutated by actions. When an action is performed you pass this list and any relevant keys for the variables it can mutate.

continue_processing_when_client

Can the AI remain in control if there is a client?

current_behaviors

Current actions being performed by the AI.

current_movement_target

Current movement target of the AI, generally set by decision making.

max_target_distance

distance to give up on target

movement_cooldown

Cooldown until next movement

movement_delay

Delay between movements. This is on the controller so we can keep the movement datum singleton

movement_path

A list for the path we're currently following, if we're using JPS pathing

pathing_attempts

Tracks recent pathing attempts, if we fail too many in a row we fail our current plans.

pawn

The atom this controller is controlling

repath_cooldown

Cooldown for JPS movement, how often we're allowed to try making a new path

Proc Details

PerformIdleBehavior

Are we close enough to engage? Perform some dumb idle behavior.

PossessPawn

Proc to move from one pawn to another, this will destroy the target's existing controller.

SelectBehaviors

This is where you decide what actions are taken by the AI.

TryPossessPawn

Abstract proc for initializing the pawn to the new controller

UnpossessPawn

Proc for deinitializing the pawn to the old controller

able_to_run

Returns TRUE if the ai controller can actually run at the moment.

get_access

Use this proc to define how your controller defines what access the pawn has for the sake of pathfinding, likely pointing to whatever ID slot is relevant

process

Generates a plan and see if our existing one is still valid.

set_ai_status

This proc handles changing ai status, and starts/stops processing if required.