en:yaml:alias
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédente | |||
| en:yaml:alias [2026/05/03 18:47] – Harmonize FR/EN language switch cyrilfiesta | en:yaml:alias [2026/05/03 23:59] (Version actuelle) – mise a jour wiki cyrilfiesta | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| **Language / Langue :** [[fr: | **Language / Langue :** [[fr: | ||
| - | ====== Aliases, Commands | + | ====== Aliases and Commands |
| - | Modern YAML does not use a '' | + | Aliases let the player navigate |
| - | ===== Choices | + | ===== Command in a choice |
| + | |||
| + | '' | ||
| <code yaml> | <code yaml> | ||
| choices: | choices: | ||
| - command: north | - command: north | ||
| - | button: "Go north" | + | button: "⬆️ |
| - | to: north_room | + | to: north_forest |
| + | |||
| + | - command: back | ||
| + | to: home | ||
| </ | </ | ||
| - | ===== Global | + | Without '' |
| + | |||
| + | ===== Global | ||
| + | |||
| + | '' | ||
| <code yaml> | <code yaml> | ||
| global_aliases: | global_aliases: | ||
| - | back: " | + | back: "🏠 Home" |
| - | help: " | + | help: "❓ Help" |
| + | </ | ||
| - | rooms: | + | In any room, a choice with '' |
| - | - id: corridor | + | |
| - | choices: | + | <code yaml> |
| - | - command: back | + | choices: |
| - | to: home | + | - command: back |
| + | to: home # displays "🏠 Home" from global_aliases | ||
| </ | </ | ||
| - | ===== Action | + | ===== Action |
| + | |||
| + | In '' | ||
| <code yaml> | <code yaml> | ||
| Ligne 36: | Ligne 49: | ||
| alias: still | alias: still | ||
| if: ~ | if: ~ | ||
| - | text_ok: "The still waits for your ingredients." | + | text_ok: "The still awaits |
| </ | </ | ||
| The player can type '' | The player can type '' | ||
| - | ===== Action and Event Buttons | + | ===== Global navigation aliases |
| + | |||
| + | '' | ||
| <code yaml> | <code yaml> | ||
| - | actions: | + | global_aliases: |
| - | | + | |
| - | target: potion | + | |
| - | button: "Drink potion" | + | |
| - | if: " | + | |
| - | do: " | + | |
| - | text_ok: "+10 HP!" | + | |
| - | events: | + | rooms: |
| - | - if: ~ | + | - id: world_map |
| - | | + | |
| - | | + | - id: corridor |
| - | text: "+5 mana." | + | |
| + | - command: map | ||
| + | to: world_map | ||
| </ | </ | ||
| + | |||
| + | ===== See also ===== | ||
| + | |||
| + | * [[en: | ||
| + | * [[en: | ||
| + | * [[en: | ||
| + | |||
| + | **Join us on [[https:// | ||
| + | |||
en/yaml/alias.1777826872.txt.gz · Dernière modification : de cyrilfiesta
