====== The onlines variables ======
**Online variables** are a type of variable whose value is saved, on a file on the server hosting the bot, throughout the game. The saved value is loaded at each launch of the scenario.
They are declared at the end of the scenario, after the last box (before or after the alias reactions) in the form:
Variable_o|Default_value|Description
* The name of the variable
* Must end by "_o" so that the bot will consider it as a variable to be saved/loaded (for example "nb_victories_o").
* Must be without spaces or accents
* The default value (The one that will be saved when the scenario is first launched)
* Description of the variable that will be displayed if a player examines the variable with the command "**j!look**"
You have to declare them line by line (one variable = one line in the scenario)
Then, their use is identical to the classic variables (v_variable_o_v, use with " |variable| ", etc.) and their value will be saved by the bot during the game.
By default, there is, for any scenario, the variable "**nb_parties_o**" ("parties = games or rounds in french) whose value is increased by 1 for each game of a scenario. You can thus, from the first line of your scenario, display the number of times your scenario has been played (for example "**Castle (This scenario has been played v_nb_parts_o_v)**"). Although this value can be modified in your scenario (like any other variable), it is not really interesting if you want to know the real number of times your scenario has been played (the bot increases it by 1 automatically at each play)
Textual variables can also be online and work the same way.
The french scenario [[http://cyril-fiesta.fr/jdr-bot/scenarios/train.txt|train.txt]] is a good example (use of nb_parties_o + win/loss counter).
**Find us on the [[https://discord.gg/Z63DtVV|discord Make&Play]]**