While doing some UI work, I fell down the rabbit hole of rolling dice and, as part of the push to alpha, stayed with it until it was complete.
- The user can now add an arbitrary number of dice and type to the dice pool.
- The dice can either add to, subtract from, multiply, or divide the total.
- Dice can be rolled by entering as text with supported math, e.g. “2d6 + 1d8″
- Dice values and the total of the roll are displayed on screen.
- Dice text fades after a set time (currently 5 seconds, which feels longer than it is).
- Dice are cleared when new dice are rolled.
At the moment, the dice macros are not saved anywhere and only math operators on die rolls are supported. E.g. “1d6 + 1d10″ works, but “1d6 + 3″ doesn’t.
Also, the order of operations are the order in which the dice are added to the pool. There’s no support for parentheses.
Adding these additional features is not difficult, but it isn’t trivial. They’ll be coming along as more features reach the alpha stage.