en:txt:syntaxe-base
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| en:txt:syntaxe-base [2026/07/06 00:13] – maj 4.13 : modes d'interface + corrections cyrilfiesta | en:txt:syntaxe-base [2026/08/31 20:48] (Version actuelle) – Wiki : fins de pages homogènes, liens Discord retirés cyrilfiesta | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| **Language / Langue :** [[fr: | **Language / Langue :** [[fr: | ||
| - | ====== | + | ====== |
| - | The .txt format is the legacy JDR-Bot syntax. It is still supported, but new scenarios | + | < |
| + | The .txt format is the legacy JDR-Bot syntax, still supported. For new scenarios, prefer the [[en: | ||
| + | </ | ||
| - | A room is made of several | + | A .txt scenario |
| + | |||
| + | ===== General structure ===== | ||
| + | |||
| + | < | ||
| + | Scenario title | ||
| + | Number of rooms | ||
| + | 1 room_name_1 | ||
| + | Text of room 1 | ||
| + | | | ||
| + | 2 | ||
| + | exit-> | ||
| + | *************** | ||
| + | 2 room_name_2 | ||
| + | Text of room 2 | ||
| + | | | ||
| + | 999|You win! | ||
| + | *************** | ||
| + | </ | ||
| + | |||
| + | ===== Each block in detail ===== | ||
| + | |||
| + | **Line 1 - Scenario title** | ||
| + | |||
| + | The title is shown when the game starts. It may be followed by options separated with " | ||
| + | ⚠ Do not use " | ||
| + | |||
| + | **Line 2 - Number of rooms** | ||
| + | |||
| + | The total number | ||
| + | |||
| + | **Room blocks** | ||
| + | |||
| + | Each room is made of **exactly 4 lines**, in this order: | ||
| + | |||
| + | - '' | ||
| + | - Text shown to the player (may be '' | ||
| + | - Objects / variables / states (or '' | ||
| + | - Available | ||
| + | |||
| + | Rooms are separated with '' | ||
| + | |||
| + | * **No separator before the first room.** | ||
| + | * **One separator after EVERY room, the last one included.** Without it the engine rejects the scenario: it looks for the end of the last block and runs past the end of the file. The number of '' | ||
| + | |||
| + | Whatever follows the last separator, online variables and global aliases, is not a room. | ||
| + | |||
| + | ===== Available exits ===== | ||
| + | |||
| + | ^ Syntax ^ Effect ^ | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | |||
| + | ===== Ending examples ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | < | ||
| + | 999|Congratulations! You solved the escape game! | ||
| + | 998|Game over. The dungeon got the better of you... | ||
| + | </ | ||
| + | |||
| + | ===== Testing your scenario ===== | ||
| + | |||
| + | To start your scenario on the Discord bot: | ||
| + | |||
| + | < | ||
| + | play https:// | ||
| + | </ | ||
| + | |||
| + | Or, if you have set a base URL: | ||
| + | |||
| + | < | ||
| + | play scenario_name | ||
| + | </ | ||
| - | Use the existing examples and the linter when maintaining legacy scenarios. | ||
en/txt/syntaxe-base.1783289583.txt.gz · Dernière modification : de cyrilfiesta
