Jump to content

Improvements for the dedicated server


Alloc
 Share

Recommended Posts

Hi guys,

 

just wanted to keep you up to date on the latest bigger additions:

The mod now renders the map to tiles as players visit places (live). This allows to view a full map of everything that any player has ever seen by using e.g. Leaflet. I also added a command "rendermap" which does initial rendering if you don't want to start a new map ;)

PLEASE READ THE INFORMATION ON THE WIKI BEFORE USING THIS COMMAND!!!

 

I also added a first version of the web administration interface. For now it merely shows the map but it's also setting the foundation for adding further capabilities. If you want to enable it make sure ControlPanelEnabled is set to true and put the folder webserver/ in the root of your 7dtd server installation. The new web interface will listen on controlpanelport+2.

Note that for now there's no authorization (but you also can't do any harm other than viewing the server's map ;) ).

 

Example page

 

Regards,

Chris

Link to comment
Share on other sites

Hi guys,

 

just wanted to keep you up to date on the latest bigger additions:

The mod now renders the map to tiles as players visit places (live). This allows to view a full map of everything that any player has ever seen by using e.g. Leaflet. I also added a command "rendermap" which does initial rendering if you don't want to start a new map ;)

PLEASE READ THE INFORMATION ON THE WIKI BEFORE USING THIS COMMAND!!!

 

I also added a first version of the web administration interface. For now it merely shows the map but it's also setting the foundation for adding further capabilities. If you want to enable it make sure ControlPanelEnabled is set to true and put the folder webserver/ in the root of your 7dtd server installation. The new web interface will listen on controlpanelport+2.

Note that for now there's no authorization (but you also can't do any harm other than viewing the server's map ;) ).

 

Example page

 

Regards,

Chris

 

 

very interesting feature. Can I disable this integrated web server? OR change server port? IT is no safe to open a 80 port on public server.

Link to comment
Share on other sites

First i got to say this is an awesome update mate, both thumbs up for sure.

After reading everything and then following all the directions and copying your files and file structure i still cant get the webserver map to load.

when i go to my controlpanelport+2 i get a deep red page with nothing on it but the words coords: on the bottom in a small gray box, no map loads though i have rendered it with the new command and the image is in the file folder in my game save folder.

Link to comment
Share on other sites

very interesting feature. Can I disable this integrated web server? OR change server port? IT is no safe to open a 80 port on public server.

Disable: Just do not put the "webserver" folder in your 7dtd folder and it won't be started at all.

Port: It's always ControlPanelPort+2 so if you do not set ControlPanelPort to 78 it won't be 80 ;) (by default it would be 8082 as ControlPanelPort's default value is 8080)

 

After reading everything and then following all the directions and copying your files and file structure i still cant get the webserver map to load.

when i go to my controlpanelport+2 i get a deep red page with nothing on it but the words coords: on the bottom in a small gray box, no map loads though i have rendered it with the new command and the image is in the file folder in my game save folder.

Hm, that's weird ... looks like everything is working but the actual delivery of the map tiles. Anything in the log when you try to load the page? Do you have the webserver port public so that I might look at (if so send me the data in a PM)?

Link to comment
Share on other sites

very interesting feature. Can I disable this integrated web server? OR change server port? IT is no safe to open a 80 port on public server.

 

127.638 Error in RenderMap.Run: UnityEngine.UnityException: Failed to create texture because of invalid parameters. at (wrapper managed-to-native) UnityEngine.Texture2D:Internal_Create (UnityEngine.Texture2D,int,int,UnityEngine.TextureFormat,bool,bool,intptr) at UnityEngine.Texture2D..ctor (Int32 width, Int32 height) [0x00000] in :0 at AllocsFixes.MapRendering.MapRendering.RenderFullMap () [0x00000] in :0 at AllocsFixes.CustomCommands.RenderMap.Run (System.String[] _params) [0x00000] in :0 

Link to comment
Share on other sites

Hi guys,

 

just wanted to keep you up to date on the latest bigger additions:

The mod now renders the map to tiles as players visit places (live). This allows to view a full map of everything that any player has ever seen by using e.g. Leaflet. I also added a command "rendermap" which does initial rendering if you don't want to start a new map ;)

PLEASE READ THE INFORMATION ON THE WIKI BEFORE USING THIS COMMAND!!!

 

I also added a first version of the web administration interface. For now it merely shows the map but it's also setting the foundation for adding further capabilities. If you want to enable it make sure ControlPanelEnabled is set to true and put the folder webserver/ in the root of your 7dtd server installation. The new web interface will listen on controlpanelport+2.

Note that for now there's no authorization (but you also can't do any harm other than viewing the server's map ;) ).

 

Example page

 

Regards,

Chris

 

I cant get it to work. The render from the world works fine. But i cant open the map on ip:cp-port +2. this also wont work on my root with localhost. the cp works fine and i can open it on server and on my pc. i dont use the standard-ports from the game.

 

Any solution for me Alloc? :D

Link to comment
Share on other sites

I am thinking my issue is do to my game folder being in my SSD D:/ and my saved games are in the C:/??????

Not 100% on this but could it be the issue? and if so how to I moved current saved games to the D:/ and still get it too connect correctly? Already tried using the config file and changing the save file path but that will not allow the server to load.

Link to comment
Share on other sites

I cant get it to work. The render from the world works fine. But i cant open the map on ip:cp-port +2. this also wont work on my root with localhost. the cp works fine and i can open it on server and on my pc. i dont use the standard-ports from the game.

Did you check if the port is listening? Did you check the output_log.txt if it says "Started Webserver on XXXX"?

Also, as a first guess, did you add the webserver-folder from SVN to your engine folder?

 

 

I am thinking my issue is do to my game folder being in my SSD D:/ and my saved games are in the C:/??????

Not 100% on this but could it be the issue? and if so how to I moved current saved games to the D:/ and still get it too connect correctly? Already tried using the config file and changing the save file path but that will not allow the server to load.

Hm, never thought about this ... will check if that's the problem :)

Link to comment
Share on other sites

Did you check if the port is listening? Did you check the output_log.txt if it says "Started Webserver on XXXX"?

Also, as a first guess, did you add the webserver-folder from SVN to your engine folder?

 

 

 

Hm, never thought about this ... will check if that's the problem :)

 

Just let me know so I can get it working.

Link to comment
Share on other sites

@Lordicon: Different partitions for engine vs save folder work fine for me. Think the error must be deeper inside ;)

Could you get the newly uploaded DLL and try running RM again? It will print a line in the log starting with "RenderMap: " and a lot of numbers after that. Please paste that line here.

Link to comment
Share on other sites

14.993 Telnet executed "rm" from: 127.0.0.1:52017

(Filename: C:/BuildAgent/work/aeedb04a1292f85a/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

15.307 RenderMap: min: -717, -647, max: 6257, 6260, minPos: -11472, -10352, maxPos: 100112, 100160, w/h: 6975/6908, wP/hP: 111600/110528

(Filename: C:/BuildAgent/work/aeedb04a1292f85a/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Texture has out of range width / height

(Filename:  Line: 461)

15.315 Error in RenderMap.Run: UnityEngine.UnityException: Failed to create texture because of invalid parameters.

 at (wrapper managed-to-native) UnityEngine.Texture2D:Internal_Create (UnityEngine.Texture2D,int,int,UnityEngine.TextureFormat,bool,bool,intptr)

 at UnityEngine.Texture2D..ctor (Int32 width, Int32 height) [0x00000] in <filename unknown>:0 

 at AllocsFixes.MapRendering.MapRendering.RenderFullMap () [0x00000] in <filename unknown>:0 

 at AllocsFixes.CustomCommands.RenderMap.Run (System.String[] _params) [0x00000] in <filename unknown>:0 

(Filename: C:/BuildAgent/work/aeedb04a1292f85a/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Edited by Lordicon (see edit history)
Link to comment
Share on other sites

mmm I think I see whats up.

You have it set as RenderMap: min: -717, -647, max: 6257, 6260 to generate, and while testing how far the map went in dev mode I telported so far to see if the map would go and it generated a new map from a distance really far away.

 

Or am I wrong and you don't have a limit on the RenderMap?

Link to comment
Share on other sites

Hey Alloc, new patch wants me to login to the webserver page...

Uh, yeah .. forgot to mention that :D

Implementing a basic authorization right now. Username is "admin", password is the same as for control panel.

 

mmm I think I see whats up.

You have it set as RenderMap: min: -717, -647, max: 6257, 6260 to generate, and while testing how far the map went in dev mode I telported so far to see if the map would go and it generated a new map from a distance really far away.

Ooookay, was just going to ask how the heck you got a map that big ;)

Actually the coordinates in in game dimensions are minPos and maxPos, so it's -11472/-10352 to 100112/100160 ^^

 

Hadn't thought about that possibility. Just uploaded a new version that disables rendering of an overview image file if the map is larger than 10k*10k. That should allow you to use "rendermap".

Link to comment
Share on other sites

Seems to be working now but will take hours, Is there a way I could get rid of the rendered map in my save files where I teleported too without killing the save files? maybe just make my own render blank again?

 

Also the CM command if enabled with cm 1 will players have access or only Admin?

Link to comment
Share on other sites

Seems to be working now but will take hours, Is there a way I could get rid of the rendered map in my save files where I teleported too without killing the save files? maybe just make my own render blank again?

You would have to delete the proper region files. It shouldn't help much though as you probably only viewed little parts of the map. It won't take longer just for having a wide map, it only takes time for the chunks that were actually visited. So the real question is how much was visited at all ;)

The status indication won't give you any time estimation as it can have some x-coords done rather quickly while for others it may take a while, depending on how many chunks in Z direction were visited for the current X coord.

 

Also the CM command if enabled with cm 1 will players have access or only Admin?

Everyone, can't be changed atm ... tried to get it to work but that would require bigger rewrites of some stuff :(

Link to comment
Share on other sites

Kind of sucks about the CM command but that's o.k.

 

640.515 RenderMap: 6944/111600 (6%)
642.443 RenderMap: 6960/111600 (6%)

 

^Started this right before my last post only at 6% yea will take hours lol 6960/111600 ROFL

Kinda hoping it don't take hours for the web page to load showing the map.

Link to comment
Share on other sites

Kind of sucks about the CM command but that's o.k.

Yeah, when I started on that one I thought it would be possible to trigger for one client only ... Didn't turn out to work :(

But at least that way one can only enable it for a short time when it's needed so most people won't even notice it ;)

 

640.515 RenderMap: 6944/111600 (6%)
642.443 RenderMap: 6960/111600 (6%)

 

^Started this right before my last post only at 6% yea will take hours lol 6960/111600 ROFL

Kinda hoping it don't take hours for the web page to load showing the map.

Won't take that long for most of it ... I would assume that at least the last 90k will be done within seconds so it would be at ~7/20 =~ 35% ;)

Link to comment
Share on other sites

ok deleted everything and started fresh from frustration thinking i might of made a stupid mistake and giving a fresh take on it would help, ive done it so much lately that its getting pretty easy to do lately...

any way im still having the same problem, plus my fixed prefab not being fixed anymore lol, but im getting this

 

43.802 Web:Static:FileNotFound: /static/js/index.js

43.803 Web:Static:FileNotFound: /static/leaflet/leaflet.js

43.872 Web:Static:FileNotFound: /static/js/index.js

 

does this mean i dont have the file structure right because ive went over it several times and its just like you have it on your site, folders and files.... lol should have a zip file on there so people can just unzip a webserver folder right into their base dedicated directory. Anyway not sure if thats where i went wrong or not but i still have the red page with the coords box when i open it up

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...