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

D&D 3.5 - Can I have a macro in a query call on an attribute from a sheet?

Hi,  I have a sheet built called "spellmule". In it I have built a macro for 75%-ish of the spells that are in 3.5 (so far). (they naming scheme is: acidsplash, aid, animatedead, arcanemark, basically all lowercase, no spaces) I want to have a "Cast A Spell" button for my players, and myself, that will call on those attributes. I assume that it has to either have an option to type in the attribute name, or it would have to be a massive drop down list with it built in for each spell, which seems like a lot. If anyone can show me/point me in the direction of, some examples of what might work best, that would be great. Thanks, Nick
1609945978
Ziechael
Forum Champion
Sheet Author
API Scripter
Totally doable, to best advise though it would be good to actually see your set up as there is some confused (understandably so) terminology here. You mention macros and attributes on a specific sheet but I'm suspecting (hoping) that you are actually referring to abilities on a journal... the good news is that all variations of the lingo would still allow you do what you want though :D With regards to massive drop downs... they aren't that bad once you learn that you can start to type and it will zoom to that section which quickly makes them much more usable. There are other ways to mitigate that as well, I've used class based filters to create bespoke lists for each character to limit the amount of bloat they'll see in a drop down... you could even expand that to a multi-query filtered list of class based, by level, option if you were so inclined?
1609947194

Edited 1609947254
Jordan C.
Pro
API Scripter
Dropdown is likely going to be the best option since you cannot fill in attribute/ability calls with queries (to my knowledge). You can sort of accomplish that by making a button out of the macro for the players to press in chat after picking a spell but that increases the amount of clicks which I'm not sure would be ideal.  As an example here is what I'm talking about: %{spellmule|aid} This works and calls the macro from the sheet for aid  Ability. %{spellmule|?{Which Spell?}} This does  not  work, even when escaping characters and providing a valid name for an ability in the sheet. [Cast Spell](!
%{spellmule|?{Which Spell?}}) This  kinda  works. You can type anything you want into the query and a button is created in chat. If it is a valid spell the button it creates will output the ability macro properly. ?{Which spell?|Aid, %{spellmule|aid} |Animate Dead, %{spellmule|animatedead}} This is the dropdown version, which requires more setup but eliminates the chat button creation.
1609971732

Edited 1609973738
@Ziechael, I'll try and post a photo with everything I'm talking about in one shot shortly. @Jordan, thanks. Based on those I think the dropdown is the way to go for me... is there a max to how many I can add into it before it bursts at the seams? lol
Okay, so here is the spellmule sheet I am using. I attempted to create a macro using the Dropdown example that was given, but it is not producing a dropdown when I hit test. It is just showing the text in the field, and if I hit submit, it casts Animate Dead. Not sure what happened, lol
1609976211

Edited 1609976633
Jordan C.
Pro
API Scripter
Based on the contents that I can see, you are using a template in the macro that's being called. That call gets parsed immediately and returns literal curly braces "}" at the end of the template parameters which creates a nested scenario. For each of the macros for the spells, the right curly braces would need to be escaped with  } If you need the spells in their current format for another use case there may be another solution. Edit: Here is a simple example of what I was describing &{template:default} {{name=Aid Spell}} {{Aid=Test description}} would be used for the Aid Spell ability macro instead of  &{template:default} {{name=Aid Spell&}} {{Aid=Test description}}
1610010482
Ziechael
Forum Champion
Sheet Author
API Scripter
As Jordan says, with your current set up you'll need to update EVERY conflicting character across the spectrum of abilities if you want to use a drop down to call them. Your best alternative, despite adding an extra click would be to go for the button route FROM a drop down selection: /w "@{selected|character_name}" [Cast Spell](!
%{spellmule| ?{Which Spell|acidsplash|aid|animatedead} }) With the above as a token action for each player they'd be able to call spells directly from the spellmule sheet without much extra set up on your part. Even creating, curating or customising the query list should be relatively easy with some basic excel-work since with this set up you only need to create a pipe separated list to plug into the query highlighted in bold above.