Skip to main content
Any resource can take over selected AI domains of any active NPC (static, ambient, or a bound external one). HumaLike stops acting in those domains until the lease ends. The NPC’s definition and entity are untouched. All exports on this page return one result table: { apiVersion = 1, ok = true, value = ... } or { apiVersion = 1, ok = false, error = code }. They must be called from a resource other than humalike, or they fail with external_resource_required.

Acquire a lease

Acquiring a lease cancels the NPC’s in-progress action in that domain. A request that overlaps a held domain is refused as a whole. A lease ends at its TTL, when its owner resource stops, when the NPC’s entity disappears, or when an ambient NPC is re-assigned to another body.

Runtime state

ListNpcRuntimeStates returns every roster NPC, including unbound external ones, plus current ambient bodies, sorted by npcId, each with name and model. GetNpcRuntimeState fails with npc_not_found for an id not on the roster.

Next