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

[help] !token-mod report writes everything twice

i made a script that works perfectly with tokenmod and apilogic but for some reason tokenmod report writes all its messages twice why? and how do i make it stop duplicating the code: (vars is a dummy character made to store stuff for later that had to be retrieved with roll20 because nothing else worked) !token-mod {{     --ids @{target|enemy|character_id}     {& if @(speaker.attackk) = 1}     --report     gm:control|"@(speaker.nazwa) wyzucił nat 1, {name} nawet nie musiał robić uniku(crit miss r @(speaker.attackk))"     all|"@(speaker.nazwa) kompletnie nie trafił"     {& elseif @(speaker.attackk) = 20} --set bar1_value|-[[@{vars|attack}+@{vars|attack}+@{vars|attrbon}]]     --report     gm:control|"@(speaker.nazwa) wyzucił nat 20, {name} oberwał za {bar1_value:abschange}, świetna robota(crit hit r @(speaker.attackk))"     all|"{name} żałuje że sie urodził"     {& elseif @{target|enemy|KP} <= @(vars.attackkk[0])} --set bar1_value|-[[@{vars|attack}+@{vars|attrbon}]]     --report     gm:control|"{name} dostaje wpierdol za {bar1_value:abschange} Hp od @(speaker.nazwa)(normal hit r @(vars.attackkk[0]) kp @{target|enemy|KP})"     all|"{name} oberwał od @(speaker.nazwa)"     {& else}     --report     gm:control|"@(speaker.nazwa) nie trafia(normal miss r @(vars.attackkk[0]) kp @{target|enemy|KP})"     all|"{name} unika ataku"     {& end} no }} example of the problem some limitations: I'm on jumpgate beta so anything involving zeroframe breaks immidately also it prevented chatsetattr script from working when added under it but only if i added --silent to it but i blame that on my poor coding skills
1726095876
The Aaron
Roll20 Production Team
API Scripter
If you try the same command without using the Zero Frame selectors, does it still output twice?  If it does, it's probably something to do with how you have control assigned and the fact that you're the GM.  If it doesn't, it's probably something with the order you have Zero Frame and TokenMod installed.
1726143776
timmaugh
Pro
API Scripter
Hmm... Even without ZeroFrame installed, APILogic should still register before TokenMod and be able to modify the message -- that is, it should still act like a metascript and be "first in line" to receive the message. So my guess is that this is either with the control assignment that Aaron mentioned, or it's a Jumpgate thing where certain scripts just aren't working, yet. In much the same way you are seeing ZeroFrame crash the Jumpgate sandbox, something like APILogic could pass the sandbox startup but then quietly not function in other ways that would (in this case) leave multiple things for TokenMod to do. I have it on my to-do list to get into a Jumpgate game and try to poke around with what might be going wrong, probably sometime in the next week. Roll20 has acknowledged the issue with Jumpgate and scripts not getting along, and (AFAIK) they've pointed to Sept 17 as the date when they plan to have "full mod support," so that's been the date I'm aiming at. When something like the MetaScript Toolbox, which has been proven to work on the existing sandbox model, doesn't work on some new platform, I don't know that there's much value in troubleshooting why that is while the platform is still a moving target and will probably change within the next week. But, for full transparency, because script authors haven't been given early access to (or input on, or just information about) the new system, if anything DOES change about the new platform and script authors have to update their code to work properly, Roll20 has unfortunately baked into the release a "lag" window where we can't even start documenting what needs to be changed, let alone writing and testing that code.
i have found the issue, i didn't use "--current-page" so it was modyfying bar1 on all tokens effectively multiplicating the messages and damage by the number of tokens