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

New to api, any advice?

So I read some of the api introduction wiki as well as the flagged thread - [Scripts] A Listing of All Available API Scripts . I am yet pretty lost. Is there a guide on api for dummies lol, maybe a list of super basic but cool scripts for new mentors to use in their campaign with indepth instructions for their use, thanks!
1416149479
Finderski
Plus
Sheet Author
Compendium Curator
For API scripts that are ready for immediate for use, I recommend the script that The Aaron did that will auto-number tokens on the map as you add them. The details of that script are located: here . What game are you playing? That will help identify potential other scripts, because they are often game specific (at least in my experience, as a Savage Worlds player, many of the existing scripts don't really do much for me). As for using scripts, you just go into the Campaign settings tab. To get there, you just click the View Details link for the campaign. Then on the left is a link for API Scripts. Just click on that, and then you can copy/paste the script code into the window, save and start your campaign. If you are interested in learning to code your own...as someone who just started down that path, it was recommended I check out the book JavaScript: The Good Parts , and that's been an interesting resource so far, but more useful was finding a script and the breaking it apart and making my own. :)
hey, thanks for answering! i play 3.5/pf mostly, not really good enough with java to create them, just trying to figure out how they work in game heh. i understand how to copy them into the campaign just no idea where to go from there lol.
1416152738
Finderski
Plus
Sheet Author
Compendium Curator
Sorry, I can't help you with that. 😀 The script I linked to above, the forum post contains all the instructions necessary for that particular script, and it's pretty much just drag and drop or copy/paste tokens and it does everything automagically.
Yup reading it now, thanks! Like that it is all automatic heh.
Read the archive of the Mentor and API forums, There are enough scripts in there to drive you to distraction, I don't have links for these handy, but I use Blind Roll, Mark Status and Alter Bar all of the time and some other scripts as needed.
ah i am more confused by how to actually work scripts during a game/in game, are there any specific guides on that?
most are called by a custom command function, for instance: The PowerCard Script is initiated by starting your macro using it with: !power Generally, read through the entire, thats ENTIRE thread concerning the API you are interested in. If they are good, the API and the creator, will have documentation in the thread or the script itself showing you an example of how to use it propperly. Again using PowerCard , being one of my favorites, has a very fine list of updates, functions and notes in the top most portion of its thread before you even get to the script. Examples of how to use it are shown through out the rest of the thread, by users with questions and users with answers, along with the author him/herself.
1416166829

Edited 1416166882
API scripts are just small (sic) programs that you pass information to and they output various effects . I use a script called Blind Roll quite a bit. I pass info to the script with a macro or via the chat box: !broll 1D100 will roll a D100 and whisper the results to the GM. This is very useful, a thief wants to climb a wall, he sends me a message, that calls for a success roll, which he should not know the results of until the action is underway so we use Blind Roll. In my game he has a macro: /w GM CharacterA climbs 60% !broll 1d100<60 it will output to the chat "CharacterA climbs 60%" 1D100<60 1 Success (or 0 Success) He starts up the wall and either makes it to the top, or 1/2 way there I say "You fall taking 1D6/10' damage" Using the same script, I could set up a macro: !broll (?{number|1}) D (?{size|6}) This will ask the number of dice, then what size dice and then report the information to the GM. Especially useful when you need a D7. Finally, using the same script I could have a player type into the chat box !broll 1D666 Which will roll the number and report it to the GM Other scripts do similar things or can output results as graphics, place things on the map, move things on the map, or wash your car if you are agood enough programmer. The key is that "!" tells the API it is getting a command followed by the command and any variable that you want it to use, or will point to the variables you want it to use.