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

Can you repreat a formula based on a variable?

I saw something similar to this asked a while ago, but a lot's changed on roll20 since then, so I figured it might be worth asking again. Is there a way I can have a macro or roll formula repeated a number of times based on a variable. For example, lets say a single attack would be calculated as [[round((6+1d4)/({1d20<9}+1))]], so each attack does 6+1d4 damage or half on a miss (roll of less than 9). Now lets say they gain a number of attacks based on an attribute. Is there anyway to get that above roll repeated automatically, so you don't have to copy it five or six times, and then summed?
1532952383
The Aaron
Pro
API Scripter
If you only care about the resultant sum, it could be done with a sum of terms where each term is multiplied by a formula resulting in either 0 or 1 and represents the number of the attack. 
I kind-of do care about the individual steps, but more importantly, if I understand you correctly, that would still require you to manually duplicate each term and the formula would just be turning the different terms on and off.
1533257987
The Aaron
Pro
API Scripter
That's correct.
Unfortunately, that's  not what I'm looking for then.