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 .
×

Looping Macro? Pathfinder 1e

So, I've got a player in my Pathfinder 1e campaign taking an ability that will allow them to Overrun multiple foes in the same round. While the normal mechanics for this are just built into the character sheet, I'm looking for something that will allow me to inject a prompt at the end of the macro to loop it. So, it would start [[d20+@{cmb_mod}]] but then go on to ask if it was a success, if yes, then loop it with a variable that would subtract 2 from the new check for each time the macro had been looped. So the second check would be [[d20+@{cmb_mod}-2]], the third  [[d20+@{cmb_mod}-4]], and so on. For context, the specific ability that I'm trying to make a macro for reads " While raging, the barbarian may overrun more than one target per round, with a –2 penalty on her CMB for each overrun check after the first."
1662805534

Edited 1662805664
Gauss
Forum Champion
The short answer here is probably not without a Pro account and an API script.  The longer answer is you don't need looping script if you replace the scaling penalty with a query: -?{Overrun penalty?|0} [[d20+@{cmb_mod}- ?{Overrun penalty?|0} ]]
I had considered that, and it's what I've got down for the character right now. I was just trying to see about setting up something that, on the player end, would be quicker. I do thank you for the input though, it is too bad that I'd have to have API access for what I really wanted to do.
1662822124
Gauss
Forum Champion
Cory said: I had considered that, and it's what I've got down for the character right now. I was just trying to see about setting up something that, on the player end, would be quicker. I do thank you for the input though, it is too bad that I'd have to have API access for what I really wanted to do. Another way to do it would be to put a series of inline rolls in, one for each subsequent attack. Have it all output at once. 
I've toyed with an idea for manually recursive macros which I think could work here. It involves including a button in the macro that when clicked will call the macro again but changing some parameters. In this case the increasing penalty. As a proof of concept here are two abilities that would be added to the character sheet. %{Overrun} - This is the macro the player would use directly %{@{character_name}|Overrun-base}0]] %{Overrun-base} - This is what makes it work &{template:default} {{Overrun=[[d20 +@{cmb_mod}[cmb_mod] -[[([[$[[0]]+2]]-2)]][penalty] ]]}} {{[Continue?](!
%{@{character_name}|Overrun-base}$[[1]] ]])}} [[[ [[ It looks like this
RainbowEncoder said: I've toyed with an idea for manually recursive macros which I think could work here. It involves including a button in the macro that when clicked will call the macro again but changing some parameters. In this case the increasing penalty. As a proof of concept here are two abilities that would be added to the character sheet. %{Overrun} - This is the macro the player would use directly %{@{character_name}|Overrun-base}0]] %{Overrun-base} - This is what makes it work &{template:default} {{Overrun=[[d20 +@{cmb_mod}[cmb_mod] -[[([[$[[0]]+2]]-2)]][penalty] ]]}} {{[Continue?](!
%{@{character_name}|Overrun-base}$[[1]] ]])}} [[[ [[ It looks like this THANK YOU! This does exactly what I was trying to get to without API access. You have streamlined many sessions to come.
1662860366

Edited 1662860376
Gauss
Forum Champion
You know, from now on I think I will just add "not possible unless RainbowEncoder has a magic method to do it" to all my statements when something doesn't appear to be possible. :)