Outils pour utilisateurs

Outils du site


en:syntax

Basic syntax

The scenario is composed of blocks of information, read by the bot.

Here is a basic scenario, with 3 rooms. Each part will then be explained to you, using a color code to differentiate each block.

scenario title or description
3
1 room_name_1
Room_1 text
|
2
1->3
exit->3
3
***************
2 room_name_2
Room_2 text+n+&&
Continuation of text +n+from room 2
|
3
***************
3 room_name_3
text of &&
room_3
|
999|Game Over
***************

So the scenario starts with a TIRE, which can be followed by one (or more) of the optional options (refresh, inventory, variable or room).
These options are advanced functions, using reactions. So they will be explained to you in use of reactions

Then we have the Number of ROOMS (a room = a chapter or a passage of the scenario)
Next to the number of rooms, you can indicate a markdown for the colorization of your scenario on discord (“fix” by default)
Then, each room is broken down into several blocks (or parts):

  • Room number (in order, serves as a cue to the bots and yourself) and Room name (can replace the number for the “!”advance“” command. For example “j!advance
  • Description of the room (= text of script) with indication of different possibilities to advance, take, examine (you can also leave some things out, if it is useful for your scenario)
    • note the ” +n+ “ in the text: it indicates a line break in the displayed text
    • The ” && “ tells the bot to continue to take into account the following line as part of the text (and not the objects/states/variables block). It therefore ignores the line break present in the .txt
      • Thus the text of room 3 will be displayed in discord on a single line.
    • In summary: ”+n+“ = line break in discord, and ”+n+“ is used to space out the scenario in the text file.
      • “Continuation of text +n+ from room 2” will therefore be displayed in 2 lines on discord
  • Objects/States/Variables/etc.
    • the ”|“ tells the bot that we are not using any in this room. For a basic scenario (text and choice), we can do without it for now. Objects, states and variables will be explained in detail in the following wiki pages.
  • Rooms (or boxes) accessible with !advance[number], several possibilities:
    • Number (2 for example) ⇒ Number alone, the room is accessible without conditions
      • The conditions, allowing access or not to a room, and how to set them up will be explained in Conditions
    • Alias->direction: An alias can be assigned to a room. In the example, you see “exit→3|… ”. This allows for “j!advance exit”, which is then equivalent to “j!advance 3”. Similarly “1→3”, “j!advance 1” will lead to square 3…
      • You can specify conditions for accessing aliases. You will also see this in Conditions.
    • precedent : Allows you to make the previous room accessible (for example if you come from room 52 or “kitchen”, you can do j!avancer 52 or j!avancer cuisine).
      • We can also put conditions (required object or variable)
    • 998 or 999 ⇒ If this number is present in the list of accessible rooms, it means that the game ends (no matter if there are other accessible rooms), and displays the corresponding text. For example, you can use 998 for victory and 999 for defeat in your scenario
    • 997 ⇒ Will be detailed in the events page, allows you to perform an action (change a variable, change room, etc.) automatically if all conditions are correct (having a certain object for example) or manually via a discord reaction.
  • Finally the rooms end with ”***********“ (no matter how many *, minimum 5 in a row.), to separate it from the others.

Find us on the discord Make&Play

Discussion

Entrer votre commentaire. La syntaxe wiki est autorisée:
 
en/syntax.txt · Dernière modification: 2021/04/18 18:33 de cyrilfiesta