Outils pour utilisateurs

Outils du site


en:yaml:texte

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
en:yaml:texte [2026/05/03 18:47] – Harmonize FR/EN language switch cyrilfiestaen:yaml:texte [2026/08/31 20:55] (Version actuelle) – Wiki : fins de pages homogènes, liens Discord retirés cyrilfiesta
Ligne 27: Ligne 27:
 | ''%%||text||%%'' | Spoiler | | ''%%||text||%%'' | Spoiler |
 | ''> text'' on its own line | Block quote | | ''> text'' on its own line | Block quote |
 +
 +===== Highlighted code blocks =====
 +
 +<code yaml>
 +text: |
 +  ```diff
 +  - old rule
 +  + new rule
 +  ```
 +
 +  ```python
 +  def roll_dice(faces):
 +      return random.randint(1, faces)
 +  ```
 +</code>
 +
 +Supported languages: ''diff'', ''yaml'', ''python'', ''js'', ''json'', ''bash'', and every language handled by highlight.js on web and desktop. On Discord, they fall back to a plain code block.
 +
  
 ===== Story Blocks ===== ===== Story Blocks =====
Ligne 80: Ligne 98:
   text: "The room is dark."   text: "The room is dark."
 </code> </code>
 +
 +
 +===== The global markdown: field =====
 +
 +Set in the scenario header, it wraps **all** room texts:
 +
 +^ Value ^ Rendering ^
 +| ''fix'' | Monospace block (default) |
 +| ''none'' | Plain text |
 +| ''bold'' | Bold |
 +| ''italic'' | Italic |
 +| ''quote'' | Blockquote |
 +| ''story'' | Story blocks enabled |
 +| ''py'' / ''yaml'' / ''js'' / … | Highlighted code block |
 +
 +
 +===== Interactive Inline Elements =====
 +
 +Double braces can also make a word, phrase or picture interactive:
 +
 +<code yaml>
 +text: "The %%{{door:?An old door.}}%% is locked."
 +text: "Touch the %%{{lever:@pull_lever}}%%."
 +text: "Drop the %%{{key:>key}}%% onto the %%{{door:$door}}%%."
 +</code>
 +
 +See [[en:yaml:tooltips|Interactive tooltips]], [[en:yaml:clickable-elements|Clickable elements]] and [[en:yaml:drag-drop|Drag & drop]].
 +
 +Tiles and grids use the extended picture syntax: [[en:yaml:tiles-tilemaps|Tiles and tilemaps]].
 +
 +
 +===== Reusing the text of another room =====
 +
 +''%%[[ROOM:n]]%%'' inserts the narrative content of room number //n// where you write it. Useful for a recurring description or reply, written only once.
 +
 +<code yaml>
 +text: "The corridor goes on.[[ROOM:12]]"
 +</code>
 +
 +The French form is ''%%[[SALLE:n]]%%''. Circular references are detected and stopped: a room cannot include itself, directly or indirectly.
 +
 +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:yaml:dialogues|Dialogues and sequences]].
 +
en/yaml/texte.1777826866.txt.gz · Dernière modification : de cyrilfiesta