Outils pour utilisateurs

Outils du site


en:txt:reactions

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:txt:reactions [2026/05/03 18:48] – Harmonize FR/EN language switch cyrilfiestaen:txt:reactions [2026/08/31 20:47] (Version actuelle) – Wiki : fins de pages homogènes, liens Discord retirés cyrilfiesta
Ligne 1: Ligne 1:
 **Language / Langue :** [[fr:txt:reactions|FR]] | **EN** **Language / Langue :** [[fr:txt:reactions|FR]] | **EN**
  
-====== TXT — Discord Reactions ======+====== Discord reactions (.txt format) ====== 
 + 
 +Reactions are clickable emojis shown under the bot messages. They let the player interact with the scenario without typing a command. 
 + 
 +For the bot to recognise an emoji, it must be in Unicode form (🔑, not '':key:''). 
 +On Discord, type ''\'' followed by an emoji to get its Unicode version. 
 + 
 +===== Reaction attached to a room ===== 
 + 
 +Add the ''§emoji'' symbol after the room declaration in the exits: 
 + 
 +<code> 
 +2 room_name§🚪 
 +</code> 
 + 
 +The 🚪 reaction appears in every room from which room 2 is reachable, and checks the access conditions just like the ''go 2'' command. 
 + 
 +===== Reaction attached to an object ===== 
 + 
 +Add ''§emoji'' after each field of the object to attach a reaction: 
 + 
 +<code> 
 +hammer|crate|Description of the crate§🔨|You take the hammer§🛠️|Description of the hammer§👁️ 
 +</code> 
 + 
 +  * 🔨 inspects the crate (''inspect crate'' command) 
 +  * 🛠️ takes the hammer (''take hammer'' command) 
 +  * 👁️ inspects the hammer (''inspect hammer'' command) 
 + 
 +===== Reaction attached to a 997 event ===== 
 + 
 +<code> 
 +997|2§🔧|action|You use the tool.|Nothing to do here. 
 +</code> 
 + 
 +The number before the ''§'' is how many **uses** are allowed (0 means unlimited). The reaction fires the event when the conditions are met. 
 + 
 +It can be combined with other conditions: 
 +<code> 
 +997|key 2§🔑|3|You unlock the door!|You do not have the key. 
 +</code> 
 + 
 +===== Reaction attached to a custom action ===== 
 + 
 +<code> 
 +action:door|condition§🔑|effect|You open the door.|The door is locked. 
 +</code> 
 + 
 +The reaction fires the action when the condition is met. 
 + 
 +====Global aliases with reactions ===== 
 + 
 +At the end of the file, after the last ''*****'', reactions can be attached to global aliases: 
 + 
 +<code> 
 +inventory§🎒|map§🗺️|help§❓ 
 +</code> 
 + 
 +These reactions appear whenever the alias can be used from the current room.
  
-Legacy reaction syntax is still supported for old scenarios. In YAML, reaction-like buttons are declared with ''button:'' on choices, events and actions. 
en/txt/reactions.1777826881.txt.gz · Dernière modification : de cyrilfiesta