EverambleGAME API / 1

CONTENT CONTRACT · VERSION 1

dialogue

A conversation graph with one NPC.

Signature

{ entries: {DialogueEntry}, id: ContentId, initial_node: Name, kind: "dialogue", nodes: {DialogueNode}, npc: NpcId }

Fields

NameTypeMeaning
entries{DialogueEntry}Greetings by quest state, first match wins; none: the initial node.
Items: 0…64
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_nodeNameNode shown first.
Length: 1…96; Pattern: ^[a-z][a-z0-9_]{0,95}$
kind"dialogue"Discriminant
nodes{DialogueNode}Nodes with unique IDs.
Items: 1…256; Unique entries
npcNpcIdNPC definition the dialogue belongs to.
Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: npc

Validated example

{
  "entries": [
    {
      "node": "turn_in",
      "when": [
        {
          "quest": "core:hill_golem_hunt",
          "stages": [
            "ready"
          ]
        }
      ]
    },
    {
      "node": "offer",
      "when": [
        {
          "quest": "core:hill_golem_hunt",
          "stages": [
            "available"
          ]
        },
        {
          "quest": "core:hearthwood",
          "stages": [
            "completed"
          ]
        },
        {
          "quest": "core:a_place_to_rest",
          "stages": [
            "completed"
          ]
        },
        {
          "quest": "core:village_friends",
          "stages": [
            "completed"
          ]
        }
      ]
    },
    {
      "node": "underway",
      "when": [
        {
          "quest": "core:hill_golem_hunt",
          "stages": [
            "active",
            "fight"
          ]
        }
      ]
    },
    {
      "node": "after",
      "when": [
        {
          "quest": "core:hill_golem_hunt",
          "stages": [
            "completed"
          ]
        }
      ]
    },
    {
      "node": "rumour",
      "when": [
        {
          "quest": "core:hill_golem_hunt",
          "stages": [
            "available"
          ]
        }
      ]
    }
  ],
  "id": "core:bram_talk",
  "initial_node": "hello",
  "kind": "dialogue",
  "nodes": [
    {
      "choices": [
        {
          "id": "ask_chat",
          "next": "chat",
          "text": "core:bram_ask_chat",
          "when": []
        },
        {
          "id": "bye",
          "text": "core:choice_bye",
          "when": []
        }
      ],
      "emotion": "neutral",
      "id": "hello",
      "text": "core:bram_hello"
    },
    {
      "choices": [
        {
          "id": "accept",
          "next": "accepted",
          "text": "core:bram_accept",
          "when": [
            {
              "quest": "core:hill_golem_hunt",
              "stages": [
                "available"
              ]
            },
            {
              "quest": "core:hearthwood",
              "stages": [
                "completed"
              ]
            },
            {
              "quest": "core:a_place_to_rest",
              "stages": [
                "completed"
              ]
            },
            {
              "quest": "core:village_friends",
              "stages": [
                "completed"
              ]
            }
          ]
        },
        {
          "id": "decline",
          "next": "declined",
          "text": "core:bram_decline",
          "when": []
        }
      ],
      "emotion": "nervous",
      "id": "offer",
      "quest": "core:hill_golem_hunt",
      "text": "core:bram_offer"
    },
    {
      "choices": [
        {
          "id": "bye",
          "text": "core:choice_bye",
          "when": []
        }
      ],
      "emotion": "happy",
      "id": "accepted",
      "quest": "core:hill_golem_hunt",
      "text": "core:bram_accepted"
    },
    {
      "choices": [
        {
          "id": "bye",
          "text": "core:choice_bye",
          "when": []
        }
      ],
      "emotion": "sad",
      "id": "declined",
      "text": "core:bram_declined"
    },
    {
      "choices": [
        {
          "id": "on_it",
          "text": "core:bram_on_it",
          "when": []
        },
        {
          "id": "ask_chat",
          "next": "chat",
          "text": "core:bram_ask_chat",
          "when": []
        }
      ],
      "emotion": "nervous",
      "id": "underway",
      "quest": "core:hill_golem_hunt",
      "text": "core:bram_underway"
    },
    {
      "choices": [
        {
          "id": "hand_over",
          "next": "done",
          "text": "core:bram_hand_over",
          "when": [
            {
              "quest": "core:hill_golem_hunt",
              "stages": [
                "ready"
              ]
            }
          ]
        },
        {
          "id": "not_yet",
          "text": "core:bram_not_yet",
          "when": []
        }
      ],
      "emotion": "surprised",
      "id": "turn_in",
      "quest": "core:hill_golem_hunt",
      "text": "core:bram_turn_in"
    },
    {
      "animation": "core:celebrate",
      "choices": [
        {
          "id": "bye",
          "text": "core:choice_bye",
          "when": []
        }
      ],
      "emotion": "love",
      "id": "done",
      "text": "core:bram_done"
    },
    {
      "choices": [
        {
          "id": "ask_chat",
          "next": "chat",
          "text": "core:bram_ask_chat",
          "when": []
        },
        {
          "id": "bye",
          "text": "core:choice_bye",
          "when": []
        }
      ],
      "emotion": "happy",
      "id": "after",
      "text": "core:bram_after"
    },
    {
      "choices": [
        {
          "id": "bye",
          "text": "core:choice_bye",
          "when": []
        }
      ],
      "emotion": "neutral",
      "id": "chat",
      "text": "core:bram_chat"
    },
    {
      "choices": [
        {
          "id": "ask_chat",
          "next": "chat",
          "text": "core:bram_ask_chat",
          "when": []
        },
        {
          "id": "bye",
          "text": "core:choice_bye",
          "when": []
        }
      ],
      "emotion": "nervous",
      "id": "rumour",
      "text": "core:bram_rumour"
    }
  ],
  "npc": "core:bram"
}