Skip to content

API Scripts created by the community for use in Roll20 VTT. Submit a ticket at roll20.net/help if critical hotfixes are to be requested.

License

Notifications You must be signed in to change notification settings

Roll20/roll20-api-scripts

Folders and files

NameName
Last commit message
Last commit date
Feb 3, 2021
Oct 24, 2022
Aug 27, 2019
Aug 3, 2020
Jul 18, 2017
Nov 20, 2018
Oct 30, 2023
Jan 21, 2020
Jul 8, 2023
Sep 6, 2024
Feb 5, 2021
Nov 23, 2021
Jan 24, 2017
Jul 5, 2021
Jul 20, 2020
Apr 23, 2021
Feb 9, 2022
Feb 5, 2021
Jun 15, 2020
Jul 22, 2023
Apr 23, 2022
May 15, 2017
Feb 5, 2025
Dec 17, 2019
Aug 13, 2021
Jul 12, 2018
Dec 30, 2020
Dec 14, 2022
Mar 4, 2025
Sep 1, 2023
Feb 28, 2024
Jun 6, 2021
Jan 29, 2025
Feb 28, 2022
May 4, 2022
Apr 23, 2022
Aug 3, 2021
Jul 20, 2020
Nov 1, 2017
Apr 23, 2022
Jun 14, 2017
Sep 7, 2020
Sep 7, 2020
Apr 23, 2022
Jan 26, 2024
May 7, 2022
Oct 13, 2016
Dec 1, 2020
May 19, 2021
Sep 21, 2022
Aug 19, 2022
Jan 31, 2025
Aug 31, 2022
Dec 17, 2016
Apr 14, 2016
Apr 23, 2022
Jul 20, 2020
Dec 21, 2020
Jan 4, 2021
Mar 22, 2016
Feb 24, 2021
Jun 15, 2020
Sep 12, 2020
Apr 15, 2023
May 2, 2022
May 6, 2024
Oct 10, 2018
Jul 20, 2020
Jun 27, 2021
Jun 6, 2022
Dec 16, 2022
Aug 4, 2022
Feb 13, 2025
Feb 13, 2025
Dec 21, 2020
Dec 17, 2019
Jun 13, 2024
Apr 17, 2022
Sep 3, 2023
Jan 24, 2017
Jul 20, 2020
Apr 24, 2016
Nov 30, 2018
Feb 18, 2025
Jun 2, 2023
Jun 29, 2020
Mar 15, 2018
Jun 3, 2021
May 27, 2021
Mar 3, 2023
Nov 3, 2023
May 5, 2016
Jul 11, 2017
Dec 27, 2019
May 29, 2023
Aug 24, 2023
Jul 12, 2024
Apr 23, 2022
Dec 30, 2020
May 14, 2022
Mar 20, 2018
Jun 14, 2024
Jun 19, 2023
Apr 13, 2016
May 5, 2020
Jun 8, 2021
Aug 6, 2022
Sep 3, 2019
Dec 21, 2020
Apr 16, 2019
Mar 5, 2019
Apr 23, 2022
Jan 15, 2019
Aug 10, 2020
May 29, 2023
Mar 3, 2025
Jan 21, 2025
Jul 9, 2019
Jun 18, 2019
Aug 24, 2020
Jan 15, 2025
Jul 12, 2018
Nov 14, 2024
Mar 1, 2022
Apr 23, 2022
Aug 24, 2020
Aug 16, 2017
Apr 23, 2022
Nov 30, 2024
Mar 2, 2021
Aug 12, 2021
Mar 14, 2022
Aug 17, 2022
Jan 31, 2025
Jul 2, 2019
Dec 18, 2022
Oct 31, 2022
Jun 19, 2021
Mar 21, 2023
Feb 5, 2021
Aug 10, 2020
Apr 13, 2016
Nov 9, 2022
Dec 6, 2024
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Mar 21, 2017
Feb 9, 2022
Sep 21, 2020
Feb 5, 2021
Mar 10, 2017
Feb 13, 2024
Nov 6, 2020
Feb 25, 2025
Jun 20, 2024
May 25, 2020
Apr 23, 2022
Jan 11, 2018
May 15, 2023
Apr 13, 2016
Jul 2, 2020
Aug 21, 2022
Mar 13, 2023
Apr 23, 2022
Apr 6, 2021
Dec 17, 2019
May 4, 2023
Jan 6, 2020
Sep 6, 2024
May 12, 2020
Nov 10, 2023
Sep 15, 2023
Oct 30, 2023
Sep 25, 2023
Aug 24, 2024
Mar 28, 2022
Aug 28, 2022
Mar 3, 2021
Mar 9, 2017
Dec 17, 2019
Feb 13, 2017
Jun 26, 2017
Jan 15, 2023
Apr 23, 2022
Jun 26, 2023
Jul 7, 2018
Feb 7, 2018
Apr 23, 2022
Jan 19, 2021
Dec 18, 2024
Dec 18, 2024
Dec 26, 2022
Dec 3, 2023
Jun 18, 2018
Mar 22, 2016
Mar 22, 2016
Jun 1, 2020
Jan 2, 2019
Jul 8, 2023
Jul 27, 2022
Oct 10, 2024
Aug 16, 2016
Apr 15, 2021
Apr 3, 2022
Mar 27, 2018
Feb 17, 2025
Nov 20, 2023
Nov 20, 2023
Feb 25, 2025
Aug 6, 2023
Dec 21, 2020
Aug 6, 2019
Dec 8, 2021
Sep 21, 2021
Sep 21, 2021
Jan 19, 2021
Aug 24, 2024
Jun 18, 2024
Mar 5, 2025
May 3, 2018
Mar 23, 2021
Sep 12, 2022
Apr 23, 2022
Dec 31, 2020
Aug 23, 2021
May 23, 2017
Jan 31, 2025
Jul 20, 2020
Dec 21, 2020
Dec 20, 2021
Apr 6, 2020
Apr 13, 2020
Dec 17, 2019
Feb 18, 2025
May 29, 2024
Mar 22, 2023
Apr 10, 2024
Sep 19, 2018
Nov 16, 2020
Oct 18, 2021
Nov 25, 2019
Sep 2, 2024
Dec 21, 2020
Apr 1, 2024
Jul 13, 2018
Jul 13, 2023
Apr 12, 2024
Feb 6, 2023
Dec 21, 2020
Dec 21, 2020
Sep 7, 2020
Apr 6, 2021
Apr 23, 2022
Jan 6, 2025
Sep 11, 2021
Jun 9, 2024
Feb 5, 2021
Dec 17, 2019
Jun 20, 2023
Mar 30, 2020
Apr 23, 2022
Jul 20, 2020
Aug 17, 2022
Mar 30, 2020
Dec 9, 2024
Jun 26, 2023
Apr 6, 2020
Jul 27, 2022
May 25, 2020
Jun 15, 2020
Feb 4, 2025
Dec 14, 2022
Aug 6, 2019
Aug 17, 2017
Dec 21, 2020
Mar 10, 2021
Oct 18, 2024
Apr 3, 2017
Jun 6, 2017
Feb 7, 2022
Oct 11, 2021
Jun 2, 2023
Aug 17, 2022
Jan 25, 2022
Sep 30, 2023
Apr 23, 2022
Jan 19, 2024
Apr 6, 2021
May 24, 2021
Mar 25, 2022
Aug 10, 2020
Apr 23, 2022
Jun 8, 2020
Apr 13, 2021
Jan 15, 2025
May 25, 2020
Apr 23, 2022
May 25, 2020
Oct 24, 2018
Nov 4, 2019
Sep 6, 2024
Jan 25, 2021
Mar 16, 2025
Feb 20, 2023
May 23, 2017
Jan 25, 2018
Apr 13, 2016
Sep 13, 2022
Nov 16, 2022
Feb 24, 2022
Jun 9, 2021
May 15, 2018
Feb 3, 2022
Apr 13, 2016
May 5, 2020
Mar 13, 2023
May 8, 2017
Jan 5, 2021
Oct 10, 2018
Nov 24, 2021
Jan 22, 2024
Jan 14, 2025
Feb 19, 2021
Jan 28, 2021

Repository files navigation

Roll20 API Scripts

This repository is the collection of all the community-contributed API Scripts that are available for use on Roll20.

Contributing

If you want to help improve an existing API script, just clone this repository, make your changes, and submit a pull request. If you would like to contribute a new script for the community to use, just clone this repository and create a new folder with the name of the script which matches the name in your script.json file. Optionally you can add a README.md file with any instructions you want to include as well as any other files you feel will be helpful to the end user. Once everything is in the new folder send a pull request.

API Documentation:

If you aren't familiar with Github or Git in general, see Beginner's Guide to GitHub and/or Git Guide on the Community Wiki. If you still need help, post a question on the Roll20 API forums contact contact Roll20 and we can help you get set up.

Creating a script.json File

When you are ready to submit your script for public use, create a script.json file in your script's folder (see the _Example Script root folder for an example). The file has the following fields:

  • name: The name of the API script as it will appear in the Roll20 One-Click Menu.
  • script: The name of the javascript file, which must remain uniform throughout versions
  • version: The current version number of the API script (e.g. 12.3)
  • previousversions: All previous versions of the script in an array format (e.g. ["0.5","0.1"])
  • description: A short explanation of the script and it's use that will appear along side the script on Roll20. It is important for this section to be filled out in detail, as it's the primary way users will get information about the purpose and use of the script. Included in the description section needs to be an example use or purpose, list and explanation of API Commands, and any other information necessary to operating the script.
    • section is formatted using markdown, with the exeption that you need to use \n linebreaks, and \t for indentions. See this page for more info.
    • If you have a wiki page or Readme file for the API, it's a good idea to link it. (e.g. )
  • authors: A simple string telling who contributed toward the script (e.g. Riley Dutton,Steve Koontz)
  • roll20userid: A simple string telling the Roll20 User ID's of the authors (e.g. 1 or 45672,145678). How to find your Roll20id Used internally and won't be shown publicly on the site.
  • patreon: Place the URL for a Patreon campaign here, and it will appear under your script's description when selected via one-click. (e.g. "https://www.patreon.com/<name>")
  • tipeee: Place the URL for a Tipeee here, and it will appear under your script's description when selected via one-click. (e.g. "https://www.tipeee.com/<name>")
  • useroptions: An array of hashes that allow script authors to set pre-determined options for users to customize the functionality of the script.
  • dependencies: A list of other API scripts this script requires to function (e.g. My Kitchen)
  • modifies: A list of the common Roll20 objects and properties the script reads and writes to. Custom objects and properties inside a namespace don't need to be included. (e.g. bar1_value: write)
  • conflicts: A list of other API scripts this script is known to conflict with (e.g. Recipes)

Validating script.json

As of January 29, 2021, pull requests must pass validation of the script.json file for any changed scripts, which will be done using the included script.json.schema file. This is a JSON Schema file that describes what is and is not allowed in the script.json file. Any JSON Schema validator that supports Draft-04 or higher should work to help you validate during development/before making your pull request.

If you want a web-based JSON Schema validator, this one works well. Paste the schema on the left, your script.json on the right.

Post-validation

After we have reviewed your script and approve it, we will merge in your changes which will make them available to everyone. If we reject your script, we will comment on your Github commit and let you know what changes need to be made before it can be accepted.

Accepted File Types

The following are the only file types we typically accept in a pull request:

  • JavaScript (.js)
  • Images (.png, .svg, .jpg, .jpeg)
  • HTML (.html)
  • Text (.txt, .md)
  • Script JSON (.json)

If you have a file type in your pull request that is not in this list, please leave a comment as to why and we will review on a case-by-case basis.

Update the Wiki

After making any changes to a script or adding a new one, it's great if those changes are updated on the Roll20 Community Wiki's API:Script Index.

If you're making updates to an existing script, please find that script from the list and update:

  • Author: Adding yourself as a contributor
  • Version: To reflect your update
  • Last Modified: To today's date

If you're contributing a new script that has been accepted and merged in, it helps to create Wiki page for it. The naming convention for scripts is "https://wiki.roll20.net/Script:Script_Name". Please format your listing from the existing style. You can find an example at (https://wiki.roll20.net/Script:Example).

Useful things to document for an API Wiki page:

  • Description
  • Syntax & Examples
  • Changelog: To reflect the new version and the changes you've made
  • Links: Forum threads, README files, video showcase
  • Configuration

After you've added the page, please go to the API Script Index and add a link to your listing in the appropriate category.

Guidelines

Here are a few guidelines that you should follow when contributing API scripts for the community:

Be Clear and Concise

Community API scripts should be built from the ground up with the intention of sharing with others. The script's name should be a good indicator of what the script does and how it should be used. A script named MkLtObjMvr-Dst is likely to confuse, where a script named Light Switch is descriptive, clear, and does a good job of hinting at it's intended use.

Try to use short and descriptive function and variable names. Problematic names like x1, fe2, and xbqne are practically meaningless. Names like incrementorForMainLoopWhichSpansFromTenToTwenty are verbose. Aim for variable and function names that are meaningful but simple, such as card_val or limitStr.

Make Your Script Accessible

Please take every effort to format your code in a traditional manner and present the script in a legible state. Leaving comments on the intended use of functions and code blocks can be very useful to future contributors.

Near the top of your script should be a comment providing the script's name, version number, the last time it was updated, and a short breakdown of the scripts intended use. In the breakdown should be included the script's description, syntax, and configuration options. It is important to add configurable elements near the top of the script in an easily demarcated area with comments on how those elements can or should be customized.

If your API is complex, it might be useful for the API to create an in-game handut containing User instructions. Having a command like !your-api --help to give some details for first-time users can be great, and/or having this message whispered to the GM after first time opening the game after the API was installed.

Limit Your Script's Footprint

Include namespaces for your functions and variables, to avoid potential conflicts with other authors. Placing your functions and variables inside a unique namespace to your script protects both it, the user, and other community scripts.

Do your best to limit what your script is manipulating at any given moment to achieve it's desired result. Add API ! triggers to turn on and off your script's functionality. It is a safe practice to have your script disabled by default. Avoid functions that keep aggressive control and manipulation of objects whenever possible.

It's also smart to make it possible to enable/disable whether the API can be used partially,fully, or not at all by the players.

License

All of the code of the API scripts in this repository is released under the MIT license (see LICENSE for details). If you contribute a new script or help improve an existing script, you agree that your contribution is released under the MIT License as well.

About

API Scripts created by the community for use in Roll20 VTT. Submit a ticket at roll20.net/help if critical hotfixes are to be requested.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages