You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For instance, if I use the notation d3, is there a way to set the minimum value to 0 for the DiceRoll object? This would make possible values 0, 1, 2.
My use case is such that I'm using an average value to determine which types of dice to throw. The average value is a static value based upon different character attributes, but I would like to randomize the outcome to where the roll can deviate up or down some, though statistically over time would equal the average value. For instance, if the average value is 1, I would like to throw a d3 that would have an averageTotal of 1.
I know that I could construct a bunch of StandardDice to define the min, and max values, but I really like the ability to use notations to describe the dice throws. Is there a way that one can use the DiceRoll object in this way? I also know that I could just subtract 1 from the roll, but I would rather have the roll itself just return 0's if possible.
The text was updated successfully, but these errors were encountered:
This currently isn't possible; Standard dice have a min value of 1.
As you mentioned, you could create a custom StandardDice object, and specify the min / max values manually.
Or do something like d3-1.
I am hoping to allow developers to create custom dice at some point, but it would require a fundamental re-write of how the parser works, so it's unlikely to be done any time soon.
Thinking about it, it could be useful to allow the StandardDice min value to be modified through notation, and for it to offset the sides / max value.
I think it should be fairly simple to implement, but I'd have to run some tests.
I'm not sure what the notation would be for something like that though. Any thoughts?
A couple of idea off the top of my head:
// using "db" for Dice with Base numberdb0,3// roll a 3 sided die, with a min value of `0` (0, 1, 2)db4,2// roll a 2 sided die, with a min value of `4` (4, 5)// square brackets to define a range (Same rolls as above)d[0,2]// roll a dice that has all values between 0, and 2 inclusive (0, 1, 2)d[4,5]// roll a dice that has all values between 4, 5 inclusive (4, 5)
For instance, if I use the notation
d3
, is there a way to set the minimum value to0
for theDiceRoll
object? This would make possible values0, 1, 2
.My use case is such that I'm using an average value to determine which types of dice to throw. The average value is a static value based upon different character attributes, but I would like to randomize the outcome to where the roll can deviate up or down some, though statistically over time would equal the average value. For instance, if the average value is
1
, I would like to throw ad3
that would have anaverageTotal
of 1.I know that I could construct a bunch of
StandardDice
to define themin
, andmax
values, but I really like the ability to use notations to describe the dice throws. Is there a way that one can use theDiceRoll
object in this way? I also know that I could just subtract 1 from the roll, but I would rather have the roll itself just return 0's if possible.The text was updated successfully, but these errors were encountered: