How to Make a Task
A task is a single goal a player works toward inside a quest. It gains XP from in-game triggers, and when its XP requirement is met it can run effects. Each task is its own config file, and this page walks you through building one.
Quick start
Open the
/tasks/folder and copy_example.ymlto a new file, e.g.mine_stone.yml. The file name is the task ID.Set the
description, using%xp%and%required-xp%to show progress.Add one or more
xp-gain-methods, each with atriggerand amultiplierorvalue.Reference the task ID from a quest's
taskslist, then run/ecoquests reload.Start the quest with
/quests, perform the action, and confirm the task XP goes up.
Naming and IDs
The file name without .yml is the task ID; it's what quests and placeholders use to reference the task. Items referenced anywhere in the file use the Item Lookup System.
The structure of a task
| Part | What it controls |
|---|---|
| Description | The text shown for the task in GUIs and messages |
| XP gain methods | Which triggers grant XP, and how much |
| On-complete effects | What runs when the task is completed |
# === Description: the text shown for the task ===
description: "&fBreak stone blocks (&a%xp%&8/&a%required-xp%&f)" # %xp% and %required-xp% show progress
# === XP gain methods: which triggers grant XP ===
xp-gain-methods:
- trigger: mine_block # The action that grants XP
multiplier: 0.5 # Scales the value the trigger produces; use 'value' for a flat count instead
args:
chance: 50 # Trigger-specific args
filters: # Only count XP when these filters match
blocks:
- netherrack
# === On-complete effects: what runs when the task is done ===
on-complete: # Effects run when the player completes the task
- id: send_message
args:
message: "Task Completed!"
Description
The line shown for the task wherever it appears.
description: "&fBreak stone blocks (&a%xp%&8/&a%required-xp%&f)" # %xp% and %required-xp% show live progress
XP gain methods
How the task earns XP from in-game actions. Each method takes a trigger, a multiplier or value, and optional conditions and filters.
xp-gain-methods:
- trigger: move # The action that grants XP
multiplier: 0.5 # Scales the trigger's value; use 'value' to count a flat number instead
conditions: # Only grant XP when these conditions are met
- id: in_world
args:
world: world_nether
On-complete effects
The effects that run the moment the task is completed.
on-complete: # Optional; effects run when a player completes the task
- id: send_message
args:
message: "Task Completed!"
Internal placeholders
| Placeholder | Value |
|---|---|
%xp% | The XP the player has for the task |
%required-xp% | The XP required to complete the task |