byond - Modules - TypesVar Details - Proc Details

ai_behavior

Vars

anti_stuck_timerWhen this timer is up, we force a change of node to ensure that the ai will never stay stuck trying to go to a specific node
atom_to_walk_toWhat atom is the ai moving to
base_actionThe standard ation of the AI, aka what it should do at the init or when going back to "normal" behavior
combat_targetThe atom we want to attack at range, separate as we might not be moving in regards to it
current_actionWhat the ai is doing right now
current_nodeCurrent node to use for calculating action states: this is the mob's node
escort_goalWhether the goal node is specifically for an escort target
escorted_atomWhat we will escort
goal_nodeThe node goal of this ai
goal_nodesA list of nodes the ai should go to in order to go to goal_node
identifierAn identifier associated with this behavior, used for accessing specific values of a node's weights
interact_targetAn atom we want to interact with, such as picking it up
is_offered_on_creationIf the mob attached to the ai is offered on xeno creation
lower_engage_distRange to stay from a hostile target. Inner range
lower_maintain_distHow far should we stay away from atom_to_walk_to. Inner range
minimum_healthMinimum health percentage before the ai tries to run away
mob_parentRef to the parent associated with this mind
registered_for_moveAre we already registered for normal pathfinding
registered_for_node_pathfindingAre we waiting for advanced pathfinding
sidestep_probProb chance of sidestepping (left or right) when distance maintained with target
target_distanceHow far will we look for targets
turfs_in_pathA list of turfs the ai should go in order to get to atom_to_walk_to
upper_engage_distRange to stay from a hostile target. Outer range
upper_maintain_distHow far should we stay away from atom_to_walk_to. Outer range
weak_escortShould we lose the escorted atom if we change action

Procs

ai_complete_moveMakes a move in a given direction
ai_do_moveTries to move the ai toward its atom_to_walk_to
ask_for_pathfindingRegister on advanced pathfinding subsytem to get a tile pathfinding
change_actionCleanup old state vars, start the movement towards our new target
clean_escorted_atomclean the escorted atom var to avoid harddels
clean_goal_nodeClean the goal node
cleanup_current_actionCleans up signals related to the action and element(s)
cleanup_signalsClean every signal on the ai_behavior
deal_with_obstacleSignal handler when the ai is blocked by an obstacle
do_unset_targetUnsets a target from any target vars its in
find_closest_nodeFinds the closest node to an atom
find_next_dirsFind our movement options
finished_node_moveWe finished moving to a node, let's pick a random nearby one to travel to
finished_path_moveSignal handler when we reached our current tile goal
get_atom_to_escortFinds the most suitable thing to escort
global_set_escorted_atomChange atom to walk to if the order comes from a corresponding commander
late_initializeSet behaviour to base behavior
look_for_new_stateCheck if we need to adopt a new state
look_for_next_nodeTry to find a node to go to. If ignore_current_node is true, we will just find the closest current_node, and not the current_node best adjacent node
look_for_node_pathLook for the a* node path to get to goal_node
look_for_tile_pathLook for the a* tile path to get to atom_to_walk_to
scheduled_moveMove the ai and schedule the next move
set_agressivitySet the target distance to be normal (initial) or very low (almost passive)
set_atom_to_walk_toSets our direct movement target
set_combat_targetSets our active combat target
set_current_nodeSet the current node to next_node
set_escortFinds and sets the most suitable escort candidate, if possible
set_escorted_atomSet the escorted atom.
set_goal_nodeSet the goal node
set_interact_targetSets an interaction target
should_holdReturns true if the mob should not move for some reason
start_aiRegister ai behaviours
state_processAny state specific process behavior
unset_targetSig handler for unsetting a target

Var Details

anti_stuck_timer

When this timer is up, we force a change of node to ensure that the ai will never stay stuck trying to go to a specific node

atom_to_walk_to

What atom is the ai moving to

base_action

The standard ation of the AI, aka what it should do at the init or when going back to "normal" behavior

combat_target

The atom we want to attack at range, separate as we might not be moving in regards to it

current_action

What the ai is doing right now

current_node

Current node to use for calculating action states: this is the mob's node

escort_goal

Whether the goal node is specifically for an escort target

escorted_atom

What we will escort

goal_node

The node goal of this ai

goal_nodes

A list of nodes the ai should go to in order to go to goal_node

identifier

An identifier associated with this behavior, used for accessing specific values of a node's weights

interact_target

An atom we want to interact with, such as picking it up

is_offered_on_creation

If the mob attached to the ai is offered on xeno creation

lower_engage_dist

Range to stay from a hostile target. Inner range

lower_maintain_dist

How far should we stay away from atom_to_walk_to. Inner range

minimum_health

Minimum health percentage before the ai tries to run away

mob_parent

Ref to the parent associated with this mind

registered_for_move

Are we already registered for normal pathfinding

registered_for_node_pathfinding

Are we waiting for advanced pathfinding

sidestep_prob

Prob chance of sidestepping (left or right) when distance maintained with target

target_distance

How far will we look for targets

turfs_in_path

A list of turfs the ai should go in order to get to atom_to_walk_to

upper_engage_dist

Range to stay from a hostile target. Outer range

upper_maintain_dist

How far should we stay away from atom_to_walk_to. Outer range

weak_escort

Should we lose the escorted atom if we change action

Proc Details

ai_complete_move

Makes a move in a given direction

ai_do_move

Tries to move the ai toward its atom_to_walk_to

ask_for_pathfinding

Register on advanced pathfinding subsytem to get a tile pathfinding

change_action

Cleanup old state vars, start the movement towards our new target

clean_escorted_atom

clean the escorted atom var to avoid harddels

clean_goal_node

Clean the goal node

cleanup_current_action

Cleans up signals related to the action and element(s)

cleanup_signals

Clean every signal on the ai_behavior

deal_with_obstacle

Signal handler when the ai is blocked by an obstacle

do_unset_target

Unsets a target from any target vars its in

find_closest_node

Finds the closest node to an atom

find_next_dirs

Find our movement options

finished_node_move

We finished moving to a node, let's pick a random nearby one to travel to

finished_path_move

Signal handler when we reached our current tile goal

get_atom_to_escort

Finds the most suitable thing to escort

global_set_escorted_atom

Change atom to walk to if the order comes from a corresponding commander

late_initialize

Set behaviour to base behavior

look_for_new_state

Check if we need to adopt a new state

look_for_next_node

Try to find a node to go to. If ignore_current_node is true, we will just find the closest current_node, and not the current_node best adjacent node

look_for_node_path

Look for the a* node path to get to goal_node

look_for_tile_path

Look for the a* tile path to get to atom_to_walk_to

scheduled_move

Move the ai and schedule the next move

set_agressivity

Set the target distance to be normal (initial) or very low (almost passive)

set_atom_to_walk_to

Sets our direct movement target

set_combat_target

Sets our active combat target

set_current_node

Set the current node to next_node

set_escort

Finds and sets the most suitable escort candidate, if possible

set_escorted_atom

Set the escorted atom.

set_goal_node

Set the goal node

set_interact_target

Sets an interaction target

should_hold

Returns true if the mob should not move for some reason

start_ai

Register ai behaviours

state_process

Any state specific process behavior

unset_target

Sig handler for unsetting a target