state-trees

Create and edit Unreal Engine StateTree assets including states, tasks, transitions, and property bindings.

648|142|Updated Sep 12, 2025
One-click install
npx skills add https://github.com/kevinpbuckley/VibeUE --skill state-trees
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: state-trees
Source: https://github.com/kevinpbuckley/VibeUE/tree/main/Content/Skills/state-trees
Command: npx skills add https://github.com/kevinpbuckley/VibeUE --skill state-trees

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Building StateTree behavior assets in Unreal Engine requires precise knowledge of schemas, state paths, task struct names, transition triggers, and binding rules, and small mistakes like skipping compilation or guessing property names silently break the asset. This Skill provides the exact StateTreeService API workflows, common-mistake corrections, and verification steps needed to author StateTrees reliably through the editor's MCP toolset.

Core Features & Use Cases

  • StateTree authoring: Create StateTree assets, build state hierarchies, add tasks and evaluators, and wire transitions with triggers like OnStateCompleted, OnTick, OnEvent, and OnDelegate.
  • Property bindings and Utility AI: Bind task, condition, and consideration properties to context actors, root parameters, global tasks, or evaluators, and configure utility-based state selection with Constant, FloatInput, and EnumInput considerations.
  • Blueprint task integration: Create and edit STT_* StateTree Blueprint tasks with the correct ReceiveLatentTick and ReceiveLatentEnterState events, plus per-instance parameter overrides on placed actors.
  • Use Case: A user asks to build an AI guard behavior with Patrol and Chase states, a delay task, and a GotoState transition; the Skill guides asset creation, hierarchy building, compilation, and saving with verification at each step.

Quick Start

Ask the AI to create a StateTree at /Game/AI/ST_Guard with Root, Patrol, and Chase states, a delay task on Patrol, and a transition from Patrol to Chase, then compile and save it.

Frequently Asked Questions about state-trees

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a StateTree in Unreal Engine with Python?

Call unreal.StateTreeService.create_state_tree with an asset path and an available schema name, then add states with add_state, tasks with add_task, and transitions with add_transition. Always call compile_state_tree and save_state_tree afterward, since structural changes are not persisted without compilation.

Why does create_state_tree return False in Unreal Engine?

The failure is almost always the schema, not the path. The default StateTreeComponentSchema requires the GameplayStateTree plugin, so call list_state_tree_schemas and pass one of the schemas actually registered in your project.

How do I bind a StateTree task property to the context actor?

Use bind_task_property_to_context after confirming the StateTree has a context actor class set via get_state_tree_info. If context_actor_class is empty, call set_context_actor_class first, because all context bindings fail silently without it.

What is the difference between ReceiveTick and ReceiveLatentTick on StateTree tasks?

ReceiveTick and ReceiveEnterState are deprecated on StateTreeTaskBlueprintBase and cause compile errors due to signature mismatches. Use ReceiveLatentTick and ReceiveLatentEnterState instead when adding event nodes to STT Blueprint task graphs.

Why does my StateTree transition lose its conditions after editing?

Using remove_transition followed by add_transition deletes all conditions because the new transition starts empty. Use update_transition instead, which edits the existing transition in place and preserves every configured condition.

Can I set StateTree parameters on individual placed actors?

Yes, use get_component_state_tree_path to find the linked asset, get_root_parameters to discover parameter names and types, then set_component_parameter_override with the in-level actor name. Save the level afterward to persist the per-instance overrides.