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

Is there a way in an API to access the formatting used in the chat messages

Hey while working on this script  i was curious but unable to find it myself.  Essentially the whole section on finding out weather the roll was a crit or not is bugging me, it works just fine.  But knowing that when we roll our templates, the chat shows Crits in green, and invalid/not used rolls kinda 'grayed out' i was thinking it'd be much simpler to look at the Chat msg for the #'s and the Chat formatting to see if it crit or not, because it's already doing all the figuring in it's backend, and relaying it with Colours. is there any object/magic that the api lets us peek at for the formatting on the rolls in chat?
1574667793
GiGs
Pro
Sheet Author
API Scripter
Mohkan said: is there any object/magic that the api lets us peek at for the formatting on the rolls in chat? Not that I'm aware of. That script is just letting roll20 handle the roll as it does normally, tehn adding an extra bit of chat printout. It is possible to create scripts which have complete control of formatting, so you can do what you want with the coloring, but they have to be built from the ground up to do the whole roll, so its a very different kind of script.
1574688241
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, all that the roll template does to change the crit/fumble formatting is change the css that is applied to the critical and fumble classes (pretty sure I'm misremembering the class names).