Rolling 2 different dice?

I want a button to roll a d6 and a d8 and give me both results. I thought I could create 2 hidden dice and put them in an action, but since you can only trigger 1 hotkey, it doesn’t work. I can add them after the report, but the first roll doesn’t happen so I just get a 1 and 1.

Look at the ‘Burning Banners’ module. The shown unit rolls 2 black (d8) and 2 white (d6) dice. There may be a simpler way. But a prototype for each possible combination was created. The prototype has a trigger Action command to roll the requisite number and type of dice.

How does the attack get triggered? I see that if I click ctrl-1, it rolls the dice. Is there another mechanism for initiating?

Here’s a de minimis example module showing one method: One-click D6 and D8 roll

There are two dice buttons: a D6 dice button and a D8 dice button. Each has a hotkey defined. Then there’s an Action Button that sends those hotkeys one after the other so that each dice button executes.

That’s the simplest way of driving toolbar buttons from a different toolbar button.

You can also initiate the rolls from a game piece, which is what the screenshots from the earlier module demonstrate. Remember that to have game pieces make non-piece components (like toolbar buttons) execute, the source piece must employ a Global Hotkey piece trait, not a Global Key Command.

Thanks. That’s what I originally had but I wanted to combine the output on a single line: “Rodzilla68 rolled a 3 and a 5” for example. Or maybe even get fancy and also sum them? “Rodzilla68 rolled a 3+5=8” The problem is the report from the action button happens before the multiple hotkeys are invoked. Also, I have the Burning Banners module, but I don’t see any right-click actions to roll dice even though I see all of the prototype stuff defined.

OK, upload a new version of the file (same link) that includes one-line output by using another Action Button to execute after calling the dice button hotkeys.

From there it would be easy to just convert it to a BeanShell expression and include the math if you want to sum the output of each dice button and also include that.

You could completely bypass the Dice Buttons and do everything within a piece with a pair of Dynamic Properties (DP) and a bit of beanshell.

I don’t have the energy to figure out the details right now, but basically, you would create a DP for each of the die rolls, with each one having a Named Key Command that set the value to {Random(6)} or {Random(8)} (for a D6 or D8).

Then you would used a Trigger Action to call those 2 Named Key Commands and then a Report Action that displays something like {PlayerID + " rolled a " + D6 + "+" + D8 + "=" + (D6 + D8)} (assuming you named the DPs “D6” and “D8”).

Note that the Beanshell Random() function uses the exact same random number generator as the Dice Button component.

This worked! Thanks.

This is pretty cool. I need to give this some thought. Right now all of the die rolls are grouped in one menu, but I could see examples for these one-offs to be associated with specific characters. In this case, it’s magic users attempting to cast a spell. As they level up, they get to roll better dice.