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

  1. Open the /tasks/ folder and copy _example.yml to a new file, e.g. mine_stone.yml. The file name is the task ID.

  2. Set the description, using %xp% and %required-xp% to show progress.

  3. Add one or more xp-gain-methods, each with a trigger and a multiplier or value.

  4. Reference the task ID from a quest's tasks list, then run /ecoquests reload.

  5. 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

PartWhat it controls
DescriptionThe text shown for the task in GUIs and messages
XP gain methodsWhich triggers grant XP, and how much
On-complete effectsWhat 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

PlaceholderValue
%xp%The XP the player has for the task
%required-xp%The XP required to complete the task

Where to go next

  • Wire it into a quest: How to make a quest shows how quests reference tasks.

  • Default examples: the shipped task configs are here.

  • Community configs: browse and import more on lrcdb.