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/10/19 10:47] – cyrilfiestaen:yaml:texte [2026/11/04 23:30] (Version actuelle) – Documentation 4.17 : objets, evenements et mise en page verifies cyrilfiesta
Ligne 163: Ligne 163:
         to: chest         to: chest
       - to: corridor       - to: corridor
 +  - id: chest
 +    text: The chest.
 +  - id: corridor
 +    text: The corridor.
 </code> </code>
  
Ligne 187: Ligne 191:
  
 Write media tags in the scenario: ''%%[[t_item.image_t]]%%'' reads an address. An inserted value such as ''t_item.name_t'' stays text even if it contains tags. See [[en:yaml:listes-boucles|Lists and loops]]. In the editor, **Composed content** creates this group. Write media tags in the scenario: ''%%[[t_item.image_t]]%%'' reads an address. An inserted value such as ''t_item.name_t'' stays text even if it contains tags. See [[en:yaml:listes-boucles|Lists and loops]]. In the editor, **Composed content** creates this group.
 +
 +===== Furniture item and vertical inventory =====
 +
 +''%%[[ITEM_IN:coffre]]%%'' inserts the identifier of the first item present in that furniture in the current room, or empty text if it is empty. The French form is ''%%[[OBJET_DANS:coffre]]%%''.
 +
 +''%%[[INVENTORY_VERTICAL]]%%'' lists one item per line, using item identifiers and grouped quantities. The French form is ''%%[[INVENTAIRE_VERTICAL]]%%''.
 +
 +<code yaml>
 +title: 'Wiki 4.17: inventory'
 +language: en
 +rooms:
 +  - id: atelier
 +    auto_refresh: true
 +    text: |
 +      Inventory:
 +      [[INVENTORY_VERTICAL]]
 +      First item in coffre: [[ITEM_IN:coffre]]
 +    objects:
 +      - name: cle
 +        location: coffre
 +        pickup_reaction: Take
 +    choices:
 +      - command: regarder
 +        button: Look
 +        to: atelier
 +</code>
 +
 +''pickup_reaction: Take'' adds the native pickup button for this item in its furniture. ''auto_refresh: true'' refreshes the text after pickup: the key appears in the vertical inventory and the chest is empty. The "Look" choice displays the room again without taking an item.
 +
 +===== Previous room name =====
 +
 +''%%[[SALLE_PRECEDENTE]]%%'' inserts the known previous room ID, not its text or button label. Before the first move, the result is empty. Keep this French tag on English pages too: it has no English alias.
 +
 +<code yaml>
 +title: 'Wiki 4.17: previous'
 +rooms:
 +- id: entree
 +  text: 'Previous: [[SALLE_PRECEDENTE]]'
 +  choices:
 +  - button: Continue
 +    to: atelier
 +- id: atelier
 +  text: 'Previous: [[SALLE_PRECEDENTE]]'
 +  choices:
 +  - button: Back
 +    to: entree
 +</code>
 +
 +===== Local alignment and sized splits =====
 +
 +On Web, Desktop and in HTML exports, ''%%[[align:left]]text[[/align]]%%'' aligns a block. Directions are ''left'', ''center'', ''right'' or ''gauche'', ''centre'', ''droite''. A text variable such as ''t_cote_t'' can provide the direction. Close the block with ''%%[[/align]]%%''.
 +
 +''%%[[split]]%%'' separates zones. ''%%[[split:40]]%%'' gives 40% to the previous zone; the next receives the remainder. Splits and alignment also work in HUD panels.
 +
 +<code yaml>
 +title: 'Wiki 4.17: alignment'
 +vars_text:
 +  cote: right
 +rooms:
 +- id: atelier
 +  text: |
 +    [[align:left]]Left.[[/align]]
 +    [[align:center]]Center.[[/align]]
 +    [[align:t_cote_t]]Right.[[/align]]
 +    [[split:40]]
 +    Second zone.
 +  choices:
 +  - command: rester
 +    button: Stay
 +    to: atelier
 +</code>
  
en/yaml/texte.1792399622.txt.gz · Dernière modification : de cyrilfiesta