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/07 03:16] – Documentation interactions YAML 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 |
  
  
Ligne 87: Ligne 119:
  
 <code yaml> <code yaml>
-text: "The {{door:?An old door.}} is locked." +text: "The %%{{door:?An old door.}}%% is locked." 
-text: "Touch the {{lever:@pull_lever}}." +text: "Touch the %%{{lever:@pull_lever}}%%." 
-text: "Drop the {{key:>key}} onto the {{door:$door}}."+text: "Drop the %%{{key:>key}}%% onto the %%{{door:$door}}%%."
 </code> </code>
  
Ligne 96: Ligne 128:
 Tiles and grids use the extended picture syntax: [[en:yaml:tiles-tilemaps|Tiles and tilemaps]]. 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.1778116575.txt.gz · Dernière modification : de cyrilfiesta