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

Condition Macro Help

Can anyone help me understand why this macro isn't working in Jumpgate? All the Mod (APIs) are installed and an older version works using custom style tags, but now that Jumpgate displays text in a pleasing format I'd prefer to just use that for simplicity sake. When I run the macro in game it just shows the "None" and "Attack Advantage" selections. All the macros work properly if done individually. Thanks in advance! ?{Condition| None, !token-mod  --set statusmarkers#-overdrive#-bleeding-eye | Attack Advantage, !token-mod  --set statusmarkers#!overdrive [&{template:default} {{name=Advantage Next Attack}} {{@{selected|token_name} has Advantage on their next attack roll}}] !markerids overdrive | Attack Disadvantage, !token-mod  --set statusmarkers#!bleeding-eye [&{template:default} {{name=Disadvantage Next Attack}} {{@{selected|token_name} has Disadvantage on their next attack roll}}] !markerids bleeding-eye }
1745709978
timmaugh
Forum Champion
API Scripter
You're running into the requirement for HTML Replacements . Basically, there are 3 characters that affect the parser when it comes to a query: | } and , Those tell the parser to move on to the next component of the query... so if you have one of those in the query that SHOULDN'T control the query (like the right brace characters in your template), it will prematurely END the query, and you won't see all of the verbiage for that choice, let alone the rest of the options in the query. According to the Roll20 order of operations , attributes and abilities will resolve before your query is processed, so characters that compose those references do not have to be replaced. So you can go that path and perform the replacements... but then I think you'll run into another issue with multi-line query returns (one for TokenMod, one for the template, one for markerids). I don't think those will work. If it were me, I would install the MetascriptToolbox, and structure your command more like this: !{{   {&if ?{Condition|None|Attack Advantage|Attack Disadvantage} = None}     !token-mod  --set statusmarkers#-overdrive#-bleeding-eye   {&elseif ?{Condition} = 'Attack Advantage'}     !token-mod  --set statusmarkers#!overdrive     !markerids overdrive     (^){^&template:default} ({)name=Advantage Next Attack(}) ({(@{selected|token_name} has Advantage on their next attack roll(})   {&else}     !token-mod  --set statusmarkers#!bleeding-eye     !markerids bleeding-eye     (^){^&template:default} ({)name=Disadvantage Next Attack(}) ({)@{selected|token_name} has Disadvantage on their next attack roll(})   {&end} }} I air-coded that, but I think it's right. After you install the Toolbox, you might need to run a configuration command for one of the metascripts in the toolbox. Run this command one time in your game, then try the above command: !smconfig +playerid +who There is a lot going on in the longer command line, above, and I can explain if you end up going that direction and want to learn more. Sometimes people don't want to know, and sometimes they end up going the alternate direction (like HTML substitutions), so I'll wait to hear whether you're wanting to try this metascript solution before I explain more of what's going on.
Thanks for the response & ideas. I'll give the Toolbox a try when I have the time. I appreciate it!