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

Roll20Async Framework update (now works with the API)

October 01 (1 year ago)

Edited October 02 (1 year ago)

I haven't been super active in a bit, but I did have a little time this week and thought I'd pop in to see how things were going here in the forums.  Low and behold, I found this:

    https://app.roll20.net/forum/post/10870121/onyxring-change-player-hack-incompatible-with-api

Turns out, some of my more "hacky" code (à la, "setActiveCharacterId"), which I use in the Roll20Async contribution, only worked in the browser.  Since API mods occasionally load sheetworker event handers into a server-side sandbox and execute them there, the browser-only code would, under this condition, fail.  Unpleasantly.  

So, I fixed this bug, and my tests show it all working as it is supposed to, both in the browser and on the server.  You can find the latest version at the following URL:

    https://github.com/onyxring/Roll20Async 

If you're not familiar with Roll20Async, it enables async/await patterns for getting and setting attributes, as well as making the age-old setTimeout() and setInterval() functions work properly. 

Here's my original post: https://app.roll20.net/forum/post/9225943/sheetworkers-script-to-add-support-for-settimeout-setinterval-and-async-slash-await

If anyone sees other issues with the library, please let me know.

Thanks!

October 11 (1 year ago)
John D.
Pro
Sheet Author

Incredible!  Thank you, Jim at OnyxRing, for this update.  I can't wait to get it installed.  Your work on this project is greatly appreciated!