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

help with a extra damage macro for token action

1695513586

Edited 1695513869
I'm currently playing a DnD 5e campaign as a way of the living weapon monk with the new talents from Glory of the Giants and have embarked on the task of creating a macro that would be used to roll extra damage dice. I made a button on it that activates a Query that asks which resources will be used on each roll, and it kinda worked, but I'm still having some specific problems. The macro structure was as follows: @{selected|wtype}&{template:simple} {{rname=lightning}} {{r1=?{Extra damage?|No,[[0]]|Yes,[[?{Strike of the giants?|No,[[0]]|Yes,[[1d6]]}+?{Manifest Blows?|No,[[0]]|Yes,[[1d6]]}+?{Forged Heart?|No,[[0]]|Yes,[[2d6]]}+?{Eldritch Claw?|No,[[0]]|Yes,[[1d6]]} }} {{normal=1}} @{Selected|charname_output} as an abillitie in the character sheet and [extra damage](~Gale Strum|Extra-damage) on the description of the attack. The main problem is that two yes or no options have appeared in the first query, in the first option (both yes or no) nothing in the macro works correctly, and in the second it works just fine. How exactly can I eliminate this failed option? I've already tried changing spaces, adding codes and checking if the macros are closed correctly but nothing seemed to work.
1695648254
Ziechael
Forum Champion
Sheet Author
API Scripter
Queries read from { to the first } they find (outside of ability calls). You need to escape nested queries with their html equivalent: @{selected|wtype}&{template:simple} {{rname=lightning}} {{r1=?{Extra damage?|No,[[0]]|Yes,[[?{Strike of the giants?|No,[[0]]|Yes,[[1d6]]}+?{Manifest Blows?|No,[[0]]|Yes,[[1d6]]}+?{Forged Heart?|No,[[0]]|Yes,[[2d6]]}+?{Eldritch Claw?|No,[[0]]|Yes,[[1d6]] }}]] }} {{normal=1}} @{Selected|charname_output}
1695648322

Edited 1695648663
Ziechael
Forum Champion
Sheet Author
API Scripter
I'd also consider annotating your damage so you can see where it came from for audit reasons, removing redundant [[]] will help too: @{selected|wtype}&{template:simple} {{rname=lightning}} {{r1=[[?{Extra damage?|No,0|Yes,?{Strike of the giants?|No,0|Yes,1d6}[SotG] +?{Manifest Blows?|No,0|Yes,1d6}[MB] +?{Forged Heart?|No,0|Yes,2d6} [FH] +?{Eldritch Claw?|No,0|Yes,1d6 } [EC]} ]] }} {{normal=1}} @{Selected|charname_output}