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

Threat and Momentum for Star Trek Adventures

1500705234

Edited 1500838047
Bast L.
API Scripter
Heya. My players were interested in a nice way to track threat and momentum in STA. I made this script. The chat report is pretty ugly, maybe someone who knows templates would clean it up. Actually, I know a tiny bit, maybe I can make it nicer.. Perhaps in an edit.&nbsp; edit: nvm, I don't know how to send the value in a template from the api script, or how to call the value from a template macro from the game. Leaving it as ugly. edit again: ok, I made it slightly less ugly. I'm using the default template, because the lcars template from the character sheet adds "successes" no matter what, as far as I can tell. Anyways, as the comment at the top of the script says, you'll need a few macros, and a character sheet. Hope this is useful to someone. Here's the Gist: <a href="https://gist.github.com/Bastlifa/291d456123179b335" rel="nofollow">https://gist.github.com/Bastlifa/291d456123179b335</a>... Edit: I edited the gist to add a check before anything else that it's an API message. I didn't remove the redundant checks yet. Edit: removed redundant api check.
Works really well. Thanks for aiding the community in bringing Star Trek Adventures to roll20.
1501164523
The Aaron
Pro
API Scripter
That's a great first script! &nbsp;I can help you with getting the formatting working, if you're interested.
Yeah, that would be a lot better, if I could get it working in the LCARS template, rather than default. I'll say something on gitter.
After playing around with inspect element to find the html for the lcars template, I was able to update it to output a bit better.
1501372514
The Aaron
Pro
API Scripter
Cool!&nbsp;
1501374159

Edited 1501395916
Bast L.
API Scripter
Yeah, thanks for the idea. I actually referenced your tokenmod script to see how to put html into the api script. Edit: Aaron simplified the code, reads easier, less copy/paste. I updated the gist to that.