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

ZeroFrame output I haven't seen before - displaying a scripts priority

I have not touched this game much recently but have started tinkering again and when I last left it, everything was working as intended as far as I was aware. I have a macro that prompts the user through a series of queries and then displays a result in chat to compute a total modifier. Here is the macro code: !?{Running|No,0|Yes,-2} !?{Unstable platform|No,0|Yes,-2} !?{Lighting|Normal,0|Dim,-1|Dark and ≤10" range,-2|Dark,-4} !?{Actions|1|2|3} !?{Recoil|RoF 1,0|RoF 2+,-2} !?{Range|Close,0|Medium,-2|Long,-4} !?{Target Cover|None,0|Light 1/4,-2|Medium 1/2,-4|Prone and range ≥3",-4|Heavy 3/4,-6|Near total 7/8,-8} !?{Target Vulnerable|No,0|Yes,2} **Range Modifiers**:  ATTACKER Running [[?{Running}]] + Unstable platform [[?{Unstable platform}]] + Lighting [[?{Lighting}]] + ?{Actions} Actions [[(?{Actions}-1)*-2]] + Recoil [[?{Recoil}]] + Range [[?{Range}]] + DEFENDER Cover [[?{Target Cover}]] + Vulnerable [[?{Target Vulnerable}]] =  ``Total`` [[?{Running} + ?{Unstable platform} + ?{Lighting} + (?{Actions}-1)*-2 + ?{Recoil} + ?{Range} + ?{Target Cover} + ?{Target Vulnerable}]] It actually works, as it had before, but now it also outputs a zeroframe output with the apilogic priority value into chat 7 times. I inserted a screenshot below. The message from API actually outputs 7 times but I only included one as an example. Thanks in advance!
1671507112
timmaugh
Forum Champion
API Scripter
Hey, Robert... That's happening because ZeroFrame, for all that it acts on a message intended for some other recipient script, actually also sits on the script handle "0" as a way to show the order of metascripts that are registered to it. So if you run: !0 You'll see that screen, or something like it. Here's mine: If you pick "0" from one of your queries, you are effectively sending the "!0" message to the Script Moderator. It doesn't look like those messages are even doing anything for you... you're just establishing the values for your various queries. You can solve this in a number of ways: 1) turn the output into a template and put those queries between the component parts of the template (text between the parts isn't printed: &{template:default}{{name=Proof of Concept}} You'll never see this {{Included=But you will see this}} Put the queries between the parts, but then have your final message actually in the template (so that it is seen). 2) include junk script handles (handles that aren't recognized by any script you have installed: !Scrumptralescent ?{Running|No,0|Yes,-2} Unless you have a script that answers the handle "Scrumptralescent", that message won't trigger a script.
Option 1 worked for me and that output looks better anyway!