BehaviorCraft: LLM-Powered AI Generation for Unreal Engine 5

Context

Designing complex Non-Player Character (NPC) behaviors using Behavior Trees in Unreal Engine can often be repetitive and time-consuming. BehaviorCraft was created as an editor-integrated workflow enhancement tool designed to bridge Large Language Models (LLMs) with Unreal Engine’s AI framework.

By leveraging modern generative AI models like Claude and Gemini, BehaviorCraft allows technical artists, game designers, and gameplay programmers to generate and iteratively refine behavior trees directly using natural language prompt commands without leaving the engine editor.

Team Members:

What is BehaviorCraft?

BehaviorCraft is an Unreal Engine 5 plugin that integrates an AI-powered chat workspace directly into the editor interface. Instead of manually creating Blackboard keys, adding task nodes, and wiring complex Decorator logic, developers simply select a target NPC or enemy actor, describe the desired behavior in plain English (or French), and let the LLM handle the graph generation.

Whether building simple patrol patterns or complex multi-stage boss combat sequences, BehaviorCraft translates natural language prompts into structural Unreal Engine Behavior Tree assets instantly.

Core Features

  • In-Engine Interactive UI: A clean Slate UI editor dock built directly into Unreal Engine, enabling seamless conversation with LLMs alongside the viewport.
  • Actor-Context Aware: Simply select any enemy or NPC character in your level, and the plugin automatically scopes the context, existing Blackboard keys, and available AI tasks to the selected entity.
  • Dynamic Tree Generation & Iteration: Request full initial Behavior Trees or iteratively modify existing graphs (e.g., “Add a low-health flee condition that triggers an animation and drops a health item”).
  • Multi-LLM Integration: Seamlessly connect your preferred AI providers, including Anthropic’s Claude API, Google Gemini API, or custom REST endpoints.
  • Blackboard Auto-Configuration: Automatically sets up required Blackboard keys (vector positions, boolean flags, target object references) needed by the generated nodes.

Technical Implementation

The system architecture combines native C++ performance with high-level Python/REST API integrations:

  • Editor Extension (Slate C++): A custom Editor Utility Dock Tab providing a persistent, responsive chat window inside Unreal Engine.
  • Graph Parsing & Generation Engine: Translates JSON schema responses from the LLM back into native Unreal Engine UBehaviorTree and UBlackboardData assets programmatically.
  • Context Injection Engine: Extracts actor properties, existing custom BTTaskNode classes, and Blackboard keys, sending them as rich context inside system prompts to ensure accurate code and graph generation.