Roll20 / roll20-api-scripts

API Scripts created by the community for use in Roll20 VTT. Submit a ticket at roll20.net/help if critical hotfixes are to be requested.
https://roll20.net/
MIT License
388 stars 567 forks source link

Shadowrun 5th Edition API Doesn't Populate Initiative Tracker #1336

Open Almos80 opened 3 years ago

Almos80 commented 3 years ago

I'm having trouble with the Shadowrun 5th Edition API. The "!sr5 --rollInit" command doesn't actually send the tokens to the initiative tracker, although it does roll in the chat. The technotes has an entry for 1.2, but I can't see that 1.2 has actually been uploaded. Is there an update missing, or am I missing a step in the process for using the API? The readme implies that this should be plug-and-play, but maybe I've missed something?

https://github.com/Roll20/roll20-api-scripts/tree/master/Shadowrun%205th%20Edition

Almos80 commented 3 years ago

I'm also noticing that the script doesn't seem to recognize the 'astral' or 'matrix' token markers, as the readme suggests it should. It always rolls the physical initiative.

voodoozulu commented 3 years ago

I worked on it for a few hours. I don't know the original intent of the script, they were listening to a message then trying to pull the token _id from the message? Whatever, I couldn't figure it out. Instead I used a message callback. Right now it doesn't populate chat. I'll see if I can get that implemented. You need to custom load this API for it to work. But if you have the old one disabled and load this one it will work just fine.

I've never worked in JS before, and I didn't edit the documentation because I figure this will get fixed by someone who knows what they are doing eventually.

https://pastebin.com/vdEnsvN2

EDIT: I got messaging working, but it requires libinline library (just install it as you would any API). then past this into a new script. I'm leaving the old one up incase you don't want to download libinline for whatever reason.

https://pastebin.com/8vS8diUB