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.
I
Ikaguia147d ago
Core roller has the ability to do 2d6r<3 which will reroll any numbers less than 3 Or ro to do it only once
S
Shourn147d ago
Maybe 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.
E
Eranziel147d ago
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.)
S
Shourn146d ago
Thanks for the pointers, I'll have a look
H
HappySteve146d ago
Fallout and Achtung Cthulhu have that Both are 2d20 systems
K
Kristov146d ago
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
Want results from more Discord servers?
Add your server
More Posts
tiered status effectsIf I have a status effect that can come from an ability, for example, burning comes from an ability Importing an npm package into a foundry systemimport minimist from 'minimist'; That line alone when included in my module's hook file is resultin(Paid) System Dev AssistanceHello, I am developing a new game and would like to build my own game system in foundry vtt. I'm nothow to handle items and effects?I've been working on a system for a game that needs a concept that seems like it might be a good fitAdvice on the general programming model a system should followI'm brand new to foundry dev and I want to make sure I am gaining the correct understanding of the eAdvice for compendium data in a custom systemHello, i'm new here! I was wondering if I could get a little direction for storing data about my gaDialog Box Auto-Closing Upon Opening 2nd TimeI've been appending custom functionality to the simple worldbuilding system. At this time, I'm tryinActor collisionImplementing the homebrew knockback feature. It's almost working but how do I test if two actor tokeActor attributes update on player's sideI can't fathom how to make changes to actor attributes on player's side. According to documentation Sort itemsHello, I am searching for where is stored the data about "items" order, as I would like to order thNewby accepting advice on the Foundry API and Module DevelopmentHeya,im very new to Module development for foundry and im suuuuper rusty in the codding department bHow do I create/modify embedded document types?Let's say I want Items to also have Items embeddedHow do I specify an Array in my template.json?I want schema checking for elements inside of an undefined-length array in my template.json, how do Is is possible to create/change Foundry's document types?For instance, removing "Actor" and "Item" and adding new ones.ERROR: actors is not a valid embedded Document within the Token DocumentHi guys! New here, just purchased the software. Could we get any help on this elusive error? It's wHow to trigger "hotbarDrop" with element that are not "Item" ?Hello, I would like to know if it is possible to trigger "hotbarDrop" with element that are not "ItIs there a starter system based on the v10 DataModel?I'm creating a new system (sci-fi with a cyberpunk theme, battles in space, land vehicles, and closeNewb looking for advice on creating Compendium via codeI am new to Foundry and trying to figure out if it will be a good fit for my game. I have a fair amoAm I approaching character data updates incorrectly?In my system I've constructed a `core` and `modules` directory where `core` handles all of the critiLimit portions of character sheet to Owner/GM onlyHey friends, I'm new so if this isn't the best way to go about asking about system development quest