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

[Help] Auto-Generating NPC tokens using 5th Edition OGL by Roll20 Companion

Firstly I am honestly not sure if this is the right forum to post this in, but it is an API script. Anyhow! So one of the options provided by the companion API is the following macro: ! autonpctoken,  which is meant to "Automatically generates a NPC token on the GM's screen based on the default token when an NPC's health calculation is rolled".  Does anyone know how to get this specific macro to work as whenever I've rolled the NPC's health calculation nothing has happened even though a default token with no values had been assigned to it.  Any help would be much appreciated. 
1473777694
Kirsty
Pro
Sheet Author
Oh, I know this one! First of all, make sure that you've used the one click install to add the api script. While you're there, make sure that your sandbox is running. If you see an error message, it could mean that another script is interfering with the OGL script.  In your game, use !5estatus to check that autonpctoken is on. If it's off, use the command "!autonpctoken on". Next, make sure that you have a token assigned to the character sheet. It should  appear on the very top left of your map when you roll the health. One thing to note is that if you're zoomed in, the token won't appear on the top left of your screen, it will be at the top left of the map, so you may need to scroll to see it. (Sounds obvious, I know, but it took me a while to figure out) Hope this helps!
Firstly, thanks for the help! But the problem I was having seemed to be "ERROR: You cannot set the imgsrc or avatar of an object unless you use an image that is in your Roll20 Library. See the API documentation for more info." now that I actually had a proper look at it thanks to your assistance.  But that just brings up another question, will I have to manually re-upload every token I acquire from the free/premium assets for them to function with this script? As the original token I was using was a free asset I had added to my roll20 library.
1473780903
The Aaron
Pro
API Scripter
Yes, unfortunately.  Riley has said he's going to fix that soon though, so maybe you won't have to for long.
Right-o! Well thanks a lot for the help all of you! 
The Aaron said: Yes, unfortunately.  Riley has said he's going to fix that soon though, so maybe you won't have to for long. That's really, really good news.  ^^  Can't happen soon enough.
Hello, I'm still very new to this whole roll20 thing, but have encountered the exact same problem.  However, I can't seem to find how to upload the free tokens into the library and have the autonpctoken work.  I expected clicking on copy to library to be my answer, but it still doesn't work.  I know the autonpctoken code itself is working, because it works just fine with any pictures I upload from my computer.  I would just download these free tokens and upload them the same way, but for the life of me, I can't find a way to save them.  
1476128630
The Aaron
Pro
API Scripter
Are you talking about the tokens you get as a pro subscriber? &nbsp; <a href="https://marketplace.roll20.net/browse/search/?keyw" rel="nofollow">https://marketplace.roll20.net/browse/search/?keyw</a>...