**Language / Langue :** [[fr:yaml:options|FR]] | **EN**
====== Global Options and Scenario Header (YAML) ======
===== Scenario header =====
id: my-scenario
language: en
title: "My scenario"
description: |
Description shown in the catalogue and standalone export.
category: fiction
scenario_tags: [adventure, humour]
markdown: none
''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 ''|'' in the title: it is used as a separator in catalogue entries.
===== markdown: =====
^ Value ^ Rendering ^
| ''fix'' | Monospace block |
| ''none'' | Normal text with inline formatting |
| ''bold'' / ''italic'' / ''quote'' | Global style |
| ''story'' | Story blocks |
| ''py'' / ''yaml'' / ''js'' / ... | Highlighted code block |
===== Global text style =====
size: 18
font: Georgia
background: "#111827"
text-color: "#f5f0d8"
These values are the default for Web and Desktop text. Individual rooms may override them.
===== options: - permanent buttons =====
options:
refresh: "Refresh"
inventory: "Inventory"
previous: "Previous"
v_score_v: "Score"
home: "Home"
url1: "https://cyril-fiesta.fr/jdr-bot-wiki/|Wiki"
^ Key ^ Effect ^
| ''refresh'' | Redisplay the current room |
| ''inventory'' | Show the inventory |
| ''previous'' | Return to the previous room |
| ''v_name_v'' | Show a variable value and description |
| ''room_id'' | Provide direct access to a room |
| ''urlN'' | Open the link placed before the ''|'' character |
If a key points to an object or piece of furniture in the current room instead of a room, JDR-Bot automatically examines it.
===== Global variables =====
''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]].
===== global_events_order: =====
Global events are checked after local events by default. To check them first:
global_events_order: before
Accepted values are ''before'' and ''after''.
===== Direct launch URL =====
https://jdr-bot.cyril-fiesta.fr/?play=scenarioname
https://jdr-bot.cyril-fiesta.fr/?play=scenarioname&lang=en
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]].
ui: cards
hide_input: false
Phone mode adds ''phone_home:'' and ''phone_shape:''. See [[en:ui:phone|Phone mode]].
===== show-type: =====
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) =====
command_echo: false
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]].