> For the complete documentation index, see [llms.txt](https://docs.otherside.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otherside.xyz/odk-docs/odk-plugin/quests.md).

# 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-docs/odk-plugin/nfts-tokens/using-the-creator-portal/creating-a-quest-token.md)

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](https://launch.otherside.xyz/creator).

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.otherside.xyz/odk-docs/odk-plugin/quests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
