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 .
×

New Pro user having trouble with APIs

Hi guys, I was recently given a pro subscription as a Christmas Present so getting my head around all the new features. I apologise if I have added this issue to the wrong forum, and if I have, could I be directed where post this issue to help me resolve it.  One of my biggest frustrations when creating and sorting maps for the game I am running is that I keep moving the map I have created (accidently) while adding or moving other tokens on top of it. I saw that there was an API that would lock the map in place so I have tried to get my head around the APIs.  I am not a coder, I know nothing about Javascript, so I have spent the last hour going through all the tutorials about how to add them and find them etc to get my confident and comfortable with what I am doing (pretty simple, if its on the list you can add it, if it isn't, then you can find the code already written out and copy and paste into the correct part).  I added the maplock API which I found on the dropdown menu but I keep getting an error coming up.  I've tried to find help for this, and I have seen a number of solutions, but again, I am completely dense when it comes to all this, so thought instead I would ask for specific help here and if someone could walk me through what I need to do to ensure this works and hopefully then get me more comfortable with these APIs so I can make the most of them in my game.  Many thanks,  Jason 
1640610598
David M.
Pro
API Scripter
The api sandbox goes dormant after a short time if there is no one in the game. Try entering your game from another browser window. Once a game session is active, the sandbox should spin up on its own, but if not you can restart it manually. 
1640611291
Andrew R.
Pro
Sheet Author
I always have the API console in a tab while I launch the game in another tab. That lets me check everything is OK before I start work or my players arrive. 
1640645597
Gold
Forum Champion
you're doing alright Jason, hang in there!  All that 'scripts' and "Code" appeared very intimidating and confusing to me at first (still is, really)... but you get used to it.  In a surprising way.  It can be easier-than-it-looks.  in this case, as others said, just having your Game table OPEN in another tab will get rid of "No sandbox detected"
Things I wish I knew before I wasted a ton of time on pro features: -The real money is in the transmogrifier feature, you can use it in so many awesome ways.  Store all your bestiary in another session, drag and drop over monsters on demand keeping your live session crisp and clean of garbage.  Same goes for adventure modules, install them in one session, then drag and drop over what you need for the nights live session.   -API's are great but there are pitfalls involved with the whole process.  First off, theres a shit ton of scripts out there that are amazing but just add massive amount of time to prep and sometimes even drag out live gameplay for nothing other than showmanship and in some cases they even still look awful.  I wasted so much time on learning this the hard way.  There are a *ton* of scripts that are seemingly popular here on the forum amongst the warriors that are absolutely awful to run as a DM in a session as they either add massive prep time, add time drain in live sessions, or they lag the hell out of your players and yours machines.  I can't tell you the ones I feel do this because it would devolve into forum warriors arguing over their own experiences talking past themselves.  I'll gladly respond to you in a DM letting you know what ones I found were efficient though.   -There is a crash in the sandbox that does not report any change whatsoever in the sandbox, its been around for a few months now and a new user is going to be completely confused when it happens.  IMO I feel like this crash is caused when another sandbox crashes that is hooked to a session you own but aren't currently running(so don't share sessions with strangers).  The only way you know this crash has happened is your random api related macros in session will suddenly do literally nothing.  Simply fire a manual restart of the sandbox, which is why you should always have a tab open to the sandbox page to hit the restart button.  The more common crashes are nothing to panick about, just restart the sandbox if it occurs, beware of poorly written manual scripts out there as they will crash often and add to the above opinion on why api scripts are sometimes just not worth running.  There are highly popular scripts here in the forums that crash way too often for my taste.   -Dynamic lighting.  Oh boy, beware of the UDL defenders but UDL does not properly work and even if you do have a table where everyone can use it well, a simple adblocker lets a player disable UDL and see the whole map.  Don't use it.  Enable Legacy Lighting and your life will be so much better.  I honestly do not believe the forums tell the true story of the current state of dynamic lighting on this service.  I have NEVER had a table that could run UDL effectively and EVERY time I have enabled it, done tons of prep for it, it has ALWAYS burned me with multiple hours of lost playtime trying to make the stupid thing try to work.  LDL always works.(period).  Reliability is the greatest thing any feature can have and roll20 does not understand this concept.  Imo UDL suffers the same problem as those complex api's I tried to warn you about except that UDL and LDL do the same thing and the stuff UDL does above and beyond...just don't matter.  You are playing dnd not a video game.  If they wanted us to test it properly they should have given us a simple effective way to toggle between the two types and made the API's that control both work regardless but they didn't, so we either have to have api's setup for one or the other...or both and spend half an hour going to each page and all player tokens resetting back to LDL when one players UDL screws up, the devs just have no idea how frustrating unreliable features are to their paying customers.  
1640688241

Edited 1640688578
Thanks guys! Appreciate all the responses. And yes thank you very much Eddie, I would appreciate advice from someone more experienced than I, on what works and doesn't. I've realised the horror already of setting up dynamic lighting so trying to find a quicker and better way of doing it. 
I had absolutely no coding ability when I started my pro subscription, I mainly got it for the Transmogrifier, but I've found some of the APIs wonderful, and easy to use. My main piece of advice is to start with the minimum APIs you can, preferably none at all.  Then when something happens and you think it might be easier with a script in place, see if there is something that handles that particular problem and slowly build up the collection of scripts you like to use.  Some people seem to have dozens of APIs installed in their games, I probably run with less than 10 for most of mine, i have a few that I bring in from time to time and some that i've tried and haven't got far with, or have decided it is more trouble prep time than it is worth. As far as updated Dynamic Lighting goes, I'm not a blind defender of it, I know it has prbblems, but I don't really have too much trouble with it, as long as I don't turn on explorer mode and remember to turn the vision off on the mobs set out on the map, those are the two areas I still find slows things down too much.