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

TokenMod Question

This is giving me errors !token-mod --set advantagetoggle|{{query=1}} {{advantage=1}} {{r2=[[@{d20} Is there a way to pass in the brackets?  I tried HTML codes but they didn't work either (I think I have them in the correct spots) !token-mod --set advantagetoggle|{{query=1}} {{advantage=1}} {{r2=[[@{d20}
1620255897
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Not in a place where I can test, ATM, but you could try quotes: !token-mod --set advantagetoggle|"{{query=1}} {{advantage=1}} {{r2=[[@{d20}" or !token-mod --set advantagetoggle|"{{query=1}} {{advantage=1}} {{r2=[[@{d20}"
Good idea, but no go.  It gives "TypeError: h is undefined".  I'm trying to find a way on the OGL sheet to flip the Adv/Normal/Dis flag without having to go into the monster sheet. The original commands don't give an error, but the attribute is just not changed :(
1620260209
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Derp . Actually, I wasn't reading carefully. Token-mod will never do this. advantagetoggle is not a token attribute. It's a character sheet attribute. You need ChatSetAttr.
Ok, good point LOL.  What about this one !token-mod {{     bar1_max|@{selected|hp} }} Before I run the above After I run it it is still empty :(
1620277688
The Aaron
Roll20 Production Team
API Scripter
You need a --set in front of the bar1_max. Btw, you can use bar1 to set current and max at the same time. 
The Aaron said: You need a --set in front of the bar1_max. Btw, you can use bar1 to set current and max at the same time.  DERP, I missed that.  And yeah I know, but I am using bar1_link to link to the characters HP, but the max is not getting set when I do that, so the health bar is not showing up.  Thanks Aaron
Is there a setting in token-mod to set the Night Vision Effect?  I found all the others, but this one is alluding me
1620485689
The Aaron
Roll20 Production Team
API Scripter
It's not exposed to the API yet, but I've heard that it's coming...
1620485955
Gold
Forum Champion
I think "Nocturnal" is something Roll20 Team has pledged to make-available to API, but isn't available yet. Nocturnal feature is new, a new part of the UDL, and they're still working on allowing API to control the UDL settings.
it's probably still not exposed, is it? 
1622815311
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I didn't see it in the announcement.
1622819873
The Aaron
Roll20 Production Team
API Scripter
Night vision effect is exposed now, TokenMod supports it: !token-mod --set night_vision_effect|nocturnal
1622820609
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
All the toys!
Hurray!  Thanks a lot The Aaron to implement this option so quickly :)