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

My macro doesn't doesn't multiply damage by 2

I am trying to create a chain lightning macro - I have posted my macro below.  I am trying to have the macro calculate the damage taken and display the resulting "saved&failed save" values. I have the "makes save" die roll first.  I was thinking for the "failed save" I would multiply my first result by two, but that part is not working for me. Any suggestions would be appreciated. &{template:npcaction} {{name=Spell Attack}} {{description=**Save DC is:** 17 DEX **Damage Type:** (Lightning Damage) **Makes Save:** ***@{target|character_name}*** takes: **[[((?{Cast at what level?|6,6|7,7|8,8|9,9}+4)d8)/2]]**damage. **Failed Save:** ***@{target|character_name}*** takes: [[($[[0]]*2)]] damage **Description:** A bolt of lightning arcs toward a target of your choice that you can see within range. Three bolts then leap from that target to as many as three other targets, each of which must be within 30 feet of the first target. A target can be a creature or an object and can be targeted by only one of the bolts. A target must make a Dexterity saving throw. The target takes 10d8 lightning damage on a failed save, or half as much damage on a successful one. At Higher Levels: When you cast this spell using a spell slot of 7th level or higher, one additional bolt leaps from the first target to another target for each slot level above 6th. }} (@{target|dexterity_save_roll}) !token-mod {{ --ids @{target|token_id} --set on aura1_circle --set aura1_radius|30 --set aura1_color|#ff9900 --set statusmarkers|Stunned::243674:1 }} /fx beam-frost @{selected|token_id} @{target|token_id} /fx burst-frost @{target|token_id}
1703744148

Edited 1703744810
Gauss
Forum Champion
Hi Steve,  This fixes the problem:  **Makes Save:** ***@{target|character_name}*** takes: **[[[[(?{Cast at what level?|6,6|7,7|8,8|9,9}+4)d8]]/2]]**damage. **Failed Save:** ***@{target|character_name}*** takes: $[[0]] damage}} Basically I wrapped the damage dice calculation before the /2 in inlines to isolate it from the /2. That means you don't need to multiply by 2 for the failed save.  The disadvantage there is that you cannot hover over the Makes Save part to see what dice were rolled, but you can still do that for the failed save so if you need to see the dice rolled, just check there.  An alternate way of doing it can be found below:  &{template:npcaction} {{name=Spell Attack}} [[[[(?{Cast at what level?|6,6|7,7|8,8|9,9}+4)d8]]/2]] {{description=**Save DC is:** 17 DEX **Damage Type:** (Lightning Damage) **Makes Save:** ***@{target|character_name}*** takes: **$[[1]]** damage. **Failed Save:** ***@{target|character_name}*** takes:  **$[[0]]** damage}} This method separates the calculation out into an area that will not be shown (between {{}} and {{}} areas ) and then calls both results. 
Gauss, Thank you so much for your help! I ended up using the "alternate way" that you provided. Ill be able to use that in some of my other macros. Thanks again for your help and your quick response. Steve