Please login or register.

Login with username, password and session length
Advanced search  

News:

Planet Explorers Released!

Pages: [1] 2

Author Topic: Planet Explorers Dedicated Server Tutorial - a0.83[marked]  (Read 23116 times)

bluefangservers

  • Enlistee
  • *
  • Karma: 6
  • Posts: 28
  • Game Server Hosting
    • View Profile
    • Blue Fang Solutions
Planet Explorers Dedicated Server Tutorial - a0.83[marked]
« on: July 26, 2014, 10:58:41 AM »

Hello Fellow Planet Explorers,

We at BlueFangSolutions.com are very excited about Planet Explorers and have compiled some notes for people that want to host their own server via the command line or another process monitor.  The new update spurred us to write this quick post as we could not find the information readily available and felt it could possibly save others some time.  We wanted to make this short and sweet, we won't be going into how to configure a firewall or how to forward the ports to your computer.

Disclaimer: This short tutorial assumes you have basic knowledge of how to use a computer and networking concepts.  The purpose of this tutorial is to fill in some of the gaps in information readily available.

Step 1:  Installing Planet Explorers for Dedicated Server Use

The simplest way that we have found to install an instance of Planet Explorers is to use the steamcmd utility.  I won't go into installing steamcmd here or how to use it.  That information is best reviewed here: https://developer.valvesoftware.com/wiki/SteamCMD  To install the game and server to the location of your choice run this command:

Command Line: steamcmd +login username password +force_install_dir C:\MyServers\PE +"app_update 237870" validate +quit
note: Please change the username and password to use a steam account that has purchased the game otherwise it will not install.  This will install the server to the MyServers\PE folder on your C drive, change it accordingly to your requirements.  This command can also be used for updates and to verify your files are not corrupted.

Step 2: Starting the Server

Once the files have been successfully installed the next step is to start the server via the command line.  You can adapt the command line code below for use in a batch file or with a process monitor of your choosing.  There are 20 parameter fields that seem to be needed to start a server process.  The parameters are all combined into a string where the delimiter is a # and spaces are converted to @++@ .

The Table below represents the values of the command line below for easier reference. As you can see below there are 5 fields that are unknown, I believe they have to do with the biome but I can not be sure because as I changed the values they did not change as I expected.  The command line below was generated by the in game Host option, an image of the screen where the options where set is below as well.  If one of the devs could chime in and update us I would be glad to update the table below.

IndexParameterValue(s)
1Max Players 32 | Integer 1-32
2PasswordMyPassword | String
3SteamID Steam00000000000000000 | String
4Creator User | String
5Server Name  My@++@Serve| String
6Map Name PatheaMap| String
7Game Mode 260 | Integer 260(adventure),261(build)
8Game Type 0 | Integer 0(co-op),1(vs),2(survival)
9Monsters True | Boolean
10Game Port 9900 | Integer
11Public True | Boolean
12Seed Planet@++@Maria | Sring
13Unknown(Major Biome/Climate??)  1 | Integer
14Unknown(Major Biome/Climate??)  1 | Integer
15Unknown(Major Biome/Climate??)  1 | Integer
16Unknown(Major Biome/Climate??)  1 | Integer
17Infinite Resources  True | Boolean
18Worldsize 2 | 2( 8*8 ), 1( 20*20 ), 0( 40*40 ) Integer
19River Density 1 | Integer
20River Width 1 | Integer


Delimeter: #
Space: @++@
Command Line: PE_Server.exe -batchmode 32#MyPassword#Steam00000000000000000#User#My@++@Server#PatheaMap#260#0#True#9900#True#Planet@++@Maria#1#1#1#1#True#2#1#1
note: Remeber when using the command line CD into the server folder to launch the server, if we use the example path above the folder that you have to be in would be C:\MyServers\PE\Server


I hope this helps and saves someone time :)  If you found any mistakes or inaccurate statements please let me know and I will update ASAP. 
« Last Edit: August 19, 2014, 06:17:12 AM by Dorist1 »
Logged

monkeydrone

  • Enlistee
  • *
  • Karma: 0
  • Posts: 21
    • View Profile
Re: Planet Explorers Dedicated Server Tutorial - a0.83
« Reply #1 on: July 26, 2014, 01:15:16 PM »

Maybe things are different for linux, but all the variables can be found in the file under /planetexplorer/Server/ConfigFiles/ServerConfig.config

To launch a server without any GUI (Dedicated Servers without GUIs) , you need to run the server with the '-nographics' variable
E.g. ./PE_Server.x86 -nographics

And you are good to go on linux.
Logged

bluefangservers

  • Enlistee
  • *
  • Karma: 6
  • Posts: 28
  • Game Server Hosting
    • View Profile
    • Blue Fang Solutions
Re: Planet Explorers Dedicated Server Tutorial - a0.83
« Reply #2 on: July 26, 2014, 01:30:38 PM »

Quote
Maybe things are different for linux, but all the variables can be found in the file under /planetexplorer/Server/ConfigFiles/ServerConfig.config

To launch a server without any GUI (Dedicated Servers without GUIs) , you need to run the server with the '-nographics' variable
E.g. ./PE_Server.x86 -nographics

And you are good to go on linux.
Hey thanks for the reply monkeydrone. I suspect since both are the exact same code and use mono they will behave similarly. You can start a server just with the -batchmode option as well on Windows but you will not be able to set certain variables.  I have yet to see where you can set the port for the game server, you also can not specify a config file so if running multiple servers from one directory will be difficult.

Please let me know if you can pass the values in linux, I am almost positive you can, or if the values can be added to the config.  Thanks again for your reply.
« Last Edit: July 26, 2014, 02:30:43 PM by bluefangservers »
Logged

monkeydrone

  • Enlistee
  • *
  • Karma: 0
  • Posts: 21
    • View Profile
Re: Planet Explorers Dedicated Server Tutorial - a0.83
« Reply #3 on: July 26, 2014, 08:47:34 PM »

Quote
Maybe things are different for linux, but all the variables can be found in the file under /planetexplorer/Server/ConfigFiles/ServerConfig.config

To launch a server without any GUI (Dedicated Servers without GUIs) , you need to run the server with the '-nographics' variable
E.g. ./PE_Server.x86 -nographics

And you are good to go on linux.
Hey thanks for the reply monkeydrone. I suspect since both are the exact same code and use mono they will behave similarly. You can start a server just with the -batchmode option as well on Windows but you will not be able to set certain variables.  I have yet to see where you can set the port for the game server, you also can not specify a config file so if running multiple servers from one directory will be difficult.

Please let me know if you can pass the values in linux, I am almost positive you can, or if the values can be added to the config.  Thanks again for your reply.


{"Framerate":60,"LobbyIP":"74.81.173.196","LobbyPort":12534,"TeamNum":1,"NumPerTeam":32,"GameMode":260,"GameType":0,"MonsterYes":true,"ServerName":"XYZ","MapSeed":"patheamaria","TerrainType":1,"ClimateType":1,"VegetationType":1,"MasterRoleName":"Unknown","Password":"","PublicServer":true,"DropDeadPercent":10,"UnlimitedRes":true,"MapSize":0,"RiverDensity":1,"RiverWidth":1}

These are the variables that exist in the server config file. I do not know how to assign the port for the game,  the LobbyPort is for the game to connect to the Master Server. I'll test out passing the values through the command line and remove the cfg file to see how it affects the server and if the server keeps running. Will update when I get to it.
If you know how to assign ports through the commandline, would love to see how its done.

Logged

bluefangservers

  • Enlistee
  • *
  • Karma: 6
  • Posts: 28
  • Game Server Hosting
    • View Profile
    • Blue Fang Solutions
Re: Planet Explorers Dedicated Server Tutorial - a0.83
« Reply #4 on: July 26, 2014, 09:27:27 PM »

Hi Monkeydrone,

Thanks for posting the info for ServerConfig.config.  Let us know when you have had a chance to test the command line above on Linux.  If the cli works then I think it supersedes it for a dedicated hosting environment as you can specify ports and other settings.  Let us know what you find out.

monkeydrone

  • Enlistee
  • *
  • Karma: 0
  • Posts: 21
    • View Profile
Re: Planet Explorers Dedicated Server Tutorial - a0.83
« Reply #5 on: July 28, 2014, 03:49:08 AM »

Hi Monkeydrone,

Thanks for posting the info for ServerConfig.config.  Let us know when you have had a chance to test the command line above on Linux.  If the cli works then I think it supersedes it for a dedicated hosting environment as you can specify ports and other settings.  Let us know what you find out.

Heya, I've tested the command line on the linux system, from one folder I was able to launch multiple servers using the extra commands in the terminal itself. Slight change though
./PE_Server.x86 -nographics 32#abc#Steam00000000000000000#User#My@++@TestServer#PatheaMap#260#0#True#9900#True#Planet@++@Maria#1#1#1#1#True#2#1#1

I had to remove the -batchmode and add -nographics since i'm on a command-line server. I can definitely launch multiple servers through one installation. I did not need to specify any ports as it just popped up in the server browser. I noticed your providing game servers for it. I wish you good luck in that venture.
You probably will need to look into assigning ports to server as you might have to enable them through a firewall.

Currently i'm trying to get a server running on Wine1.7 on my server with a fake Xserver ( no success so far ).  But I'll keep everyone posted how my progress.
I got windows version of the server running on linux through Wine1.7.

First install a fake xserver with the following command.
sudo apt-get install xvfb
and then did the following 2 commands to export the generated windows to the fake xserver.
Xvfb :1&
export DISPLAY=:1

and then wine ./PE_Server.exe -batchmode.

running the windows server in WINE and CPU usage is at 5%....compared to the linux 100%......
« Last Edit: July 28, 2014, 04:55:37 AM by monkeydrone »
Logged

bluefangservers

  • Enlistee
  • *
  • Karma: 6
  • Posts: 28
  • Game Server Hosting
    • View Profile
    • Blue Fang Solutions
Re: Planet Explorers Dedicated Server Tutorial - a0.83
« Reply #6 on: July 28, 2014, 09:31:36 PM »

Hi Monkeydrone,

Thanks for posting the info for ServerConfig.config.  Let us know when you have had a chance to test the command line above on Linux.  If the cli works then I think it supersedes it for a dedicated hosting environment as you can specify ports and other settings.  Let us know what you find out.

Heya, I've tested the command line on the linux system, from one folder I was able to launch multiple servers using the extra commands in the terminal itself. Slight change though
./PE_Server.x86 -nographics 32#abc#Steam00000000000000000#User#My@++@TestServer#PatheaMap#260#0#True#9900#True#Planet@++@Maria#1#1#1#1#True#2#1#1

I had to remove the -batchmode and add -nographics since i'm on a command-line server. I can definitely launch multiple servers through one installation. I did not need to specify any ports as it just popped up in the server browser. I noticed your providing game servers for it. I wish you good luck in that venture.
You probably will need to look into assigning ports to server as you might have to enable them through a firewall.

Currently i'm trying to get a server running on Wine1.7 on my server with a fake Xserver ( no success so far ).  But I'll keep everyone posted how my progress.
I got windows version of the server running on linux through Wine1.7.

First install a fake xserver with the following command.
sudo apt-get install xvfb
and then did the following 2 commands to export the generated windows to the fake xserver.
Xvfb :1&
export DISPLAY=:1

and then wine ./PE_Server.exe -batchmode.

running the windows server in WINE and CPU usage is at 5%....compared to the linux 100%......

Awesome news, it looks like the CLI method should be the preferred method at the moment.  I have also confirmed your findings, on Debian Wheezy.  Thank you for doing the testing on Linux.

If any of the moderators or devs can chime in on the unknown values in my table I would very much appreciate it.  Thank you again guys!

obitokun

  • Enlistee
  • *
  • Karma: 0
  • Posts: 2
    • View Profile
Re: Planet Explorers Dedicated Server Tutorial - a0.83
« Reply #7 on: July 29, 2014, 07:00:53 PM »

I'm trying here but nothing, windows or linux, i got one "error log" with this:

77/29/2014 21:47:38, ConnectionTimeout
07/29/2014 21:47:53, ConnectionTimeout
07/29/2014 21:48:08, ConnectionTimeout
07/29/2014 21:48:23, ConnectionTimeout
07/29/2014 21:48:38, ConnectionTimeout
07/29/2014 21:48:53, ConnectionTimeout
07/29/2014 21:49:08, ConnectionTimeout
07/29/2014 21:49:23, ConnectionTimeout

somebody know why ?
Logged

SoullessDreamer

  • Enlistee
  • *
  • Karma: 1
  • Posts: 7
    • View Profile
Re: Planet Explorers Dedicated Server Tutorial - a0.83
« Reply #8 on: July 30, 2014, 04:56:07 AM »

Thank you for the info, this walkthrough was needed. There is one problem, we are having an issue with infinite ore. I have it on False but it still doesn't take our ore when we craft things.
Logged

bluefangservers

  • Enlistee
  • *
  • Karma: 6
  • Posts: 28
  • Game Server Hosting
    • View Profile
    • Blue Fang Solutions
Re: Planet Explorers Dedicated Server Tutorial - a0.83
« Reply #9 on: July 30, 2014, 07:08:12 AM »

I'm trying here but nothing, windows or linux, i got one "error log" with this:

77/29/2014 21:47:38, ConnectionTimeout
07/29/2014 21:47:53, ConnectionTimeout
07/29/2014 21:48:08, ConnectionTimeout
07/29/2014 21:48:23, ConnectionTimeout
07/29/2014 21:48:38, ConnectionTimeout
07/29/2014 21:48:53, ConnectionTimeout
07/29/2014 21:49:08, ConnectionTimeout
07/29/2014 21:49:23, ConnectionTimeout

somebody know why ?

Hi obitokun,
Are your ports open?  It seems like something is trying to connect but failing.

Thank you for the info, this walkthrough was needed. There is one problem, we are having an issue with infinite ore. I have it on False but it still doesn't take our ore when we craft things.

Hi SoullessDreamer,

Did you reset your world?  I notice that most of the time that you make a change to the command line the world needs to be reset.  Let me know if this helps.

bluefangservers

  • Enlistee
  • *
  • Karma: 6
  • Posts: 28
  • Game Server Hosting
    • View Profile
    • Blue Fang Solutions
Re: Planet Explorers Dedicated Server Tutorial - a0.83
« Reply #10 on: July 30, 2014, 05:02:49 PM »

*Update

Index 18 is world size

18   Worldsize   2 | 2( 8*8 ), 1( 20*20 ), 0( 40*40 ) Integer
« Last Edit: July 30, 2014, 05:40:45 PM by bluefangservers »
Logged

SoullessDreamer

  • Enlistee
  • *
  • Karma: 1
  • Posts: 7
    • View Profile
Re: Planet Explorers Dedicated Server Tutorial - a0.83
« Reply #11 on: July 31, 2014, 12:51:54 AM »

That fixed it, thank you. Odd you can't change the setting for infinite ore without a LOT going wrong.
Logged

bluefangservers

  • Enlistee
  • *
  • Karma: 6
  • Posts: 28
  • Game Server Hosting
    • View Profile
    • Blue Fang Solutions
Re: Planet Explorers Dedicated Server Tutorial - a0.83
« Reply #12 on: August 01, 2014, 11:20:17 AM »

That fixed it, thank you. Odd you can't change the setting for infinite ore without a LOT going wrong.

I am glad we could be of help and hopefully others will be helped by it.  Thanks for posting the follow up!

SoullessDreamer

  • Enlistee
  • *
  • Karma: 1
  • Posts: 7
    • View Profile
Re: Planet Explorers Dedicated Server Tutorial - a0.83
« Reply #13 on: August 01, 2014, 09:29:28 PM »

Just as an FYI, when you start a world. Then you  change the settings for it after you have already started it once. Then try playing on the same world everything goes wrong. Buildings/terrain/NPC villages/ore all glitch to the point where things like fast traveling into the ground happens, or even worse:
http://steamcommunity.com/id/SoullessDreamer/screenshot/67870869467974511
http://steamcommunity.com/id/SoullessDreamer/screenshot/67870869467973039

Odd this happens
Logged

bluefangservers

  • Enlistee
  • *
  • Karma: 6
  • Posts: 28
  • Game Server Hosting
    • View Profile
    • Blue Fang Solutions
Re: Planet Explorers Dedicated Server Tutorial - a0.83
« Reply #14 on: August 02, 2014, 10:01:46 AM »

Just as an FYI, when you start a world. Then you  change the settings for it after you have already started it once. Then try playing on the same world everything goes wrong. Buildings/terrain/NPC villages/ore all glitch to the point where things like fast traveling into the ground happens, or even worse:
http://steamcommunity.com/id/SoullessDreamer/screenshot/67870869467974511
http://steamcommunity.com/id/SoullessDreamer/screenshot/67870869467973039

Odd this happens

We have had similar experiences and can tell you that we recommend a new world anytime that you change a parameter that might affect the world.  In all cases its best to backup before making changes and test them after that. 

Pages: [1] 2