Skip to content

Instantly share code, notes, and snippets.

@jmdejong
Created June 10, 2020 21:32
Show Gist options
  • Select an option

  • Save jmdejong/2eb3d0951dae6a0d465697492ac370ea to your computer and use it in GitHub Desktop.

Select an option

Save jmdejong/2eb3d0951dae6a0d465697492ac370ea to your computer and use it in GitHub Desktop.
{
"speakers":["player","npc"],
"dialog":[
{"speaker": "npc", "text":"Hello"},
{"speaker": "npc", "text":"Can I help you?"},
{"speaker": "player", "label":"ask", "text":"", "choice": {
"Who are you?": "who",
"How are you?": "how",
"I need money!": "money",
"I want weapons!": "weapons",
"I'm rich!": "rich",
"Bye": null
}},
{"speaker":"player", "label": "who", "text":"who are you?"},
{"speaker":"npc", "text":"I'm Bob, the mayor of Eckinia", "next":"else"},
{"speaker":"player", "label": "how", "text":"How are you?"},
{"speaker":"npc", "text":"I'm fine", "next":"else"},
{"speaker":"player", "label": "rich", "text":"I'm rich!", "condition":{
"fn":"hasItem", "type":"Coin", "amount":3
}},
{"speaker":"npc", "text": "Hello Rich, I'm Bob", "next": "else"},
{"speaker":"player", "label": "money", "text":"I need money!"},
{"speaker":"npc", "text": "I've heard that Roderick was looking for a part-time farmhand to help with the harvest. He lives in the house to the south, a little away from the main square"},
{"speaker":"npc", "text": "Also, John is looking for someone to deal with a rat infestation, if you're ready to do some fighting. You can find him in the house south directly on the main square", "next": "else"},
{"speaker":"npc", "text":"Okay", "label":"ok", "next":"else"},
{"speaker":"npc", "label":"else", "text":"Anything else?", "next":"ask"},
{"speaker":"player", "label": "weapons", "text":"I want weapons!"},
{"speaker":"npc", "text": "Peter is selling some knifes. You'll find him in the house in the north.", "next": "else"}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment