A technical breakdown of how FromSoftware implements NPC and boss AI in Elden Ring using a pushdown automaton built on Havok Script (a Lua variant). The system uses a stack of 'Goals' rather than a flat FSM, allowing composable, hierarchical behavior through sub-goals, weighted random action selection, interrupt callbacks for reactive behavior, and animation-driven execution. The post compares this approach favorably against Behavior Trees and planners like GOAP, arguing it is faster, more legible, and gives designers and animators meaningful control.

12m read timeFrom nega.tv
Post cover image
Table of contents
The Low-Tech AI Of Elden RingGoalsActivateInterruptsTimeoutsActor Data AccessActual Doing StuffMisc StuffConclusionReferences
281 Impressions