Daily Repetition
Schedules are useful when quest progress should change at a fixed server time. A common example is a daily task: players may finish it once, then BetonQuest resets the saved progress every morning.
In this tutorial, a herbalist gives the player a small daily gathering task. The player can complete it once per day. At 06:00 server time, a schedule removes the daily progress so the task becomes available again.
Requirements
It is helpful to be familiar with actions, objectives, conditions, and tags before using schedules for progress.
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 "dailyHerbs" for
example.
The file structure should look like this:
- dailyHerbs
- package.yml
- actions.yml
- objectives.yml
- conditions.yml
- items.yml
- conversations
- herbalist.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/Schedules/Daily-Repetition/1-Setup /dailyHerbs overwrite
First, we create a simple NPC conversation. The player can ask for work, but the quest does not track anything yet.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
1 2 3 4 5 | |
- Replace
31with the Citizens ID of your Herbalist NPC. - This connects the NPC ID from
npcswith theHerbalistconversation.
2. Track one daily completion🔗
Now we add the actual task. The player starts an objective and completes it by breaking three oak logs. When the
objective is complete, it adds the dailyHerbsReady tag. The NPC also checks whether the player has three oak logs in
their inventory. After the player hands in the logs and receives the reward, the dailyHerbsDone tag is added. That
tag is the saved progress: it means "this player already completed today's task".
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 | |
- BetonQuest checks the options from left to right. The finish option must be checked before the active and start options.
- The player may only start when they do not already have the active or completed daily tags.
- This option is shown after the player accepted the task but before the objective is complete.
- The quest can finish only while it is active and the objective condition is true.
- This action gives the reward, marks the daily as done, and removes temporary active progress.
- This blocks another completion until the scheduled reset removes the tag.
- This starts the objective and stores that the player has an active daily task.
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
- A folder runs multiple smaller actions as one named action.
- This tag means the player accepted the daily task.
- This gives the player the block objective.
- The finish action groups item hand-in, reward, cleanup, and notification.
- Takes the three oak logs from the player's inventory before the reward is given.
abortprevents partial item removal if something changed. - This tag is the saved daily completion.
- The ready tag is temporary and is deleted after the reward was claimed.
- The objective is removed after completion so it does not stay in the player's data.
1 2 | |
- Negative block amounts mean the player must break blocks.
notifyshows progress, andactions:addDailyHerbsReadyruns when the objective is completed.
1 2 3 4 5 6 | |
- Checks whether the player currently has the active daily tag.
- Checks whether the player already completed today's daily task.
- Checks whether the objective already added the temporary ready tag.
- Checks whether the player currently has three oak logs in their inventory.
- Combines both requirements: the player must have completed the objective and still have the logs to hand in.
1 2 3 | |
- This item is used by the item condition and the take action.
- This item is given as the reward.
The dailyHerbsDone tag prevents the player from starting the same daily task again. At this point, the quest can be
completed once, but it never resets.
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/Schedules/Daily-Repetition/2-QuestProgress /dailyHerbs overwrite
3. Reset the daily progress with a schedule🔗
We now add a schedules section to package.yml. The schedule runs every day at 06:00 and calls one action:
resetDailyHerbs.
1 2 3 4 5 6 7 8 9 10 11 | |
- This is the schedule name. Use a unique name inside the package.
realtime-dailyruns once every day at the configured real-world server time.- The time must be quoted and uses the server machine's time zone.
- This action is called without a specific player.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
- The schedule calls only this action, and the folder groups the full reset.
- Because this runs from a schedule, it removes these tags for all players.
- This removes unfinished daily objectives for all players.
notifyallis player independent and can be used directly from a schedule.
Schedules are player independent. That is why the reset action uses actions that can work without a specific player.
When tag delete and objective remove are called by a schedule, they remove the data for all players, including
offline players. notifyall announces the reset to online players.
Warning
The schedule time uses the real server time, not Minecraft day time. Always write the time in quotes, for example
'06:00'.
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/Schedules/Daily-Repetition/3-FullExample /dailyHerbs overwrite
You have now created a daily quest with progress that resets at a fixed server time. Use this pattern when every player should get a fresh chance at the same time, for example daily chores, shop restocks, bounty boards, or rotating NPC requests.