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

Calling Macros from a Dropdown

September 13 (4 years ago)

Hey all,

I have a barbarian in my party that is playing as a Storm Herald.  When she rages, I want her to be able to select the aura she is going to use (Desert, Sea, or Tundra) and have an aura with a corresponding color pop up around her that shows her area of effect.  My plan is to add some additional features once I get the basic part rolling, but I'm running into an issue.  The macro I'm using to call the other macros is as follows:

?{Aura|

Desert Aura, #DesertAura |
Sea Aura, #SeaAura |
Tundra Aura, #TundraAura |
End Aura, #EndAura

}


When the macro is selected from the dropdown, it just enters the text for the called macro in chat instead of executing it.  Is there a way to circumvent this without creating a "Use" type button in the chat menu?  The called macros are in the Collection, and link correctly when I enter the script above.  When I run them on their own, they work just fine.  Any help or suggestions would be most appreciated.


Thanks!

September 14 (4 years ago)

Edited September 14 (4 years ago)
Oosh
Sheet Author
API Scripter

This is an issue with Queries and Order of Operations: Those macro calls are replaced with the macro text before much else happens, and a bunch of characters in those macros can break the Query. I'd recommend using a Chat Menu - move those 4 macros to your Barbarians Attributes & Abilities tab as Ability macros, then make something like this, save it as a 5th macro for them and they can put it on their macro bar:

&{template:npcaction} {{rname=Storm Herald Aura}} {{name=Class Ability}} {{description=**Choose Aura:**
[Desert Aura](~DesertAura)
[Sea Aura](~SeaAura)
[Tundra Aura](~TundraAura)

[End Aura](~EndAura)}}


Note that those button links won't function properly using the test button on the character sheet, you'll need to save it with the tick before running it.


The other option is to go through HTML replacement on all your other macros, which will no longer function unless they are called from a Query. If you're planning on adding API commands as well (for the token aura etc.), to each option in your Query.... good luck!

September 15 (4 years ago)

That worked great! Thanks so much!!