Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

How to ensure a minimum number of dice are rolled?

1597072943

Edited 1597077978
dodgepong
Sheet Author
I'm working on a character sheet for Vaesen, a system where checks have you roll a number of d6's and count how many 6's are rolled as successes. The number of dice you roll is equal to a stat + bonus, subtracting one die for each bad "condition" you have. This is an example of my current macro: /r (@{Agility}+?{Bonus Dice|0}-@{NumberOfConditions})d6>6 If you have a lot of conditions, a low stat, and no bonuses, it's possible for the number of dice you roll to be below 1. However, the game's rules state that you can always roll at least 1 die if that would happen. How can I make a macro that will always roll at least 1 die, but will otherwise roll the specified number of dice if the number specified is greater than 1?
1597073920

Edited 1597078006
dodgepong
Sheet Author
Ha! Just after posting this, I figured it out. I can do a nested math group high-keep like so: /r [[{[[@{Agility}+?{Bonus Dice|0}-@{NumberOfConditions}]],1}kh1]]d6>6 It works like this: Get the number of dice we are rolling:  @{Agility}+?{Bonus Dice|0}-@{NumberOfConditions} Keep the higher of that and 1 as a group roll: {[[@{Agility}+?{Bonus Dice|0}-@{NumberOfConditions}]],1}kh1 Use the resulting number as the number of d6's to be rolled: [[{[[@{Agility}+?{Bonus Dice|0}-@{NumberOfConditions}]],1}kh1]]d6>6 Thanks, forums, for being my rubber ducks ^_^ Hopefully this helps someone else in the future.
1597075994
GiGs
Pro
Sheet Author
API Scripter
I'm glad we could help! *takes a bow* You can simplify it a little bit - you dont need the nested inline roll: /r [[{@{Agility}+?{Bonus Dice|0}-@{NumberOfConditions},1}kh1]]d6>6
Yep, I realized that after the fact -- fortunately it still works and I can clean that up later. Thanks!