Skip to content

Package a quest pack ​

You package a quest pack as an Agent Chart, ready for the marketplace: what it is, the systems it supports, what it adds to the player's world and how the game proves it arrived. A chart declares; it never holds code that runs. A quest pack is data only: the simplest kind of chart, and the one anyone can share.

Before you begin 20 minutes

  • The alta command (see Install the CLI).
  • The quickstart: the quests of a chart are written the same way.
  • Read Badges to see what the player is shown before they agree.
  1. Create the chart

    alta chart new --kind quest-pack writes a chart folder that holds a quest pack, ready to check. Its source holds placeholders until you publish it from your repository.

    Terminal
    sh
    alta chart new my-chart --kind quest-pack
    Output
    text
    created my-chart/chart.json, my-chart/README.md (chart, id my-chart)
    next: edit the texts, then `alta lint my-chart`, then `alta template my-chart`
  2. Say what it is

    The card is what the marketplace and the game show: id (lower case, the folder's name), version, kind (agent, team, module, skill, quest-pack, universe), a title and a summary in each language, and why, the reason a player would want it. Then author, license and price: free or paid. The amount is never in the chart; the catalog holds it.

    my-chart/chart.json
    json
    {
      "en": "Two small quests to close the day: review, then rest.",
      "fr": "Deux petites quêtes pour finir la journée : le bilan, puis le repos."
    }

    examples/chart-data/evening-pack/chart.json#/summary

    my-chart/chart.json
    json
    {
      "en": "A day that ends cleanly starts the next one well.",
      "fr": "Une journée bien finie fait bien commencer la suivante."
    }

    examples/chart-data/evening-pack/chart.json#/why

  3. Declare the systems

    support is required: the systems the chart works on, and whether it works in a hosted world (hosted: ok, limited with a note for Linux, or no). The game shows it before the player agrees, and a player on another system is told plainly.

    my-chart/chart.json
    json
    { "platforms": [{ "os": "macos" }, { "os": "linux" }] }

    examples/chart-data/evening-pack/chart.json#/support

  4. Add the quests

    branch holds the quests. It is either a whole branch, named like the chart, or a fragment that adds quests to a branch of the game. Either way, the uid of each quest carries the chart's id, so two charts never collide. Write the first quest so that it gives a first result the machine can prove. The example comes from a complete chart, evening-pack, whose quests make a whole branch (evening-pack.…); in the chart alta new wrote, a fragment that adds to core, a quest's uid is core.my-chart.<name>, as in its first quest.

    my-chart/chart.json
    json
    {
      "id": "review",
      "uid": "evening-pack.review",
      "act": 1,
      "giver": "daemon",
      "type": "daily",
      "reset": { "every": "day", "at": "17:00" },
      "title": {
        "en": "Ask for the day's summary",
        "fr": "Demande le résumé de la journée"
      },
      "reward": { "xp": 20 },
      "steps": [
        {
          "id": "ask",
          "kind": "mission",
          "title": {
            "en": "Ask your assistant what happened today",
            "fr": "Demande à ton assistant ce qui s'est passé aujourd'hui"
          },
          "mission": {
            "agent": "daemon",
            "brief": {
              "en": "Summarise my day in five lines.",
              "fr": "Résume ma journée en cinq lignes."
            }
          }
        }
      ]
    }

    examples/chart-data/evening-pack/chart.json#/branch/quests/0

  5. Say how it arrives, and the proof

    package says what is installed: data for quests or a universe, nothing to download. parts lists the steps of the plan, each an executor from a closed list (item.data adds the quests), run by the game after the player agrees, with how it is undone (undo) and the read-only checks that prove it holds (proof). spawn is the thing that appears on the map.

    my-chart/chart.json
    json
    [{ "id": "add", "do": "item.data", "undo": "none", "proof": [] }]

    examples/chart-data/evening-pack/chart.json#/parts

    my-chart/chart.json
    json
    {
      "entity": {
        "id": "module:evening-pack",
        "kind": "module",
        "name": "evening-pack",
        "role": "daemon"
      }
    }

    examples/chart-data/evening-pack/chart.json#/spawn

  6. Check it

    alta lint checks the card, the systems, the parts against the closed list and the quests against the game. The warning stays until you publish: Publish a chart fills the source.

    Terminal
    sh
    alta lint my-chart
    Output
    text
    ok   my-chart (chart)
         warning: source: The source still holds placeholders (zeros). [chart.source-placeholder]
           fix: Replace them with the commit git prints and the digest alta package prints.
           docs: https://docs.os.altasystem.ai/reference/errors#chart-source-placeholder
    1 checked, 0 errors, 1 warning

Try it

alta dev my-chart

Open the address it prints: the chart's quests are in the journal, as if the player had added it. Nothing runs on your machine.

Demo: nothing is written on your machine.

Pitfalls ​

DoAvoid
package: data and parts of item.data for quests or a universeAny other executor in a data chart: refused
Parts from the closed list, each with its plan card and its proofAny command of your own: a chart never runs code
A folder named after the chart's idA folder with another name: refused
undo that the executor can really doAn undo that promises more than the executor can undo: refused

Go further ​

  • Agent Chart: every field of a chart and of the catalog.
  • Badges: what the player sees and agrees to.
  • Errors: each rule of alta lint for a chart.

What's next

Alta OS is open source (MIT).