Partial Reroll
I am looking for a way to partially "reroll" a roll.
Quick example: Player rolls 2d6 (a 2 and a 5) and wants reroll the 2 keeping the 5, to hopefully get a better result.
Does anyone know how to do this or point me to a system that already implements such mechanics?
So far neither the docs nor experimentation have proven fruitful.
6 Replies
Core roller has the ability to do
2d6r<3
which will reroll any numbers less than 3
Or ro
to do it only onceMaybe I wasn't clear enough.
I want to take an already evaluated Roll (in my example 2d6 = [2,5]) and reroll only part of it.
This will be triggered by player interaction, not through automation.
The L5R system uses a system with iterative rerolls. You could check how they did it; I suspect that they delete the original chat message and create a new one with the new result. IIRC the
Roll
class can instantiate from a set of known results, so you can probably do something like:
- Roll the new dice separately
- Create a result set with the original roll minus rerolled dice plus new roll
- Instantiate a new Roll with that result
Lancer does something similar for crits, feel free to take inspiration from there. https://github.com/Eranziel/foundryvtt-lancer/blob/45ef4b32bf9f5c1a9be40ad7855a891080a6f4d7/src/module/macros/attack.ts#L638
(Crit damage is "roll twice as many dice as normal and take the best set", but RAW it should reuse the damage dice for any non-crit hits in the same attack.)Thanks for the pointers, I'll have a look
Fallout and Achtung Cthulhu have that
Both are 2d20 systems
We are doing this in Trinites system.
The player can click on dice in chat to reroll the dice. Yes you need to update the Roll with new dice and update the chat message