Overview
This is a detailed easy to follow step by step guide on how to set up and configure your reign of kings dedicated server
Introduction & Requirements
*******************************************************************************************************
*******************************************************************************************************
This is an unofficial guide on how to set up a dedicated server brought to you by the zeus-community.net
This tutorial is based on my findings when setting up a Win Server 2012 installation on a dedicated server situated at a datacentre
This tutorial is based on a minimal experience level, so please excuse some of the obvious instructions
If tyour also interested on playing on an organised mature server, then please search the server lobby for “ZEUS”. Most likely it will be passworded, white list coming soon. You can gain access by coming onto teamspeak and requesting it
I will only give the details once I have heard you speak whioch will help me verify your maturity and also may ask you a simple question from our rulebook.
This is purely a step to allow us to filter out players who we feel are unsuitable for type of gameplay we wish to pursue
!!!!!! No microphone, no access sorry !!!!!!!!!
ROK SERVER: ZEUS RP Admins No KOS 24/7
Search “Zeus”
TEAMSPEAK: teamspeak.zeus-community.net
RULES: [link]
Updated to include Alpha 6 Release
*******************************************************************************************************
*******************************************************************************************************
- What you need
- How to install
- Port Forwarding
- Location of files
- How to configure
- Running 2 or more servers
- Useful Links
- Commands & Permissions Listings
- Useful Tools
- Trouble Shooting & Help
- Known Issues
*******************************************************************************************************
*******************************************************************************************************
1 x installed copy of Reign of Kings on your client (Your playing copy)
1 x FTP client
1 x Quad core server with a 64bit windows o/s
2+ GB for the installation folder (Which includes the configuration files)
>100MB for the ingame save folder (Doesnt use much at all)
NB>> You do not need steam running on your server.
As yet there is no ROKserver.exe and therefore no steamcmd params
ROK is based of the Unity engine
Cheat engine can be run by the clients so you’ll have to figure out your own methods on how to administer against its useage. I’m sure the ROK devs will code some form of protection in
*******************************************************************************************************
How to Install
*******************************************************************************************************
1) Zip up and upload your full client install found in your SteamSteamAppscommon directory
2) Upload to your dedicated server and unpack into your desired installation directory
3) Create a desktop shortcut by right clicking on the ROK.exe file and select Send to – Desktop – Create shortcut
4) Select the Desktop shortcut – properties and edit the target line by adding the following command line arguments
-batchmode -nographics -silent-crashes
from something like the following
to
5) Now you can launch the server (Double click on the desktop shortcut) which will automatically create your configuration files
6) Check the server has loaded and is running by either selecting
- Task manager (Right Click on the blue taskbar at the bottom for the menu)
- Resource Monitor
You are looking for a process called ROK.exe using something like 1,680KB or more ram (At time of writing this post)
8) Once you have confirmed the process is running, then end the process
Congratulations You have successfully installed the dedicated server and proved it is running
Now we need to open the inbound ports and configure it
*******************************************************************************************************
Port Forwarding
*******************************************************************************************************
Add an incoming rule to your firewall to allow UDP port 7530
If your working on a home server, then you will need to consult
[link]
for instructions on how to configure your router for port forwarding
*******************************************************************************************************
Configuration
*******************************************************************************************************
1) At this point you are only interested in one file, the
ServerSettings.cfg (See Example files section below)
You will need to set
- A password (At least until you are finished preparing the server)
- A serverName
The length of string that can be used for the serverName is limited to something like 55 characters and includes any HTML hex codes2) Restart your ROK.exe
3) Wait a minute then in the Server browser select “Search” and enter your serverName into the search field
4) If your server hasnt shown up, then select “Refresh” (Reselecting search won’t do anything)
5) After a couple of refreshes, if your server still isnt listed, you have more than likely made a syntax error in your serversettings.cfg (It is not very robust)
4) When you find your server listing “SINGLE CLICK” on it (Hover the mouse around the area that states “Connect”, the password entry box is difficult to see due to the background colours used)
5) Once you have found the entry box add your password then connect
6) Create your character
move away from the spawn point, then log out
7) Shut down the server via task manager in the backend
8) Open up your permissions.cfg and edit it so it looks something like the “Edited” version of the permissions.cfg listed in the Example files section belowThe Edited example file will set you up with 2 new user groups as well as the Default & Admin groups
- SuperAdmin (Full Permissions)
- Admin (Full permissions (Can be edited later)
- TrustedMember (Kick permission)
Add the names of the players you want as in the example file. You will find the actual names of the players, with their correct syntax for easier copying and pasting in the “Users.cfg”
NB>> IMPORTANT
Other tutorials show the PlayersName encapsulated with ”, eg ‘Terox’. I found this breaks the config and prevents the server from loading*******************************************************************************************************
Running 2 or more servers
******************************************************************************************************************
It is possible to run more than one server on the same box.
To do this you need to
- Have multiple installations of Reign of Kings (Copies of your initial install but in different directories)
- Each instance must have a different port configured in the serversettings.cfg
(Make sure your firewall rules reflect this) - Each instrance must run a different world slot, eg slot 0, slot 9, slot 33 etc
(I actually run 2 servers on different boxes, a dev server for custom world event development and a production server, so I haven’t actually tested this on 1 box, this is based on information given to me)
If this information is not accurate, could you please let me know in the comments box below
Standin was unable to get 2 servers running on 1 box, has anyone got asolution ?
*******************************************************************************************************************
Location of Files
*******************************************************************************************************
Installation folder: *:SteamSteamAppscommonReign Of Kings
- Config folder
wherever you installed your ROK server
- Save Folder
(If running under administrator account)
c:UsersAdministratorAppDataLocalLowCodeHatchReign Of KingsIf running ROK.exe as a service (Under user system)
c:WindowsSystem32configsystemprofileAppDataLocalLowCodeHatchReign Of Kings
SAVE folder
- Heatmaps
- Slot0
Configuration Folder
- Permissions.cfg.BAK
- DeathMessages.cfg
- Permissions.cfg
- ServerSettings.cfg
- Users.cfg
*******************************************************************************************************
Backing up server files
*******************************************************************************************************
——————–
——————–
It should be very obvious why you need to back up your server files regularly
- The game is unstable and the server crashes regularly every few hours or so
- Kids take great pleasure in their destructive nature using cheat engine
- Your members hate losing hours of work when issues arise
——————–
——————–
- Your saved folder
- Your config folder
The locations of these folders are stated in the File location section of this guide
To this end I have written a simple batch file that you can run on your server to simplify this for you
——————–
——————–
Instructions
- Create a copy of this in notepad
- Edit it so that the
- _log=
- _ERRORlog=
- BackupPath=
- SavedFolder=
- ConfigFolder=
- Save it as ROKServer_Backup.cmd
- Create a desktop shortcut for it
Either run it manually (Double click on it) as and when you need too or automate it.
I use Firedeamon for automation and call the batch code within a service
I personally have 3 backup plans using 3 instances of this batch command saving to 3 different folders
- once per hour
- once every 4 hours
- once per day
There is no perceived performance loss during save which takes maybe 20 to 30 seconds at the most so there would be no issue in saving at a higher rate every 30 mins etc if you feel the need for that
This batch file will fully backup a live server without killing any processes
I have included the config folder as part of the backed up files due to the hack that rewrites it
The session.lock file isnt required and is ignored by the batch code so it wont hang. This is a temporary file used by the process and you cant actually grab a copy of it even using Hobocopy
ROKServer_Backup.cmd
*******************************************************************************************************
Command & Permissions List (PART 1)
*******************************************************************************************************
(PART 1)
These commands are executed by typing // COMMAND into your chat boxes
The result before pressing enter then reverts to a single forward slash
Example
Access to the commands are defined by the permissions class for each Group class
will delete any blocks within a 4 block cube infront of you
/permission user USERNAME add rok.admin.fly
Example: /guild Hi everyone!
[search string] can be used to filter the list
Command & Permissions List (PART 2)
*******************************************************************************************************
Useful Tools
*******************************************************************************************************
This tool is my tool of choice for giving users remote access to start and stop services, run batch files etc without giving backend access to the server. It is not free, but there is a fairly decent discount available for non profit making organisations providing you agree to run a banner on your website.
It has an auto restart option, scheduling and much more.
For those of you that are familiar with this tool, I am currently using it to auto restart the server when the admin runs the /shutdown
This does not seem to be causing any save issues
I am using the following settings
- Program – Parameters: -batchmode -nographics -silent-crashes
- Program – StartupMode: Automatic
I do intend running some form of scheduled shutdown once a day for backing up the save files, which will include a call on a batch file, which when written, I will post here unless someone wants to do that for me
——————————————————————————————————————-
AFAIK There are no custom launcher apps available yet
Any other useful Admin tools please let me know so I can list them here
*******************************************************************************************************
Example files
*******************************************************************************************************
*******************************************************************************************************
Based on Alpha 6 release
- DeathMessages.cfg
- Permissions.cfg
- ServerSettings.cfg
- Users.cfg
———————————————————————-
———————————————————————-
—-DEFAULT—-
—-EDITED—-
———————————————————————-
———————————————————————-
—-DEFAULT—-
—– EDITED —–
*******************************************************************************************************
Troubleshooting
*******************************************************************************************************
Typically the only known issue I have been suffered when setting up the server was configuration issues.
The config files are a swine, slightest syntax error and the server will not load fully. So I would suggest spending the time with a passworded server getting them right before you open your doors to the general public. I found it very time consuming
- Using Hex colour coding for chat messages configuration for any custom user groups seems to break the config
*******************************************************************************************************
Changelog
*******************************************************************************************************
Created 21/3/2015
*******************************************************************************************************
Created 25/3/2015
Added “Backing up server files” section
*******************************************************************************************************
Created 30/3/2015
Updates to reflect changes implemented for the Alpha 8 build
Updated: Server admin commands to reflect whitelist additions implemented on the Alpha 8 build
Added: “Running 2 or more servers” section
*******************************************************************************************************
Created 10/4/2015
- Removed Permissions section
- Removed commands section
- Reworked Permissions and commands, moving both into the same section and formatted as a table
*******************************************************************************************************