Quick Guide


In order for Roll Lang to under stand when to interpret your roll use the /roll keyword or the shorthand /r. For example if you wanted to roll 1 20 sided dice. You would type /roll 1d20.


It is often helpful to give your roll some context so that others know what the numbers mean. You can always put text before the /roll keyword and it will be displayed the way you typed it but Roll Lang might be confused if you put ceirtain text after your roll for example if you entered I'm rolling 1d20 plus my modifier /roll 1d20+3 +3 is my modifier. Roll Lang would roll 1d20 and add 6. You can let Roll Lang know you are done with your roll by using a backslash \ after your roll like so I'm rolling 1d20 plus my modifier /roll 1d20+3 \ +3 is my modifier.

Inline Rolls

If you want Roll Lang to print only the result of your roll instead of using the "/roll" keyword you can wrap your roll with [[ and ]]. You can still see the formula by hovering your mouse over the result.

Inline Comments

You can put comments inside your roll by using [ and ]. Anything between these will not be interpreted by Roll Lang and will be printed in the formula. /roll 1d20 + [strength modfier]3 would display (12)+[strength modifier]3=15. Inline comments can also be used in inline rolls.


Roll Lang supports dice with at least 1 side. To roll a dice use dN where N is the number of sides. You can also roll more than one dice and sum the result using XdN where X is the number of dice. X and N must be an integer or *roll query.

Computed Dice

Computed dice come in 4 flavors

Where N and X are an integer or *roll query. You can even have dice rolls in your expressions for computed dice.

Dice Tooltips

Using the same format as an inline comment you can add a tooltip to a roll. Enter the tooltip directly after the dice roll with no spaces like so /r d12[great sword]. The tooltip will display when your mouse hovers over the section of the formula that was computed for the dice. Try it out (11great sword).

Math Operations

Roll Lang supports all of the comman math operators. They are listed below from lowest to highest precedence.

Roll Lang also supports a hand full of other math functions.

Advanced Features

Roll Queries

Roll queries take the form ?{prompt | default}. The prompt and the default can be any string of characters not including | or }. If you have more than one roll query with the same prompt then the prompt will only be displayed once and the users input for the first prompt will be used for all other roll queries with the same prompt. The default should be a valid expression but doesn't have to be. Roll queries can be used in most places.


Macros are useful when you have actions that you preform regularly. A macro is a shortcut for some input.

To use a macro from the input box enter #macro-name. If your macro's name contains spaces enter #{macro name}

To create a macro go to the macros tab.

Red box around the macros tab. The 3rd tab from the right in the sidebar.

Enter the name for your macro and the text your macro is a shortcut for.

The name can be any sequence of characters not containing }.

The text of your macro can be any text that you would put in the input box under the history tab.

The checkbox "Add to macros bar" indicates weather there should be a shortcut to your macro just below the "clear history" button on the history tab.

When you select "test macro" what ever is currently in the "macro" box will be run. You can see the results in the history tab.

The "create/update" button will save the macro. You can see all saved macros in the list below.

To edit an existing macro click on its name in the list. You will see the contents of "Macro Name" and "Macro" change to reflect the macro you selected.

Currently Macros are saved as cookies. Make sure your browser does not delete cookies each time it is closed if you want to use your macros next time.

The macros tab. Three macros are in the list. A macro named both is calling macros named attack and damage.

Dice Modifiers

Dice modifiers change how the roll is preformed or how it is displayed. Not all dice modifiers can be used on the same roll. You can only apply one of exploding, compounding, or penetrating to a roll and it must be the first modifier added.

Currently dice tooltips must come after the modifiers.


The reroll modifier can be used on its own or with any other modifier. To use the reroll modifier add rX where X is the number that should be rerolled. You can also use it with a comparison between r and X. You can also use multiple reroll modifiers like so 1d20r1r>17. This will reroll a d20 until its roll value is not 1, 18, 19, or 20. Note that 17 is not included. If you want to include 17 use greater-than or equal >= in place of =.

Formal Grammer(EBNF)

Server API