Complete guide to Compile and run your Trinity core 3.X.X server.
First before we get started, Id like to tell everyone what ports they have to forward in order for everything to run smoothly.
3784
3306
3724
8085
8129
80
3307
To find out how to forward your ports, use PortForward.com - Port Forwarding Guides Listed by Manufacturer and Model
Now we can start, we are going to need a few programs.
1. * TortoiseHG-tortoisehg / stable / wiki / download — bitbucket.org
* TortoiseSVN-TortoiseSVN | The coolest Interface to (Sub)Version Control
* Visual Studio 2008 -Visual C++ 2008 Express Edition
* Xampp- apache friends - xampp for windows
* .NET Framework 3.5 (you should already have it via your Windows updates)-(google is your friend)
* SQLYog-(trial version, requires shot forum fillout)-Download
Please make sure all the downloads listed are ready for use, and downloaded correctly, before going on further.
-------Getting the source-------
Create a folder on your desktop, name it Trinitycore. Then right click it, click TortoiseHG Clone a Repository, Fill in the following code
Code:
Source Path: http://dev.trinitycore.org/trinitycore2/
Destination Path: (where ever your trinitycore file is located)
This will take a few minutes to complete.
-------Compiling the Source-------
Go to you C++ visual studio, go to the menu open up \win\TrinityCore&Script VC90.sln
Go on the top menu '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.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: 11 completed, 0 failed, 0 up-to-date, 0 skipped
-------Keeping your DB up to the current patch-------
Just click on your TrinityCore folder , and click 'TortoiseHG' -> 'SynchronizeClick on the button 'pull' at top of the window and it will start pulling the new/updated files. 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.
-------installing the DB-------
Here we are going to use the very own DB from trinity core, which is called TDB,
Create a folder, name it TDB, then right click, and click on SVN CHECKOUT, fill in the code -->
Code:
URL of Repository: http://svn.assembla.com/svn/trinitydatabase
Checkout Directory: (where ever your TDB file is located.
Click on 'ok'. Wait a few minutes (or less) and all the files will be pulled in the directory
-------Db install-------
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. 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\trunk\full_db\TDB_0.0.5_5254.zip and import world DB structure and contents by importing TDB_0.0.5_5254.sql in the world DB.
5) Import C:\TDB\trunk\updates\21_corepatch_world_5255_6376.sql.
6) Import C:\TDB\trunk\updates\21_updatepack_world.sql.
7) Import all *.sql update files from C\Trinity\sql\updates which start with a number above '6376' so that your DB structure is up to date with the revision you just pulled and compiled.
Import all files from C:\Trinity\sql\FULL directory in any order.
Note: Now your world DB structure is for TrinityCore2 revision 6376. 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.sql or XXXX_characters.sql or XXXX_realmd.sql, and you need to import the *_world_*.sql files only!
--------Setting up the server--------
Now that you have the Source compiled and the Databases installed, you need to set up the server.
Extracting 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.
dbc and maps files
Find the application C:\Trinity\contrib\extractor\ad.exe and place it in your WoW Client directory. 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.
Now you can run 'ad.exe' and you will find two directories in your WoW Client called 'dbc' and 'maps'. 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).
Copy all files from C:\Trinity\contrib\vmap_extract_assembler_bin\ to where all your binaries, dbc dir and maps dir are. 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'.
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.
Configuring the Server
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). Then you can edit them.
TrinityCore.conf
Edit MySQL account username and password (instead of trinity;trinity).
Code:
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"
TrinityRealm.conf
Edit MySQL account username and password (instead of trinity;tirnity)
Code:
LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;realmd"
If you extracted vmaps then edit the following
Code:
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
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:
Code:
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.
Now for xampp
type local host in your browser, and go into phpmyadmin, then create your own user. This allows you to name the data base in Mysql what ever you want, and also use what ever password, when you create a host, make sure it's set to Local host.
If you have any problems please feel free to ask, if enough people comment this, and need a guide to get your server live, please say so. I'll make another guide.
CREDITS---->Razorwolfgaming, Trinitycore.