en:yaml:texte
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| en:yaml:texte [2026/05/03 18:29] – Add English wiki page using real engine keys cyrilfiesta | en:yaml:texte [2026/11/04 23:30] (Version actuelle) – Documentation 4.17 : objets, evenements et mise en page verifies cyrilfiesta | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | **Language: | + | **Language |
| ====== Text and Formatting (YAML) ====== | ====== Text and Formatting (YAML) ====== | ||
| Ligne 27: | Ligne 27: | ||
| | '' | | '' | ||
| | ''> | | ''> | ||
| + | |||
| + | ===== Highlighted code blocks ===== | ||
| + | |||
| + | <code yaml> | ||
| + | text: | | ||
| + | ```diff | ||
| + | - old rule | ||
| + | + new rule | ||
| + | ``` | ||
| + | |||
| + | ```python | ||
| + | def roll_dice(faces): | ||
| + | return random.randint(1, | ||
| + | ``` | ||
| + | </ | ||
| + | |||
| + | Supported languages: '' | ||
| ===== Story Blocks ===== | ===== Story Blocks ===== | ||
| Ligne 71: | Ligne 88: | ||
| text: "A styled badge" | text: "A styled badge" | ||
| </ | </ | ||
| + | |||
| + | ^ Key ^ Value ^ | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | |||
| + | These keys apply to the whole block on Web and Desktop; Discord and Terminal ignore them. Use inline Markdown to style a single word. | ||
| ===== Room Background ===== | ===== Room Background ===== | ||
| Ligne 79: | Ligne 104: | ||
| text-color: "# | text-color: "# | ||
| text: "The room is dark." | text: "The room is dark." | ||
| + | </ | ||
| + | |||
| + | ===== The global markdown: field ===== | ||
| + | |||
| + | Set in the scenario header, it wraps **all** room texts: | ||
| + | |||
| + | ^ Value ^ Rendering ^ | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | |||
| + | ===== Interactive Inline Elements ===== | ||
| + | |||
| + | Double braces can also make a word, phrase or picture interactive: | ||
| + | |||
| + | <code yaml> | ||
| + | text: | ||
| + | - "The {{door:?An old door.}} is locked." | ||
| + | - "Touch the {{lever: | ||
| + | - "Drop the {{key:> | ||
| + | </ | ||
| + | |||
| + | See [[en: | ||
| + | |||
| + | Tiles and grids use the extended picture syntax: [[en: | ||
| + | |||
| + | ===== Reusing the text of another room ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | <code yaml> | ||
| + | text: "The corridor goes on.[[ROOM: | ||
| + | </ | ||
| + | |||
| + | The French form is '' | ||
| + | |||
| + | The reference works on the web, in the desktop application and in an HTML5 export. Discord, the Terminal and the PDF show the referenced text in their usual linear form. | ||
| + | |||
| + | To build a conversation rather than plain text, see [[en: | ||
| + | |||
| + | ===== Listing choices in the text ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | <code yaml> | ||
| + | rooms: | ||
| + | - id: start | ||
| + | text: | | ||
| + | What would you like to do? | ||
| + | |||
| + | [[choice_vertical]] | ||
| + | choices: | ||
| + | - command: search | ||
| + | to: chest | ||
| + | - to: corridor | ||
| + | - id: chest | ||
| + | text: The chest. | ||
| + | - id: corridor | ||
| + | text: The corridor. | ||
| + | </ | ||
| + | |||
| + | The list shows " | ||
| + | |||
| + | The [[en: | ||
| + | |||
| + | ===== Composed text and loops (4.17) ===== | ||
| + | |||
| + | A group can carry a condition and style, then contain other text blocks or loops. Styles are inherited; children can override them. | ||
| + | |||
| + | <code yaml> | ||
| + | text: | ||
| + | - if: v_visible_v = 1 | ||
| + | size: 23 | ||
| + | text: | ||
| + | - for_each: item | ||
| + | in: bag | ||
| + | do: | ||
| + | - text: t_item_t | ||
| + | </ | ||
| + | |||
| + | Declare '' | ||
| + | |||
| + | Write media tags in the scenario: '' | ||
| + | |||
| + | ===== Furniture item and vertical inventory ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | <code yaml> | ||
| + | title: 'Wiki 4.17: inventory' | ||
| + | language: en | ||
| + | rooms: | ||
| + | - id: atelier | ||
| + | auto_refresh: | ||
| + | text: | | ||
| + | Inventory: | ||
| + | [[INVENTORY_VERTICAL]] | ||
| + | First item in coffre: [[ITEM_IN: | ||
| + | objects: | ||
| + | - name: cle | ||
| + | location: coffre | ||
| + | pickup_reaction: | ||
| + | choices: | ||
| + | - command: regarder | ||
| + | button: Look | ||
| + | to: atelier | ||
| + | </ | ||
| + | |||
| + | '' | ||
| + | |||
| + | ===== Previous room name ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | <code yaml> | ||
| + | title: 'Wiki 4.17: previous' | ||
| + | rooms: | ||
| + | - id: entree | ||
| + | text: ' | ||
| + | choices: | ||
| + | - button: Continue | ||
| + | to: atelier | ||
| + | - id: atelier | ||
| + | text: ' | ||
| + | choices: | ||
| + | - button: Back | ||
| + | to: entree | ||
| + | </ | ||
| + | |||
| + | ===== Local alignment and sized splits ===== | ||
| + | |||
| + | On Web, Desktop and in HTML exports, '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | <code yaml> | ||
| + | title: 'Wiki 4.17: alignment' | ||
| + | vars_text: | ||
| + | cote: right | ||
| + | rooms: | ||
| + | - id: atelier | ||
| + | text: | | ||
| + | [[align: | ||
| + | [[align: | ||
| + | [[align: | ||
| + | [[split: | ||
| + | Second zone. | ||
| + | choices: | ||
| + | - command: rester | ||
| + | button: Stay | ||
| + | to: atelier | ||
| </ | </ | ||
en/yaml/texte.1777825788.txt.gz · Dernière modification : de cyrilfiesta
