Pathea Official Board

Planet Explorers => Planet Explorers Multiplayer => Topic started by: Dorist1 on February 27, 2015, 06:56:31 AM

Title: Tutorial on new server configuration
Post by: Dorist1 on February 27, 2015, 06:56:31 AM
Hi, everybody. After several updates, we now have a new server building instruction here.

As to the tests till now, servers that can run Planet Explorers include: Ubuntu Desktop, MAC OS and Win. Others might also run the game, but it needs a try.

We offer 3 ways to open a server at present:
1)Open through UI. In this way, the server is bound with your steam account, so you can open/close/delete the server whenever you log in with the identical steam account.
2)Run command line:(Root Directory)\Server>PE_Server.exe -batchmode (for server without interface)
3)Run command line:(Root Directory)\Server>PE_Server.exe (for server with interface)
 
Different executive files under different system:
Windows:
(Client Root Directory)/Server/PE_Server.exe

Linux:
(Client Root Directory)/Server/PE_Server.x86

Mac:
(Client Root Directory)/Server/PE_Server

Config File Path:
(Client Root Directory)/Server/ConfigFiles/ServerConfig.config
Note that the server will automatically make this file after the first launch. All you need to do is to change the configuration of it.

//Config starts
{"LobbyIP" : "192.168.1.126", //do not change
"LobbyPort" : 12534,
"ProxyIP"   : "192.168.1.126", //do not change
"ProxyPort" : 12535, //do not change
"TeamNum"   : 1, //1-4 [How many teams you would allow in your server]
"NumPerTeam" : 16, //1-32 (TeamNum * NumPerTeam <= 32)
"GameMode"   : 1, //0-story[Play through tasks with your friends];
                                1-adventure[Exploring the dangerous planet in your way];
                                2-build[Resources are prepared in this mode. You can enjoy building and test your creation here];
                                3-custom[Play with custom map from the World Editor]
"GameType"   : 0, //0-coop[Only one colony is allowed and all the players are supposed to finish the tasks together];
                               1-VS[Two teams build their own colonies and can fight against each other]; 
                               2-survival[Everyone are on their own and could have their own colony].
"MonsterYes" : true, //true{Monsters will spawn in the server];
                                    false[No monsters in the server]
"ServerName" : "yktest", //[This name can't be changed once the server is up, and please avoid using an identical server name with an existent one for a new server, because it would cause rewriting of the old one's parameters, and cause unpredictable damage to the old server.]
"MapName"    : "Story Demo", //[If you're loading a custom map, here you put the name of it.]
"MapSeed"    : "patheamaria", //[ If you change this one, you'd change the map's parameters in  adventure or build mode.]
"TerrainType" : 1, //1-grassland, 2-forest, 3-desert, 4-red stone, 5-rainforest, 6-mountain, 7-swamp, 8-crater
"ClimateType" : 1, //0-dry, 1-temperate, 2-water, 3-random
"VegetationType" : 1, //1-grassland, 2-forest, 3-desert, 4-redstone, 5-rainforest, 6-mountain, 7-swamp, 8-crater (this one should be the same as TerrianType)
"MasterRoleName" : "Unknown", //host name
"Password"       : "",
"PublicServer"   : false, //true [Your server is displayed in the "Internet" tab in the lobby, and can be accessed by someone from the internet.]
                                        false [You server is displayed in the "LAN" tab in the lobby, and only LAN players can access it.]
"Proxy"          : false, //(true or false)
"UseSkillTree"   : false, //(true or false)
"DropDeadPercent" : 10, //(0-100) [Drop rate when you die in game]
"UnlimitedRes"    : false, //(true or false) [Limited resources or unlimited resources in server]
"TerrainHeight"   : 512, //128m, 256m, 512m(this is the height of the whole map including sky)
"MapSize"         : 0, //4-[2km*2km], 3-[4km*4km], 2-[8km*8km], 1-[20km*20km], 0-[40km*40km]
"RiverDensity"    : 10, //1-100
"RiverWidth"      : 10, //1-100
"PlainHeight"      : 20, //1-100(this is the height of land)
"Flatness"      : 25, //1-100[The bigger this figure is, the flatter the land will be]
"BridgeMaxHeight"      : 30 //0-100
"AICount"         : 3//3-7[ the total amount of AI types in game]
}


//Config ends

Some notes:

1. The server program takes up UDP ports 9900-9915. So you can launch up to 16 server instances on one computer simultaneously.

2. If you plan on making your server public on the internet, please make sure all port-forwarding are done properly, or make it a DMZ server.As per how to make a port forwarding, please refer to: http://board.pathea.net/index.php?topic=2264.0

3. If you want to open more than one server through command line, just change the “ServerName” in “ServerConfig.conf”. (Note: do not use an identical server name with different configurations, for this may cause damage to the old server)
 
Hope this helps.
Title: Re: Tutorial on new server configuration
Post by: Waltsu on February 28, 2015, 10:46:44 AM
What about editing the command line to pass variables?
Source: http://board.pathea.net/index.php?topic=6639.15

./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 run something like this, but it doesn't affect anything. How do the command line parametres work?
Title: Re: Tutorial on new server configuration
Post by: Dorist1 on March 02, 2015, 01:37:49 AM
Using command line to set the configuration is not work at present.  :D
Title: Re: Tutorial on new server configuration
Post by: Merlin on March 02, 2015, 05:44:37 PM
I have the game on my server at home, downloaded via steam. I was able to get the server up and running and it shows up on the Internet tab in the server list  ("PublicServer"   : true).

I have forwarded port 9900 and 8800 UDP/TCP on my router to the internal ip address of my server which is 10.1.10.25

When I go to connect, I enter the password but I get connection time out and cannot connect.

Dorist, or anyone have any thoughts on what I may be missing?
Title: Re: Tutorial on new server configuration
Post by: Dorist1 on March 03, 2015, 03:57:48 AM
It might caused by port forwarding failure. Try to set "useproxy=true".
Title: Re: Tutorial on new server configuration
Post by: Merlin on March 03, 2015, 04:01:26 PM
It might caused by port forwarding failure. Try to set "useproxy=true".

Dorist, thank you so much. That worked!

For other readers, here is my final working ServerConf.conf file. In the Internet tab in game, my server now shows up as [Proxy]PeanutExp under the RoomName column. I can now join the server.

{
  "LobbyIP" : "74.81.173.196",
  "LobbyPort" : 12534,
  "ProxyIP"   : "119.28.5.150",
  "ProxyPort" : 12535,
  "TeamNum"   : 2,
  "NumPerTeam" : 16,
  "GameMode"   : 260,
  "GameType"   : 0,
  "MonsterYes" : true,
  "ServerName" : "PeanutExplorers",
  "MapSeed"    : "patheamaria",
  "TerrainType" : 2,
  "ClimateType" : 3,
  "VegetationType" : 2,
  "MasterRoleName" : "Peanut",
  "Password"       : "I wont tell you",
  "PublicServer"   : true,
  "Proxy"          : true,
  "DropDeadPercent" : 0,
  "UnlimitedRes"    : false,
  "MapSize"         : 0,
  "TerrainHeight"   : 128,
  "RiverDensity"    : 1,
  "RiverWidth"      : 1
}
Title: Re: Tutorial on new server configuration
Post by: YuYuYu5 on March 03, 2015, 06:44:14 PM
We've got the same problem, we're running the PE server.exe on a virtual machine, so far playing on the local network works fine, but our friends couldn't join us even though the portforwarding is active.
We tried changing the useproxy to true which solved the problem but now our firends have an 300 somewaht ping and are lagging all over the map...
Any idea how to solve this?
Thanks^^
Title: Re: Tutorial on new server configuration
Post by: Dorist1 on March 04, 2015, 03:25:20 AM
Poxy is the main cause of the delay, for the data need to transfer like 'server - proxy - client' rather than 'server - client'. But this is the only way to avoid port-forwarding failure we offered at present.
Title: Re: Tutorial on new server configuration
Post by: freelikegnu2 on March 06, 2015, 03:29:38 AM
Is there a string in the ServerConf.conf that will allow some descriptive text in the "Info:" box when in the server joining window?
Title: Re: Tutorial on new server configuration
Post by: Dorist1 on March 09, 2015, 02:35:55 AM
Is there a string in the ServerConf.conf that will allow some descriptive text in the "Info:" box when in the server joining window?

Thanks for your suggestion. We'll consider it in later development.
Title: Re: Tutorial on new server configuration
Post by: Bandus on March 24, 2015, 06:12:03 PM
I recently setup a server. It appears to be running, I can see it in the browser in game, however, I cannot join it. I have ensured that all of the ports (9900-9915, 12534, and 8888-8903) are properly forwarded.

When attempting to join it indicates "Wait for Connection" and eventually it indicates "Connection Failed."

Also, this is my config file:


{
  "LobbyIP" : "74.81.173.196",
  "LobbyPort" : 12534,
  "ProxyIP"   : "119.28.5.150",
  "ProxyPort" : 12535,
  "TeamNum"   : 2,
  "NumPerTeam" : 16,
  "GameMode"   : 260,
  "GameType"   : 2,
  "MonsterYes" : true,
  "ServerName" : "MAGDY Adventures",
  "MapSeed"    : "Magnetar",
  "TerrainType" : 2,
  "ClimateType" : 1,
  "VegetationType" : 2,
  "MasterRoleName" : "Bandus",
  "Password"       : "secret",
  "PublicServer"   : true,
  "Proxy"          : false,
  "DropDeadPercent" : 10,
  "UnlimitedRes"    : false,
  "MapSize"         : 0,
  "TerrainHeight"   : 128,
  "RiverDensity"    : 5,
  "RiverWidth"      : 10
}

This seems to be the exact issue that Merlin mentioned earlier. I am quite confident at this point I have forwarded the ports properly (I even tried to put the server in the DMZ on the router) with no effect.

I would appreciate any suggestions or solutions as even if setting "Proxy" to true worked, it still spikes the ping to the server around 300 ms which is unplayable. Thank you!
Title: Re: Tutorial on new server configuration
Post by: Dorist1 on March 27, 2015, 01:59:17 AM
Using proxy is the only method we adopted to avoid data losing at present. It'll lower the data transaction speed to some extend. We'll offer other ways if possible in later satge. :D
Title: Re: Tutorial on new server configuration
Post by: PrometheusVI on March 27, 2015, 02:05:48 PM
It seems like UPNP has no effect when i try to host and ports must be forwarded manually, is that correct?
Title: Re: Tutorial on new server configuration
Post by: Dorist1 on March 30, 2015, 02:19:33 AM
PrometheusVI, you're right. UPNP is not work at present.
Title: Re: Tutorial on new server configuration
Post by: PlanB on April 19, 2015, 05:36:17 PM
Is there more information about admin.conf?
Title: Re: Tutorial on new server configuration
Post by: Dorist1 on April 21, 2015, 07:00:49 AM
admin.conf encodes the authority of the server holder.  :D
Title: Re: Tutorial on new server configuration
Post by: Woolridge on October 22, 2015, 10:27:41 AM
just wanted to ask if there is any progress in the entire server-hosting mess?
sorry to call it a mess, but when i host a server with DMZ-settings and no firewall at all on it,
configured it to be public and nobody's able to even see the server in the server-list i can't call it otherwhise...
the only one who is able to play on it is myself when playing on the same machine that is hosting it and even then ISO-exporting doesn't work...

would be nice if you could tell me when you expect the server-software you provide is going to work as intended...
i already waited over 2 years for this work and still the same, and because of that fact i begin to wonder if my purchase was just a waste of money...
Title: Re: Tutorial on new server configuration
Post by: Dorist1 on October 23, 2015, 05:34:33 AM
Check if your network server offers DMZ function. Connect to the internet through VPN also can cause such poblems.
Title: Re: Tutorial on new server configuration
Post by: Woolridge on October 23, 2015, 09:44:03 AM
like i said, i run the server as dmz server, don't use any firewalls at all on it and i don't use vpn or anything like that aswell...
i can't open the doors to the server any wider but still there seems to be no way to get it working as intended (letting others join my server and exporting ISO's)

on the other hand it seems kinda funny that when i try to host a server while i'm ingame instead of the pe_server.exe directly others are at least able to join the game, but ISO exporting still doesn't work...

edit:

oh and i already tested it with proxy on and off aswell as privat server on and off in both versions (the new 0.888 and the latest stable),
players are able to connect by now, but iso exporting is still impossible, always giving me the error "creation uploading failed"
Title: Re: Tutorial on new server configuration
Post by: Dorist1 on October 26, 2015, 09:58:15 AM
You meant iso uploading failed or exporting failed? We can upload isos to steam's workshop. Try to log out steam and relogin again. It might becasue you were pushed offline by steam.
Title: Re: Tutorial on new server configuration
Post by: Woolridge on October 26, 2015, 12:48:36 PM
like i said, it always tell me that "creation uploading failed" whenever i try to export an iso into the game,
and i always made sure that i own the neccessary resorces in my inventory
Title: Re: Tutorial on new server configuration
Post by: Dorist1 on October 28, 2015, 07:34:55 AM
Could you send the server name and password to admin@pathea.net so that we can have a test.
Title: Re: Tutorial on new server configuration
Post by: Woolridge on October 28, 2015, 12:03:31 PM
well, i only start it when i'm going to play with a mate and because iso uploading isn't working there is no reason to start it.
i can't afford to have the server running 24/7 and because of the timezone difference that would be the only way for you to test the server and because of that i'm sorry, but that's not possible =(
Title: Re: Tutorial on new server configuration
Post by: LanToaster on March 01, 2016, 09:54:22 PM
  "GameMode"   : 260,         -----(Story:0, Adventure:1, Build:2)

Is that either 260,261 or 262, or just 0, 1 and 2 like in the Brackets?

Also, I found a flag for Skill Trees:
  "UseSkillTree" : true
Is that valid?

Title: Re: Tutorial on new server configuration
Post by: Dorist1 on March 02, 2016, 02:50:33 AM
It's 0,1 and 2.

You're right! "UseSkillTree" is for skill tree.
Title: Re: Tutorial on new server configuration
Post by: LanToaster on March 02, 2016, 11:06:37 AM
Thanks a Lot :)
Title: Re: Tutorial on new server configuration
Post by: Janoris on May 21, 2016, 01:19:30 AM
Hello all, I recently setup a server via Blue Fang and I am encountering something odd; When I fire up the server with the following settings:

{
        "LobbyIP" : "************",
        "LobbyPort" : ******,
        "ProxyIP"   : "******",
        "ProxyPort" : ******,
        "TeamNum"   : 1,
        "NumPerTeam" : 8,
        "GameMode"   : 1,
        "GameType"   : 0,

        "MonsterYes" : true,
        "ServerName" : "*******",
        "MapSeed"    : "*******",
        "TerrainType" : 2,
        "ClimateType" : 2,
        "VegetationType" : 2,
        "MasterRoleName" : "Unknown",
        "Password"       : "*********",
        "PublicServer"   : true,
        "Proxy"          : false,
   "UseSkillTree"   : false,
        "DropDeadPercent" : 0,
        "UnlimitedRes"    : false,
        "TerrainHeight"   : 128,
        "MapSize"         : 0,
        "RiverDensity"    : 1,
        "RiverWidth"      : 1
}

I am trying to run a Coop Adventure server and no matter what, I cannot get it to run that way.  Unless my search skills are greatly lacking, I cannot find anything to help with this.  Am I doing something wrong?

I should also add, I can get other changes to work (password change, number of teams, players, etc.) but never can get the Adventure Co-op to take.  And everytime I make a change, I do wipe and restart the server to try and get it to take.

Thanks!
Title: Re: Tutorial on new server configuration
Post by: Dorist1 on May 23, 2016, 03:44:51 AM
This game need a desktop server at present.
Title: Re: Tutorial on new server configuration
Post by: Janoris on May 24, 2016, 11:10:36 PM
This game need a desktop server at present.

Ahh, so I cannot run it on mine, gotcha!  Thanks for the reply then  :)

Hopefully they can get that fixed one day soon for dedicated servers as well...
Title: Re: Tutorial on new server configuration
Post by: Welshy on August 10, 2016, 02:30:43 AM

Wait.. so this means the server I rented form pingperfect i can't play on because it cannot work??  if this is the case why are hosting services selling these servers?  or am I misunderstanding things??  (although I still haven't gotten the damn server to show up)
Title: Re: Tutorial on new server configuration
Post by: brokenlogin on November 03, 2016, 05:44:19 PM
I'm really happy that headless is working again in linux (tested with ubuntu 16.04 on a headless VPS).  It seems to have much improved performance as well.  I have two questions though.

Running more than one server does not seem to work even when I change the ServerName parameter in the config file after starting the first server.  What else do I need to do? 
What does the new AICount parameter do? 
Title: Re: Tutorial on new server configuration
Post by: Dorist1 on November 04, 2016, 06:40:31 AM
Added  "AICount" in, try it out.
Title: Re: Tutorial on new server configuration
Post by: brokenlogin on November 07, 2016, 06:56:33 PM
Added  "AICount" in, try it out.
AICount is the number of factions in a multiplayer map from 3 to 7.  These factions seem to randomly be any combination of human/puja/paja races. 
Title: Re: Tutorial on new server configuration
Post by: brokenlogin on November 07, 2016, 07:11:50 PM
Here is some additional explanation of the ServerConfig.conf
 
//Config starts
{"LobbyIP" : "192.168.1.126", //do not change
"LobbyPort" : 12534,
"ProxyIP"   : "192.168.1.126", //do not change
"ProxyPort" : 12535, //do not change
"TeamNum"   : 1, //1-4 HOW MANY TEAMS
"NumPerTeam" : 16, //1-32 (TeamNum * NumPerTeam <= 32) PLAYERS PER TEAM 
"GameMode"   : 1, //0-story,1-adventure,2-build,3-custom
"GameType"   : 0, //0-coop,1-VS,2-survival
"MonsterYes" : true, //true or false WILL THERE BE MOBS ROAMING THE MAP
"ServerName" : "yktest", //THIS NAME WILL APPEAR IN THE LOBBY AND MUST BE UNIQUE AMONG EACH SERVER YOU HOST
"MapName"    : "Story Demo", //custom map's name
"MapSeed"    : "patheamaria", //random map seed in adventure and build modes
"TerrainType" : 1, //1-grassland,2-forest,3-desert,4-red stone,5-rainforest
"ClimateType" : 1, //0-dry,1-temperate,2-water,3-random
"VegetationType" : 1, //1-grassland,2-forest,3-desert,4-redstone,5-rainforest (this one should be the same with TerrianType)
"MasterRoleName" : "Unknown", //host nameTHIS IS THE NAME OF THE PLAYER CHARACTER THAT WILL HAVE ADMIN RIGHTS
"Password"       : "", //THIS IS THE PASSWORD TO JOIN THE SERVER
"PublicServer"   : false, //(true or false) IF THIS IS FALSE, THE SERVER WILL NOT APPEAR IN THE LOBBY
"Proxy"          : false, //(true or false) THIS WILL ALLOW A SERVER THAT IS BEHIND A CLOSED PORTS ON A FIREWALL TO SHOW IN THE LOBBY
"UseSkillTree"   : false, //(true or false) THE PLAYERS WILL NEED TO EARN SKILL POINTS TO USE TOOLS, WEAPONS, VEHICLES REPLICATION SCRIPTS, AND REPLICATORS
"DropDeadPercent" : 10, //(0-100) WHAT PERCENT OF A PLAYERS INVENTORY WILL DROP ON DEATH
"UnlimitedRes"    : false, //(true or false) IF TRUE THE PLAYERS WILL HAVE UNLIMITED RESOURCES
"TerrainHeight"   : 512, //128m, 256m, 512m(this is the height of the whole map including sky)
"MapSize"         : 0, //4 = 2km2, 3 = 4km2, 2 = 8km2, 1 = 20km2, 0 = 40km2
"RiverDensity"    : 10, //1-100 HOW OFTEN A PLAYER WILL ENCOUNTER A RIVER
"RiverWidth"      : 10, //1-100 IS THIS THE MAXIMUM OR AVERAGE WIDTH OF RIVERS!??!
"PlainHeight"      : 20, //1-100(this is the height of land)
"Flatness"      : 25, //1-100
"BridgeMaxHeight"      : 30 //0-100
"AICount"         : 3//3-7 THE TOTAL NUMBER OF FACTIONS (PUJA/PAJA/HUMAN) IN A MULTIPLAYER MAP
}
//Config ends
Title: Re: Tutorial on new server configuration
Post by: lazerblade01 on November 12, 2016, 12:12:02 AM
Any chance you can add these comments to the actual config file next time you push an update? Doesn't necessarily have to be after each line like it is here, but something at the top or bottom of the file explaining what each setting is and / or which options are available would be helpful.
Title: Re: Tutorial on new server configuration
Post by: hejie13250 on November 14, 2016, 03:02:37 AM
Why not do a tool to start the server? I did it myself, but every time you update the parameters are very messy, and now I do not know how to start a custom map of the game.
Title: Re: Tutorial on new server configuration
Post by: lisaisacat on December 08, 2016, 07:44:13 AM
当初看了这个帖子还下载了12G的文件,结果在游戏里就可以直接创建啊!勾选代理服务器就可以了
Title: Re: Tutorial on new server configuration
Post by: Rebelweasel on January 06, 2017, 02:25:22 PM
I've noticed a new line in our ServerConfig.cong file:
Code: [Select]
"ScriptsAvailable" : true
Is it possible this is a new setting, and does it do what I infer, to make it so that in survival mode our characters do not start the game with all scripts unlocked immediately? I've tried setting the command to "false" but when logging in, we notice no change in our scripts unlocked, not even on brand new characters we create. So excited if it turns out to be what I hope it is!  ;D
Title: Re: Tutorial on new server configuration
Post by: Alu on February 19, 2017, 07:00:39 PM
Can't get it to run on my debian server, this is what I get:

Code: [Select]
/home/gameservers/planetexplorers/Server$ ./PE_Server_Linux.sh -nographics
./PE_Server.x86: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory
: numeric argument required3: exit: 0
/home/gameservers/planetexplorers/Server$ ./PE_Server.x86 -nographics
./PE_Server.x86: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory
/home/gameservers/planetexplorers/Server$

EDIT:
Nevermind, I had to run the file in the HeadlessServer folder. Now it works :)
Title: Re: Tutorial on new server configuration
Post by: RacerXx on March 13, 2017, 03:21:26 AM
Does anybody know of any user made or any admin tools at all for managing the dedi server?
Title: Re: Tutorial on new server configuration
Post by: Alu on March 13, 2017, 08:22:59 PM
updated my server but now I cant relaunch it and the serverconfig reset whats up with that?

EDIT:
Fixed it.
I recommend to backup your config file,  it seems to be rewritten by the updates.
If you struggle to recover your old game, you only need to ensure you're using the exact same servername.