Recent site activity

Features‎ > ‎

Dice Roll Messages/Formulas

The Dice Roll Message Page

There are a number of ways to use dice roll formulas. The first and most obvious way is for GMs to use the "Dice Roll" message feature.

This message type is only available to Game Masters however the formulas can actually be used throughout the site. The dice message window makes it easy to put together a dice roll formula for the first time but you still need to know how to put together a formula manually to really get the full benefit.
The new dice roll message window shown here is actually old and hasn't been updated with all the features that are actually available to dice roll formulas.


Some other things to know about dice roll formulas:
  • All dice roll results can be manipulated!
    • You can do this by creating a new game message with a dice roll formula in it and then editing the message.
  • You don't need to use the 'New Dice Roll Message' page to create dice rolls. You can just enter the formula you want into any game message and it will be calculated.
  • As of right now, dice roll formulas
  • Dice roll formulas do not work in the live game lobby chat or the OOC chat in the games themselves. They only work in game messages at the moment.
 


    Understanding Dice Roll Formulas

    First, dice roll formulas MUST be surrounded by double curly brackets "{{ }}" or the system will not calculate the formula.

    For example:
    If you wrote a message that contains {{1D6}}, then when you hit the submit button, the system will calculate it to look like 
    -[ 2 = 2.0]-


    If you hover your mouse over the resulting roll, you will see the original formula!

    It can be very important to see the original formula so you can check to make sure no mistakes have been made.

    There are a number of dice roll "commands" that can be used to get the formula just right. We will start with the most standard and move to more complicated.

    Standard Dice (#d#)

    This is the most standard command of the dice roll formula. Specifying 1d6 indicates a single 6 sided dice roll. The result will be a number from 1 to 6 (inclusive). Specifying 10d4 will roll ten 4 sided dice. Each individual roll will be shown in the resulting formula (with the result tallied up at the end).
    Here is an example:
    {{5D10}}
    results in..
    -[ 5+1+1+6+3 = 16.0]-

    Random Ranges (#to#)

    Use this to simply specify a range for a random number. Specifying 1to100 will pick a random number from 1 to 100 (inclusive). Please not that negative numbers are not supported. If you wish the result to include negative numbers, simply subtract from the original range, see the Standard Math section for details.
    Here is an example...
    {{1to100}}
    results in...
    -[ 19 = 19.0]-

    Standard Math (Adding, Subtracting, Multiplying, Dividing and Brackets)

    In addition to random number rolls, you may also include basic maths into your formulas.
    Here is an example...
    {{1d6+10*2}}
    results in...
    -[ 4+10*2 = 24.0]-

    As you can see from the above example, the 10*2 was done first and then 4 was added after following basic mathematic rules. Multiplication and division is done first before subtraction and addition (BEDMAS). If you wish, you may also use braces (brackets) to force the math solver to solve certain parts of the formula first.
    Here is an example...
    {{(1d6+10)*2}}
    results in...
    -[ (4+2)*10 = 60.0]-

    You can see from the above formula that the 4+2 was solved first before it was multiplied by 10. The only difference between the two formulas was the addition of the braces (brackets).

    Drop lowest/highest dice rolls

    Certain rolls require that the lowest or highest dice rolls are dropped. For example, you might need to roll five 6 sided dice but remove the lowest dice out of the 5. This can be expressed in a formulas as 5d6dl1 (which translates to five 6 sided dice, drop lowest 1). If you needed to roll ten 4 sided dice and drop the highest 3, it could be expressed as 10d4dh3 (which translates to ten 4 sided dice, drop highest 3).

    Include other parameters in the formula

    When using formula in parameters, you are able to include OTHER parameters in the formula. For example, if you wanted to calculate the modifier bonus for a Strength stat (in D&D), you could use the following formula floor(((#Strength)/10)-2). Let me break it down...
    The (#Strength) will be replaced with whatever value is in the Strength parameter. So if your character has 13 strength, 13 will be put in its place.
    So the formula is then going to be (13/10)-2 which is pretty straight forward. 
    Then you can see the entire thing wrapped in a floor() which rounds the entire formula DOWN.

    Parameters also have a special feature for tallying up values from other objects. For example, lets say we have a character that is wearing a piece of armor and a shield. The armor and the shield would be placed directly under/in the character object as a child object. If both the armor and shield objects had the same parameter (EVEN if they're different object classes), they can be totaled up like this...
    (#items.AC Bonus)
    You can also add up ALL objects beneath a parent object recursively (not just the immediate children of the parent) like this...
    (#allitems.Weight)

    Players can roll too!

    Players can also include roll formulas in their messages, though they don't have access to the roll message page, they simply need to include a roll formula in their message by typing it out (like the ones shown above) and it will be calculated for them. MyRPG does not prefer to allow players to create their own roll formulas since they have the ability to modify the results.