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

5e Spell Macros and Advantage

1496010355

Edited 1496010707
So I'm making macros so that my players can cast or look up spells more efficiently, and I've encountered an issue. My friend, who is also a DM, pointed out that the macros I'm making do not roll with advantage. Easy fix, I thought... but it is not so. In short, adding a second attack roll seems to conflict with the damage roll in some way that I simply cannot comprehend. Here's the macro, without advantage: &{template:spell} {{level=evocation cantrip}} {{name=Fire Bolt}} {{castingtime=1 action}} {{range=120 feet}} {{v=1}} {{s=1}} {{duration=Instantaneous}} {{description=You hurl a mote of fire at a creature or object within range. Attack Roll: [[d20+@{npcd_cha_mod}+@{pb}]] Hit: [[[[{{@{level},0}>17}*[[d10]]]]+[[{{@{level},0}>11}*[[d10]]]]+[[{{@{level},0}>5}*[[d10]]]]+[[d10]]]] fire damage. Flammable objects ignite if not held/worn.}} That works without any issues. The attack roll works perfectly and the damage is calculated appropriately based on the character's level. The problem comes in when I duplicate the attack roll like this: &{template:spell} {{level=evocation cantrip}} {{name=Fire Bolt}} {{castingtime=1 action}} {{range=120 feet}} {{v=1}} {{s=1}} {{duration=Instantaneous}} {{description=You hurl a mote of fire at a creature or object within range. Attack Roll: [[d20+@{npcd_cha_mod}+@{pb}]] [[d20+@{npcd_cha_mod}+@{pb}]] Hit: [[[[{{@{level},0}>17}*[[d10]]]]+[[{{@{level},0}>11}*[[d10]]]]+[[{{@{level},0}>5}*[[d10]]]]+[[d10]]]] fire damage. Flammable objects ignite if not held/worn.}} No matter what I put into that second set of brackets, the damage calculation begins to ignore its outer set of brackets, simply showing the four roll results instead of adding them together as it should and as it does in the first example. Am I missing something? Is there some sort of limit on the number of brackets I can use? I have a bachelor's degree in game development, so these macros have mostly been a breeze for me, but having stared at this and tried numerous possible solutions, I simply can't figure out what is wrong. Also, keep in mind that I tried the same macro in my game and in my friend's game, with the same results. Any help is greatly appreciated. EDIT: I've tested the same thing with a spell that is not based on the character's level and everything is golden, so I'm thinking it has something to do with the level comparisons I'm doing.
For the cantrips, I find it easier to use an equation to calculate the number of dice rather than adding another die for each tier. All of the cantrips, level at 5, 11, and 17 (6 levels apart). So you can use the following formula to determine the number of dice to roll [[round((@{level} + 1) / 6 + 0.5)]] You can then attach that number directly to the type of die to roll (in this case a d10) and surround it with brackets like so: [[[[round((@{level} + 1) / 6 + 0.5)]]d10]]
Works perfectly! Thank you!
1496078826
Kryx
Pro
Sheet Author
API Scripter
Kyle G. said: [[round((@{level} + 1) / 6 + 0.5)]] [[ceil((@{level} + 2) / 6)]] is shorter & quite tested to work if you're so inclined to use it.
Kryx said: Kyle G. said: [[round((@{level} + 1) / 6 + 0.5)]] [[ceil((@{level} + 2) / 6)]] is shorter & quite tested to work if you're so inclined to use it. Awesome! I have to say I'm loving the support on these forums. Off topic: how do I get those identifiers like Sheet Author and API Scripter?