Skip to content

Dialogues

McHorse edited this page May 12, 2021 · 10 revisions

Dialogues are basically programmable node systems that allow you to create a progressing conversations for your adventure maps. Dialogues are based on event node system so it's possible to execute different actions, or provide different dialogue branches depending on player's state.

Dialogues can be triggered either from triggers or via /mp dialogue open command.

Dialogues can be managed in Mappet dashboard. The fourth panel in the left sidebar opens dialogue editor.

Editing

Once you pick or create a dialogue, you'd see an editor like this:

Dialogue editor

Dialogue node system supports following types of nodes:

  • All event nodes (for exception of Timer node)
  • Reply node allows to provide dialogue reply options that player can pick from
  • Reaction node allows to provide dialogue reaction to whomever you have dialogue with
  • Crafting node allows to provide crafting table that will be offered to the player to trade
  • Quest node allows to provide quests that will be offered to the player to take or complete

Reply node

Reply node provides reply that player can pick from to a specific dialogue reaction. Content field allows you to provide the text that a player will be replying to the dialogue. You can use same formatting as with quest's description. While the color picker underneath allows you to set the main text color.

Reaction node

Reaction node provides a reaction to either dialogue initiation or to a reply. Content field allows you to provide the text that a player will be replying to the dialogue. You can use same formatting as with quest's description. While the color picker underneath allows you to set the main text color.

And the Pick | Edit buttons underneath allow you to pick a morph that will be displayed in the dialogue screen on the right of the main panel. You can use any morph, however, particle with vanilla emission mode and snowstorm morphs won't work! Other morph features like pose animations should be working when transitioning to the next reaction after player picked a reply.

Crafting node

Crafting node offers crafting table to the player within the dialogue by given ID under Crafting table label.

Quest node

Quest node offers quest(s) to the player based on the quest chain by given ID under Quest chain label. Keep in mind that the dialogue will display the quests only that ones that match the quest giver/receiver properties within the quest chain. See quest chains page for more info.

Hierarchy

Same as with events, you have to specify the main node. However, beside specifying main node there are some specific order of node execution you must follow. Take a look at this example:

Sample dialogue

For every stage in the dialogue, you need to have one Reaction node and either:

  • One Quest node
  • One Crafting node
  • One or more Reply nodes

You have to have at least one of those connected to a Reaction node indirectly. Consider following dialogue:

Sample dialogue with more complexity

You can have additional Condition, Switch and Command nodes anywhere coming out of Reply, Reaction, Craft and Quest nodes, or even in between. The most important part is that per every dialogue stage you'd have one Reaction node connected to multiple Reply nodes, or a single Craft or Quest nodes. However, Reaction node should never be connected to another Reaction node without passing through a Reply, Craft or Quest nodes otherwise you'll have inconsistencies.

The final thing to note is that you should connect Reply, Crafting or Quest nodes to another Reaction node when you want to redirect the dialogue back, as you can see with the quest node that is connected back to Hi!. Which will return the place back to the beginning of the dialogue. If there will be no Reply, Crafting or Quest nodes down the line, then the dialogue will end.

Mechanics

It worth noting that there is one special mechanic that you need to know about dialogues.

Once a dialogue is opened by a player a 1 will be added to that player's state by key dialogue.DIALOGUE_ID. So if a player opened dialogue mchorse.greetings, then to the player states a 1 will be added to the key dialogue.mchorse.greetings (you can verify that by opening a dialogue and executing /mp state print YOUR_USERNAME).

Clone this wiki locally