/tg/ Station 13 - Modules - Types

code/datums/ai/_ai_bt_composites.dm

/datum/bt_node/compositeBase composite node. Holds an ordered list of child bt_node instances.
/datum/bt_node/composite/sequenceSequence node: ticks children in order. Returns BT_FAILURE on first child failure. Returns BT_RUNNING on first child returning BT_RUNNING (stops further evaluation). Returns BT_SUCCESS only if all children succeed.
/datum/bt_node/composite/selectorSelector node: ticks children in order. Returns the first non-BT_FAILURE result (BT_SUCCESS or BT_RUNNING), stopping further evaluation. Returns BT_FAILURE only if all children fail.
/datum/bt_node/composite/subplanSubplan node: Runs child and applies configurable restart policies when the child completes instead of propagating completion directly.
/datum/bt_node/composite/parallelParallel node: ticks ALL children every planning cycle, regardless of intermediate results. Success and failure are determined by the configurable success_policy and failure_policy.