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

NPC/Monster --- Red Dragon Breath Attack Macro

Okay, here's the deal. I am currently using the same template to make all my DnD 5e monsters. However, when it comes to specific monsters, such as an Adult Red Dragon, the template can only do so much; so I decided to add onto it specifically for the Adult Red Dragon (learning the macro language was easier than I thought).  Right now, I have an NPC macro set up to pull the description of the Fire Breath Action from the Adult Red Dragon NPC (5e) Sheet and display it in a nice format ( Credit to Cody and his Taking 20 Master Series for these ): /w gm %{selected|repeating_npcaction_$3_npc_action} /w gm &{template:npcaction} {{name=@{selected|npc_name}}} {{rname=Fire Breath}}{{description=Damage: [[16d6]] fire}} The output shows up like this: However, if you read the description of the attack carefully, it says that only those who FAIL the dex save throw take the full fire damage, while those who SUCCEED the des save throw only take HALF as much damage. Now, I could just leave it as is, and then do a quick /gmroll "rolled result"/2 in the chat to get the half damage the successful dex save throws would take. But I was wondering if there was a way I could just have the original macro do that in addition to everything else it already does: So it shows the full damage for failed dex saves, then takes that same result, divides it in half, and displays THAT new result right below it as "Half Damage: __". I know from reading other forum posts on macros that you can't save the result of an inline role to be used later, but if anyone could help me figure out how to make this work, that would be awesome. Also thought I'd share what I accomplished, and figured it was a good brain teaser for people who are really into macros. Thanks for checking out the post!
1560589134
Pat
Pro
API Scripter
Okay, crazy dumb way to do it, with only macros, but... I abused the turn tracker, GM layer, and used two separate macros...  Create a token and name it whatever. I named mine "half_value" - this stays in the GM layer.  Create two macros on the token - to go in the token action bar - as follows:  First one I named "Breath-Macro-Start" It puts the 16d6 roll to the turn tracker, on the GM layer, so it shouldn't be visible to the players:  /gr 16d6 &{tracker:half_value} Then we create a second macro, "Breath-Macro", which will be the "display" text for the breath weapon:  /em Dragon breathes for [[@{tracker|half_value}]] /em Those who make the dexterity throw save take [[floor(@{tracker|half_value}/2)]] The first puts a value in the turn tracker for the invisible GM layer token - you can do this at any time, but it can't be combined with the actual breath/calculation macro because the "read" portion won't work just yet.The second pulls from this value and calculates the half damage rounded down for those that do make their dex save. It's a really clumsy kloogy horrible way to store a value and requires two steps, but it does semi-automate it... 
Very clever! You might want to add it to the Stupid Roll20 Tricks thread: <a href="https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/" rel="nofollow">https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/</a>
Thank you for the suggestions, advise, and help! I actually had an idea for a quick half damage calculator as a separate macro!&nbsp; /w gm &amp;{template:npcaction} {{name=}} {{rname=Half Damage Calculator}}{{description=Half Damage: [[floor(?{Modifier|0}/2)]]}} It will query me to put in a value, which I can just look at the full damage from the breath attack for as shown above, and it will spit out half of that, rounded down (also in a nice template-style format)&nbsp; Thank you for being such a kind community though! It makes me feel more comfortable knowing if I have any questions or problems, I can come to fellow users for ideas and answers!&nbsp;
The only thing I'm also interested in making this half-damage macro do is query me for a damage type...&nbsp;
/w gm &amp;{template:npcaction} {{name=@{selected|npc_name}}} {{rname=Half Damage Calculator}}{{description=Half Damage: [[floor(?{Modifier|0}/2)]]}} Edited it slightly so that it always displays the name of whatever selected monster/token I'm calculating half damage for. That way I won't get confused about what creatures dealt half damage.&nbsp;
1560676006
Ziechael
Forum Champion
Sheet Author
API Scripter
Since you already have 'Half Damage' in the rname you could replace that identifier in the description with your type query: /w gm &amp;{template:npcaction} {{name=@{selected|npc_name}}} {{rname=Half Damage Calculator}} {{description=?{Type|Bludgeoning|Piercing|Slashing|Fire|Cold|etc etc}: [[floor(?{Modifier|0}/2)]]}}
That’s it! That’s perfect! Thank you!&nbsp;
1560759726
Ziechael
Forum Champion
Sheet Author
API Scripter
You are most welcome :) Happy rolling!