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

Changing image token on TurnMaker

1495189007
Surok
Roll20 Production Team
Love this script but is there something I'm doing wrong regarding the tokenURL portion. I've changed the address but it keeps loading the original token image. Is there another line (62) besides in the default tokenURL where the script is grabbing the default image? <a href="https://github.com/shdwjk/Roll20API/blob/master/TurnMarker1/TurnMarker1.js" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/TurnMarker1/TurnMarker1.js</a>
1495189965
Surok
Roll20 Production Team
If I had to guess maybe it has something to do with the&nbsp;schemaVersion? I'm not too savvy on how the API scripts work.&nbsp;
1495200219
The Aaron
Pro
API Scripter
You conjecture well: yonder is the gate of... &nbsp; err.. You're right! &nbsp;That's a pretty old script and I hadn't fully developed how to do things at that point. &nbsp;Here are the annoying steps you need to perform to get the image swapped out: 1) change the tokenURL entry on line 62 to whatever you want. 2) change the schemaVersion on line 14 to something else. That will cause the state to be rewritten with the new url, but does have the side effect of resetting the other configuration options.
1495203168
Surok
Roll20 Production Team
Something else like? The version is 1.17, I tried 1.18 and 1.16 but that didn't work. Is there another value I need to put in?
1495204430

Edited 1495204466
Surok
Roll20 Production Team
I get the following every time I changed the version in line 14 to something else For reference, the error message generated was: TypeError: Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at getMarker (apiscript.js:3713:37) at startMarker (apiscript.js:4087:22) at dispatchInitiativePage (apiscript.js:4109:13) at Object.registerEventHandlers [as RegisterEventHandlers] (apiscript.js:4118:9) at apiscript.js:4134:13 at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:146:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:146:1), &lt;anonymous&gt;:70:8) at checkForReady (/home/node/d20-api-server/api.js:1314:12) at /home/node/d20-api-server/api.js:1394:9 at c (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:14:64)
1495205397
The Aaron
Pro
API Scripter
That sounds like there is an issue with the image URL you used. &nbsp;If you wanna PM me an invite and GM me, I can come take a look.
1495588036
Surok
Roll20 Production Team
Posting an update. The Aaron found a solution. The Aaron is The Awsome. "The API can only create images that are in a user's Library. Install the following API script: <a href="https://app.roll20.net/forum/post/4548528/any-scri" rel="nofollow">https://app.roll20.net/forum/post/4548528/any-scri</a>... Drag an image you want to use onto your table. Select it, then run: !user-image If the image is in a user library, you'll see the url and a thumbnail of the image. If it isn't, you'll get a message telling you there weren't any found: Copy that image url and use it in the TurnMarker script, then enable it. You will likely need to bump the schemaNumber to something else again."