Goonstation 13 - Modules - TypesVar Details - Proc Details

task

Vars

ai_turboif this is set, temporarily give this mob the HEAVYWEIGHT_AI mob flag for the duration of this task
distance_from_targetDistance we want to be away from the target for pathing in tiles 0 = same tile / 1 = next to / etc
max_distThe maximum tile distance that we look for targets
move_through_spaceIf this task allows pathing through space
score_by_distance_onlyIf this is set score_target() is ignored and instead the target is chosen by distance only. This is better for performance if there are multiple targets. Override to FALSE if you override score_target()!
weightfor weighting the importance of the goal this sequence is in charge of

Procs

evaluateEvaluate the current environment and assign priority to switching to this task
get_best_targetTakes a list of atoms which are then evaluated, before setting the holder's target. Note this checks a path exists to each target. The list of targets is expected (but not required) to be ordered from best to worst - by default view() will do this if score_target() is based on distance
get_targetsReturns a list of atoms that are potential targets for this task
next_taskCalled on every mobAI tick - returns a task to switch to, ending this task, or null to continue
on_resetCalled whenever the task is started or ended. Override this instead of reset()
on_tickCalled on every mobAI tick - this tick rate is determined by mobAI priority
score_targetIf overriding also override [score_by_distance_only] to FALSE!
switched_toCalled when the task is switched to by the holder

Var Details

ai_turbo

if this is set, temporarily give this mob the HEAVYWEIGHT_AI mob flag for the duration of this task

distance_from_target

Distance we want to be away from the target for pathing in tiles 0 = same tile / 1 = next to / etc

max_dist

The maximum tile distance that we look for targets

move_through_space

If this task allows pathing through space

score_by_distance_only

If this is set score_target() is ignored and instead the target is chosen by distance only. This is better for performance if there are multiple targets. Override to FALSE if you override score_target()!

weight

for weighting the importance of the goal this sequence is in charge of

Proc Details

evaluate

Evaluate the current environment and assign priority to switching to this task

get_best_target

Takes a list of atoms which are then evaluated, before setting the holder's target. Note this checks a path exists to each target. The list of targets is expected (but not required) to be ordered from best to worst - by default view() will do this if score_target() is based on distance

get_targets

Returns a list of atoms that are potential targets for this task

next_task

Called on every mobAI tick - returns a task to switch to, ending this task, or null to continue

on_reset

Called whenever the task is started or ended. Override this instead of reset()

on_tick

Called on every mobAI tick - this tick rate is determined by mobAI priority

score_target

If overriding also override [score_by_distance_only] to FALSE!

switched_to

Called when the task is switched to by the holder