en:yaml:modeles
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| en:yaml:modeles [2026/10/18 23:46] – Relecture 4.17 : clarifications, exemples et typographie cyrilfiesta | en:yaml:modeles [2026/10/20 22:23] (Version actuelle) – Modèles sur_place, portée des encadrés et objets 4.17 cyrilfiesta | ||
|---|---|---|---|
| Ligne 38: | Ligne 38: | ||
| choices: | choices: | ||
| - button: Finish | - button: Finish | ||
| - | to: victory | + | to: conclusion |
| + | - id: conclusion | ||
| + | events: | ||
| + | - end: victory | ||
| </ | </ | ||
| Ligne 59: | Ligne 62: | ||
| See [[en: | See [[en: | ||
| + | |||
| + | ===== Adding a model to the current room: inline ===== | ||
| + | |||
| + | Set '' | ||
| + | |||
| + | <code yaml> | ||
| + | title: A model in the workshop | ||
| + | collections: | ||
| + | player: {} | ||
| + | models: | ||
| + | inline_healing: | ||
| + | inline: true | ||
| + | collections: | ||
| + | hero: {health: 0} | ||
| + | defaults: | ||
| + | hero: {health: 100} | ||
| + | rooms: | ||
| + | - id: content | ||
| + | hud: | ||
| + | position: top-right | ||
| + | scope: room | ||
| + | text: ' | ||
| + | actions: | ||
| + | - verb: heal | ||
| + | target: all | ||
| + | button: Heal | ||
| + | do: hero.health + 1 | ||
| + | rooms: | ||
| + | - id: workshop | ||
| + | text: You are in the workshop. | ||
| + | models: | ||
| + | - model: inline_healing | ||
| + | collections: | ||
| + | choices: | ||
| + | - {command: leave, to: corridor} | ||
| + | - id: corridor | ||
| + | text: The corridor. | ||
| + | choices: | ||
| + | - {command: return, to: workshop} | ||
| + | </ | ||
| + | |||
| + | Heal acts in the workshop and Leave remains available. Returning preserves '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | ===== Collection defaults ===== | ||
| + | |||
| + | The example' | ||
| + | |||
| + | The editor exposes inline insertion and defaults for each generic collection in the model definition. The French key is '' | ||
| + | |||
| + | The supplied library includes '' | ||
en/yaml/modeles.1792359967.txt.gz · Dernière modification : de cyrilfiesta
