Create your first quest¶
Result: A player completes Stonebreaker by breaking ten stone blocks.
Time: About 15 minutes.
You need: One online test player and permission to edit YAML files and run BDQ commands.
This tutorial uses manual assignment and SQLite. It does not need an optional plugin.
1. Create the quest group¶
Open plugins/BetterDailyQuest/groups/daily.yml and replace its content with:
options:
repeatable: false
sequential-tasks: false
need-starting: false
automatically-given: false
automatic-reset: "0 0 * * *"
global-assignment-limit: 1
max-rerolls: 0
This group uses manual assignment. It also schedules a daily reset, but automatic assignment is disabled for this test.
2. Create Stonebreaker¶
Create plugins/BetterDailyQuest/quests/stonebreaker.yml with:
quests:
stonebreaker:
name: "&e&lStonebreaker"
description:
- "&7Break ten stone or cobblestone blocks."
group: "daily"
rewards:
- "[message] &6Stonebreaker complete!"
tasks:
1:
task_type: "BREAK"
task_description: "&7Broken: &e%task_progress%&8/&e%task_required%"
required_amount: 10
required_targets:
- STONE
- COBBLESTONE
task_rewards:
- "[message] &aTask complete: 10 blocks broken."
Important values:
stonebreakeris the Quest ID. Quest IDs must be unique across all groups.group: "daily"connects the quest to the group created above.BREAKlistens for blocks broken by the assigned player.required_amount: 10means that ten matching events are needed.STONEandCOBBLESTONEare the only accepted targets.descriptionandtask_descriptionprovide the text and live progress shown bybdq quests.
Use spaces for YAML indentation. Do not use tab characters.
3. Reload the content¶
Run:
Check the console. The daily group and stonebreaker quest should load without a warning.
If the quest does not load, check:
- Both files end with
.yml. - The indentation uses spaces.
- The quest group is named
daily. - No other file uses the
stonebreakerQuest ID. - The task ID is a number.
BREAK,STONE, andCOBBLESTONEare written as shown.
4. Give the quest to a player¶
Run this command from the console:
Replace PlayerName with the exact name of an online player. The player must be online and their data must be loaded.
As that player, run bdq quests. Stonebreaker should appear with its description, task progress, status, and reset time. The inventory is protected: clicking or dragging must not move items.
5. Complete the quest¶
As the assigned player, break any mix of ten stone or cobblestone blocks.
The player should receive these messages:
Quest checkpoint
Both messages appear once. Breaking more blocks does not complete the finished assignment again.
If progress does not increase, confirm that the player has the assignment and is breaking the exact target blocks. Also check whether another plugin cancels the block event.
6. Check saved data¶
Stop and start the server cleanly. Confirm that BetterDailyQuest starts and the player's completed quest history is still present when later assignment rules use it.
Next step¶
Read Understand how quests work, then use the Quest recipe book for more examples.