PDA

View Full Version : Custom Dice Roller total adjustments not honoured.



Valarian
October 10th, 2020, 09:01
The totals for dice rolls seem to be locked before the dice handler has been processed. Instead of the dice handler being able to adjust the dice totals, as in FG Classic, the Unity engine seems to present the totals as per the initial dice rolls.

e.g. The One Ring. The dice handler for the Weary state should ignore rolls of 1, 2, or 3 on the d6 success dice. Additionally, the "G" rune should record a total of 10 instead of 12.
This works in FG Classic, and used to work in FG Unity. The latest builds of FG Unity have broken the functionality.

Dice Screenshot:
1st roll result should show 10 instead of 12
2nd roll result should show 4 instead of 11
3rd roll result should show 14 instead of 19

Valarian
October 10th, 2020, 09:08
This is the functionality in FG Classic.

Moon Wizard
October 11th, 2020, 04:35
Can you take a look at this thread to see if it helps?
https://www.fantasygrounds.com/forums/showthread.php?62515-Porting-older-rulesets-to-FGUnity-Exploding-dice-doesn-t-sum-properly

Regards,
JPG

Valarian
October 11th, 2020, 09:02
Thanks Moon Wizard. It does help, and resolves the problem.

I've changed the value property of the dice result object as well and that has the desired effect. The dice are shown as per the original roll and the results are modified as required.

When the dice.expr is set to nil, the expression changes to show the modified dice string (i.e. d12r12+d6r5+d6r1) that is set to show the custom die images. Ideally, I want to keep the original (d12+2d6). Modifying the value and result for the dice gives me this, but is it likely to cause issues going forward?

Moon Wizard
October 11th, 2020, 22:25
If I'm understanding right; then it shouldn't be a problem. It's designed so that information passed to throwDice APIs are treated as possible rolls; but anything passed to add/deliverChatMessage is designed to just be rendered as the data is passed in.

Regards,
JPG