mouse0270 / Beyonds-Toolbox

MIT License
22 stars 6 forks source link

Complex Dice Roller & Forum Copy functionality #20

Open kalebhermes opened 5 years ago

kalebhermes commented 5 years ago

Per this comment on the D&DBeyond Forum Thread

No, I am updating the dice roller so it will take formats like 1d20 + 4 1d12 +3 3d6 +2 and roll all of those at once instead of now where you have to click on each set. The forms roll tags, do not handle multiple dice being rolled at the same time.

I'm not sure how you were planning on implementing your solution, but one way around this problem would be to outline the results of each roll in the modal, then total them at the bottom. This would allow clicking a single roll in the modal to copy it's contents. Alternately, a solution could be implemented that copies the 'roll string' for each of the rolls as one long string.

Examples

Total All Rolls

Presented as below in the modal

1d20+4 = 12+4 = 16 <- clickable to copy [roll]1d20+4[/roll] 1d12+3 = 8+3 = 11 <- clickable to copy [roll]1d12+3[/roll] 3d6+2 = 12 + 2 = 14 <- clickable to copy [roll]3d6+2[/roll] Total = 41

Copy All At Once

Clicking 1d20 + 4 1d12 +3 3d6 +2 opens the modal and presents the result however you'd like, clicking copy copies [roll]1d20+4[/roll] [roll]1d12+3[/roll] [roll]3d6+2[/roll] to the clipboard.

mouse0270 commented 5 years ago

That is exactly what I planned on doing as soon as I finish the complex dice roller.