statetree kit
52 tools. Generated from the plugin source; do not edit by hand.
Guide
Use statetree.* to build and edit StateTree assets on UE 5.8 with the StateTree plugin enabled
(the kit is not loaded otherwise; UE 4.27 and 5.0-5.7 hide every tool). Schemas come from other
plugins: enable GameplayStateTree for StateTreeComponentSchema / StateTreeAIComponentSchema.
Addressing
- States: slash paths of state names, case-sensitive (
Root/Patrol/Wait), as returned bystatetree.list_states. Sibling names are unique (the kit refuses duplicates). - Nodes (tasks, conditions, evaluators, global tasks): the node GUID or its unique name. Give
nodes a
namewhen you add them;statetree.list_nodes/list_global_nodesshow both. - Transitions:
statePath+transitionindex (statetree.list_transitions). - Node types:
/Script/Module.Structpaths, bare struct names (StateTreeDelayTask) or a Blueprint node class path (/Game/AI/BP_MyTask).statetree.list_node_types {kind, asset}lists the types the tree's schema accepts.
Recipe: a working tree
statetree.list_schemas, thenstatetree.create_asset {folder, name, schemaClass}. The factory adds aRootstate and compiles.statetree.add_child_state {asset, parentPath:'Root', name:'Idle'}(oradd_statefor another top-level state/subtree;type= State, Group, Linked, LinkedAsset, Subtree).statetree.add_task {asset, statePath:'Root/Idle', nodeType:'StateTreeDelayTask', name:'IdleWait', properties:[{key:'Duration', value:'2'}]}.statetree.add_transition {asset, statePath:'Root/Idle', trigger:'OnStateCompleted', targetPath:'Root/Patrol'}(withouttargetPaththe link defaults toNextState).- Conditions:
statetree.add_enter_condition {statePath, nodeType:'StateTreeCompareFloatCondition'}orstatetree.add_transition_condition {statePath, transition:0, nodeType}; combine them withstatetree.set_condition_operand {node, operand:'Or', indent}. - Data flow:
statetree.add_parameter {asset, name:'Speed', type:'Float', value:'300'}(root) ->statetree.list_binding_sources {asset, target:'IdleWait'}->statetree.add_binding {asset, target:'IdleWait', targetPath:'Duration', source:'RootParameters', sourcePath:'Speed'}. Input properties (category Input) must be bound or the compile fails. statetree.compile_asset(fails withE_COMPILE_FAILEDand the first errors) orstatetree.get_compile_errorsfor a dry compile that does not touch the asset.statetree.export_assetreturns every state, node (with properties), transition, parameter and binding in one reply - use it to review or diff a tree.
Shortcuts: statetree.recipe_patrol {asset, parentPath, name, moveTaskType, waitSeconds} and
statetree.recipe_chase {...} build complete sub-behaviors with root parameters
(<name>WaitSeconds, <name>Target) already bound. The default moveTaskType
(/Script/GameplayStateTreeModule.StateTreeMoveToTask) needs StateTreeAIComponentSchema; with
other schemas pass e.g. StateTreeDebugTextTask and bind your own movement later.
Editing
- States:
set_state(typed: type, selectionBehavior, tasksCompletion, tag, enabled, linkedSubtree, linkedAsset, requiredEventTag, weight, customTickRate),rename_state(updates links),move_state {newParentPath, index},duplicate_state {newName}(fresh IDs, copied bindings),remove_state(reports dangling transitions).get/set/list_state_propertyreach any other scalar reflected field. - Nodes:
get_node(instance data inproperties, node settings innodeProperties),set_node_property {node, property, value, nodeStruct},rename_node,move_node {index},remove_node(also drops its bindings). - Transitions:
set_transitionchanges only the fields you pass (delayDuration:0disables the delay,enabled:'false'disables it),move_transition {transition, newIndex},remove_transition. - Blueprint nodes:
statetree.create_node_blueprint {folder, name, kind:'task'|'condition'|'evaluator'}creates the Blueprint class; add variables with the bp kit and pass the asset path asnodeType. validate_assetruns the editor fix-ups (link names, parameters, bindings) and structural checks;audit_assetreports the same findings without changing anything.
Gotchas
- Root parameter values cannot be changed or removed from a plugin on 5.8 (the engine keeps
that property bag private).
add_parameterworks for root and state parameters;set_parameter/remove_parameterneedstatePath(state parameters of Subtree/Linked states). - Schemas restrict node types and state types; a refused type returns
E_INVALID_ARGwith the schema name. Single-task schemas store the task in the state's single task slot. - A node name that matches several nodes (for example after
duplicate_state) is ambiguous; use the GUID. - Blueprint node classes appear in
list_node_typesonly once loaded. - Utility considerations are listed (
kind: consideration) but not authored by this kit. - Runtime execution (StateTree components in PIE, sending events) is outside this kit.
Tools
Legend. risk 0 = read-only, 1 = harmless editor op, 2 = modifies asset, 3 = deletes/replaces asset, 4 = project/config/build op, 5 = potentially destructive (calls above
MaxAutoRiskneed"_confirm": true). mutates = runs in a transaction (edit.undo reverts). requires PIE / requires world = refused without a PIE session / an open level. requires plugin = unavailable while the plugin is disabled. dryRun = honours thedryRunargument. smoke = covered byedit.self_test.
statetree.add_binding (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Binds target node property targetPath to sourcePath of a bindable source; validates both paths and type compatibility. Replaces an existing binding on the same target path.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
target | string | Target node: GUID or unique node name. list_bindings: optional filter. |
targetPath | string | Target property path on the node instance data (e.g. Duration). |
source | string | Source struct: a GUID or display name from statetree.list_binding_sources (a node name, a context name), or the keyword RootParameters for the tree's root parameters (several structs are named 'Parameters'). |
sourcePath | string | Source property path (e.g. a root parameter name). |
Returns: tree, bindings, sources, count.
statetree.add_child_state (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Adds a child state under parentPath.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
parentPath | string | add_child_state: slash-separated parent state path (required). add_state: must stay empty (the state is added at the top level). |
name | string | required. Name of the new state; unique among its siblings, no '/'. |
description | string | Optional state description. |
type | string | State type: State (default), Group, Linked, LinkedAsset or Subtree. Default TEXT("State"). |
index | integer | Insert position among the siblings; -1 appends. Default -1. |
Returns: tree, statePath, createdAsset, notes.
statetree.add_enter_condition (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Adds an enter condition to a state.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Owning state path (tasks, enter conditions, transition conditions). Ignored by add_evaluator and add_global_task. |
transition | integer | add_transition_condition: index of the transition in the state's list (statetree.list_transitions). Default -1. |
nodeType | string | required. Node struct path or name (/Script/StateTreeModule.StateTreeDelayTask, StateTreeDelayTask) or a Blueprint node class path (statetree.list_node_types). |
name | string | Optional node name; makes the node addressable by name in the other node tools. Must be unique in the tree. |
properties | array of UeaKeyValue | Optional instance data values (property name -> text value) applied after creation. |
index | integer | Insert position in the container; -1 appends. Default -1. |
Returns: tree, nodes, count, notes.
statetree.add_evaluator (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Adds a global evaluator (the schema must allow evaluators).
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Owning state path (tasks, enter conditions, transition conditions). Ignored by add_evaluator and add_global_task. |
transition | integer | add_transition_condition: index of the transition in the state's list (statetree.list_transitions). Default -1. |
nodeType | string | required. Node struct path or name (/Script/StateTreeModule.StateTreeDelayTask, StateTreeDelayTask) or a Blueprint node class path (statetree.list_node_types). |
name | string | Optional node name; makes the node addressable by name in the other node tools. Must be unique in the tree. |
properties | array of UeaKeyValue | Optional instance data values (property name -> text value) applied after creation. |
index | integer | Insert position in the container; -1 appends. Default -1. |
Returns: tree, nodes, count, notes.
statetree.add_global_task (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Adds a global task (runs for the whole tree lifetime).
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Owning state path (tasks, enter conditions, transition conditions). Ignored by add_evaluator and add_global_task. |
transition | integer | add_transition_condition: index of the transition in the state's list (statetree.list_transitions). Default -1. |
nodeType | string | required. Node struct path or name (/Script/StateTreeModule.StateTreeDelayTask, StateTreeDelayTask) or a Blueprint node class path (statetree.list_node_types). |
name | string | Optional node name; makes the node addressable by name in the other node tools. Must be unique in the tree. |
properties | array of UeaKeyValue | Optional instance data values (property name -> text value) applied after creation. |
index | integer | Insert position in the container; -1 appends. Default -1. |
Returns: tree, nodes, count, notes.
statetree.add_parameter (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Adds a typed parameter with an optional initial value: root parameter (UStateTreeEditorData::CreateRootProperties) or, with statePath, a state parameter. Fails with E_CONFLICT when the name exists.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Empty = root (tree) parameters; otherwise the state whose parameters are edited (Subtree/Linked states). |
name | string | Parameter name. |
type | string | add_parameter: property bag type (Bool, Byte, Int32, Int64, Float, Double, Name, String, Text, Enum, Struct, Object, SoftObject, Class, SoftClass, UInt32, UInt64). |
valueType | string | add_parameter: enum/struct/class path for Enum, Struct, Object, SoftObject, Class and SoftClass types. |
value | string | Value in text form (add_parameter initial value, set_parameter new value). |
Returns: tree, parameters, count, name.
statetree.add_state (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Adds a top-level state (a subtree root).
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
parentPath | string | add_child_state: slash-separated parent state path (required). add_state: must stay empty (the state is added at the top level). |
name | string | required. Name of the new state; unique among its siblings, no '/'. |
description | string | Optional state description. |
type | string | State type: State (default), Group, Linked, LinkedAsset or Subtree. Default TEXT("State"). |
index | integer | Insert position among the siblings; -1 appends. Default -1. |
Returns: tree, statePath, createdAsset, notes.
statetree.add_task (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Adds a task to a state (the state's single task when the schema allows one task per state).
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Owning state path (tasks, enter conditions, transition conditions). Ignored by add_evaluator and add_global_task. |
transition | integer | add_transition_condition: index of the transition in the state's list (statetree.list_transitions). Default -1. |
nodeType | string | required. Node struct path or name (/Script/StateTreeModule.StateTreeDelayTask, StateTreeDelayTask) or a Blueprint node class path (statetree.list_node_types). |
name | string | Optional node name; makes the node addressable by name in the other node tools. Must be unique in the tree. |
properties | array of UeaKeyValue | Optional instance data values (property name -> text value) applied after creation. |
index | integer | Insert position in the container; -1 appends. Default -1. |
Returns: tree, nodes, count, notes.
statetree.add_transition (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Adds a transition (UStateTreeState::AddTransition) and applies the optional priority, event, delay and enabled settings.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Owning state path. list_transitions: empty lists every state's transitions. |
transition | integer | Transition index in the state's list (set/move/remove). Default -1. |
trigger | string | Trigger: OnStateCompleted, OnStateSucceeded, OnStateFailed, OnTick, OnEvent, OnDelegate. add: default OnStateCompleted; set: empty keeps it. |
type | string | Link type: GotoState, NextState, NextSelectableState, Succeeded, Failed, None. add: default GotoState when targetPath is set, else NextState; set: empty keeps it. |
targetPath | string | Target state path for GotoState; empty keeps it on set. |
eventTag | string | Required event tag (OnEvent trigger); empty keeps it, 'None' clears it. |
priority | string | Priority: Low, Normal, Medium, High, Critical; empty keeps it (add: Normal). |
delayDuration | number | Delay in seconds; 0 disables the delay, negative keeps it. Default -1.f. |
delayRandomVariance | number | Random delay variance in seconds; negative keeps it. Default -1.f. |
enabled | string | true/false enables/disables the transition; empty keeps it. |
newIndex | integer | move_transition: new index. Default -1. |
Returns: tree, transitions, count, transitionId.
statetree.add_transition_condition (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Adds a condition to a transition (statePath + transition index).
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Owning state path (tasks, enter conditions, transition conditions). Ignored by add_evaluator and add_global_task. |
transition | integer | add_transition_condition: index of the transition in the state's list (statetree.list_transitions). Default -1. |
nodeType | string | required. Node struct path or name (/Script/StateTreeModule.StateTreeDelayTask, StateTreeDelayTask) or a Blueprint node class path (statetree.list_node_types). |
name | string | Optional node name; makes the node addressable by name in the other node tools. Must be unique in the tree. |
properties | array of UeaKeyValue | Optional instance data values (property name -> text value) applied after creation. |
index | integer | Insert position in the container; -1 appends. Default -1. |
Returns: tree, nodes, count, notes.
statetree.audit_asset (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Read-only audit: compile status plus the structural findings of validate_asset, without fix-ups.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name. |
Returns: tree, compiled, errorCount, warningCount, messages.
statetree.compile_asset (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Compiles the tree (UStateTreeEditingSubsystem::CompileStateTree) and returns the compiler messages; fails with E_COMPILE_FAILED when the compiler rejects the editor data.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name. |
Returns: tree, compiled, errorCount, warningCount, messages.
statetree.create_asset (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Creates a StateTree asset with the given schema; the factory adds a top-level state named Root and compiles it.
| Argument | Type | Description |
|---|---|---|
folder | string | required. Destination folder below /Game. |
name | string | required. Bare asset name. |
schemaClass | string | required. Concrete UStateTreeSchema class path or name (see statetree.list_schemas), e.g. /Script/GameplayStateTreeModule.StateTreeComponentSchema (GameplayStateTree plugin). |
Returns: tree, statePath, createdAsset, notes.
statetree.create_node_blueprint (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Creates a Blueprint node class (task, condition or evaluator) usable as nodeType in the add_* node tools.
| Argument | Type | Description |
|---|---|---|
folder | string | required. Destination folder below /Game. |
name | string | required. Bare Blueprint asset name. |
kind | string | required. Node kind: task, condition or evaluator (parent UStateTreeTaskBlueprintBase / ConditionBlueprintBase / EvaluatorBlueprintBase). |
Returns: tree, statePath, createdAsset, notes.
statetree.duplicate_state (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Duplicates a state (with children, nodes and transitions, fresh IDs) next to the original under newName.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | required. Slash-separated state path. |
newName | string | required. New name (unique among siblings, no '/'). duplicate_state: name of the copy. |
Returns: tree, states, nodes, transitions, parameters, count, notes.
statetree.export_asset (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Exports the whole editor data as typed JSON: states, nodes with properties, transitions, parameters and bindings.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name. |
Returns: tree, states, nodes, transitions, parameters, bindings.
statetree.get_asset (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Returns the summary of one StateTree asset (schema, compile status, counts, root parameter GUID).
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name. |
Returns: tree, statePath, createdAsset, notes.
statetree.get_capabilities (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Lists what the kit can author on this engine and the blocked editor symbols.
| Argument | Type | Description |
|---|---|---|
folder | string | Content folder to inspect. Default TEXT("/Game"). |
recursive | boolean | Include assets below Folder. Default true. |
limit | integer | Maximum returned assets, from 1 to 1000. Default 100. |
Returns: tree, statePath, createdAsset, notes.
statetree.get_compile_errors (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Dry compile: compiles a transient duplicate and returns the messages without touching the asset.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name. |
Returns: tree, compiled, errorCount, warningCount, messages.
statetree.get_node (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Returns one node with its node-struct and instance-data properties as text.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
node | string | required. Node GUID or unique node name. |
Returns: tree, nodes, count, notes.
statetree.get_state (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Returns one state with its nodes (tasks, enter conditions, considerations), transitions and state parameters.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Slash-separated state path such as Root/Patrol (names as returned by statetree.list_states). Empty lists every state where the tool allows it. |
Returns: tree, states, nodes, transitions, parameters, count, notes.
statetree.get_state_property (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Reads one reflected state property as text.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | required. Slash-separated state path. |
property | string | required. Reflected UStateTreeState property name (see statetree.list_state_properties). |
value | string | Text-export value (set_state_property only). |
Returns: values, count, notes.
statetree.list_assets (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Lists StateTree assets under a folder with their summaries.
| Argument | Type | Description |
|---|---|---|
folder | string | Content folder to inspect. Default TEXT("/Game"). |
recursive | boolean | Include assets below Folder. Default true. |
limit | integer | Maximum returned assets, from 1 to 1000. Default 100. |
Returns: trees, count.
statetree.list_binding_sources (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Lists the structs a target node can bind from (context, root parameters, evaluators, global tasks, parent state nodes) with their properties.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
target | string | Target node: GUID or unique node name. list_bindings: optional filter. |
targetPath | string | Target property path on the node instance data (e.g. Duration). |
source | string | Source struct: a GUID or display name from statetree.list_binding_sources (a node name, a context name), or the keyword RootParameters for the tree's root parameters (several structs are named 'Parameters'). |
sourcePath | string | Source property path (e.g. a root parameter name). |
Returns: tree, bindings, sources, count.
statetree.list_bindings (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Lists editor property bindings; with target, only the bindings whose target is that node.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
target | string | Target node: GUID or unique node name. list_bindings: optional filter. |
targetPath | string | Target property path on the node instance data (e.g. Duration). |
source | string | Source struct: a GUID or display name from statetree.list_binding_sources (a node name, a context name), or the keyword RootParameters for the tree's root parameters (several structs are named 'Parameters'). |
sourcePath | string | Source property path (e.g. a root parameter name). |
Returns: tree, bindings, sources, count.
statetree.list_global_nodes (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Lists global evaluators and global tasks.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name. |
Returns: tree, nodes, count, notes.
statetree.list_node_types (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Lists node types (task/condition/evaluator structs and Blueprint classes); with asset, only those its schema allows.
| Argument | Type | Description |
|---|---|---|
kind | string | Node kind to list: task, condition, evaluator, or empty for all three. |
asset | string | Optional StateTree asset: when set, only types its schema allows are returned. |
filter | string | Optional case-insensitive substring filter on the type path. |
limit | integer | Maximum returned types, from 1 to 1000. Default 300. |
Returns: types, count.
statetree.list_nodes (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Lists the nodes of one state (tasks, enter conditions, considerations, transition conditions) or of every state.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | State path; empty lists the nodes of every state (global nodes: statetree.list_global_nodes). |
Returns: tree, nodes, count, notes.
statetree.list_parameters (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Lists parameters: root parameters and every state's parameters, or only statePath's when given.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Empty = root (tree) parameters; otherwise the state whose parameters are edited (Subtree/Linked states). |
name | string | Parameter name. |
type | string | add_parameter: property bag type (Bool, Byte, Int32, Int64, Float, Double, Name, String, Text, Enum, Struct, Object, SoftObject, Class, SoftClass, UInt32, UInt64). |
valueType | string | add_parameter: enum/struct/class path for Enum, Struct, Object, SoftObject, Class and SoftClass types. |
value | string | Value in text form (add_parameter initial value, set_parameter new value). |
Returns: tree, parameters, count, name.
statetree.list_schemas (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Lists concrete, loaded UStateTreeSchema classes usable as statetree.create_asset schemaClass.
| Argument | Type | Description |
|---|---|---|
folder | string | Content folder to inspect. Default TEXT("/Game"). |
recursive | boolean | Include assets below Folder. Default true. |
limit | integer | Maximum returned assets, from 1 to 1000. Default 100. |
Returns: values, count, notes.
statetree.list_state_properties (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Lists the reflected UStateTreeState properties (name = C++ type) usable with get/set_state_property.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Slash-separated state path such as Root/Patrol (names as returned by statetree.list_states). Empty lists every state where the tool allows it. |
Returns: values, count, notes.
statetree.list_states (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Lists every state (hierarchy order) with paths used by the other state tools.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name. |
Returns: tree, states, nodes, transitions, parameters, count, notes.
statetree.list_transitions (risk 0, UE 5.8+, requires plugin StateTree, smoke)
Lists the transitions of a state (or of every state when statePath is empty) with trigger, link, priority, delay and condition count.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Owning state path. list_transitions: empty lists every state's transitions. |
transition | integer | Transition index in the state's list (set/move/remove). Default -1. |
trigger | string | Trigger: OnStateCompleted, OnStateSucceeded, OnStateFailed, OnTick, OnEvent, OnDelegate. add: default OnStateCompleted; set: empty keeps it. |
type | string | Link type: GotoState, NextState, NextSelectableState, Succeeded, Failed, None. add: default GotoState when targetPath is set, else NextState; set: empty keeps it. |
targetPath | string | Target state path for GotoState; empty keeps it on set. |
eventTag | string | Required event tag (OnEvent trigger); empty keeps it, 'None' clears it. |
priority | string | Priority: Low, Normal, Medium, High, Critical; empty keeps it (add: Normal). |
delayDuration | number | Delay in seconds; 0 disables the delay, negative keeps it. Default -1.f. |
delayRandomVariance | number | Random delay variance in seconds; negative keeps it. Default -1.f. |
enabled | string | true/false enables/disables the transition; empty keeps it. |
newIndex | integer | move_transition: new index. Default -1. |
Returns: tree, transitions, count, transitionId.
statetree.move_node (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Moves a node to another index inside its container (task order, condition order...).
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
node | string | required. Node GUID or unique node name. |
index | integer | required. New index inside its container (0-based). |
Returns: tree, nodes, count, notes.
statetree.move_state (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Moves a state under another parent (or to the top level) at an index.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | required. Slash-separated path of the state to move. |
newParentPath | string | New parent state path; empty moves the state to the top level. |
index | integer | Position among the new siblings; -1 appends. Default -1. |
Returns: tree, states, nodes, transitions, parameters, count, notes.
statetree.move_transition (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Moves a transition to newIndex (transitions are evaluated in order).
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Owning state path. list_transitions: empty lists every state's transitions. |
transition | integer | Transition index in the state's list (set/move/remove). Default -1. |
trigger | string | Trigger: OnStateCompleted, OnStateSucceeded, OnStateFailed, OnTick, OnEvent, OnDelegate. add: default OnStateCompleted; set: empty keeps it. |
type | string | Link type: GotoState, NextState, NextSelectableState, Succeeded, Failed, None. add: default GotoState when targetPath is set, else NextState; set: empty keeps it. |
targetPath | string | Target state path for GotoState; empty keeps it on set. |
eventTag | string | Required event tag (OnEvent trigger); empty keeps it, 'None' clears it. |
priority | string | Priority: Low, Normal, Medium, High, Critical; empty keeps it (add: Normal). |
delayDuration | number | Delay in seconds; 0 disables the delay, negative keeps it. Default -1.f. |
delayRandomVariance | number | Random delay variance in seconds; negative keeps it. Default -1.f. |
enabled | string | true/false enables/disables the transition; empty keeps it. |
newIndex | integer | move_transition: new index. Default -1. |
Returns: tree, transitions, count, transitionId.
statetree.recipe_chase (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Builds a chase state:
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
parentPath | string | Parent state path that receives the recipe state; empty adds it at the top level. |
name | string | required. Name of the recipe state (unique among its siblings). |
moveTaskType | string | Task struct used for the movement step. Default /Script/GameplayStateTreeModule.StateTreeMoveToTask needs an AI schema (StateTreeAIComponentSchema); pass e.g. StateTreeDebugTextTask for other schemas. Default TEXT("/Script/GameplayStateTreeModule.StateTreeMoveToTask"). |
waitSeconds | number | Seconds of the wait/attack Delay task. Default 2.f. |
Returns: tree, statePath, createdAsset, notes.
statetree.recipe_patrol (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Builds a patrol state:
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
parentPath | string | Parent state path that receives the recipe state; empty adds it at the top level. |
name | string | required. Name of the recipe state (unique among its siblings). |
moveTaskType | string | Task struct used for the movement step. Default /Script/GameplayStateTreeModule.StateTreeMoveToTask needs an AI schema (StateTreeAIComponentSchema); pass e.g. StateTreeDebugTextTask for other schemas. Default TEXT("/Script/GameplayStateTreeModule.StateTreeMoveToTask"). |
waitSeconds | number | Seconds of the wait/attack Delay task. Default 2.f. |
Returns: tree, statePath, createdAsset, notes.
statetree.remove_binding (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Removes the binding(s) of target node property targetPath.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
target | string | Target node: GUID or unique node name. list_bindings: optional filter. |
targetPath | string | Target property path on the node instance data (e.g. Duration). |
source | string | Source struct: a GUID or display name from statetree.list_binding_sources (a node name, a context name), or the keyword RootParameters for the tree's root parameters (several structs are named 'Parameters'). |
sourcePath | string | Source property path (e.g. a root parameter name). |
Returns: tree, bindings, sources, count.
statetree.remove_node (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Removes a node (any kind) and the bindings that targeted it.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
node | string | required. Node GUID or unique node name. |
Returns: tree, nodes, count, notes.
statetree.remove_parameter (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Removes a state parameter. Root parameters cannot be removed from a plugin on 5.8 (see get_capabilities).
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Empty = root (tree) parameters; otherwise the state whose parameters are edited (Subtree/Linked states). |
name | string | Parameter name. |
type | string | add_parameter: property bag type (Bool, Byte, Int32, Int64, Float, Double, Name, String, Text, Enum, Struct, Object, SoftObject, Class, SoftClass, UInt32, UInt64). |
valueType | string | add_parameter: enum/struct/class path for Enum, Struct, Object, SoftObject, Class and SoftClass types. |
value | string | Value in text form (add_parameter initial value, set_parameter new value). |
Returns: tree, parameters, count, name.
statetree.remove_state (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Removes a state with its children; bindings that targeted its nodes are removed and transitions pointing at it are reported.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Slash-separated state path such as Root/Patrol (names as returned by statetree.list_states). Empty lists every state where the tool allows it. |
Returns: tree, states, nodes, transitions, parameters, count, notes.
statetree.remove_transition (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Removes a transition and its conditions.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Owning state path. list_transitions: empty lists every state's transitions. |
transition | integer | Transition index in the state's list (set/move/remove). Default -1. |
trigger | string | Trigger: OnStateCompleted, OnStateSucceeded, OnStateFailed, OnTick, OnEvent, OnDelegate. add: default OnStateCompleted; set: empty keeps it. |
type | string | Link type: GotoState, NextState, NextSelectableState, Succeeded, Failed, None. add: default GotoState when targetPath is set, else NextState; set: empty keeps it. |
targetPath | string | Target state path for GotoState; empty keeps it on set. |
eventTag | string | Required event tag (OnEvent trigger); empty keeps it, 'None' clears it. |
priority | string | Priority: Low, Normal, Medium, High, Critical; empty keeps it (add: Normal). |
delayDuration | number | Delay in seconds; 0 disables the delay, negative keeps it. Default -1.f. |
delayRandomVariance | number | Random delay variance in seconds; negative keeps it. Default -1.f. |
enabled | string | true/false enables/disables the transition; empty keeps it. |
newIndex | integer | move_transition: new index. Default -1. |
Returns: tree, transitions, count, transitionId.
statetree.rename_node (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Renames a node (FStateTreeEditorNode::SetNodeName).
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
node | string | required. Node GUID or unique node name. |
newName | string | required. New node name (unique in the tree). |
Returns: tree, nodes, count, notes.
statetree.rename_state (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Renames a state and updates the transition links that point to it.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | required. Slash-separated state path. |
newName | string | required. New name (unique among siblings, no '/'). duplicate_state: name of the copy. |
Returns: tree, states, nodes, transitions, parameters, count, notes.
statetree.set_condition_operand (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Sets a condition's expression operand (And/Or) and indent.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
node | string | required. Condition node GUID or unique name. |
operand | string | Operand joining this condition with the previous one: And or Or (empty keeps it). |
indent | integer | Expression indent (0-4, parentheses depth); -1 keeps it. Default -1. |
Returns: tree, nodes, count, notes.
statetree.set_node_property (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Sets a node instance-data property (or node-struct property with nodeStruct=true) from text.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
node | string | required. Node GUID or unique node name. |
property | string | required. Property name on the instance data (default) or on the node struct (nodeStruct=true), e.g. Duration or bTaskEnabled. |
value | string | Text value (ImportText format: 2.5, true, (X=1,Y=2,Z=3), /Game/Path.Asset). |
nodeStruct | boolean | Edit the node struct (e.g. bTaskEnabled, bConsideredForCompletion) instead of its instance data. Default false. |
Returns: tree, nodes, count, notes.
statetree.set_parameter (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Sets the value of a state parameter from text. Root parameter values are not writable from a plugin on 5.8 (see get_capabilities).
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Empty = root (tree) parameters; otherwise the state whose parameters are edited (Subtree/Linked states). |
name | string | Parameter name. |
type | string | add_parameter: property bag type (Bool, Byte, Int32, Int64, Float, Double, Name, String, Text, Enum, Struct, Object, SoftObject, Class, SoftClass, UInt32, UInt64). |
valueType | string | add_parameter: enum/struct/class path for Enum, Struct, Object, SoftObject, Class and SoftClass types. |
value | string | Value in text form (add_parameter initial value, set_parameter new value). |
Returns: tree, parameters, count, name.
statetree.set_state (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Sets typed state settings (type, selection behavior, task completion, tag, enabled, linked subtree/asset, required event, weight, tick rate).
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | required. Slash-separated state path. |
description | string | New description; empty keeps it (use set_state_property Description to clear). |
type | string | State type: State, Group, Linked, LinkedAsset, Subtree; empty keeps it. |
selectionBehavior | string | Child selection: None, TryEnterState, TrySelectChildrenInOrder, TrySelectChildrenAtRandom, TrySelectChildrenWithHighestUtility, TrySelectChildrenAtRandomWeightedByUtility, TryFollowTransitions; empty keeps it. |
tasksCompletion | string | Task completion: Any or All; empty keeps it. |
tag | string | Gameplay tag (must exist); empty keeps it, 'None' clears it. |
enabled | string | true/false enables/disables the state; empty keeps it. |
linkedSubtree | string | Linked states: path of the Subtree state to run; empty keeps it. |
linkedAsset | string | LinkedAsset states: StateTree asset to run; empty keeps it. |
requiredEventTag | string | Required event tag to enter; empty keeps it, 'None' clears it. |
weight | number | Utility weight; negative keeps it. Default -1.f. |
customTickRate | number | Custom tick rate in seconds; 0 disables it, negative keeps it. Default -1.f. |
Returns: tree, states, nodes, transitions, parameters, count, notes.
statetree.set_state_property (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Writes one reflected state property from text (scalar settings such as Description, bEnabled, Weight, bCheckPrerequisitesWhenActivatingChildDirectly). Node arrays, transitions, children and IDs are refused: use the typed tools.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | required. Slash-separated state path. |
property | string | required. Reflected UStateTreeState property name (see statetree.list_state_properties). |
value | string | Text-export value (set_state_property only). |
Returns: values, count, notes.
statetree.set_transition (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Edits a transition in place; only the fields that are set change.
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path or unique asset name. |
statePath | string | Owning state path. list_transitions: empty lists every state's transitions. |
transition | integer | Transition index in the state's list (set/move/remove). Default -1. |
trigger | string | Trigger: OnStateCompleted, OnStateSucceeded, OnStateFailed, OnTick, OnEvent, OnDelegate. add: default OnStateCompleted; set: empty keeps it. |
type | string | Link type: GotoState, NextState, NextSelectableState, Succeeded, Failed, None. add: default GotoState when targetPath is set, else NextState; set: empty keeps it. |
targetPath | string | Target state path for GotoState; empty keeps it on set. |
eventTag | string | Required event tag (OnEvent trigger); empty keeps it, 'None' clears it. |
priority | string | Priority: Low, Normal, Medium, High, Critical; empty keeps it (add: Normal). |
delayDuration | number | Delay in seconds; 0 disables the delay, negative keeps it. Default -1.f. |
delayRandomVariance | number | Random delay variance in seconds; negative keeps it. Default -1.f. |
enabled | string | true/false enables/disables the transition; empty keeps it. |
newIndex | integer | move_transition: new index. Default -1. |
Returns: tree, transitions, count, transitionId.
statetree.validate_asset (risk 2, mutates, UE 5.8+, requires plugin StateTree, smoke)
Runs the editor validation fix-ups (state links, parameters, bindings) and reports structural problems (missing transition targets, empty leaf states, duplicate sibling names).
| Argument | Type | Description |
|---|---|---|
asset | string | required. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name. |
Returns: tree, compiled, errorCount, warningCount, messages.