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

Map Borders

Currently it is possible that tokens end up beyond the borders when copying from another map and thus are neither visible, nor can they be moved or otherwise edited / deleted. Is there a workaround for this? Will this be fixed sometime?
1646131016
Andrew R.
Pro
Sheet Author
Try using the Select-All shortcut and moving the tokens until you can see them again. 
1646151053
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Since you can use the API, here is a little script the Aaron wrote for me once upon a time. Us the command !retrieve-tokens and any tokens off the edge will be moved to just inside the edge. on('ready',()=>{   const EPSILON = 5;   const getPageForPlayer = (playerid) => {     let player = getObj('player',playerid);     if(playerIsGM(playerid)){       return player.get('lastpage');     }     let psp = Campaign().get('playerspecificpages');     if(psp[playerid]){       return psp[playerid];     }     return Campaign().get('playerpageid');   };   on('chat:message', (msg) => {     if('api'===msg.type && playerIsGM(msg.playerid) && /^!retr(ie|ei)ve(\b|$)-tokens/i.test(msg.content)){       let who = (getObj('player',msg.playerid)||{get:()=>'API'}).get('_displayname');       let pid = getPageForPlayer(msg.playerid);       let page = getObj('page',pid);       let pHeight=page.get('height')*70;       let pWidth=page.get('width')*70;       const outside = (t) => {         let hw = (t.get('width')/2)-EPSILON;         let hh = (t.get('height')/2)-EPSILON;         let offU = (t.get('top')+hh)<0;         let offL = (t.get('left')+hw)<0;         let offD = (t.get('top')-hh)>pHeight;         let offR = (t.get('left')-hw)>pWidth;         return offL || offR || offU ||offD;       };       const moveOn = (t) => {         let opts = {};         let x = t.get('left');         let y = t.get('top');         if(x < 0){           opts.left = 0;         }         if(x > pWidth){           opts.left = pWidth;         }         if(y < 0){           opts.top = 0;         }         if(y > pHeight){           opts.top = pHeight;         }         t.set(opts);       };       let tokens = findObjs({         type: 'graphic',         pageid: pid       }).filter(outside);       tokens.forEach(moveOn);       let fixed= tokens.length;       sendChat('RetrieveTokens',`/w "${who}" <div>Fixed ${fixed} tokens.</div>`);     }   }); });
Thanks! Will definitely try that out.