Points
Points are useful when the progress of a quest can be counted. Instead of creating a separate tag for every small step, you store the current amount in one point category and check that amount with a point condition.
In this tutorial, we will create a small mining quest. A miner asks the player to mine five stone blocks. Every mined stone adds one point to the player's progress. When the player has five points, the miner can complete the quest.
Requirements
It is helpful to be familiar with the basics of actions, objectives, and conditions before using this tutorial.
Related Docs
1. Creating the folder structure for the example quest🔗
Add a new structure for the example quest in the QuestPackage folder. The name could be "pointTracking" for
example.
The file structure should look like this:
- pointTracking
- package.yml
- actions.yml
- objectives.yml
- conditions.yml
- conversations
- miner.yml
Download the files for this tutorial
Instead of manually creating / filling the files, just download them using the command below:
/bq download BetonQuest/Quest-Tutorials refs/tags/v3.1.0 QuestPackages /Features/Tracking-Quest-Progress/Points/1-ExampleQuest /pointTracking overwrite
First, we create a simple conversation and connect it to one NPC.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
1 2 3 4 5 | |
This conversation does not start any quest logic yet. The player can only accept the task in the dialogue.
2. Store the progress with points🔗
Now we add an objective that reacts to every mined stone block. The objective adds one point to the stoneMined
points each time it is completed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
1 2 3 4 5 6 7 8 9 10 | |
1 2 | |
1 2 3 | |
The important part is the stoneMined point category. The startMiningQuest action sets it to 0, then starts the
objective. Because the objective is persistent, it starts again after every mined stone block. Each completion runs
addMiningProgress, which adds one point and sends the player a chat message with the current progress. Once the
player reaches five points, removeMineStoneObjectiveOnComplete removes the objective so the completion message is
not sent again when the player mines more stone.
The hasMinedEnoughStone condition checks whether the player has at least five points in the stoneMined category.
That means the point category stores the player's quest progress.
Is the example not working?
Get the correct configs by running the following command.
This will overwrite any changes (including NPC ID's and locations) you have made to the example.
Linking NPCs to conversations is explained in the basics tutorial.
/bq download BetonQuest/Quest-Tutorials refs/tags/v3.1.0 QuestPackages /Features/Tracking-Quest-Progress/Points/2-FullExample /pointTracking overwrite
3. Use the saved progress in the conversation🔗
We can now use the point condition in the conversation. The miner should finish the quest when the player has mined
enough stone. If the player comes back too early, the miner can still read the current progress from the point
placeholder. We also add an items.yml file for the reward.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
1 2 | |
1 2 3 4 | |
The order in first is important. BetonQuest checks finishQuest first, so the quest can complete as soon as the
player has enough points. If the player has started the quest but has fewer than five points, checkProgress is used
instead. The point placeholder %point.stoneMined.amount% shows the stored amount. The sendMiningProgress action
uses the same placeholder to show the player their progress in chat, while sendMiningComplete tells them when they
are done. The objective is removed at the same moment, so mining more stone will not send the completion message again.
When the quest is completed at the NPC, finishMiningQuest removes the active quest tag, gives the reward, sends a
short reward message, and deletes the temporary point category. This keeps the player's data clean after the progress
is no longer needed.
Download this part of the tutorial
Enter this command in the chat to download this part of the tutorial:
/bq download BetonQuest/Quest-Tutorials refs/tags/v3.1.0 QuestPackages /Features/Tracking-Quest-Progress/Points/2-FullExample /pointTracking overwrite
You have now tracked quest progress with points. Use this approach whenever the player can make measurable progress, for example mining blocks, collecting items, catching fish, gaining reputation, or contributing to a repeated task.