WarZ Server Setup GuideHi, RaGEZONE! Many of you have been wondering how to setup the WarZ Server Files. As you may know, my team has recently released a server and it works almost 100%.
Well, today we're going to show you how to set up a server close to what we have done. Obviously, we will be omitting some of the security details as the best security practice is done in secret.
Pastebin link for better formatting:
If you are interested in a server that is running using parts of this guide, look into DeadZ. Link coming soon.
I. Pre-Requisites.
1) Microsoft Windows Server 2008 or later.
2) Microsoft Windows SQL Server 2008 SP1.
3) Microsoft Visual Studio 2008 Professional Edition with all service packs. No other versions will work.
4) IIS Server or a webserver with ASP.NET support configured to work with PHP as well.
5) 1GB ram recommended per 64 players. Each server will hose a server core, so the more cores on the machine the better.
6) RedGate SQL Compare - 8.0 recommended
7) QuickBMS
II. Compiling the server and setting up your build environment.
1) Open src/RSBuild.sln, src/RSUpdate.sln, src/EclipseStudio/WarZ.sln, server/src/WarZ_Server.sln, server/src/WarZ_Server.sln, server/src/Scripts/WZBackend-ASP.NET.sln
2) Compile them all and make sure they are all compiling. Your binaries will be output to the bin folder automatically by the build system.
a) The WZBackend-ASP.NET.sln needs to be built as a compiled application. Move the Precompiled site contents to a location on your IIS server in (root)/api/ after building it now and any other times in this guide.
3) Tab to WZBackend-ASP.NET. Edit this file and fill in with your SQL information in "public SQLBase()".
4) 'Build' the site and put WZBackend-ASP.NET's precompiled folder on your IIS Server.
a) Remember to mark the IIS server application as an application so it can be executed. You can do this in control panel -> administrative tools -> IIS Management -> right click the folder in your www directory.
5) Change the location of the API to match in each of the solutions. Go into the solution and make sure the API base location (ctrl f -> gDomainBaseUrl ) looks like figure a in all solutions.
a)6) Open up WarZ.sln's tab, and look for this:Code:const char* gDomainBaseUrl= "/api/"; //Keep this the same. int gDomainPort = 80; // Change this to the port of the API server. bool gDomainUseSSL = false; //Change this if your IIS server uses SSL.
7) While still in client, look for dictionary.txt and change it to look like this:Code:case Menu_AppSelect::bStartGamePublic: And make the contents of the case look like this, replacing the DNS with your own: // override API settings g_api_ip->SetString("YOURSERVERSDNSHERE.com");
8) Build ALL the solutions except for the API, since that is already done. You are done configuring the base server compilation and the game server will work if the database is configured.Code:if(dictionaryHash_.Size() == 0) { r3dFile* f = r3d_open( "Data/LangPack/dictionary.txt", "rb" ); if(f->IsValid()) { char tmpStr[256]; while(fgets(tmpStr, 256, f) != NULL) { size_t len = strlen(tmpStr); for(size_t i=0; i<len; ++i) { if(tmpStr[i]==13 || tmpStr[i]==10) tmpStr[i]=0; } dictionaryHash_.Add(tmpStr, tmpStr); } fclose(f); } }
III. Building the database.
1) Open up RedGate SQL compare, and set it up so that the database is being compared on the left, and the scripts on the right of the window for the server\src\Scripts\sql_warz_svn folder. (PICTURE NEEDED.)
a) You will need a database already created to sync into. Create one in Microsoft SQL Server Management named WarZ.
2) Once compared, click the checkbox at the top and find a button that says Sync database at the top of the page. (PICTURE NEEDED)
3) Using all the default options, hit next a bunch of times until the schema is fixed.
4) Repeat the above for the server\src\Scripts\sql_breezenet_svn folder using a database named BreezeNet instead.
5) Done.
IV. Configuring the client for connection.
1) Go into the build folder, and edit the build/RSBuild.xml file. Remove or comment the 'base' element in the directory.
a) You NEED to do this or RSBuild.exe will crash in the next step.
2) Obtain a copy of Retail WarZ and use this quickBMS script to dump the shaders:
4) Move the folder Data/Shaders/Cache into your own Data/Shaders/Cache. (MAYBE PROVIDE LINK HERE)Code:# War Inc. Battle Zone (script 0.1.1) # script for QuickBMS http://quickbms.aluigi.org getdstring SIGN 4 if SIGN != "arfl" print "you must open only the first file, WO_00.bin" cleanexit endif get VER long get DUMMY long get FILES long get SIZE long get DUMMY long savepos OFFSET comtype unzip_dynamic clog MEMORY_FILE OFFSET SIZE SIZE comtype zlib get PACK_EXT extension get PACK_BASENAME basename string PACK_BASENAME >>= "_" math LAST_PACK = -1 for i = 0 < FILES getdstring NAME 260 MEMORY_FILE get TYPE byte MEMORY_FILE get PACK byte MEMORY_FILE get OFFSET long MEMORY_FILE get SIZE long MEMORY_FILE get ZSIZE long MEMORY_FILE get CRC long MEMORY_FILE getdstring DUMMY 0x12 MEMORY_FILE math PACK += 1 if PACK != LAST_PACK string PACK_NAME p= "%s_%02d.%s" PACK_BASENAME PACK PACK_EXT open FDSE PACK_NAME 1 math LAST_PACK = PACK endif math OFFSET += 4 # arfd if TYPE == 2 clog NAME OFFSET ZSIZE SIZE 1 elif TYPE == 1 log NAME OFFSET SIZE 1 else print "unknown TYPE %TYPE%, contact me" cleanexit endif next i
a) Optionally generate them using studio.
5) 2) Run bin/RSBuild.exe. This step takes at least 5-10 minutes on an SSD, so be warned!
6) Move the built contents of RSBuild in bin/build/data (.bin/xml file) to your webserver under the directory "wz".
7) Run the batch file bin/build/updater/CreateUpdater.bat and generate a launcher. Copy that launcher and woupd.xml to /wz/updater on the webserver.
8) Run the launcher and create an account.
a) Follow this guide to remove the need for serials: http://forum.ragezone.com/f789/remov...erials-923814/
9) Copy the bin folder to your server.
10) Edit game.ini and make it look similar to this:
11) Edit MasterServer.cfg and make it look like this. Change numGames to the number of servers you want to launch.Code:d_walk_speed_scale 5 d_sun_rotate 0 r_near_plane 0.5 r_far_plane 64000 r_cloud_lod_start 9000 r_cloud_lod_end 15000 g_serverip YOURAPIDNSHERE.net g_api_ip YOURAPIDNSHERE.net
12) Edit SupervisorServer.cfg and make it look like this.Code:[MasterServer] masterPort = 34000 clientPort = 34001 masterCCU = 3000 serverId = 1 [WarZGames] numGames = 1 maxPlayers = 64
13) Run MasterServer.exe and SupervisorServer.exe. Then, log in using the client.Code:[SupervisorServer] masterPort=34000 masterIp=IP OF MASTERSERVER serverGroup=1 serverName=WarZGames maxPlayers=1024 maxGames=32 portStart=34010 gameServerExe=WZ_GameServer.exe externalIp=IP OF THIS SERVER uploadLogs=0
You should be able to login and get ingame. Congrats, isn't that easy?
**MODS PLEASE ADD MISSING INFORMATION. THIS GUIDE IS BAREBONES**
Since it's been asked a few times;
You do NOT need my permission to repost this guide, or any other guide by myself on other forums, as long as you do not claim it as your own work. This means you can post it without crediting myself or the link on these forums, but you can not claim that my guide is your own guide.






