# Univers

> Le standard des univers : les mots, couleurs, dessins et textes qui habillent le même jeu ; chaque champ, chaque règle, chaque version.

Un univers habille le même jeu de ses propres mots, couleurs, dessins et textes : une quête reste la même quête, le monde autour change. Un univers n'est que des données : pas de code, pas d'adresse, rien qui tourne.

| | |
|---|---|
| **Standard** | `alta.universe/0.1` (ses dessins : `alta.art/0.1`) |
| **Fichier** | un dossier : `universe.json`, `vocabulary.json`, `palette.json`, `art.json`, `copy/en.json`, `copy/fr.json`, `onboarding.json`, `cinematics.json` |
| **Le créer** | `alta new universe my-world` |
| **Le vérifier** | `alta lint my-world` |
| **Schéma JSON** | [alta.universe.schema.json](https://github.com/altasystem-ai/alta/blob/main/docs/standards/schemas/alta.universe.schema.json) |

Chaque fichier du dossier est un champ de l'univers ci-dessous : `universe.json` est son `manifest`, `vocabulary.json` son `vocabulary`, et ainsi de suite. Un article du store porte le même univers en un seul objet, dans son champ `universe`.

## Exemple minimal

Un univers a besoin de toutes ses parties pour être joué : un mot pour chaque chose de la carte, chaque couleur, un glyphe pour chaque sorte. Le dossier commence par son manifeste : qui est l'univers, et les mots qui sont à lui.

```json [my-world/universe.json]
{
  "id": "loomhollow",
  "order": 9,
  "name": "Loomhollow",
  "tagline": "Every mind is a tapestry.",
  "version": "0.1.0",
  "languages": ["en", "fr"],
  "fonts": { "display": "serif", "body": "rounded" },
  "distinctive": [
    "loomhollow",
    "spindle",
    "bobbin",
    "shuttlewing",
    "knotwork",
    "moth"
  ]
}
```

Le dossier entier, chaque fichier rempli, est dans [examples/universe](https://github.com/altasystem-ai/alta/tree/main/examples/universe) ; `alta new universe` en écrit un que tu peux changer.

## Champs

*Référence en anglais : les descriptions des champs sont celles du schéma JSON, que ton éditeur affiche aussi.*

### Univers

| Field | Type | Required | Description |
|---|---|---|---|
| `schema` | "alta.universe/0.1" | yes | The standard: `alta.universe/0.1`. |
| `manifest` | object | yes | Who the universe is. |
| `manifest.id` | string | yes | The universe's id: lowercase letters, digits and dashes. |
| `manifest.order` | number | no | Where it comes in the list of universes. |
| `manifest.name` | string | yes | Its name; it must not be taken. |
| `manifest.tagline` | string | no | One line that says what it is. |
| `manifest.version` | string | no | Its version. |
| `manifest.languages` | string[] | no | The languages of its texts. |
| `manifest.fonts` | object | yes | Its fonts, from the closed list (grotesk, serif, mono, rounded). |
| `manifest.fonts.display` | enum | yes | The font of the titles. |
| `manifest.fonts.body` | enum | yes | The font of the texts. |
| `manifest.distinctive` | string[] | yes | At least four words of its own, none of them a neutral word of the game. |
| `vocabulary` | object | yes | The universe's words for the things of the game. |
| `vocabulary.kinds` | object | yes | A word for each kind of thing of the map. |
| `vocabulary.kinds.core` | object | yes | The universe's word for a thing of kind `core`. |
| `vocabulary.kinds.core.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.core.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.agent` | object | yes | The universe's word for a thing of kind `agent`. |
| `vocabulary.kinds.agent.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.agent.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.module` | object | yes | The universe's word for a thing of kind `module`. |
| `vocabulary.kinds.module.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.module.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.proposed` | object | yes | The universe's word for a thing of kind `proposed`. |
| `vocabulary.kinds.proposed.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.proposed.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.automation` | object | yes | The universe's word for a thing of kind `automation`. |
| `vocabulary.kinds.automation.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.automation.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.automation-orphan` | object | yes | The universe's word for a thing of kind `automation-orphan`. |
| `vocabulary.kinds.automation-orphan.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.automation-orphan.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.device` | object | yes | The universe's word for a thing of kind `device`. |
| `vocabulary.kinds.device.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.device.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.account` | object | yes | The universe's word for a thing of kind `account`. |
| `vocabulary.kinds.account.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.account.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.interface` | object | yes | The universe's word for a thing of kind `interface`. |
| `vocabulary.kinds.interface.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.interface.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.market` | object | yes | The universe's word for a thing of kind `market`. |
| `vocabulary.kinds.market.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.market.gloss` | string | no | A short explanation of the word. |
| `vocabulary.kinds.peer` | object | yes | The universe's word for a thing of kind `peer`. |
| `vocabulary.kinds.peer.label` | string | yes | The word, as the player reads it. |
| `vocabulary.kinds.peer.gloss` | string | no | A short explanation of the word. |
| `vocabulary.roles` | object | yes | A word and a creature for each agent. |
| `vocabulary.roles.daemon` | object | yes | The universe's word and creature for the daemon. |
| `vocabulary.roles.daemon.label` | string | yes | The word, as the player reads it. |
| `vocabulary.roles.daemon.gloss` | string | no | A short explanation of the word. |
| `vocabulary.roles.daemon.creature` | string | yes | The creature this agent is in the universe. |
| `vocabulary.roles.architect` | object | yes | The universe's word and creature for the architect. |
| `vocabulary.roles.architect.label` | string | yes | The word, as the player reads it. |
| `vocabulary.roles.architect.gloss` | string | no | A short explanation of the word. |
| `vocabulary.roles.architect.creature` | string | yes | The creature this agent is in the universe. |
| `vocabulary.roles.operator` | object | yes | The universe's word and creature for the operator. |
| `vocabulary.roles.operator.label` | string | yes | The word, as the player reads it. |
| `vocabulary.roles.operator.gloss` | string | no | A short explanation of the word. |
| `vocabulary.roles.operator.creature` | string | yes | The creature this agent is in the universe. |
| `vocabulary.roles.reviewer` | object | yes | The universe's word and creature for the reviewer. |
| `vocabulary.roles.reviewer.label` | string | yes | The word, as the player reads it. |
| `vocabulary.roles.reviewer.gloss` | string | no | A short explanation of the word. |
| `vocabulary.roles.reviewer.creature` | string | yes | The creature this agent is in the universe. |
| `vocabulary.roles.guardian` | object | yes | The universe's word and creature for the guardian. |
| `vocabulary.roles.guardian.label` | string | yes | The word, as the player reads it. |
| `vocabulary.roles.guardian.gloss` | string | no | A short explanation of the word. |
| `vocabulary.roles.guardian.creature` | string | yes | The creature this agent is in the universe. |
| `vocabulary.avatar` | object | yes | Its word for the player's avatar. |
| `vocabulary.avatar.label` | string | yes | The word, as the player reads it. |
| `vocabulary.avatar.gloss` | string | no | A short explanation of the word. |
| `vocabulary.level` | object | yes | Its word for a level. |
| `vocabulary.level.label` | string | yes | The word, as the player reads it. |
| `vocabulary.level.gloss` | string | no | A short explanation of the word. |
| `vocabulary.xp` | object | yes | Its word for experience. |
| `vocabulary.xp.label` | string | yes | The word, as the player reads it. |
| `vocabulary.xp.gloss` | string | no | A short explanation of the word. |
| `vocabulary.edge` | object | yes | Its word for a link between two things. |
| `vocabulary.edge.label` | string | yes | The word, as the player reads it. |
| `vocabulary.edge.gloss` | string | no | A short explanation of the word. |
| `vocabulary.world` | object | yes | Its word for the world. |
| `vocabulary.world.label` | string | yes | The word, as the player reads it. |
| `vocabulary.world.gloss` | string | no | A short explanation of the word. |
| `palette` | object | yes | Its colours, each `#rrggbb`. |
| `palette.bg` | string | yes | The background. |
| `palette.bg2` | string | yes | The second background. |
| `palette.ink` | string | yes | The text. |
| `palette.muted` | string | yes | The quiet text. |
| `palette.accent` | string | yes | The accent. |
| `palette.ok` | string | yes | What works. |
| `palette.warn` | string | yes | What needs a look. |
| `palette.bad` | string | yes | What is broken. |
| `palette.mock` | string | yes | What is only shown (a demo). |
| `palette.panel` | string | yes | The panels' background. |
| `palette.panelInk` | string | yes | The panels' text. |
| `palette.line` | string | yes | The lines. |
| `copy` | object | yes | Its texts, by language; English is required. |
| `copy.en` | object | yes | The texts in English. |
| `copy.fr` | object | no | The texts in French. |
| `art` | art | yes | Its art direction. |
| `skin` | object | no | The look of its panels. |
| `skin.radius` | number | yes | The corner radius of the panels, 0 to 24. |
| `skin.border` | number | yes | The border width, 0 to 3. |
| `skin.panelAlpha` | number | yes | How opaque the panels are, 0 to 1. |
| `skin.font` | enum | yes | The font of the panels. |
| `skin.caps` | boolean | no | `true`: titles in capitals. |
| `onboarding` | onboarding | yes | Its guide: the same beats and quests as the neutral guide, in its words. |
| `cinematics` | cinematics | no | Its trailer and scenes. |

### Direction artistique

`art.json` : le sol, un glyphe pour le cœur, l'avatar, chaque agent et chaque sorte de chose, les liens et la lumière.

| Field | Type | Required | Description |
|---|---|---|---|
| `schema` | "alta.art/0.1" | yes | The standard: `alta.art/0.1`. |
| `ground` | object | yes | The ground of the map. |
| `ground.style` | enum | yes | The ground's style, from the closed list. |
| `ground.colors` | enum | string[] | yes | Its colours, 1 to 6. |
| `ground.particles` | object | no | Particles drifting over the ground. |
| `ground.particles.shape` | enum | yes | Their shape, from the closed list. |
| `ground.particles.count` | integer | yes | How many, 0 to 1500. |
| `ground.particles.drift` | number[] | yes | Their drift, `[x, y]`, each -50 to 50. |
| `ground.particles.twinkle` | boolean | no | `true`: they twinkle. |
| `core` | glyph | yes | How the core of the world is drawn. |
| `avatar` | glyph | yes | How the player's avatar is drawn. |
| `agents` | object | yes | How each agent is drawn, by role. |
| `agents.architect` | glyph | yes | How the architect is drawn. |
| `agents.operator` | glyph | yes | How the operator is drawn. |
| `agents.reviewer` | glyph | yes | How the reviewer is drawn. |
| `agents.guardian` | glyph | yes | How the guardian is drawn. |
| `kinds` | object | yes | How each kind of thing of the map is drawn. |
| `kinds.module` | glyph | yes | How a thing of kind `module` is drawn. |
| `kinds.proposed` | glyph | yes | How a thing of kind `proposed` is drawn. |
| `kinds.automation` | glyph | yes | How a thing of kind `automation` is drawn. |
| `kinds.automation-orphan` | glyph | yes | How a thing of kind `automation-orphan` is drawn. |
| `kinds.device` | glyph | yes | How a thing of kind `device` is drawn. |
| `kinds.account` | glyph | yes | How a thing of kind `account` is drawn. |
| `kinds.interface` | glyph | yes | How a thing of kind `interface` is drawn. |
| `kinds.market` | glyph | yes | How a thing of kind `market` is drawn. |
| `kinds.peer` | glyph | yes | How a thing of kind `peer` is drawn. |
| `links` | object | yes | How the links are drawn. |
| `links.flow` | link | yes | A link that carries data. |
| `links.cycle` | link | yes | A link that comes back on a schedule. |
| `links.control` | link | yes | A link that gives orders. |
| `light` | object | no | The light over the map. |
| `light.vignette` | number | no | How dark the edges are, 0 to 1. |
| `light.fog` | number | no | How much fog, 0 to 1. |

### Glyphe

| Field | Type | Required | Description |
|---|---|---|---|
| `shape` | enum | yes | The shape, from the closed list. |
| `size` | number | yes | The size, 8 to 120. |
| `fill` | enum | string | yes | The fill colour. |
| `stroke` | enum | string | no | The outline colour. |
| `sides` | integer | no | The number of sides of a polygon, 3 to 12. |
| `glow` | number | no | How much it glows, 0 to 1. |
| `spin` | number | no | How it turns, -1 to 1. |
| `wobble` | number | no | How it wobbles, -1 to 1. |
| `layers` | layer[] | no | Up to three layers drawn over it. |

### Calque

| Field | Type | Required | Description |
|---|---|---|---|
| `shape` | enum | yes | The shape, from the closed list. |
| `size` | number | yes | The size, 8 to 120. |
| `fill` | enum | string | yes | The fill colour. |
| `stroke` | enum | string | no | The outline colour. |
| `sides` | integer | no | The number of sides of a polygon, 3 to 12. |
| `glow` | number | no | How much it glows, 0 to 1. |
| `spin` | number | no | How it turns, -1 to 1. |
| `wobble` | number | no | How it wobbles, -1 to 1. |

### Lien

| Field | Type | Required | Description |
|---|---|---|---|
| `style` | enum | yes | The line's style, from the closed list. |
| `width` | number | yes | The line's width, 0.5 to 8. |
| `color` | enum | string | yes | The line's colour. |

Le guide d'un univers suit le [standard de l'onboarding](https://docs.altasystem.ai/fr/reference/standards/onboarding), et ses scènes celui des [cinématiques](https://docs.altasystem.ai/fr/reference/standards/cinematics).

## Règles et erreurs

Chaque règle que `alta lint` applique à un univers, avec sa section sur la [page des erreurs](https://docs.altasystem.ai/fr/reference/errors#standard-universe). Les plus fréquentes : un mot à lui qui est aussi un mot du jeu ([`universe.purity`](https://docs.altasystem.ai/reference/errors#universe-purity)), et une adresse dans un texte ([`universe.no-address`](https://docs.altasystem.ai/reference/errors#universe-no-address)).

## Exemple complet

<details class="alta-full-example">
<summary>La direction artistique d'un univers</summary>

```json [my-world/art.json]
{
  "schema": "alta.art/0.1",
  "ground": {
    "style": "bands",
    "colors": ["bg", "bg2", "#3a2f45"],
    "particles": {
      "shape": "flake",
      "count": 220,
      "drift": [2, -1],
      "twinkle": true
    }
  },
  "core": {
    "shape": "ring",
    "size": 72,
    "fill": "accent",
    "stroke": "ink",
    "glow": 0.6,
    "spin": 0.1,
    "layers": [
      {
        "shape": "star",
        "size": 40,
        "fill": "ink",
        "sides": 8
      }
    ]
  },
  "avatar": { "shape": "drop", "size": 18, "fill": "ink", "glow": 0.3 },
  "agents": {
    "architect": {
      "shape": "leaf",
      "size": 34,
      "fill": "#c9824a",
      "glow": 0.3
    },
    "operator": {
      "shape": "flame",
      "size": 34,
      "fill": "#e5c35c",
      "wobble": 0.2
    },
    "reviewer": {
      "shape": "crystal",
      "size": 34,
      "fill": "#b9c4d6"
    },
    "guardian": { "shape": "shell", "size": 34, "fill": "#8fbf7f" }
  },
  "kinds": {
    "module": {
      "shape": "poly",
      "size": 28,
      "fill": "accent",
      "sides": 6
    },
    "proposed": {
      "shape": "poly",
      "size": 24,
      "fill": "mock",
      "sides": 6,
      "glow": 0
    },
    "automation": {
      "shape": "gear",
      "size": 20,
      "fill": "ok",
      "spin": 0.5
    },
    "automation-orphan": {
      "shape": "gear",
      "size": 18,
      "fill": "warn",
      "spin": -0.2
    },
    "device": { "shape": "spire", "size": 26, "fill": "muted" },
    "account": { "shape": "ring", "size": 22, "fill": "#a37cc6" },
    "interface": {
      "shape": "orb",
      "size": 20,
      "fill": "#7fb3bf",
      "glow": 0.5
    },
    "market": {
      "shape": "star",
      "size": 36,
      "fill": "accent",
      "sides": 5
    },
    "peer": {
      "shape": "blob",
      "size": 26,
      "fill": "line",
      "wobble": 0.4
    }
  },
  "links": {
    "flow": { "style": "line", "width": 1.2, "color": "line" },
    "cycle": { "style": "dots", "width": 1, "color": "muted" },
    "control": { "style": "wave", "width": 2, "color": "accent" }
  },
  "light": { "vignette": 0.5, "fog": 0.2 }
}
```

</details>

## Versions

| Version | Ce qu'elle ajoute | Lue par le jeu |
|---|---|---|
| `alta.universe/0.1`, `alta.art/0.1` | Manifeste, vocabulaire, palette, textes, dessins, guide et scènes | actuelle |

## Guides qui l'utilisent

- [Créer un univers](https://docs.altasystem.ai/fr/guides/universes/create)
- [Créer une variante d'onboarding](https://docs.altasystem.ai/fr/guides/onboarding/variant)
