PDA

View Full Version : Modifier Adjustment



damned
August 16th, 2014, 07:26
Im (trying to) writing a CoreRPG based ruleset that really only includes a character sheet and theme.
When adding a modifier it applies to the very next roll.
The particular ruleset works differently and instead of applying the modifier to the Roll it should apply the modifier to the Target.
Can anyone point me in the right direction?
So at the moment if the:
Ability Score: 45
Modifier: Easy +10
Dice Roll: 40
I see the following result:
[ABILITY] Missile Skill Check [TARGET 45] [Easy +10] #FAILURE 40+10 50

I would like to see:
[ABILITY] Missile Skill Check [TARGET 45+10] [Easy +10] #SUCCESS 40 40

Moon Wizard
August 21st, 2014, 18:46
It can be complicated, depending on what you want to do.

* If it is only limited to a few rolls, then you want to register a roll type for each one in GameSystem.actions and a handler script for each roll type (i.e. ActionAttack :: manager_action_attack.lua). For that roll type, you want to make sure that bUseModStack table variable is not set. Then, in the mod handler you register (ActionsManager.registerModHandler), you would read the target number from the roll description, apply the modifier stack to the target number, and replace the target number string in the roll description. Finally, in the result handler you register (ActionsManager.registerResultHandler), you would read the target number from description, compare to roll total and output success/failure.

* If you need to apply roll modifiers in addition to target number adjustments, you will need a second modifier box; and write a new script (i.e. ModifierStack2) to manage and access it.

* If you need to apply to all rolls, not just specific rolls, you will need to have a mod/result handler for each roll type, as well as providing a "dice" mod/result handler. (I did this in Numenera ruleset for single d20 rolls.)

Hope that helps. Let me know if you have more questions.

Regards,
JPG

Paul Pratt
August 22nd, 2014, 00:20
Damned,

Look inside the 40k rule set. I had the same issue and have it working as you describe. Mods add to target not the die roll.