Setting up local lobby and server

From FreeAllegiance Wiki
Jump to navigationJump to search

Setting up a local lobby and server running on your machine will allow you to test without using allsrvui.exe and allow for more straightforward debugging.

Register the Executables

First locate objs10/FZDebug/lobby/alllobby.exe and objs10/FZDebug/Fedsrv/allsrv.exe. Run both of these files once with the -regserver switch, i.e. create a shortcut to ...objs10/FZDebug/Fedsrv/allsrv.exe -regserver or navigate there using the command prompt and run allsrv.exe - regserver and AllLobby.exe -regserver.

Create a Config File

The next step is to create a local.cfg file for your client and server. An example local.cfg file can be found at http://allegiance.zaphop.com/allegiance-local.txt.

Registry Changes

Finally, your registry needs to be edited to point to these remote local.cfg files. A CfgFile string value set to the cfg file location (in my case "http://dl.dropbox.com/u/550731/local.cfg", but you can also have it on your C drive, for instance "C:\AllegSource\objs10\FZDebug\WinTrek\local.cfg") needs to be added to the Microsoft Games\Allegiance\1.4 folder and an equivalent CfgFile value goes in HKEY_LOCAL_MACHINE\Microsoft Games\Allegiance\1.4\Server. (Apparently not needed: Additionally, create a ServerAddress string in Microsoft Games\Allegiance\1.1 folder that has a value of <LANIP>:2304 for example to match my local.cfg my key is 192.168.10.15:2304.)

The Microsoft Games\Allegiance\1.4\CfgFile registry entry may be changed by the game on launch. Change it back while on the intro screen.

Debugging with Local Lobby and Server

Now to start a debugging session in Visual Studio, right click the appropriate projects and select Debug->Start new instance. Do this for the Lobby, Server, and Allegiance project in that order.

The server needs the Artwork folder in its folder.

Using Retail Lobby and Server

Additionally, if you repeat the -regserver steps in the first paragraph on your objs10/FZRetail allsrv.exe and lobby.exe you can run those by simply executing them to give a less resource intensive server and lobby if you aren't debugging.

Reverting Back To Normal Beta Server

If you want to go back to using the normal beta server with everyone else, reset the CfgFile registry key value in your Microsoft Games\Allegiance\1.4\ folder to "http://allegiance.zaphop.com/allegiance-server.txt".


Alternative way - set up a server service (actually the only one tested)

  • Go to C:\Allegiance\Server
  • Follow instructions in the readme.

The batch files are looking for files in these paths, so it would be easiest not to modify them.

The batch files in the alleg server installer might not work properly. They need to be run with admin permissions, but if you run them with admin permissions, cmd changes directory to /sys32. So you need to run cmd with admin, change dir, then run the batch file.