TabletopTools icon indicating copy to clipboard operation
TabletopTools copied to clipboard

Create named, complex dice rolls

Open magnus-ISU opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. When playing a game, it's unlikely I need to change the kinds of dice I'm rolling. I might roll 1d20+8 to hit and 2d6+1 for damage every time I want to attack, for example.

Also, sliders are inferior to typing in an equation like 3d6+4.

Describe the solution you'd like A separate page to Dices (maybe actions?) where a persistent user-created list of actions is created. Each action is an equation like the above which you type in, which is parsed when you tap it to roll all the dice and print the output on the right of the action.

A super cool feature would be to have multiple rolls be part of a single dice roll, like 1d20+8, 2d6+1 would roll both equations. But I don't think that's necessary for this to be better than the current thing this app offers.

This is a great way to roll those d69s too without having to add an explicit button for every weird thing a person wants.

Describe alternatives you've considered At the bottom of the dices screen a single textbox which accepts an equation (like 5d7 - 1d8 + 4) which isn't persistent but will be rolled when you press it.

Additional context A pretty simple math parser is here: https://stackoverflow.com/questions/3422673/how-to-evaluate-a-math-expression-given-in-string-form/26227947#26227947I

You could make d an operator with highest precedence. That would even allow (3d6)d8 which would be neat.

magnus-ISU avatar Aug 22 '22 15:08 magnus-ISU

Seems like a valid request. There could be a second tab on the dices screen that contains this feature.

mueller-ma avatar Aug 30 '22 15:08 mueller-ma