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

Problems with macro for computing sneak and critical damage for rogues

One of the characters in my dnd game is a rogue. I thought I understood how sneak attack damage and critical damage apply to her, but I'm not that good at math, so I looked around for a macro that would automatically calculate all the possible combos of the two types. (BTW, I'm using the 2014 character sheet.) What I found is the suggestion that I enable the global damage modifier for one of the rogue's weapons and make the following entries: Name: Sneak Attack Damage: ?{Sneak Attack|No, 0|Yes, [[ ceil((@{base_level}) / 2) ]]d6 [Sneak Attack]} Critical Damage: [[ceil((@{base_level})/2) ]]d6 Type: Sneak This works pretty well as long as I specify a sneak attack. If I use any of the rogue's weapons, it calls up a choice box asking if this is a sneak attack and calculates accordingly. The problem is that if I say that it is not a sneak attack, it still reads out sneak damage. It doesn't say that the sneak attack damage is zero, it rolls 2d6 for sneak attack damage and displays the result. It's easy to just ignore the sneak damage in that case, but it seems to me that the code I've entered should end up giving me a zero for the sneak damage.  Here's an example: My attack roll is a 20. When I ask the chat entry for the damage, I specify No Sneak. Roll20 rolls 4d6: a 1, a 4, and 2 6s.  The chat interprets this as:  piercing damage 8 + 1  with the 8 being 1d6 + 4[DEX] = 4 + 4 and the 1 being 1d6 = 1 and  sneak damage 12 = 2d6 = 6 + 6. I don't have any trouble with the piercing damage, but shouldn't the sneak damage be 0? Either the macro isn't calculating correctly or I'm misunderstanding the interaction of sneak and crit (probably the latter).
1759380583

Edited 1759380722
Gauss
Forum Champion
Hi Tom F,  If I understand correctly you want the Sneak Attack to calculate the dice and for there to be a Query on whether or not this is a Sneak Attack.  That can be done. It looks like your query is ending in the wrong place.  Give this a try: ?{Sneak Attack|No,0|Yes,[[ceil(@{base_level}/2)]]d6} Put the same calculation in the critical field. 
Tnx. Works like a charm.