# Support

> The support block: where a quest, a branch or a chart can be played; every field and rule.

The `support` block says where something can be played: on which systems, whether in a hosted world, and what it needs from the machine. It goes in a quest, a branch or a chart. Without it, the content is played everywhere; with it, the game hides what cannot be played here and says why.

| | |
|---|---|
| **Standard** | a block of `alta.quests/0.3`, `alta.game/0.3` and `alta.chart/0.1` |
| **Where** | `support` of a quest, a branch or a chart |
| **Check it** | `alta lint` on the file that holds it |

## Minimal example

A quest that needs a microphone: macOS 14 or later, never in a hosted world.

```json [quests.json]
{
  "platforms": [{ "os": "macos", "min": "14" }],
  "hosted": "no",
  "needs": ["audio"]
}
```

## Fields

### Support

| Field | Type | Required | Description |
|---|---|---|---|
| `platforms` | object[] | yes | The systems it runs on, at least one. |
| `platforms.os` | enum | yes | The system. |
| `platforms.arch` | enum[] | no | The processors it runs on (`arm64`, `x64`). Absent: all of them. |
| `platforms.min` | string | no | The oldest version of the system it needs, e.g. `14` or `13.5`. |
| `hosted` | enum | no | Whether it works in a hosted world: `ok` (needs `linux` in the platforms), `limited` (needs a note for linux) or `no`. Absent: `ok` when linux is listed and nothing is needed, else `no`. |
| `needs` | enum[] | no | What it needs from the machine: `gui`, `audio`, `gpu`, `keychain`, `sudo`, `terminal`, `local-device`. A hosted world never has `gui`, `audio`, `keychain` or `local-device`. |
| `notes` | map of text | no | A short note for the player, per system (only for the systems it supports), e.g. what is limited there. |

A hosted world runs on Linux and has no screen, sound, keychain or device of its own: `hosted: "ok"` needs `linux` in the platforms, and a need of that list makes the content local only.

A step that differs from one system to another says so in its own fields: `os` on the step, or one value per system for `run`, `cmd` and `open`. See [One step per system](https://docs.altasystem.ai/guides/quests/per-os).

## Rules and errors

Each rule `alta lint` applies to a support block, with its section on the [errors page](https://docs.altasystem.ai/reference/errors#standard-support).

## Full example

<details class="alta-full-example">
<summary>The quest around it</summary>

```json [quests.json]
{
  "schema": "alta.quests/0.3",
  "branch": "core",
  "quests": [
    {
      "id": "minimal-mic",
      "uid": "core.minimal-mic",
      "act": 2,
      "giver": "daemon",
      "title": {
        "en": "Let it hear you",
        "fr": "Laisse-le t'entendre"
      },
      "reward": { "xp": 20 },
      "support": {
        "platforms": [{ "os": "macos", "min": "14" }],
        "hosted": "no",
        "needs": ["audio"]
      },
      "steps": [
        {
          "id": "mic",
          "kind": "check",
          "title": {
            "en": "The microphone is allowed",
            "fr": "Le micro est autorisé"
          },
          "check": {
            "type": "permission",
            "name": "microphone"
          }
        }
      ]
    }
  ]
}
```

</details>

## Versions

| Version | What it adds | Read by the game |
|---|---|---|
| `alta.game/0.2` | The `support` block | yes, and in 0.3 and in `alta.chart/0.1` |

## Guides that use it

- [One step per system](https://docs.altasystem.ai/guides/quests/per-os)
- [Create a chart for the store](https://docs.altasystem.ai/charts/guides/quest-pack)
