Catalyst AI Engine

The Architecture of a Living World for Unreal Engine 5.6

Core Architectural Pillars

🧠

StateTree-Driven Logic

A high-performance, visual state machine for clear, debuggable, and complex decision-making. Replaces traditional Behavior Trees with explicit states and transitions.

🌍

Interaction-Rich World

AI agents query the world for opportunities using the Smart Objects system, offloading complex environmental scans for maximum performance and scalability.

πŸƒβ€β™‚οΈ

Tiered Scalability

Utilizes the MassEntity framework for thousands of lightweight background creatures, reserving full StateTree agents for "hero" NPCs and bosses.

Anatomy of a Catalyst Agent

ACatalystAIAgent (Base Actor)

UStateTreeComponent

The "Brain" - Executes StateTree logic.

UCatalystAgentComponent

The "Soul" - Holds all agent data.

UNeeds Comp.
UMood Comp.
UAbility Comp.
UFaction Comp.

The Decision Loop in Action

🌑️

1. Need Arises

`UNeedsComponent` reports `Warmth` is low.

πŸ“Š

2. State Evaluated

`FStateTreeEvaluator` reads the low `Warmth` value.

πŸ”€

3. Logic Transitions

StateTree transitions from `Patrol` to `SeekWarmth` state.

πŸ”₯

4. Action Executed

`FStateTreeTask` queries for `HeatSource` Smart Object.

Phased Development Roadmap

Phase 1: Foundation

Intelligent solo AI that senses, plans, and reacts.

  • ACatalystAIAgent
  • UNeedsComponent
  • FStateTreeTask_Wait
  • FStateTreeEvaluator_Needs

Phase 2: Combatant

Environmental combat sense and decision depth.

  • UAbilityManagerComponent
  • SO_Definition_Cover
  • FStateTreeTask_UseAbility
  • FStateTreeCondition_HasTag

Phase 3: Living Actor

AI with emotional and physical presence via animation.

  • ABP_Survivalist
  • UAIIdleBehaviorComponent
  • FStateTreeTask_PlayMontage
  • State-Driven Animation Logic

Phase 4: Coordinated Squad

Multi-agent collaboration and shared awareness.

  • ASquadManager
  • USharedPerceptionSystem
  • BB_Squad_Shared
  • FStateTreeCondition_IsSquadAlerted

Scaling for an MMO World

Hero AI

Low Population, High Complexity

πŸ€–

Full `ACatalystAIAgent` with a complex StateTree, multiple components, and unique behaviors. Ideal for bosses, quest givers, and squad leaders.

Ambient AI (MassEntity)

High Population, Low Complexity

🦌🦌🦌🦌🦌 🐺🐺🐺🐺🐺 🦌🦌🦌🦌🦌

Thousands of lightweight entities simulated in bulk. Perfect for herds, wildlife, and simple monsters, ensuring a populated world without the performance cost.

Relative Performance Cost Per 100 Agents

AI Behavior Profile

Typical Agent Time Allocation

Squad Ambush Tactic

πŸšΆβ€β™‚οΈ(Player)

🏹

Flank

🏹

Overwatch

🏹

Flank

Goblins claim Smart Object positions to surround the player's path, waiting for a shared signal to attack.

Expanded Use Case Showcase

Coordinated Ambush

A goblin squad uses Smart Objects and shared perception to lay a trap.

1Shared perception detects player, squad state becomes `Alert`.
2StateTrees transition to `Ambush` state.
3Goblins query for & claim `Overwatch` and `Flank` Smart Objects.
4Wait task holds action until player enters kill zone trigger.
5Synchronized attack is initiated by all members.

Dynamic Faction Response

A town guard reacts to a player from a hostile faction.

1Guard perceives player; `FStateTreeEvaluator_Faction` runs.
2Standing is `Hostile`. StateTree transitions from `Patrol` to `Suspicious`.
3Guard stops, plays "stare" animation, and delivers warning dialogue.
4A new transition waits for a threat (player draws weapon) or a timer.
5If no threat, guard returns to `Patrol` state after a delay.

Territorial Predator

An alpha wolf leads its MassEntity pack on a hunt.

1Alpha's `Hunger` need drops, triggering `InitiateHunt` state.
2Alpha broadcasts `Squad.Command.Hunt` to the shared Blackboard.
3MassEntity processor sees command, directs pack to follow Alpha.
4Alpha tags prey on Blackboard; Mass pack converges on target.
5After hunt, Alpha broadcasts `Feed` command to reset pack's hunger.

Complex Crafting Goal

An NPC herbalist gathers multiple ingredients to craft an item.

1StateTree enters a sequence: `Gather Rivercress` -> `Gather Sunpetal`.
2Each "Gather" state uses a task to find a specific Smart Object.
3States only complete when required ingredient count is met.
4After gathering, tree transitions to `GoToCraftingStation` state.
5Final task plays crafting animation and adds item to inventory.

Reviving an Ally

An AI medic decides if it's safe to perform a rescue.

1Downed ally's state is updated on the squad Blackboard.
2Medic's StateTree checks a transition to `ReviveAlly` state.
3Conditions check: Is morale high? Is threat low? Is revive spot clear?
4If all pass, medic claims revive spot and moves to target.
5Other squad members see spot is claimed and provide cover fire.

Overwhelming Threat

A low-level AI assesses a powerful player and decides to flee.

1`FStateTreeEvaluator_ThreatAssessment` compares stats.
2Threat is "Overwhelming", `UMoodComponent`'s `Fear` value spikes.
3Transition to `Flee` state fires based on threat and fear conditions.
4A custom task calculates a path directly away from the threat.
5AI remains in `Flee` state until perception of threat is lost for a set time.