
So, I've been working on a character sheet for a year or two, and using it in my own games as a custom sheet. It's for a system that I co-wrote, and I've been using a companion API scripts file to add a bunch of convenience functionality - for example, typing "!init" as the GM to automatically roll initiative for all characters on the current page and add them to the turn tracker, or having technique usage automatically reduce stamina bars on tokens, or auto-tracking cooldown times on abilities and informing the player when they're usable again. I'm looking at submitting it for public use in the near future, and that's where things get tricky. Right now, the sheet works due to a combination of the HTML/CSS files in the General Settings tab and the JavaScript file in the API tab. I've been looking through the Github page, and I don't see any other games that use this kind of logic - specifically, special commands keyed off of "on('chat:message')" worker events. I could make a simplified version that strips out all that fancy logic, but the sheet would lose a LOT of what makes it cool if I did. Is this possible to do entirely through the character sheet HTML file? I tried just putting the JS in via a <script type="text/worker">, but it doesn't seem to pick up on the chat events. If that can't be done, is there any sort of standard practice for bundling together a character sheet and a scripts file for use via the API? If not, how else could I approach getting this sheet usable? Thanks in advance.