-
Notifications
You must be signed in to change notification settings - Fork 10
Quest chains
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.
Once you pick or create a quest chain, you'd see an editor like this:
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.
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).
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:
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
, thentest_nbt
and thentest
, and it works this way. - The right chain reads as: complete
easy
, thenexample
, and thenquest
, HOWEVER instead it actually going to work likequest
, thenexample
and finallyeasy
!
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.
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:
Then for every node in the chain, quest chain checks:
- 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.
- 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.
- 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.
- 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.
If parts of the wiki don't make sense with Mappet's latest version, or you weren't able to recreate examples (i.e. outdated information), feel free to report the page and section that is out of date on community's Discord server (make sure to mention which Mappet’s version did you use).