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

Getting started with Roll20 APIs?

October 11 (4 years ago)

Edited October 11 (4 years ago)

Hi, all,

I recently upgraded to pro and want to start using APIs, but many of the community posts and documentation I’ve seen include warnings that they are out of date.

Is there an up-to-date “getting started” guide, API catalogue, or links page that might help new pro users like me?

Thanks,

Craig

October 11 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

If you're looking at the wiki, ignore the out of date message that appears at the top of every page. It's just to advertise the fact they have moved official support to a new site, but the wiki will always be better than the official support pages, because it includes everything in the official pages and lots of user contributions.

The vast majority of the official pages are taken from the wiki, after all.

October 11 (4 years ago)
Andreas J.
Forum Champion
Sheet Author
Translator

GiGs said:

If you're looking at the wiki, ignore the out of date message that appears at the top of every page. It's just to advertise the fact they have moved official support to a new site, but the wiki will always be better than the official support pages, because it includes everything in the official pages and lots of user contributions.

The vast majority of the official pages are taken from the wiki, after all.


This is more true when it comes to Character sheet Development than API stuff, and I'd say the gap isn't that large between Help Center/Wiki.

And being completely seriously, it's likely due to me having never really spent much time with them, and even less on improving their documentation...

October 11 (4 years ago)

Edited October 11 (4 years ago)


Craig H. said:

Hi, all,

I recently upgraded to pro and want to start using APIs, but many of the community posts and documentation I’ve seen include warnings that they are out of date.

Is there an up-to-date “getting started” guide, API catalogue, or links page that might help new pro users like me?

Thanks,

Craig


I don't know that such a guide exists, but there is fairly strong consensus that the following are must-haves if you want to delve into API usage:


TokenMod

ChatSetAttr

OGL Companion

GroupInitiative

All of the above are available from the one-click install. TokenMod and ChatSetAttr are scripts that allow you to do all kinds of neat and labor-saving things via macros. The OGL Companion (assuming you're using the D&D 5e sheet) automates a bunch of things usefully. GroupInitiative makes monster initiative a breeze.


I also consider the following to be huge quality-of-life enhancers:

Supernotes. Versatile. I use it to store read-aloud text accurately, to call room-specific music from key tokens on the map, and to get as close as I can to map pins functionality on world and city maps (throw notes into the token field and your party can access notes for a location by clicking the token and running a Supernotes command).

Token Action Maker. Automate token actions for monsters and NPCs. I cannot overstate how much of a time-saver this is, since it means you don't always have to bring up a monster character sheet for attacks, spells, checks, or saving throws.

DoorKnocker. Open doors / mod dynamic lighting with one click. Brilliant, simple script with minimal setup.

MapLock. Lock objects on the map to stop players or you from accidentally moving them.

Roll20 Audio Master. Play music via script commands without Jukebox's clunky interface.

Combat Master (not from one-click). Automate combat, including conditions, concentration, etc.

EncounterHelper. Group monsters into encounters that you can show or hide or send into initiative with a click. 

TokenNameNumber. Make sure your players see Creature 42 instead of Manxam the Beholder. Part of my standard monster setup macro.

GroupCheck. Great for those mass monster saving throws against the wizard's fireball.

RecursiveTable. For anything you need rolled randomly, this script is a godsend.

PurseStrings (not from one-click). Simple, easy cash manager.



October 12 (4 years ago)

I'm going to chime in with a plea for something, anything, that gives the very basics of using API.  Like, how does one invoke a script?  It's very clear that API scripts are after-market and somewhat layered on the roll20 UI, but it's not at all clear how that works.


Bernard LG said:

I'm going to chime in with a plea for something, anything, that gives the very basics of using API.  Like, how does one invoke a script?  It's very clear that API scripts are after-market and somewhat layered on the roll20 UI, but it's not at all clear how that works.


Ok, so there are two ways of accessing scripts: from the One-Click Install (from the API scripts page of your campaign), or on github. With one-click, it's pretty easy. You add the script to your campaign and it automatically restarts the API. Each script will usually have help (on the one-click page as documentation or in-game) where you can find the commands for invoking the script. For example, when you've installed the GroupInitiative script, the basic command is !group-init (with tokens selected).

Commands always begin with a !

Arguments follow after the command, sometimes with -- or sometimes on their own. It really depends on the script, and again, that's where you go to the help.


October 12 (4 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Here's a great short video on the process:

How to Install Roll20 API Scripts

October 13 (4 years ago)
Kurt J.
Pro
API Scripter


Bernard LG said:

I'm going to chime in with a plea for something, anything, that gives the very basics of using API.  Like, how does one invoke a script?  It's very clear that API scripts are after-market and somewhat layered on the roll20 UI, but it's not at all clear how that works.

How they actually get triggered depends on the API script itself... As Jay R. says, in many cases, there is a command that can be run in chat to do something (!setattr for example for chatsetattr) which will accept parameters to do all sorts of interesting things.

Some API script watch for things to happen and react automatically. A good example here is MonsterHitDice. Whenever it sees you drag a monster token onto the VTT it will roll the hit dice formula and set the token's max/current hit points.

And in lots of cases API scripts will react to both commands and things going on in the game. An example here would be Token Lock. You can toggle it on and off with !tl and it watchs for anyone but a DM to move a token on the page. If they do, and Token Lock is on, it moves it back to its original place.

The video keithcurtis linked to above is by Nick Olivo who has a number of excellent videos - from recommending API scripts he has found useful to a few API coding tutorials for get you started writing your own scripts to tips on using Roll20 in general.