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

Tokenlock

I run a turn-based strategy game and use Dynamic lighting to give the players vision of the map but only for their own units and characters. I use the Tokenlock to prevent players from moving their tokens around and viewing the map. Since the Update in loading the game Firefox would crash. I worked that out but the tokens can be moved and the controls for this API don't work. Went to the API settings and the Tokenlock is disabled. Deleted, reinstalled, same thing, tokens can be moved, and the controls don't work. Deleted again this time reinstalled the IsGM script and the Tokenlock script. Same result with the same error message stating this script has been disabled. I can run the game without the limited vision for each player with them seeing the whole map but would prefer they see only their territory and where their tokens are located. Here is the error message in the API setting. events.js:72 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE at errnoException (net.js:904:11) at Server._listen2 (net.js:1023:19) at listen (net.js:1064:10) at Server.listen (net.js:1132:5) at Sandbox.start (/home/symbly/www/d20-api-server/sandcastle/lib/sandbox.js:35:15) at Object.<anonymous> (/home/symbly/www/d20-api-server/sandcastle/bin/sandcastle.js:11:9) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) I've delayed the game turn due today till Friday and would like to know does or doesn't the Tokenlock work with this update? Everything normal 2 days ago. I would like to tell the players tomorrow how the campaign will be played with or without the limited vision. Thanks Barry A.
1437597792
The Aaron
Pro
API Scripter
It's one of mine. I'll take a look tonight!
Thanks!
That error doesn't look like it could be caused by the script; it's more likely the scripting system.  EADDRINUSE is the errno you get when you try to bind a socket to a port what's in TIME_WAIT; that typically shows up when a server which binds without SO_REUSEADDR restarts too soon after it shut down (or when a second instance of the server is started while the first one is still running). When this came up before, it correlated with double execution of installed scripts.  That bug report is here .
Can I correct that at my end? As I said I can run the game without it. I just updated a bunch of stuff on the big map and no problems. The players are parked on a white page that tells them the map is being updated. Tomorrow I will put them back on the map page either with or without the limited vision for their tokens. The game just gets played differently. Thanks
1438097772
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Barry, the site had been going up and down with hot fixes during that time. Are you still having this issue?
My system: Pentium 4 / 3 Ghz / 1.5 GB memory / graphics card 82915G/GV/910GL OS Linux mint 17.1 32 bit I just checked and the latest Firefox & Google Chrome Sorry for being later I had a game turn yesterday and wanted to have time to try the dynamic lighting again. In creating my campaign I duplicated the map page so there's the main game map page and a trial map page where I can do stuff like this without doing anything to the game map. Since the problems with my Firefox crashing with the Roll20 update I've downloaded and installed Chrome. I use the Firefox as my regular browser for everything but Roll20 and use the Chrome solely for Roll20. Using the Firefox went into the game and while switching to the editor after setting the test map page for dynamic lighting it crashed. Restarted Firefox and disabled all the addons, closed and restarted. Got into the game set the dynamic lighting and zoomed in and the background went white and no map. Tried switching to the main game map page and Firefox crashes. Reopen Firefox and tried logining into Roll20 and the browser crashes at that. No problems with the Chrome. Got in put dynamic lighting on for the test map and added a bunch of tokens with single player sight. The game slows down with slow and jerky movement panning around the map. Slower to open up things and switching from game page to game page but no other problems. Main map works fine no dynamic lighting on it and take it off the test page and it goes back to normal. Using Firefox with the addons I have no problems as my regular browser and I use the Chrome solely for my work on Roll20. The game plays fine as a tabletop strategy game being played on the virtual tabletop. It saves me a lot of work not having the limited sight for the tokens and I don't need the Tokenlock API to prevent the players from moving them. For game strategy I prefer that it had the limited sight but it's not a requirement to play and enjoy the game. Thanks for the work the Roll20 team does and for the help here. I hope this helps you to help others with similar problems given the number of different hardware and software configurations there are. A difference I noticed with Chrome, when I copy and paste into messages and handouts from a Libreoffice document in Firefox I always got the formatting notation with it and had to delete it. Using the Chrome doesn't do this and everything else is the same. Again Thanks Barry A.
1438647405

Edited 1438647866
The Aaron
Roll20 Production Team
API Scripter
Ok, I just tried TokenLock in a test game and did not encounter any crashes. Can you try the lock functionality with all the other scripts disabled?  Also, can you provide a list of the other scripts you're using? 
1438647993
The Aaron
Roll20 Production Team
API Scripter
Barry, can you also try creating a duplicate of the game and see if TokenLock has the same problem there? ( See Copy Game under Settings: <a href="https://wiki.roll20.net/Game_Management#Settings" rel="nofollow">https://wiki.roll20.net/Game_Management#Settings</a> ) &nbsp;You will need to copy over your scripts. A duplicate game will have a fresh state object, which means you loose all the settings, but if the state is corrupted, it will fix it.
1438713522

Edited 1438713592
The only scripts I used we're the TokenLock and the IsGM. I installed the first and then the second. I tried the game in chrome with no crashes but with the dynamic lighting on and no scripts it definitely slowed down on me. Take off the dynamic lighting and it's back to normal. I have an older computer and with more players now on the map and units I'll keep it as an open map which plays fine and there is a lot less work for me in upgrading the map to account for the player's orders in the game. Though I prefer the limited vision. Tomorrow after the game turn is done I'll try the duplicate game and see how it runs in both Firefox and Chrome. I'll then give you how it ran and the stats for my computer and OS. A clean copy may be the answer. Thanks. You have above my computer system configuration.
1438714621
The Aaron
Roll20 Production Team
API Scripter
Are you using the latest version of TokenLock , which is&nbsp; v0.2.2 ? &nbsp;If you are, you don't require the isGM script, as the new version uses the built in playerIsGM() function.
Yes it was the new version I had installed and that crashed after the Roll20 update. I removed it then installed the IsGM and the TokenLock and had the same result. The Firefox would crash the Chrome wouldn't but I had slow panning and slow response to doing anything. I removed the scripts and tried that. Firefox would eventually crash but Chrome was OK but for the slow response. I turned the dynamic lighting off then on again. On it's slow responding and without it's normal. This is without the scripts.&nbsp;
1438745621
The Aaron
Roll20 Production Team
API Scripter
So, that sounds like the issue isn't the scripts, but is general instability, particularly with the Dynamic Lighting on. Does that sound like a fair assessment?
Yes when I made the campaign I made a copy of the main game page so I would have a Test page and do things without messing around with the game map. That had the same problem not just the main game page. I will test later today a duplicate page as you suggested and I'll try with both browsers without any scripts and then add the TokenLock and repeat. I'll tell you the results later today. I suspect it's a general instability. The specific of what it is I'm not good enough to determine. You have above my system configuration and I'll get back.
Busy yesterday only just did the test now. You have my system stated above. Here's how I set up the test. Using Chrome I entered the game and made a new page using the settings from the main map page but NO dynamic lighting. Put the maps on this new page, there are two of them 3.5 megs apiece, and their joined together on the map level. Map size is 120 by 80 hexes and put a bunch of tokens on with "has sight" on but only for the player that is set as the owner. Went out of chrome and login using the Firefox. Got into the game but when I clicked to go to the this new page Firefox crashed. Sent in the error report and went in using chrome and no problems. Turned on the dynamic lighting only on this test page and went out. Go in using Firefox and it crashes loading the main map where the player's ribbon is set. Go in with Chrome it loads and everything normal on the main map which doesn't have the dynamic lighting on. Switched to this test map with the dynamic lighting on and Chrome doesn't crash BUT as I stated before it slows down. Clicking on the tab to slide away the right toolbar and the map disappears. Comes back on in 10-15 seconds. The tokens barely respond. Change the magnification and slow to update. Switch to the main map, no problems there. I go out and in the Game settings install TokenLock v0.2.2 . Before in the API it would automatically disable that script right away. Removed it reinstall and it would disable it due to an Error that I reported above. This time no problems and the script is working. Go in using Firefox, loads up the main page slowly. Try to switch to the test page and it crashes. Go in using Chrome no crash and the main page without the dynamic lighting operates normally. Switch to the test page and it operates as above, slow to move around, hard to move the tokens, and general unresponsiveness. I'm able to operate the TokenLock switching it on and off. Right after the update of Roll20 I couldn't operate the TokenLock. With it on I can't drag and drop tokens. No response from them at all. So I can't tell if they would snap back to the start location. It's beyond me to tell where the problem exactly is but it's not the API script. Everything in Chrome operates as it should without the dynamic lighting but with it, slow and unresponsive. The Firefox got me in to the main map the first time but switch to a new map page as Aaron suggested, CRASH and there is no dynamic lighting on. I had no problems prior to the Roll20 update. I was using Firefox and my system is as it is now. I did notice as I was getting more units on the map it was becoming slower and it would take longer to load at the start. I can play the game without the limited vision for each player to their own tokens and territory, it's just different. You can easily see those Dragons winging in for an attack! Thanks to the Roll20 team for the help. My main problem is solved. Use Chrome with no dynamic lighting and keep on GMing. For the dev team an interesting puzzle. If you need further help just ask and when using the Firefox for these tests the addons were disabled. Thanks.