Skip to main content

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 by statetree.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 name when you add them; statetree.list_nodes / list_global_nodes show both.
  • Transitions: statePath + transition index (statetree.list_transitions).
  • Node types: /Script/Module.Struct paths, 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​

  1. statetree.list_schemas, then statetree.create_asset {folder, name, schemaClass}. The factory adds a Root state and compiles.
  2. statetree.add_child_state {asset, parentPath:'Root', name:'Idle'} (or add_state for another top-level state/subtree; type = State, Group, Linked, LinkedAsset, Subtree).
  3. statetree.add_task {asset, statePath:'Root/Idle', nodeType:'StateTreeDelayTask', name:'IdleWait', properties:[{key:'Duration', value:'2'}]}.
  4. statetree.add_transition {asset, statePath:'Root/Idle', trigger:'OnStateCompleted', targetPath:'Root/Patrol'} (without targetPath the link defaults to NextState).
  5. Conditions: statetree.add_enter_condition {statePath, nodeType:'StateTreeCompareFloatCondition'} or statetree.add_transition_condition {statePath, transition:0, nodeType}; combine them with statetree.set_condition_operand {node, operand:'Or', indent}.
  6. 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.
  7. statetree.compile_asset (fails with E_COMPILE_FAILED and the first errors) or statetree.get_compile_errors for a dry compile that does not touch the asset.
  8. statetree.export_asset returns 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_property reach any other scalar reflected field.
  • Nodes: get_node (instance data in properties, node settings in nodeProperties), set_node_property {node, property, value, nodeStruct}, rename_node, move_node {index}, remove_node (also drops its bindings).
  • Transitions: set_transition changes only the fields you pass (delayDuration:0 disables 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 as nodeType.
  • validate_asset runs the editor fix-ups (link names, parameters, bindings) and structural checks; audit_asset reports 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_parameter works for root and state parameters; set_parameter/remove_parameter need statePath (state parameters of Subtree/Linked states).
  • Schemas restrict node types and state types; a refused type returns E_INVALID_ARG with 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_types only 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 MaxAutoRisk need "_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 the dryRun argument. smoke = covered by edit.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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
targetstringTarget node: GUID or unique node name. list_bindings: optional filter.
targetPathstringTarget property path on the node instance data (e.g. Duration).
sourcestringSource 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').
sourcePathstringSource 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
parentPathstringadd_child_state: slash-separated parent state path (required). add_state: must stay empty (the state is added at the top level).
namestringrequired. Name of the new state; unique among its siblings, no '/'.
descriptionstringOptional state description.
typestringState type: State (default), Group, Linked, LinkedAsset or Subtree. Default TEXT("State").
indexintegerInsert 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringOwning state path (tasks, enter conditions, transition conditions). Ignored by add_evaluator and add_global_task.
transitionintegeradd_transition_condition: index of the transition in the state's list (statetree.list_transitions). Default -1.
nodeTypestringrequired. Node struct path or name (/Script/StateTreeModule.StateTreeDelayTask, StateTreeDelayTask) or a Blueprint node class path (statetree.list_node_types).
namestringOptional node name; makes the node addressable by name in the other node tools. Must be unique in the tree.
propertiesarray of UeaKeyValueOptional instance data values (property name -> text value) applied after creation.
indexintegerInsert 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).

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringOwning state path (tasks, enter conditions, transition conditions). Ignored by add_evaluator and add_global_task.
transitionintegeradd_transition_condition: index of the transition in the state's list (statetree.list_transitions). Default -1.
nodeTypestringrequired. Node struct path or name (/Script/StateTreeModule.StateTreeDelayTask, StateTreeDelayTask) or a Blueprint node class path (statetree.list_node_types).
namestringOptional node name; makes the node addressable by name in the other node tools. Must be unique in the tree.
propertiesarray of UeaKeyValueOptional instance data values (property name -> text value) applied after creation.
indexintegerInsert 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).

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringOwning state path (tasks, enter conditions, transition conditions). Ignored by add_evaluator and add_global_task.
transitionintegeradd_transition_condition: index of the transition in the state's list (statetree.list_transitions). Default -1.
nodeTypestringrequired. Node struct path or name (/Script/StateTreeModule.StateTreeDelayTask, StateTreeDelayTask) or a Blueprint node class path (statetree.list_node_types).
namestringOptional node name; makes the node addressable by name in the other node tools. Must be unique in the tree.
propertiesarray of UeaKeyValueOptional instance data values (property name -> text value) applied after creation.
indexintegerInsert 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringEmpty = root (tree) parameters; otherwise the state whose parameters are edited (Subtree/Linked states).
namestringParameter name.
typestringadd_parameter: property bag type (Bool, Byte, Int32, Int64, Float, Double, Name, String, Text, Enum, Struct, Object, SoftObject, Class, SoftClass, UInt32, UInt64).
valueTypestringadd_parameter: enum/struct/class path for Enum, Struct, Object, SoftObject, Class and SoftClass types.
valuestringValue 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).

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
parentPathstringadd_child_state: slash-separated parent state path (required). add_state: must stay empty (the state is added at the top level).
namestringrequired. Name of the new state; unique among its siblings, no '/'.
descriptionstringOptional state description.
typestringState type: State (default), Group, Linked, LinkedAsset or Subtree. Default TEXT("State").
indexintegerInsert 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).

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringOwning state path (tasks, enter conditions, transition conditions). Ignored by add_evaluator and add_global_task.
transitionintegeradd_transition_condition: index of the transition in the state's list (statetree.list_transitions). Default -1.
nodeTypestringrequired. Node struct path or name (/Script/StateTreeModule.StateTreeDelayTask, StateTreeDelayTask) or a Blueprint node class path (statetree.list_node_types).
namestringOptional node name; makes the node addressable by name in the other node tools. Must be unique in the tree.
propertiesarray of UeaKeyValueOptional instance data values (property name -> text value) applied after creation.
indexintegerInsert 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringOwning state path. list_transitions: empty lists every state's transitions.
transitionintegerTransition index in the state's list (set/move/remove). Default -1.
triggerstringTrigger: OnStateCompleted, OnStateSucceeded, OnStateFailed, OnTick, OnEvent, OnDelegate. add: default OnStateCompleted; set: empty keeps it.
typestringLink type: GotoState, NextState, NextSelectableState, Succeeded, Failed, None. add: default GotoState when targetPath is set, else NextState; set: empty keeps it.
targetPathstringTarget state path for GotoState; empty keeps it on set.
eventTagstringRequired event tag (OnEvent trigger); empty keeps it, 'None' clears it.
prioritystringPriority: Low, Normal, Medium, High, Critical; empty keeps it (add: Normal).
delayDurationnumberDelay in seconds; 0 disables the delay, negative keeps it. Default -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Default -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_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).

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringOwning state path (tasks, enter conditions, transition conditions). Ignored by add_evaluator and add_global_task.
transitionintegeradd_transition_condition: index of the transition in the state's list (statetree.list_transitions). Default -1.
nodeTypestringrequired. Node struct path or name (/Script/StateTreeModule.StateTreeDelayTask, StateTreeDelayTask) or a Blueprint node class path (statetree.list_node_types).
namestringOptional node name; makes the node addressable by name in the other node tools. Must be unique in the tree.
propertiesarray of UeaKeyValueOptional instance data values (property name -> text value) applied after creation.
indexintegerInsert 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.

ArgumentTypeDescription
assetstringrequired. 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.

ArgumentTypeDescription
assetstringrequired. 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.

ArgumentTypeDescription
folderstringrequired. Destination folder below /Game.
namestringrequired. Bare asset name.
schemaClassstringrequired. 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.

ArgumentTypeDescription
folderstringrequired. Destination folder below /Game.
namestringrequired. Bare Blueprint asset name.
kindstringrequired. 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringrequired. Slash-separated state path.
newNamestringrequired. 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.

ArgumentTypeDescription
assetstringrequired. 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).

ArgumentTypeDescription
assetstringrequired. 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.

ArgumentTypeDescription
folderstringContent folder to inspect. Default TEXT("/Game").
recursivebooleanInclude assets below Folder. Default true.
limitintegerMaximum 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.

ArgumentTypeDescription
assetstringrequired. 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
nodestringrequired. 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringSlash-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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringrequired. Slash-separated state path.
propertystringrequired. Reflected UStateTreeState property name (see statetree.list_state_properties).
valuestringText-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.

ArgumentTypeDescription
folderstringContent folder to inspect. Default TEXT("/Game").
recursivebooleanInclude assets below Folder. Default true.
limitintegerMaximum 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
targetstringTarget node: GUID or unique node name. list_bindings: optional filter.
targetPathstringTarget property path on the node instance data (e.g. Duration).
sourcestringSource 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').
sourcePathstringSource 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
targetstringTarget node: GUID or unique node name. list_bindings: optional filter.
targetPathstringTarget property path on the node instance data (e.g. Duration).
sourcestringSource 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').
sourcePathstringSource 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.

ArgumentTypeDescription
assetstringrequired. 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.

ArgumentTypeDescription
kindstringNode kind to list: task, condition, evaluator, or empty for all three.
assetstringOptional StateTree asset: when set, only types its schema allows are returned.
filterstringOptional case-insensitive substring filter on the type path.
limitintegerMaximum 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringState 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringEmpty = root (tree) parameters; otherwise the state whose parameters are edited (Subtree/Linked states).
namestringParameter name.
typestringadd_parameter: property bag type (Bool, Byte, Int32, Int64, Float, Double, Name, String, Text, Enum, Struct, Object, SoftObject, Class, SoftClass, UInt32, UInt64).
valueTypestringadd_parameter: enum/struct/class path for Enum, Struct, Object, SoftObject, Class and SoftClass types.
valuestringValue 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.

ArgumentTypeDescription
folderstringContent folder to inspect. Default TEXT("/Game").
recursivebooleanInclude assets below Folder. Default true.
limitintegerMaximum 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringSlash-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.

ArgumentTypeDescription
assetstringrequired. 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringOwning state path. list_transitions: empty lists every state's transitions.
transitionintegerTransition index in the state's list (set/move/remove). Default -1.
triggerstringTrigger: OnStateCompleted, OnStateSucceeded, OnStateFailed, OnTick, OnEvent, OnDelegate. add: default OnStateCompleted; set: empty keeps it.
typestringLink type: GotoState, NextState, NextSelectableState, Succeeded, Failed, None. add: default GotoState when targetPath is set, else NextState; set: empty keeps it.
targetPathstringTarget state path for GotoState; empty keeps it on set.
eventTagstringRequired event tag (OnEvent trigger); empty keeps it, 'None' clears it.
prioritystringPriority: Low, Normal, Medium, High, Critical; empty keeps it (add: Normal).
delayDurationnumberDelay in seconds; 0 disables the delay, negative keeps it. Default -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Default -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_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...).

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
nodestringrequired. Node GUID or unique node name.
indexintegerrequired. 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringrequired. Slash-separated path of the state to move.
newParentPathstringNew parent state path; empty moves the state to the top level.
indexintegerPosition 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).

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringOwning state path. list_transitions: empty lists every state's transitions.
transitionintegerTransition index in the state's list (set/move/remove). Default -1.
triggerstringTrigger: OnStateCompleted, OnStateSucceeded, OnStateFailed, OnTick, OnEvent, OnDelegate. add: default OnStateCompleted; set: empty keeps it.
typestringLink type: GotoState, NextState, NextSelectableState, Succeeded, Failed, None. add: default GotoState when targetPath is set, else NextState; set: empty keeps it.
targetPathstringTarget state path for GotoState; empty keeps it on set.
eventTagstringRequired event tag (OnEvent trigger); empty keeps it, 'None' clears it.
prioritystringPriority: Low, Normal, Medium, High, Critical; empty keeps it (add: Normal).
delayDurationnumberDelay in seconds; 0 disables the delay, negative keeps it. Default -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Default -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_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: gated by an ObjectIsValid enter condition bound to a new root parameter Target (Actor), children Approach (moveTaskType; its TargetActor input is bound to the same parameter when present) and Attack (Delay waitSeconds); failure of the chase state fails its parent (Failed transition).

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
parentPathstringParent state path that receives the recipe state; empty adds it at the top level.
namestringrequired. Name of the recipe state (unique among its siblings).
moveTaskTypestringTask 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").
waitSecondsnumberSeconds 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: with children MoveToWaypoint (task Move of moveTaskType) and Wait (Delay task Wait) looping via NextState/GotoState; Wait.Duration is bound to a new root parameter WaitSeconds = waitSeconds.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
parentPathstringParent state path that receives the recipe state; empty adds it at the top level.
namestringrequired. Name of the recipe state (unique among its siblings).
moveTaskTypestringTask 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").
waitSecondsnumberSeconds 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
targetstringTarget node: GUID or unique node name. list_bindings: optional filter.
targetPathstringTarget property path on the node instance data (e.g. Duration).
sourcestringSource 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').
sourcePathstringSource 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
nodestringrequired. 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).

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringEmpty = root (tree) parameters; otherwise the state whose parameters are edited (Subtree/Linked states).
namestringParameter name.
typestringadd_parameter: property bag type (Bool, Byte, Int32, Int64, Float, Double, Name, String, Text, Enum, Struct, Object, SoftObject, Class, SoftClass, UInt32, UInt64).
valueTypestringadd_parameter: enum/struct/class path for Enum, Struct, Object, SoftObject, Class and SoftClass types.
valuestringValue 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringSlash-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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringOwning state path. list_transitions: empty lists every state's transitions.
transitionintegerTransition index in the state's list (set/move/remove). Default -1.
triggerstringTrigger: OnStateCompleted, OnStateSucceeded, OnStateFailed, OnTick, OnEvent, OnDelegate. add: default OnStateCompleted; set: empty keeps it.
typestringLink type: GotoState, NextState, NextSelectableState, Succeeded, Failed, None. add: default GotoState when targetPath is set, else NextState; set: empty keeps it.
targetPathstringTarget state path for GotoState; empty keeps it on set.
eventTagstringRequired event tag (OnEvent trigger); empty keeps it, 'None' clears it.
prioritystringPriority: Low, Normal, Medium, High, Critical; empty keeps it (add: Normal).
delayDurationnumberDelay in seconds; 0 disables the delay, negative keeps it. Default -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Default -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_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).

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
nodestringrequired. Node GUID or unique node name.
newNamestringrequired. 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringrequired. Slash-separated state path.
newNamestringrequired. 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
nodestringrequired. Condition node GUID or unique name.
operandstringOperand joining this condition with the previous one: And or Or (empty keeps it).
indentintegerExpression 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
nodestringrequired. Node GUID or unique node name.
propertystringrequired. Property name on the instance data (default) or on the node struct (nodeStruct=true), e.g. Duration or bTaskEnabled.
valuestringText value (ImportText format: 2.5, true, (X=1,Y=2,Z=3), /Game/Path.Asset).
nodeStructbooleanEdit 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).

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringEmpty = root (tree) parameters; otherwise the state whose parameters are edited (Subtree/Linked states).
namestringParameter name.
typestringadd_parameter: property bag type (Bool, Byte, Int32, Int64, Float, Double, Name, String, Text, Enum, Struct, Object, SoftObject, Class, SoftClass, UInt32, UInt64).
valueTypestringadd_parameter: enum/struct/class path for Enum, Struct, Object, SoftObject, Class and SoftClass types.
valuestringValue 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).

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringrequired. Slash-separated state path.
descriptionstringNew description; empty keeps it (use set_state_property Description to clear).
typestringState type: State, Group, Linked, LinkedAsset, Subtree; empty keeps it.
selectionBehaviorstringChild selection: None, TryEnterState, TrySelectChildrenInOrder, TrySelectChildrenAtRandom, TrySelectChildrenWithHighestUtility, TrySelectChildrenAtRandomWeightedByUtility, TryFollowTransitions; empty keeps it.
tasksCompletionstringTask completion: Any or All; empty keeps it.
tagstringGameplay tag (must exist); empty keeps it, 'None' clears it.
enabledstringtrue/false enables/disables the state; empty keeps it.
linkedSubtreestringLinked states: path of the Subtree state to run; empty keeps it.
linkedAssetstringLinkedAsset states: StateTree asset to run; empty keeps it.
requiredEventTagstringRequired event tag to enter; empty keeps it, 'None' clears it.
weightnumberUtility weight; negative keeps it. Default -1.f.
customTickRatenumberCustom 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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringrequired. Slash-separated state path.
propertystringrequired. Reflected UStateTreeState property name (see statetree.list_state_properties).
valuestringText-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.

ArgumentTypeDescription
assetstringrequired. StateTree asset object path or unique asset name.
statePathstringOwning state path. list_transitions: empty lists every state's transitions.
transitionintegerTransition index in the state's list (set/move/remove). Default -1.
triggerstringTrigger: OnStateCompleted, OnStateSucceeded, OnStateFailed, OnTick, OnEvent, OnDelegate. add: default OnStateCompleted; set: empty keeps it.
typestringLink type: GotoState, NextState, NextSelectableState, Succeeded, Failed, None. add: default GotoState when targetPath is set, else NextState; set: empty keeps it.
targetPathstringTarget state path for GotoState; empty keeps it on set.
eventTagstringRequired event tag (OnEvent trigger); empty keeps it, 'None' clears it.
prioritystringPriority: Low, Normal, Medium, High, Critical; empty keeps it (add: Normal).
delayDurationnumberDelay in seconds; 0 disables the delay, negative keeps it. Default -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Default -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_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).

ArgumentTypeDescription
assetstringrequired. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

Returns: tree, compiled, errorCount, warningCount, messages.