It can certainly be done, it will involve quite a few queries though.
Do you want to to ask how many iterative attacks to roll, and a modified AB to apply to
each and every roll? It's going to be a bit of work for you typing that in every time. Is there a reason you're not pulling the stats from an NPC sheet? This means you can do all the work before the session, rather than accurately typing in 5+ queries for every attack roll, mid-session. You've also got most of your math in double-double brackets [[[[ ]]]] which destroys mouseover info - is this intentional? Also, which sheet version are you using? Community? I don't play PF and don't really know the templates, or the differences between sheets, but this should work. The bolded part is your basic 2nd attack (first iterative attack) fields. &{template:pf_attack} {{color=Black}} {{header_image=[Attack](-)}} {{name= ?{Attack Name?|Dagger}}} {{character_name= ?{Monster Name|Goblin}}} {{Damage Type= ?{Damage Type?|Slashing}}} {{attack=[[[[1d20cs>[[19]]+?{Attack Bonus|5}]]]]}} {{damage=[[[[?{Damage Dice|1d4}+?{Damage Bonus|5}]]]]}} {{crit_confirm=[[[[1d20cs>[[20]]+?{Attack Bonus|0}]]]]}} {{crit_damage=[[[[?{Damage Dice|0}+?{Damage Bonus|0}]]]]}} ?{2nd Attack?| Yes, {{attack2=[[1d20cs>19 + ?{2nd Attack Bonus|0 }]]}} {{damage2=[[?{Damage Dice} + Damage Bonus}]]}} {{crit_confirm2=[[1d20 + ?{Attack Bonus}]] }} {{crit_damage2=[[?{Damage Dice} + ?{Damage Bonus}]]}} | No,  } As you can see, as soon as you use a query for the iterative attacks, you get into a world of HTML replacement which makes it hard to read. Once inside a query you can't use the characters which will be parsed as query instructions: mainly } , | unless they are in a character sheet reference, like @{dragon|strength}, then you leave them alone as they are parsed before the query. You would have to nest 3rd and 4th attacks in there too. Note that you can't just do "How many attacks?" => "4" and use the input integer to swing that many times. There's no way to way to make loops based on integers. You have to nest each iterative attack as another Yes/No Query. Also, I put some default values into your queries just so I could mash the enter button to test it. This pf_attack template also seems to break on a blank Query option, hence the " " after the No option. If you don't have this in there, nothing after the query will be parsed and the "No" will be output to chat. Someone familiar with the sheet probably knows why. Or maybe it happens with all templates and I hadn't noticed? edit - if you save a macro (like the above) that contains HTML replacement as a Collections macro, re-opening it will destroy the HTML replacement and it will no longer work. You can either store them as plain text files to copy & paste into the game, or save them as Ability macros on a character sheet where the code will be preserved. edit 2 - I don't know my PF math, I could be re-using queries where I shouldn't in the iterative attack section.