Outils pour utilisateurs

Outils du site


en:yaml:options

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:options [2026/05/07 03:16] – Documentation interactions YAML cyrilfiestaen:yaml:options [2026/10/18 23:46] (Version actuelle) – Relecture 4.17 : clarifications, exemples et typographie cyrilfiesta
Ligne 3: Ligne 3:
 ====== Global Options and Scenario Header (YAML) ====== ====== Global Options and Scenario Header (YAML) ======
  
-===== Scenario Header =====+===== Scenario header =====
  
 <code yaml> <code yaml>
-title: "My Scenario · v1.0 · (v_nbparties_o_v plays)"+id: my-scenario 
 +language: en 
 +title: "My scenario"
 description: | description: |
-  Free description shown in the scenario catalogue +  Description shown in the catalogue and standalone export. 
-  and in standalone export headers.+category: fiction 
 +scenario_tags: [adventure, humour]
 markdown: none markdown: none
 </code> </code>
  
-Avoid using ''|'' in the title; prefer ''·'' or ''—''.+''id:'' identifies the scenario permanently. It is required when using [[en:yaml:achievements|achievements]] or [[en:yaml:variables|persistent ''_p'' variables]]. A translation keeps the same ID when it should share progress. 
 + 
 +''language:'' is ''fr'' or ''en''. The official ''scenarios/'' and ''scripts/'' folders already determine their language without opening every file, but this key is useful for imported scenarios and custom hosting. 
 + 
 +''category:'' accepts ''fiction'', ''escape-game'', ''tutoriel'', ''exemple'' or ''divers''. ''scenario_tags:'' is a free list used by statistics and global achievements. 
 + 
 +Do not put ''<nowiki>|</nowiki>'' in the title: it is used as a separator in catalogue entries.
  
 ===== markdown: ===== ===== markdown: =====
  
 ^ Value ^ Rendering ^ ^ Value ^ Rendering ^
-| ''fix'' | Monospace block. | +| ''fix'' | Monospace block | 
-| ''none'' | Plain text. | +| ''none'' | Normal text with inline formatting | 
-| ''bold'' / ''italic'' / ''quote'' | Global style. | +| ''bold'' / ''italic'' / ''quote'' | Global style | 
-| ''story'' | Enables semantic story blocks. | +| ''story'' | Story blocks | 
-| ''py'' / ''yaml'' / ''js'' / ... | Highlighted code block. |+| ''py'' / ''yaml'' / ''js'' / ... | Highlighted code block |
  
-===== Global Text Style =====+===== Global text style =====
  
 <code yaml> <code yaml>
Ligne 33: Ligne 42:
 </code> </code>
  
-===== options: Permanent Toolbar Buttons =====+These values are the default for Web and Desktop text. Individual rooms may override them. 
 + 
 +===== options: - permanent buttons =====
  
 <code yaml> <code yaml>
 options: options:
   refresh: "Refresh"   refresh: "Refresh"
-  inventory: "Bag" +  inventory: "Inventory" 
-  previous: "Back"+  previous: "Previous"
   v_score_v: "Score"   v_score_v: "Score"
   home: "Home"   home: "Home"
 +  url1: "https://cyril-fiesta.fr/jdr-bot-wiki/|Wiki"
 </code> </code>
  
 ^ Key ^ Effect ^ ^ Key ^ Effect ^
-| ''refresh'' | Redisplay current room. | +| ''refresh'' | Redisplay the current room | 
-| ''inventory'' | Show inventory. | +| ''inventory'' | Show the inventory | 
-| ''previous'' | Go back to previous room. | +| ''previous'' | Return to the previous room | 
-| ''v_name_v'' | Display variable value and description. | +| ''v_name_v'' | Show a variable value and description | 
-| ''room_id'' | Direct access to a room. |+| ''room_id'' | Provide direct access to a room | 
 +| ''urlN'' | Open the link placed before the ''<nowiki>|</nowiki>'' character |
  
-===== External Links =====+If a key points to an object or piece of furniture in the current room instead of a room, JDR-Bot automatically examines it.
  
-<code yaml> +===== Global variables =====
-options: +
-  url1: "https://cyril-fiesta.fr/jdr-bot-wiki/|Wiki" +
-  url2: "https://discord.gg/jdrbot|Discord" +
-</code>+
  
-===== Fallback Examine ===== +''vars:'' contains numbers and ''text_vars:'' contains text. The ''_p'' and ''_o'' suffixes determine persistence. ''online_vars:'' remains compatible but is no longer recommended. See [[en:yaml:variables|Variables]].
- +
-If an option key points to an object or furniture name in the current room, the engine triggers ''examine'' on it instead of room navigation.+
  
 ===== global_events_order: ===== ===== global_events_order: =====
 +
 +Global events are checked after local events by default. To check them first:
  
 <code yaml> <code yaml>
Ligne 69: Ligne 78:
 </code> </code>
  
-Accepted values: ''before'' or ''after''. Default: ''after''.+Accepted values are ''before'' and ''after''.
  
 +===== Direct launch URL =====
  
-===== show-type: =====+<code> 
 +https://jdr-bot.cyril-fiesta.fr/?play=scenarioname 
 +https://jdr-bot.cyril-fiesta.fr/?play=scenarioname&lang=en 
 +</code>
  
-For [[en:yaml:drag-drop|drag & drop]], ''show-type: true'' visually distinguishes source, target and mixed roles. The option can be defined at scenario level or only inside a room.+The engine looks for a folder with that name first, then a YAML file and finally a TXT file. ''lang=en'' selects the English catalogue. 
 + 
 +===== ui: - interface mode ===== 
 + 
 +''ui:'' selects ''cards'', ''fullscreen'', ''deck'' or ''phone''. It works at scenario or room level, as does ''hide_input:''. See [[en:ui:presentation|Interface modes]].
  
 <code yaml> <code yaml>
-show-type: true+ui: cards 
 +hide_input: false 
 +</code>
  
-rooms: +Phone mode adds ''phone_home:'' and ''phone_shape:''. See [[en:ui:phone|Phone mode]]. 
-  - id: workshop + 
-    show-type: true +===== show-type: ===== 
-    text: "{{key:>key}} {{door:$door}}"+ 
 +For [[en:yaml:drag-drop|drag and drop]], ''show-type: true'' distinguishes source, target and mixed elements. It may be set globally or for one room. 
 + 
 +===== Catalogue and scenario links ===== 
 + 
 +Public links use the scenario's title and description. If its description is missing, the description in ''liste_scenarios.txt'' is used as a fallback. 
 + 
 +Catalogue tags, declared in ''liste_scenarios.txt'', can be freely chosen: they appear on cards and are included in searches. Known tags keep their translations and tabs. They are separate from [[en:yaml:tags|room tags]], which add behaviour to the scenario. 
 + 
 +===== Command echo (4.17) ===== 
 + 
 +<code yaml> 
 +command_echo: false
 </code> </code>
  
 +Echo is disabled by default. ''true'' shows commands and button clicks in the game log. A room can override the global setting.
 +
 +''shortcuts:'' lists are available at the root and in rooms: see [[en:yaml:raccourcis|Keyboard, mouse and gamepad]]. Phone mode adds ''phone_auto_orientation:'': see [[en:ui:phone|Phone orientation]].
  
en/yaml/options.1778116577.txt.gz · Dernière modification : de cyrilfiesta