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

So what exactly do Scripts allow you to do?

So I recently began using roll 20 and, while my campaign has been progressing quite well, I have hit some snags that can only be fully resolved by using API, which is why I'm considering purchasing a subscription. So the question here is, what exactly is the extent of control that they offer? Can I, for instance, do a flat damage calculation based on a player's stats, add it to any debuffs and weaknesses a monster has, mitigate the damage based on the monster's defense, calculate if the monster successfully dodges or not, and subtract from the monster's HP bar and the player's mana bar all in one go, instead of doing a multiple-step process manually like I currently have to? Can I create nice, organized ability sheets instead of a drop-down selection macro? Organized inventory instead of adding it to player's bio or creating a text-based handout? From what I've seen so far it operates like any C-based programming language, but I'd like to know what exactly can you do and alter in the roll20 interface to make it more appealing. Some example images showing what you have done with them would be appreciated. Thank you in advance
1494640436
Lithl
Pro
Sheet Author
API Scripter
API scripts react to: The sandbox spinning up (roughly: when a player first enters the VTT or a script is saved while a player is in the VTT) Messages in chat Objects in the campaign being created, modified, or destroyed API scripts can: Send messages to the chat Read the properties of any object in the campaign Set the value of most properties of objects in the campaign Persist data across game sessions Heaven Builder said: Can I, for instance, do a flat damage calculation based on a player's stats, add it to any debuffs and weaknesses a monster has, mitigate the damage based on the monster's defense, calculate if the monster successfully dodges or not, and subtract from the monster's HP bar and the player's mana bar all in one go Yes Can I create nice, organized ability sheets instead of a drop-down selection macro? Not quite certain what you mean. Organized inventory instead of adding it to player's bio or creating a text-based handout? Yes, in fact I believe there's at least one existing script to handle inventory management. From what I've seen so far it operates like any C-based programming language It's server-side JavaScript, specifically. I'd like to know what exactly can you do and alter in the roll20 interface to make it more appealing. The API cannot actually alter the Roll20 interface. The closest you can get to that is creating buttons in the chat, or creating a system of tools that are tokens on the map.
Can I create nice, organized ability sheets instead of a drop-down selection macro? Not quite certain what you mean Currently my ability system involves executing a macro called skills in chat via #skills. What it does is create a drop-down menu (using the ?roll command in macros) where you can scroll through and visualize, read info about and select what ability you want to use. However, I'd like something somewhat like a spellbook of sorts, where all your abilities are stored and you can read about them in greater detail. But anyways, thank you for the reply :)
1494643137
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Heaven Builder said: Can I create nice, organized ability sheets instead of a drop-down selection macro? Not quite certain what you mean Currently my ability system involves executing a macro called skills in chat via #skills. What it does is create a drop-down menu (using the ?roll command in macros) where you can scroll through and visualize, read info about and select what ability you want to use. However, I'd like something somewhat like a spellbook of sorts, where all your abilities are stored and you can read about them in greater detail. But anyways, thank you for the reply :) This sounds like you need to make a character sheet for your system. That's pretty much what they are for. The ability to create and use Custom Character sheets is another pro subscription perk.
This sounds like you need to make a character sheet for your system. That's pretty much what they are for. The ability to create and use Custom Character sheets is another pro subscription perk. Argh blasted paywalls... I might end up getting the subscription sooner or later, but currently messing around with limitations really forces you to get creative and is actually quite fun (if I'd had character sheets from the start, I would've never made the ability selector, for instance)
While we're on the subject: Can roll20 scripts get data from external programs?
Matt G. said: While we're on the subject: Can roll20 scripts get data from external programs? No.  Though it can parse data, so you could copy/paste data into chat and do what you want with it.  To automate it, you could probably get creative and use Autohotkey to grab the data you want and copy/paste it automatically.