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

Multiply die roll by number of successes

1570803838
Mike deBoston
Compendium Curator
In some area effect attacks, characters can that roll 6 on a d6 can evade 2d6 damage. I'd like to build a macro for this. 1d6>6 should return the number of successes, right? I should get a 1 if the roll is 6?  (I cringe because it seems like the notation should be >=6, not >6.) And 1d6<5 should return 1 if the roll is 1-5? But this formula [[1d6<5 * 2d6]] doesn't work. Basically, I'd like to roll 2d6 and keep the result if the d6 is 5 or less, and discard the result (multiply by 0) if the d6 is a 6. Can you please help with the correct formula? Thanks!
1570806638

Edited 1570806782
Try  [[ [[1d6<5]] * 2d6 ]]
1570806983
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi Mike, This is possible. You just need to wrap your success failure evaluation in a set of inline roll brackets so that it resolves to a number before the 2d6 is rolled: [[[[1d6<5]] * 2d6]] One question, if the 2d6 is only deducted from the damage on a 6, wouldn't you want to do [[[[1d6>6]] * 2d6]]? As for > vs >=, yes I agree as well, it woulld make more sense to be >= (and then maybe we could actually have true >/< behavior).
1570816136
Mike deBoston
Compendium Curator
Thanks for the help. The extra square brackets work fine; I had tried parenthesis to no avail. Scott, you need a 6 to evade the damage, so the d6=6 needed to evaluate to a multiplier of 0. For Savage Worlds players, the full rule is that you can evade blast damage if you roll your Agility die (often d6 or d8), minus 2, and get more than a 4. So that's a 6+ on a d6 or a d8 to evade. Blast effects are often 2d6, 3d6, or 4d6 damage. This macro covers the common cases. ?{Number of dice|2|3|4}&{template:info} {{name=Blast Damage}} {{=For each target (left to right, top to bottom), checks **Ag**ility d6-2 and d8-2 to evade or take **?{Number of dice}d6** blast damage.}} {{1st=Ag d6 takes [[[[1d6<5]] * ?{Number of dice}d6!]], d8 takes [[[[1d8<5]] * ?{Number of dice}d6!]] }} {{2nd=Ag d6 takes [[[[1d6<5]] * ?{Number of dice}d6!]], d8 takes [[[[1d8<5]] * ?{Number of dice}d6!]] }} {{3rd=Ag d6 takes [[[[1d6<5]] * ?{Number of dice}d6!]], d8 takes [[[[1d8<5]] * ?{Number of dice}d6!]] }} {{4th=Ag d6 takes [[[[1d6<5]] * ?{Number of dice}d6!]], d8 takes [[[[1d8<5]] * ?{Number of dice}d6!]] }} An interesting thing about this macro in action is that you only see a few 3D dice thrown. I think it's technically throwing 6 dice per target, 24 dice total, but it only ultimately shows 2 or 3 onscreen. Anyway, this will really save some time, THANK YOU!