Open dbavirt opened 1 year ago
I have implemented a fix for this that works for (probably) all dice rolls. What's the process for pushing it so that everyone can use it?
@George1044 setup a PR that can be reviewed and then approved. Would you mind sharing the solution here?
I have implemented a fix for this that works for (probably) all dice rolls. What's the process for pushing it so that everyone can use it?
Awesome! Can you create a pull request for that? Was quite the annoying bug!
Done I have setup a PR #493 .
The issue was related to relying on having DiceTerms be on the top-level term
s of the initial Roll, whereas PF2e (or maybe other systems as well) have much more complicated data structures. For example, PF2e creates nested ArithmeticExpression
s where each expression combines two terms (dice and number or two dice or dice and ArithmeticExpression etc.). I solved it by running a recursive function through the roll's terms to find any `DiceTerm
s and adding a rollPrompt
to these dice.
There was also an issue with how the terms were being evaluated, where it was also only evaluating the top-level term
, so I, through the same recursive function, added all RollTerm
s to be evaluated as well.
The core solution lies here: https://github.com/flamewave000/dragonflagon-fvtt/blob/527ad9cc64388d4e8ca291e1d435d54e2a210f44/df-manual-rolls/src/ManualRolls.ts#L39-L58
Notable that DF Manual Rolls 2.4.0 shows a warning that last verified version is 10.288. I'm using Foundry 11 build 307 and Pathfinder2e 5.3.2.
Module DF Manual Rolls 2.4.0
Describe the issue Clicking damage or critical buttons in chat does not prompt for manual roll.
When PF2e Target Damage module is enabled, clicking damage or critical buttons in chat does nothing for melee strikes if manual rolls are enabled. Workaround: disable manual rolling, click the required button, re-enable manual rolling.
To Reproduce Steps to reproduce the behavior:
Expected behavior Manual roll prompt should be displayed when rolling for damage.