Running a server: Difference between revisions

From FreeAllegiance Wiki
Jump to navigationJump to search
(Split off running a lan to LAN)
Line 4: Line 4:
First off, there are a few things regarding Allegiance servers that needs to be clarified.  
First off, there are a few things regarding Allegiance servers that needs to be clarified.  


:*You will need access to the router or gateway that your server connects to. This is because the server requires port forwards if you don't have a public IP address when behind a router.
* You will need access to the router or gateway that your server connects to. This is because the server requires port forwards if you don't have a public IP address when behind a router.
:*If you plan on setting up a server for use in the main lobby, you need to get it cleared with the Administration. This is to prevent a long list of "My Game" servers cluttering the game lobby. [http://www.freeallegiance.org/forums/index.php?act=Msg&CODE=4&MID=225 Contact Tigereye] for this.
* Setting up the server requires a fairly good knowledge of Windows and involves editing the registry. Do not attempt this if you are unsure of any of the steps involved. The guide will make it as simple as possible, but in-case you are unsure about anything, post in the [http://www.freeallegiance.org/forums/index.php?showforum=5 Helpline].
:*Setting up the server requires a fairly good knowledge of Windows and involves editing the registry. Do not attempt this if you are unsure of any of the steps involved. The guide will make it as simple as possible, but in-case you are unsure about anything, post in the [http://www.freeallegiance.org/forums/index.php?showforum=5 Helpline].
* If you plan on setting up a server for use in the main lobby for general use:
:*If you are going to put up a server for regular use, it is a good idea to post in the forums and check for the lag the players get to your server's IP from different parts of the world. If your server has worse lag than the current servers, no one will play on them.
** You need to get it cleared with the Administration. This is to prevent a long list of "My Game" servers cluttering the game lobby. [http://www.freeallegiance.org/forums/index.php?act=Msg&CODE=4&MID=225 Contact Tigereye] for this.
** It is a good idea to post in the forums and check for the lag the players get to your server's IP from different parts of the world. If your server has worse lag than the current servers, no one will play on them.


===Step 1 : Prepare the computer===
{{Step|1|Prepare the computer}}
Make sure your server machine has the most recent Windows updates and DirectX runtimes. If you don't have a public IP (behind a router without one), then forward ports 2300-2400 UDP to the server machine.
Make sure your server machine has the most recent Windows updates and DirectX runtimes.


===Step 2 : Download files===
If you are behind a router, you will need forward ports 2300-2400 UDP to the server machine.
Download the server pack from FreeAllegiance.org's [http://www.freeallegiance.org/downloads/ downloads section].


===Step 3 : Install the server===
{{Step|2|Install the server}}
Install the server. Make sure you opt to install it as a service.  
[[Image:Online_Setup_Service.png|thumb|You must install the Server as a service for online play.]] Download the server pack from FreeAllegiance.org's [http://www.freeallegiance.org/downloads/ downloads section]. Proceed to install. Make sure you opt to install it as a service.


[[Image:Online_Setup_Service.png]]
{{Substep|2.1|Update the artwork}}


Like so.
===Step 4 : Prepare the server===
Copy over the artwork directory from an up-to-date game client install over to the server's artwork directory. This is to ensure that the server has the most recent core and model files. Do not forget to do this.
Copy over the artwork directory from an up-to-date game client install over to the server's artwork directory. This is to ensure that the server has the most recent core and model files. Do not forget to do this.


These files you have to copy to server from client artwort directory:
These files you have to copy to server from client artwort directory:
* igc files (cores and maps)
* '''.igc files''' (cores and maps)
* chv files (models/hitboxes)
* '''.chv files''' (models/hitboxes)


The server doesn't need the following file types:
The server doesn't need the following file types:
Line 34: Line 31:
* mml files (ingame help)
* mml files (ingame help)


===Step 5 : Set up games on the server===
{{Step|3|Configure the server}}
Hit ''Start -> Run'' and type in "'''REGEDIT'''" without the quotes. The Registry Editor will pop up.


Now, a word of warning. The registry is Windows' brain. Any mistake you commit here could mean a dead Windows install. With that out of the way,
[[Image:Online_Setup_Registry.png|thumb|This is what the 1.0 key should look like when you are done with this section.]] Open up the "Run..." prompt (Windows+R), type in {{verbatim|regedit}} and confirm with Ok. The Registry Editor will pop up. Now, a word of warning. The registry is Windows' brain. Any mistake you commit here could mean a dead Windows install. With that out of the way:


:*Make a backup of the registry before you do anything. Select ''File -> Export''. Set ''Export Range'' to ''All'' and save the file somewhere safe.
Make a backup of the registry before you do anything. From the "File" menu pick {{verbatim|Export}}. Set {{verbatim|Export range}} to "All" and save the file somewhere safe.
:*Navigate to ''HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Allegiance\1.0''.
:*If you are running the server on the BETA lobby, then change the ''CfgFile'' key to '''<nowiki>http://fazdev.alleg.net/FAZ/FAZ.cfg</nowiki>'''


The games running on a server are controlled by a series of '''Game''N''''' and corresponding '''Core''N''''' entries, where N is an integer from 1 onwards.. '''Game''N''''' is the name of the game and '''Core''N''''' is the name of the core that game runs without its extension (IGC). It is to be pointed out that many games can run on a single server. By default, the server comes configured for a single game with the '''zone_core''' core. This is the original 1.25 classic Allegiance [[core]]. There are many cores in Allegiance. Choose which core(s) you want to run on the server and create keys for them.
Now navigate to the following key: <pre>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Allegiance\1.0\Server</pre>


For example, if you want to run three games on your server : '''DN''', '''GoDII''' and '''PC2'''. To do this, you create keys which look somewhat like this:
The games running on a server are determined by pairs of "Game''N''" and "Core''N''" values, where ''N'' is an integer from 1 onwards. In specific: the ''n''-th's game will be named after the value in "Game''n''" and will run the core specified in "Core''n''". Choose which core(s) you want to run on the server and create keys for them.


Game''1'' : '''DN 4.60'''<br>
For example, if you want your server to run a DN game, a GoDII game and a CC_03 game, you will have keys looking somewhat like this:
Core''1'' : '''dn_000460'''


Game''2'' : '''GoDII R4'''<br>
*Game1: <tt>DN 4.60</tt>
Core''2'' : '''GoDII_R4'''
*Core1: <tt>dn_000460</tt>
*Game2: <tt>GoDII R4</tt>
*Core2: <tt>GoDII_R4</tt>
*Game3: <tt>Community Core R3</tt>
*Core3: <tt>cc_03</tt>


Game''3'' : '''PookCore2 R19'''<br>
You may also want to change the MaxPlayersPerGame values, which sets the player limit on each game. Consult the Bandwidth Requirements in the server manual to see the number of players that your connection supports; the default is 8 and the maximum is 200. Make sure you set this number while in decimal mode.
Core''3'' : '''PC2_019'''


Note that one set of '''Game''1''''' and '''Core''1''''' entries are already present and you can edit them and add the rest.
{{Warn|Double and triple check your entries. A wrong entry will crash your server -- put special care on the core entries.}}


:*Next is the ''MaxPlayersPerGame'' key. This key sets the maximum number of players that can join your servers. Consult the Bandwidth Requirements in the server manual to see the number of players that your connection supports. This number can go upto 200. Make sure you set this number while in decimal mode.
{{Note|If you are running the server on the BETA lobby, change the "CfgFile" key to: <pre>http://fazdev.alleg.net/FAZ/FAZ.cfg</pre>}}
:*Double and triple check your entries. '''A wrong entry can crash your server, especially the Core''N'' entries.'''


Here's an example server registry entry :
You can now close the Registry Editor.


[[Image:Online_Setup_Registry.png]]
{{Step|6|Start the Server}}


===Step 6 : Start the server===
From the Control Panel, pick "Administrative Tools" then "Services". If you can't find it, fire up the "Run..." dialog and run {{Verbatim|services.msc}}. Find and start the ''MS Allegiance Game Server'' service.
Goto the services list by either going to ''Administrative Tools'' or ''Start -> Run'', '''services.msc'''. Find and start the ''MS Allegiance Game Server'' service.


===Step 7 : Verify everything works===
If all went well, the server will show up in the lobby that you chose.  
If all went well, the server will show up in the lobby that you chose.  


===Optional Steps===
{{Step|7|Get TAG}}
If you want to have stats reporting on your server, you'll need to install TAG on it. [http://www.freeallegiance.org/forums/index.php?act=Msg&CODE=4&MID=225 Contact Tigereye] for more details. You'll also need to setup a couple of text files if you want to have the official ranks displaying on your server. The ranks.txt file can be obtained from Tigereye. It can also be manually built, but we'd suggest not doing that.
 
If you are not running the server on the regular lobby, skip this section.
 
If you want to have stats reporting on your server, you'll need to install TAG on it. http://www.freeallegiance.org/forums/index.php?act=Msg&CODE=4&MID=225 Contact Tigereye] for more details. You'll also need to setup a couple of text files if you want to have the official ranks displaying on your server. The ranks.txt file can be obtained from Tigereye. It can also be manually built, but we'd suggest not doing that.


You can find information on one of the reference threads below on how to add custom maps to your server.
{{Step| |Finish!}}


===References===
Congratulations! Your server is now (hopefully) up and running!
Zapper's [http://www.freeallegiance.org/forums/index.php?showtopic=27872 Server Setup Crash Course]. - This thread contains a large amount of information, some of which is not covered here.
Your_Persona's [http://www.freeallegiance.org/forums/index.php?s=&showtopic=29184&view=findpost&p=91481 code snippet] that explains the different Event IDs used by the server. These entries show up on the ''Application Event Log'' under ''Administrative Tools''. This information is valuable when troubleshooting server problems.


===Further reading===
*Zapper's [http://www.freeallegiance.org/forums/index.php?showtopic=27872 Server Setup Crash Course]. - This thread contains a large amount of information, some of which is not covered here.
*[http://www.freeallegiance.org/forums/index.php?s=&showtopic=29184&view=findpost&p=91481 This post] by YourPersona explains the different Event IDs used by the server. These entries show up on the "Application Event Log" under "Administrative Tools". This information is valuable when troubleshooting server problems.


[[Category:Help]]
[[Category:Help]]
[[Category:Configuration]]
[[Category:Configuration]]
[[Category:Tech support]]
[[Category:Tech support]]

Revision as of 13:40, 26 January 2009

Allegiance works on a client-server system where players connect to centralized servers to play. You can put up your own servers on the Master Lobby (after getting it cleared with Tigereye) so that other players may play on it. You can also set up private LAN servers to test out new cores or hold LAN parties with your friends (without anyone's clearance ;)).

Running an online server

First off, there are a few things regarding Allegiance servers that needs to be clarified.

  • You will need access to the router or gateway that your server connects to. This is because the server requires port forwards if you don't have a public IP address when behind a router.
  • Setting up the server requires a fairly good knowledge of Windows and involves editing the registry. Do not attempt this if you are unsure of any of the steps involved. The guide will make it as simple as possible, but in-case you are unsure about anything, post in the Helpline.
  • If you plan on setting up a server for use in the main lobby for general use:
    • You need to get it cleared with the Administration. This is to prevent a long list of "My Game" servers cluttering the game lobby. Contact Tigereye for this.
    • It is a good idea to post in the forums and check for the lag the players get to your server's IP from different parts of the world. If your server has worse lag than the current servers, no one will play on them.


1 Prepare the computer

Make sure your server machine has the most recent Windows updates and DirectX runtimes.

If you are behind a router, you will need forward ports 2300-2400 UDP to the server machine.


2 Install the server
You must install the Server as a service for online play.

Download the server pack from FreeAllegiance.org's downloads section. Proceed to install. Make sure you opt to install it as a service.

2.1 Update the artwork

Copy over the artwork directory from an up-to-date game client install over to the server's artwork directory. This is to ensure that the server has the most recent core and model files. Do not forget to do this.

These files you have to copy to server from client artwort directory:

  • .igc files (cores and maps)
  • .chv files (models/hitboxes)

The server doesn't need the following file types:

  • mdl files (config and textures)
  • wav/ogg files (sounds)
  • mml files (ingame help)


3 Configure the server
File:Online Setup Registry.png
This is what the 1.0 key should look like when you are done with this section.

Open up the "Run..." prompt (Windows+R), type in regedit and confirm with Ok. The Registry Editor will pop up. Now, a word of warning. The registry is Windows' brain. Any mistake you commit here could mean a dead Windows install. With that out of the way:

Make a backup of the registry before you do anything. From the "File" menu pick Export. Set Export range to "All" and save the file somewhere safe.

Now navigate to the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Allegiance\1.0\Server

The games running on a server are determined by pairs of "GameN" and "CoreN" values, where N is an integer from 1 onwards. In specific: the n-th's game will be named after the value in "Gamen" and will run the core specified in "Coren". Choose which core(s) you want to run on the server and create keys for them.

For example, if you want your server to run a DN game, a GoDII game and a CC_03 game, you will have keys looking somewhat like this:

  • Game1: DN 4.60
  • Core1: dn_000460
  • Game2: GoDII R4
  • Core2: GoDII_R4
  • Game3: Community Core R3
  • Core3: cc_03

You may also want to change the MaxPlayersPerGame values, which sets the player limit on each game. Consult the Bandwidth Requirements in the server manual to see the number of players that your connection supports; the default is 8 and the maximum is 200. Make sure you set this number while in decimal mode.


Warn.png
Warning! Double and triple check your entries. A wrong entry will crash your server -- put special care on the core entries.


Info.png
Note If you are running the server on the BETA lobby, change the "CfgFile" key to:
http://fazdev.alleg.net/FAZ/FAZ.cfg

You can now close the Registry Editor.


6 Start the Server

From the Control Panel, pick "Administrative Tools" then "Services". If you can't find it, fire up the "Run..." dialog and run services.msc. Find and start the MS Allegiance Game Server service.

If all went well, the server will show up in the lobby that you chose.


7 Get TAG

If you are not running the server on the regular lobby, skip this section.

If you want to have stats reporting on your server, you'll need to install TAG on it. http://www.freeallegiance.org/forums/index.php?act=Msg&CODE=4&MID=225 Contact Tigereye] for more details. You'll also need to setup a couple of text files if you want to have the official ranks displaying on your server. The ranks.txt file can be obtained from Tigereye. It can also be manually built, but we'd suggest not doing that.


Finish!

Congratulations! Your server is now (hopefully) up and running!

Further reading

  • Zapper's Server Setup Crash Course. - This thread contains a large amount of information, some of which is not covered here.
  • This post by YourPersona explains the different Event IDs used by the server. These entries show up on the "Application Event Log" under "Administrative Tools". This information is valuable when troubleshooting server problems.