CONTENT CONTRACT · VERSION 1
quest
Declarative objectives with a fixed lifecycle, latched progress and once-only rewards.
Signature
{ description: TextKey, giver: (NpcId)?, id: ContentId, kind: "quest", name: TextKey, objectives: {QuestObjective}, offer: (QuestOffer)?, reward_parts: ({QuestRewardPart})?, rewards: {QuestReward}, storyline: (QuestStoryline)?, who: (QuestWho)?, xp: (PositiveCount)? }Fields
| Name | Type | Meaning |
|---|---|---|
description | TextKey | Quest description. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
giver | NpcId | NPC offering this quest. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: npc |
id | ContentId | Package-qualified identity. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$ |
kind | "quest" | Discriminant |
name | TextKey | Quest title. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
objectives | {QuestObjective} | Objectives in display order. Items: 1…64 |
offer | QuestOffer | Absent: auto. |
reward_parts | {QuestRewardPart} | Additional independently receipted completion rewards. Stable quest-local IDs preserve payment when quest parts are merged or extended. Items: 1…64 |
rewards | {QuestReward} | Item grants and permanent recipe unlocks. Items: 0…16 |
storyline | QuestStoryline | Absent: side. |
who | QuestWho | Absent: together. |
xp | PositiveCount | Experience granted once on completion. Range: 1…2147483647; Unit: count |
Validated example
{
"description": "core:q10_desc",
"giver": "core:wilma",
"id": "core:a_bed_for_everyone",
"kind": "quest",
"name": "core:q10_title",
"objectives": [
{
"count": 3,
"id": "family",
"structure": "core:bed_structure",
"text": "core:q10_obj_family",
"type": "place",
"where": {
"building": "core:stone_house_structure"
}
},
{
"count": 4,
"id": "hall",
"structure": "core:bed_structure",
"text": "core:q10_obj_hall",
"type": "place",
"where": {
"building": "core:timber_house_structure"
}
},
{
"choice": "hand_in",
"id": "hand_in",
"npc": "core:wilma",
"text": "core:obj_back_wilma",
"type": "talk"
}
],
"offer": "giver",
"rewards": [
{
"count": 1,
"item": "core:wooden_swallow"
},
{
"recipe": "core:bed_craft",
"when": "active"
}
],
"storyline": "main",
"xp": 120
}