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

api script hlep

May 27 (4 years ago)

Edited May 27 (4 years ago)

GIST: https://gist.github.com/shdwjk/ed16764c268129afff22

Replacing the token for this with any other image breaks the script how to fix?   I'm just trying to swap out the token representing turn order with something that isn't Dr. strange's magic circle.  Tried swapping out token with something with same dimensions by replacing the link that it was pulling original image from with no luck. I'm not familiar with script at all so I don't know what I'm looking at.


May 27 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

What url are you using for your image? IIRC images in API need to have whatever is in the name just before jpg or png changed to thumb, like the url in the script.


May 27 (4 years ago)
The Aaron
Roll20 Production Team
API Scripter

TurnMarker1 is a bit old and funky.  Here are the steps to replacing the image:

1) Drop your new image on the map

2) Select it

3) hit Z

4) right-click and copy the URL.

5) Replace "max" or "min" or "original" with "thumb" in the URL

6) replace the tokenURL with your modified new URL

7) change the scemaVersion number in the top of the script.

8) save and restart the API

9) Delete any of the old markers that are laying about.

May 28 (4 years ago)

Edited May 28 (4 years ago)

I like this one just because it feels simpler to use.  In fact, if you could gut this to just the rotation animation.  I could really use that.  Not sure if it'd be simple, but I could use it for like a magic gem or something.

Oh no, guess I'll keep original.  The thing gets skewed and becomes oval shaped. 

I didn't realize how sensitive it was, but it works.  Thanks guys!

May 28 (4 years ago)
The Aaron
Roll20 Production Team
API Scripter

Oval shaped?  That shouldn't happen...

May 28 (4 years ago)
The Aaron
Roll20 Production Team
API Scripter

If you want to PM me a game invite and GM me, I can come fix it for you.

I just moved to a new place.  I just got around to checking my roll20 messages.  I'm still moving in, however, next week would you be available?