Skip to content

Quest chains

McHorse edited this page Jun 20, 2021 · 5 revisions

Quest chains is a special data type that uses the node system (more about node system can be found on nodes page) to represent quest progression. Quest chains are used within dialogue system to provide quests out of the dialogue.

Quest chains can be managed in Mappet dashboard. The last panel in the left sidebar opens quest chain editor.

Editing

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

Quest chain editor

It works just like the node editor for dialogue and nodes, however, it provides only a single type of node in its system, and it's the quest node.

Quest node

Once you select a quest node beside the common Title field, there are also following fields:

  • Quest field determines the quest by the given ID that will be used to display in the dialogue
  • Quest giver is checked against the Subject passed from dialogue's quest chain node, and if it matches, the player will be able to view and accept the quest
  • Quest receiver is checked against the Subject passed from dialogue's quest chain node, and if it matches, the player will be able to hand in the quest and get the reward
  • Auto accept toggle allows accepting automatically the quest that meets Quest giver when entering the quests of the dialogue
  • Allow retake toggle allows retaking the quest that meets Quest giver. If there are multiple quests connected, and all of them are allowed to be retaken, then all of these quests connected can be retaken after fully completing quests in the chain. For example, we have three quests: A, B, and C. In order to retake quest A again, quests B and C must be completed first.
  • Condition checker allows to setup a condition (beside the quest giver/receiver predicates) that allows to enable/disable quest (for example you can add a condition which checks whether the player holds an item, or talked to a specific NPC).

Hierarchy

The way you specify the quest chain's progression is by connecting existing nodes. Nodes that don't have input connection (top connection) are the quest chain starters, they are the first quest in the chain, while connected quest chain down the line are comes after you completed the quest up the chain.

Consider following:

Quest chain example

In both cases those chains will certainly will work, however, the left chain is more readable and intuitive than the right chain.

  • The left chain reads as: complete da, then test_nbt and then test, and it works this way.
  • The right chain reads as: complete easy, then example, and then quest, HOWEVER instead it actually going to work like quest, then example and finally easy!

So when tying these quest nodes, make sure to select first the bottom node, and then the top node, and tie only after you selected in that order.

Mechanics

This is how quest chains work: when a dialogue reaches a quest chain node, it starts at every quest node that doesn't have parent nodes (that lack top connection on top) in the picked quest chain. Kind of like this:

Quest chain start

Then for every node in the chain, quest chain checks:

  1. If player haven't completed the quest, then it will check whether the Quest provider matches the given subject in the dialogue's quest chain node, and if it matches, then it shows the quest to the player and stops execution down the chain.
  2. If player have the quest in-progress, then it will check whether the Quest provider matches the given subject in the dialogue's quest chain node, and if it matches, then it will simply show the details of the quest.
  3. If player completed the quest but hadn't handed it in, then it will check whether the Quest receiver matches the given subject in the dialogue's quest chain node, and if it matches, then it will offer the player to finish.
  4. If player completed the quest (this is done by checking player's states), it will continue the execution down the chain until it finds a quest that it can offer to the player.
Clone this wiki locally