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
This post has been closed. You can still view previous posts, but you can't post any new replies.

setDefaultToken seems to provide an incorrect value to a bar

1486679714

Edited 1486681466
Kryx
Pro
Sheet Author
API Scripter
const tokenProps = { bar1_value: hp, bar1_max: hp, bar2_link: 'AC', bar3_link: 'speed' } setDefaultToken(tokenProps); I have verified the values are sent correctly: { bar3_link: "speed", bar2_link: "AC", bar1_value: 135, bar1_max: 135, height: 70 … }  But this results in bar1_value taking the value of bar2_link: Same happens for a Volo creature: Every creature I've tested has resulted in the same bug where bar1_value is overwritten by bar2's value after link.
1486684413
The Aaron
Pro
API Scripter
I tried this with a Cranium Rat and got as far as verifying the postMessage is sending the right values:
1486684959
The Aaron
Pro
API Scripter
I was able to verify the actual firebase update has the right data in it: "{"bar2_link":"-Kc_IYoGnDYIVLEUzr13","bar1_value":2,"bar1_max":2,"bar3_link":"-Kc_IYoVSam6FLfcNyKO","height":70,"light_angle":360,"light_hassight":true,"light_losangle":360,"showname":true,"showplayers_aura1":true,"showplayers_aura2":true,"width":70,"light_dimradius":-2.5,"light_radius":35,"represents":"-Kc_IXtbsvSR-GzpSaP0","name":"Cranium Rat","imgsrc":"<a href="https://s3.amazonaws.com/files.d20.io/images/24120292/D48rn35d8nVrg3YrwQbPtQ/thumb.png" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/24120292/D48rn35d8nVrg3YrwQbPtQ/thumb.png</a>"}"
1486685110
Kryx
Pro
Sheet Author
API Scripter
This is a bug with the Shaped companion script's function to set HP it seems. Thanks for testing Aaron. Please close this.