CONTENT CONTRACT · VERSION 1
NpcDefinition
A persistent non-player character with a daily routine and stable respawn identity.
Signature
{ arrival: (NpcArrival)?, character: CharacterId, companion: (NpcCompanion)?, dialogue: (DialogueId)?, faction: (ContentId)?, favorites: ({ItemId})?, id: ContentId, interaction: (Interaction)?, inventory: (NpcInventory)?, invulnerable: (boolean)?, lifecycle: NpcLifecycle, loadout: (Loadout)?, look: (Name)?, name: TextKey, routine: RoutineId, story_routines: ({StoryRoutine})?, tags: {TagId}, tasks: ({VillagerTaskId})?, voice: (VoiceId)? }Fields
| Name | Type | Meaning |
|---|---|---|
arrival | NpcArrival | When a village NPC enters a world; absent: with the world (`world_start`). |
character | CharacterId | Character definition supplying body, stats and movement. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: character |
companion | NpcCompanion | It fights along while it escorts someone (`move_to` with `follow`): an enemy fighting its leader or itself within `assist_mm` of it is taken on, at `damage_permille` of the blow of the weapon at hand (loadout hotbar or hand, or a belonging locked in the hand); with none, it follows. Absent: it only follows. |
dialogue | DialogueId | Dialogue talking to it opens. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: dialogue |
faction | ContentId | Initial faction declared by the ruleset; if omitted, the definition's own ID must be a declared faction. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$ |
favorites | {ItemId} | Dishes this resident likes best; stored in the village supply they lift the village's food mood. Absent: none. Items: 1…8; Unique entries |
id | ContentId | Package-qualified identity; unique within its declaring namespace. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$ |
interaction | Interaction | Explicit prompt, reach and action exposed by this object. |
inventory | NpcInventory | Belongings players may see and change from a conversation; absent: none (children, story figures). |
invulnerable | boolean | Blows, damage and statuses pass it by (story NPCs on an escort); absent: false. |
lifecycle | NpcLifecycle | Respawn policy preserving the NPC's persistent identity. |
loadout | Loadout | Inventory and quick slots; absent leaves the NPC empty-handed. |
look | Name | World-library human it is drawn as; absent: a look seeded from its character options. Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$ |
name | TextKey | Localization key for the displayed name. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
routine | RoutineId | Daily schedule assigned to this named NPC. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: routine |
story_routines | {StoryRoutine} | Its day while the story says so: the first row whose conditions hold sets its routine, none its own (`routine`). The engine derives it at every evaluation; no handler switches it. Absent: always its own. Items: 1…16 |
tags | {TagId} | Unique definition tags used for filtering and classification. Items: 0…4096; Unique entries |
tasks | {VillagerTaskId} | Villager tasks it takes from players ("who can do what"); absent: every task. Only residents whose things are open take tasks. Items: 1…16; Unique entries |
voice | VoiceId | Voice of its lines and mumble. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: voice |