It seems that doors that have been linked and tokens that have been "bumped" sometimes forget they are linked after I exit roll20 (they work perfectly fine right after they are set up). I am not able to easily recreate this bug, but linked doors and bumped tokens will eventually stop working within a few hours. This is only an issue for recently created doors and bumped tokens. Bumped tokens and linked doors I set up a few weeks ago function normally. I started noticing this issue several days ago. This issue causes no errors in the API Output Console, and the scripts still run and work normally for freshly linked doors or bumped tokens, as well as doors I linked several weeks ago. I have tried restarting the API sandbox, but that does not fix anything Example for issue with Bump, since it is difficult for me to explain with words: GIF . When I try to use the !OpenDoor command on switches having this issue, the api output console writes "{}", which is the same message I get if I type that command while selecting something that isn't a linked switch for a door. The only error I get in the dev console in chrome seems to not be related to either script, but rather with an image of a shadow I found in the art library. This only happens when loading one of the pages it question, and does not happen in relation to the Doors/Bump. I will include it here in case it is relevant: Access to Image at '<a href="https://s3.amazonaws.com/files.d20.io/images/369927/dwsvAMUHTMuU7CakvsDOLA/thumb.png?135280991355555555" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/369927/dwsvAMUHTMuU7CakvsDOLA/thumb.png?135280991355555555</a>' from origin '<a href="https://app.roll20.net" rel="nofollow">https://app.roll20.net</a>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="https://app.roll20.net" rel="nofollow">https://app.roll20.net</a>' is therefore not allowed access. Scripts : Doors Script: Aaron's Updated Matt's Door Script . Bump: Latest version found in Script Library Other Scripts Used : 5th Edition OGL by Roll20 Companion, latest version found in script library Aaron's Map Lock , version 0.4.4 Roll20 Audio Master: Latest version found in script library Torch: Latest version found in script library Aaron's Imperial Calendar , version 0.1.2 TokenMod: Latest version found in script library Keven's TokenAction Creator , version 0.2.4 I also use a small initiative script that I found on the forums a some time ago. I can't find the original link, but I think Aaron posted it as an example. on('ready',function(){
"use strict";
on('chat:message',function(msg){
var args,cmds,who,initial,change,entry;
if('api' === msg.type && msg.content.match(/^!act\b/) && playerIsGM(msg.playerid) ){
if(_.has(msg,'inlinerolls')){
msg.content = _.chain(msg.inlinerolls)
.reduce(function(m,v,k){
var ti=_.reduce(v.results.rolls,function(m2,v2){
if(_.has(v2,'table')){
m2.push(_.reduce(v2.results,function(m3,v3){
m3.push(v3.tableItem.name);
return m3;
},[]).join(', '));
}
return m2;
},[]).join(', ');
m['$[['+k+']]']= (ti.length && ti) || v.results.total || 0;
return m;
},{})
.reduce(function(m,v,k){
return m.replace(k,v);
},msg.content)
.value();
}
args = msg.content
.replace(/<br\/>\n/g, ' ')
.replace(/(\{\{(.*?)\}\})/g," $2 ")
.split(/\s+--/);
cmds=args.shift().split(/\s+/);
change=parseFloat(cmds[1])||'+1';
initial=parseFloat(cmds[2])||0;
entry=args.join(' ');
if(entry.length){
let to=JSON.parse(Campaign().get('turnorder'))||[];
to.unshift({
id: "-1",
pr: initial,
custom: entry,
formula: change
});
Campaign().set('turnorder',JSON.stringify(to));
} else {
who=getObj('player',msg.playerid).get('_displayname');
sendChat('ACT',`/w "${who}" <div style="padding:1px 3px;border: 1px solid #8B4513;background: #eeffee; color: #8B4513; font-size: 80%;"><div style="background-color: #ffeeee;">Error: no entry name provided.</div></div>`);
}
}
});
});
I am including both of these issues in a single post as both scripts started exhibiting these issues at the same time. Let me know if there is any more information I can provide. (Btw, thank you for making + updating so many scripts, Aaron! They really improve my games)