PDA

View Full Version : Unity: die.value compared with die.result



Kelrugem
July 12th, 2020, 19:43
Hi :)

The last update of FGU fixed some issues related to dice mechanics. I have seen that there is now a new entry in the die table, the .value :) What is the difference to the existing .result? I see that the function total uses .value for FGU and otherwise .result as usual :)

I ask because of compatibility of my extensions. I have coded (dis)advantage effects for all possible rolls by changing the ActionsManager. Basically the idea is to double the dice pool and to compare the results (take the higher result of a pair in the case of advantage for example). To do so, I compared the .result numbers, but for FGU it is probably better to use the .value number? To cater for things like reroll in 5e in FGU? (okay, 5e is a bad example because there is already an advantage effect, but you hopefully understand what I mean)

Thanks in advance :)

Best,

Kelrugem

Moon Wizard
July 12th, 2020, 19:48
The .result is the number displayed on the die; while .value is the number used to calculate the total. For example, when using success tests (such as Shadowrun), the .result would have the d10 values to display on the dice; and the .value would contain the 0 or 1 to calculate successes.

Regards,
JPG

Kelrugem
July 12th, 2020, 19:55
The .result is the number displayed on the die; while .value is the number used to calculate the total. For example, when using success tests (such as Shadowrun), the .result would have the d10 values to display on the dice; and the .value would contain the 0 or 1 to calculate successes.

Regards,
JPG

aaah, that makes sense, thanks a lot for the explanation :) Then I should still use the .result for my code, also in FGU, I think :)

Moon Wizard
July 12th, 2020, 20:06
Yes, but if you modify the .result, then you need to set .value as well or set .value = nil.

That's the changes I've been making in the rulesets to get everything working.

Cheers,
JPG

Kelrugem
July 12th, 2020, 20:12
Yes, but if you modify the .result, then you need to set .value as well or set .value = nil.

That's the changes I've been making in the rulesets to get everything working.

Cheers,
JPG

ah, makes sense, thanks for the advice :)