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
- str string The string to condition.
Returns
- string outputStr The resultant string.
- makePrompt(promptName, choices)Source
Takes a prompt and a table of choices, and generates a roll20 prompt string.
Parameters
Returns
- string The resultant string.
- makeDiceRoll(numDice, diceSides, modifier, inline)Source
Take some parameters, spit out a dice roll string.
Parameters
- numDice string How many dice to roll.
- diceSides string How many sides of the die.
- modifier string Modifier of the dice roll.
- inline boolean Whether or not to make it an inline dice roll.
Returns
- string roll The roll string that can be ran in Roll20.