Version :
JDR-Bot :
Scénario basique :
Advanced Scripts :
- Use Variables :
Version :
JDR-Bot :
Scénario basique :
Advanced Scripts :
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:
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 train.txt is a good example (use of nb_parties_o + win/loss counter).
Find us on the discord Make&Play