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!

Mangos How To Make a MaNGOS Server Easily (Windows)

Junior Spellweaver
Joined
Jun 13, 2008
Messages
169
Reaction score
27
are you using a 32 bit or 64 bit operating system?

if your using 64 bit you need to get Visual Studio (not Express).
 
Lord of the Legion
Joined
Jul 28, 2005
Messages
426
Reaction score
35
If he's running a 64-bit OS, he can just compile the server in 32-bit rather than downloading VS2010.

But yeah, Express can't do 64-bit as far as I know. If you compile the server in 32-bit, it should compile.
 
Initiate Mage
Joined
Jan 2, 2010
Messages
29
Reaction score
0
I have a problem...

When I try to Compile
I get alot of Skipped files...

[Picture]

Can you please help me?

EDIT: Solved!
 
Lord of the Legion
Joined
Jul 28, 2005
Messages
426
Reaction score
35
Post the entire error log output at and post the link here so I can see what the problem is.
 
Initiate Mage
Joined
Feb 23, 2012
Messages
1
Reaction score
0
Cheers mate

A lot of guides I've read contain a whole lot of useless or overly technical information. This is not needed in any way shape or form. So here is a better guide. How to properly and easily download, compile and setup a MaNGOS server of any version using UDB, ScriptDev2 and SD2-ACID.

Why compile your own server? This way you know it is absolutely up-to-date, contains no malicious crap from little kiddies screwing around and will actually work.

Needed Tools
A subversion client (I'll be using )


(I'll explain the installation later)
An SQL DB editor (I'll be using ).

Downloading MaNGOS
Once you've installed all the programs mentioned in the above section, needed tools. Go ahead and open up GIT Bash (Not GIT GUI). First we need to change the directory. Type cd /c to change it's working directory to the root of your C: drive, otherwise it will download to God knows where (Seriously, I don't know where). Now we can download the latest MaNGOS. Type git clone git://github.com/mangos/mangos.git mangos. Let it finish and close GIT Bash. Your server should now be located in C:\mangos.

Downloading ScriptDev2
Make a new folder somewhere. It doesn't matter where. Open the folder and right click again and click SVN Checkout. In the field that says URL of Repository, type in https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2. Let it finish and click OK.

Compiling MaNGOS
Open C:\mangos\win\. Open mangosdVC100.sln in Visual Studio Express C++ 2010. Once it loads, go to Build>Configuration Manager now change the Active solution configuration to Release and the Active solution platform to x64 and click Close. Now go to Build>Rebuild Solution. It will seem like it's doing nothing if you do not have the Output window enabled (Ctrl+Alt+O). It will take a while to compile.

Compiling ScriptDev2
STOP. Do not do continue until MaNGOS has finished compiling. If you continue on, your server will not work.

Once MaNGOS has finished compiling, copy the your ScriptDev2 folder you downloaded to C:\mangos\src\bindings. This step is pretty much the same at compiling the core. Open scriptVC100.sln. Go to Build>Configuration Manager now change the Active solution configuration to Release and the Active solution platform to x64 and click Close. Now go to Build>Rebuild Solution. This will also take a little while.

Setting Up MYSQL
This part is relatively easy. Install MYSQL, when it asks you about setting up an instance. Go to Standard Configuration then click Next. Make sure Include Bin Directory in Windows PATH is unchecked. Click Next. Set up your password. It doesn't matter what it is. Most people use root as their password and click Next and let it set itself up.

Setting up the Database
Open Navicat. Go to Connection>MYSQL. Type anything for Connection Name. Type localhost for Host Name/IP Address and 3306 for Port. Type root for User Name (MYSQL uses root for the root user) and whatever your password is. Click OK and connect to the SQL server over in the sidebar by double clicking the connection. Click on User and go to New User. For User Name type mangos, localhost for Host and mangos for the Password and click Save. Now your MaNGOS server can, by default settings, properly connect to the SQL server.

Creating Databases
Now right click on your SQL connection in the sidebar and click Execute SQL file and browse to C:\mangos\sql\. Open mangos.sql and click Start. Let it finish and click Close. Repeat that step with characters.sql and realmd.sql. Now we need to set up ScriptDev2's database. Do the same as before but browse to C:\mangos\src\bindings\scriptdev2\sql\ and open scriptdev2_create_database.sql, execute it and then run scriptdev2_create_structure.sql.

Populating Databases
Now that we have our databases set up. We need to populate them. There are different ways we can do this but I prefer my server being Blizz-like so I use the UDB database. Download this . You'll need the browse to /trunk/Full_DB/ and download the zip file there. Extract it. Open up Navicat and right click your mangos database (Not the connection) and go to Execute SQL File. Browse to the database we just downloaded and extracted and click Start. This will take a while to finish. Now we need to include ScriptDev2's mangos database. Once again right click on the mangos DB and go to Execute SQL File and browse to C:\mangos\src\bindings\scriptdev2\sql\ and execute mangos_scriptname_full.sql.

Now comes the most annoying part it my opinion. We need to update the databases. In Navicat, open up the mangos database and go to Tables and open the db_version table. The last field should say something like required_blahblah. Remember what it says. Now right click the database and click Execute SQL File and browse to C:\mangos\sql\updates\ find that file name that we needed to remember (Make sure names are assorted ascending), execute the next file. Make sure the next file says mangos and not realmd or character. Then execute the next file and so on and so forth until you are at the latest file. Look for the same table in both realmd and characters and do the same. Usually you wont need to update characters or realmd. Note if you do not do these steps, the server will not work.

Downloading & Installing SD2-ACID
STOP. Do not do continue until you have finished populating your mangos database with UDB and ScriptDev2. If you continue on, your server will not work.

Make a folder anywhere, right click and click SVN Checkout and type https://sd2-acid.svn.sourceforge.net/svnroot/sd2-acid/ and click OK to download ACID. Once it finishes downloading, open Navicat and right click on your mangos database and click Execute SQL File, browse to \trunk\wotlk\ in the folder we just downloaded ACID to and open the latest numbered folder and execute the SQL file within.

Extracting DBC, Maps & VMaps
Browse to C:\mangos\contrib\extractor\release\ and copy ad.exe to your root World of Warcraft installation folder. Then go to c:\mangos\contrib\vmap_extract_assembler_bin\ and copy over all the files. Run ad.exe and makevmaps_SIMPLE.bat. Let them finish, it will take a while. Once done, go to C:\mangos\bin\x64_release\ and make a new folder called Data. Copy the folders dbc, maps and vmaps from your World of Warcraft folder into there.

If ad.exe or the 3 files in \contrib\vmap_extract_assembler_bin\ are not there, scroll down to the Compiling Tools section to learn how to compile them.

Configuring Your Server
Browse to \src\mangos\ and copy mangosd.conf.dist.in to \bin\x64_Release\ do the same with realmd.conf.dist.in in \src\realmd\ and scriptdev2.conf.dist.in in \src\bindings\scriptdev2\. Remove the .dist.in from the file names. Now open mangosd.conf, scroll down to DataDir = and type "./Data". Scroll down to BindIP = and type "127.0.0.1". LoginDatabaseInfo, WorldDatabaseInfo and CharacterDatabaseInfo should be correct by default if you followed this guide correctly.

You can also customize your server by editing values in mangosd.conf. Every value is explained within the configuration file. Most tutorials explain changes you need to make in the file, fortunately for you, if you followed this guide, you don't need to change anything as we set up the server so, by default settings, we would need to change very little.

Setting Up Your Client
Make sure first you have the proper version of World of Warcraft installed. Now go to \World of Warcraft\Data\enUS\ and open realmlist.wtf in Notepad and change set realmlist and set patchlist to 127.0.0.1.

If you need to update your copy of World of Warcraft, I suggest looking for the patches you need at .

Starting Your Server
Go to \bin\x64_Release\ and start realmd.exe and mangosd.exe. If it automatically closes, look for a file in that folder named Server.log (If mangosd.exe closed) or Realmd.log (If realmd.exe closed), read what happened. If you cannot figure out the problem, PM me and I will tell you what to do. If they did not close, wait till you hear mangosd.exe make a beep sound. This means it has finished starting.

You can now start World of Warcraft and log in with the username and password administrator

Compiling Tools
This section is only if ad.exe and 3 files in \contrib\vmap_extract_assembler_bin\ were not there. Go to \contrib\extractor\ and open VC100_AD.sln and go to Build>Rebuild Solution. Once it's finished, ad.exe should be in \extractor\release\. Now go to \contrib\vmap_assembler\ and open vmap_assemblerVC100.sln, rebuild it and do the same with vmapExtractor3_VC100.sln in \contrib\vmap_extractor_v3\win\. Copy the files we just compiled to your World of Warcraft folder and also copy over makevmaps_SIMPLE.bat from \contrib\vmap_extract_assembler_bin\. Now if makevmaps_SIMPLE.bat is not there, create a notepad document, open it and copy the following:

Code:
vmapExtractor3.exe
md vmaps
vmap_assembler.exe buildings vmaps

pause

Save and close it. Change the extension from .txt to .bat and move it to your World of Warcraft folder. Now you can extract the vmaps, dbc and maps.

Additional poop
If I left out anything, please feel free to tell me. If you need help, PM me, I will do my best to help you but for the love of God, please use proper grammar. I hate deciphering what people say when they use broken English or teen texting lingo.

This guide can easily be also used for compiling and setting up non-MaNGOS servers, since setting up most servers is relatively the same.

If you require compiling a 32-bit server, follow the guide but when you compile ScriptDev2 and the MaNGOS core just leave the Active solution configuration and Active solution platform at Win32. This will also change the directory of your compiled binaries. They would be in \mangos\bin\Win32_Release\.

If you are importing a very large database using Navicat, you may run into a problem where the execution gets stuck at like 70 commands, that's cause Navicat sucks at executing large queries. Here's a simple workaround:

Make a copy of the SQL file you need to execute and put it in C:\Program Files\MySQL\MySQL Server X.X\bin\ (Replace X.X with whatever version folder is in there). Press Win+R to open the Command Prompt and type CD C:\Program Files\MySQL\MySQL Server X.X\bin\ (Replace X.X with whatever version folder is in there) then type mysql -u root -p database_name < FileToExecute.sql, it'll prompt you to enter your MySQL server password (By default it's "root"). It'll only take a couple of seconds this way.


Now that's what I call a Ducking guide.
 
Initiate Mage
Joined
Aug 7, 2012
Messages
2
Reaction score
0
First of all thank you for that awesome guide, it's the best one i could find and thanks to you my 2.4.3 server is now working (not quite yet as it should, but it works).
My Problem is that some mobs don't cast any spells, (well ok some actually do, but if they do the wow client crashes).
Secondly my serverlog lists dozens of errors like
2012-08-07 16:45:15 Loading CreatureEventAI Scripts...
2012-08-07 16:45:15 ERROR:CreatureEventAI: Event 224002 Action 2 param1 references non-existing entry (-47) in texts table.
2012-08-07 16:45:15 ERROR:CreatureEventAI: Event 224104 Action 2 param1 references non-existing entry (-47) in texts table.
would be really grateful if you could help me out. thanks
 
Last edited:
Lord of the Legion
Joined
Jul 28, 2005
Messages
426
Reaction score
35
You're welcome. Those errors are because either the team that works on creature AI either made some mistakes or are working on scripting those creatures but haven't finished yet.

As long as most creatures cast spells, if some don't, that's because the AI team haven't scripted those creatures yet.
 
Initiate Mage
Joined
Aug 29, 2012
Messages
2
Reaction score
0
Hi,
I have followed the guide and get stuck on starting mangosd.exe. It seems like the DB version not matched. The log look like this:
Connected to MySQL database mangos@127.0.0.1:3306/mangos
MySQL client library: 5.1.49
MySQL server ver: 5.5.25
AUTOCOMMIT SUCCESSFULLY SET TO 1
[0 ms] SQL: SET NAMES `utf8`
[0 ms] SQL: SET CHARACTER SET `utf8`
SQL: SELECT required_12141_02_mangos_mangos_command FROM db_version LIMIT 1
query ERROR: Unknown column 'required_12141_02_mangos_mangos_command' in 'field
list'
[0 ms] SQL: SELECT * FROM db_version LIMIT 1
The table `db_version` in your [WORLD] database indicates that this database is
out of date!

[A] You have: --> `11785_01_mangos_instance_encounters.sql`

You need: --> `12141_02_mangos_mangos_command.sql`

You must apply all updates after [A] to to use mangos with this database.
These updates are included in the sql/updates folder.
Please read the included [README] in sql/updates for instructions on updating.


In table db_version the latest field is "11785_01_mangos_instance_encounters.sql". And I can find three sql files releate to 12141_xxx in the "sql/updates":
12141_01_characters_character_currencies.sql
12141_01_mangos_command.sql
12141_02_mangos_mangos_string.sql
What shold I do? Any help will be appreciate.
 
Initiate Mage
Joined
Aug 29, 2012
Messages
2
Reaction score
0
Hi,
I have followed the guide and get stuck on starting mangosd.exe. It seems like the DB version not matched. The log look like this:
Connected to MySQL database mangos@127.0.0.1:3306/mangos
MySQL client library: 5.1.49
MySQL server ver: 5.5.25
AUTOCOMMIT SUCCESSFULLY SET TO 1
[0 ms] SQL: SET NAMES `utf8`
[0 ms] SQL: SET CHARACTER SET `utf8`
SQL: SELECT required_12141_02_mangos_mangos_command FROM db_version LIMIT 1
query ERROR: Unknown column 'required_12141_02_mangos_mangos_command' in 'field
list'
[0 ms] SQL: SELECT * FROM db_version LIMIT 1
The table `db_version` in your [WORLD] database indicates that this database is
out of date!

[A] You have: --> `11785_01_mangos_instance_encounters.sql`

You need: --> `12141_02_mangos_mangos_command.sql`

You must apply all updates after [A] to to use mangos with this database.
These updates are included in the sql/updates folder.
Please read the included [README] in sql/updates for instructions on updating.


In table db_version the latest field is "11785_01_mangos_instance_encounters.sql". And I can find three sql files releate to 12141_xxx in the "sql/updates":
12141_01_characters_character_currencies.sql
12141_01_mangos_command.sql
12141_02_mangos_mangos_string.sql
What shold I do? Any help will be appreciate.


Sorry, It is my mistake. I only execute one update sql.The guide is clear:
Then execute the next file and so on and so forth until you are at the latest file.
 
Initiate Mage
Joined
Nov 4, 2012
Messages
2
Reaction score
0
"Repository not found" when using git bash to download mangos on step one. Any help would be great thanks
 
Lord of the Legion
Joined
Jul 28, 2005
Messages
426
Reaction score
35
"Repository not found" when using git bash to download mangos on step one. Any help would be great thanks

Use this GIT repo git://github.com/mangos-wotlk/server.git

MaNGOS moved around their GIT repos. I also fixed the URL in the tutorial.
 
Last edited:
Initiate Mage
Joined
Nov 4, 2012
Messages
2
Reaction score
0
Use this GIT repo git://github.com/mangos-wotlk/server.git

MaNGOS moved around their GIT repos. I also fixed the URL in the tutorial.

Thanks for your speedy reply
Been Compiling mangos and when finished
" 1 Successful , 0 failed , 11 skipped.

Is this normal ?

This took seconds to finish this is why I'm Querying , thank
 
Lord of the Legion
Joined
Jul 28, 2005
Messages
426
Reaction score
35
No, that's not normal, you probably have some files set to not compile in the Configuration Manager. I'm too busy right now to check what should and should not be compiled but I will try to get back to you by tonight with what should be set to compile.
 
Lord of the Legion
Joined
Jul 28, 2005
Messages
426
Reaction score
35
For a standard release server, the following should be set to compile:

ACE_Wrappers
Detour
Framework
G3DLite
Game
GenRevision
Mangosd
Realmd
Shared
TBB
TBBMalLoc
ZLib
 
Initiate Mage
Joined
Nov 12, 2012
Messages
3
Reaction score
0
Just want to say thx's for the guide!! Got server up and running, was unable to compile in 64bit though even with Microsoft sdk tools. Most likely something to do with the way I installed it all.

It's all running fine if I play the client on same pc but I get the realm loop problem if I try and log in from another location. Any ideas??
 
Lord of the Legion
Joined
Jul 28, 2005
Messages
426
Reaction score
35
Check the IP you have for the server in the realmlist table. If it's a different IP from the one you used in your configs, change it to the one in the configs.
 
Initiate Mage
Joined
Nov 12, 2012
Messages
3
Reaction score
0
Hi darkicon,

I'm still having issues with getting this server public. Basically what I would like to achieve is: myself being able to log on from same computer and my brothers to be able to log on from parents house. I have tried various guides with no success, a lot of them have conflicting information in them to start with. If you could tell me what ip's need changing and which ports I need to open. It would be a massive help. I can't believe how frustrating this has been. I know I'm missing something simple.

Thank you for all your help

Mael
 
Lord of the Legion
Joined
Jul 28, 2005
Messages
426
Reaction score
35
I suppose it could be a port issue. Try opening TCP ports 3306, 3724 and 3443. The IP you should be using in both the config and the realmlist table is your external IP (Go to ).

Hopefully that fixes it the issue.
 
Back
Top