🧗Quests

🧠 Conceptual Overview

The ODK Quest system builds on top of the Task Flow system to offer a blockchain-integrated questing experience. Each quest is defined by a set of sequential tasks, with a unique on-chain Fungible Token acting as both the activator and the progress tracker.

A quest typically looks like this:

  1. The player is granted a Quest token to begin.

  2. Each task completion earns them an additional token.

  3. When the player holds the full set, the quest is complete.

These tokens act as stateful markers for player progress, making it easy to track and synchronize quests across game sessions and platforms.


🪙 Quest Tokens as Progress

See Creating a Quest token

ODK uses Fungible Tokens for quests, meaning players can hold more than one. Token balance reflects quest progress:

  • 1 token: Quest activated

  • 2+ tokens: Tasks completed

  • X tokens: Quest finished (X = tasks + 1)

The token balance drives the task flow, ensuring only the correct task is active at each stage.


🛠 Creator Web Panel

Quests are created and managed via the Creator Portal.

This allows you to:

  • Define quest metadata (name, image, description, group, etc.)

  • Add tasks and rewards

  • Mint and grant tokens to test users

Once a quest token is minted, its Token ID (formatted like 33139:0xABC...:1) can be used in Unreal to connect the flow logic.


🎮 In-Game Setup

In Unreal, each quest is implemented using a BP_ODK_TaskFlow actor and a data asset derived from PDA_ODK_TaskFlow. Tasks should use BP_ODKTaskFlow_QuestTaskBase to ensure:

  • The task sends the next token upon completion

  • The system waits for the new balance before progressing

This ensures the task flow is always aligned with the player’s on-chain token state.


🧩 Token Sync & Management

Quests rely on the TokenHandlers map in the player’s BPMC_ODK_WalletComponent. These allow the game to respond to token changes (e.g. showing a notification, starting a flow, granting a reward).

By default, Quest and Achievement handlers are included, and you can extend or replace these for custom behavior.


🎁 Rewards

When a quest is completed (i.e. all tokens received), additional reward tokens can be granted. These should be defined in the quest’s metadata and triggered via the BP_TaskFlowAction_GrantAchievementFromAttachedToken executor on the final task.


🚀 Quest Activation

You can activate a quest by granting the initial token. This can be done:

  • Via Blueprint (BPFL_ODK_WalletHelpers)

  • From a UI panel or NPC interaction

  • From a LiveConfig-driven quest browser

Last updated