Dice, Card Game, and RPG Players, I Need Your Help!
Nov 6, 2016 18:47:15 GMT -8
jialin and T.C. like this
Post by Virgil Sovereign on Nov 6, 2016 18:47:15 GMT -8
Help Needed
Dice throwers and game players, I need your help!
As part of updating my VDice plugin to version 2.0, I plan on adding a variety of pre-configured dice, cards, stat tables, etc. A "loaded" version of the plugin will come with these presets already entered into the plugin settings. Admins can use the presets out of the box or examine them to gain a better understanding of how to add their own presets.
Ideally I'd like to include presets that showcase the full abilities of the plugin but that also have known "real world" applications in games or activities.
The presets I have thus far are:
Your Mission
The documentation below describes the many kinds of randomness that can be generated by VDice 2. Please familiarize yourself with the capabilities of the plugin and then suggest as many useful presets for dice, dice games, cards, card games, RPGs, randomly generated sets of statistics, or other kinds of random device (prize wheels, sports stats, raffles, etc.) as you can. By "useful", I mean presets that you or somebody you know might consider using. For games, please provide a link to an online resource describing the rules for the game if possible.
I can't guarantee that every preset supplied here will make it into version 2 of the plugin, but the more I get, the more likely the plugin will be of use to you and everyone.
If you're not certain if the plugin can handle a particular preset, please suggest it and I'll make the determination.
Finally, if you know a board admin who might benefit from this plugin with a particular preset, please don't hesitate to pass along a link to this thread.
Thank You
My thanks to anyone willing to help out. You rock!
Ranges
In VDice, each object inserted into post, conversation, or chatbox is called a roll or a multi-roll. Every (multi-)roll has an associated range, which is a string (series of characters) that specifies the type of randomness to generate. The range of a roll determines what kind of random objects (such as dice) to generate, how many to generate, which classes and templates to use, how to consolidate face values into outcomes, and most other parameters for the roll.
This section provides an exhaustive reference for range syntax used by users/admins to build VDice rolls ranging from basic dice to complex multi-rolls.
Ranges are case- and whitespace-insensitive, meaning that capitalization, spaces, and tabs are ignored by the VDice parser. For example, the ranges "4dh2", "4D H2", and " 4 dH2" are all equivalent. Spaces and uppercase letters can be used to make ranges easier to read, however. The examples provided in this section use a variety of styles to demonstrate this principle.
Individual Dice
Rolls
Roll Outcomes
Roll Flags
Roll Outcome Math
Multi-Rolls
Metadata
Monster Example
Dice throwers and game players, I need your help!
As part of updating my VDice plugin to version 2.0, I plan on adding a variety of pre-configured dice, cards, stat tables, etc. A "loaded" version of the plugin will come with these presets already entered into the plugin settings. Admins can use the presets out of the box or examine them to gain a better understanding of how to add their own presets.
Ideally I'd like to include presets that showcase the full abilities of the plugin but that also have known "real world" applications in games or activities.
The presets I have thus far are:
Name | Description |
coin | coin flip |
d4 | standard 4-sided die |
d6 | standard 6-sided die |
d8 | standard 8-sided die |
d10 | standard 10-sided die |
d12 | standard 12-sided die |
d20 | standard 20-sided die |
d100 | 100-sided die |
bending | Avatar Pro Bending |
star-wars | Star Wars Force and Destiny |
yahtzee | yahtzee |
poker | poker hand (5 card stud) |
dnd5-stat | Dungeons & Dragons 5e initial stats table |
pokemon-stat | Pokemon monster base statistics |
color | generate random colour |
anima-ac | Anima RPG ability check |
anima-cc | Anima RPG characteristic check |
sentence | sentence template with random fill-in-the-blanks |
Your Mission
The documentation below describes the many kinds of randomness that can be generated by VDice 2. Please familiarize yourself with the capabilities of the plugin and then suggest as many useful presets for dice, dice games, cards, card games, RPGs, randomly generated sets of statistics, or other kinds of random device (prize wheels, sports stats, raffles, etc.) as you can. By "useful", I mean presets that you or somebody you know might consider using. For games, please provide a link to an online resource describing the rules for the game if possible.
I can't guarantee that every preset supplied here will make it into version 2 of the plugin, but the more I get, the more likely the plugin will be of use to you and everyone.
If you're not certain if the plugin can handle a particular preset, please suggest it and I'll make the determination.
Finally, if you know a board admin who might benefit from this plugin with a particular preset, please don't hesitate to pass along a link to this thread.
Thank You
My thanks to anyone willing to help out. You rock!
Ranges
In VDice, each object inserted into post, conversation, or chatbox is called a roll or a multi-roll. Every (multi-)roll has an associated range, which is a string (series of characters) that specifies the type of randomness to generate. The range of a roll determines what kind of random objects (such as dice) to generate, how many to generate, which classes and templates to use, how to consolidate face values into outcomes, and most other parameters for the roll.
This section provides an exhaustive reference for range syntax used by users/admins to build VDice rolls ranging from basic dice to complex multi-rolls.
Ranges are case- and whitespace-insensitive, meaning that capitalization, spaces, and tabs are ignored by the VDice parser. For example, the ranges "4dh2", "4D H2", and " 4 dH2" are all equivalent. Spaces and uppercase letters can be used to make ranges easier to read, however. The examples provided in this section use a variety of styles to demonstrate this principle.
Individual Dice
Dice are the simplest (lowest-level) objects in VDice. At its core, each die is an object that produces a random numeric value according to a set of rules. The numeric value may represent a face value, a playing card, the index of an image, a slot on a prize wheel, etc.
Each die has an associated number of throws, which is the number of times the die is 'thrown' (used) to generate a random value. The number of times a die is thrown is not specified in the die range and can be ignored for this section.
A list of supported die ranges is:
Examples:
Each die has an associated number of throws, which is the number of times the die is 'thrown' (used) to generate a random value. The number of times a die is thrown is not specified in the die range and can be ignored for this section.
A list of supported die ranges is:
dN | N-sided die; yields values 1 to N inclusive |
uN | fudge die; yields values -N to N inclusive |
N-M | inclusive range; yields values N to M inclusive |
W1,W2,W3,... | weighted range; W's must be non-negative integers; yields value 1 with weight W1, value 2 with weight W2, value 3 with weight W3, etc.; weights of zero (0) may be omitted so long as their trailing comma remains (see examples) |
N1-M1wW1,N2-M2wW2,N3wW3 | weighted range; W's must be non-negative integers; yields values in range N1 to M1 inclusive each with weight W1, values in range N2 to M2 inclusive each with weight W2, value N3 with weight W3, etc. |
D1+D2+D3+... | sum-of-rolls; D's must be die ranges; generates a single value by rolling all D's and summing the values; this is counted as only one die, regardless of how many D's are summed; it is another type of weighted range |
Examples:
d6 | roll one 6-sided die |
u2 | roll a fudge die; yields values {-2, -1, 0, 1, 2} with equal probability |
18-26 | roll value between 18 and 26 inclusive; yields values {18, 19, 20, 21, 22, 23, 24, 25, 26} with equal probability |
0,3,0,3,0,3,0,0,0,1 | weighted roll; yields values 2, 4, and 6, each with 30% probability, and 10 with 10% probability |
,3,,3,,3,,,,1 | weighted roll; same as 0,3,0,3,0,3,0,0,0,1 |
10-20w8,30w10,50w2 | weighted roll; yields values between 10 and 20 inclusive, each with 8% probability, 30 with 10% probability, and 50 with 2% probability |
d6 + d6 + 0w19,12w1 | sum-of-rolls weighted roll; yields a value consistent with rolling i) a six-sided die, ii) a second six-sided die, and iii) a 20-sided die with '0' on every face except for one, which has a value of '12', and summing the values; equivalent to the weighted range 0,19,38,57,76,95,114,95,76,57,38,19,0,1,2,3,4,5,6,5,4,3,2,1 |
1-5 + 10w1,20w1,30w1,40w1,50w1 | sum-of-rolls weighted roll; yields {11, 12, 13, 14, 15, 21, 22, 23, 24, 25, 31, ..., 53, 54, 55} each with equal probability |
Rolls
A roll is a mid-level object in VDice. Each roll comprises i) a fixed number of dice, and, optionally, ii) rules on how to select, re-roll, and tally outcomes based on dice values, iii) flags for sorting dice and ensuring unique die values, and iv) basic mathematical operations for transforming roll outcomes.
The outcome of a roll is a numeric value associated with the roll as a whole. As with individual dice, this outcome can represent anything: a score, a statistic, the index of an image, the index of a string in a table, etc.
The most basic roll ranges simply specify how many dice are in the roll and the range(s) of those rolls. A list of basic roll ranges is:
Examples:
The outcome of a roll is a numeric value associated with the roll as a whole. As with individual dice, this outcome can represent anything: a score, a statistic, the index of an image, the index of a string in a table, etc.
The most basic roll ranges simply specify how many dice are in the roll and the range(s) of those rolls. A list of basic roll ranges is:
D | roll one die of type D; D must be a die range |
(D) | roll one die of type D; D must be a die range; parentheses are unnecessary in this case, but may provide clarification in complicated rolls |
NrollD | roll Nroll dice of type D; Nroll must be a positive integer; D must be a die range of type dN or uN |
Nroll(D) | roll Nroll dice of type D; Nroll must be a positive integer; D may be a die range of any type |
(D1;D2;D3;...) | roll dice of multiple types; D's must be die ranges; roll D1 and D2 and D3, etc.; each D is counted as one die; parentheses are not optional |
Nroll(D1;D2;D3;...) | roll dice of multiple types multiple times; Nroll must be a positive integer; D's must be die ranges; equivalent to the range (D1;D2;D3;...;D1;D2;D3;...), with the bracketed expression repeated Nroll times; if there are Nrange ranges, the roll will comprise Nroll · Nrange dice |
Examples:
d12 | roll one 12-sided die |
3d12 | roll three 12-sided dice |
3(u1) | roll three +/-1 fudge dice |
(5-10) | roll one die with range 5 to 10 inclusive |
3(5-10) | roll three dice with range 5 to 10 inclusive |
(d6; d6; u2) | roll two 6-sided dice and one +/-2 fudge die |
2(d6; d6; u2) | roll two 6-sided dice, one +/-2 fudge die, two more 6-sided dice, and one more +/-2 fudge die |
3(d6 + d6; 1w24,2w1) | roll one die whose value is the sum of two 6-sided dice, one 25-sided die with '1' on 24 faces and '2' on one face, another die whose value is the sum of two 6-sided dice, another 25-sided die with '1' on 24 faces and '2' on one face, a third die whose value is the sum of two 6-sided dice, and a third 25-sided die with '1' on 24 faces and '2' on one face |
Roll Outcomes
By default, the outcome of a roll is the sum of all die values. This behaviour can be changed by appending an outcome specifier, which changes the way dice are rolled and/or how roll outcomes are computed. Outcome specifiers do not change the number of dice that are rolled, but they may modify the number of times each die is thrown.
The majority of the ranges defined here rely on the syntax used at www.rolz.org. Outcome specifiers can be used with flags and math (see below).
A list of roll ranges with outcome specifiers is:
Examples:
The majority of the ranges defined here rely on the syntax used at www.rolz.org. Outcome specifiers can be used with flags and math (see below).
A list of roll ranges with outcome specifiers is:
R | sum die values; R must be a roll range; outcome is the sum of all die values |
RhN | sum N highest die values; R must be a roll range; N must be a positive integer; outcome is the sum of the N highest die values; if N exceeds the number of dice in the roll, the sum of all die values is returned |
RlN | sum N lowest die values; R must be a roll range; N must be a positive integer; outcome is the sum of the N lowest die values; if N exceeds the number of dice in the roll, the sum of all die values is returned |
RoN | sum N middle die values; R must be a roll range; N must be a positive integer; outcome is the sum of the N values in the middle of a list of die values sorted by magnitude. Let Ndice be the number of dice in the roll. If N exceeds Ndice, the sum of all die values is returned. If Ndice - N is odd (that is, there is no precise 'middle' of length N), the greater of the two die values equidistant from the middle is used in the sum. |
ReM | number of values exceeding M; R must be a roll range; M may be any integer; count 1 point for each die value that is greater than or equal to M; roll outcome is the total number of points |
RfM | number of values exceeding M, with penality; R must be a roll range; M may be any integer; identical to roll range ReM but also deducts 1 point from the roll outcome for each die whose value is minimal (has its lowest possible value) |
RmM | number of values exceeding M, with bonus; R must be a roll range; M may be any integer; identical to roll range ReM but also re-rolls each die whose value is maximal (has its highest possible value) and adds 1 to the roll outcome if the re-rolled value is greater than or equal to M |
RsM | number of values exceeding M, with penalty and bonus; R must be a roll range; M may be any integer; identical to roll range ReM but with the added penalty for RfM and the added bonus for RmM |
RmmN | sum die values, with re-roll; R must be a roll range; N must be a positive integer; base outcome is the sum of all die values; any die whose value is maximal (has its highest possible value) is re-rolled and its new value is added to the outcome; if the re-rolled value is also maximal, the die is re-rolled again and its new value added to the outcome, up to a maximum of N re-rolls per die |
R=M1,M2,M3,... | count specific values; R must be a roll range; M's must be integers; count 1 point for each die value equal to any of the M's in the list; roll outcome is the total number of points |
Examples:
4d6 | roll four 6-sided dice; outcome is the sum of their face values |
4d6h3 | roll four 6-sided dice; discard the lowest value (hold the three highest values) and sum |
8(50-100)l1 | roll eight dice, each yielding a value between 50 and 100 inclusive; outcome is the lowest of these |
5 u10 o3 | roll five +/- 10 fudge dice; discard the lowest and highest values; outcome is the sum of the remaining values |
5(d6 + d6) e10 | roll five dice, each one whose value is the sum of two 6-sided dice; outcome is the number of dice whose value is 10 or greater |
4d20f10 | roll four 20-sided dice; count the number of dice whose value is 10 or greater; subtract the number of dice whose value is 1; the result is the outcome |
d2m2 | flip a coin and count 1 for heads, 0 for tails; if the coin is 'heads', flip it again and count a second point if it comes up heads again; outcome is the number of points |
5(d6;d8)s5 | roll five 6-sided dice alternating with five 8-sided dice; count the number of dice whose value is 5 or greater; subtract the number of dice with value 1; re-roll any 6-sided die with value 6 and add one point for each die whose re-rolled value is 5 or greater; re-roll any 8-sided die with value 8 and add one point for each die whose re-rolled value is 5 or greater; the result is the outcome |
(d6+d6) mm2 | roll one die whose value is the sum of two 6-sided dice; if the value is 12, re-roll the die and add its value to the sum; if the re-rolled value is again 12; re-roll the die a second time and add its value to the sum; the outcome is the sum |
5d6=5 | roll five 6-sided dice; outcome is the number of 5's |
(3-8;9-12;8-12;6-8) = 6,8,12 | roll one die with value 3 to 8 inclusive, one die with value 9 to 12 inclusive, one die with value 8 to 12 inclusive; one die with value 6 to 8 inclusive; outcome is the number of dice whose value is 6, 8, or 12 |
Roll Flags
Flags are characters that can be prepended to roll ranges to change the way dice are sorted for display and/or to ensure each die in a roll has a unique value (useful, for example, for drawing cards out of a deck without replacement, choosing a set of heroes without duplicates, etc.). Flags can be used with outcome specifiers and math.
A list of roll ranges with flags is:
Examples:
A list of roll ranges with flags is:
<R | sort dice in order of increasing value; R must be a roll range, possibly with outcome specifier; causes dice in the roll to be sorted from smallest to greatest value when displayed |
>R | sort dice in order of decreasing value; R must be a roll range, possibly with outcome specifier; causes dice in the roll to be sorted from greatest to smallest value when displayed |
!R | dice must have unique values; R must be a roll range, possibly with outcome specifier; ensures each die in the roll has a unique value; may be used with > and < flags; note that uniqueness does not apply to re-rolls of the same die (that is, a die may always re-roll a value it previously rolled) |
Examples:
!< 5d52 | deal five unique playing cards out of a deck of 52, sorting them in order of rank then suit |
>6d6o4 | roll six 6-sided dice; sort in order of decreasing value; outcome is the sum of all but the highest and lowest die values |
!7d7=0 | generate a permutation of the list {1,2,3,4,5,6,7}; outcome is fixed at 0 (since the number of '0's in the list is always 0) |
Roll Outcome Math
Outcome math can be used to transform the base outcome of a roll (computed according to its outcome specifier) into a final outcome using arithmetic operations. For example, it may be useful to multiply the base outcome of a roll by 100, add 25, and clamp it at a minimum of 150. Although there are many "hidden" ways of transforming outcomes in VDice, it is sometimes useful to include the operations explicitly as part of the range itself. Range math can be used with outcome specifiers and flags.
A list of roll ranges with outcome math operations is:
Examples:
A list of roll ranges with outcome math operations is:
R+M | add constant to outcome; R must be a roll range, possibly with outcome specifier and/or flags; M must be an integer; adds M to the roll outcome |
R-M | subtract constant from outcome; R must be a roll range, possibly with outcome specifier and/or flags; M must be an integer; subtracts M from the roll outcome |
R*M | multiply outcome by constant; R must be a roll range, possibly with outcome specifier and/or flags; M must be an integer; multiplies the roll outcome by M |
R/M | divide outcome by constant; R must be a roll range, possibly with outcome specifier and/or flags; M must be a non-zero integer; divides the roll outcome by M and eliminates any fractional part |
R%M | outcome modulo constant; R must be a roll range, possibly with outcome specifier and/or flags; M must be a non-zero integer; computes the outcome modulo M |
R^M | clamp outcome to floor; R must be a roll range, possibly with outcome specifier and/or flags; M must be an integer; computes the maximum of M and the outcome |
R_M | clamp outcome to ceiling; R must be a roll range, possibly with outcome specifier and/or flags; M must be an integer; computes the minimum of M and the outcome |
R+M1-M2*M3/... | perform serial operations on outcome; operations chained together are performed in sequence from left to right; operations may appear in any order; each operation may be used any number of times; R must be a roll range, possibly with outcome specifier and/or flags; it must appear once and only once at the start of the expression |
Examples:
0-20*5 | roll one die with value between 0 and 20 inclusive; multiply result by 5; outcome is a random multiple of 5 between 0 and 100 inclusive |
(d6; d6; -5w1,0w1,5w1)+3^0 | roll two 6-sided dice and one bonus/penalty die with values -5 (penalty, 1/3 chance), 0 (neutral, 1/3 chance), and +5 (bonus, 1/3 chance); sum all die values and add 3; if resulting value is less than 0, clamp it to 0; outcome is the result |
< 10d20h8 /10 *10 ^10 _100 | roll ten 20-sided dice; sort dice in order of ascending value; discard the lowest two values (hold the highest eight) and sum the remaining values; round down to the nearest multiple of 10; clamp the resulting value to the range 10-100; outcome is the result |
d2mm50-1/2 | repeatedly toss a single coin (up to 50 times) as long as it continues to come up 'heads'; outcome is the total number of heads |
Multi-Rolls
Sometimes a single roll isn't enough. For instance, a user/admin may wish to insert a table of statistics with each statistic generated according to a roll, or may wish to roll multiple sets of dice conditionally based on the outcomes of previous sets.
The most complex (highest-level) object in VDice--the object that is inserted by the user--is a multi-roll. A multi-roll may comprise one roll, or multiple rolls, or chains of rolls that occur conditionally, or combinations of conditional and unconditional rolls. Multi-rolls can also be used to generate more sophisticated random tools such as slot machines, etc.
A list of supported multi-roll ranges is:
Examples:
The most complex (highest-level) object in VDice--the object that is inserted by the user--is a multi-roll. A multi-roll may comprise one roll, or multiple rolls, or chains of rolls that occur conditionally, or combinations of conditional and unconditional rolls. Multi-rolls can also be used to generate more sophisticated random tools such as slot machines, etc.
A list of supported multi-roll ranges is:
R | one roll; R must be a roll range, possibly with outcome specifier, flags, and/or math; performs roll R |
NrollxR | Nroll rolls; R must be a roll range, possibly with outcome specifier, flags, and/or math; Nroll must be a positive integer; performs roll R Nroll times |
R1>=M?R2 | greater-than-or-equal-to conditional second roll; R's must be roll ranges, possibly with outcome specifiers, flags, and/or math; M must be an integer; performs roll R1; if the roll outcome (after math) is greater than or equal to M, perform roll R2; if not, do not perform roll R2 |
R1<=M?R2 | less-than-or-equal-to conditional second roll; R's must be roll ranges, possibly with outcome specifiers, flags, and/or math; M must be an integer; performs roll R1; if the roll outcome (after math) is less than or equal to M, perform roll R2; if not, do not perform roll R2 |
R1=M1,M2,M3,...?R2 | equal-to conditional second roll; R's must be roll ranges, possibly with outcome specifiers, flags, and/or math; M's must be integers; performs roll R1; if the roll outcome (after math) is equal to any of the M's in the list, perform roll R2; if not, do not perform roll R2 |
R1>=M1?R2<=M2?R3=M3?... | chain of conditional rolls; R's must be roll ranges, possibly with outcome specifiers, flags, and/or math; M's must be integers; performs roll R1; performs roll R2 conditionally on the outcome of roll R1; performs roll R3 conditionally on the outcome of R2 if (and only if) roll R2 was rolled; etc.; the conditions separating the rolls (<=, >=, =) do not need to be the same |
NrollxR1>=M?R2 | chain of conditional rolls; R's must be roll ranges, possibly with outcome specifiers, flags, and/or math; M must be an integer; Nroll must be a positive integer; equivalent to the multi-roll R1>=M?R1>=M?R1>=M?...?R2 with the R1>=M? portion repeated Nroll times; also works for <= and = conditional rolls |
R1;R2;R3;... | (multi-)rolls of multiple types; R's must be multi-rolls or roll ranges, possibly with outcome specifiers, flags, and/or math; performs (multi-)roll R1 and (multi-)roll R2 and (multi-)roll R3, etc. |
Examples:
6x <4d10h3 | roll six times; each roll comprises four 10-sided dice; the outcome of each roll is the sum of the three largest die values; dice in each roll are sorted in order of increasing value |
2d6 = 12? 2d6 = 12? 2d6 | roll two 6-sided dice; if the dice values sum to 12, roll a second pair of 6-sided dice; if the dice values again sum to 12; roll a third pair of 6-sided dice |
2x 2d6 = 12? 2d6 | equivalent to 2d6 = 12? 2d6 = 12? 2d6 |
d100; d21+9; !3d15 | roll one 100-sided die; also roll a 21-sided die and add 9 to its value (equivalent to the range 10-30); also roll three 15-sided dice and ensure each die has a unique value |
2 x 3(d8; u2); 6d6e4 + 2 >= 5? 3(d8; u2) | roll two sets of six dice, with each set comprising three 8-sided dice and three +/-2 fudge dice; also roll six 6-sided dice, count the number of values greater than or equal to 4, and add 2 to the count; if the count is greater than or equal to 5, roll a third set of three 8-sided dice and three +/-2 fudge dice |
50x d2mm50-1/2 <= 3? 1d2 | run coin flipping trials; one trial consists of repeatedly tossing a single coin (up to 50 times) as long as it continues to come up 'heads', and counting the total number of heads; continue to run new trials (up to 50 times) with new coins as long as the outcome of each trial is less than or equal to 3; if all 50 trials complete, flip one more coin |
Metadata
VDice 2 constructs dice, rolls, and multi-rolls using HTML and text templates whose syntax is an extension of the Proboards template syntax. Among other things, these templates have access to the range of a roll, which may include any metadata the user/admin wishes to "pass in" to the template. For example, metadata might include the name of a special image set to use, or the name of a monster to place in the ${name} token of a template, etc.
VDice accommodates metadata by ignoring everything that appears before the last colon (:) in a range when parsing the range.
Formally:
Example:
VDice accommodates metadata by ignoring everything that appears before the last colon (:) in a range when parsing the range.
Formally:
data:R | attach metadata to (multi-)roll; R must be a roll or multi-roll; data may be anything; it is ignored by the range parser |
Example:
red-6-apocalypscion:3-6w20,7-8w5,9-10w1 * 15 | contains metadata "red-6-apocalypscion"; roll range parsed is 3-6w20,7-8w5,9-10w1 * 15, which yields values {45, 60, 75, 90} each with probability 5/23, values 105 and 120 with probability 5/92, and values 135 and 150 with probability 1/92 |
Monster Example
The following is an example of a monster VDice range (as in monstrously complicated) to tie together the many concepts introduced in this section. If your game or application actually requires rolls this complicated, you should probably consider simplifying it.
Range:
axe2209:Axe of Trogdor:14
The admin appears to be using this data to include an item ID ("axe2209"), an item name ("Axe of Trogdor") and item category code ("14") in the range.
The remaining range is:
1. 4x 3(1-3; 2-4w2,5w5)l3/3 = 1,2? d1+9
2. 2x 4(d8+u6; d2+d2+d2)mm4 +1%12
3. <4d18o2 >= 20? !(u10; u8; -30--1) h1^-5 <= 6? 3,,1,,1,2,8,16,,,2*5
The parser expands the 4x quantifier in (1), making it:
1.
2.1. 4(d8+u6; d2+d2+d2)mm4 %12+1
2.2. 4(d8+u6; d2+d2+d2)mm4 %12+1
Hence there are two chains of rolls ((1) and (3)) and two unconditional rolls ((2.1) and (2.2)) in total.
For (1), the initial roll comprises three sets of two dice each, making six dice total. Three of these dice are standard 3-sided dice (generating values {1,2,3} with equal probability. The other three dice are weighted dice that generate values: 2 with probability 2/11, 3 with probability 2/11, 4 with probability 2/11, and 5 with probability 5/11.
These six dice are rolled and the highest three values are discarded (the lowest three are held). The values of the three dice that are held are summed and divided by 3, and any fractional part is eliminated. This yields the outcome for the roll.
If (and only if) the outcome is equal to 1 or 2, another set of six dice, identical to the first, is also rolled. If the same condition is true for the outcome of this second roll, a third set of dice is rolled. This happens as many as four times. If the outcome of the fourth roll also meets the condition, one 1-sided die (yielding a fixed value of 1) is rolled and 9 is added to its face value, yielding a fixed outcome of 10 for the final roll in the chain.
For both (2.1) and (2.2), the roll comprises four sets of two dice each, making eight dice total. Four of these dice are weighted dice whose value is equivalent to rolling a standard 8-sided die, rolling a +/-6 fudge die, and summing together the results. The other four dice are weighted dice whose value is equivalent to rolling three 2-sided dice and adding together their face values (explicitly: a value of 3 with probability 1/8, 4 with probability 3/8, 5 with probability 3/8, and 6 with probability 1/8).
These eight dice are rolled and their values are summed. For any die showing its maximum value (14 for the former dice, and 6 for the latter), this die is re-rolled and its new value is also added to the sum. If the new value is also maximal, the die is re-rolled again, up to 4 times total.
After all of the re-rolls are complete, the final sum is aliased to the range 1-12 by applying a modulo-12 operation and then incrementing the result by 1, which is the final outcome for the roll.
For (3), the first roll in the chain comprises four standard 18-sided dice. These dice are sorted in order of increasing value when displayed. The dice are rolled and the highest and lowest values are discarded (the middle two values are held). The outcome of the roll is the sum of the middle two values.
If and only if the outcome is greater than or equal to 20, a second set of dice is rolled. This second set comprises one +/-10 fudge die, one +/-8 fudge die, and one die that yields values between -30 and -1 inclusive with equal probability. When these dice are rolled, VDice ensures that no two of them will have the same value.
The three dice are rolled and the two lowest values are discarded (the highest value is held). The outcome of the roll is whichever is greater: the remaining value, or -5.
If and only if the outcome of this second roll is less than or equal to 6, a third and final roll occurs. This final roll comprises only one die, which is a weighted die. The die yields a value of 1 with probability 1/11, 3 with probability 1/33, 5 with probability 1/33, 6 with probability 2/33, 7 with probability 8/33, 8 with probability 16/33, and 11 with probability 2/22. The outcome of the final roll is equal to the value of the die multiplied by 5.
Range:
axe2209:Axe of Trogdor:14:4x 3(1-3; 2-4w2,5w5)l3/3 = 1,2? d1+9; 2x 4(d8+u6; d2+d2+d2)mm4 +1%12; <4d18o2 >= 20? !(u10; u8; -30--1) h1^-5 <= 6? 3,,1,,1,2,8,16,,,2*5When parsing this range, VDice first strips off the metadata before the last colon:
axe2209:Axe of Trogdor:14
The admin appears to be using this data to include an item ID ("axe2209"), an item name ("Axe of Trogdor") and item category code ("14") in the range.
The remaining range is:
4x 3(1-3; 2-4w2,5w5)l3/3 = 1,2? d1+9; 2x 4(d8+u6; d2+d2+d2)mm4 +1%12; <4d18o2 >= 20? !(u10; u8; -30--1) h1^-5 <= 6? 3,,1,,1,2,8,16,,,2*5VDice now splits this multi-roll into its constituent rolls and conditional chains of rolls:
1. 4x 3(1-3; 2-4w2,5w5)l3/3 = 1,2? d1+9
2. 2x 4(d8+u6; d2+d2+d2)mm4 +1%12
3. <4d18o2 >= 20? !(u10; u8; -30--1) h1^-5 <= 6? 3,,1,,1,2,8,16,,,2*5
The parser expands the 4x quantifier in (1), making it:
1.
3(1-3; 2-4w2,5w5)l3/3 = 1,2 ?and expands the 2x quantifier in (2), making it
3(1-3; 2-4w2,5w5)l3/3 = 1,2 ?
3(1-3; 2-4w2,5w5)l3/3 = 1,2 ?
3(1-3; 2-4w2,5w5)l3/3 = 1,2 ? d1+9
2.1. 4(d8+u6; d2+d2+d2)mm4 %12+1
2.2. 4(d8+u6; d2+d2+d2)mm4 %12+1
Hence there are two chains of rolls ((1) and (3)) and two unconditional rolls ((2.1) and (2.2)) in total.
For (1), the initial roll comprises three sets of two dice each, making six dice total. Three of these dice are standard 3-sided dice (generating values {1,2,3} with equal probability. The other three dice are weighted dice that generate values: 2 with probability 2/11, 3 with probability 2/11, 4 with probability 2/11, and 5 with probability 5/11.
These six dice are rolled and the highest three values are discarded (the lowest three are held). The values of the three dice that are held are summed and divided by 3, and any fractional part is eliminated. This yields the outcome for the roll.
If (and only if) the outcome is equal to 1 or 2, another set of six dice, identical to the first, is also rolled. If the same condition is true for the outcome of this second roll, a third set of dice is rolled. This happens as many as four times. If the outcome of the fourth roll also meets the condition, one 1-sided die (yielding a fixed value of 1) is rolled and 9 is added to its face value, yielding a fixed outcome of 10 for the final roll in the chain.
For both (2.1) and (2.2), the roll comprises four sets of two dice each, making eight dice total. Four of these dice are weighted dice whose value is equivalent to rolling a standard 8-sided die, rolling a +/-6 fudge die, and summing together the results. The other four dice are weighted dice whose value is equivalent to rolling three 2-sided dice and adding together their face values (explicitly: a value of 3 with probability 1/8, 4 with probability 3/8, 5 with probability 3/8, and 6 with probability 1/8).
These eight dice are rolled and their values are summed. For any die showing its maximum value (14 for the former dice, and 6 for the latter), this die is re-rolled and its new value is also added to the sum. If the new value is also maximal, the die is re-rolled again, up to 4 times total.
After all of the re-rolls are complete, the final sum is aliased to the range 1-12 by applying a modulo-12 operation and then incrementing the result by 1, which is the final outcome for the roll.
For (3), the first roll in the chain comprises four standard 18-sided dice. These dice are sorted in order of increasing value when displayed. The dice are rolled and the highest and lowest values are discarded (the middle two values are held). The outcome of the roll is the sum of the middle two values.
If and only if the outcome is greater than or equal to 20, a second set of dice is rolled. This second set comprises one +/-10 fudge die, one +/-8 fudge die, and one die that yields values between -30 and -1 inclusive with equal probability. When these dice are rolled, VDice ensures that no two of them will have the same value.
The three dice are rolled and the two lowest values are discarded (the highest value is held). The outcome of the roll is whichever is greater: the remaining value, or -5.
If and only if the outcome of this second roll is less than or equal to 6, a third and final roll occurs. This final roll comprises only one die, which is a weighted die. The die yields a value of 1 with probability 1/11, 3 with probability 1/33, 5 with probability 1/33, 6 with probability 2/33, 7 with probability 8/33, 8 with probability 16/33, and 11 with probability 2/22. The outcome of the final roll is equal to the value of the die multiplied by 5.