Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

WarZ Server Setup Guide || By DeadZ Dev Team

Status
Not open for further replies.
Retired. Don't PM.
Developer
Joined
Jan 5, 2009
Messages
593
Reaction score
741
WarZ Server Setup Guide
Hi, 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)
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.
6) Open up WarZ.sln's tab, and look for 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");
7) While still in client, look for dictionary.txt and change it to look like this:
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);
		}
	}
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.

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:

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
4) Move the folder Data/Shaders/Cache into your own Data/Shaders/Cache. (MAYBE PROVIDE LINK HERE)
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/remove-need-serials-923814/
9) Copy the bin folder to your server.
10) Edit game.ini and make it look similar to this:
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
11) Edit MasterServer.cfg and make it look like this. Change numGames to the number of servers you want to launch.
Code:
[MasterServer]
		masterPort = 34000
		clientPort = 34001
		masterCCU = 3000
		serverId = 1

		[WarZGames]
		numGames = 1
		maxPlayers = 64

12) Edit SupervisorServer.cfg and make it look like this.
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
13) Run MasterServer.exe and SupervisorServer.exe. Then, log in using the client.

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.

 
Last edited:
Initiate Mage
Joined
Mar 21, 2013
Messages
37
Reaction score
14
Oh man, quite a tutorial this is. Thanks - I shall be using it!
 
Initiate Mage
Joined
Apr 12, 2013
Messages
4
Reaction score
0
Now the only thing we need is an Anti Hack to start some nice Private Servers :p
 
Initiate Mage
Joined
Mar 21, 2013
Messages
37
Reaction score
14
Haha, 60 viewing atm. Nice start, not surprised tbh. Getting this copied down with files while they last. :p:
 
Junior Spellweaver
Joined
Mar 18, 2007
Messages
199
Reaction score
37
I can confirm this is 100% working also with the RSBuild and Updater tut thanks guys! Hopefully we can get the loot spawns to work next.
 
Junior Spellweaver
Joined
Apr 11, 2013
Messages
122
Reaction score
9
If anyone has issues setting up their server, please let me know, and I will update the guide.

Thanks so much for the tutorial im not trying to be ungrateful or anything i was just wondering if you could possibly do a video tutorial
 
Initiate Mage
Joined
Mar 31, 2013
Messages
15
Reaction score
0
you can make a video tutorial? i have some questions..

i can run the server on windows 7 64bit? or no?
 
Last edited:
Initiate Mage
Joined
Jan 22, 2006
Messages
8
Reaction score
0
wow very nice dude, will download when i get the chance and use this ^_^ thanks dude
 
Junior Spellweaver
Joined
Mar 18, 2007
Messages
199
Reaction score
37
could i use dropbox to host the files temp? sorry noob
Theres no claim to these server files, host them where you will at your own risk. Also please don't forget to give credit where credit is due!

Sorry we have no say so where you host them or post them*****
 
Initiate Mage
Joined
Apr 11, 2013
Messages
9
Reaction score
1
Theres no claim to these server files, host them where you will at your own risk. Also please don't forget to give credit where credit is due!

Sorry we have no say so where you host them or post them*****
i was simply asking if it was possible and don't worry i will give credit to the people its due to.
thanks.
 
Joined
Oct 28, 2011
Messages
2,465
Reaction score
1,258
No confirmation needed. Those steps are the bare bones and accurate.
Congrats Secrets Nice post

I'd like to add a side not for updates bro.
Please put where they change web addresses* ;)
Really excellent post

I understand your statement bare bones, just letting people know there are still many places in the code that has hard coded information.

Separated this as this part is to the end user, sorry if it read wrong. ;-)
Community members that follow the guide:
Please take some time, get used to your code and you'll have less chance attempting to access a web address or leaving hard coded accounts that need no password in your source code.

Just pointing it out so they don't ask later. :-D
 
Last edited:
Initiate Mage
Joined
Apr 2, 2013
Messages
4
Reaction score
1
Damn, it's required to have a dedicated box for this? I was hoping to just run it in the background of my pc. I'm pretty sure my rig could handle it..,
 
Initiate Mage
Joined
Apr 2, 2013
Messages
4
Reaction score
1
I have plenty of ram. 16gb. But where would i start? Would i need to grab Windows server and run it through a virtualbox or something?
 
Status
Not open for further replies.
Back
Top