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

[General One Click API Question]

1606924039
Michael I.
Pro
Sheet Author
I have 7 custom script API for a Specific Game system that I am thinking of putting in the One Click API, Do I have to enter each of the 7 API separately and have each one have a separate  json file, or do I put it in a [Game Folder] and then add the 7 API, and in the game folder do 1json file. Or still yet have one [Game Folder] and in that Folder add the 7 Api, and do separate json folders for each. wanting to know so I can make sure I am in compliance with One Click API. Thank you in advance for the Feedback
1606924637
The Aaron
Roll20 Production Team
API Scripter
Each root folder in the repo represents a single installable file.  That file could be the concatenation of all seven of your scripts, which could be appropriate if you would never use any of them without any of the others.  If you want to be able to individually install them, they need to be in separate root folders.
1606939196
Michael I.
Pro
Sheet Author
Thank you as always Aaron, Honestly don't know what the Roll20 Community would do with out you, and really don't want to find out. 
I am wondering if there is any quality assurance for the One Click API scripts? I like to use them because I feel that they are more thoroughly tested but, I have been trying to use the One Click Teleport script with the Roll20 sheet and it crashes. I am now using the Teleporting Script V3 which works better but How do i know that I have the latest version? I would feel better if the one in One Click was fixed.
1606945418
Kraynic
Pro
Sheet Author
As far as I know, all the api scripts are community generated, and therefore community maintained.  Quality assurance (and speed of updates) will depend on the script author.
Thanks Kraynic, I was afraid that might be the case.
1606946829
The Aaron
Roll20 Production Team
API Scripter
Kraynic is completely correct.  Teleport in the 1-click is pretty new and there are still somethings getting worked out, but it should stabilize soon.
1606957256

Edited 1606964003
Pat
Pro
API Scripter
Teleport author here - if you want you can try the new gist on this thread at the end - it has fixes for instability issues and if found stable, will be going in for next Tuesday on one-click.  Edit: The original teleport (1.0) for in-page was quite stable; in moving to make it cross-page, a lot of changes were made and had to be re-tested in light of all of the changes made to support cross-page teleport. It's not an excuse, it's an explanation. 
Thanks! I didn't realize that it was being worked on. I was having problems with setting up teleport pads between different maps/pages. I'll try it again after the update goes into One Click.
1606976925
Pat
Pro
API Scripter
Keeper of Secrets (KoS) said: Thanks! I didn't realize that it was being worked on. I was having problems with setting up teleport pads between different maps/pages. I'll try it again after the update goes into One Click. I'm in the phase of road-testing it - I've tested all of the features I know to test, I'm looking to see if folks can give it a try in situations they want to use it in, see if it works. This one should go in this weekend, and be out on Tuesday, and the more testing it gets now, the more likely fixes go in for Tuesday! 
1607006378
Pat
Pro
API Scripter
After multiple passes through multiple validators, and testing of all existing functions, posted version 1.2 up to repository change #1138 It will be up next Tuesday. Please report any issues you find in [Script] Teleport - from scratch teleport token .
It still crashes the API when I select Global Pad List.
1607548881

Edited 1607549390
Pat
Pro
API Scripter
Keeper of Secrets (KoS) said: It still crashes the API when I select Global Pad List. Can you provide the screen from the API page - the error it produces? Or the circumstances to re-create the error?  i.e.: how many pages and how many teleport pads you have across how many pages? Does the page listing work?  Edit: I tried names with characters that can crash some interfaces ("'#&!) - it still worked for global... 
I was using the script from the One Click install Teleport v 1.2. I didn't create any teleport pads, just clicked on Global Pad List.
1607550579

Edited 1607551109
Pat
Pro
API Scripter
Keeper of Secrets (KoS) said: I was using the script from the One Click install Teleport v 1.2. I didn't create any teleport pads, just clicked on Global Pad List. So you clicked on global teleport, with no pads created - does it occur if you create a pad first?  There is a default entry created for the current page with zero entries in the array; the script was checking for array but not array length, and this caused an error in the for-each looping. I've caught for this, will test for this after creating a new empty campaign.  Updated gist with catch . 
Don't know yet. I have to run right now. will get back to you later.
1607554041

Edited 1607554907
Pat
Pro
API Scripter
Keeper of Secrets (KoS) said: Don't know yet. I have to run right now. will get back to you later. If you do test it later, could you also verify the no-teleport-on-random-graphic-change? The token should no longer trigger a teleport if it is already on a pad it teleported to and you change facing or add a condition etc. I'll have a few fixes going in for next Tuesday.  Edit: I am unable to re-create the global pad list crash on a new empty campaign with 1.2 - do you have a list of other scripts that may be running? 
I am using Waterdeep Dragon Heist with the Roll20 Character sheet. I am on the Trollskull Manor map with Updated Dynamic Lighting enabled (daylight mode). With no Teleport pads created I clicked on the Teleporter Pad List on the Main Menu In the API Output Console: For reference, the error message generated was: TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined     at apiscript.js:21103:76     at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore.js:188:9)     at padDisplay (apiscript.js:21089:15)     at msgHandler (apiscript.js:21671:21)     at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:65:16)     at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:70:8)     at /home/node/d20-api-server/api.js:1661: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) On the Main Menu with a token selected I clicked on Create Teleport Pad. I am prompted to give it a name. I name it StairUp1. It appears to accept the command then Crashes with the same error message in the Output Console. The token I selected now has teleportpad in the Bar 1 Value feild. The name of the token did not change from what I had previously named it ExtraPad1. List of what I have installed (G denotes that it is from One click install): G 5th Edition OGL by Roll20 Companion G 5E Resting in Style G TokenMod G PowerCards G Vector Math G MatrixMath G Path Math G Token Collisions G HTML Builder G Character Sheet Utils TableLookup.js G It's a Trap! G CombatTracker G GroupCheck ApplyDamage.js Bloodied.js NumberedTokens.js DoorKnocker1.21.js G KABOOM G RecursiveTable G Hunter's Mark G It's a Trap! - D&D 5E Generic G Teleport I hope that this is helpful.
1607573862

Edited 1607577195
Pat
Pro
API Scripter
Okay - in any of your configurations, do you automatically set the bar values of any of the tokens as they are dragged to the tabletop?  Edit: May have found the issue - if the bar1_max value is set by something else, or set to a value that isn't a token id, it can fail in multiple circumstances. Now it will skip trying to find an invalid token and display "Invalid value" for bar1_max. Correcting this can be done by clicking the "link" button without another token selected which will clear the value and ready it to be set to another value.  As a trial, could you disable teleport from oneclick and try this gist And thank you for sending this my way. I'm hoping to fix it for you and make it better overall. 
Eureka! It works! It appears that Character Sheet Utils and Teleport 1.2 did not get along but Teleport 1.2.1 has fixed the problem. I still have more testing to do before I put it in my main campaign but this is making me feel good. If anything else comes up I will post it to you here. Thank you.
1607630252
Pat
Pro
API Scripter
Keeper of Secrets (KoS) said: Eureka! It works! It appears that Character Sheet Utils and Teleport 1.2 did not get along but Teleport 1.2.1 has fixed the problem. I still have more testing to do before I put it in my main campaign but this is making me feel good. If anything else comes up I will post it to you here. Thank you. Thank you for the feedback! - There are some caveats to cross-page teleport, I documented those in the main thread, we're currently looking to talk to Roll20 about the implementation of moving player ribbons by API, as it appears to have undocumented limitations.  There are other improvements that will go into 1.2.1 as well, so I'll have that in one-click this weekend for next Tuesday. 
I found some bugs. After setting up several pads some became disconnected. I discovered that auto pad naming wasn't keeping up with me so I am now manually naming them (teleport10, teleport11). I think that this is associated with lag time as it happened when I had one of my players helping me to test it. There were times that he could see that his token was in the upper left corner of the page and had to refresh in order to get to the destination pad. There was also a case where his token disappeared  completely, I don't know where it went. I have about 10 two way teleport pads on one page to move tokens up and down stairs. I also have many two way teleport pads that go between pages. I believe that I have a total of about 30 pads in all.
1607984181

Edited 1607984640
Pat
Pro
API Scripter
Keeper of Secrets (KoS) said: I found some bugs. After setting up several pads some became disconnected. I discovered that auto pad naming wasn't keeping up with me so I am now manually naming them (teleport10, teleport11). I think that this is associated with lag time as it happened when I had one of my players helping me to test it. There were times that he could see that his token was in the upper left corner of the page and had to refresh in order to get to the destination pad. There was also a case where his token disappeared  completely, I don't know where it went. I have about 10 two way teleport pads on one page to move tokens up and down stairs. I also have many two way teleport pads that go between pages. I believe that I have a total of about 30 pads in all. Are you using the latest gist ? There were some hiccups and errors with cross-page, I'm hoping they've been ironed out - lag can cause some issues such as the ping not executing. The next one click version (1.2.1) also has this fix - can you let me know which one you're using?  I'd like to reassure you abou token naming: the system uses token ids, not token names to create associations, so you are safe to name tokens whatever you want to name them, and re-name them as much as you want. Copying and pasting can cause problems, however - the copies are all unique token ids, and while their links out to other teleport pads may correctly point to teleport pad tokens, no tokens point to the new ids, so the new tokens have no token pads that link to them as destinations. 
I am using the 1.2.1 from the gist that I got 4 or five days ago.
1608007180
Pat
Pro
API Scripter
Keeper of Secrets (KoS) said: I am using the 1.2.1 from the gist that I got 4 or five days ago. It's been updated since then - it should be (the newest version) up on one-click tomorrow. 
Thanks Pat, It is working. Question: On the Configuration menu there is a Purge command with a caution sign. What does it do?
1608070752
Pat
Pro
API Scripter
Keeper of Secrets (KoS) said: Thanks Pat, It is working. Question: On the Configuration menu there is a Purge command with a caution sign. What does it do? It clears the Player Specific Pages entries - this is just in case - one early version of the gist accidentally put token IDs into the Player Specific Pages and this caused... problems. The purge button was necessary for fixing this.