English
One step per system
You write a quest that plays on more than one system: it says where it runs, shows each player the steps of their own system, and keeps what needs the player's own Mac away from a hosted world.
Before you begin 10 minutes
- A quest pack that passes
alta lint: the quickstart makes one,my-pack.
Say where the quest runs
supportlists the systems (macos,linux,windows), with a minimum version when it matters.hostedsays how the quest plays in a hosted world:ok,limitedorno;okneedslinuxin the list.notesexplain a difference to the player, per system.Without
support, a quest is for every system. A branch can carrysupporttoo; its quests inherit it.my-pack/per-os.jsonjson{ "platforms": [{ "os": "macos", "min": "14" }, { "os": "linux" }], "hosted": "limited", "notes": { "linux": { "en": "In a hosted world, the folder lives on the server.", "fr": "Dans un monde hébergé, le dossier vit sur le serveur." } } }Write one step per system
oson a step shows it only on those systems. When a proof differs by system, such as a path, write one step for each: the player sees only theirs.my-pack/per-os.jsonjson{ "id": "folder-mac", "kind": "check", "os": ["macos"], "title": { "en": "A Notes folder in Documents", "fr": "Un dossier Notes dans Documents" }, "check": { "type": "file", "path": "~/Documents/Notes" } }examples/quest-pack/per-os.fragment.json#/quests/0/steps/0
my-pack/per-os.jsonjson{ "id": "folder-linux", "kind": "check", "os": ["linux"], "title": { "en": "A notes folder in your home", "fr": "Un dossier notes chez toi" }, "check": { "type": "file", "path": "~/notes" } }Or one value per system
cmd,openandruntake a table instead of a value: one entry per system. The table names every system the quest supports, no more, no less. A plain value is for every system.my-pack/per-os.jsonjson{ "id": "open", "kind": "command", "title": { "en": "Open the folder", "fr": "Ouvre le dossier" }, "cmd": { "macos": "open ~/Documents/Notes", "linux": "xdg-open ~/notes" }, "optional": true }Keep the player's Mac to itself
hostshows a step only in a world on the player's own machine (local) or only in a hosted one (hosted). A step that opens an app of the Mac stayslocal.On a choice,
offgreys an option out in that host and says why; the player sees it but cannot pick it.resourcesdoes the same where the machine has less than the option needs ({ "memory": "8Gi" }), and says what is missing: see What a step needs of the machine. Never put "Recommended" on an option that can be greyed:choice.recommended.my-pack/per-os.jsonjson{ "id": "show", "kind": "action", "host": "local", "os": ["macos"], "title": { "en": "Open OpenClaw", "fr": "Ouvre OpenClaw" }, "run": { "do": "app.open", "args": { "app": "openclaw" } }, "optional": true }examples/quest-pack/per-os.fragment.json#/quests/0/steps/4
my-pack/per-os.jsonjson{ "id": "sync", "kind": "choice", "title": { "en": "Keep a copy elsewhere?", "fr": "Garder une copie ailleurs ?" }, "choices": [ { "id": "none", "label": { "en": "No, this machine is enough", "fr": "Non, cette machine suffit" } }, { "id": "disk", "label": { "en": "On an external disk", "fr": "Sur un disque externe" }, "off": { "host": "hosted", "why": { "en": "A hosted world has no disk to plug in.", "fr": "Un monde hébergé n'a pas de disque à brancher." } } }, { "id": "search", "label": { "en": "In a search index on this machine", "fr": "Dans un index de recherche sur cette machine" }, "resources": { "memory": "8Gi" } } ], "saves": "answers.notes.sync" }Check the pack
Save the complete example as
my-pack/per-os.jsonand check the folder. A table that misses a supported system, or an executor that does not run on the step's systems, is refused:step.per-os,step.run-os.my-pack/per-os.jsonjson{ "schema": "alta.quests/0.3", "branch": "core", "quests": [ { "id": "notes-home", "uid": "core.notes-home", "act": 2, "giver": "architect", "title": { "en": "Give your notes a home", "fr": "Donne une maison à tes notes" }, "summary": { "en": "One folder for your notes, where your system expects it.", "fr": "Un dossier pour tes notes, là où ton système l'attend." }, "reward": { "xp": 40 }, "support": { "platforms": [ { "os": "macos", "min": "14" }, { "os": "linux" } ], "hosted": "limited", "notes": { "linux": { "en": "In a hosted world, the folder lives on the server.", "fr": "Dans un monde hébergé, le dossier vit sur le serveur." } } }, "steps": [ { "id": "folder-mac", "kind": "check", "os": ["macos"], "title": { "en": "A Notes folder in Documents", "fr": "Un dossier Notes dans Documents" }, "check": { "type": "file", "path": "~/Documents/Notes" } }, { "id": "folder-linux", "kind": "check", "os": ["linux"], "title": { "en": "A notes folder in your home", "fr": "Un dossier notes chez toi" }, "check": { "type": "file", "path": "~/notes" } }, { "id": "open", "kind": "command", "title": { "en": "Open the folder", "fr": "Ouvre le dossier" }, "cmd": { "macos": "open ~/Documents/Notes", "linux": "xdg-open ~/notes" }, "optional": true }, { "id": "sync", "kind": "choice", "title": { "en": "Keep a copy elsewhere?", "fr": "Garder une copie ailleurs ?" }, "choices": [ { "id": "none", "label": { "en": "No, this machine is enough", "fr": "Non, cette machine suffit" } }, { "id": "disk", "label": { "en": "On an external disk", "fr": "Sur un disque externe" }, "off": { "host": "hosted", "why": { "en": "A hosted world has no disk to plug in.", "fr": "Un monde hébergé n'a pas de disque à brancher." } } }, { "id": "search", "label": { "en": "In a search index on this machine", "fr": "Dans un index de recherche sur cette machine" }, "resources": { "memory": "8Gi" } } ], "saves": "answers.notes.sync" }, { "id": "show", "kind": "action", "host": "local", "os": ["macos"], "title": { "en": "Open OpenClaw", "fr": "Ouvre OpenClaw" }, "run": { "do": "app.open", "args": { "app": "openclaw" } }, "optional": true } ] } ] }examples/quest-pack/per-os.fragment.json
Terminalshalta lint my-packOutputtextok my-pack/per-os.json (quests) ok my-pack/quests.json (quests) 2 checked, 0 errors, 0 warnings
Try it
alta dev my-packOpen the address it prints, press L for the quests, then open Give your notes a home. The demo plays a Mac on its own machine: you see the macOS folder step and the macOS command, not the Linux ones.
Demo: nothing is written on your machine.
Pitfalls
| Do | Avoid |
|---|---|
Two steps with os when a check differs by system | A check written as a per-system table |
| A table that covers every supported system | A table for macOS alone in a quest that supports Linux |
host: "local" on a step that needs the Mac's screen or sound | Showing a hosted player a button that cannot work |
| A note that tells the player what differs | A quest that silently skips steps |
A check cannot be a per-system table: it is refused as a check with no type. Most executors run on macOS and Linux, a few on macOS only; the executors page says where each runs and whether it runs in a hosted world.
Go further
- Platforms: systems, hosted worlds, what a host has.
- Quests:
support,os,host, field by field. - Executors: the systems of each action.