World of Warcraft TrinityCore Server Guide ‘Windows’

No Image

World of Warcraft being one of the most popular MMORPG’s caught the attention of the independent developers. Lot of emulators have been developed to host private World of Warcraft Servers, with an active support by independent developers by thousands of developers. That said, our first in the series of guides on World of Warcraft, gets to be, how you can create World of Warcraft Private Server using Trinity Core, one the most stable wow emulator.

INTRODUCTION

Before you get started,I want you to know that this guide is very simple and easy to follow. Most of the steps are to be performed only the first time you install Trinity and only the Trinity updating procedures will be required to run after that.

What You Need
1. Tortoise HG
2. VisualStudio
3. MySQL Server
4. .NET Framework 3.5
5. MySQL GUI Tools

Obtaining/Pulling and Compiling The Source
1. Download and Install Tortoise HG.
2. Download and Install Visual Studio.

Note: Before you start this phase you need to have installed Tortoise HG and Visual Studio.

Pulling the SourceInstalling The Core Files

Step 1
Create a directory in which Core files will be obtained(for example: C:\Trinity).

Step 2
Right-click on the directory and click on ‘TortoiseHG’ -> ‘Clone a Repository’.

Step 3
Fill in the data as follows:

  • Source Path: https://trinitycore.googlecode.com/hg/trinitycore
  • Destination Path: C:\Trinity

Step 4
Click on ‘clone’. Wait for few minutes (or less) and all the files will be pulled in the directory C:\Trinity.

All the core files by now have been installed to the directory specified, “C:\Trinity”.

Compiling the Source
When you are done with pulling, compiling comes next, its easy as compared to installing all the core files.

Step 1
Open the solution file C:\Trinity\win\TrinityCore&Script VC90.sln (VS 2008).

Step 2
Go on the top menu click  ‘Build’ and click on Configuration Manager. Make sure you set the build to ‘release Win32′ or ‘release x64′ depending on the Operating System Trinity will be running on.

Step 3
Now go back to the ‘Build’ menu and click on ‘Clean Solution’. Unless you are just testing a compilation, it is always best to clean your build before compiling your new Trinity revision.
Compilation length differs from machine to machine, you should expect it to take 15-30 minutes.
You will find the following message once the compilation has finished successfully.
========== Build: 10 completed, 0 failed, 0 up-to-date, 0 skipped ==========
You will find your freshly compiled binaries in the C:\Trinity\bin folder.

Step 4
Keep the following files:

  • ACE.dll
  • libeay32.dll
  • libmySQL.dll
  • README
  • README.AHBOT
  • ssleay32.dll
  • TrinityCore.conf.dist
  • TrinityCore.exe
  • TrinityRealm.conf.dist
  • TrinityRealm.exe

Delete any other file which is not in the above list, you will not need them.

Note: Keep the AuctionhouseBot readme files, they will come in handy in future once you are comfortable with Trinity and want to try some of its many advanced features.

How to Keep the Trinity Updated
TrinityCore Developers are always at work, fixing and adding new features to the core. You can always check them here or by using the Tortoise HG View Change log option.

Step 1
Right-click on your C:\Trinity folder and click on ‘TortoiseHG’ -> ‘Synchronize’.

Step 2
Click on the button ‘pull’ at top of the window and it will start pulling the new/updated files.

Step 3
Once it is finished click on ‘Update to Branch Tip’ at the bottom of the window and you are done! Now you can repeat the compiling procedure above.

Note: It is always best to remove the binaries from the C:\Trinity\bin folder every time you compile a new revision (and remember to clean your build).

Install  The Databases
Before you start this phase you need to have installed Tortoise HG, MySQL Server, and MySQL GUI Tools.

Pulling the SourceInstalling The Database Files

Step 1
Create a directory in which DB files will be pulled (for example: C:\TDB).

Step 2
Right-click on the Create a directory in which DB files will be pulled (for example: C:\TDB).

Step 3
Right-click on the directory and click on ‘TortoiseHG’ -> ‘Clone a Repository’.
Fill in the data as follows.
directory and click on ‘TortoiseHG’ -> ‘Clone a Repository’.
Fill in the data as follows:

  • Source Path: https://trinitydb.googlecode.com/hg
  • Destination Path: C:\TDB

Step 4
Click on ‘clone’. Wait a few minutes (or less) and all the files will be pulled in the directory C:\TDB.

Installing MySQL Server
When configuring MySQL make sure you remember the password you set for the default root account and that you enabled both MyISAM and InnoDB engines.
You can leave all the other settings as default. You might want to enable remote access to your MySQL server. If your are also testing a website for your Trinity server or if you have friends testing with you, who need access remotely.

Note: Remember that this will decrease the security level of your MySQL server.

Installing The Trinity Databases

  • realmd – holds accounts data.
  • characters – holds characters data.
  • world – holds game-experience content such as spawns, stats, quests, etc.

The first two are to be taken from the Core directory, the world DB is to be taken from the TDB directory.
1. Create the three databases by importing C:\Trinity\sql\create_mysql.sql. Note: You now have three databases called realmd, characters and world.
2. Import realmd database structure by importing C:\Trinity\sql\realmd.sql in the realmd DB.
3. Import characters database structure by importing C:\Trinity\sql\characters.sql in the characters DB.
4. Unzip C:\TDB\full_db\TDB_333.9.29_7924.zip and import world DB structure and contents by importing TDB_333.9.29_7924.sql in the world DB.
5. Import in the world DB the following files in this precise order:

  • C:\TDB\updates\333.9\30_01_corepatch_world_7925_8307.sql
  • C:\TDB\updates\333.9\30_02_procedures_world.sql
  • C:\TDB\updates\333.9\30_03_updatepack_world.sql

6. Import all *.sql update files from C\Trinity\sql\updates which start with a number above ‘8307’ so that your DB structure is up to date with the revision you just pulled and compiled.

Note: Now your world DB structure is for TrinityCore revision 8307. You need to import the update files to have the proper world DB structure for the revision you just pulled and compiled. You will notice they are all named XXXX_world_tablename.sql or XXXX_characters_tablename.sql or XXXX_realmd_tablename.sql, and you need to import the *_world_*.sql files only.

  • XXXX_world_tablename.sql -> World DB
  • XXXX_characters_tablename.sql -> Characters DB
  • XXXX_realmd_tablename.sql -> Realm DB

How to Keep the DB Up to Date
TDB Developers are always at work fixing and adding new data to the DB. Unlike Core development, DB updatepacks come more on a 1-2 times a month basis with many fixes, you can check the status of these updates from here and a lot of new data from the Developers and contributors.

Step 1
Simply right-click on your C:\TDB folder and click on ‘TortoiseHG’ -> ‘Synchronize’.

Step 2

Click on the button ‘pull’ at top of the window and it will start pulling the new updatepack.

Step 3
Once it is finished click on ‘Update to Branch Tip’ at the bottom of the window and you are done.

Now you can repeat the compiling procedure above.

How to Setup World of Warcraft Private Server
Now that you have the Source compiled and the Databases installed, you need to set up World of Warcraft server.

1. Extract dbc, maps and vmaps files
In order to run, Trinity needs dbc and maps files. In addition, if you want to enable vmaps (mobs not seeing through walls, etc) you will need to extract them as well.
Warning: Use Trinity’s extractors. If you use extractors from other projects it is almost certain that your Trinity Core will not recognize the extracted data.

dbc and maps files

Step 1
Find the application C:\Trinity\contrib\extractor\ad.exe and place it in your WoW Client directory.

Step 2
Before running this application, run your Client once (the login screen is enough). You need to do this so that the ‘ad.exe’ knows where your Client is and where to extract the files from.

Step 3
Now you can run ‘ad.exe’ and you will find two directories in your WoW Client called ‘dbc’ and ‘maps’.

Step 4
Move them where your Trinity binaries are (C:\Trinity\bin\Win32_release or C:\Trinity\bin\x64_release).

vmaps (Optional)
You can also extract vmaps which will take quite a while depending on your machine (1-2 hours).

Step 1
Copy all files from C:\Trinity\contrib\vmap_extract_assembler_bin\ to where all your binaries, dbc dir and maps dir are.

Step 2
Run makevmaps_SIMPLE.bat. It will take a long time. It will first create a directory called ‘buildings’. Then it will start extracting files to the directory ‘vmaps’.

Note:You will not see any progress in the application’s window or anything else. You will just notice files being created in the ‘vmaps’ folder as it is proceeding. Do not stop the process, it will ask to “press any key” to terminate the program when it is finished.

How to Configure World of Warcraft Server

Step 1
First of all you need to change the extension of TrinityCore.conf.dist -> TrinityCore.conf and TrinityRealm.conf.dist -> TrinityRealm.conf (make sure you enabled “show known files extensions” in the Windows folder option).

Now you can edit them.

Step 2 | TrinityCore.conf
Edit MySQL account username and password (instead of trinity;trinity).

  • LoginDatabaseInfo = “127.0.0.1;3306;trinity;trinity;realmd”
  • WorldDatabaseInfo = “127.0.0.1;3306;trinity;trinity;world”
  • CharacterDatabaseInfo = “127.0.0.1;3306;trinity;trinity;characters”

If you extracted vmaps then edit the following:

  • vmap.enableLOS = 1 — set this to 1
  • vmap.enableHeight = 1 — set this to 1
  • vmap.ignoreMapIds = “369”
  • vmap.ignoreSpellIds = “7720”
  • vmap.petLOS = 1 — set this to 1

Step 3 | TrinityRealm.conf
Edit MySQL account username and password (instead of trinity;trinity).

  • LoginDatabaseInfo = “127.0.0.1;3306;trinity;trinity;realmd”

Realmlist table
You need to make sure that TrinityRealm.exe directs incoming connections to your realm. In the realmd DB there is a table called realmlist. You need to edit the field address according to your needs:

  • 127.0.0.1 – Leave default localhost if you are connecting alone from the same machine Trinity runs on.
  • LAN IP – Use the machine’s LAN ip if you want other computers from the same network as Trinity’s to connect to your server.
  • Public IP – Use your public ip if you have friends and testers which need to connect your server from the internet.

FAQS
This section aims to cover frequent errors encountered by users during installation or basic configuration. Mostly, these are procedures already presented in the installation guide. Feel free to improve this section.

1# I have followed the install guide thoroughly, installed and compiled the core and the databases. When I run trinitycore.exe a window flashes and nothing else happens

  • First, if you are under Windows, try starting the program from a console window, so that you can see the error messages shown. Also, you’ve always got the error logs normally located in the same folder as the executable.
  • Make sure you have the config files “trinitycore.conf” and “trinityrealm.conf” in the right place and properly configured. If it is a fresh install, don’t forget to remove the additional extension “.dist” from these files names.
  • Check if the SQL server is running. If it is installed in the same machine, you may check if something like “mysqld.exe” is running.

2# When I run trinitycore.exe, I get an error stating that maps or data are missing

  • Make sure you put the files extracted using ad.exe and makevmaps into the data folder set in trinitycore.conf, normally “c:\trinity\data” (and its subfolders). Double-check the configuration file.

3# I get some errors regarding the DBC stores

  • Before running ad.exe, run your Client once (the login screen is enough), and make sure it is from the same version that is supported by the core. You need to do this so that the ‘ad.exe’ knows where your Client is and where to extract the files from. When ad is running, have attention in its output to make sure it has got the right Client (especially if you have more than one copy of WoW in you machine).

4# When the core is loading the database, I get lots of errors

  • If you are using the supported database, TDB, and have installed it correctly, normally you are not supposed to see error messages during the loading. Double-check database install.

5# Why so many database install files?

  • “Corepatch” files, as well as sqls in “sql/updates” folder, contains database updates to support core changes. When a new TDB updatepack is released, files contained in the updates folder are merged and inserted into corepatches, as well as moved to the old updates folders. “Updatepacks” contains new additions and corrections from the database project.

6# I get errors when applying a corepatch sql

  • If you are updating from a revision between two updatepack revisions, some modifications contained in the corepatch dump may have already been applied to your database, and will give error messages when tried to be upgraded again. New updates are still applied, so don’t worry. You may check the error messages from mysql or its frontend for safety.

7# I can connect the server from the same machine it is hosted, but my friends can’t do it from other computers

  • Edit your realm IP, contained in the table “realmlist” inside the DB “realmd” (or the name chosen for it) and set it with your LAN address to alow access from your network, or your external ip to allow access over the internet.

Disclaimer: The TrinityCore Development Team and Owners, the TrinityDB Team and Owners, SegmentNext and the writer of this article 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.

By Afnan Mir

We've got a lot of guides and FAQs here, and you can thank Afnan for providing many of them. It's him who does the research and assembles our FAQs before we can publish them.

Latest Posts

Around The Network
    • fatemeh

      Hello.i done this guild
      all things are ok
      but when i run server.there is some bug there
      for example no one can damage sindragosa ice tomb .
      or lichking portal is close
      how can i fix this bug?
      where is the problem exactly?

    • saulius

      C:\Trinity\.hg\store\data\win is the path – its wrong path. there is no files that you v=can compile

    • saulius

      There is big crap with this guides …. People who posting this in forums is doing this to get rep+ or somethink. But they forgetting to tell you that is freaking COPY-PASTE stuff. And what makes it even worse that they freaking doing copy-paste wrong … Here is original main instalation guide from where these kiddos have copied it and screw it up

      http://www.trinitycore.info/index.php?title=Howto_win_tc2

      • kathy

        That link says “This page has been deleted. The deletion and move log for the page are provided below for reference.

        18:16, 29 December 2010 Nay (Talk | contribs) moved Howto win tc2 to How-to:Win [redirect suppressed] “

    • Chris kairon

      Im trying this out, but it won’t work for me. I am on the step “Compiling the source” step 1 i guess. I couldn’t find it in the directory you said it would be in, but i found the file in C:\Trinity\.hg\store\data\win\TrinityCore&Script VC90.sln (used search) and i tried opening it, and i tried opening it in the 2010 express edition, and 2008 visual studio. I can’t really figure out what you are talking about with “build”
      I figured that i was somehow supposed to open it with the solution browser, and it didn’t show up.
      I then tried closing everything, and opening up the sln file in “open project/solution” because you said to open the solution “XXXX (too lazy to put it in again)”
      Well, i got to the file location, and no files showed up, only the “B_T_S_C”
      V_c71-V_c100 folders.

      What am i doing wrong? Email me at kairotox@gmail.com

    • Puds

      As above, nice guide, well written, however….like the others it isn’t pulling the same files/folders you mentioned.

      There is no “win” folder, I have created a trinity folder, have re-cloned, used the dos command you mentioned, still no win folder.

      • Murder

        ok im no expert, hell im absolutely a beginner. but i did some snooping and i found the win folder. C:\Trinity\.hg\store\data\win is the path. that will take you to the win folder then the file is right there

    • Marink

      I get error while on the step with mysql
      COLLATE utf8_general_ci;
      [Err] 1007 – Can’t create database ‘characters'; database exists
      [Err] CREATE DATABASE `characters` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
      [Err] 1007 – Can’t create database ‘realmd'; database exists
      [Err] CREATE DATABASE `realmd` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
      [Msg] Finished – Unsuccessfully

    • Waleed

      seems geart but i got same problem after sept 3 when i m on step 4 there is no folder name “win” created in my trinity folder after the clone is done .. so cant lunch TrinityCore&Script VC90.sln for next step any help?

    • tom

      Mkay, guide seems great, but… after pulling core(making repository clone), when i’m at Step 4.. somehow, there’s not /win under Trinity, nor there r any .sln files in whole C://Trinity, what have i done wrong? And yes, boht tortoise and visual studio are installed before pulling core files.

      • Raza

        You need to create folder named trinity or what ever name u like.
        (c:/Trinity)= example.

    • Pingback: World Of Warcraft TrinityCore Linux Private Server Guide | SegmentNext()