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 .
Advertisement Create a free account Compendium in Game, Join Today

Help multiplying damage by successes

1603004977

Edited 1603005075
&{template:default} {{name=Change this}} {{attack=[[1d20+@{Frey|BAB}+@{Frey|DEX|Max}]]}} {{Number of Hits=[[{5d8!!}>5]]}}{{Effect= Change this. It rolls extra die for the success}} {{damage= [[1d6+@{Frey|STR|Max}]]*(Number of Hits)}} I have this I want the Number of hits to be successes rolled in the previous line? Is there a way to do that?  So that 5* what is rolled in Number of hits. 
1603006959
GiGs
Pro
Sheet Author
API Scripter
If I understand what you're asking, this should do the trick using the Reusing Rolls technique from the roll20 wiki. It's not possible to this normally - but the Reusing Rolls method uses an undocumented trick, possibly a bug. &{template:default} {{name=Change this}} [[ [[{5d8!!}>5]] * [[1d6+@{Frey|STR|Max}]] ]] {{attack=[[1d20+@{Frey|BAB}+@{Frey|DEX|Max}]] }} {{Number of Hits=$[[0]]}}{{Effect= Change this. It rolls extra die for the success}} {{damage= $[[1]] }}
1603007175

Edited 1603007251
edit - dammit, GiGs was too fast.... though I think the damage should be $[[2]], not $[[1]]? There's a stupid trick to reference previous rolls that achieves this in a round-about way. You need to do all the math outside the template fields, then grab the bits you want with $[[0]] calls: &{template:default} {{name=Change this}} {{attack=[[1d20+@{Frey|BAB}+@{Frey|DEX|Max}]]}} [[ [[{5d8!!}>5]]*[[1d6+@{Frey|STR|Max}]] ]] {{Number of Hits=$[[1]]}}{{Effect= Change this. It rolls extra die for the success}} {{damage= $[[3]]}}
1603007445
GiGs
Pro
Sheet Author
API Scripter
Oosh said: edit - dammit, GiGs was too fast.... though I think the damage should be $[[2]], not $[[1]]? Oops you're right! I paid the price for posting too fast! :)
GiGs said: If I understand what you're asking, this should do the trick using the Reusing Rolls technique from the roll20 wiki. It's not possible to this normally - but the Reusing Rolls method uses an undocumented trick, possibly a bug. &{template:default} {{name=Change this}} [[ [[{5d8!!}>5]] * [[1d6+@{Frey|STR|Max}]] ]] {{attack=[[1d20+@{Frey|BAB}+@{Frey|DEX|Max}]] }} {{Number of Hits=$[[0]]}}{{Effect= Change this. It rolls extra die for the success}} {{damage= $[[1]] }} Basically if number of hits rolls a 1 I want the damage dice to roll so 1d6+3 * 1 If it Number of hits rolls a 5  I want the damage dice roll to be 1d6+3 * 5  If that makes sense? Or if that is possible. If it isn't then it is fine we can easily do the math ourselves. 
1603009218
GiGs
Pro
Sheet Author
API Scripter
Try out the macro I posted, after changing the damage section to {{damage=$[[2]]}} and it should do what you want.
1603009477

Edited 1603009572
I tried it out and I got this.  It isn't multiplying the 8 by the successes rolled in Number of hits. Edit :  Literally after posting, I just changed the number to 3 and it made it what I wanted. It works with 3 not 2 or 1 for whatever reason.
1603021825
GiGs
Pro
Sheet Author
API Scripter
Did you use Oosh's version of the macro? That requires numbers that are each 1 higher due to the different order of inline rolls.
Nope. I just copied your code and stuck it in there and changed the {{damage= $[[1]] }} to a {{damage= $[[3]] }}