English
Create a quest pack
You add a quest of your own to the game: who gives it, what it asks, how the game knows it is done, and what the player wins. A quest pack is a folder of JSON files; each file adds quests to a branch the game already has.
Before you begin 15 minutes
- The
altacommand: install the CLI. - The quickstart done once, so you know
alta lintandalta dev.
Create the pack
alta new quest-packwrites a folder with one file,quests.json, that already passesalta lint. Each file of the folder says which branch it adds to ("branch": "core"is the main story) and which version of the standard it follows (alta.quests/0.3).Terminalshalta new quest-pack my-packDescribe the quest
A quest has a short
idand auidthat starts with its branch (core.tidy-downloads): theuidis unique in the whole game.actis the chapter it belongs to,giverthe agent who gives it (daemon,architect,operator,reviewerorguardian).titleandsummaryare what the player reads, in English and French.requireslists the quests (or skills) to finish first, andreward.xpis the experience at the end; in a campaign quest each step done gives 10 more points.my-pack/tidy.jsonjson{ "id": "tidy-downloads", "uid": "core.tidy-downloads", "act": 2, "giver": "guardian", "title": { "en": "Tidy the downloads", "fr": "Range les téléchargements" }, "summary": { "en": "Choose a rule for old downloads and let it run each week.", "fr": "Choisis une règle pour les vieux téléchargements et laisse-la tourner chaque semaine." }, "requires": ["core.backup"], "reward": { "xp": 50, "skills": ["core.tidy"] }, "support": { "platforms": [ { "os": "macos", "min": "14" }, { "os": "linux" } ], "hosted": "limited", "notes": { "linux": { "en": "In a hosted world there is no downloads folder to tidy.", "fr": "Dans un monde hébergé, il n'y a pas de dossier de téléchargements à ranger." } } }, "steps": [ { "id": "rule", "kind": "choice", "title": { "en": "What happens to downloads older than 30 days?", "fr": "Que deviennent les téléchargements de plus de 30 jours ?" }, "choices": [ { "id": "archive", "label": { "en": "Move them to an archive folder", "fr": "Les ranger dans un dossier d'archives" } }, { "id": "ask", "label": { "en": "Ask me each week", "fr": "Me demander chaque semaine" } } ], "saves": "answers.tidy.rule" }, { "id": "archive-folder", "kind": "check", "title": { "en": "The archive folder exists", "fr": "Le dossier d'archives existe" }, "when": { "answer": "answers.tidy.rule", "equals": "archive" }, "check": { "type": "file", "path": "~/Downloads/Archive" } }, { "id": "read-more", "kind": "link", "title": { "en": "Read how the rule works", "fr": "Lis comment marche la règle" }, "open": { "macos": "https://docs.example.org/tidy/macos", "linux": "https://docs.example.org/tidy/linux" }, "optional": true }, { "id": "weekly", "kind": "action", "title": { "en": "Turn on the weekly tidy", "fr": "Active le rangement hebdomadaire" }, "run": { "macos": { "do": "automation.enable", "args": { "key": "tidy-downloads" } }, "linux": { "do": "automation.enable", "args": { "key": "tidy-downloads" } } }, "check": { "type": "automation", "key": "tidy-downloads", "enabled": true } } ] }Give it steps
A quest is a list of steps, each of one
kind. Prefer the ones the machine proves: a step is done when itscheckpasses, not when the player clicks.kindThe player sees Done when checka check its checkpasseschoicea choice ( choices,saves)the answer is saved actiona button and a plan card ( run)its checkpassescommanda command to copy ( cmd)its checkpasses, or the player says solinkan https://link (open)the player says so missionan agent to send ( mission)the agent comes back manual"I did it" the player says so; humansays whywhenshows a step only after a given answer.my-pack/tidy.jsonjson{ "id": "archive-folder", "kind": "check", "title": { "en": "The archive folder exists", "fr": "Le dossier d'archives existe" }, "when": { "answer": "answers.tidy.rule", "equals": "archive" }, "check": { "type": "file", "path": "~/Downloads/Archive" } }Teach a skill
A file can add
skillsto its branch: what the player gains. Name them inreward.skillsof the quest that teaches them;agentis the agent the skill belongs to.my-pack/tidy.jsonjson[ { "id": "core.tidy", "title": { "en": "Tidy machine", "fr": "Machine rangée" }, "agent": "guardian" } ]Check the pack
Save the quest as
my-pack/tidy.json, next toquests.json, and check the folder: every file is checked. A refused file prints the rule, where it is, and how to fix it, with a link to Errors.Terminalshalta lint my-packOutputtextok my-pack/quests.json (quests) ok my-pack/tidy.json (quests) 2 checked, 0 errors, 0 warnings
Try it
alta dev my-packOpen the address it prints and press L: your quests are in the journal, with the others of their branch; the game runs in a demo, so nothing touches your machine.
Demo: nothing is written on your machine.
Pitfalls
| Do | Avoid |
|---|---|
A uid that starts with the branch, unique in the game | Two files with the same uid |
A check on every step the machine can see | A quest that ends on clicks alone |
title and summary in English and French | A text in one language only |
Copy requires, giver and reward.skills from a quest that works | A typo in them |
Known limits: alta lint does not yet verify that requires, act, giver and reward.skills name things that exist. A misspelled requires locks the quest forever without an error, so read those fields twice. A pack adds to a branch that exists; a branch of your own reaches players through a chart.
Go further
- Quests: every field of a quest file.
- Quests and proof: why a quest ends on a proof.
- Closed lists: step kinds, quest types, agents.