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

Incoming Changes Friday

There are several new API change incoming Friday. In preparation for that, I'm working on updating the API docs on the wiki. So if there are new things on the wiki you see, they may not actually be active yet, and I wouldn't necessarily attempt to use them yet. However, some properties are changing from read-only to read/write, such as the "represents" property on Graphic objects. That means your scripts that previously used .get("_represents") need to be updated to .get("represents"). However, to ease the transition I've put a shim in place so that existing scripts should keep working properly. The one exception to this is with events. If you have any scripts that do (for example) "change:token:_represents" you should update them when you get a chance to "change:token:represents". This change is effective on the Dev Server as of today. Here's a list of things that changed from read-only to read/write: represents avatar bar1_link bar2_link bar3_link There will be much more coming Friday and a more thorough explanation, but I wanted to get this posted in case anyone was planning to use the API for a game before then, since it may affect your scripts. Thanks!
I have no clue what's in store, and yet I'm already excited!
1384407341
Lithl
Pro
Sheet Author
API Scripter
Riley D. said: However, some properties are changing from read-only to read/write, such as the "represents" property on Graphic objects. That means your scripts that previously used .get("_represents") need to be updated to .get("represents"). However, to ease the transition I've put a shim in place so that existing scripts should keep working properly. I'd like to make a point: It's probably a good idea for us coders to drop the leading underscore on calls to get , as that method is already prepending the underscore if necessary. Then, if a property changes like it is here, the code doesn't need alteration. The only "exception" I know of at the moment is the msg.selected array, the elements of which have the properties _id and _type; this is only sort of an exception to the above rule, since you're not using get to access them (the array elements are normal JS objects, not Roll20 objects).
Any chance of getting page is made read/write?
super excited. Can't wait to see what is in store.