Skip to content

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.
  1. Say where the quest runs

    support lists the systems (macos, linux, windows), with a minimum version when it matters. hosted says how the quest plays in a hosted world: ok, limited or no; ok needs linux in the list. notes explain a difference to the player, per system.

    Without support, a quest is for every system. A branch can carry support too; its quests inherit it.

    my-pack/per-os.json
    json
    {
      "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."
        }
      }
    }

    examples/quest-pack/per-os.fragment.json#/quests/0/support

  2. Write one step per system

    os on 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.json
    json
    {
      "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.json
    json
    {
      "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" }
    }

    examples/quest-pack/per-os.fragment.json#/quests/0/steps/1

  3. Or one value per system

    cmd, open and run take 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.json
    json
    {
      "id": "open",
      "kind": "command",
      "title": { "en": "Open the folder", "fr": "Ouvre le dossier" },
      "cmd": { "macos": "open ~/Documents/Notes", "linux": "xdg-open ~/notes" },
      "optional": true
    }

    examples/quest-pack/per-os.fragment.json#/quests/0/steps/2

  4. Keep the player's Mac to itself

    host shows 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 stays local.

    On a choice, off greys an option out in that host and says why; the player sees it but cannot pick it. resources does 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.json
    json
    {
      "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.json
    json
    {
      "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"
    }

    examples/quest-pack/per-os.fragment.json#/quests/0/steps/3

  5. Check the pack

    Save the complete example as my-pack/per-os.json and 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.json
    json
    {
      "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

    Terminal
    sh
    alta lint my-pack
    Output
    text
    ok   my-pack/per-os.json (quests)
    ok   my-pack/quests.json (quests)
    2 checked, 0 errors, 0 warnings

Try it

alta dev my-pack

Open 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 ​

DoAvoid
Two steps with os when a check differs by systemA check written as a per-system table
A table that covers every supported systemA table for macOS alone in a quest that supports Linux
host: "local" on a step that needs the Mac's screen or soundShowing a hosted player a button that cannot work
A note that tells the player what differsA 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.

What's next

Alta OS is open source (MIT).