In this tutorial we’ll add the a new quest to fetch items for an NPC.
This tutorial continues the sub-series for setting up quests.
We’ll set up a more complex quest with multiple stages:
- talk to a witch to start the quest
- meet the witch in the forest ruins
- collect items for the witch
- bring the items to the witch (in the forest ruins)
- meet the witch in the outpost
In this tutorial we’ll set up:
- quest item
- scene object (used for the witch as content information, e.g. name in dialogues)
- quest
- quest tasks
- 3 schematics for the town, forest and outpost quest handling
We’ll handle the scene setup in the next tutorial.
Quest Item #
First, we’ll set up the quest item – Ruined Cheese.
Navigate to Inventory > Items and add a new item.
- Name
Set to Ruined Cheese. - Description
Set to: This item is used in quests. - Sprite (Icon)
Select icons_69.
Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.
Item Settings #
- Item Type
Select Special Items.
Use Settings #
- Useable In
Select None.
Witch Scene Object #
Next, we’ll set up a scene object – they’re used to add content information to game objects in a scene. Learn more about scene objects in the Makinom documentation.
We’ll use it for the witch NPC to show her name in dialogues, which we’ll use in multiple schematics.
Navigate to Game > Scene Objects and change the Default scene object.
- Name
Set to Witch.
We don’t need anything else for our use case, just a name.
Quest #
Navigate to Game > Quests and add a new quest.
- Name
Set to Forest Ruin Cheese.
Quest Settings #
- Quest Type
Select Fetching.
Quest Settings > Quest Text #
- Default Content
Set to: The witch asks for help, meet her in the forest ruins.
Rewards > Experience Rewards #
Click on Add Experience Reward.
- Whole Group
Enable this setting. - Status Value
Select Experience. - Reward Value
Select Value > Formula.
Select the Level Based Reward formula. - Initial Value
Set to 20.
Rewards > Item Rewards #
Click on Add Item Reward.
- Type
Select Item. - Item
Select High Potion. - Quantity
Select Value > Value.
Set the value to 5.
Copy Item Reward 0.
- Item
Select Revive Potion.
Copy Item Reward 1.
- Item
Select Magic Crystal. - Quantity
Select Value > Value.
Set the value to 1.
Quest Tasks #
Navigate to Game > Quest Tasks, we’ll add multiple new tasks.
5: Meet at the ruins #
This is the first task of the quest, it’ll automatically activate when we add the quest (talking to the witch in town).
- Name
Set to Meet at the ruins.
Quest Task Settings #
- Quest
Select Forest Ruin Cheese.
Activate Requirements #
- Auto Activate
Enable this setting.
6: Collect items #
Copy the Meet at the ruins task. The task starts when we finished the previous task and requires us to collect 3 ruined cheese to complete.
- Name
Set to Collect items.
Quest Task Settings > Quest Text #
We’ll replace the quest text with a new text.
- Update Quest Text
Enable this setting. - Replace Text
Enable this setting. - Default Content
Set to: Collect the items in the forest ruins.
Activate Requirements > Finished Tasks #
Click on Add Quest Task.
- Finished Task
Select Meet at the ruins.
Finish Requirements #
- Auto Finish
Enable this setting.
Click on Add Item.
- Type
Select Item. - Item
Select Ruined Cheese. - Quantity
Set to 3. - Collect
Enable this setting.
I.e. we have to collect the items and can’t count items we already have.
7: Bring items to the witch #
Add a new task. It’ll start when the previous task finished.
- Name
Set to Bring items to the witch.
Quest Task Settings #
- Quest
Select Forest Ruin Cheese.
Quest Task Settings > Quest Text #
- Update Quest Text
Enable this setting. - Replace Text
Enable this setting. - Default Content
Set to: Bring the items to the witch near the forest ruins.
Activate Requirements #
- Auto Activate
Enable this setting.
We’ll add a Finished Task requirement.
Click on Add Quest Task.
- Finished Task
Select Collect items.
8: Meet the witch in the outpost #
Copy the Bring items to the witch task. It’ll start when the previous task finished.
- Name
Set to Meet the witch in the outpost.
Quest Task Settings > Quest Text #
- Default Content
Set to: Talk to the witch in the outpost to get your reward.
Activate Requirements #
- Finished Task
Select Bring items to the witch.
Save Settings #
That’s it for the quest setup – we’ll now set up the schematics we’ll use for the quest and dialogues.
Don’t forget to save your changes by clicking on Save Settings at the bottom of the editor.
Witch Town Quest Schematic #
This schematic will start our quest after talking to the witch. Since the witch will leave that location after starting the quest, we’ll hide that in a short screen fade (though you can also have her just walk away).
We’ll control the different quest objects (witch NPC at 3 locations, item collectors) in the scene using quest conditions, so when we add the quest will be the time the NPC is removed.
Navigate to Schematics and start a new schematic.
Settings #
- Block Player Control
Enable this setting.
Actors #
To use the witch’s scene object information in the dialogues, we need to add the Machine Object (i.e. the witch NPC) as an actor.
Click on Add Actor.
- Actor Type
Select Machine Object. - Use Scene Object
Enable this setting.
This is the default setup and will use the game object’s scene object, if available.
Show Dialogue #
Add Node > UI > Dialogue > Show Dialogue
We’ll display all text in a single dialogue – using the page end text code (<#>) allows us to separate the text into multiple pages. Basically, separating our text into multiple dialogues without closing and opening the UI box.
- Dialogue Type
Select Message. - Wait
Enable this setting. - UI Box
Select Beige Bottom Dialogue. - Use Speaker
Enable this setting. - Show Name
Enable this setting. - Text (Message Content)
Set to: Hello!
You look like you could help me.
It’s about cheese …
<#>No, no, no … I’m not suspicious!
This is very important.
<#>Please, meet me at the forest ruins if you can help me.
Fade Screen #
Add Node > Animation > Fade > Fade Screen
We’ll fade out the screen before adding the quest (which removes our NPC).
- Wait
Enable this setting. - Time
Set to 0.5. - Fade Alpha/Red/Green/Blue
Enable these settings.
The default start/end color setup should already be black (no alpha) and black (full alpha), i.e. fading out the screen to black.
Add Quest #
Add Node > Game > Quest > Add Quest
We’ll now add the Forest Ruin Cheese quest.
- Quest
Select Forest Ruin Cheese.
Fade Screen #
Add Node > Animation > Fade > Fade Screen
Copy the previous Fade Screen node and connect it to the Success and Failed slots of the Add Quest node.
Click on Swap Colors to swap the start and end colors, now fading in.
And that’s it for the schematic – save it, e.g. as Quest_ForestRuinCheese_Town.
Tip!
As preparation for the next schematics, copy the Show Dialogue node to the clipboard (e.g. select it and use CTRL + C to copy it).
Witch Forest Quest Schematic #
Our next schematic will handle multiple parts of the quest:
- talking to the witch in the forest ruins, asking us to collect the items (finish task)
- say something while we should collect the items
- take the items and continue the quest (finish task)
Start a new schematic.
Settings #
- Block Player Control
Enable this setting.
Actors #
Click on Add Actor.
- Actor Type
Select Machine Object. - Use Scene Object
Enable this setting.
Check Quest Conditions #
Add Node > Game > Quest > Check Quest Conditions
We’ll first check if the Meet at the ruins task is active – if yes, we’ll talk to the witch and finish the task (starting the next task).
Click on Add Task Condition.
- Is Valid
Enable this setting. - Quest Task
Select Meet at the ruins. - Check Status
Select Active.
Show Dialogue #
Add Node > UI > Dialogue > Show Dialogue
This node is connected to the Success slot of the Check Quest Conditions node.
If you’ve copied the previous schematic’s dialogue node to the clipboard, you can just paste it in here and only have to change the text.
- Dialogue Type
Select Message. - Wait
Enable this setting. - UI Box
Select Beige Bottom Dialogue. - Use Speaker
Enable this setting. - Show Name
Enable this setting. - Text (Message Content)
Set to: Thank you for coming!
I’ve been using the ruins to ripen my cheese, but lately there’ve been monsters lurking around.
<#>There are 3 <item.name=1f0ef8ca-1f17-47f1-a08e-964b16d82144> scattered in the ruins, please find them for me.
Please note that the <item.name= text code uses a GUID specific for my item setup to get the item’s information. Yours might vary.
Use the buttons above the text area to add text codes like we did before (e.g. to add the gold’s name), i.e. click on More > Data, select Item, select Ruined Cheese, select Name and click on Add.
Change Task Status #
Add Node > Game > Quest > Change Task Status
We’ll now finish the Meet at the ruins task, which automatically starts the Collect items task.
- Quest Task
Select Meet at the ruins. - Status
Select Finished.
Check Quest Conditions #
Add Node > Game > Quest > Check Quest Conditions
Copy the first Check Quest Conditions node, we’ll now check if the Collect items task is active.
This node is connected to the Failed slot of the first Check Quest Conditions node.
- Quest Task
Select Collect items.
Show Dialogue #
Add Node > UI > Dialogue > Show Dialogue
Duplicate the previous Show Dialogue node – just a small some small talk while we should actually collect the items.
This node is connected to the Success slot of the previous Check Quest Conditions node.
- Text (Message Content)
Set to: Did you find them yet?
Check Quest Conditions #
Add Node > Game > Quest > Check Quest Conditions
Copy the previous Check Quest Conditions node, we’ll now check if the Bring items to the witch task is active.
This node is connected to the Failed slot of the 2nd Check Quest Conditions node.
- Quest Task
Select Bring items to the witch.
Show Dialogue #
Add Node > UI > Dialogue > Show Dialogue
Duplicate the previous Show Dialogue node – just a small some small talk while we should actually collect the items.
This node is connected to the Success slot of previous Check Quest Conditions node.
- Text (Message Content)
Set to: Is this cheese I smell on you?
<#>Thank you so much!
Please, meet me in the outpost, I’ll give you your reward there.
Fade Screen #
Add Node > Animation > Fade > Fade Screen
We’ll fade out the screen before finishing the task (which removes our NPC).
- Wait
Enable this setting. - Time
Set to 0.5. - Fade Alpha/Red/Green/Blue
Enable these settings.
The default start/end color setup should already be black (no alpha) and black (full alpha), i.e. fading out the screen to black.
Change Task Status #
Add Node > Game > Quest > Change Task Status
We’ll now finish the Bring items to the witch task.
- Quest Task
Select Bring items to the witch. - Status
Select Finished.
Remove From Inventory #
Add Node > Inventory > Inventory > Remove From Inventory
We’ll remove the collected items from the player’s inventory.
- Object (Combatant)
Select Player.
Change the already added Item 0.
- Type
Select Item. - Item
Select Ruined Cheese. - Quantity
Select Value > Value.
Set the value to 3.
Fade Screen #
Add Node > Animation > Fade > Fade Screen
Copy the previous Fade Screen node.
Click on Swap Colors to swap the start and end colors, now fading in.
And that’s it for the schematic – save it, e.g. as Quest_ForestRuinCheese_Forest.
Witch Outpost Quest Schematic #
The final schematic will finish the quest when we talk to the witch in the outpost.
Start a new schematic.
Settings #
- Block Player Control
Enable this setting.
Actors #
Click on Add Actor.
- Actor Type
Select Machine Object. - Use Scene Object
Enable this setting.
Check Quest Conditions #
Add Node > Game > Quest > Check Quest Conditions
We’ll first check if the Meet the witch in the outpost task is active – if yes, we’ll finish the quest/task, otherwise the witch will just talk to us..
Click on Add Task Condition.
- Is Valid
Enable this setting. - Quest Task
Select Meet the witch in the outpost. - Check Status
Select Active.
Show Dialogue #
Add Node > UI > Dialogue > Show Dialogue
This node is connected to the Success slot of the Check Quest Conditions node.
If you’ve copied the dialogue node to the clipboard, you can just paste it in here and only have to change the text.
- Dialogue Type
Select Message. - Wait
Enable this setting. - UI Box
Select Beige Bottom Dialogue. - Use Speaker
Enable this setting. - Show Name
Enable this setting. - Text (Message Content)
Set to: Thank you for your help!
Here, take your reward.
Change Task Status #
Add Node > Game > Quest > Change Task Status
We’ll now finish the task and the quest.
- Quest Task
Select Meet the witch in the outpost. - Status
Select Finished. - Get Rewards
Enable this setting. - Check Quest Finished
Enable this setting.
Show Dialogue #
Add Node > UI > Dialogue > Show Dialogue
Copy the previous Show Dialogue node.
This node is connected to the Failed slot of the Check Quest Conditions node.
- Text (Message Content)
Set to: Again, thank you!
And that’s it for the schematic – save it, e.g. as Quest_ForestRuinCheese_Outpost.
We’ve now set up the quest and schematics, all that’s left to do is add it to the scene.
Next, we’ll set up the quest’s game objects in the scene.