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

Issue with calling Character Sheet Macros from drop down menu

Hi Everyone, I am facing a rather puzzling behaviour. I have been trying to get a a drop down menu to offer a choice between a set of macros created in a character sheet, here below an example: &amp;{template:default} {{name=List of Careers}}{{?{Select Career|[Acrobat](~Acrobat)|[Actor]|(~Actor)|[Agitator](~Agitator)|[Alchemists' Apprentice](~Alchemists'-Apprentice)}}} If I look at the link created under the button I see this "<a href="https://app.roll20.net/editor/~Acrobat" rel="nofollow">https://app.roll20.net/editor/~Acrobat</a>" which is not what I would expect "<a href="https://app.roll20.net/editor/~-MWFFi5dq5hRA3lnvZz6%7CAcrobat" rel="nofollow">https://app.roll20.net/editor/~-MWFFi5dq5hRA3lnvZz6%7CAcrobat</a>" I can manage to get this working but only if I use macros created in the collection like this&nbsp; &amp;{template:default} {{name=List of Careers}}{{?{Select Career|[Acrobat](!&amp;#13;Acrobat)|[Actor]|(!&amp;#13;#Actor)|[Agitator](!&amp;#13;#Agitator)|[Alchemists' Apprentice](!&amp;#13;#Alchemists'-Apprentice)}}} I even tried the following: &amp;{template:default} {{name=List of Careers}}{{?{Select Career|[Acrobat](~-MWFFi5dq5hRA3lnvZz6%7CAcrobat)|[Actor]|(~-MWFFi5dq5hRA3lnvZz6%7CActor)|[Agitator](~Agitator)|[Alchemists' Apprentice](~-MWFFi5dq5hRA3lnvZz6%7CAlchemists'-Apprentice)}}} At this point I get the right link but when I look through inspect to the html I can see that the hyperlink created is not what expected &lt;a href="~-MWFFi5dq5hRA3lnvZz6%7CAcrobat"&gt;Acrobat&lt;/a&gt; &lt;a href="~-MWFFi5dq5hRA3lnvZz6|Acrobat"&gt;Acrobat&lt;/a&gt; and therefore when I press the button, instead of launching the macro I get redirected to "Page Not Found". By the way I also cannot manage to make the following work even for macros available in collection: &amp;{template:default} {{name=List of Careers}}{{?{Select Career|Acrobat, [Acrobat](!&amp;#13;Acrobat)|Actor, [Actor]|(!&amp;#13;#Actor)|Agitator, [Agitator](!&amp;#13;#Agitator)|Alchemists' Apprentice, [Alchemists' Apprentice](!&amp;#13;#Alchemists'-Apprentice)}}} Anybody knows how solve this? Thanks in advance...
1617015276
Ziechael
Forum Champion
Sheet Author
API Scripter
Not sure how I missed this one... sorry for the delay. Ability buttons don't seem to play nice with queries... I've got a couple of options for you if you like: &amp;{template:default} {{name=List of Careers}}{{[Acrobat](~Acrobat)[Actor](~Actor)[Agitator](~Agitator)[Alchemists' Apprentice](~Alchemists'-Apprentice)}} ^^ straight up chat menu of buttons linked to a characters abilities, the lack of query means you can also use the %{&lt;char name/selected/target&gt;|&lt;ability name&gt;} syntax if needed. For the collections macro you can use a query like this: &amp;{template:default} {{name=List of Careers}}{{?{Select Career|Acrobat,[Acrobat](!&amp;#13;#Acrobat )|Actor,[Actor](!&amp;#13;#Actor )|Agitator,[Agitator](!&amp;#13;#Agitator )|Alchemists' Apprentice,[Alchemists' Apprentice](!&amp;#13;#Alchemists'-Apprentice )}}} Basically the same as you had but there were a number of flaws, you need a space at the end of the macro name in the button and there were some misplaced query syntax that I cleaned up for you.
Hi Ziechael, many thanks. Do I understand well, though, that the drop down menu with "Ability" Macros is not an option? If it is the case do you know why such a choice was made? The advantage of having macros in a character sheet is that they can be easily moved from one game to another... Option one you offered, is fine but, the macro menu I will have to create will contain almost 100 careers and a drop down menu would have definitively been a better choice.
1617048901
Ziechael
Forum Champion
Sheet Author
API Scripter
Found time to have a play around... how about this: &amp;{template:default} {{name=List of Careers}}{{?{Select Career|Acrobat,[Acrobat](&amp;#126;target&amp;#124;Acrobat)|Actor,[Actor](&amp;#126;target&amp;#124;Actor)|Agitator,[Agitator](&amp;#126;target&amp;#124;Agitator)}}} It uses sheet abilities and the target syntax to allow you to choose a token to run the ability from (without target/selected or hardcoded values the button won't know where to run the ability from).
Thanks Ziechael, it worked like a charm...