Yomin - LLM StateTree

One chat generated StateTree. ""Use llm-statetree to generate a [xxxxxxx] statetree for [xxxxxxx].""

Prompt, skill ➡️ https://github.com/ituiyuio/Yomin-Fab-LLM-Unreal-Pluagin-Skill.git

GitPage:LLM StateTree - DSL Schema Guide | YominUnreal Plugins

---

# LLMStateTree


JSON-driven StateTree asset generator for Unreal Engine 5. LLM-powered generation with JSON-to-StateTree conversion.


---


## Technical Information


Features: JSON-driven StateTree asset generation from .llmstate DSL files, Schema auto-inference from UE reflection, StateTree node browser panel, Live preview of generated StateTree structure


Code Modules: LLMStateTree (Runtime), LLMStateTreeEditor (Editor)


Number of Blueprints: 0


Number of C++ Classes: ~25


Network Replicated: No


Supported Development Platforms: Windows: Yes, Mac: Yes, Linux: Yes


Supported Target Build Platforms: Windows, Mac, Linux


Documentation Link: README.md in plugin folder


Example Project: Config/Examples/ folder contains multiple .llmstate examples


Important/Additional Notes: Requires StateTree and GameplayStateTree engine plugins to be enabled. Custom DSL files (.llmstate) define AI behavior trees in JSON format.


---


## How to Use


### 1. Enable Required Engine Plugins

Ensure the following plugins are enabled in your project:

- StateTree (Engine plugin)

- GameplayStateTree (Engine plugin)

- EditorScriptingUtilities (Engine plugin)


### 2. Create a StateTree Definition

Create a `.llmstate` file in your project's `Config/Examples/` folder:


```json

{

    "$schema": "https://example.com/schemas/llmstate-v1.json",

    "name": "MyAI",

    "version": "1.0",

    "description": "AI behavior tree",

    "states": [

        {

            "name": "Idle",

            "type": "State",

            "enter": [

                { "task": "Wait", "duration": 2.0 }

            ],

            "transitions": [

                { "to": "Chase", "priority": 0, "condition": "PlayerInRange" }

            ]

        }

    ]

}

```


### 3. Generate StateTree Asset

Use the LLMStateTree Editor Panel to load and generate the StateTree asset.


### Example Files

The `Config/Examples/` folder contains several .llmstate examples:

- SimpleAI.llmstate - Basic AI with Idle, Patrol, Chase, Attack states

- GuardAI.llmstate - Guard NPC with patrol, investigate, chase, and return states

- UtilityAI.llmstate - Utility AI with considerations for action selection

- StealthAI.llmstate - Stealth AI with hide, sneak, detect, and escape states

- BossAI.llmstate - Boss with multiple phases (Phase1, Phase2, Phase3, Enraged)


---


## File Structure


```

LLMStateTree/

├── Source/

│   ├── LLMStateTree/           # Runtime module

│   └── LLMStateTreeEditor/     # Editor module

├── Config/

│   ├── Examples/               # Example .llmstate files

│   └── Schemas/                 # JSON schema definitions

└── README.md

```


---


## Dependencies


| Plugin | Type | Required |

|--------|------|----------|

| StateTree | Engine | Yes |

| GameplayStateTree | Engine | Yes |

| EditorScriptingUtilities | Engine | Yes (Editor only) |