EverambleGAME API / 1

CONTENT CONTRACT · VERSION 1

quest

Declared quest stages and directed transitions. Rewards come only from handlers.

Signature

{ description: TextKey, giver: (NpcId)?, id: ContentId, initial_stage: Name, kind: "quest", name: TextKey, objectives: {QuestObjective}, rewards: {QuestReward}, stages: {Name}, states: {QuestState}, transitions: {QuestTransition}, xp: (PositiveCount)? }

Fields

NameTypeMeaning
descriptionTextKeyLocalization key of the journal description.
Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text
giverNpcIdNPC offering it (journal and markers).
Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: npc
idContentIdPackage-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}$
initial_stageNameStage assigned when a quest has no stored progress.
Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$
kind"quest"Discriminant
nameTextKeyLocalization 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
objectives{QuestObjective}Shown objectives.
Items: 0…16
rewards{QuestReward}Rewards shown on the quest card.
Items: 0…16
stages{Name}Complete set of local quest stage identifiers.
Items: 1…256; Unique entries
states{QuestState}How its stages show; stages without an entry stay hidden.
Items: 0…256
transitions{QuestTransition}Allowed source/destination stage pairs.
Items: 1…256; Unique entries
xpPositiveCountExperience the engine grants the quest's player when it reaches a stage of phase done.
Range: 1…2147483647; Unit: count

Validated example

{
  "description": "core:a_place_to_rest_description",
  "giver": "core:milo",
  "id": "core:a_place_to_rest",
  "initial_stage": "available",
  "kind": "quest",
  "name": "core:a_place_to_rest_title",
  "objectives": [
    {
      "count": 1,
      "progress": {
        "kind": "variable",
        "variable": "core:a_place_to_rest_built"
      },
      "text": "core:a_place_to_rest_objective"
    }
  ],
  "rewards": [
    {
      "count": 1,
      "item": "core:healing_potion"
    }
  ],
  "stages": [
    "available",
    "active",
    "ready",
    "completed"
  ],
  "states": [
    {
      "phase": "offered",
      "stage": "available"
    },
    {
      "phase": "underway",
      "stage": "active"
    },
    {
      "phase": "ready",
      "stage": "ready"
    },
    {
      "phase": "done",
      "stage": "completed"
    }
  ],
  "transitions": [
    {
      "from": "available",
      "to": "active"
    },
    {
      "from": "active",
      "to": "ready"
    },
    {
      "from": "ready",
      "to": "active"
    },
    {
      "from": "ready",
      "to": "completed"
    }
  ],
  "xp": 150
}