crnormand / gurps

Implementing a GURPS 4e game aid for Foundry VTT
MIT License
105 stars 50 forks source link

[Feature Request] Add manual rolling option to buttons #861

Closed JamesManningR closed 3 years ago

JamesManningR commented 3 years ago

I wanted to be able to use my IRL dice for the rolling, and then enter this into an input and have Foundary do all of the Math to arrive at the final result.

I think this would be awesome to newcomers like me, who wants to run a campaign but wants to focus on creating interesting reactions while not getting bogged down with the math... While also getting to use those really nice new IRL dice that I've bought

Enjoy the coffee!

mjeffw commented 3 years ago

What if the players clicked their skills and/or damage on the character sheets just as they do when the computer rolls for them, but instead of rolling the dice for the player, the computer prompts the player to input the roll total?

Example:

  1. Joe is attacking Orc. He has -2 for darkness and -2 for bad footing. The GM enters the two modifiers into the modifier bucket and sends it to Joe, and asks him to roll.

  2. Joe targets the Orc's neck (-5) with an All-out Attack (Determined) (+4). He adds that to the modifier bucket.

  3. Joe then clicks "Broadsword" on his character sheet. The program prompts him for his die roll. He rolls a 9 (3, 5, 1) and enters "9" into the popup dialog and hits enter.

  4. The program calculates his effective skill. Let's assume a base skill of 18. It pops up the normal chat message: "Broadsword (18): -2 : darkness, -2 : bad footing, -5 : to hit Neck, +4 AoA (Determined); New Target: 13; Rolled 9 -> Success. Made it by 4."

  5. GM asks player to roll damage.

  6. Joe clicks his broadsword's damage (1d+3 cut). Instead of rolling the dice, the program asks the player to enter his roll. Joe rolls his physical die and gets a 1 (boo!). He enters "1" and hits enter.

  7. The program calculates his total (1 + 3 = 4) and the Damage Results chat message appears to the GM.

  8. GM drags the damage to the target and drops it to affect the Orc.

  9. The program figures out and applies all the damage calculations (subtracts DR, multiplies by 1.5 for cut, applies neck location wounding modifiers.

This is the same workflow as when the program does all of the rolling; the difference is that instead of generating a roll, it asks the player who initiated the roll to provide the dice results.

Does that work?

JamesManningR commented 3 years ago

It'd definitely hit all of the bases

Pretty much outlines the kind of solution I would go for!

crnormand commented 3 years ago

We already subclass the Roll class (in the bucket app file). We did it to allow our own variables in roll calculations (@gmod, @gmodc).

I wonder if we can hook into the roll process to pop up the dialog and await the answer.

mjeffw commented 3 years ago

That's exactly the approach I intend to take.

mjeffw commented 3 years ago

So I'm closing in on implementing this ... I have a comment and a follow up question.

The comment: When the system is asked to roll dice, my code intercepts that and pops up a dialog where the roll expression (like "3d6") is displayed, and prompts the user, "What did you roll?" with a text field.

The user can type in the roll total (e.g., "12") or type in the individual die rolls separated by commas ("3, 5, 3"). The value he enters will be used as the die roll by the system.

If the user types in the total only, the code will randomly select dice values that add up to his total. In the example above, the user may have rolled 3, 5, 4 in order to get a total of 12, but the code has no way to know that. It might generate the values 4, 4, 4. These values will be displayed in the UI -- Dice So Nice will display animated dice rolling that add up to those values, if installed, and the Chat message will show the "actual roll".

Question: Does anyone care if the values shown by the system don't match the actual dice values, as long as they add up to the entered amount?

If you don't like that, you will need to always enter the comma-separated values.

JamesManningR commented 3 years ago

Yeah, I think it's fair.

If people want the numbers to display correctly, then they will have to enter all of the information.

Also great job on implementing this!