global::AbstractCreature keeps a creature’s world identity while its room is unloaded. A realized global::Creature supplies body simulation in an active room. Creature AI is also split across these states: global::AbstractCreatureAI handles unrealized movement and den behavior, while global::ArtificialIntelligence and its modules control a realized creature.
Abstract and realized objects covers room membership, placement, and invalidated realized references for all physical objects. This page starts with the creature-specific state and AI layered on that object lifecycle.
flowchart TD A[AbstractCreature] -->|Realize| B[Creature body] B --> C[Realized AI and modules] C -->|room unload| D[Abstractize] D --> A
Abstract construction and simulation
The global::AbstractCreature constructor receives a global::World, global::CreatureTemplate, optional realized global::Creature, global::WorldCoordinate, and global::EntityID. It stores the template, persistent CreatureState, abstract AI, and realized link.
When creatureTemplate.AI is true, constructor logic chooses special abstract AI classes for some vanilla types. Other types receive global::AbstractCreatureAI. This generic fallback can track an abstract destination and room movement. It does not create species behavior for the realized body.
global::AbstractCreature.Update(System.Int32) updates abstract AI only when the creature is alive, outside a den, unrealized, and not pacified by being carried. Move(global::WorldCoordinate) reports a room change to abstract AI and then calls its Moved() method. State that matters outside the active room therefore belongs on the abstract creature, its state object, or its abstract AI. A retained realized body may become stale when Abstractize clears the realized link.
Realization has two dispatch steps
global::AbstractCreature.Realize() contains a type dispatch chain that creates the appropriate vanilla global::Creature. InitiateAI() has a separate type dispatch chain that creates realized AI. A registered template does not add a branch to either chain.
RealizeInRoom() checks room and placement conditions around those operations. Abstractize(global::WorldCoordinate) removes the realized state and returns simulation to the abstract creature. The creature’s CreatureState, ID, coordinate, and abstract AI remain the stable layer when the abstract entity survives.
For an existing vanilla type, the evidenced spawn order is:
resolve a vanilla template with StaticWorld.GetCreatureTemplate
construct AbstractCreature with a valid coordinate and new EntityID
add it through targetAbstractRoom.AddEntity
allow normal room readiness and realization to create the body and AIThis sequence is inferred from the constructors and room lifecycle and was not run in build 22785462. Placement still needs a valid room node or tile, body clearance, shortcut compatibility, and the AI map required by the selected template. Adding only a realized Creature to Room.updateList omits persistent world membership and abstract AI.
Realized AI and route computation
global::ArtificialIntelligence owns the abstract creature, world, and a list of global::AIModule instances. AddModule(global::AIModule) also records a module when it is a global::PathFinder. SetDestination(global::WorldCoordinate) forwards the goal to that pathfinder when one exists.
Behavior selection and route computation remain separate. A behavior AI can choose a destination, but it needs an appropriate pathfinder module to compute movement toward it. The pathfinder imports the abstract AI destination when constructed and builds its cells with the creature template. Creature templates explains the movement costs and room AI map checks used during that work.
global::PathFinder.CreatePathForAbstractreature(global::WorldCoordinate) returns abstract path coordinates toward a destination. The method name contains Abstractreature in this build. Its result still depends on connection legality, reachability, return paths, and available AI map data. Treat it as route data rather than proof that a body can occupy or traverse every coordinate.
Boundaries for custom creatures
A new creature type needs coordinated answers for four points: persistent state, abstract AI, realized body construction, and realized AI construction. Those answers must agree with CreatureTemplate.AI, movement resistances, room entry rules, and save registration. Fisobs can route registered creature types around the vanilla realization chains, but its compatibility with this game build remains untested. Fisobs creatures lists the factories and integration points exposed by the pinned library source.
No creature lifecycle behavior on this page was tested in a running game. Den entry, offscreen migration, death, room unloading, hibernation, and save reload remain separate runtime checks.
Sources
global::AbstractCreature..ctor,Update(System.Int32),Move(global::WorldCoordinate),Realize(),InitiateAI(),RealizeInRoom(), andAbstractize(global::WorldCoordinate)inAssembly-CSharp.dll, SHA-256B6BE1D4E18CE219D21091B51564CB6A11C1E4106B41DE903EB8E58849CB16FDB.global::ArtificialIntelligence..ctor,AddModule(global::AIModule),SetDestination(global::WorldCoordinate), andUpdate()in the same assembly.global::PathFinder..ctor,SetUpWorld(),NewRoom(global::Room),SetDestination(global::WorldCoordinate), andCreatePathForAbstractreature(global::WorldCoordinate)in the same assembly. See Runtime reference.