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 number of Attacks (3.5)

July 10 (8 years ago)

Edited July 10 (8 years ago)
Hello there, I am currently playing a Binder/Fighter/Swashbuckler/so on and so forth. Anyway, as a Binder, I pretty much exclusively bind Paimon for his amazing dexterity based combat abilities. For this macro question, it has specifically to with Paimon's granted ability, Dance of Death. Now when I full attack, I know how many attacks I get and never really have to change that. When I use Dance of Death however, I attack every enemy I move past. So far, we have just been making do with me clicking attack over and over until each of them are accounted for. What I am looking for is a macro that keeps in the generic 3.5 roll template but will let me change the number of attacks. I have messed with Drop-Down queries but can't seem to figure out how to keep them inside the roll template, as you can see below. 

 

I am basically looking for a way to keep it in the style of a full attack macro, but I can change how many attacks are visible. Please note that I am up for API's as my DM does have a pro membership. Below I have posted what the full attack macro looks like just to make sure those who don't know 3.5 can see what I am talking about.

Thank you in advance!!


July 10 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
So, I've got two possible solutions.

The first is roll queries that you already tried. The trick when doing roll queries with roll template fields is that you have to use advanced roll queries, which means replacing all commas, bars, and end curly braces with their html code (,,|, and } respectively). The exception to this rule is any of those characters that appear inside an attribute or ability call (e.g. @{CHARNAME|SOMEATTRIBUTE} and %{CHARNAME|SOMEABILITY} do not have anything replaced in them). There are two ways you could leverage roll queries for this.
  • The first is that you can simply make one giant roll query that has you select the number of attacks
  • The second is that you can simply make multiple queries and ask if you are using attack 1, 2, 3, 4, etc.
Right about now, you're probably saying something along the lines of "Damn, that's a lot of work". Advanced roll queries are powerful, but are pretty labor intensive to set up. The other option is that you could make a menu macro of API or ability command buttons to output a pregenerated macro for the number of attacks you will be making. There are some html replacements needed here as well if you use API command buttons.
July 10 (8 years ago)
The Aaron
Pro
API Scripter
One other similar option would be to have an ability command button output as part of the main RollTemplate which then adds another attack.  If you have the button consistently positioned (say a [+] at the right bottom corner of the RollTemplate and the additional attacks), you could do the roll then just click the number of times you need additional attacks (the button would end up under the mouse cursor each time).
@Scott C., do you have any examples of this I can see?
July 10 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Sure, I did something similar for a character sheet-less pathfinder game I was a player in for accomodating haste when our wizard cast it. This is a generic example adapted from that macro (the whole macro was about 2 word pages long) since I'm not familiar with the 3.5 sheet and templates:

&{template:default} {{name=Full Attack}} {{Attack 1=[[1d20+@{Str-mod}+@{bab}]]}} ?{Haste|Yes,{{|No,}Haste Attack=[[1d20+@{Str-mod}+@{bab}]]}} {{Attack 2=[[1d20+@{Str-mod}+@{bab}]]}}

Giving the following behavior:


This is more in the vein of the second roll query option I posted, and works great for something like haste that is a simple yes/no option. It'd be a lot more prompts for you to navigate through for your use case though. Note also that if you use 3d dice, it will display the haste roll in the dice rolled because the roll is still present, it just isn't displayed in chat.

The other way to do this is using the advanced roll queries. I'll do this one for your use case up to 3 attacks:
&{template:default} {{name=Full Attack}} {{Attack 1=[[1d20+@{Str-mod}+@{bab}]]}} ?{# of Attacks|1,|2,{{2nd Attack=[[1d20+@{Str-mod}+@{bab}]]}}|3, {{Attack 2=[[1d20+@{Str-mod}+@{bab}]]}} {{Attack 3=[[1d20+@{Str-mod}+@{bab}]]}}}

Giving the following behavior:


Take a look at the ability command button wiki if you want to go that route (note you will need to create an ability or attack on the sheet for each possible number of attacks).

In thinking about the API command button method some more, I realized that it is actually more complicated, not less, so I actually wouldn't recommend it.
Thank you so much!
Are you allowed to use more questions in the secondary attacks? like so..

&{template:DnD35StdRoll} {{pcflag=true}} {{name=Howard}} {{subtags=begins to dance about gracefully, dealing damage wherever his feet take him }} {{1st Attack/Damage= [[ @{Howard|weapon3attackcalc} ]] / [[ @{Howard|weapon3damage} ]] }} ?{# of Attacks|1,|2,{{2nd Attack/Damage=[[1d20cs>@{Howard|weapon3critmin} +@{Howard|bab}[BAB] +@{Howard|epicattackbonus}[Epic AB] + @{Howard|weapon3stat}[Ability] +@{Howard|size}[size] +@{Howard|weapon3enh}[Weapon Enh] +@{Howard|weapon3focus}[Weapon Focus] + ?{ 2nd Flank (1=yes)|0}*2[Flank] + ?{Power Attack?|0}[Pwr Attk] + ?{Additional Attack Bonus?|0}[Ad'l Atk Bon] ]]}}|3, {{Attack 2=[[1d20+2]]}} {{Attack 3=[[1d20+2]]}}}

The first attack weapon3attackcalc asks the same questions as the 2nd attack/damage. Because using this, I need to be able to edit it in order to account for power attacking, if I am flanking and any other bonuses/minuses. I copy/pasted the macro broken down from the character sheet and added in my name when needed. In the character sheet, it was simply @{weapon3stat} so I had to add in my name. 
This is the result I get whenever selecting 2 or more attacks. As you can see, I only get the first, which is calculated perfectly.

Originally, I had tried using the same macro shortcut as I did the first time, and that did the same thing. The code for that was simply...
&{template:DnD35StdRoll} {{pcflag=true}} {{name=Howard}} {{subtags=begins to dance about gracefully, dealing damage wherever his feet take him }} {{1st Attack/Damage= [[ @{Howard|weapon3attackcalc} ]] / [[ @{Howard|weapon3damage} ]] }} ?{# of Attacks|1,|2,{{2nd Attack/Damage=[[ @{Howard|weapon3attackcalc} ]] / [[ @{Howard|weapon3damage} ]] }}|3, {{Attack 2=[[1d20+2]]}} {{Attack 3=[[1d20+2]]}}}
Whenever running the macro, if I select 2 (it gives me a drop down of 1, 2, or 0) attacks, I also get a weird question as shown below..


(Please note that I used the HTML codes in the macro, but when copied over, they simply reverted back.
I also used the macro you gave me, pretty much without altering, and it was fine. I just editing the first few lines to read... 
&{template:DnD35StdRoll} {{pcflag=true}} {{name=Howard}} {{subtags=begins to dance about gracefully, dealing damage wherever his feet take him }} {{1st Attack/Damage= [[ @{Howard|weapon3attackcalc} ]] / [[ @{Howard|weapon3damage} ]] }}
Then the rest of the macro took place and everything was fine, but when I started adding in ?{Flank?|0} and so on, it began to mess up.



July 11 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, you just need to replace the bars, commas and end curly braces in the query with their html equivalents.
July 11 (8 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter
Also note that if you are storing this in a normal macro (under the collections tab) you'll need to replace the characters each time you open the macro to make changes so I highly recommend having it stored in full offsite or in a characters ability (which doesn't change the html when opened).
July 11 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, good catch ziechael. Yes, I would highly recommend making this as a character ability.
Alright so the problem I have is in the '2nd Attack/Damage,' I have used the same exact rolls/calls as the first one, but then I get this issue...

The Flank and Power Attack are supposed to be separate questions.
July 12 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
where are the queries located? I don't see them in that macro.
I copy/pasted yours from above so it was 
&{template:default} {{name=Full Attack}} {{Attack 1=[[1d20+@{Str-mod}+@{bab}]]}} ?{# of Attacks|1,|2,{{2nd Attack=[[1d20+@{Str-mod}+@{bab}]]}}|3, {{Attack 2=[[1d20+@{Str-mod}+@{bab}]]}} {{Attack 3=[[1d20+@{Str-mod}+@{bab}]]}}}  (WITH the correct HTML's, they simply reverted back when I paste them here)
Then edited only the items within the brackets
July 12 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Right, but your flank and power attack queries are not present in that macro. Are they contained in an attribute that you are referencing?
Yes they are. So when I use the above macro, it first asks me flank/power attack and everything, then asks me how many attacks. Of which I get the options of 1, 2, or 0. If I select 2, then the above error happens where it asks me the 2 queries at once and 0 simply doesnt do anything. I have also tried typing everything out rather than calling for the attributes.. but still end up with the double query issue. Is it simply not possible to reference a query inside another query?

July 12 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, yeah, it won't work with them embedded in the attributes because you need to do html replacements on those as well. So for the query that is nested into the number of attacks query, you'd need to do:

?{Flank? (1=yes)|0}*2[Flank] + ?{Power Attack?|0} + ?{Additional Attack Bonus?|0}[Ad'l Atk Bon]

Also, queries with the same prompt act as variables, using the response to the first instance of the query, so you'll want to change the prompts of the queries in the later attacks (for options that might not be applied to all attacks).
Awesome. Let me go try that. Sorry for all the mess lol. I'm usually pretty good about figuring out these macros, but this just had me stumped
Alright.. What did I do wrong now?
July 13 (8 years ago)
You're missing a @ within one of the {str-mod} Attribute calls