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

Macro Queries that dropbox a list of Macros

1418012023

Edited 1418012056
Is there a way to write a macro that when used will have a Querie that allows the player to type in another macro? For example look for a moment at the following macros. #greatshadowconj: /em casts shadow conjuration to imitate ?{Macro} #fireball: Fireball, a sphere of flames that explodes doing [[(?{Caster Level|@{Shadow Mage|Caster Level}})d6]] (Maximum 10 D 6) Fire Damage in a 20ft radius spread at a range of [[((?{range|@{Shadow Mage|Caster Level}})*40)+400]] feet. Reflex Save for Half. #SummonMonster1: Summon Monster 1, conjuring a ?{Monster} to aid thee for [[?{duration|@{Shadow Mage|Caster Level}}]] rounds. I was wondering if it would be possible to for example use the macro #greatshadowconj and upon clicking it, a pop-up box would appear which would allow me to either type in the name of the spell I want, or if I were to type in # immediately a list of macros would appear where I can choose the macro desired such as #fireball or #SummonMonster1. Even if I would have to type in the entire macro, is something like this possible?
1418020972
The Aaron
Roll20 Production Team
API Scripter
Not sure I completely understand what you're asking, but I'm pretty sure the answer is no. It has to do with the order of operations: <a href="https://wiki.roll20.net/Dice_Reference#Order_of_Op" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Order_of_Op</a>... Macros are expanded at step 2. Queries are step 3. That means there would be no expansion of your macro after the name was substituted during step 3.
The Macro system doesn't allow you to pull in another macro through a Query. ie: You can't Query for an Attribute name and get the value, it will only get the text. So unfortunately, no. You won't be able to use a Query to prompt for a macro name, and definitely not a drop-down list of values, macro or otherwise.