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

[Suggestion] API Gist Linking

I'm very impressed with the community contributions when it comes to API scripts, and I'm starting to use quite a few in my campaign.  One of the things I'm noticing is that these user contributed scripts go through an evolution, with bug fixes and new functionality being added with each new revision.  If you utilize them in your campaign you have to keep an eye out for new revisions and changes to those scripts and update them in your campaign to get the changes and fixes.  One thing that I think would enhance the use of the API within the campaign would be to have the ability to link back to the source script in Gist so that as they're changed, your copy of that script within your campaign would stay updated automatically without you having to copy and paste it anew every time.  I don't know if Gist has an API to do something like that, but I was thinking maybe it could be as simple as posting into an input field the URL of the raw gist file.  This of course would be in addition to the option of using the script editor as it is today, which would continue to allow you to maintain your own versions that may have your optimizations and tweaks that you've programmed.  Anyway, just a thought.
Some scripts have user settings which would default each time they're updated.
I thought about that, and maybe it could be done in such a way that the script editor and Gist linked file could be merged.  So the user variables could be defined in the script editor, and the gist file would contain the core of the code, but the system would merge the two files into one script.  Essentially allowing for localization of the variables to your sandbox, but still having a centrally maintained and auto-updating script.  That would require a change in programming by contributors whereby they would have to possibly just comment out their variables in the tops of their scripts and tell users if they want to use the linking feature to create those variables locally, but if they just want to copy and paste into their editor and not link then to uncomment and define them so that they're used.  Again, all just a thought and might be more trouble than it's worth, but wanted to throw it out there as a potential suggestion.