Skip to content

Choices ​

Choices are the answers the player can pick. They appear above the box once the node's last line has finished typing, with a red heart next to the one the player is pointing at.

json
"ask": {
  "lines": "What brings you all the way out here?",
  "choices": [
    { "text": "Just exploring.", "goto": "exploring" },
    { "text": "I'm looking for something.", "goto": "looking" },
    { "text": "Never mind.", "goto": "end" }
  ]
}

Fields ​

FieldTypeRequiredDefaultDescription
texttextyes—What the answer says. A plain string or { "translate": "key" }
gotostringno—The node to go to. Without it, the node's next is used (or the conversation ends)
actionslistno—Actions run when the answer is picked
conditionslistno—If any fails, the answer is hidden
requireslistno—If any fails, the answer is shown greyed out and can't be picked
locked_hinttextno—A note shown after a greyed-out answer, such as "(needs bread)"

Hidden or greyed out? ​

Both use conditions. The difference is what the player sees.

conditions failsrequires fails
The player sees the answerNoYes, in grey
The player can pick itNoNo, it plays a short buzz
Use it forSecrets, answers that no longer make senseGoals: show what's possible and what's missing

They work well together. This answer disappears once the wanderer has been fed, but while it's available it shows what the player needs:

json
{
  "text": "I brought you bread.",
  "conditions": [ { "type": "not", "condition": { "type": "flag", "flag": "fed_wanderer" } } ],
  "requires": [ { "type": "item", "item": "minecraft:bread" } ],
  "locked_hint": "(needs bread)",
  "actions": [
    { "type": "take", "item": "minecraft:bread" },
    { "type": "flag", "flag": "fed_wanderer" }
  ],
  "goto": "thanks"
}
The player...Sees
has no bread, hasn't fed themI brought you bread. (needs bread), in grey
has bread, hasn't fed themI brought you bread., ready to pick
has already fed themnothing

Things the mod takes care of ​

  • Checked again when picked. Conditions are checked when the answers appear and again when one is picked. If the player dropped the bread while the box was open, the question is simply shown again.
  • Players never get stuck. If every visible answer is greyed out, none are shown and the node continues with its next, as if it had no choices.
  • The server decides. Hidden answers are never sent to the player's game, so they can't be seen or picked by a modified client.

Tips ​

  • Keep answers short: about 40 characters, and 4 or 5 answers per question. Answers don't wrap onto a second row, so very long ones or very long lists can run off small screens.
  • Give the player a way out. A "Never mind." or "Goodbye." answer is friendly, especially when closable is false.
  • Make menus. Point topics back at the question node ("next": "menu") so players can ask about everything before leaving. See Elder Rowan.
  • {player} works in answer text. Effect tags such as {color} or {shake} are left out of answers.

All Rights Reserved.