• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Improvements for the dedicated server

It's nice to have the map refreshed, but atm it reloads the whole page, so each option has to be checked again everytime (player online, claims etc.). A solution that only automates the "reload tiles" function, like before (as mentioned by SylenThunder) would be much better :)

 
hi alloc, how i can retrieve the map?

always have this error:

"An error occured or you do not have any permissions on this WebPanel. Log in with the link on the lower left!"

but ive loged with steam and have the permission 0 on serveradmin.xml

 
hi alloc, how i can retrieve the map?
always have this error:

"An error occured or you do not have any permissions on this WebPanel. Log in with the link on the lower left!"

but ive loged with steam and have the permission 0 on serveradmin.xml
Your webpermissions.xml should look something like this...

Code:
<?xml version="1.0" encoding="UTF-8"?><webpermissions>
   <admintokens>
       <!-- <token name="adminuser1" token="supersecrettoken" permission_level="0" /> -->
   </admintokens>


   <permissions>
       <!-- <permission module="webapi.executeconsolecommand" permission_level="0" /> -->
       <permission module="webapi.getplayersonline" permission_level="2000" />
       <permission module="webapi.getstats" permission_level="1000" />
       <permission module="web.map" permission_level="2000" />
       <permission module="webapi.getlandclaims" permission_level="2000" />
   </permissions>


</webpermissions>
It's not serveradmin, it's a completely different file.

 
Well, yes... my server manager monitors all players currently online in the server for restricted items and suspicious activity, and automatically takes necessary actions. Also we store everything in a database for auditing/tracking and forensic investigations. We use it to find out who placed what item/block and when, or who was in a certain area and had X item in inventory.Currently we have to spam si in telnet every minute. Your api would make this so much cleaner and faster
Gotcha, shouldn't be much of a problem anyway, on my list.

What type of message or error does it display when someone logs in with their Steam account with no permissions? Does it allow all Steam users map access by default?
By default: Only perm level 0 as set in your normal admins-definition, i.e. those that also have all permissions on the console. Web will show a message like "you don't have any permissions", actually the same as when you are not logged in yet (and there's no guest-permissions).

where would i put a reload time into the map page so it refreshes like it did before?
Actually, it would be better to use something in the js like we had before where it just reloads the blocks. It's on my "to-tinker-with" list.
It's nice to have the map refreshed, but atm it reloads the whole page, so each option has to be checked again everytime (player online, claims etc.). A solution that only automates the "reload tiles" function, like before (as mentioned by SylenThunder) would be much better :)
Hm, when did the map have an auto-refresh? Really can't remember about that, at least the A11 revs (and I think also A10) only had the manual reload-tiles button.

Of course auto-refresh could be added but this will also add additional overhead on the server for retransmitting the tiles over and over again.

"An error occured or you do not have any permissions on this WebPanel. Log in with the link on the lower left!"but ive loged with steam and have the permission 0 on serveradmin.xml
*If* you are logged in with an account that *has* the permission level 0 in serveradmin.xml you should be fine. In this case I still have to assume one of those two conditions aren't met ;)

Use "admins list" in game (or network console or control panel) to get a list of defined admins and permission levels and make sure one of them shows the same SteamID (and level 0) that is also shown on the web panel on the lower left when you're logged in.

Your webpermissions.xml should look something like this......

It's not serveradmin, it's a completely different file.
That's only for specifying the required levels for the functions, but if he only wants perm level 0 access (default) there's no need to modify this file. He just has to have permission level 0.

 
---snip---Hm, when did the map have an auto-refresh? Really can't remember about that, at least the A11 revs (and I think also A10) only had the manual reload-tiles button.

Of course auto-refresh could be added but this will also add additional overhead on the server for retransmitting the tiles over and over again.---snip---
The automation of the reload tiles function was done by adding this to the index.js file after line 512

Code:
		var reloadTilesEvent = function() {
	tileTime = new Date().getTime();
	tileLayer.redraw();
	tileLayerMiniMap.redraw();
	window.setTimeout(reloadTilesEvent, 120000);
}

window.setTimeout(reloadTilesEvent, 120000);
- the reload time could be set to any value, we used the 2 minutes reload for our server. Someone posted this some months ago here in the forum, and it was a useful find.

 
The automation of the reload tiles function was done by adding this to the index.js file after line 512
Code:
		var reloadTilesEvent = function() {
	tileTime = new Date().getTime();
	tileLayer.redraw();
	tileLayerMiniMap.redraw();
	window.setTimeout(reloadTilesEvent, 120000);
}

window.setTimeout(reloadTilesEvent, 120000);
- the reload time could be set to any value, we used the 2 minutes reload for our server. Someone posted this some months ago here in the forum, and it was a useful find.
Ah, ok, not in the official part :)

Should still work the same way though.

 
Ah, ok, not in the official part :) Should still work the same way though.
Oh ok, but in what *.js file I had to copy these lines now? Because there are now one separate for each function, and the index.js only contains 3 lines and looks completely different now - and I have no clue regarding js files tbh oO

 
Oh ok, but in what *.js file I had to copy these lines now? Because there are now one separate for each function, and the index.js only contains 3 lines and looks completely different now - and I have no clue regarding js files tbh oO
Probably map.js :) . I'll add it to my map and see if anything actually reloads

It's doing something (onno if its reloading the tiles, my players don't explore much these days :( )

I added the code to line 199-206 (under/inbetween getplayerslocation, which I'm sure isn't right but it seems to work?)

 
Last edited by a moderator:
Probably map.js :) . I'll add it to my map and see if anything actually reloads
It's doing something (onno if its reloading the tiles, my players don't explore much these days :( )

I added the code to line 199-206 (under/inbetween getplayerslocation, which I'm sure isn't right but it seems to work?)
Crap, cant edit my post anymore. It didn't work though lol >.< best to wait for Alloc. Sorry!

 
I managed to get it to "refresh" the tiles, but it won't actually reload them. basically it makes the map blink every 60 seconds.

I added the code to map.js at line 128

 
I managed to get it to "refresh" the tiles, but it won't actually reload them. basically it makes the map blink every 60 seconds.
I added the code to map.js at line 128

Thats what mine was doing as well (I moved mine to the same exact line as well)

 
Yeah, sorry, of course it changed a bit ;)

Code:
var reloadTilesEvent = function() {
var newTileTime = new Date().getTime();
tileLayer.options.time = newTileTime;
tileLayer.redraw();
tileLayerMiniMap.options.time = newTileTime;
tileLayerMiniMap.redraw();
window.setTimeout(reloadTilesEvent, 120000);
}

window.setTimeout(reloadTilesEvent, 120000);
This one should work, somewhere before the closing bracket in line 199 of map.js should be just fine. 128 would be fine too. Will probably add a simple control for that later on. Maybe the weekend.

 
Hello Alloc.

Just FYI, I'm getting sometimes this error, when I use rendermap command:

Code:
2015-08-04T03:40:33 1033.317 INF Error in MapTileCache.SaveTile: System.IO.IOException: Sharing violation on path D:\Games\7DTD\Random Gen\JITA\map\0\-3\-2.png
 at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
 at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) [0x00000] in <filename unknown>:0
 at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int)
 at System.IO.File.Create (System.String path, Int32 bufferSize) [0x00000] in <filename unknown>:0
 at System.IO.File.Create (System.String path) [0x00000] in <filename unknown>:0
 at System.IO.File.WriteAllBytes (System.String path, System.Byte[] bytes) [0x00000] in <filename unknown>:0
 at AllocsFixes.FileCache.MapTileCache.SaveTile (Int32 zoomlevel, System.Byte[] content) [0x00000] in <filename unknown>:0
2015-08-04T03:40:33 1033.632 INF RenderMap: 6192/32240 (19%)
Neto

 
Hello Alloc.
Just FYI, I'm getting sometimes this error, when I use rendermap command:

Code:
2015-08-04T03:40:33 1033.317 INF Error in MapTileCache.SaveTile: System.IO.IOException: Sharing violation on path D:\Games\7DTD\Random Gen\JITA\map\0\-3\-2.png
 at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
 at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) [0x00000] in <filename unknown>:0
 at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int)
 at System.IO.File.Create (System.String path, Int32 bufferSize) [0x00000] in <filename unknown>:0
 at System.IO.File.Create (System.String path) [0x00000] in <filename unknown>:0
 at System.IO.File.WriteAllBytes (System.String path, System.Byte[] bytes) [0x00000] in <filename unknown>:0
 at AllocsFixes.FileCache.MapTileCache.SaveTile (Int32 zoomlevel, System.Byte[] content) [0x00000] in <filename unknown>:0
2015-08-04T03:40:33 1033.632 INF RenderMap: 6192/32240 (19%)
Neto
Is anyone online when you run that, because they shouldn't be. Also, you should only run it if you had an existing map when you added the mods, or if you need to refresh it after removing a lot of region files.

 
So we run our server through GameServers, and I just updated to the latest Alloc's (which they provide on the site). Game still works fine, but now our IP:25004/static/index.html page is telling me that an error has occurred or I don't have the permission. I am listed as an admin on the server's serverconfig file, but not sure what else I may need to change. Any help?

 
Did you login through Steam, and are you listed in the admin file with permission level 0?
Yes to both, initially. I found some thread about Alloc's changes that said to change permissions to 1000 if you're logged in through steam, and so I tried that too, but no luck either way. No idea how to get it to work. I just keep getting:

error.jpg

And if you notice, down at the lower left, I'm already logged in with my SteamID.

 
What does the log contain? Also, if the panel is accessible on the internet and you don't mind me looking at it you can send me the ip/port and I'll have a look at the frontend part (just make sure to set at least the webapi.gamestats or web.map permission to >= 1000).

 
Back
Top