Pular para o conteúdo principal

Kit statetree

52 ferramentas. Gerado a partir do código-fonte do plugin; não edite manualmente.

As descrições das ferramentas e dos argumentos são exibidas em inglês porque espelham o schema das ferramentas (o mesmo texto que o agente recebe em tools/list).

Guia​

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.

Ferramentas​

Legenda. risco 0 = somente leitura, 1 = operação inofensiva do editor, 2 = altera asset, 3 = apaga/substitui asset, 4 = projeto/config/build, 5 = potencialmente destrutivo (chamadas acima de MaxAutoRisk exigem "_confirm": true). altera = roda numa transação (edit.undo reverte). requer PIE / requer mundo = recusado sem sessão PIE / sem nível aberto. requer plugin = indisponível quando o plugin está desativado. dryRun = aceita o argumento dryRun. smoke = coberto por edit.self_test.

statetree.add_binding (risco 2, altera, UE 5.8+, requer 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.

ArgumentoTipoDescrição
assetstringobrigatório. 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).

Retorna: tree, bindings, sources, count.

statetree.add_child_state (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Adds a child state under parentPath.

ArgumentoTipoDescrição
assetstringobrigatório. 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).
namestringobrigatório. Name of the new state; unique among its siblings, no '/'.
descriptionstringOptional state description.
typestringState type: State (default), Group, Linked, LinkedAsset or Subtree. Padrão TEXT("State").
indexintegerInsert position among the siblings; -1 appends. Padrão -1.

Retorna: tree, statePath, createdAsset, notes.

statetree.add_enter_condition (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Adds an enter condition to a state.

ArgumentoTipoDescrição
assetstringobrigatório. 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). Padrão -1.
nodeTypestringobrigatório. 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. Padrão -1.

Retorna: tree, nodes, count, notes.

statetree.add_evaluator (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Adds a global evaluator (the schema must allow evaluators).

ArgumentoTipoDescrição
assetstringobrigatório. 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). Padrão -1.
nodeTypestringobrigatório. 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. Padrão -1.

Retorna: tree, nodes, count, notes.

statetree.add_global_task (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Adds a global task (runs for the whole tree lifetime).

ArgumentoTipoDescrição
assetstringobrigatório. 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). Padrão -1.
nodeTypestringobrigatório. 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. Padrão -1.

Retorna: tree, nodes, count, notes.

statetree.add_parameter (risco 2, altera, UE 5.8+, requer 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.

ArgumentoTipoDescrição
assetstringobrigatório. 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).

Retorna: tree, parameters, count, name.

statetree.add_state (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Adds a top-level state (a subtree root).

ArgumentoTipoDescrição
assetstringobrigatório. 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).
namestringobrigatório. Name of the new state; unique among its siblings, no '/'.
descriptionstringOptional state description.
typestringState type: State (default), Group, Linked, LinkedAsset or Subtree. Padrão TEXT("State").
indexintegerInsert position among the siblings; -1 appends. Padrão -1.

Retorna: tree, statePath, createdAsset, notes.

statetree.add_task (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Adds a task to a state (the state's single task when the schema allows one task per state).

ArgumentoTipoDescrição
assetstringobrigatório. 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). Padrão -1.
nodeTypestringobrigatório. 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. Padrão -1.

Retorna: tree, nodes, count, notes.

statetree.add_transition (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Adds a transition (UStateTreeState::AddTransition) and applies the optional priority, event, delay and enabled settings.

ArgumentoTipoDescrição
assetstringobrigatório. 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). Padrão -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. Padrão -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Padrão -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_transition: new index. Padrão -1.

Retorna: tree, transitions, count, transitionId.

statetree.add_transition_condition (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Adds a condition to a transition (statePath + transition index).

ArgumentoTipoDescrição
assetstringobrigatório. 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). Padrão -1.
nodeTypestringobrigatório. 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. Padrão -1.

Retorna: tree, nodes, count, notes.

statetree.audit_asset (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Read-only audit: compile status plus the structural findings of validate_asset, without fix-ups.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

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

statetree.compile_asset (risco 2, altera, UE 5.8+, requer 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.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

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

statetree.create_asset (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Creates a StateTree asset with the given schema; the factory adds a top-level state named Root and compiles it.

ArgumentoTipoDescrição
folderstringobrigatório. Destination folder below /Game.
namestringobrigatório. Bare asset name.
schemaClassstringobrigatório. Concrete UStateTreeSchema class path or name (see statetree.list_schemas), e.g. /Script/GameplayStateTreeModule.StateTreeComponentSchema (GameplayStateTree plugin).

Retorna: tree, statePath, createdAsset, notes.

statetree.create_node_blueprint (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Creates a Blueprint node class (task, condition or evaluator) usable as nodeType in the add_* node tools.

ArgumentoTipoDescrição
folderstringobrigatório. Destination folder below /Game.
namestringobrigatório. Bare Blueprint asset name.
kindstringobrigatório. Node kind: task, condition or evaluator (parent UStateTreeTaskBlueprintBase / ConditionBlueprintBase / EvaluatorBlueprintBase).

Retorna: tree, statePath, createdAsset, notes.

statetree.duplicate_state (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Duplicates a state (with children, nodes and transitions, fresh IDs) next to the original under newName.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
statePathstringobrigatório. Slash-separated state path.
newNamestringobrigatório. New name (unique among siblings, no '/'). duplicate_state: name of the copy.

Retorna: tree, states, nodes, transitions, parameters, count, notes.

statetree.export_asset (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Exports the whole editor data as typed JSON: states, nodes with properties, transitions, parameters and bindings.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

Retorna: tree, states, nodes, transitions, parameters, bindings.

statetree.get_asset (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Returns the summary of one StateTree asset (schema, compile status, counts, root parameter GUID).

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

Retorna: tree, statePath, createdAsset, notes.

statetree.get_capabilities (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Lists what the kit can author on this engine and the blocked editor symbols.

ArgumentoTipoDescrição
folderstringContent folder to inspect. Padrão TEXT("/Game").
recursivebooleanInclude assets below Folder. Padrão true.
limitintegerMaximum returned assets, from 1 to 1000. Padrão 100.

Retorna: tree, statePath, createdAsset, notes.

statetree.get_compile_errors (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Dry compile: compiles a transient duplicate and returns the messages without touching the asset.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

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

statetree.get_node (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Returns one node with its node-struct and instance-data properties as text.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
nodestringobrigatório. Node GUID or unique node name.

Retorna: tree, nodes, count, notes.

statetree.get_state (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Returns one state with its nodes (tasks, enter conditions, considerations), transitions and state parameters.

ArgumentoTipoDescrição
assetstringobrigatório. 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.

Retorna: tree, states, nodes, transitions, parameters, count, notes.

statetree.get_state_property (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Reads one reflected state property as text.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
statePathstringobrigatório. Slash-separated state path.
propertystringobrigatório. Reflected UStateTreeState property name (see statetree.list_state_properties).
valuestringText-export value (set_state_property only).

Retorna: values, count, notes.

statetree.list_assets (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Lists StateTree assets under a folder with their summaries.

ArgumentoTipoDescrição
folderstringContent folder to inspect. Padrão TEXT("/Game").
recursivebooleanInclude assets below Folder. Padrão true.
limitintegerMaximum returned assets, from 1 to 1000. Padrão 100.

Retorna: trees, count.

statetree.list_binding_sources (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Lists the structs a target node can bind from (context, root parameters, evaluators, global tasks, parent state nodes) with their properties.

ArgumentoTipoDescrição
assetstringobrigatório. 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).

Retorna: tree, bindings, sources, count.

statetree.list_bindings (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Lists editor property bindings; with target, only the bindings whose target is that node.

ArgumentoTipoDescrição
assetstringobrigatório. 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).

Retorna: tree, bindings, sources, count.

statetree.list_global_nodes (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Lists global evaluators and global tasks.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

Retorna: tree, nodes, count, notes.

statetree.list_node_types (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Lists node types (task/condition/evaluator structs and Blueprint classes); with asset, only those its schema allows.

ArgumentoTipoDescrição
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. Padrão 300.

Retorna: types, count.

statetree.list_nodes (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Lists the nodes of one state (tasks, enter conditions, considerations, transition conditions) or of every state.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
statePathstringState path; empty lists the nodes of every state (global nodes: statetree.list_global_nodes).

Retorna: tree, nodes, count, notes.

statetree.list_parameters (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Lists parameters: root parameters and every state's parameters, or only statePath's when given.

ArgumentoTipoDescrição
assetstringobrigatório. 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).

Retorna: tree, parameters, count, name.

statetree.list_schemas (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Lists concrete, loaded UStateTreeSchema classes usable as statetree.create_asset schemaClass.

ArgumentoTipoDescrição
folderstringContent folder to inspect. Padrão TEXT("/Game").
recursivebooleanInclude assets below Folder. Padrão true.
limitintegerMaximum returned assets, from 1 to 1000. Padrão 100.

Retorna: values, count, notes.

statetree.list_state_properties (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Lists the reflected UStateTreeState properties (name = C++ type) usable with get/set_state_property.

ArgumentoTipoDescrição
assetstringobrigatório. 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.

Retorna: values, count, notes.

statetree.list_states (risco 0, UE 5.8+, requer plugin StateTree, smoke)​

Lists every state (hierarchy order) with paths used by the other state tools.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

Retorna: tree, states, nodes, transitions, parameters, count, notes.

statetree.list_transitions (risco 0, UE 5.8+, requer 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.

ArgumentoTipoDescrição
assetstringobrigatório. 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). Padrão -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. Padrão -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Padrão -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_transition: new index. Padrão -1.

Retorna: tree, transitions, count, transitionId.

statetree.move_node (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Moves a node to another index inside its container (task order, condition order...).

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
nodestringobrigatório. Node GUID or unique node name.
indexintegerobrigatório. New index inside its container (0-based).

Retorna: tree, nodes, count, notes.

statetree.move_state (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Moves a state under another parent (or to the top level) at an index.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
statePathstringobrigatório. 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. Padrão -1.

Retorna: tree, states, nodes, transitions, parameters, count, notes.

statetree.move_transition (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Moves a transition to newIndex (transitions are evaluated in order).

ArgumentoTipoDescrição
assetstringobrigatório. 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). Padrão -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. Padrão -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Padrão -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_transition: new index. Padrão -1.

Retorna: tree, transitions, count, transitionId.

statetree.recipe_chase (risco 2, altera, UE 5.8+, requer 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).

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
parentPathstringParent state path that receives the recipe state; empty adds it at the top level.
namestringobrigatório. 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. Padrão TEXT("/Script/GameplayStateTreeModule.StateTreeMoveToTask").
waitSecondsnumberSeconds of the wait/attack Delay task. Padrão 2.f.

Retorna: tree, statePath, createdAsset, notes.

statetree.recipe_patrol (risco 2, altera, UE 5.8+, requer 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.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
parentPathstringParent state path that receives the recipe state; empty adds it at the top level.
namestringobrigatório. 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. Padrão TEXT("/Script/GameplayStateTreeModule.StateTreeMoveToTask").
waitSecondsnumberSeconds of the wait/attack Delay task. Padrão 2.f.

Retorna: tree, statePath, createdAsset, notes.

statetree.remove_binding (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Removes the binding(s) of target node property targetPath.

ArgumentoTipoDescrição
assetstringobrigatório. 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).

Retorna: tree, bindings, sources, count.

statetree.remove_node (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Removes a node (any kind) and the bindings that targeted it.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
nodestringobrigatório. Node GUID or unique node name.

Retorna: tree, nodes, count, notes.

statetree.remove_parameter (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Removes a state parameter. Root parameters cannot be removed from a plugin on 5.8 (see get_capabilities).

ArgumentoTipoDescrição
assetstringobrigatório. 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).

Retorna: tree, parameters, count, name.

statetree.remove_state (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Removes a state with its children; bindings that targeted its nodes are removed and transitions pointing at it are reported.

ArgumentoTipoDescrição
assetstringobrigatório. 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.

Retorna: tree, states, nodes, transitions, parameters, count, notes.

statetree.remove_transition (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Removes a transition and its conditions.

ArgumentoTipoDescrição
assetstringobrigatório. 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). Padrão -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. Padrão -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Padrão -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_transition: new index. Padrão -1.

Retorna: tree, transitions, count, transitionId.

statetree.rename_node (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Renames a node (FStateTreeEditorNode::SetNodeName).

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
nodestringobrigatório. Node GUID or unique node name.
newNamestringobrigatório. New node name (unique in the tree).

Retorna: tree, nodes, count, notes.

statetree.rename_state (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Renames a state and updates the transition links that point to it.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
statePathstringobrigatório. Slash-separated state path.
newNamestringobrigatório. New name (unique among siblings, no '/'). duplicate_state: name of the copy.

Retorna: tree, states, nodes, transitions, parameters, count, notes.

statetree.set_condition_operand (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Sets a condition's expression operand (And/Or) and indent.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
nodestringobrigatório. 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. Padrão -1.

Retorna: tree, nodes, count, notes.

statetree.set_node_property (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Sets a node instance-data property (or node-struct property with nodeStruct=true) from text.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
nodestringobrigatório. Node GUID or unique node name.
propertystringobrigatório. 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. Padrão false.

Retorna: tree, nodes, count, notes.

statetree.set_parameter (risco 2, altera, UE 5.8+, requer 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).

ArgumentoTipoDescrição
assetstringobrigatório. 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).

Retorna: tree, parameters, count, name.

statetree.set_state (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Sets typed state settings (type, selection behavior, task completion, tag, enabled, linked subtree/asset, required event, weight, tick rate).

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
statePathstringobrigatório. 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. Padrão -1.f.
customTickRatenumberCustom tick rate in seconds; 0 disables it, negative keeps it. Padrão -1.f.

Retorna: tree, states, nodes, transitions, parameters, count, notes.

statetree.set_state_property (risco 2, altera, UE 5.8+, requer 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.

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path or unique asset name.
statePathstringobrigatório. Slash-separated state path.
propertystringobrigatório. Reflected UStateTreeState property name (see statetree.list_state_properties).
valuestringText-export value (set_state_property only).

Retorna: values, count, notes.

statetree.set_transition (risco 2, altera, UE 5.8+, requer plugin StateTree, smoke)​

Edits a transition in place; only the fields that are set change.

ArgumentoTipoDescrição
assetstringobrigatório. 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). Padrão -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. Padrão -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Padrão -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_transition: new index. Padrão -1.

Retorna: tree, transitions, count, transitionId.

statetree.validate_asset (risco 2, altera, UE 5.8+, requer 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).

ArgumentoTipoDescrição
assetstringobrigatório. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

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