Outils pour utilisateurs

Outils du site


en:txt:alias

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:alias [2026/05/03 18:48] – Harmonize FR/EN language switch cyrilfiestaen:txt:alias [2026/08/31 20:46] (Version actuelle) – Wiki : fins de pages homogènes, liens Discord retirés cyrilfiesta
Ligne 1: Ligne 1:
 **Language / Langue :** [[fr:txt:alias|FR]] | **EN** **Language / Langue :** [[fr:txt:alias|FR]] | **EN**
  
-====== TXT — Aliases and Reactions ======+====== Aliases and reactions (.txt format) ====== 
 + 
 +===== Local aliases ===== 
 + 
 +An alias is a shortcut to reach a room. It goes in the exit list: 
 + 
 +<code> 
 +alias->room_number 
 +</code> 
 + 
 +The player can then use the ''go alias'' command instead of the number. For example: 
 + 
 +<code> 
 +exit->
 +north->
 +</code> 
 + 
 +With a condition: 
 +<code> 
 +exit->3|object|You do not have the key!|You walk out. 
 +</code> 
 + 
 +===== Global aliases ===== 
 + 
 +Global aliases go **at the end of the file**, after the last ''*****'' and the online variables. They give access to a room from anywhere in the scenario: 
 + 
 +<code> 
 +inventory§🎒|help§❓|quit§🚪 
 +</code> 
 + 
 +Format: ''alias_name§emoji text'' 
 + 
 +===== Discord reactions ===== 
 + 
 +Reactions, the clickable emojis, can be attached to several kinds of elements. 
 + 
 +**Attaching a reaction to a room:** 
 +<code> 
 +2 room_name§🚪 
 +</code> 
 +The reaction appears when room 2 is reachable from the current room. 
 + 
 +**Attaching one to an object:** 
 +<code> 
 +hammer|crate|You open the crate: there is a hammer inside!§🔨|You take the hammer.§🛠️|The hammer looks solid!§👁️ 
 +</code> 
 +🔨 inspects the crate, 🛠️ takes the hammer, 👁️ inspects the hammer. 
 + 
 +**Attaching one to a 997 event:** 
 +<code> 
 +997|2§🔧|action|You use the tool.|No reaction... 
 +</code> 
 +The number before the ''§'' is how many times it can be used. 
 + 
 +**Attaching one to a custom action:** 
 +<code> 
 +action:door|condition§🔑|effect|You open the door.|The door is locked. 
 +</code> 
 + 
 +===== Title options ===== 
 + 
 +The scenario title can be followed by options made available through permanent reactions: 
 + 
 +^ Option ^ Effect ^ 
 +| ''refresh§🔄'' | Shows the text of the current room again | 
 +| ''inventory§🎒'' | Shows the inventory | 
 +| ''v_hp_v§❤️'' | Shows the value and description of the ''hp'' variable | 
 +| ''room_name§🗺️'' | Gives access to the ''room_name'' room from anywhere | 
 + 
 +<code> 
 +My adventure|refresh§🔄|inventory§🎒 
 +</code>
  
-Legacy aliases map typed commands or reactions to rooms and actions. In YAML, use ''choices:'', ''button:'', ''global_aliases:'' and action ''alias:''. 
en/txt/alias.1777826880.txt.gz · Dernière modification : de cyrilfiesta