Dialogue Data

Dialogue data is in the dialogue folder. Each file is a conversation tree used by the NPCs that talk to the player: the Apprentices use apprentice, and the Foretellers use foreteller (or foreteller_first_meeting the first time you meet them). A Foreteller's dialogue can also be changed with the dialogue NBT tag on the entity. A dialogue is made of nodes: each node shows some lines and then a list of answers the player can pick, and each answer can jump to another node and/or run actions. Here is the JSON file structure:

Example: apprentice.json (greeting lines cut for brevity)

{
  "nodes": {
    "start": {
      "answers": [
        {
          "do": [
            {
              "type": "kingdomkeys:start_encounter",
              "duel": true,
              "encounter": "kingdomkeys:spar/apprentice"
            }
          ],
          "text": "kingdomkeys.dialogue.apprentice.answer.spar"
        },
        {
          "do": [
            {
              "type": "kingdomkeys:close"
            }
          ],
          "text": "kingdomkeys.dialogue.apprentice.answer.leave"
        }
      ],
      "lines": [
        "kingdomkeys.dialogue.apprentice.greeting.1",
        "kingdomkeys.dialogue.apprentice.greeting.2",
        "kingdomkeys.dialogue.apprentice.greeting.3"
      ],
      "pick": true
    }
  }
}

Conditions

Every condition has a (string) type plus its own options:

Actions

Every action has a (string) type plus its own options. Actions marked as ends close the conversation after running.