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

acquire_target

Baseline for target picking behaviors

Vars

ignore_list_keyOptional blackboard key holding a lazylist of atoms to skip while filtering candidates.
minimum_distanceHow close the reachability path must get to the target (0 = onto/adjacent). Passed to can_reach_target when must_be_reachable is set.
must_be_reachableIf TRUE, only candidates the controller can path to are eligible; unreachable ones are reported via note_unreachable_target.
reach_distancePathfinding distance limit used when must_be_reachable is set.
revalidation_modeHow to behave when a target is already set. See TARGET_* defines in ai.dm.
search_priority_strategyOptional selection strategy snapshot from the perform() that kicked off the current async search.
search_rangeRange snapshot from the perform() that kicked off the current async search.
search_strategyStrategy/range snapshot from the perform() that kicked off the current async search.
target_keyBlackboard key to write the found target into.
target_loss_distanceExtended range for retaining an existing target when candidates run dry. 0 = disabled.
target_priority_strategyOptional /datum/target_priority_strategy typepath or blackboard key string. Null means unranked selection.
target_sourceTypepath of the /datum/target_source type used to gather candidates. turned into the singleton instance when used
targeting_strategyEither a /datum/targeting_strategy typepath (resolved directly) or a blackboard key string
vision_rangeHow far to scan for candidates (passed to the target source). Can be a key too.

Procs

can_searchReturns TRUE to abort the search before it starts (e.g. a detection field is already active).
clear_stale_targetClears the target key when revalidating and the search turned up nothing, so a stale target doesn't linger.
filter_candidatesFilters the candidate list to valid targets and excludes candidates ranked below a retainable current target.
find_and_set_targetActual behavior for collecting and filtering targets
get_target_priority_strategyResolves the optional target priority strategy for this behavior.
get_targeting_strategyResolves the targeting strategy for this behavior
get_vision_rangeResolves a numeric vision range without mutating the behavior's configured value.
include_current_targetIncludes a retainable current target in priority-aware reselection even if the target source omitted it.
on_no_candidatesFallback for no targets found.
on_no_valid_candidatesCalled when filter_candidates produces nothing. Override to trigger side effects (e.g. spawning a detection field).
on_target_foundCalled after a target is selected and written to the blackboard. Override for post-selection side effects.
perform_asyncperform_async(): selects candidates in policy order, checking reachability until one succeeds.
pick_final_targetPicks the final target and keeps the current target on policy-defined ties.
should_keep_targetReturns TRUE if the current target is still good and we should skip the search.

Var Details

ignore_list_key

Optional blackboard key holding a lazylist of atoms to skip while filtering candidates.

minimum_distance

How close the reachability path must get to the target (0 = onto/adjacent). Passed to can_reach_target when must_be_reachable is set.

must_be_reachable

If TRUE, only candidates the controller can path to are eligible; unreachable ones are reported via note_unreachable_target.

reach_distance

Pathfinding distance limit used when must_be_reachable is set.

revalidation_mode

How to behave when a target is already set. See TARGET_* defines in ai.dm.

search_priority_strategy

Optional selection strategy snapshot from the perform() that kicked off the current async search.

search_range

Range snapshot from the perform() that kicked off the current async search.

search_strategy

Strategy/range snapshot from the perform() that kicked off the current async search.

target_key

Blackboard key to write the found target into.

target_loss_distance

Extended range for retaining an existing target when candidates run dry. 0 = disabled.

target_priority_strategy

Optional /datum/target_priority_strategy typepath or blackboard key string. Null means unranked selection.

target_source

Typepath of the /datum/target_source type used to gather candidates. turned into the singleton instance when used

targeting_strategy

Either a /datum/targeting_strategy typepath (resolved directly) or a blackboard key string

vision_range

How far to scan for candidates (passed to the target source). Can be a key too.

Proc Details

Returns TRUE to abort the search before it starts (e.g. a detection field is already active).

clear_stale_target

Clears the target key when revalidating and the search turned up nothing, so a stale target doesn't linger.

filter_candidates

Filters the candidate list to valid targets and excludes candidates ranked below a retainable current target.

find_and_set_target

Actual behavior for collecting and filtering targets

get_target_priority_strategy

Resolves the optional target priority strategy for this behavior.

get_targeting_strategy

Resolves the targeting strategy for this behavior

get_vision_range

Resolves a numeric vision range without mutating the behavior's configured value.

include_current_target

Includes a retainable current target in priority-aware reselection even if the target source omitted it.

on_no_candidates

Fallback for no targets found.

on_no_valid_candidates

Called when filter_candidates produces nothing. Override to trigger side effects (e.g. spawning a detection field).

on_target_found

Called after a target is selected and written to the blackboard. Override for post-selection side effects.

perform_async

perform_async(): selects candidates in policy order, checking reachability until one succeeds.

pick_final_target

Picks the final target and keeps the current target on policy-defined ties.

should_keep_target

Returns TRUE if the current target is still good and we should skip the search.