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

API set token Bar Location and Bar Style?

1579594505

Edited 1579594562
Chris D.
Pro
Sheet Author
API Scripter
Compendium Curator
I can't figure out how to set a tokens Bar Location and Bar Style via the API.  The feature was added most of a year ago, so the API should have caught up long since. I have a routine that links tokens how I like them, but can't figure out how to set Bar Location to Bottom Overlay.  I looked in the raw token object, and found two new undocumented elements "sides" and "currentSide", but that does not seem to be it.  How are these set?
Following since I'm eager to find out too :) - Presumably you're talking about the tokenmod API? I know that at the time, the author (Aaron? I think) was trying to get details from the roll20 so that he could implement the changes in his code accordingly, but they were not very forth-coming at the time. I'm sure you didn't mean anything by it, but when you said " the API should have caught up long since. ", it kinda struck a bit of a nerve with me, the people that write all these amazing scripts and codes usually do it completely for free, and are often on hand to help pretty much every person that asks for their help.
1579608004

Edited 1579609095
Chris D.
Pro
Sheet Author
API Scripter
Compendium Curator
No, I am not talking about tokenmod or any one API script, I am talking about the Application Programming Interface that allows us to write API scripts. ie: I am trying to write a script that does this, but can't find the elements to modify. I think they ether don't exist or are too obscure. 
1579611109

Edited 1579611262
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The API doesn't currently have access to many of the new token features. Pretty much any token attribute added in the last year or two, except for the custom statusmarkers. Getting access is apparently being worked on. Edit: sides and current side are for manipulating multi-sided tokens
Chris D. said: No, I am not talking about tokenmod or any one API script, I am talking about the Application Programming Interface that allows us to write API scripts. ie: I am trying to write a script that does this, but can't find the elements to modify. I think they ether don't exist or are too obscure.  Ah... in that case. Apologies! I take it all back :)