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 Server Update: 2025-02-03 -- disableSnapping, disableTokenMenu, Handout .set() crash, and Nested Rolls bugfix!

1738642239
The Aaron
Roll20 Production Team
API Scripter
Today we deployed some updates to the API Server! Is Drawing Split  (Jumpgate) Jumpgate got a new setting for tokens that lets you individually specify if a token should snap to the grid and if it should have the UI (bubbles and menu buttons on select).  In the UI, you can find those by right clicking the token and selecting Advanced Transform. On the API server, we've added two new properties on Graphic objects: disableSnapping -- set to true and a graphic won't snap to the grid. disableTokenMenu -- set to true and the bubbles and menu buttons won't be show on selection. These only have the above effects on Jumpgate of course.  On Legacy, they are just aliases for the existing isdrawing property.  Similarly, if you set the isdrawing property on Jumpgate, it will set both of these properties.  This allows scripts to still function whether on Jumpgate or Legacy.   For an example, you can look at TokenMod, which has been updated to add these properties. Handout .set() Crash There has long been a crash that happens when setting one of the text areas on Handouts (notes, gmnotes) and Characters (bio, gmnotes) while in a get call.  What that looked like was: handout.get('notes', n => { handout.set('notes', `${n}\nA new line!`); }); This bug has been corrected now and the above construct will work as expected! Nested  Rolls Bugfix There has long been a bug with nested inline rolls substituting the value of the result incorrectly. (I actually reported this in September 2019! )  What that would look like is is if you gave a roll like: [[1d6]] [[[1d8]]t[test-table]]] [[1t[test-table]]] The API would get back: $[[0]] $[[3]] 0 but expected $[[0]] $[[3]] $[[2]] This has now been fixed!  This should clear up several issues that have been happening over the years with RecursiveTable and ScriptCards.
The Aaron said: Today we deployed some updates to the API Server! Nested  Rolls Bugfix There has long been a bug with nested inline rolls substituting the value of the result incorrectly. (I actually reported this in September 2019! )  What that would look like is is if you gave a roll like: [[1d6]] [[[1d8]]t[test-table]]] [[1t[test-table]]] The API would get back: $[[0]] $[[3]] 0 but expected $[[0]] $[[3]] $[[2]] This has now been fixed!  This should clear up several issues that have been happening over the years with RecursiveTable and ScriptCards. Awesome, thank you!  Is this deployed to the standard script sandbox, or only on Experimental?  timmaugh mentioned that you may have also fixed the API dropped line bug as well? Or is that separate and still something you're working on?
1738644181
The Aaron
Roll20 Production Team
API Scripter
Good callout!  Those are all deployed to both Default and Experimental Mod (API) Servers.  Regarding the multiline dropped messages, I have fixed the bug, but it is still in QA. You can expect it sometime soon though, I imagine. 
1738680956
timmaugh
Pro
API Scripter