Outils pour utilisateurs

Outils du site


en:yaml:evenements

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
en:yaml:evenements [2026/08/30 21:20] – maj 4.14 : dialogues, videos hebergees, mise en page, doc EN completee cyrilfiestaen:yaml:evenements [2026/08/30 22:25] (Version actuelle) – maj 4.14 : dialogues, videos hebergees, mise en page, doc EN completee cyrilfiesta
Ligne 86: Ligne 86:
  
 <code yaml> <code yaml>
-evenements+events
-  - si: ~ +  - if: ~ 
-    bouton: "⚔️ Attack" +    button: "⚔️ Attack" 
-    visible-si: "v_hp_v > 0"   # hidden when HP reach 0 +    visible-if: "v_hp_v > 0"   # hidden when HP reach 0 
-    faire: "score.+.5" +    do: "score.+.5" 
-    texte: "You attack!"+    text: "You attack!"
  
-  - si: ~ +  - if: ~ 
-    bouton: "🏃 Flee" +    button: "🏃 Flee" 
-    grise-si: "v_hp_v <= 0"    # visible but inactive when HP reach 0 +    disabled-if: "v_hp_v <= 0" # visible but inactive when HP reach 0 
-    vers: accueil+    to: accueil
 </code> </code>
  
-''visible-si:'' hides the button when the condition is false. ''grise-si:'' keeps the button visible but inactive when the condition is true.+''visible-if:'' hides the button when the condition is false. ''disabled-if:'' keeps the button visible but inactive when the condition is true.
  
 ⚠ On Discord, buttons are frozen inside the message that was sent. Clicking 🔄 (refresh) forces a redisplay with up to date buttons. ⚠ On Discord, buttons are frozen inside the message that was sent. Clicking 🔄 (refresh) forces a redisplay with up to date buttons.
Ligne 105: Ligne 105:
 ===== Conditional text on an event ===== ===== Conditional text on an event =====
  
-The ''texte:'' field accepts a list of conditional blocks:+The ''text:'' field accepts a list of conditional blocks:
  
 <code yaml> <code yaml>
-texte+text
-  - si: "_max_atteint_" +  - if: "_max_atteint_" 
-    texte: "No charge left!" +    text: "No charge left!" 
-  - si: "v_score_v > 50" +  - if: "v_score_v > 50" 
-    texte: "🏆 Wealthy adventurer: score v_score_v!" +    text: "🏆 Wealthy adventurer: score v_score_v!" 
-  - texte: "Action done."   # fallback, always shown+  - text: "Action done."   # fallback, always shown
 </code> </code>
  
 ===== Sequential behaviour ===== ===== Sequential behaviour =====
  
-⚠ Important: events run in order. Each one sees the values **already changed** by the previous ones. An event carrying ''vers:'' or ''fin:'' **stops** the ones after it.+⚠ Important: events run in order. Each one sees the values **already changed** by the previous ones. An event carrying ''to:'' or ''end:'' **stops** the ones after it.
  
 ===== Timer started by an event ===== ===== Timer started by an event =====
  
 <code yaml> <code yaml>
-evenements+events
-  - si: ~+  - if: ~
     timer: hourglass     timer: hourglass
-    duree: "30" +    duration: "30" 
-    verssalle_expiration +    toexpiration_room 
-    texte: "The hourglass is running!"+    text: "The hourglass is running!"
 </code> </code>
  
 ''v_hourglass_v'' holds the remaining seconds. A local timer is cancelled when the player leaves the room. ''v_hourglass_v'' holds the remaining seconds. A local timer is cancelled when the player leaves the room.
  
-===== Manual command inside faire: (v4.9) =====+===== Manual command inside do: (v4.9) =====
  
-The ''commande:'' action inside ''faire:'' runs a text command of the bot, from an event, a choice or an action:+The ''command:'' action inside ''do:'' runs a text command of the bot, from an event, a choice or an action:
  
 <code yaml> <code yaml>
-faire+do
-  - commande: "take key" +  - command: "take key" 
-  - commande: "inspect chest" +  - command: "inspect chest" 
-  - commande: "go laboratory"+  - command: "go laboratory"
 </code> </code>
  
Ligne 153: Ligne 153:
 A local event can be triggered by a tooltip or clickable element, and a ''source:'' + ''target:'' pair defines a drag&drop event. A local event can be triggered by a tooltip or clickable element, and a ''source:'' + ''target:'' pair defines a drag&drop event.
  
-  * [[en:yaml:tooltips|Interactive tooltips]]: ''%%{{label:?text:!id}}%%'' or ''{{label:!id}}''.+  * [[en:yaml:tooltips|Interactive tooltips]]: ''%%{{label:?text:!id}}%%'' or ''%%{{label:!id}}%%''.
   * [[en:yaml:clickable-elements|Clickable elements]]: ''%%{{label:@id}}%%''.   * [[en:yaml:clickable-elements|Clickable elements]]: ''%%{{label:@id}}%%''.
   * [[en:yaml:drag-drop|Drag & drop]]: ''source:'' + ''target:'' on the event.   * [[en:yaml:drag-drop|Drag & drop]]: ''source:'' + ''target:'' on the event.
en/yaml/evenements.txt · Dernière modification : de cyrilfiesta