Archeblade

Archeblade

Not enough ratings
Server Creation and Management
By Bacon Bits
This guide shows users how to not only start their own servers but use optional scripts to maintain them.
   
Award
Favorite
Favorited
Unfavorite
Introduction
This guide is intended to help users start and maintain their own ArcheBlade servers by describing the following processes:

  1. Planning Port Maps for servers
  2. Setting Up Port Forwarding
  3. Opening Ports on Firewall
  4. Starting Server Process
  5. Using Scripts to Maintain Server

This guide focuses on hosting multiple servers but can be applied to a small number of servers as well.

*NOTE*

Before hosting any servers, I highly recommend getting a few patched files in order to prevent a majority of well-known exploits. At the moment the best source for that is the Woo-Jin Mod that comes with some exploit fixes. I have a stand-alone version without Woo-Jin that has a few extra fixes. I'll work on making that available and will update this guide when that is ready.
Planning
Each server supposedly consumes 2 ports, but I have found that is not always the case. For each server you intend to have, you should reserve 4 ports in order for the servers to function optimally. Before you start hosting a large number of servers, I recommend saving a file that has information for your servers that may look something like the following:

Name
Map
Start Port
End Port
MyServer1
Altar of War
7777
7780
MyServer2
Under Siege
7781
7784
MyServer3
Steam Canal
7785
7788
MyServer4
Nagas Pit
7789
7792

Note that the port range for each individual server must be sequential. However, the ports could vary between servers. For example, MyServer1 could have ports 7777-7780 while MyServer2 could have ports 8001-8004. It depends on personal preference. It would be easiest if the whole range is consecutively sequential.

For rest of the guide, we'll use this example for getting the servers setup. Our port range will be from 7777-7792.
Port Forwarding Options
For the sake of simplicity, we will use the example ports from the planning section, 7777-7792 along with a made up host IP address of 192.168.1.95.

Before we look at the instructions for setting up port forwarding, I recommend setting a static IP on your computer. There are guides for doing this here[portforward.com]. By setting a static IP address on your PC, it will reserve that address so you can use it for the Port Forwarding rules on the router. This guide will also show you how to find your PCs IP Address.

Each router has its own method of setting up port forwarding. To find your specific router's instructions, go to this link[portforward.com] and navigate to your router brand and model.

The following are generic bits of information you will need for the port forwarding rule:

Name
Protocol
IP Address
Start Port
End Port
AB Servers
TCP & UDP
192.168.1.95
7777
7792

Note that the IP address needs to be the IP address of your host PC. Some routers will separate internal and external ports. Simply set both internal and external to the same values.
Firewall Settings
Now that the Port Forwarding is setup, we need to add some rules to our firewall. For now, there will only be instructions with Windows Firewall. If you use a third-part firewall program refer to its documentation.

This link[msdn.microsoft.com] shows how to get to the Windows Firewall and add a new rule. There will need to be a total of 4 rules and the information can be found in the following table.

In/Out
Rule Type
Protocol
Ports
Connection
Name
Inboud
Port
UDP
7777-7792
Allow
AB Server - Inbound - UDP
Inboud
Port
TCP
7777-7792
Allow
AB Server - Inbound - TCP
Outboud
Port
UDP
7777-7792
Allow
AB Server - Outbound - UDP
Outbound
Port
TCP
7777-7792
Allow
AB Server - Outbound - TCP

The default setting can be used for the profile for the network interfaces.
Server Creation - Command Line
Now that we have the Port Forwarding and Firewall rules setup, it's time we start up some servers. If you are running multiple servers, as we do in our example, I recommend creating a batch file to start the servers. For more information on scripting, please review the Server Management sections.

For now, we will look at accessing the command prompt and starting a server.

To get to the command prompt, press Start, type cmd, and then press enter. Once in the command prompt, you need to navigate to the folder where your Archeblade executable exists. The following shows how to get to the AB directory:

cd "C:\Program Files (x86)\Steam\SteamApps\common\ArcheBlade\Binaries\Win32"

From here you can create new server instances. Note the filepath shown above is the default location for AB (and Steam games in general) and may vary depending on each users' install location. Make sure you enter your correct filepath.

Now that you are in the correct folder, you can run the following command to start a server.


Voilà! You have now started a server. A window should appear with the name of your server and the number of active players in it. For more information regarding the different fields that can be modified for starting your server, please refer to the Appedices.
Server Creation - GUI Utility (ServerLauncher)
If you would prefer to not use a command line, there is a server utility that codebrush has provided. This can generally be found at:
C:\Program Files (x86)\Steam\SteamApps\common\Archeblade\Binaries\Win32\serverlauncher.exe
The filepath may vary if you chose a custom installation location. The server launcher will look like the following:



The interface is quite simple. Just fill in the information you need and click Create to start your server. There are a few things to take note of when using the Server Launcher.
  1. The Port Num is the starting port number.
  2. The Training Room cannot be created from this interface by default.
  3. Max Players cannot be greater than the intended number for that map. For instance, Altar of war cannot have more than 4 players.
Using the command line interface can allow users to bypass maxplayer limits and create a training room map.
Server Management Scripting
Now that you have servers running, you may want a better method of maintaining them. It gets annoying closing them all, and restarting the manually. So, let's look into some scripting options! The following method you will see is something I did with the Seattle Servers. This is just one of many ways to accomplish automation.

For each individual server, I wrote a watchdog script. This basically automagically restarts the servers if they crash for some reason. We will call the next example script MyServer1.bat in order to make sure the commands are executed when it is double-clicked. The script for each server would look something like the following:
@echo off cls :: Change Directories cd "C:\Program Files (x86)\Steam\steamapps\common\ArcheBlade\Binaries\Win32" :: Script information echo Protecting archeblade.exe from crashes... title Watchdog - MyServer1 - Port 7777 - Altar of War :: Server Startup :archeblade echo %date% @ %time% Archeblade started. START /wait Archeblade.exe server RM_AltarOfWar.umap?ServerName=MyServer1?Port=7777?Maxplayers=4?Local=0?Ranked=0,0?SteamSockets?ChangeChamp -silent :: Server Reset echo %date% @ %time% Archeblade closed or crashed, restarting. goto archeblade

The server window that pops up will look like the following:
I killed the server process a few times to show what some of the text would look like in the watchdog script window.

There are a few things to take note of when using this method.

First, note the -silent flag after the server start command. This hides the server window so I only see the watchdog scripts, which are what I care about. This does not stop the game from logging data to the Archeblade Log folder. As we speak I have 80 GB of data that is quite useless to me. I recommend emptying that on occasion to free up disk space.

Secondly, this script has the ability of creating a "zombie" process. That means, if you exit out of this script, the server process will continue to run even though the script is closed. If this happens, you need to make sure you kill the zombie server process. I actually have a script for that for other reasons we will talk about in a bit.

Finally, the easiest way to manage the servers is by having a script for each server. Each watchdog script will only watch one process at a time. For convenience sake, I recommend have a super script that starts all the other scripts. That would look something like the following:

START MyServer1.bat START MyServer2.bat START MyServer3.bat START MyServer4.bat
This would simply be an easier way to get all the processes running initially.

The last step is possibly the most important step. This last script simply kills all the servers. If you have zombie processes, this will terminate them and free up computer resources. More importantly though, this can be used to automatically restart your servers. Our KillABServers.bat scripts would simply be the following:

taskkill /f /im Archeblade.exe

This kills any instances of Archeblade.exe that are running (including clients). The great benefit we get here is that by killing all your servers at once, the WatchDog scripts can kick in and restart all your servers. The reason this is so important is because these servers will get bogged down over time with memory leaks and other problems that will affect their performance. Restarting the servers will fix many of these issues.

To take automation one step further, we can use the Windows Task Scheduler to run this script. For example, a task could be created that runs at 2:00AM every day that runs our kill script. This would effectively restart all the servers at 2:00AM every morning. For instructions on setting up a task, clink this link[windows.microsoft.com].

The final step for full automation is to add another task that starts your watchdog scripts on Startup. With this task added, you no longer have to worry about managing your servers! Woohoo!
Known Issues
  1. Sometimes servers take a bit of time to show up on the global list in Archeblade.
Appendix A: Map Files
Map Name
Map File
Nether Dale
OM_NetherDale.umap
Under Siege
TDM_UnderSiege.umap
Nagas Pit
DM_NagasPit.umap
Steam Canal
RM_SteamCanal.umap
Night Under Siege
RM_NightUnderSiege.umap
Altar of War
RM_AltarOfWar.umap
The Bridge
OM2_TheBridge.umap
Summer Island
DM_SummerIsland.umap
Training Room
TM_TrainingRoom.umap

Please note that Night Under Siege is deprecated at the moment. Some users have the map files from the BETA. It would be great to see that restored to the current version of ArcheBlade.
Appendix B: Key-Value Pairs
Key-Value pairs mean there will be something in the following format in the server start command:

key=value

The following is a list of the keys that can be used in the command:
  • ServerName
  • Port
  • Maxplayers
  • Local
  • Ranked
  • Password
The values associated with each of these may have some additional rules.

The Server Name value cannot have spaces unless in quotes.
The Port value needs to be the intended starting port for that server.
The Local value should be set to 0 in order for the best results on the server list in-game.
The Ranked value should be two numbers separated by a comma. For example, 0,0 allows any levels join the match while 1,40 only lets levels 1-40 enter.
The Password value should theoretically be a numerical password with at most 4 digits. For whatever reason I have not been able to make that work. If anyone knows the correct information for making that work via command line, let me know and I will update this information.
Appendix C: Optional Flags
The following are optional flags that can be added to a server for additional behavior.
  • NoDupChamp
  • ChangeChamp
  • Unbalance
NoDupChamp does not allow players to have the same character in that server, unless the map type is Free For All.
ChangeChamp allows players to change their character if they have died.
Unbalance supposedly allows games to start if the teams are unbalanced. I am not sure if this functions as intended.
3 Comments
Seifer 1 Jun, 2015 @ 3:45pm 
Ok, The password atribute is incorrect thats why doesn't work. The correct one is GamePassword=0000? (for example)
Bobert13 11 May, 2015 @ 8:27pm 
I lurv u gaiz
Err0rC0deX 11 May, 2015 @ 1:57am 
With regards to log folder pilling up just make the write rights for all users false in folder permissions. That prevents ab from creating logs and it doesn't affect the server in any way.