PDA

View Full Version : dice help



Mikey Macabre
October 28th, 2008, 13:03
kk, i have a problem. i am working on a custom ruleset, the problem.... i need to make the bonuses on the character sheet subtract from the die roll instead of add. i cant figure it out. i could make them negative values, but it would be much simpler to change the dice rolling function. any help would be greatly appreciated.

Tenian
October 28th, 2008, 13:14
Are you using double click rolling similar to this thread (https://www.fantasygrounds.com/forums/showthread.php?t=6015)?

If so all you should have to do is multiple the bonus by -1 before sending it to d20Check. I would probably make a template for "abilitypenalty" which was identical to "abilitybonus" but reversed the sign on the second argument passed to d20Check.

Moon Wizard
October 28th, 2008, 21:15
Also, using the linkednumber template, you could create a field that calculates all the bonuses and penalties into one number. This is the template that is used for the d20 attack and save fields. While the d20 fields only add up, the subtraction operator is supported by linkednumber.

Cheers,
JPG