How to create your own world of warcraft sever(Windows version)

This guide might be long  but don’t be scared by the procedure because it’s quite simple there will be some steps you will perform for the first time. In this guide we will be using Trinity core to create World Of Warcraft private server. So let’s begin Below you can see which softwares you will need.

 

Software Required

 

PULLING AND COMPILING THE SOURCE

Pulling the Source

  1. Create a directory in which Core files will be pulled (for example: C:\Trinity).
  2. Right-click on the directory and click on Git Extensions -> Clone.
  3. Fill in the data as follows:
Repository to clone: https://github.com/TrinityCore/TrinityCore.git
Destination: C:\Trinity
Subdirectory to create: <none>
Branch: master
Personal Repository: Yes

Click Clone. Within a few minutes all of the TrinityCore source files will be pulled into the directory C:\Trinity.

Configuring and Generating Visual C++ solutions with CMake

Before you begin, create an empty directory called Build. In this example, we will use D:\Build.

1. Open the CMake GUI (default install directory is C:\Program Files (x86)\CMake 2.8\bin).

  • The two top text areas are used to tell where CMake should look for the source tree, and also where to put the build files.

2. Click Browse Source... -> Select the source directory (C:/Trinity)

3. Click Browse Build... -> Select the build directory (D:/Build)

4. Click Configure

 

Step 1

 

Step 2

 

 

Step 3

 

 

Step 4

 

5. Make sure Use default native compilers is checked

6. In the drop-down menu, choose the version of the compiler you downloaded (which version of Visual C++ Express did you install?).

Note: CMake is not a compiler. It merely generates the build files required for the compiler you choose, so choose wisely.

7. Click Finish. CMake will begin chewing through the source code and analyzing the CMakeLists.txt spread all over the source tree.

 

Step 5

 

 

Step 6

 

 

Step 7

 

8. CMake shows you a list of options for selecting different components of the build.

  • Check "Tools". This will compile the map extractors needed later in the setup. NOTE: This is VERY important for you to follow.
  • All other default selections are OK in most cases, however, if your MySQL server version is different than 5.5.x, we strongly recommend to uncheck the USE_MYSQL_SOURCES option. This tells CMake to look for include files and client libraries in your MySQL server installation instead of using the MySQL source files provided with TrinityCore. This also requires that your selected compiler is for the same architecture (32bit or 64bit) as your MySQL Server Community Edition.

9. When your selection is done, click Configure again.

 

Step 8

 

 

Step 9


Here are some useful things to learn about the information in the large white text box at the bottom of the window (your configuration may be slightly different):

  • It detected that we're on a 64-bit platform
  • It detected that we have a proper version of MySQL
  • It detected that we have properly installed OpenSSL libraries/headers

 

10. Click Generate. This will install the selected build files into your D:/Build folder.

 

Step 10

Compiling the Source

  1. Browse into your D:\Build folder and open TrinityCore.sln with Visual C++ Express.
  2. On the menu at the top, click Build and select Configuration Manager.
  • Set Active Solution Configuration to Release
  • Set Active Solution Platform to Win32 (if you set 64-bit compilation during the CMake configuration, select Win64)
    • With Visual C++ 2010, simply use the list menus below the "Help" menu and make the same changes explained above (though it should already be done by default).
  1. Click Build -> Clean Solution.
  • Visual C++ 2010: Right-click ALL_BUILD in the Solution Explorer on the left sidebar and select Clean.
    • Unless you are just testing a compilation, it is always best to clean your build before compiling your new Trinity revision.
  1. Click Build -> Build Solution.
  • Visual C++ 2010: Right-click ALL_BUILD and select Build.
    • Compilation length differs from machine to machine, you should expect it to take 5-30 minutes.
    • If you are asked to Reload build files during the compile, do so.

You will find a similar message once the compilation has finished successfully, remember it's not always the same:

========== Build: 14 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

You will find your freshly compiled binaries in the D:\Build\bin\release folder. These are all used to run your server at the end of this instruction.

You will need the following files in order for the core to function properly. These are located in your D:\Build\bin\release folder:

ACE.dll
libeay32.dll
libmySQL.dll
ssleay32.dll
worldserver.conf.dist
worldserver.exe
authserver.conf.dist
authserver.exe

libeay32.dll, libmySQL.dll, and ssleay32.dll will need to be manually added to this folder, and you need to copy them over from the following installation/bin directories:

  • libmySQL.dll: C:\Program Files\MySQL\MySQL Server 5.x\lib
  • libeay32.dll and ssleay32.dll: C:\OpenSSL-Win32\bin


If this is your first time installing TrinityCore, skip ahead to INSTALLING THE DATABASES

Keeping the Source Up-to-Date

New features of  the core. You can always check them here, or by viewing them from within Git Extensions.

  1. (Beginner) Check the TrinityCore Downloads for a new revision. If your revision is the latest one, you probably don't need to continue. If there is a new revision, download it, and copy the long commit hash of numbers and letters.
  2. Open Git Extensions (default install directory is at C:\Program Files (x86)\GitExtensions).
  3. Open your Trinity repository (click Open Repository and browse to your C:\Trinity source directory.)
  4. Click on the blue "down" arrow at the top of the window called Pull.
  5. Make the following selections: (screenshot)
Example: afb2289d02fa3d7357b36a
  • Pull from Remote: origin
  • Local Branch: master
  • Do not merge, only fetch remote branch
  1. Finally, click the Pull button, and it will fetch all of the new changes to the core.
  • "Fetch" is for visual purposes only - it allows you to see what has been done, and gives you the option of choosing which commit you'd like to update to, like viewing a changelog. Fetch will not modify your current source, so if you're only Fetching, you don't need to recompile, unless you Checkout a different commit (below).
  1. Since you have a new commit hash copied from the TrinityCore Downloads, type CTRL+SHIFT+G to bring up the Go to commit: window (or click on the Commands menu ->Go to commit), and paste the long string of numbers and letters inside (make sure to delete any sneaky spaces you may have copy/pasted along with it, otherwise you'll have a "No Revision Found" error). Then click Go. If done correctly, it should jump up to that commit - the one that contains the newest revision (remember, it will say something similar to "DB: TDB XX: Move SQL updates to the old directory").
  2. Right-click on this commit and select Checkout Revision or Reset current branch to here -> Hard (resetting the branch will revert any changes you made to the C:\Trinity source, but may fix odd compile errors as well). This new commit will now be bold, which identifies a successful update to that revision.
  3. Continue with both Compiling the Source and Keeping the DB up to date


(Advanced) The only difference here is if you choose to update your source to a commit that is NOT a revision. In this case, you MUST also import ALL of the new .sql files that have been created in the C:\Trinity\sql\updates\world folder, if any.

INSTALLING THE DATABASES

About once per month all of the updates made from all previous months are combined into a few bulk .sql files to easily import them into your databases. These updates are similar to how Service Packs are released for Windows. Furthermore, smaller, individual .sql updates are occasionally added as the core is fixed by the developers (these can be seen in Git Extensions while selecting individual commits in the commit view with the Diff tab selected). This offers two options:

  1. (Beginner) It is highly recommended to keep your current revision (the commit in bold text in Git Extensions) on a commit with a description similar to "DB: TrinityDB revision XX: move SQL updates to the old directory" (example). These commit descriptions mark each monthly compilation, and are also useful for knowing when a new compilation is released and can be downloaded/imported. Doing this will keep your databases 100% up-to-date each month.
  2. (Advanced) If you decide to update your revision outside of a commit with the above description, you must also import all of the smaller .sql updates (C:\Trinity\sql\updates folder) that have been done with EACH commit up to yours, if there are any. Not importing these additional updates cause a majority of user errors. This will ensure that your databases are 100% up-to-date.

This is described in more detail in the following instructions.

Downloading the Database

  1. Download the latest database compilation from TrinityCore Github Downloads.
  • The Download Packages at the top are the ones you want. Find the package with the latest date and download it.
    • For example, a file such as TDB_full_335.11.48_2012_07_12.rar tells us three things:
      • TDB: Trinity Database
      • 335.11.48: The version of the database and the client it belongs to. 335 = WoW version 3.3.5, 48 = the 48th full revision.
      • 2012_07_12: The date - July 12th, 2012
      • The file is in .rar format, so you will need an archive program like 7zip to unpack it.

Note: There are multiple .sql files to choose from in the .rar archive. If this is your first time installing TrinityCore, you will want to import the file with "TDB_full" at the beginning. The other files are for updating existing world and characters databases from a previous compilation. This makes it easy to update your databases from one compilation to the next as explained in the section above.

Installing The Trinity Databases

Trinity needs three databases to run - Auth, Characters, and World:

auth - holds account data - usernames, passwords, GM access, realm information, etc.
characters - holds character data - created characters, inventory, bank items, auction house, tickets, etc.
world - holds game-experience content such as NPCs, quests, objects, etc.

Note: The auth database was previously named "realmd". If you are having trouble and searching the forum for solutions, try searching for realmd instead of auth.

The following steps are done using the database management program you installed (ex. HeidiSQL):

  • In HeidiSQL, click on the database you want to use in order to "select" it, then click Tools > Load SQL File... > (select the file) > Run file(s) directly
  • In SQLYog, click on the database you want to use in order to "select" it, then click Database > Import > Execute SQL Script

 

  1. Create the three databases by importing C:\Trinity\sql\create\create_mysql.sql. You now have three databases - auth, characters, and world. You may need to refresh your program in order to see the new databases.
  2. Click on the "auth" database and import the auth database structure by importing C:\Trinity\sql\base\auth_database.sql.
  3. Click on the "characters" database and import the characters database structure by importing C:\Trinity\sql\base\character_database.sql.
  4. Click on the "world" database and import the world database structure by extracting and importing the "TDB_full" .sql file you downloaded from the Downloading the Database section.

Note: If this is your first time installing TrinityCore, continue with SETTING UP THE SERVER

Keeping the DB up to date

Both core and DB fixes will be committed to the TrinityCore repository, which you may also view in Git Extensions by following the "Fetch" instructions in Keeping the Source Up-to-Date. Pending fixes can be found on our tracker with data from the developers and contributors.

As mentioned earlier, it is recommended to stay on the same revision as the TDB_Full database (Beginner). If you choose to brave the wilds beyond the current monthly revision, use the (Advanced) instructions below.

Note: You can run the following query on the World database to see your current DB and core revision:

SELECT * FROM `version`;

This instruction assumes that you have already completed the (Beginner) Keeping the Source Up-to-Date, which means you now have a newly downloaded revision archive from theTrinityCore Downloads. This instruction also assumes that you have completed the initial Downloading the Database which had you import the TDB_FULL.sql, and it is now approximately one month later - a new revision has been released.

Note: If you have made any custom changes to your database, you may wish to backup (export) all three of them (world, characters, and auth) before performing the next few steps.

  • (Beginner)
  1. Extract the TDB_FULL.sql file from the archive and import it into your world database.
  2. If they exist, also import the characters_ and auth_ .sql files into their respective databases.
  3. Once this is finished and you have already compiled your source, you may run the worldserver.exe to load your server. The revision update is complete.

Note: It is at this point that most user errors occur. If your worldserver.exe closes abruptly, make sure that your core's version matches your database version. Check that the `version` table in your world database matches the commit hash listed beside the archive you downloaded at TrinityCore Downloads.

  • (Advanced)

If you update your source beyond a monthly revision, you will likely have additional updates in the C:\Trinity\sql\updates folder. The folders within show which database they need to be imported to. For example, the "world" folder has all of the files that need to be imported to your world DB.

File naming conventions follow simple and consistent rules:

yyyy_mm_dd_id_world_tablename.sql -> World DB    
yyyy_mm_dd_id_character_tablename.sql -> Characters DB    
yyyy_mm_dd_id_auth_tablename.sql -> Auth DB
(yyyy - the year; mm - month; dd - day; id - incremental daily id

Note: The incremental daily id starts at 00, with 00 needing to be imported first, then 01, then 02, etc.

It is imperative to know the date of your previous revision when updating in order to import all of the updates from that revision to your current one. Then, simply follow these steps:

  1. Browse into your C:\Trinity\sql\updates\world folder and import all *_world_*.sql files into your world DB that have a date later than your previous revision.
  2. Do the same above step for the characters and auth folders, if they exist. If these folders don't exist, there have not been any characters or auth database updates.

Note: If you are comfortable with executing batch files, you are welcome to use the batch file located on the Combine SQL Updates thread in the TrinityCore forum to make the importing process easier. Also note that doing this will also gather up .sql files you may have already imported. In most cases this is safe, but you should use this batch file at your own risk.

Pro Tip: If your world database is ever corrupted (ex. creatures or objects are accidentally deleted), it is easy to revert it back to its original state by re-importing the TDB_FULL.sql into your world database. If you updated your core using the (Advanced) instructions, make sure you also re-import all of the necessary C:\Trinity\sql\updates as explained above.

SETTING UP THE SERVER

Now that you have the Source compiled and the Databases installed, you need to set up the server.

Extractors

Trinity requires dbc and map files. It is optional but highly recommended to also extract vmaps, which enable Line-of-Sight rules (casting through walls, etc) and Sanctuary areas (like Dalaran).

WARNING: Use ONLY Trinity's extractors.

If you use extractors from other projects it is almost certain that your TrinityCore will not recognize the extracted data!

There is one way in which you can obtain the extractors. If you compiled them while installing CMake you already have them in your D:\Build\bin\Release\ folder.

Extracting DBC/Maps/VMaps

  1. Browse into your D:\Build\bin\Release\ folder and copy these files into your root World of Warcraft folder: mapextractor.exevmap4extractor.exevmap4assembler.exe, and makevmaps_simple.bat
  • If you do not have makevmaps_simple.bat, create it inside your root World of Warcraft folder.
  • Once created, open it in Notepad and copy/paste the following inside it:
vmap4extractor.exe 
md vmaps 
vmap4assembler.exe Buildings vmaps  
pause
  1. Run your WoW client once (the login screen is enough). You need to do this so that the mapextractor.exe knows where your WoW Client is and where to extract the files from.
  2. Run mapextractor.exe and wait until it is finished.
  3. Move the dbc and maps folders to the location of your TrinityCore worldserver.exe and authserver.exe binaries (D:\Build\bin\Release\).
  4. (Optional, but highly recommended) Run makevmaps_simple.bat. It will create two new folders: buildings and vmaps. The buildings folder is completely useless and can be safely deleted.
  • Move the vmaps folder to the same directory as dbcmaps, and the TrinityCore binaries.

Note: Extracting vmaps will take a while depending on your machine (30 min - 2 hours). Do not attempt to stop this process. It is finished when it prints "Press any key...".

CONFIGURING THE SERVER

  1. Browse into your D:\Build\bin\Release\ folder and delete the .dist extensions from worldserver.conf.dist and authserver.conf.dist. You should now have worldserver.confand authserver.conf files in your D:\Build\bin\Release\ folder.
  2. Open worldserver.conf

worldserver.conf

  • Scroll down to the LoginDatabaseInfo, WorldDatabaseInfo, and CharacterDatabaseInfo config options and enter MySQL Server login information for the server to be able to connect to your database.
  • Either use the same root username and password you used when you installed MySQL Server Community Edition (not safe - not recommended if the server is public), or create a new login with the User Manager settings in your chosen database management tool (commonly identified by an icon that looks like a person or people) and give it necessary permissions (SELECT, INSERT, UPDATE, DELETE permissions are sufficient, and is much safer).
  • The hostname (127.0.0.1) can stay the same if Trinity is being installed on the same computer that you run WoW on. Otherwise, follow the instruction in Realmlist Table if this is not the case.
  • All other default options should be sufficient, but it is recommended that you take some time after your server is finished to read through the configs and see all the ways to customize your server.
  • IMPORTANT - If you choose NOT to use vmaps, you must edit the following in the worldserver.conf or your server will not start:
LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth"     
WorldDatabaseInfo = "127.0.0.1;3306;trinity;trinity;world"     
CharacterDatabaseInfo = "127.0.0.1;3306;trinity;trinity;characters"
  • vmap.enableLOS = 1 -- set this to 0
  • vmap.enableHeight = 1 -- set this to 0
  • vmap.petLOS = 1 -- set this to 0
  • vmap.enableIndoorCheck = 1 -- set this to 0

Note: If you change your mind and decide to extract and use vmaps later, make sure to change these values back to "1" to take advantage of them.

Pro Tip: For most settings, you can simply type ".reload config" in-game to see changes instantly without restarting the server.

authserver.conf

  • Scroll down to the LoginDatabaseInfo and enter MySQL Server login information.
LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth"

Realmlist Table

You need to make sure that authserver.exe directs incoming connections to your realm.

  1. Run your chosen database management tool (ex. SQLYog or HeidiSQL)
  2. Open the auth database and find the realmlist table. You need to edit the address field according to your needs:
  • 127.0.0.1 -- Also known as "localhost". Leave this setting alone here and in your configs if you've installed TrinityCore on the same computer you run WoW on, and only you are connecting to it.
  • LAN IP (192.168.x.x)-- If you are installing TrinityCore on a different computer from where you run WoW, but all the computers involved are on the same network (router) use that computer's Local Area Network IP.
  • External IP -- If you want other people to connect to your server, use your external IP. Visit http://www.whatismyip.com/ to find your external IP address.

Warning: The TrinityCore Team and Owners DO NOT in any case sponsor nor support illegal public servers. If you use these projects to run an illegal public server and not for testing and learning it is your own personal choice.

RUNNING & CONNECTING TO YOUR SERVER

After completing all the steps listed above you can now start your server.

  1. Run the authserver.exe and worldserver.exe to run your server. Both must stay running for your server to accept connections to it.

Tip: The authserver allows you to enter your username/password to connect to the Realm Selection screen, and the worldserver allows you to connect to the realm itself. Once you are in-game, and assuming no one else will need to connect to your server, you can safely close the authserver if you wish.

  1. Open the realmlist.wtf file inside your World of Warcraft\Data folder. The IP in the realmlist.wtf file should be exactly the same as the IP address you entered in the realmlist table above.
  • Change the first line to: set realmlist <IP address used in realmlist table> Example: set realmlist 127.0.0.1
  • (Optional) If you wish to use the WoW Launcher.exe to run your client then you must change your set patchlist to the same ip/dns name as your realmlist.

Final Steps

You can type commands inside the worldserver program, similar to a command prompt.

  1. Type account create <user> <pass>. Example: account create test test
  2. Type account set gmlevel <user> 3 -1. Example: account set gmlevel test 3 -1
  • The "3" is the GM account level (higher numbers = more access), and the "-1" is the realm ID that stands for "all realms".

Tip: Open the world database in your database management tool and find the command table. This table shows a full list of GM commands, their descriptions, and the security (GM level) needed to use them. You will not find a more accurate list of current GM commands anywhere else (assuming you keep your database up-to-date). The security level for a given command identifies that THAT GM level can use the command, along with all GM levels above it.

  1. Minimize your authserver and worldserver and run WoW.exe (never run WoW using the Launcher unless you edited the realmlist.wtf's patchlist option above).
  2. Log in using the user/pass you just created (test/test)
  3. The Trinity realm should be selectable. Log in, create a character, and you're all done!

 

Our Social Crowd

Find Us on Pinterest Follow Me on Pinterest

Google Translator

Ping your blog, website, or RSS feed for Free