#398 Sum dice rolls and allow a modifier for dice rolls

open
nobody
5
2012-09-06
2009-05-07
Brian G. Merrell
No

It would be nice allow modifiers to be used for dice rolls in the Games plugin. For example, it would be useful to be able to use commands like @dice 1d20+4 or @dice 2d6-3. This sort of dice rolling is especially useful for role-playing games.

I also think it would be nicer to print the sum of the dice rolls for the user (in addition to the individual rolls) when multiple dice are rolled. For example, currently @dice 3d6 prints something like "1, 4, and 3". However, I think it would be more helpful to print something like "8 (1, 4, and 3); this makes it easier for the user to quickly determine what the actually rolled. Additionally, the modifier should be printed if it is used. For example, the output for @dice 3d6+2 would be something like "10 (1, 4, and 3 with a modifier of 2).

I am attaching a proposed patch. Someone may want to change the wording of formatting of the reply. There is probably a slicker way to code the formatting of the reply.

I guess I should have broken this down into two bugs, but the patch takes care of both issues. Hopefully it doesn't make anyone too angry :)

Discussion