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

5e OGL - Adding API to the inbuilt rolls.

Does anyone know of a way of adding API scripts to the pregenerated rolls? For example, when the ranger fires an arrow, it uses Aarron's ammo script to remove one from his Cass Resource, and it uses Matt's music control script to play an arrow launch. Even better, when the damage is rolled, it plays another sound effect, that of an arrow hitting. I know you can create custom attributes using dynamic references, but I was hoping to not have to go down that route.
1457535751
The Aaron
Pro
API Scripter
I think you would need to have a place you could add those calls. In the Pathfinder sheet, they have a macro field that can be edited to add in API commands.  I think the Shaped sheet has something similar.  You may want to check the companion API script, it may have some options, or at least reveal some options. Worst case, there may be a way the API could detect that a particular roll occurred and perform some associated actions.
They actually added a 5e OGL Companion script that enables ammo tracking.
1457539763
The Aaron
Pro
API Scripter
Yeah, I should have mentioned that.  I was thinking more about Matt's music controls or other scripts.  The "Adding API" part in general, rather than specific. =D
Thanks both!