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

Creating Drop-Down Queries for API Script TrackerJacker

August 03 (6 years ago)

For reference here is the API script info for TrackerJacker, made by Ken L. ~3 years ago: TrackerJacker


This macro used to work about 1 month ago (I'm currently taking a break from DMing so I haven't used it for about as long), however when I came back to look at some things and copy macros over to a one shot game I noticed that this same exact macro no long works as intended for drop downs. My other drop-down macros for ability checks and such all still work so I think it is something unique to requesting an API script within the macro, this assumption however could be totally wrong so take it with a grain of salt.


Without further ado here is the macro as I have it written:

!tj -?{Status Marker Options|Add Status,addstatus ?{name}:?{duration}:?{direction}:?{message}|Edit Status (Current Token),edit|Add Favorite,addfav ?{name}:?{duration}:?{direction}:?{message}|List Favorite,-listfavs}


I have also tried making TrackerJacker macros using the script this way:

?{Status Marker Options|Add Status,!tj -addstatus ?{name}:?{duration}:?{direction}:?{message}|Edit Status (Current Token),!tj -edit|Add Favorite, !tj -addfav ?{name}:?{duration}:?{direction}:?{message}|List Favorite, !tj -listfavs}


Neither way has worked as intended, creating a selectable drop-down menu to pull each script from. I could always create these individually but I would rather not have 5+ macros on my bar just for one script which is why I created the drop-down version in the first place.



Any help or guidance you guys can give is really appreciated. I'm kind of at a loss here because I don't know what isn't working correctly. As stated in the beginning the top exact macro did at one time work.


Edit: Added a picture of what happens currently when running the macro, I get a query instead of a drop-down. The result is the same for both macro texts posted.

August 05 (6 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator

You've got two problems here.

1st; You need to use html encodings for nested roll templates. Based on the fact that you said this worked before, I'm guessing that you had this correct at some point, but then you ran into problem 2.

and 2nd; You've got the macro saved as a global macro. This is a BAD idea when you are using html replacements as the global macro editor will eat a level of html encoding every time you open and resave the macro. This is almost certainly why your macro has stopped working. I'd recommend using a macro mule character instead of using a global macro. I pretty much ignore global macros and don't use them for anything in my games because of the differences in how they are called and how syntax changes in them.

August 05 (6 years ago)

Edited August 05 (6 years ago)
Edit 2: I was wrong, someone else made this macro drop-down in the TrackerJacker thread... dumb dumb me must have copied and pasted that and it does have HTML scripting. THANK YOU! I should have just looked harder.


Firstly, Thank you for the reply! Having an extra brain in this is great.

I half agree with you, I do think that the extra curly brackets are interfering with the macro script however since I made the script as it is and never used HTML in its creation I don't think that is the problem, or at least not exactly the issue. I am very open to being wrong though.

There's also this weird coincidence, a very similar macro also for TrackerJacker works as intended right down to the extra curly bracket at the end.

Edit: Would this be considered a nested roll template though? It seems pretty straight forward to me because it's choosing an option in the drop-down and just inserting that directly after the "!tj -" command, at least that is the intent of the macro. Simply use the drop-down to add either command word and the relevant string of follow on, if any.