Advertisement Create a free account
This post has been closed. You can still view previous posts, but you can't post any new replies.

Update 4/5: API One-Click Install, New API Architecture, Character Sheet Zooming, Infinite Deck fixes, and more!

1459872545

Edited 1459874839
Riley D.
Roll20 Team
Hello everyone! We've got a very exciting new update out for you today. Read on for the details: API One-Click Install The API has always been one our best Pro-level features, but until now it's required at least some amount of familiarity with coding and scripting to use it. Starting today, though, all Pro users have access to a library of "one click install" scripts which don't require any additional setup or copying/pasting code and work "right out of the box" on your game! You'll now find a new tab in your API menu called "Script Library" that will have a vetted list of pre-approved API Scripts, similar to the list of community Character Sheets. These are scripts that have been generously contributed by community members for everyone to use. Some offer the ability to customize them in simple ways as well. As scripts are added to your game it will automatically determine what dependencies and conflicts the script you're adding has and will notify you accordingly.&nbsp;Another great feature of this system is that as script authors release a new version of their script, you'll automatically get the upgrade without needing to manage that part of it yourself. It's quick, easy, and accessible -- give it a try! Finally, if you have been using a script and really want to get in and make some changes, you can import it as a custom script in one-click (so no more needing to go and copy/paste from Github). Note that if you do that, you'll no longer get the latest version of the script automatically, so proceed with caution! Script Authors, if you're interested in having your scripts added to the approved script list, there are a handful of steps you need to do, even if your script is already included in the API repository. In particular, there is a&nbsp;new file structure required for supported scripts, to allow for versioning and backwards compatibility, as well as additional fields that need to be added to your script.json file. To take a look at an example file structure and completed script.json check out the example script provided in the repository. New API Architecture Today we're pleased to roll out a major new project that we've been working on for the past couple of months. In particular, we have completely re-done the way that the API server architecture works behind the scenes. Previously we were using a method based around spawning lots of individual node processes. However, these weren't very well contained, could easily interfere with each other, and could lead to other issues such as the dreaded "PORT IN USE" error. We've gone back and redone this backend to take advantage of Docker ( <a href="https://en.wikipedia.org/wiki/Docker_(software)" rel="nofollow">https://en.wikipedia.org/wiki/Docker_(software)</a> ) containers, which is a fantastic new-ish technology which allows us to run each API sandbox in its own "Virtual Machine container". These containers are completely separate from each other, and have much better resource tracking and sharing capabilities. In addition, the API that the Docker ecosystem provides gives us better control over making sure that sandboxes spin up when they are supposed to, and spin down when we think they need to. Finally, this new architecture allows us to no longer need to run each API sandbox on the same server that it's run on in the past, which should allow us to make our architecture fully modular, spinning up and spinning down capacity for the API as needed during peak times. So, if you run an API script, you will now be running on this new system. In theory everything should be largely transparent, the API scripting interface and logging should continue to work the same. However, if you do notice that any scripts aren't working properly or that you are getting unexpected behavior, don't hesitate to let me know so that I can investigate. Character Sheet Zooming We've added a "Zoom" button which will appear in the Character Sheet and Handout dialog boxes. This allows you to easily "zoom in" (or out) of the sheet/handout if you want to make the text and images larger or smaller. Unlike using the browser's built-in zoom (which we don't encourage), using this zoom feature will not break anything else in your Roll20 game, and it won't cause the formatting of your sheet to become incorrect. It just works! Infinite Deck Fixes We've upgraded our support for using Infinite Decks, and now you'll see some additional options that allow you to specify how you want the deck to behave (for example, if you have multiple cards in your infinite deck, do we give a random one every time? Or always deal them in the same order?) You'll also notice that when you "Recall" cards from the tabletop/player's hands when using an infinite deck, it now works correctly instead of only recalling some of the cards.
1459873043
The Aaron
Forum Champion
API Scripter
SWEET!!!! &nbsp;I can't wait to roll out some new things for the API. &nbsp;=D
1459874880

Edited 1459875238
Ravenknight
KS Backer
The Aaron said: SWEET!!!! &nbsp;I can't wait to roll out some new things for the API. &nbsp;=D See? I knew he was going to write that... Ontopic: Everything seems to work as intended as long as I refreshed some settings. Great work guys.
1459880633
Lucian
Pro
API Scripter
Hey Riley, Looks cool - have a lot of work to do to take advantage of it all! I think I've found a bug though - the old chestnut of abilities not rolling when sent via sendChat seems to have crept back in after the API update. I used to be able to get a roll result with %{Beholder|npc_hp} (which works in chat), but since the update that's stopped working. Perhaps you've regressed the fix you made recently?&nbsp; Cheers, Lucian
1459883389
The zooming doesn't work for popped out characters and handouts (no zoom button) unless you first zoom before popping out. I assume this feature was intended this way?
1459883466

Edited 1459884199
Riley D.
Roll20 Team
Lucian H. said: Hey Riley, Looks cool - have a lot of work to do to take advantage of it all! I think I've found a bug though - the old chestnut of abilities not rolling when sent via sendChat seems to have crept back in after the API update. I used to be able to get a roll result with %{Beholder|npc_hp} (which works in chat), but since the update that's stopped working. Perhaps you've regressed the fix you made recently?&nbsp; Cheers, Lucian Hmm yeah something might have gotten messed up in the merge, I'll take a look. EDIT: Okay I think I have that fixed. Let me know if you notice any other issues. Thanks!
1459890011
I seem to be getting errors with the Companion and spell tracking on some of my characters (not all). I'm sure its my mistake but I cant seem to figure it out: TypeError: Cannot read property 'get' of undefined at resolveslot (apiscript.js:379:34) at handleslotspell (apiscript.js:365:5) at apiscript.js:150:17 at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:105:34), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:105:34), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1163:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) Think someone can give me a hand so I can face palm? :D
1459890808
The Aaron
Forum Champion
API Scripter
Do you have a link to the code?
1459891311

Edited 1459891967
I'm confused as to what that means lol, like an imgur?
1459891834
The Aaron
Forum Champion
API Scripter
Sorry, I meant the source code to the script you're having the issue in, specifcially the one for spell slots as that seems to have the error.
1459892004
Ohh its the 5e ogl companion&nbsp;
1459893575

Edited 1459893765
The Aaron
Forum Champion
API Scripter
I see. &nbsp;The crash is on line 283. &nbsp;On line 273 it gets the charslot, on 274 it checks if it's a valid object and replaces it on line 276 with another findObjs() call. &nbsp;However, it doesn't bother to check if that find failed and so line 283 tries to execute .get() on undefined and crashes the script. &nbsp;Probably your character's spell slot for whichever level it was trying to look for is in the default state, which means findObjs() wouldn't be able to locate it and getAttrByName() needs to be used instead. I'm not overly familiar with this script (this is actually the first time I think I've looked at it). &nbsp;Possibly it expects to have setup all the attribute objects ahead of time either by the use of sheet workers or by something earlier in the script. &nbsp;If you go to the character in question and manually set the slots initially to some value it should force creation of the attribute objects and let the script run. Edit: Actually, line 275 creates the attribute if it didn't exist. &nbsp;I'm not sure why the findObjs() call was used in that case as createObj() returns the created object, but this might indicate a race condition in the new API server.
1459894005
:o
1459894929
Riley D.
Roll20 Team
Okay I pushed out a fix which I think should solve this. You'll need to go to the 5E Sheet Companion tab and click on "Save Scripts" to re-load the new version though if you're already in your game (if you're not already playing right now it will automatically use the new version the next time you load your game). Let me know if it worked!
1459898050
Andrew R.
Pro
Sheet Author
I just changed my games using the API One-Click Install. It's very nice. Thank you!
1459901732
Awesome thank you :D
1459908166

Edited 1459908226
It appears to be crashing randomly now as well&nbsp; <a href="https://app.roll20.net/campaigns/scripts/1194663" rel="nofollow">https://app.roll20.net/campaigns/scripts/1194663</a> TypeError: Cannot read property 'split' of undefined at apiscript.js:132:100 at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:105:34), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:105:34), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1163:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400
Looks like there's a problem with the one-click install of Custom Status Markers : Failed to load Custom Status Markers No such file or directory @ rb_sysopen - /home/symbly/www/d20-app/apiscripts/CustomStatusMarkers/1.5/CustomerStatusMarkers.js
1459915096
The Aaron
Forum Champion
API Scripter
The script.json has 'CustomerStatusMarkers.js' as the script name, causing it to look for the wrong file. To make it easy to correct, I sent a pull request with the fix:&nbsp; <a href="https://github.com/Roll20/roll20-api-scripts/pull/" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/pull/</a>...
The Aaron said: The script.json has 'CustomerStatusMarkers.js' as the script name, causing it to look for the wrong file. To make it easy to correct, I sent a pull request with the fix:&nbsp; <a href="https://github.com/Roll20/roll20-api-scripts/pull/" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/pull/</a>... Coolio. Thanks. Different, (Possible) UI Bug: Riley, is it intentional that disabled One-Click Install scripts lose their globe indicators (indicating a one-click script, I'm inferring) when their tab goes gray?
1459917903
Gold
Forum Champion
Thanks for the updates. Quick question I'm investigating.. those who already had API scripts installed, those are now functionally the same as Custom scripts right? And so it would be advised, for those scripts which exist in the repository, to uninstall the script version that I have, and reinstall it through the new, quick, drop-down API menu? We actually played today, right after the time of the API server coming back online. My old/existing scripts continued to work as expected without migrating anything so far, but I plan to migrate to the new system now.
1459919621
James W.
Pro
Sheet Author
API Scripter
If you're not making any modifications to the script, I would recommend switching over to the "one-click" version, if available, if for no other reason than it will make sure you're using the latest version of the script (assuming, of course, that you click "Add Script" instead of "Import").
1459944927
Ravenknight
KS Backer
When adding the Marching Order script to my current setup using One-click install, I get the message: "Marching Order or it's dependencies read or write fields that are used by other scripts you currently have installed. There is a possibility that these scripts might conflict with eachother. Would you like to continure the installation?" Is it possible to see what script caused the conflict other then disable them one by one for testing?
1459946934
The Aaron
Forum Champion
API Scripter
@Gold & @James W. -- I agree, you probably want to start riding the 1-click train as soon as possible for precisely the reason James mentioned--auto updates. &nbsp;Be aware that when upgrading any of my scripts you may need to reconfigure them either through the 1-click UI or through the chat interface. &nbsp;There isn't a way for me to distinguish between installing for the first time (with pre existing configuration) and changing the configuration via the 1-click UI, which means I pretty much have to assume the 1-click UI settings are the right ones at the time you save the script (or install it for the first time). &nbsp;I'm trying to work out a way to handle that but the current crop of 1-click scripts from me will have that issue. @Peter That message is less drastic than it sounds. &nbsp;It's more of a notice that the two scripts may have some interaction as they both deal with the same objects. &nbsp;For example, TokenMod lets you change the Status Markers on a token, and CustomStatusMarkers also does, so having both installed will give that message. &nbsp;However, that doesn't mean they will actually have some conflict, just that the potential exists for them to.
1459950014
The Aaron
Forum Champion
API Scripter
@Lady Victoria -- that pull request just got merged. &nbsp;I imagine the 1-click version will start working soonish.
1459950059

Edited 1459950291
Riley D.
Roll20 Team
@Peter -- Yeah we'll look into providing more information on that front. I agree with everyone above, 1-click install should be your "default option" now. If you want to customize then using the "old method" of copying/pasting or using the Import button (which does the same thing) will always be supported obviously (as will writing custom scripts), but there's really no good reason to go that route unless you actually intend to customize the script. @Lady Victoria -- I don't think we made a conscious decision on that one way or another but it makes more sense to me to keep the globe at all times so I'll look into changing that. @Bob -- Just to make sure I don't jump down the wrong rabbit hole, did you have any other scripts (like that TurnMarker.js) one enabled when that error happened? Or only the 5E Companion one? Also, do you know what you were doing when it crashed? E.g. were you trying to use one of the actual commands from the script, had you just been making rolls, etc.? If you don't know no worries just trying to track it down :-)
1459950359
Riley D.
Roll20 Team
The Aaron said: @Lady Victoria -- that pull request just got merged. &nbsp;I imagine the 1-click version will start working soonish. Indeed, should be working now. Thanks!
1459967200
Steve K.
Roll20 Production Team
Sheet Author
API Scripter
Compendium Curator
Quick update: Disabled Library Scripts should now keep their global icon, to prevent confusion. Also, there was a minor change to the 5E OGL Companion script to help catch a bug. Let us know if you see any issues with that.
Riley D. said: The Aaron said: @Lady Victoria -- that pull request just got merged. &nbsp;I imagine the 1-click version will start working soonish. Indeed, should be working now. Thanks! Steve K. said: Disabled Library Scripts should now keep their global icon, to prevent confusion. Coolio. Thanks!
Hey, can the dev team release a windows store version for the best program for roleplaying?(you know what i mean)
1460497010
Silvyre
Forum Champion
rossano f. said: Hey, can the dev team release a windows store version for the best program for roleplaying?(you know what i mean) For your suggestions, we offer the Suggestions & Ideas forum, which is based on voting from the whole community. Please review our Forum Voting wiki page for more information on how voting works, and our Suggestions & Ideas Posting Guidelines for the added expectations above and beyond our standard Code of Conduct .
And where &nbsp;i. Can request a feature if i haven't got votes?
1460504613
Brian
Sheet Author
API Scripter
rossano f. said: And where &nbsp;i. Can request a feature if i haven't got votes? You can purchase subscription time (getting 5 or 10 votes), wait until your account has existed for a year (you get 1 vote/year), or comment on an existing suggestion (commenting on suggestions does not cost votes).
1460506110
The Aaron
Forum Champion
API Scripter
rossano f. said: And where &nbsp;i. Can request a feature if i haven't got votes? For more information, see:&nbsp; <a href="https://wiki.roll20.net/Forum_Voting" rel="nofollow">https://wiki.roll20.net/Forum_Voting</a>
1461441648
I'm having an issue with one of the API's in the repository, the PageFX does not install for me whether I use the one click install or the import function, it looks like an amazing API if I can get it to work, could anyone help me out with this?
1461449552
The Aaron
Forum Champion
API Scripter
Page FX uses functionality that is only available on the Dev server right now and won't work on the production servers. &nbsp;When you say "does not install for me", do you mean that it crashes when you try to install it?
1461757160
@The Aaron OK that's cool but the script only shows up on the Prod list and not on the Dev list. It doesn't crash per se when I install it, it just never shows as loaded in the sand box. It's like you install the script but the system ignores it. I went ahead and made a copy of my game over to Dev but that's when I discovered the PageFX is not in the Dev list for the one click installs.
1461765891
The Aaron
Forum Champion
API Scripter
This should be live as of yesterday, so you should be fine to use it on Prod. If that issue persists, definitely let us know. &nbsp;I'll look into the missing in dev case.
1461771775
Nice!! I tested it out and it seems to be working perfectly! I'm looking forward to adding these effects to my maps, it should really bring them to life!
1466709364
Newbie to the API as I have just subbed here. How do I actually get it to open so I can put everything in? I have seen howtoos and so forth but they all assume I have the window open already
1466713633
Steve K.
Roll20 Production Team
Sheet Author
API Scripter
Compendium Curator
Draxton said: Newbie to the API as I have just subbed here. How do I actually get it to open so I can put everything in? I have seen howtoos and so forth but they all assume I have the window open already From your Game Details page =&gt; Settings dropdown =&gt; API Scripts