Outils pour utilisateurs

Outils du site


en:yaml:variables

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:variables [2026/10/18 22:49] – Documentation 4.17 : listes, boucles, raccourcis et editeur cyrilfiestaen:yaml:variables [2026/10/20 22:12] (Version actuelle) – Mod?les sur_place, port?e des encadr?s et objets 4.17 cyrilfiesta
Ligne 62: Ligne 62:
 ===== Online _o variables ===== ===== Online _o variables =====
  
-An ''_o'' variable is stored on the server and shared by players loading the same source. It belongs to the scenario URL or path, not to its ''id:''.+For a scenario source authorised by the server, an ''_o'' variable is shared between players. It belongs to the scenario URL or path, not to its ''id:''. Outside these sources, it stays local to the game.
  
 <code yaml> <code yaml>
Ligne 90: Ligne 90:
 ===== Free-form answers ===== ===== Free-form answers =====
  
-Add ''reply: true'' to a variable declared in the room to wait for free-form input:+In a room's ''init:'', ''reply: true'' lets the player enter a value:
  
 <code yaml> <code yaml>
-text_vars: +init: 
-  hero_name:+  - text_var: hero_name
     value: "Adventurer"     value: "Adventurer"
     reply: true     reply: true
Ligne 119: Ligne 119:
 | ''v_timer_name_v'' | Seconds left on the ''timer_name'' timer | | ''v_timer_name_v'' | Seconds left on the ''timer_name'' timer |
  
-These system names stay in French. ''v_turn_v|pad2'' pads a number with zeroes: 7 becomes 07.+The system names above also work in English scenarios. For a declared ''turn'' variable, ''v_turn_v|pad2'' displays 7 as 07.
  
 ===== A common trap ===== ===== A common trap =====
Ligne 148: Ligne 148:
  
 ''init:'' also accepts ''var: hero.health'' or ''text_var: hero.name'', with ''modifiable: true'' or ''reply: true''. These input paths must cross collections only and target an existing simple property; list indices are excluded. ''init:'' also accepts ''var: hero.health'' or ''text_var: hero.name'', with ''modifiable: true'' or ''reply: true''. These input paths must cross collections only and target an existing simple property; list indices are excluded.
 +
 +===== Describing structured data =====
 +
 +Lists, collections, properties and elements can have descriptions separate from their values, in ''data_info:'' (French: ''infos_donnees:''). ''examine hero.health'' shows the value and its description. Roots can also be bound to tags to reset their whole contents. See [[en:yaml:listes-boucles|Structured data descriptions and tags]].
 +
 +In the editor, online variables remain grouped with numbers or text according to their type. Declare an ''_o'' number in ''vars'' and an ''_o'' text variable in ''text_vars''. Historical ''vars_online'' declarations remain readable on import.
  
en/yaml/variables.1792356587.txt.gz · Dernière modification : de cyrilfiesta