Skip to content

Repository files navigation

Starhelm

Take the helm. Command your AI.

A data-driven, genre-agnostic action / job / command framework for Unity — for management, colony sim, city builder, survival and light RTS games. With visual behavior graphs, authored dialogue, work schedules and a live "why" debugger.

Unity License Version Dependencies Coroutines Tests Website


Why Starhelm

Hand-coding management-game AI turns into spaghetti: every colonist, guard or unit mixes decisions, travel, costs, cooldowns and effects inside fragile scripts. Starhelm cleanly separates what an action is (data) from how it runs (runtime) and gives you a reusable backbone for any genre — plus the tooling to author and debug it.

The management-AI framework that shows you why your AI does what it does.

Where to go

You want to Go to
Get it into a project Install
See it running in one click Quick start
Know what is in the box Features
Author actions, dialogue, graphs The editor, tool by tool
Plug it into your own game Extending
Read the full documentation Wiki

Install (Unity Package Manager, via Git)

Window > Package Manager+Add package from git URL…

https://github.com/Nekuzaky/Starhelm.git?path=/Assets/Starhelm

Pin a version:

https://github.com/Nekuzaky/Starhelm.git?path=/Assets/Starhelm#v0.11.0

Requires Unity 6000.0+. The core (Core / Runtime / Modules) has zero dependencies; the optional playable Template pulls in uGUI and the Input System (declared in package.json).

Quick start

  1. Tools > Starhelm > Dashboard — every tool in one window, and a scene overview that tells you what is missing and fixes it with one button.
  2. Create all in its Overview — data folders, demo actions, demo dialogue, a demo behaviour graph and a full playable scene (typed AI, movement, RTS camera, HUD), generated and saved. Press Play.
  3. Actions tab — author your own actions.
  4. Debugger tab (in Play mode) — watch, per actor, why every AI acts or stays blocked.
  5. Why not? tab — pick an actor and read what stands between it and every action it knows.

Every tool is also its own window under Tools > Starhelm when you want the screen space.

Controls in the demo: click a unit / Tab to select · drag a box or shift-click for several · right-click the ground to send the selection there in formation · 1-0 orders · Esc cancel · WASD pan, Q/E rotate, wheel zoom, F focus.

Starhelm demo

The editor, tool by tool

Every tool below is a tab of the Dashboard, and also opens as its own window. The screenshots are folded away — open the one you care about.

Dashboard — start here

Reads the open scene, lists what is still missing and repairs each gap with one button, then generates the demo assets and a playable scene.

Screenshot

Starhelm Dashboard

Actions — author actions without code

A sectioned inspector per action: identity, dialogue, targeting, conditions, costs and effects, each added and removed inline with live validation. Every module summarises itself — a cost reads "Costs 8 stamina" — so the list stays readable without unfolding a single row.

Screenshots

Action authoring

Costs and effects

Behavior — visual behaviour trees

Click then a node to connect parent to child, marks the root, rename any node freely. Drop an actor on Drive this AI and it runs that graph. The demo graph gathers, delivers, then waits and patrols when there is nothing left.

Screenshot

Behavior graph

Debugger — why an AI does what it does

Per-actor timelines: every state entered, when, and the reason behind it — plus pause, timescale and order cancelling while the game runs.

Screenshot

Live debugger

Why not? — why an AI is doing nothing

The debugger explains what an AI did. This explains what it is not doing: every gate between an actor and an action — work it refuses, a schedule that has it resting, a target that cannot be found, a gate that fails, a cost it cannot pay, a target someone else already claimed — each with its own verdict, worst action first, and a Copy report for a bug report. Nothing is executed to answer it: costs are asked, never charged, and no target is reserved.

Work — who does what, and when

The grid every management player already knows: rows are actors, columns are the work tags your actions carry, a cell is that actor's eagerness for that work and zero means never. Under it, each actor's day as twenty-four paintable hours, night shifts included.

Dialogue — lines, triggers and timing

Quick-add the usual cues, write the lines, set delay, duration, cooldown, priority and repeat limit, then test any cue in Play mode.

Screenshot

Dialogue authoring

Action Graph — one action as nodes

An ActionDefinition's pipeline wired exactly as it executes: Target → Conditions → Costs → Effects.

Screenshot

Action Graph view

The playable template

Four typed AI working autonomously, an RTS camera, per-unit orders, floating dialogue and an event log — all generated by one button.

Screenshot

The playable template

Features

Actions & execution

  • Data-driven actionsActionDefinition ScriptableObjects with inline, polymorphic Conditions / Costs / Effects / Targeting. Derive one class to add your own; it shows up in every editor menu automatically.
  • Clean runtime — observable state machine (Queued → Validating → Reserved → Approaching → Running → CoolingDown → Succeeded / Failed / Cancelled / Blocked), priority command queues with interruption, target reservation, cooldowns.
  • Approach phase — actors walk to their target before working, through a pluggable IMovementAdapter (transform and NavMesh adapters included). Costs are paid on arrival, so a failed trip charges nothing.
  • Job chains — "gather then deliver" as one job; a failed step stops the chain.
  • CarryingICarrier: colonists physically hold what they haul, with a capacity, pick-up and drop-off effects, "am I carrying it?" gates and a stockpile descriptor. Goods no longer teleport through a global store, so a load can be interrupted, seen and saved.

Management-game systems

  • Job Board — colony-sim shared work: post jobs, idle workers claim by priority then distance, failed runs retry then abandon.
  • Work priorities — per-actor tag-matched weights, 0 meaning "never do this work".
  • Day cycle & schedules — an in-game clock with hour/day events and tagged shift slots (night shifts wrap over midnight). Off-duty actors stop taking jobs.
  • Skills — tagged skills with levels and experience; practised work finishes faster.
  • Simulation speed — pause / x1 / x2 / x3 without touching Time.timeScale.
  • Simulation budget — a ceiling on how many actors think per frame, visited round-robin, with the interval stretched by distance from the camera. Actions already running still tick every frame, so movement stays smooth at any distance.
  • Group orders — box-select, shift-click, and formations (grid, line, circle, wedge) so ten units sent to one point do not fight over one point.
  • Save and load — clock, orders, job board, cooldowns, skills, work priorities and carried loads. Anything else joins the same save file by implementing ISnapshotParticipant.

AI behaviour

  • Utility AI with dynamic needs and authorable response curves (linear, quadratic, inverse quadratic, logistic, step) — a colonist at half stamina is not half as desperate as one at zero.
  • Or fully visual Behavior Graphs (Sequence / Selector / Action / Condition / Wait; every node freely renameable; edges are the logic).

Dialogue

  • Cues answering triggers (on.spawn, on.death, on.select, on.idle, narration, or any gameplay event), each with delay, duration, cooldown, priority and repeat limit.
  • Speech Profiles give a character its own name and lines — drag an AI onto the Dialogue panel and its profile is created and wired for you.
  • The framework only emits SpeechRequests; your game renders them however it likes.

Debugging & performance

  • Live "why" debugger — per-actor decision timelines with reasons, pause, slow-mo, fast-forward, cancel orders — and the same timeline as text, for a bug report or a build.
  • "Why not?" — the reverse question, answered on demand without running anything.
  • Scene-view gizmos — target lines by state, reservation rings, arrival radius, per-actor labels.
  • Live actor inspector — action, progress, queue, record, duty and skills while playing.
  • Steady-state execution is allocation-free (pooled instances and contexts, tags normalised once, traces gated out of release builds). Zero coroutines — everything is tick-driven, deterministic and pausable.
  • Zero external dependencies, no experimental Unity APIs, 152 tests (146 EditMode, 6 PlayMode covering the approach phase over real frames).

Where things live

Assets/Starhelm/            ← the package (framework code, read-only once installed)
├── Core/        Contracts: tags, contexts, buyer-facing interfaces (0 deps)
├── Runtime/     Definitions, execution, job board, behavior trees, speech, time, skills,
│                utility AI, carrying, persistence
├── Modules/     Built-in conditions / costs / effects / targeting
├── Diagnostics/ Runtime overlay and scene gizmos
├── Editor/      UI Toolkit windows
├── Template/    Playable management-game starter
├── Tests/       EditMode suite · PlayMode/ for the ones needing real frames
├── Samples~/    Colony sim · Horror management · Light RTS
└── Documentation~/  Manual.md · Quickstart.md

Assets/Starhelm Data/       ← what you author (created by Tools > Starhelm > Setup)
├── Actions/  Behavior Graphs/  Dialogue/{Libraries,Profiles}/  Demo/

Extending

New condition / cost / effect / target / behavior node = one [Serializable] class deriving the matching base. No registration — it appears in every menu (TypeCache).

[System.Serializable]
public sealed class HasLineOfSight : Starhelm.Runtime.Condition
{
    public override Starhelm.Core.ValidationResult Evaluate(Starhelm.Core.ExecutionContext ctx)
        => /* your check */ Starhelm.Core.ValidationResult.Valid;
}

Plug it into your own game through five small interfaces (IActorContext, IActionTarget, IStatProvider, IResourceStore, IWorldQuery) — nothing in the Template is required.

Documentation

  • Wiki — installation, quick start, features, architecture, dialogue, troubleshooting
  • Manual.md — concepts, lifecycle, integration
  • Quickstart.md — 5 minutes from import to a custom action
  • CHANGELOG.md

License

© 2026 Nekuzaky. All rights reserved. Distribution and use will be governed by the Unity Asset Store EULA on release.

About

Data-driven, genre-agnostic action / job / command AI framework for Unity — with visual behavior graphs, a live "why" debugger, and a playable management-game template.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

Sponsor this project

Contributors

Languages