Quest system for games
Quests a designer adds without code. A quest counts metrics the game reports (play,
win, spend-gold), completes when all its objectives are reached and gives a reward the
player claims, or that claims itself. Quests may repeat every day, week or month, open for a
window, and follow one another. Requires Inventory.
await rudder.quests.submit({ metric: 'play', amount: 1 });Catalog: Metrics
Section titled “Catalog: Metrics”Engagement → Metrics. What quests count.
| Field | Meaning |
|---|---|
key, name, description | The metric. |
client | Whether the game client reports it. Otherwise only the game server does. |
Catalog: Quests
Section titled “Catalog: Quests”Engagement → Quests.
| Field | Meaning |
|---|---|
key, name, description, image | The quest. |
group | The tab the client shows it in, such as daily, story or event. |
objectives | Each a metric and an amount. The quest is completed when every objective is. |
currencies, items | The reward, as in an offer of a store. |
autoClaim | The reward is given as soon as the quest is completed. |
window | When the quest is offered. |
period | never, day, week or month: how often it starts again, from the day start of the project. |
after | A quest the player must have claimed before this one is offered. |
A quest counts only while it is offered: inside its window, after its after is claimed, and
until it is completed in its period, each objective up to its amount. Progress and claims are
counted in every period at once, like the purchases of an offer.
Functions
Section titled “Functions”| Function | Kind | Caller | Arguments | Result |
|---|---|---|---|---|
quests | query | client | none | The quests offered now, each with its status and objectives |
submit | mutation | client | {metric, amount} | {completed}: the quests this progress completed |
claim | mutation | client | {quest} | The quest with its status |
report | mutation | server, other modules | {metric, amount} | {completed} |
complete | mutation | server | {quest} | The quest with its status |
reset | mutation | server | {quest} | The quest with its status |
questsreturns each quest offered now with its key, name, description, image, group, period and reward, itsstatus(active,completedorclaimed),objectives(each with themetric, itsname,donein this period andof, the amount, in the order of the objectives),resetsAt(when it starts again,nullfor never) andendsAt(the end of its window,nullfor none).claim,completeandresetanswer one quest in the same shape.submitreports progress of the player on a metric withclient; a metric without it answersserver_only.reporttakes any metric, from the game server or from another module (a purchase that counts toward a quest is your module callingquests.report).claimgrants the reward of a completed quest. A reward item that does not fit the inventory refuses the whole claim.completeandresetare for operators on the player card: bring the objectives of a quest to their amounts, or take back its progress and claims in every period.
A quest with autoClaim claims itself shortly after it is completed. If its reward does not
fit the inventory, it is tried again later; the quest stays completed and the player may claim
it meanwhile.
Errors
Section titled “Errors”| Code | When |
|---|---|
unknown_quest, unknown_metric | No such quest or metric. |
server_only | The client reported a metric without client. |
invalid_amount | The amount of progress is not positive. |
not_offered | The quest is not offered to the player now. |
not_completed | The objectives are not completed yet. |
already_claimed | The player claimed the quest in this period. |
stack_full, unknown_item | A reward item does not fit the inventory. |
Events
Section titled “Events”| Event | Payload | When |
|---|---|---|
completed | {quest, group} | For each quest a progress completed. |
claimed | {quest, group} | When a quest is claimed. |
In the Dashboard
Section titled “In the Dashboard”- Engagement → Quests as cards, and Engagement → Metrics.
- Engagement → Calendar: quest windows and the starts of their periods.
- Player card, Overview: the quests of the player with their status, when they start again and a progress bar per objective, and Report, Complete and Reset on each quest.
Limits
Section titled “Limits”- No segments, no random rotation or reroll, no deadline per player. A module of your game with a timer does those.
afternames one quest, not several. A cycle ofafterhides its quests and is not shown as a problem of the catalog.