CryoFall/Server/Setup: Difference between revisions
Ai enabled (talk | contribs) |
Ai enabled (talk | contribs) |
||
Line 24: | Line 24: | ||
==== How to setup your own server (on any OS): ==== | ==== How to setup your own server (on any OS): ==== | ||
# Install .NET Core Runtime 3.1ΓÇöplease visit [https://dotnet.microsoft.com/download/dotnet-core/3.1 Microsoft .NET Core Downloads] and select .NET Core '''Runtime''' Installer for your operating system, then follow the installation guide. | # Install .NET Core Runtime 3.1ΓÇöplease visit [https://dotnet.microsoft.com/download/dotnet-core/3.1 Microsoft .NET Core Downloads] and select .NET Core '''Runtime''' Installer for your operating system, then follow the installation guide. | ||
# Download the game server package from '''[https://atomictorch.com/Files/CryoFall_Server_v0.25.4. | # Download the game server package from '''[https://atomictorch.com/Files/CryoFall_Server_v0.25.4.35_NetCore.zip SERVER DOWNLOAD LINK (any OS)]''' and extract it (it's a regular Zip archive). (on Linux you can use wget and unzip command line tools to download and extract it) | ||
# The server package is including everything necessary to run the game server (not only executable but also "Core" folder containing the game scripts in a packaged zip archive named "Core.cpk"). | # The server package is including everything necessary to run the game server (not only executable but also "Core" folder containing the game scripts in a packaged zip archive named "Core.cpk"). | ||
# The server executable is located in the subfolder: "Binaries/Server". Open the command line/terminal/SSH (or PowerShell in Windows) and navigate to this folder (hint: in Windows you can simply '''SHIFT + Right-click''' on the "Server" folder in Explorer and select "Open PowerShell window here"). | # The server executable is located in the subfolder: "Binaries/Server". Open the command line/terminal/SSH (or PowerShell in Windows) and navigate to this folder (hint: in Windows you can simply '''SHIFT + Right-click''' on the "Server" folder in Explorer and select "Open PowerShell window here"). |
Revision as of 19:32, 12 March 2020
Game server rent service
If you don't want to hassle with the game server setup, you can rent your own CryoFall server from PingPerfect now.
They have locations all over the world, just visit them to get yours ΓÇö PingPerfect.com (this is our referral link).
Please note that AtomicTorch Studio is not affiliated with PingPerfect company and not responsible for their service quality so in case of any issues please reach them directly. So far we've heard only positive feedback about them from all the players.
Requirements
Hardware requirements
(for up to about 30 players online) 1-core CPU 1.6-2 GHz, 1-1.5 GB RAM, 2-3 Mbit/s bandwidth (each way).
(for up to about 100 players online) 2-core CPU 1.6-2 GHz, 1.5-2 GB RAM, 3-6 Mbit/s bandwidth.
(for up to about 200 players online) 2-core CPU 2.4-3 GHz, 2-3 GB RAM, 6-12 Mbit/s bandwidth.
(for up to about 300 players online) 2-core CPU 3+ GHz, 3-5 GB RAM, 12-20 Mbit/s bandwidth.
Usually, VPS (virtual machines) hosting such as Vultr.com (this is our referral link as we're using this company services to host our own servers) is sufficient for hosting a game server. Using 1-core machines is not recommended as the game requires a secondary CPU to ensure smooth performance without hiccups during intensive background operations (such as world snapshot saving). Using more than a 2-core machine for a single game server hosting is redundant as the game cannot utilize more than two cores due to sequential execution of the game simulation (except networking).
Software (system) requirements
The server could run on Windows, Linux, and Mac.
You need to have .NET Core Runtime 3.1 (or any higher) installed. It's supported for the many operating systems and installation is very quick.
To install .NET Core Runtime 3.1 please visit Microsoft .NET Core Downloads and select .NET Core Runtime Installer for your operating system. Follow the installation steps to set up the game server.
Server installation with Docker (recommended for Linux)
Please follow this guide CryoFall Dedicated Server Docker Image then return back here to "Server installation" section and follow the list after number 7. Ignore instructions on how to start the server with "dotnet" as you should use "docker run ..." instead as explained in the Docker guide above.
Server installation / direct download (Linux, Windows, Mac)
How to setup your own server (on any OS):
- Install .NET Core Runtime 3.1ΓÇöplease visit Microsoft .NET Core Downloads and select .NET Core Runtime Installer for your operating system, then follow the installation guide.
- Download the game server package from SERVER DOWNLOAD LINK (any OS) and extract it (it's a regular Zip archive). (on Linux you can use wget and unzip command line tools to download and extract it)
- The server package is including everything necessary to run the game server (not only executable but also "Core" folder containing the game scripts in a packaged zip archive named "Core.cpk").
- The server executable is located in the subfolder: "Binaries/Server". Open the command line/terminal/SSH (or PowerShell in Windows) and navigate to this folder (hint: in Windows you can simply SHIFT + Right-click on the "Server" folder in Explorer and select "Open PowerShell window here").
- Start the server executable first time with
loadOrNew
flag. The server will start and create the game world.dotnet CryoFall_Server.dll loadOrNew
- Stop the server. To do so enter the command below and press Enter key.
stop 0
- The server will save and quit. Now you have the "SettingsServer.xml" and "ModsConfig.xml" files.
- Now you need to navigate to the subfolder "Data" (in the root of the server folder, not in the "Binaries/Server") and modify "SettingsServer.xml" to set the unique server name and set other settings, etc (there are XML comments explaining every setting so it should be straightforward). Please note that you can (and should) edit Description and Welcome message from the CURRENT GAME menu right from the game after connecting to your server.
- If you are interested in making your server visible in the community servers list make sure to edit <is_public_server> and change the value from 0 to 1. Also, please make sure your router is configured correctly (port forwarding) to enable other people to connect to your machine from outside. But ideally, you should use dedicated server hardware (VPS or VDS) to host public servers.
- While you're still editing "SettingsServer.xml" file, please find the value <server_operators_list> and change it to include your nickname! Otherwise, you will be unable to access your server console from the game and also you will be unable to edit the server's Description and Welcome message.
- If you want to have a custom server icon, please replace the ServerIcon.png file in the "Data" subfolder. The icon image file requirements: PNG24 format, 256x256 size, up to 100 KB.
In SettingsServer.xml, do not modify misc and network parts! It may cause malfunction if something is set in a way it is not intended to be.
You may, however, modify <server> part at your own risk. There you can set up some server configurations that would affect gameplay.
Important (for Windows only): you need to allow the dotnet process in the Windows Firewall settings - if the Firewall access request was not shown automatically by Windows you can add the C:\Program Files\dotnet\dotnet.exe
file into Firewall whitelist. To to this, open Windows Start menu and search for "Allow an app through Windows Firewall" -> button "Allow another app".
Important: after creating the world please do not change the <fps> setting in the ServerSettings.xml file. Changing it might lead to the server game time bug (such as quickly decayed bases or never growing existing farm plants).
Starting the server:
- Launch the command line (we recommending PowerShell in Windows) and navigate to this folder (hint: in Windows you can simply SHIFT + Right-click on the "Server" folder in Explorer and select "Open PowerShell window here").
- Start the server executable with
load
flag.dotnet CryoFall_Server.dll load
- Stop your server by typing command below and pressing Enter key (it will save the world before stopping).
stop 60 The shutdown message text goes here
(Where 60
is the shutdown delay (in seconds) so the connected players will have some time to find a safe location)
Please note that typing this message is really hard as the console is updating regularly! The best way is to simply copy-paste from the text editor the whole command text into the game console window (hint: you can paste in PowerShell by simply pressing the right mouse button) and pressing Enter key.
You can always wipe the world by launching the game with new
flag:
dotnet CryoFall_Server.dll new
Currently, we don't support the savegame migration between the major game versions (if there are changes to the game data serialization scheme). We plan to implement the proper data migration feature ASAP.
Connecting to the server:
If you want to connect to your local game server, simply add SERVERS->Custom list as localhost
To connect to the public server you need to navigate to SERVERS->Community servers list (please note that this might not work if you host this server on the same PC as the client, read below).
If you're attempting to host your server on a home computer and other players cannot connect to it, you need to manually forward the port UDP 6000 on your home router to your local IP address (the game has the auto port forwarding feature but it often fails due to the difference in UPnP implementation on many routers). E.g. if your PC's IP address in local network is 192.168.1.100 (you can check it with ipconfig tool or in Windows network adapter's settings) you will need to setup a port forward rule on your router to forward traffic from port 6000 UDP to port 6000 UDP on IP address 192.168.1.100.
Please note that if you're running a game server on the same PC as the game client, you might be unable to connect to the game server from the Community servers list on that PC due to NAT routing even with the proper port forwarding. In that case, simply add your server into the client custom servers list by providing its address as localhost:6000
and connect to it directly.
Connecting to the private servers requires adding it via the Custom servers menu.
6000 is the default port but you can change it in the Data/SettingsServer.xml file.
Server update
When we're releasing a new version of the game server, you need to follow these steps to update it:
- Install ".NET Core Runtime" (version 3.1 or any higher) https://dotnet.microsoft.com/download/dotnet-core/3.1
- Ensure you've made a backup of the "Data" folder inside the game server installation folder.
- Download the new version of the server and overwrite your current installation with it (you can find the actual download link above in the "Installation" section).
- Stop the game server (if it's running).
- Important: please overwrite both Binaries and Core folders!
- Start the server as usual.
Server commands
- Ensure you're the server operator (you've edited the ServerSettings.xml file and added yourself into the server_operators_list).
- Connect to your game server.
- The game console can be toggled by pressing
~
(the key on the left from1
key) like in old-school games (you can change the key binding for console in the controls options). - Please add
/
(slash) prefix to the server commands you want to execute. - You can use Tab key to fill autocomplete, and you can use arrow Up/Down keys to navigate the suggestions list.
Here is the page with the server commands list: Server Commands List
Moderation (whitelist, blacklist, kicking, muting)
Server operator can access special moderation commands. To invoke these commands, please ensure you're the server operator, connect to your game server, open the console (~ key) and then you can use these commands: (replace username with the actual player nickname)
Whitelist management:
/mod.whiteList.add username
/mod.whiteList.remove username
/mod.whiteList.print
To enable whitelist:
/mod.whiteList.enabled 1
Blacklist management:
/mod.blackList.add username
/mod.blackList.remove username
/mod.blackList.print
Kicking players (temporary removing from server and blocking from connecting):
/mod.kickList.add username durationInMinutes
/mod.kickList.remove username
/mod.kickList.print
Muting players (temporary removing their ability to send messages to chat):
/mod.muteList.add username durationInMinutes
/mod.muteList.remove username
/mod.muteList.print
Server rates adjusting / Enabling PvE mode
Server rates (and PvE flag) are exposed in a separate config file. You can quickly change things like LP gain rate, increase item drops, reduce the player to player damage to zero or even increase the damage from creatures and make it really tough for the players!
To adjust the server rates, stop the server and check the file <game server>/Data/ServerRates.config
Please read carefullyΓÇöall the rates are disabled and in order to apply them you need to remove the # char at the start of the line!
For advanced modding please read modding prerequisites.
Server raiding hours (for PvP)
On PvP server, you could set up specific hours during which the raiding is possible.
By default, offline raiding protection is not enabled so players could raid other players' bases at any time.
To enable offline raiding protection, please use this in-game console command:
/admin.setRaidingWindow 4 14 1.5
In this code we're using (first number) +4 GMT/UTC timezone, (second number) hour of day when raiding is possible (value from 0 to 24), and (third number) is the duration of the raiding window (value from 0 to 24).
So the code in the example will allow raiding from 14:00 (or 2PM) for 1.5 hours.
After changing the value you could open Politics/Diplomacy menu ([P] key) and verify whether you set the correct numbers.
Please note that Politics/Diplomacy menu displaying your local time (in your PC timezone)!