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 .
×

SOTDL Nesting Boons and Banes

1640745497

Edited 1640745563
I'm presently trying to build a macro (as an Ability button) that gives the character an option of performing a special attack. The intent is that they'll choose a special attack from a dropdown menu, and the macro will describe the details. Here's what I've got so far: &{template:default} {{name=Special Attack}} {{?{Which Maneuver?| Driving Attack, **@{name} performs a Driving Attack with her @{repeating_weapons_$0_weapon_name}:** [[1d20 + @{str_mod} + ?{#Boons-#Banes}d6k1 ]] for [[@{repeating_weapons_$0_weapon_damage}]] damage, driving her target back @{strength_mod} yards. That bolded part is the problem I'm having. I can get the macro to run, but when written like this, it doesn't query the player to input Boons and Banes and instead spits out a value of  ?{Boons-Banesd6k1 as part of the attack calculation. If I write it like this instead: &{template:default} {{name=Special Attack}} {{?{Which Maneuver?| Driving Attack, **@{name} performs a Driving Attack with her @{repeating_weapons_$0_weapon_name}:** [[1d20 + @{strength_mod} + ?{#Boons}d6k1 - ?{#Banes}d6k1 ]] for [[@{repeating_weapons_$0_weapon_damage}]] damage, driving her target back @{strength_mod} yards. Then it queries the player for Boon/Banes, but in the form of  #Boons}d6k1 - ?{#Banes. Instead of requesting two values, it only requests one, with this bizarre looking parse.  I can't for the life of me figure out what I'm doing wrong and am coming to the end of my rope.
UPDATE:  I realized there was a missing bracket. I can run the macro "correctly" now, but now I have a new problem.  The only way I can get all the values to parse accurately is with this equation: &{template:default} {{name=Special Attack}} {{?{Which Maneuver?|Driving Attack, **@{name} performs a Driving Attack with her @{repeating_weapons_$0_weapon_name}:** [[1d20 + @{strength_mod}]] + [[(?{Boons|0}} - ?{Banes|1})d6k1]] for [[@{repeating_weapons_$0_weapon_damage}]] damage, driving her target back @{strength_mod} yards ... But when I write it that way, it ends up spitting out two values -- [[1d20+mod]]+[[Xd6k1]] -- instead of one whole number for the attack roll. This is an accurate number, but an annoying one, and defeats the purpose. If I try and nest the second inline roll inside the first, everything goes wonky really quick.
1640793062
David M.
Pro
API Scripter
You can wrap all of the roll components into a single inline roll, though you will lose some tooltips for the components [[ [[1d20 + @{strength_mod}]] + [[(?{Boons|0}} - ?{Banes|1})d6k1]] ]]
It worked! This was helpful, thank you, David. This is what I have now: &{template:default} {{name=Special Attack}}  ?{Which Maneuver?| Driving Attack, **@{name} performs a Driving Attack with her @{repeating_weapons_$0_weapon_name}:** [[ [[1d20 [Raw Roll] + @{strength_mod} [Strength] ]] + [[(?{Boons|0}} - ?{Banes|1})d6k1 [Boons and Banes] ]] ]] for [[@{repeating_weapons_$0_weapon_damage}]] damage (+ [[@{repeating_weapons_$0_weapon_damage}]] and **Stun** on [[20+]]), **driving her target back @{strength_mod} yards.** | Guarded Attack, **@{name} performs a Guarded Attack with her @{repeating_weapons_$0_weapon_name}:** [[ [[1d20 [Raw Roll] + @{strength_mod} [Strength] ]] + [[(?{Boons|0}} - ?{Banes|1})d6k1 [Boons and Banes] ]] ]] for [[@{repeating_weapons_$0_weapon_damage}]] damage (+ [[@{repeating_weapons_$0_weapon_damage}]] and **Stun** on [[20+]]), **gaining 1 boon to Defense for the rest of the round** As you can see, I've tried adding another maneuver to the dropdown menu... And as you can probably guess, it isn't working. Is this just too complicated of a string to fit into one macro? Would I be better off making separate buttons for each of these?