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

Dropdown Micro for Animate objects

First time posting and have no knowledge of Micros.I saw a micro in this thread.

https://app.roll20.net/forum/post/4811805/5e-community-animate-objects-dropdown-macro/?pageforid=4816697#post-4816697


What i need is a micro for only tiny objects in that spell. But i need be able to do a dropdown for  advantage/normal/disadvantage, enter the number of attacks, enter the ac of what I'm attacking, then spits out the damage for for the ones that hit and double some 1d4 rolls if it's a crit. I tried using the multiple ones from the forum above, but can't even get that to work. I'm using the D&D 5e by roll20 template.


Any help at all would be appreciated. Thanks.


August 11 (5 years ago)

Edited August 11 (5 years ago)
David M.
Pro
API Scripter

This is actually a pretty complicated thing, and I don't think there is a way to do everything you want (variable # attacks, adv/disadv, compare vs AC, damage including crits) without using api scripts, a pro subscriber perk. However, here is a link to a similar problem and a couple of solutions to it that would be applicable in your case as well. Scroll all the way up if you want to follow the whole involved conversation, but basically the OP needed up to 25 attacks, all with same att & dam stats, query advantage, and damage. Oosh proposed a method that could support a variable number of attacks and add up total damage, while I proposed one that broke the damage down into individual instances. The target AC was not factored in to either of these solutions, so you would have to manually compare. Either of these approaches could be adjusted pretty easily for your application. Try them both out and see if they get you close enough! 

https://app.roll20.net/forum/post/8941796/lf-help-with-macro-horn-of-valhalla-multiple-attacks/?pageforid=8945483#post-8945483


August 11 (5 years ago)

Edited August 11 (5 years ago)

Thanks, Will look at it now.I was able to get one micro that worked for calculating the number of hits. But the advantage and disadvantage doesn't work.

&{template:default} {{?{Number of attacks|10} objects attack ... 
...and [[ {?{Number of attacks|1}?{Roll|Normal,d20|Advantage,t[Advantage]|Disadvantage,t[Disadvantage]} + 8}>?{AC|0} ]] attacks hit!}}
August 12 (5 years ago)
David M.
Pro
API Scripter

The t[Advantage] and t[Disadvantage] means they are rolling on rollable tables "t[tableName]" that have been set up with "weights" representing the probability of rolling 1-20 with either advantage or disadvantage. Scroll up from where you found that macro to the part where Silvyre describes the rollable table weights. Rollable tables can be created in the Collections tab (near the chat window, but where the macros are). Scroll all the way down to below the macros and you can add a rollable table. Use the values and weights Silvyre described. It's a lot of setup, but it will get the Adv/ Disadv working with that macro if that's the way you want to go. Note that that method does not take criticals into account.

August 12 (5 years ago)

Edited August 12 (5 years ago)

David,

Ah, that makes sense why the t. I took it from another micro. is there a way to get advantage and disadvantage without using a table? I've tried using this macro below to modify for multiple attacks in the above macrocro, but can't get it to work for doing advantage for multiple attacks. See below.


[[{?{Roll|Normal, 1d20|Advantage, 2d20kh1|Disadvantage, 2d20kl1}+8}>15]]

August 12 (5 years ago)
David M.
Pro
API Scripter

Not for the way you are trying to use it. That macro is rolling n number of single dice where n = number of attacks prompted and dice= either a normal d20 or a rollable table "d20". The only way you can use the syntax you wrote is to explicitly write each attack out in the macro, rather than "multiplying" like the example you are trying to copy. Then you start getting into the types of solutions that I linked to in my first reply.

August 12 (5 years ago)
David M.
Pro
API Scripter

Here is how you would modify Oosh's two-macro solution for tiny Animated Objects.

Make two abilities on a character sheet. If you do NOT want the macro tied to a specific character, you can make a generic "character" called "Macro Mule" and set its permissions to whatever you'd like, and check the "show in macro bar" option. The link in my first reply has some screenshots and instructions for making abilities if you haven't used them before. Abilities are basically "macros" that exist on a given character sheet. They have some advantages over macros when you are making chat buttons linking to them and some other things I won't get into. 

The first ability you will call "AnimateObjAtt" and the second you will call "AnimateObjDam"

AnimateObjAtt

&{template:default} {{Atk [[[{?{Number of attacks|10},1}kl1]]](#)= [[?{Roll|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1}+8]] vs AC [[?{Target AC|15}]] }} {{Atk [[[{?{Number of attacks|10},1}kl1]]](#)= [[?{Roll|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1}+8]] vs AC [[?{Target AC|15}]] }} {{Atk [[[{?{Number of attacks|10},2}kl1]]](#)= [[?{Roll|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1}+8]] vs AC [[?{Target AC|15}]] }}{{Atk [[[{?{Number of attacks|10},3}kl1]]](#)= [[?{Roll|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1}+8]] vs AC [[?{Target AC|15}]] }}{{Atk [[[{?{Number of attacks|10},4}kl1]]](#)= [[?{Roll|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1}+8]] vs AC [[?{Target AC|15}]] }}{{Atk [[[{?{Number of attacks|10},5}kl1]]](#)= [[?{Roll|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1}+8]] vs AC [[?{Target AC|15}]] }}{{Atk [[[{?{Number of attacks|10},6}kl1]]](#)= [[?{Roll|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1}+8]] vs AC [[?{Target AC|15}]] }}{{Atk [[[{?{Number of attacks|10},7}kl1]]](#)= [[?{Roll|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1}+8]] vs AC [[?{Target AC|15}]] }}{{Atk [[[{?{Number of attacks|10},8}kl1]]](#)= [[?{Roll|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1}+8]] vs AC [[?{Target AC|15}]] }}{{Atk [[[{?{Number of attacks|10},9}kl1]]](#)= [[?{Roll|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1}+8]] vs AC [[?{Target AC|15}]] }}{{Atk [[[{?{Number of attacks|10},10}kl1]]](#)= [[?{Roll|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1}+8]] vs AC [[?{Target AC|15}]] }}{{[Roll Damage](~Macros|AnimateObjDam)}} {{name=Animate Objects Attacks}}

AnimateObjDam

&{template:default}{{name=Animate Objects Damage}}{{Tiny objects hits for a total of** [[ [[ ([[?{How many attacks hit?|1}]] + [[?{How many attacks critically hit?|0}]])]]d4 + ?{How many attacks hit?}*4]] bludgeoning damage**.
$[[0]] attacks hit the target and $[[1]]of those critically hit!}}

Here is sample output for the full 10 attacks. We see that 9 attacks hit and one was a crit. Oosh's solution is nice because it only outputs the number of attacks you specify, and it adds all the damage for you, including crits, when you follow the prompts from the damage chat button.





 





August 12 (5 years ago)

Edited August 12 (5 years ago)

David,

I can't tell you how much you've helped. I was able to convince DM to add the table after doing some reading on how to do it. Will use the second Macro you mentioned above for the damage. Below is final Macro. I doubt there's a way for me to have it show the hits over the ac number and also give me a separate success number for how many roll a natural 20. So it would essentially say "12 tiny objects attack and 6 hit with 2 crits". From what I've read, I probably need API for that. Below is my current formula:


&{template:default} {{?{Number of attacks|10} Tiny Objects attack 
... 
...and [[{?{Number of attacks|1}?{Roll|Normal,d20|Advantage,t[Advantage]|Disadvantage,2d20kl1} + 8}>?{AC|0} ]] attacks hit!
}} 
August 12 (5 years ago)
David M.
Pro
API Scripter

Great, glad you settled on something that works for you! Yeah, if you want to display the separate rolls, you're going to be manually counting your hits. At least it's easy to mouse over the output in your final attack macro to see the numbers rolled and determine crits that way.