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

[Help] Cannot resolve myself this macro, is it possible ?

I'l d like to make a macro for multiple attacks: Steps 1. choose the roll type (normal, advantage, desadvantage) 2. choose "bonus to hit" 3. choose Number of attacks 4. use "roll type" &  "bonus to hit" result in the calculation. So fat, i have come with something like this macro and  I know i have to replace some char with html replacements but after several tries i can't find out the right solution. Can you help me ? Base macro : &{template:default} {{rname=Conjure Animals Attacks}}{{**Base roll** = ?{Roll Type|Normal,1d20|Adv,2d20kh1|Des,2d20kl1} ?{To hit bonus|1,1|2,2|3,3|4,4|5,5}}} {{ ?{Number of attacks |1, 1 attack [[?{Roll Type} + ?{To hit bonus}]] |2, 2 attacks [[?{Roll Type} + ?{To hit bonus}]] [[?{Roll Type} + ?{To hit bonus}]] |3, 3 attackS [[?{Roll Type} + ?{To hit bonus}]] [[?{Roll Type} + ?{To hit bonus}]] [[?{Roll Type} + ?{To hit bonus}]] |etc... } }} Thank you.
1644401930
Andrew R.
Pro
Sheet Author
Since you are a Pro subscriber, I recommend installing the ScriptCards API script and writing your macro in that instead of the default roll template because it will make the job much, much simpler. 
Hi, thanks for your answer, but this macro is for a future character on a campaign to come. My Gm in that campaign have no pro account and so will not use scripts, that's why i try to make this work.
1644409962
Ziechael
Forum Champion
Sheet Author
API Scripter
Something like this should do it: ! ?{Roll Type|Normal,1d20|Adv,2d20kh1|Dis,2d20kl1} ?{To hit bonus|1|2|3|4|5} &{template:default} {{name=Conjure Animals Attacks}} {{?{Number of attacks|1,Attack=[[?{Roll Type} + ?{To hit bonus}]]|2,Attack 1=[[?{Roll Type} + ?{To hit bonus}]]}} {{Attack 2=[[?{Roll Type} + ?{To hit bonus}]]|3,Attack 1=[[?{Roll Type} + ?{To hit bonus}]]}} {{Attack 2=[[?{Roll Type} + ?{To hit bonus}]]}} {{Attack 3=[[?{Roll Type} + ?{To hit bonus}]]}}} Or, for readability: ! ?{Roll Type|Normal,1d20|Adv,2d20kh1|Dis,2d20kl1} ?{To hit bonus|1|2|3|4|5} &{template:default} {{name=Conjure Animals Attacks}} {{?{Number of attacks| 1,Attack=[[?{Roll Type} + ?{To hit bonus}]]| 2,Attack 1=[[?{Roll Type} + ?{To hit bonus}]]}} {{Attack 2=[[?{Roll Type} + ?{To hit bonus}]]| 3,Attack 1=[[?{Roll Type} + ?{To hit bonus}]]}} {{Attack 2=[[?{Roll Type} + ?{To hit bonus}]]}} {{Attack 3=[[?{Roll Type} + ?{To hit bonus}]]| etc... } }}
1644409991

Edited 1644410010
David M.
Pro
API Scripter
You might want to check out this set of "mob attack" macros from Ed S. This was made with GMs in mind, however, and as a player you don't necessarily know the targets AC to type in. So, in the first macro you could replace that AC input query with an @{target...} style reference, giving you something like:  [[{?{Number of Attackers|10}d20 + ?{To hit modifiers +|5}}>[[?{Target AC|15}]] ]] hits vs **AC**[[@{target|Click target token|npc_ac}d1]] [Damage](! #Mob-Damage) The Mob-Damage macro can stay the same [[ (?{Number of hits|1}?{Damage die|1d4,)d4|1d6,)d6|1d8,)d8|1d10,)d10|1d12,)d12|2d4,*2)d4|2d6,*2)d6|2d8,*2)d8|2d10,*2)d10|2d12,*2)d12|3d4,*3)d4|3d6,*3)d6|3d8,*3)d8|3d10,*3)d10|3d12,*3)d12} + (?{Damage bonus|3}*?{Number of hits}) ]] piercing
Thanks all for your help. I guess i have alot to learn :)
You can use this macro: &{template:default} {{name=Longsword}} {{emote=* **?{Qty of Attacks?|1,1|2,2|3,3|4,4|5,5} Longsword attack were made against the enemy!* ** }} {{Attack #[1](#)=[[ ?{Roll|Normal, 1d20|Advantage, 2d20kh1|Disadvantage, 2d20kl1} + 5]] vs. AC for [[1d6]] piercing damage (if crit, +[[2d6]] Piercing Damage) }} {{Attack #[[[{?{Qty of Attacks?}, 2}kl1]]](#)=[[ ?{Roll} + [[5]]]] vs. AC for [[1d6]] piercing damage (if crit, +[[2d6]] piercing Damage) }} {{Attack #[[[{?{Qty of Attacks?}, 3}kl1]]](#)=[[ ?{Roll} + [[5]]]] vs. AC for [[1d6]] piercing damage (if crit, +[[2d6]] piercing Damage) }} {{Attack #[[[{?{Qty of Attacks?}, 4}kl1]]](#)=[[ ?{Roll} + [[5]]]] vs. AC for [[1d6]] piercing damage (if crit, +[[2d6]] piercing Damage) }} {{Attack #[[[{?{Qty of Attacks?}, 5}kl1]]](#)=[[ ?{Roll} + [[5]]]] vs. AC for [[1d6]] piercing damage (if crit, +[[2d6]] piercing Damage) }} this will be your results  I hope this help
I forgot to mention for the bonus attack on the example I put a value (5), you can easily modify this to ?{attack bonus?|1|2|3|4|etc...} or if you want to update with the character you can add something like @{selected|strength_mod}.
Hi, @Warlord, your macro is totally what i need. I did not know this way. I will look for moreinformation about it. Thank you again all :)