roll20

roll20 is just a library of various functions to condition text & files into roll20 macros/statements

conditionCharacters(str)Swap out characters for the code equivalent &# character.
makePrompt(promptName, choices)Takes a prompt and a table of choices, and generates a roll20 prompt string.
makeDiceRoll(numDice, diceSides, modifier, inline)Take some parameters, spit out a dice roll string.
conditionCharacters(str)Source

Swap out characters for the code equivalent &# character.

Parameters

  1. str string The string to condition.

Returns

  1. string outputStr The resultant string.
makePrompt(promptName, choices)Source

Takes a prompt and a table of choices, and generates a roll20 prompt string.

Parameters

  1. promptName string The prompt text.
  2. choices table The various choices and outputs of the choices

Returns

  1. string The resultant string.
makeDiceRoll(numDice, diceSides, modifier, inline)Source

Take some parameters, spit out a dice roll string.

Parameters

  1. numDice string How many dice to roll.
  2. diceSides string How many sides of the die.
  3. modifier string Modifier of the dice roll.
  4. inline boolean Whether or not to make it an inline dice roll.

Returns

  1. string roll The roll string that can be ran in Roll20.