Dice Roller
Posted: Mon Apr 19, 2010 3:34 pm
Rolling dice in a post
Posts and private messages can now include dice rolls. Using the [dice]...[/dice] or [bash]...[/bash] tags you can specify one or more rolls to be displayed in your message.
To make a BASH roll, the format is:
[ bash="Label" ]3,-2,5[ /bash ] (without the spaces around the brackets). The label is optional. Between the start and end tags, you need to enter the BASH multiplier, dice modifier, and result modifier in that order separated by commas.
Here is what that example of 3,-2,5 will look like:
[bash]3,-2,5 = 1946515322 [/bash]
You can ignore any trailing zeroes, so if you have a Brawn of 3 and just want to roll your soak, you can just do [ bash ]3[ / bash ] and it will assume a 0 dice modifier and a 0 result modifier. Similarly, if your roll is a 4 multiplier with a -2 dice modifier, you can do [ bash ]4,-2[ /bash ] and it will assume a 0 result modifier. Note that the roller automatically detects doubles and implements exploding dice as per the BASH! rules so most rolls should be a one-and-done..
Oh, and just to be clear: The original Dice roller is still there, so if you want to roll your own 2d6, or other dice like a d4, d8, etc. you can still do so as follows):
Dice Command Syntax:
* [dice](Dice Strings)[/dice]
The Dice String parameter can include multiple dice strings in the standard throw syntax.
Throw Syntax:
* (Number of Dice)d(Type of Dice)
* (Number of Dice)d(Type of Dice)(+,-,x,*,/)(Modifier)
It may look complicated if you've never seen this system before, but it is actually quite easy to understand.
Optionally, you can specify an operation and modifier for each throw, as shown above. Supported operations are addition (+), subtraction (-), multiplication (* or x), and division (/).
Some Examples:
* d6 - Throw a single 6-sided die.
* d20 - Throw a single 20-sided die.
* 2d6 - Throw two 6-sided dice.
* d100 - Somewhat special, throws two 10 sided die, and multiplies one by 10.. resulting in a range of 100
* d20+5 - Throw a 20-sided die and add 5 to the result.
* 4d20+10 - Throw four 20-sided dice and add 10 to the total.
Hopefully this should make sense, after you try it a few times it's easy to use.
Output Examples:
Here are a few instances of the 'Die' code in action, with the code above.
Totals are provided for convience, but obviously are not relevant to all throws.
[dice]d20 = 1955975121 = Fixed[/dice]
[dice]2d20+10 = 618962274 [/dice]
[dice]4d4+10 3d6x2 2d100 4d4+10 = 646157619 [/dice]
In case you are wondering, the numbers you see when you 'preview' will change when you go to post. If your post is edited after the roll is generated and posted, it will provide a warning that there my have been modification attempts on the results.
Dice Mod (version 1.1.0) by Jeff Leigh.
Bash Mod (version 1.0.0) by Lindharin
Posts and private messages can now include dice rolls. Using the [dice]...[/dice] or [bash]...[/bash] tags you can specify one or more rolls to be displayed in your message.
To make a BASH roll, the format is:
[ bash="Label" ]3,-2,5[ /bash ] (without the spaces around the brackets). The label is optional. Between the start and end tags, you need to enter the BASH multiplier, dice modifier, and result modifier in that order separated by commas.
Here is what that example of 3,-2,5 will look like:
[bash]3,-2,5 = 1946515322 [/bash]
You can ignore any trailing zeroes, so if you have a Brawn of 3 and just want to roll your soak, you can just do [ bash ]3[ / bash ] and it will assume a 0 dice modifier and a 0 result modifier. Similarly, if your roll is a 4 multiplier with a -2 dice modifier, you can do [ bash ]4,-2[ /bash ] and it will assume a 0 result modifier. Note that the roller automatically detects doubles and implements exploding dice as per the BASH! rules so most rolls should be a one-and-done..
Oh, and just to be clear: The original Dice roller is still there, so if you want to roll your own 2d6, or other dice like a d4, d8, etc. you can still do so as follows):
Dice Command Syntax:
* [dice](Dice Strings)[/dice]
The Dice String parameter can include multiple dice strings in the standard throw syntax.
Throw Syntax:
* (Number of Dice)d(Type of Dice)
* (Number of Dice)d(Type of Dice)(+,-,x,*,/)(Modifier)
It may look complicated if you've never seen this system before, but it is actually quite easy to understand.
Optionally, you can specify an operation and modifier for each throw, as shown above. Supported operations are addition (+), subtraction (-), multiplication (* or x), and division (/).
Some Examples:
* d6 - Throw a single 6-sided die.
* d20 - Throw a single 20-sided die.
* 2d6 - Throw two 6-sided dice.
* d100 - Somewhat special, throws two 10 sided die, and multiplies one by 10.. resulting in a range of 100
* d20+5 - Throw a 20-sided die and add 5 to the result.
* 4d20+10 - Throw four 20-sided dice and add 10 to the total.
Hopefully this should make sense, after you try it a few times it's easy to use.
Output Examples:
Here are a few instances of the 'Die' code in action, with the code above.
Totals are provided for convience, but obviously are not relevant to all throws.
Code: Select all
[dice]d20[/dice]
Code: Select all
[dice]2d20+10[/dice]
Code: Select all
[dice]4d4+10 3d6x2 2d100 4d4+10[/dice]
In case you are wondering, the numbers you see when you 'preview' will change when you go to post. If your post is edited after the roll is generated and posted, it will provide a warning that there my have been modification attempts on the results.
Dice Mod (version 1.1.0) by Jeff Leigh.
Bash Mod (version 1.0.0) by Lindharin