Outils pour utilisateurs

Outils du site


en:txt:evenements

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
en:txt:evenements [2026/05/03 18:29] – Add English wiki page using real engine keys cyrilfiestaen:txt:evenements [2026/08/31 20:47] (Version actuelle) – Wiki : fins de pages homogènes, liens Discord retirés cyrilfiesta
Ligne 1: Ligne 1:
-**Language:** [[fr:txt:evenements|Français]] | **English**+**Language / Langue :** [[fr:txt:evenements|FR]] | **EN**
  
-====== TXT — Events (997) ======+====== 997 events (.txt format) ======
  
-Legacy ''997'' entries execute conditional effectsredirectionstimers or text.+Room ''997'' in the exit list triggers an event. It can be automaticfired when the player enters the room, or manual, through a Discord reaction.
  
-YAML equivalent: use ''events:'' with ''if:'', ''do:'', ''to:'', ''timer:'' and ''text:''.+===== Basic syntax ===== 
 + 
 +<code> 
 +997|condition|action|text 
 +</code> 
 + 
 +  * ''condition'' - trigger condition (''null'' means always) 
 +  * ''action'' - what happens (see the table below) 
 +  * ''text'' - message shown (''null'' means nothing) 
 + 
 +===== Conditions ===== 
 + 
 +^ Syntax ^ Meaning ^ 
 +| ''null'' | Always triggered | 
 +| ''v_hp_v.=.0'' | If the ''hp'' variable equals 0 | 
 +| ''object'' | If the player holds the object | 
 +| ''-object'' | If the player does not hold the object | 
 +| ''v_a_v.=.v_b_v'' | Compares two variables | 
 +| ''v_a_v.=.1 v_b_v.=.2'' | Logical AND (a space between conditions) | 
 + 
 +Comparison operators are ''.=.'', ''.!=.'', ''.>.'', ''.>=.'', ''.<.'' and ''.<=.''. ''.in.'' tests a range, as in ''v_dice_v.in.1-3''
 + 
 +===== Actions ===== 
 + 
 +^ Syntax ^ Effect ^ 
 +| ''5'' | Go to room 5 | 
 +| ''v_room_v'' | Go to the room whose number is held in the variable | 
 +| ''score.+.10'' | Adds 10 to ''score''
 +| ''score.-.5'' | Subtracts 5 | 
 +| ''score.=.0'' | Sets the value | 
 +| ''score.=.%1:6'' | Random value between 1 and 6 | 
 +| ''object&&inventory&&Description'' | Adds an object to the inventory (''inventaire'' also works) | 
 +| ''-tired&&invisible&&You are not tired any more'' | Removes an invisible state | 
 +| ''name&&variable&&value&&desc'' | Changes or declares a variable | 
 + 
 +===== Multiple actions ===== 
 + 
 +Separate actions with ''@@'': 
 + 
 +<code> 
 +997|null|score.+.10@@3|You earn 10 points and move to room 3. 
 +</code> 
 + 
 +If one of the actions is a redirection (a room number), it runs last. 
 + 
 +===== Sequential behaviour ===== 
 + 
 +Several ''997'' lines in the same room are evaluated in order. Each one sees the values already changed by the previous ones. A ''997'' that redirects stops the ones after it. 
 + 
 +===== Full example ===== 
 + 
 +<code> 
 +3 dice_roll 
 +Roll the dice! Result: v_resultat_v 
 +dice|variable|%=1:6|You roll v_resultat_v!|A six-sided die. 
 +997|v_dice_v.in.1-3|1|Poor roll, you start over... 
 +997|v_dice_v.in.4-6|4|Excellent! You move on. 
 +</code>
  
en/txt/evenements.1777825799.txt.gz · Dernière modification : de cyrilfiesta