CONTENT CONTRACT · VERSION 1
npc
A persistent non-player character with a daily routine and stable respawn identity.
Signature
{ character: CharacterId, dialogue: (DialogueId)?, id: ContentId, interaction: (Interaction)?, kind: "npc", lifecycle: NpcLifecycle, loadout: (Loadout)?, look: (Name)?, name: TextKey, routine: RoutineId, tags: {TagId}, voice: (VoiceId)? }Fields
| Name | Type | Meaning |
|---|---|---|
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 |
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 |
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. |
kind | "npc" | Discriminant |
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 |
tags | {TagId} | Unique definition tags used for filtering and classification. Items: 0…4096; 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 |
Validated example
{
"character": "core:villager_body",
"dialogue": "core:bram_talk",
"id": "core:bram",
"kind": "npc",
"lifecycle": {
"delay_ticks": 300,
"respawn": "same_ref"
},
"loadout": {
"hotbar": [
"core:axe"
],
"items": [
{
"count": 1,
"item": "core:axe"
}
],
"worn": [
"core:iron_helmet",
"core:leather_vest",
"core:leather_boots",
"core:wooden_shield"
]
},
"look": "v3",
"name": "core:npc_bram",
"routine": "core:bram_day",
"tags": [],
"voice": "core:bram_voice"
}