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

Default token JSON no longer has any light settings?

1613132198

Edited 1613133350
David M.
Pro
API Scripter
I got a report from some users of my SpawnDefaultToken script that the light/vision settings of their default tokens were not being honored by the spawned copies created by the script. I logged the default token JSON, and lo and behold none of the light settings are in it anymore (except night_vision_tint). This is obviously problematic. Here's an example default token JSON string: {\"left\":805,\"top\":525,\"width\":70,\"height\":70,\"imgsrc\":\"<a href="https://s3.amazonaws.com/files.d20.io/images/124230538/67oeuLPd4KHOz1LXmGCvCg/max.png?1587224846\&quot;,\&quot;page_id\&quot;:\&quot;-M4yZYf4nSwXQnIA96su\&quot;,\&quot;layer\&quot;:\&quot;objects\&quot;,\&quot;name\&quot;:\&quot;Druid\&quot;,\&quot;represents\&quot;:\&quot;-MCCp5FQM8AJzux0fBng\&quot;,\&quot;bar1_value\&quot;:10,\&quot;bar1_max\&quot;:10,\&quot;bar1_num_permission\&quot;:\&quot;hidden\&quot;,\&quot;bar1_link\&quot;:\&quot;-MCCpFpqZuiWTb-ua_k8\&quot;,\&quot;bar2_num_permission\&quot;:\&quot;hidden\&quot;,\&quot;bar2_link\&quot;:\&quot;sheetattr_ac\&quot;,\&quot;bar3_num_permission\&quot;:\&quot;hidden\&quot;,\&quot;bar_location\&quot;:\&quot;overlap_bottom\&quot;,\&quot;compact_bar\&quot;:\&quot;compact\&quot;,\&quot;showname\&quot;:true,\&quot;sides\&quot;:\&quot;https://s3.amazonaws.com/files.d20.io/images/124230538/67oeuLPd4KHOz1LXmGCvCg/max.png?1587224846|https://s3.amazonaws.com/files.d20.io/images/124176586/apNLdoes8_dPHFGkX5kFcQ/max.png?1587218022|https://s3.amazonaws.com/files.d20.io/images/124162990/4zokqjNxIkolUcArGRiT4Q/max.png?1587216094|https://s3.amazonaws.com/files.d20.io/images/124280454/xvYXYi7fdtrHCYHbI5HVsA/max.png?1587229771|https://s3.amazonaws.com/files.d20.io/images/124150841/To2vGi41n64XEyQ1p7zxrQ/max.png?1587214186\&quot;,\&quot;lastmove\&quot;:\&quot;836,495\&quot;,\&quot;night_vision_tint\&quot;:\&quot;\" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/124230538/67oeuLPd4KHOz1LXmGCvCg/max.png?1587224846\",\"page_id\":\"-M4yZYf4nSwXQnIA96su\",\"layer\":\"objects\",\"name\":\"Druid\",\"represents\":\"-MCCp5FQM8AJzux0fBng\",\"bar1_value\":10,\"bar1_max\":10,\"bar1_num_permission\":\"hidden\",\"bar1_link\":\"-MCCpFpqZuiWTb-ua_k8\",\"bar2_num_permission\":\"hidden\",\"bar2_link\":\"sheetattr_ac\",\"bar3_num_permission\":\"hidden\",\"bar_location\":\"overlap_bottom\",\"compact_bar\":\"compact\",\"showname\":true,\"sides\":\"https://s3.amazonaws.com/files.d20.io/images/124230538/67oeuLPd4KHOz1LXmGCvCg/max.png?1587224846|https://s3.amazonaws.com/files.d20.io/images/124176586/apNLdoes8_dPHFGkX5kFcQ/max.png?1587218022|https://s3.amazonaws.com/files.d20.io/images/124162990/4zokqjNxIkolUcArGRiT4Q/max.png?1587216094|https://s3.amazonaws.com/files.d20.io/images/124280454/xvYXYi7fdtrHCYHbI5HVsA/max.png?1587229771|https://s3.amazonaws.com/files.d20.io/images/124150841/To2vGi41n64XEyQ1p7zxrQ/max.png?1587214186\",\"lastmove\":\"836,495\",\"night_vision_tint\":\"\</a>"} obtained from: spawnObj.get("_defaulttoken", function(defaultToken) { log(defaultToken); ...removed a bunch of code here }); What gives?
1613196128
Oosh
Sheet Author
API Scripter
Hmmmm, I can't seem to reproduce this. Is it only for spawned tokens, or all the existing characters?
1613239932
David M.
Pro
API Scripter
Thanks, Oosh. I was seeing some stuff that was confusing me, but that led to finding a bug in my script. Going to chalk it up to user error. I got it working again. Sorry for the trouble.
1613259312
Oosh
Sheet Author
API Scripter
My job here is done!