Saltar al contenido principal

Kit statetree

52 herramientas. Generado a partir del código fuente del plugin; no lo edites a mano.

Las descripciones de las herramientas y de los argumentos se muestran en inglés porque reflejan el schema de las herramientas (el mismo texto que el agente recibe en tools/list).

Guía​

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.

Herramientas​

Leyenda. riesgo 0 = solo lectura, 1 = operación inofensiva del editor, 2 = modifica un asset, 3 = elimina/reemplaza un asset, 4 = proyecto/configuración/build, 5 = potencialmente destructivo (las llamadas por encima de MaxAutoRisk requieren "_confirm": true). modifica = se ejecuta en una transacción (edit.undo la revierte). requiere PIE / requiere mundo = se rechaza sin una sesión PIE / sin un nivel abierto. requiere el plugin = no disponible cuando el plugin está desactivado. dryRun = acepta el argumento dryRun. smoke = cubierto por edit.self_test.

statetree.add_binding (riesgo 2, modifica, UE 5.8+, requiere el 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.

ArgumentoTipoDescripción
assetstringobligatorio. 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).

Devuelve: tree, bindings, sources, count.

statetree.add_child_state (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

Adds a child state under parentPath.

ArgumentoTipoDescripción
assetstringobligatorio. 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).
namestringobligatorio. Name of the new state; unique among its siblings, no '/'.
descriptionstringOptional state description.
typestringState type: State (default), Group, Linked, LinkedAsset or Subtree. Valor predeterminado TEXT("State").
indexintegerInsert position among the siblings; -1 appends. Valor predeterminado -1.

Devuelve: tree, statePath, createdAsset, notes.

statetree.add_enter_condition (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

Adds an enter condition to a state.

ArgumentoTipoDescripción
assetstringobligatorio. 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). Valor predeterminado -1.
nodeTypestringobligatorio. 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. Valor predeterminado -1.

Devuelve: tree, nodes, count, notes.

statetree.add_evaluator (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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). Valor predeterminado -1.
nodeTypestringobligatorio. 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. Valor predeterminado -1.

Devuelve: tree, nodes, count, notes.

statetree.add_global_task (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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). Valor predeterminado -1.
nodeTypestringobligatorio. 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. Valor predeterminado -1.

Devuelve: tree, nodes, count, notes.

statetree.add_parameter (riesgo 2, modifica, UE 5.8+, requiere el 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.

ArgumentoTipoDescripción
assetstringobligatorio. 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).

Devuelve: tree, parameters, count, name.

statetree.add_state (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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).
namestringobligatorio. Name of the new state; unique among its siblings, no '/'.
descriptionstringOptional state description.
typestringState type: State (default), Group, Linked, LinkedAsset or Subtree. Valor predeterminado TEXT("State").
indexintegerInsert position among the siblings; -1 appends. Valor predeterminado -1.

Devuelve: tree, statePath, createdAsset, notes.

statetree.add_task (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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). Valor predeterminado -1.
nodeTypestringobligatorio. 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. Valor predeterminado -1.

Devuelve: tree, nodes, count, notes.

statetree.add_transition (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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). Valor predeterminado -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. Valor predeterminado -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Valor predeterminado -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_transition: new index. Valor predeterminado -1.

Devuelve: tree, transitions, count, transitionId.

statetree.add_transition_condition (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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). Valor predeterminado -1.
nodeTypestringobligatorio. 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. Valor predeterminado -1.

Devuelve: tree, nodes, count, notes.

statetree.audit_asset (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

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

statetree.compile_asset (riesgo 2, modifica, UE 5.8+, requiere el 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.

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

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

statetree.create_asset (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
folderstringobligatorio. Destination folder below /Game.
namestringobligatorio. Bare asset name.
schemaClassstringobligatorio. Concrete UStateTreeSchema class path or name (see statetree.list_schemas), e.g. /Script/GameplayStateTreeModule.StateTreeComponentSchema (GameplayStateTree plugin).

Devuelve: tree, statePath, createdAsset, notes.

statetree.create_node_blueprint (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
folderstringobligatorio. Destination folder below /Game.
namestringobligatorio. Bare Blueprint asset name.
kindstringobligatorio. Node kind: task, condition or evaluator (parent UStateTreeTaskBlueprintBase / ConditionBlueprintBase / EvaluatorBlueprintBase).

Devuelve: tree, statePath, createdAsset, notes.

statetree.duplicate_state (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
statePathstringobligatorio. Slash-separated state path.
newNamestringobligatorio. New name (unique among siblings, no '/'). duplicate_state: name of the copy.

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

statetree.export_asset (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

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

statetree.get_asset (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

Devuelve: tree, statePath, createdAsset, notes.

statetree.get_capabilities (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
folderstringContent folder to inspect. Valor predeterminado TEXT("/Game").
recursivebooleanInclude assets below Folder. Valor predeterminado true.
limitintegerMaximum returned assets, from 1 to 1000. Valor predeterminado 100.

Devuelve: tree, statePath, createdAsset, notes.

statetree.get_compile_errors (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

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

statetree.get_node (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
nodestringobligatorio. Node GUID or unique node name.

Devuelve: tree, nodes, count, notes.

statetree.get_state (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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.

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

statetree.get_state_property (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

Reads one reflected state property as text.

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
statePathstringobligatorio. Slash-separated state path.
propertystringobligatorio. Reflected UStateTreeState property name (see statetree.list_state_properties).
valuestringText-export value (set_state_property only).

Devuelve: values, count, notes.

statetree.list_assets (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

Lists StateTree assets under a folder with their summaries.

ArgumentoTipoDescripción
folderstringContent folder to inspect. Valor predeterminado TEXT("/Game").
recursivebooleanInclude assets below Folder. Valor predeterminado true.
limitintegerMaximum returned assets, from 1 to 1000. Valor predeterminado 100.

Devuelve: trees, count.

statetree.list_binding_sources (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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).

Devuelve: tree, bindings, sources, count.

statetree.list_bindings (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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).

Devuelve: tree, bindings, sources, count.

statetree.list_global_nodes (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

Lists global evaluators and global tasks.

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

Devuelve: tree, nodes, count, notes.

statetree.list_node_types (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
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. Valor predeterminado 300.

Devuelve: types, count.

statetree.list_nodes (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
statePathstringState path; empty lists the nodes of every state (global nodes: statetree.list_global_nodes).

Devuelve: tree, nodes, count, notes.

statetree.list_parameters (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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).

Devuelve: tree, parameters, count, name.

statetree.list_schemas (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
folderstringContent folder to inspect. Valor predeterminado TEXT("/Game").
recursivebooleanInclude assets below Folder. Valor predeterminado true.
limitintegerMaximum returned assets, from 1 to 1000. Valor predeterminado 100.

Devuelve: values, count, notes.

statetree.list_state_properties (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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.

Devuelve: values, count, notes.

statetree.list_states (riesgo 0, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

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

statetree.list_transitions (riesgo 0, UE 5.8+, requiere el 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.

ArgumentoTipoDescripción
assetstringobligatorio. 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). Valor predeterminado -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. Valor predeterminado -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Valor predeterminado -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_transition: new index. Valor predeterminado -1.

Devuelve: tree, transitions, count, transitionId.

statetree.move_node (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
nodestringobligatorio. Node GUID or unique node name.
indexintegerobligatorio. New index inside its container (0-based).

Devuelve: tree, nodes, count, notes.

statetree.move_state (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
statePathstringobligatorio. 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. Valor predeterminado -1.

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

statetree.move_transition (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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). Valor predeterminado -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. Valor predeterminado -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Valor predeterminado -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_transition: new index. Valor predeterminado -1.

Devuelve: tree, transitions, count, transitionId.

statetree.recipe_chase (riesgo 2, modifica, UE 5.8+, requiere el 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).

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
parentPathstringParent state path that receives the recipe state; empty adds it at the top level.
namestringobligatorio. 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. Valor predeterminado TEXT("/Script/GameplayStateTreeModule.StateTreeMoveToTask").
waitSecondsnumberSeconds of the wait/attack Delay task. Valor predeterminado 2.f.

Devuelve: tree, statePath, createdAsset, notes.

statetree.recipe_patrol (riesgo 2, modifica, UE 5.8+, requiere el 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.

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
parentPathstringParent state path that receives the recipe state; empty adds it at the top level.
namestringobligatorio. 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. Valor predeterminado TEXT("/Script/GameplayStateTreeModule.StateTreeMoveToTask").
waitSecondsnumberSeconds of the wait/attack Delay task. Valor predeterminado 2.f.

Devuelve: tree, statePath, createdAsset, notes.

statetree.remove_binding (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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).

Devuelve: tree, bindings, sources, count.

statetree.remove_node (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
nodestringobligatorio. Node GUID or unique node name.

Devuelve: tree, nodes, count, notes.

statetree.remove_parameter (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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).

Devuelve: tree, parameters, count, name.

statetree.remove_state (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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.

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

statetree.remove_transition (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

Removes a transition and its conditions.

ArgumentoTipoDescripción
assetstringobligatorio. 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). Valor predeterminado -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. Valor predeterminado -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Valor predeterminado -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_transition: new index. Valor predeterminado -1.

Devuelve: tree, transitions, count, transitionId.

statetree.rename_node (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

Renames a node (FStateTreeEditorNode::SetNodeName).

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
nodestringobligatorio. Node GUID or unique node name.
newNamestringobligatorio. New node name (unique in the tree).

Devuelve: tree, nodes, count, notes.

statetree.rename_state (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
statePathstringobligatorio. Slash-separated state path.
newNamestringobligatorio. New name (unique among siblings, no '/'). duplicate_state: name of the copy.

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

statetree.set_condition_operand (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
nodestringobligatorio. 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. Valor predeterminado -1.

Devuelve: tree, nodes, count, notes.

statetree.set_node_property (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
nodestringobligatorio. Node GUID or unique node name.
propertystringobligatorio. 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. Valor predeterminado false.

Devuelve: tree, nodes, count, notes.

statetree.set_parameter (riesgo 2, modifica, UE 5.8+, requiere el 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).

ArgumentoTipoDescripción
assetstringobligatorio. 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).

Devuelve: tree, parameters, count, name.

statetree.set_state (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
statePathstringobligatorio. 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. Valor predeterminado -1.f.
customTickRatenumberCustom tick rate in seconds; 0 disables it, negative keeps it. Valor predeterminado -1.f.

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

statetree.set_state_property (riesgo 2, modifica, UE 5.8+, requiere el 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.

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path or unique asset name.
statePathstringobligatorio. Slash-separated state path.
propertystringobligatorio. Reflected UStateTreeState property name (see statetree.list_state_properties).
valuestringText-export value (set_state_property only).

Devuelve: values, count, notes.

statetree.set_transition (riesgo 2, modifica, UE 5.8+, requiere el plugin StateTree, smoke)​

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

ArgumentoTipoDescripción
assetstringobligatorio. 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). Valor predeterminado -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. Valor predeterminado -1.f.
delayRandomVariancenumberRandom delay variance in seconds; negative keeps it. Valor predeterminado -1.f.
enabledstringtrue/false enables/disables the transition; empty keeps it.
newIndexintegermove_transition: new index. Valor predeterminado -1.

Devuelve: tree, transitions, count, transitionId.

statetree.validate_asset (riesgo 2, modifica, UE 5.8+, requiere el 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).

ArgumentoTipoDescripción
assetstringobligatorio. StateTree asset object path (/Game/AI/ST_Enemy) or unique asset name.

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