AR AI RPG Engine
v2.3.0

AI RPG Engine Build worlds. Simulate them. Improve them.

The first RPG engine designed for experimentation. Deterministic simulation runtime + AI-assisted design studio + six-pillar tactical combat.

Install

npm install -g @ai-rpg-engine/cli

Studio

ai chat

Onboard

/onboard

Core Capabilities

What makes AI RPG Engine different.

Deterministic Simulation

Tick-based engine with world state, events, perception, cognition, faction beliefs, rumor propagation, and seeded RNG. Every run can be replayed exactly.

AI-Assisted Worldbuilding

Scaffold rooms, factions, quests, and districts from a theme. Critique designs, repair schema errors, and guide multi-step builds. AI suggests — you decide.

Replay Analysis

Structured findings explain why events happened, where mechanics break down, and which systems create instability. Analysis feeds directly into tuning.

Experiment-Driven Balancing

Run batches of simulations across seeds. Detect variance, sweep parameters, compare tuned vs baseline. Turn world design into a testable process.

Studio Workflow

CLI design studio with dashboards, issue tracking, experiment browsing, session history, guided onboarding, and context-aware command discovery.

Six-Pillar Combat

Guard, brace, engagement, interception, precision-vs-force dimensions, and AI tactics. Stats shape every formula. buildCombatStack wires it in 7 lines.

27 Built-In Modules

Combat, tactics, engagement, abilities, dialogue, cognition, perception, factions, rumors, districts, progression, environment, and more. All composable, all deterministic.

Genre-Agnostic

Same core runs dark fantasy, cyberpunk, detective noir, or any setting. 10 starter worlds show composition patterns to learn from and remix. Genre belongs to content packs, not the engine.

Quick Start

Install

npm install -g @ai-rpg-engine/cli

Start the studio

ai chat
/onboard

Build a world

create-location-pack haunted chapel district
critique-content
simulate

Analyze and improve

analyze-balance
tune paranoia
experiment run --runs 50

Built-In Modules

27 composable simulation modules.

Module
Description
combat-core
Hit/damage formulas, guard, defeat, stat-mapped combat
combat-tactics
Brace and reposition actions with AI scoring
combat-states
Guarded, off-balance, exposed, fleeing — with narration
combat-intent
AI action selection with 8 tactical intents and pack biases
combat-resources
Stamina costs, resource gains/drains, AI resource awareness
combat-roles
Boss phases, role templates, encounter builders
engagement-core
Engaged/protected/backline/isolated zones, frontline collapse
defeat-flow
Morale cascades, flee/surrender thresholds, defeat narration
combat-recovery
Post-combat HP/morale/resource restoration
combat-review
Traced formula explanations for balance analysis
dialogue-core
Graph-based dialogue trees with conditions
ability-core
Abilities with cooldowns, costs, targeting, and AI intent
ability-effects
Status application, healing, damage, stat modification
inventory-core
Items, equipment, use/equip/unequip
traversal-core
Zone movement and exit validation
status-core
Status effects with duration and stacking
environment-core
Dynamic zone properties, hazards, decay
cognition-core
AI beliefs, intent, morale, memory
perception-filter
Sensory channels, clarity, cross-zone hearing
narrative-authority
Truth vs presentation, concealment, distortion
progression-core
Currency-based advancement, skill trees
faction-cognition
Faction beliefs, trust, inter-faction knowledge
rumor-propagation
Information spread with confidence decay
district-core
Spatial memory, zone metrics, alert thresholds
belief-provenance
Trace reconstruction across perception/cognition/rumor
observer-presentation
Per-observer event filtering, divergence tracking
simulation-inspector
Runtime inspection, health checks, diagnostics

Design Workflow

Scaffold content

create-location-pack --theme "abandoned mine" \
  --factions miners_guild,deep_crawlers

Analyze balance

simulate
analyze-balance
suggest-fixes

Tune mechanics

tune rumor propagation
tune-step
tune-status

Run experiments

experiment run --runs 50
experiment compare baseline tuned
/findings