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

Variable Iterative attacks

1407689946

Edited 1407694298
I believe what I'm looking to do can't be done without the API but I'd like to find out for certain... I have a character who uses the spell Divine Power to boost her base attack up to a fighters of her level often, and as such her iterative attacks change frequently... I was wondering if there was a way to write a macro that will always include the full set of iterative attacks, but output a 0 on any attack roll that would not be applied with her current base attack. At her current level she has 2 iterative attacks naturally, and boosts up to 3 with Divine Power, though this gap will increase with more levels, next level it will be 2 & 4 actually... So what I'm looking for is to have her full attack rolls output like this: Without Divine Power: [30]/[25]/[0]/[0] With Divine Power: [35]/[30]/[25]/[0] if at all possible utilizing my variable modifier for adding Divine Power to my Base Attack to determine if the extra iterative attacks are rolled or output as 0 Currently I have this in place for increasing my Base Attack when Divine Power is active "@{Bab}[BAB} + ((?{Divine Power|0}*(@{level}-@{bab}))[Divine Power]" so if divine power is not active it uses my natural Base Attack, if it is active it adds the difference, effectively using the new Base Attack. So now I just need to find a way to get this to apply to the additional attacks and adjust their output to show if the attack is applied or not. Using ([Atk Formula])*?{Divine Power|0} on my iterative attacks I can get the outputs of 0 for when Divine Power isn't active but it requires alteration when I obtain any more natural iterative attacks. however, using this method causes all 4 iterative attacks to always roll when Divine Power is active regardless of if I have 4 iteratives with Divine Power yet or not.
1407694688

Edited 1407836721
Nevermind, I figured it out... sorta.. I got it to output 0s on iterative attacks not currently in use... however when I gain a new iterative attack from class levels I'll have to adjust the macro or it will output a 0 for that new attack when not using Divine Power... I changed my formulat to: ([ATK Formula])*({{?{Divine Power (1=yes)|0}*(@{level}-10),0}kh1,?{Divine Power (1=yes)|0}+0d0}kl1) ([ATK Formula])*({{?{Divine Power (1=yes)|0}*(@{level}-15),0}kh1,?{Divine Power (1=yes)|0}+0d0}kl1) this works for outputing 0s on attacks 3 and 4 when Divine Power is not in use and a 0 on 4 if divine Power doesn't boost my attack high enough to gain a 4th attack, but I have to remove this line from 3 when my base attack reaches 11 giving me a 3rd iterative attack... simple enough aside from the fact that my attack macro looks like rocket science... and finding the 3rd attack to remove the line when I need to later on will take a while...