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

Creating 'Master' Ability with nested Ability Options and inherited values

1624234178

Edited 1624234301
I've read through the Wiki and gone through a wide range of various forum posts on related subjects, and I still can't quite figure out what's causing my problems here. I'm attempting to condense a set of abilities into a single drop-down on the Macro Bar, rather than having the entire screen cluttered with an assortment of ability buttons. I know that I could just link the primary macro to the API Command button logic and have them display in the chat box, but I'd like to avoid that if at all possible. I can't tell if the issue is the HTML tag substitution, or if I'm missing something in the Primary button, if there's some weird inheritance rule that I'm missing, or any/all of the above. Primary Button code: 'Offensive' (line breaks added for visibility throughout, powers are set to whisper while debugging): ! ?{Use Charges|1|2|3|4|5} ?{Additional Bonuses|0|1|2|3|4|5|6|7|8|9|10} ?{Combat Text} ?{Activate Offensive Power|Static Shock,%Blast_StaticShock|Taser Fist,%Strike_TaserFist} Static Shock code: /w "Charger" /em ?{Combat Text&amp;#125; PL?{Use Charges&amp;#125; Static Shock! Result: [[1d6 + @{Charger|Coordination} + ?{Use Charges&amp;#125; + ?{Additional Bonuses&amp;#125;]] /w "Charger" &amp;{template:default&amp;#125; [[ @{Charger|Charges_VoltGauntlet} - ?{Use Charges&amp;#125; ]] {{name=SET CHARGES OF&amp;#125;&amp;#125; {{Volt Gauntlet to= $[[0]] &amp;#125;&amp;#125; Taser Fist code: /w "Charger" /em ?{Combat Text&amp;#125; PL?{Use Charges&amp;#125; Taser Fist! Result: [[1d6 + @{Charger|Prowess} + ?{Use Charges&amp;#125; + ?{Additional Bonuses&amp;#125;]] /w "Charger" &amp;{template:default&amp;#125; [[ @{Charger|Charges_VoltGauntlet&amp;#125; - ?{Use Charges&amp;#125; ]] {{name=SET CHARGES OF&amp;#125;&amp;#125; {{Volt Gauntlet to= $[[0]] &amp;#125;&amp;#125; Current behavior - I can activate the 'Offensive' button, and get the prompts for Charges, Bonuses, Combat Text, and the power selection without any problem. As soon as the power selection is made, nothing happens. Using one of the powers individually, with the above code, posts this to the chat: (To Charger): /em ?{Combat Text} PL?{Use Charges} Static Shock! Result: <span class="userscript-inlinerollresult showtip tipsy-n-right fullfail" title=" Rolling 1d6 + 4 + ?{Use Charges} + ?{Additional Bonuses} = ( 1 )">1 <span class="userscript-inlinerollresult showtip tipsy-n-right fullfail" title=" Rolling 1d6 + 4 + ?{Use Charges} + ?{Additional Bonuses} = ( 1 )"> (To Charger): &amp;{template:default} 5 {{name=SET CHARGES OF}} {{Volt Gauntlet to= 5 }} I do have a non-HTML'd version of the code that, when used individually, works correctly... so I know the base ability works. But stuffing it inside a wrapper is proving to be a pain. That version also has the Charges/Bonuses/CombatText code built in, so it is a self-contained entity. Help! <span class="userscript-inlinerollresult showtip tipsy-n-right fullfail" title=" Rolling 1d6 + 4 + ?{Use Charges} + ?{Additional Bonuses} = ( 1 )">
Your abilities need to be referenced as&nbsp; %{ability_name} &nbsp; you appear to be missing the curly brackets. You mentioned you added line-breaks for clarity; if your 'Offensive' macro is all on one line then the first line of the 'Activate Offensive Powers' query would be on the API command line causing it to get hidden. These two things together would make your final output would look like ! 1 0 does a combat %Blast_StaticShock Which would show nothing happening even though your answered all the queries. Try using this, including the line break as is ! ?{Use Charges|1|2|3|4|5} ?{Additional Bonuses|0|1|2|3|4|5|6|7|8|9|10} ?{Combat Text} ?{Activate Offensive Power|Static Shock,%{Blast_StaticShock}|Taser Fist,%{Strike_TaserFist}}
Ah-ha! Thank you! So that did it - when I read that, I remembered seeing something on another thread about how abilities need to be in %{charactername|ability_name} format, but I'd used the format for including them in the API button setup &gt;_&lt; So now, in the 'Offensive' code, it reads: ! ?{Use Charges|1|2|3|4|5} ?{Additional Bonuses|0|1|2|3|4|5|6|7|8|9|10} ?{Combat Text} ?{Activate Offensive Power|Static Shock,%{Charger|Blast_StaticShock}|Taser Fist,%{Charger|Strike_TaserFist} } Which works! And the line breaks were just added here for clarity - in my macro, they're standard lines. Just easier to read on the forums with the line breaks added in.