Trinitycore Series World of Warcraft Trinitycore 3.3.5 (24011) version building for dummies
本文最后更新于 293 天前,其中的信息可能已经有所发展或是发生改变,如有失效可到评论区留言。

Environment selection

The specific environment to be deployed depends on your choice. You can use win or linux. Since my server is installed with PVE virtual machine 7.4 (based on debian 11), I will use the latest debian 12 to build it.

Since the latest TC 3.3.5 version is 24011, I will use this version:
https://github.com/TrinityCore/TrinityCore/releases/tag/TDB335.24011
image.png

Preparation: Before the formal installation, make sure you have completed the system initialization work, including the installation of the Debian 12 system (virtual machine, physical machine, LXC are all fine, I am using LXC now), the relevant configuration of the root user's permissions (depending on personal habits, including allowing the root user name to log in, installing and allowing ssh password login, etc., of course, using the key login is safer), IP address configuration, etc., replacement of apt domestic sources, etc.

Start building

Assuming that the above steps have been completed, we will formally enter the construction step:

Install compilation tools, associated libraries and mysql database

# routine, update data source apt-get update # installs the tool apt that is needed for compilation later-get install git clang cmake make gcc g++
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang 100
#boostDependencies are as follows
apt-get install -y libboost-dev\libboost-system-dev\libboost-filesystem-dev\libboost-program-options-dev\libboost-iostreams-dev
# zlibIn zlib1g-dev
apt-get install zlib1g-dev
# openssl
apt-get install libssl-dev 
# readline
apt-get install libreadline-dev apt install libbz2-dev apt install mysql-common libmariadb-dev-compat libmariadb-dev apt install mariadb-client mariadb-server

Note 1: The above commands may not be the same for different versions of Debian or Ubuntu. The system I installed was the newly released version of Debian 12. If you use a different version later, the default libraries will be different, so you may need to make fine adjustments based on your actual environment.
Note 2: Another question is whether the device where TC is deployed should be powered on all the time, because another issue involved later is that the account registration website needs to write a database. If the device where the database is installed needs to be powered off, the registration website cannot be used when it is powered off. This is also a problem I encountered. I first migrated the database to a virtual machine, and then migrated it to another device dedicated to running containers. The data was transferred back and forth, which was very frustrating. If you need to build an account registration website in the future, you should plan to find a 24-hour powered device to serve as the database at the beginning. Of course, if it is a cloud server, there will be no such problem. It is a bit troublesome for me to use my own server because of the loud noise and power consumption. It must be turned on and off regularly.

Create wow user

Use root account to operate

adduser wow

Agreement Directory

# Execute su wow cd with wow privileges

In order to facilitate subsequent operations, give priority to creating the following three directories

# TrinityCore source code directory mkdir /home/wow/TrinityCore # Server program directory, which will contain three subdirectories, etc, bin, and data after completion mkdir /home/wow/server3.3.5 # Client directory. It will be used to store the client version and extract the client data mkdir /home/wow/client12340

注:因为最开始我是参考了CSDN博主”开始沸腾了”的文章( https://blog.csdn.net/fanrongwoaini/article/details/113864338 , thanks for his good article), and only found out that he had made a mistake when I finished writing the article. . But the pictures have been taken and cannot be changed (I only took a few pictures in the middle again, but most of them are old pictures taken in the previous version) ~ I am a person who pays great attention to naming standards, and I strictly require others to follow them in the project. This problem makes me feel uncomfortable (although it doesn’t really affect me, but my obsessive-compulsive disorder is really uncomfortable). . It’s really: one misstep leads to eternal regret. Anyway, don’t pay attention to this mistake in the screenshot. . . , I have changed the command to 3.3.5.

S-side source code download:

image.png

If GitHub is not accessible, you can also visit the following link to download:Unrivaled file sharing,访问密码为:”blog.tangwudi.com“,下载其中的”TDB335.24011.zip”文件,然后上传到/home/wow/TrinityCoreDirectory, if you can access GitHub, you can also download it by following the command below:

cd /home/wow/TrinityCore wget https://github.com/TrinityCore/TrinityCore/archive/refs/tags/TDB335.24011.zip #unzip TDB335.24011.zip

Note: This is the latest version when I installed it. When you build it yourself later, please check the latest version at that time first, and change the relevant version number in the command in the article (24011 in the article) to the latest version. Of course, there may be different errors when running cmake in the new version. The previous version 23061 only had the first error, and this time 20411 has the next error. This needs to be solved by yourself. I can only try to remake the fool's book for each version.

Download on C-end

Client version: 3.3.5 (13930 or 12340), I use 12340.
The following is the download link of my client Baidu network disk:
https://pan.baidu.com/s/1O0cAfuWe6B4S1faNhK04UA?pwd=6ah9

cmake

su wow cd /home/wow/TrinityCore/TrinityCore-TDB335.24011 mkdir build cd build cmake ../ -DCMAKE_INSTALL_PREFIX=/home/wow/server3.3.5 # Build project

image.png

If you encounter this error, you need to edit the genrev.cmake file:

vim /home/wow/TrinityCore/TrinityCore-TDB335.24011/cmake/genrev.cmake

在116行红框部分加上””:
image.png

as follows:

image.png

Then save and exit.

Then there is the following error:

image.png

这是因为缺少”boost_locale”这个包,所以我们需要安装这个包,先查看哪些包含boost-locale的包:

apt search boost-locale

The following results are displayed:

image.png

Then we install the missing packages:

sudo apt-get install libboost-dev sudo apt install libboost-locale1.74-dev #Here you may need to make fine adjustments according to your current version

Re-run cmake

cd /home/wow/TrinityCore/TrinityCore-TDB335.24011/build cmake ../ -DCMAKE_INSTALL_PREFIX=/home/wow/server3.3.5

success:

Compile

make -j $(nproc) install

After successful compilation:
image.png

ls /home/wow/server3.3.5

image.png

These two directories, bin contains executable files, and etc contains configuration files.
image.png

The authserver under bin is the authentication program, worldserver is the main program of World of Warcraft, and the other four are map extraction programs, which will be used later.
image.png

Under etc are two configuration file templates, which are needed to be read by the two programs mentioned above and will be used later.

Map data loading

Create a data directory

Used to store map data

mkdir /home/wow/server3.3.5/data

Modify the configuration file

Bundleworldserver.conf.distandauthserver.conf.distCopy each one and remove the suffix **.dist**

cp /home/wow/server3.3.5/etc/worldserver.conf.dist /home/wow/server3.3.5/etc/worldserver.conf cp /home/wow/server3.3.5/etc/authserver.conf.dist /home /wow/server3.3.5/etc/authserver.conf

Note: There are many game options in TC's worldserver.conf. I will write an article to introduce them when I have time. Before that, you can search online. There are a lot of articles introducing them.

Exporting map data from the client

Copy the downloaded client to the client directory /home/wow/client12340 specified above and enter the directory
cd /home/wow/client12340/wow-3.5.5
Note that if you are decompressing a zip archive, you need to enter the actual directory where you decompressed it. For example, I entered

cd /home/wow/client12340/wow-3.5.5

image.png

Run the following command to extract the client data. This process is a bit slow, please be patient.

  • DBC and Maps files
/home/wow/server3.3.5/bin/mapextractor

image.png

image.png

cp -r dbc maps /home/wow/server3.3.5/data
  • Visual Maps (aka vmaps)
/home/wow/server3.3.5/bin/vmap4extractor

image.png

mkdir vmaps /home/wow/server3.3.5/bin/vmap4assembler Buildings vmaps

image.png

cp -r vmaps /home/wow/server3.3.5/data
  • Movement Maps (aka mmaps)
mkdir mmaps /home/wow/server3.3.5/bin/mmaps_generator

image.png

cp -r mmaps /home/wow/server3.3.5/data cd /home/wow/server3.3.5/data ls

image.png

Database Configuration

cd /home/wow/TrinityCore/TrinityCore-TDB335.24011/sql/create/

image.pngThe file in the red box is what we are going to use.

Then use the mysql command to connect to the mariadb database to initialize it:

mysql -u root -p -h 127.0.0.1 # If the port number is not the default 3306, use the -P parameter followed by the port number.

Note: If the mariadb database and Trinitycore are on the same machine, use 127.0.0.1 to connect. However, if the database is separate, like me, I use a separate macmini to run the database, such as 192.168.10.130 in the figure below, so you can deploy the database according to your own plan:
image.png

show databases; 

You can view the current default database

image.png

By default there are 4 databases.
Then execute the create_mysql.sql file mentioned above to initialize the database required by wow:

source /home/wow/TrinityCore/TrinityCore-TDB335.24011/sql/create/create_mysql.sql

image.png

show databases;

image.png

You can see that there are three more databases: auth, characters, and world. auth stores usernames and passwords, characters stores information about game characters, and world stores all other information needed for the game, such as NPCs, dungeons, bosses, etc.

Then initialize the two databases, auth and characters, and create the required tables:

use auth; source /home/wow/TrinityCore/TrinityCore-TDB335.24011/sql/base/auth_database.sql use characters; source /home/wow/TrinityCore/TrinityCore-TDB335.24011/sql/base/characters_database.sql

The world table is generated later.

Configure the connection
There are many tables in the auth database, one of which is very important, realmlist, which contains the port and address listened by the worldserver main program, as well as the game version id, etc. Here you need to see whether you just want to play at home, or put it on the Internet (private network or public network) for everyone to play together. Different settings are different for different needs.

The following command is to view the specific contents of id, name, port, address, etc. in the realmlist table in the auth database, which also involves the way of playing later.

use auth; select id,name,port,address,localaddress,gamebuild from realmlist;

image.png

The port determines the port that the worldserver main program listens on. You don't need to change it, just use the default. The important thing is the address. Generally speaking, if the database and the main program are installed on the same server, then this address can be set to the interface address of this server (for LAN), but if it is published on the Internet, then the address setting here is very important. If it is a purchased cloud server with a fixed public network address, then it can be directly set to the public network address here, of course, you can also use the domain name corresponding to the public network IP. If it is set up on the intranet, the public network address is on the export device, and a mapping is done, then this should be set to the public network address on the export device, or the corresponding domain name.
There are many ways to modify it, such as phpadmin, or other database clients. Because I put it on the public Internet, I have to change it to my domain name here. gmaebuild is the client version, and only this version of the client can access it normally.

use auth;UPDATE realmlist SET address = '[your_ip]' WHERE id = 1

After modification, it is as follows:
image.png

Editing the Configuration File

Configure the configuration file corresponding to authserver, specifying the database address, port, and account:

vim /home/wow/server3.3.5/etc/authserver.conf

Try to use the default values for ports and addresses. The following are the key points
LoginDatabaseInfo = “127.0.0.1;3306;trinity;trinity;auth”
If you are playing on the local machine, for example, running the server on Windows, and then playing the client on the same machine, you don't need to change this, but if the database and the server program are not on the same host, you need to modify this. For example, I changed it to the IP address of the database in the LAN 192.168.10.130, port 3306:

image.png

At the same time, everyone should pay attention that trinity is the account created when using create_mysql.sql. This account has only the permission to access the localhost host by default, so if you play alone, there is no problem. However, if the database and the server main program are not on the same server, you need to modify the remote access permission of the trinity user, trinity@localhost, to trinity@%, or create trinity@% and authorize all permissions for the auth, characters, and world databases. I will not go into details about the specific operations involving the database, as that would be too long, so please study it yourself.

vim /home/wow/server3.3.5/etc/worldserver.conf

DataDir = “.”
这里””里的.改成数据路径说在的文件夹:

DataDir = "/home/wow/server3.3.5/data

image.png

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"

These three are processed the same as the previous authserver.conf, modify the IP address according to your needs:
image.png

Start the server

Run authserver first

/home/wow/server3.3.5/bin/authserver

image.png

Note: The following error is very tricky. If you use mariadb in previous versions, you will get this error. I searched a lot on foreign forums and saw a great reply that suggested using mysql, because TC and mariadb are easy to get this error. The most important thing is that when apt installed mysql, the default db was replaced from mysql to mariadb. This wasted a lot of my time. I had to reinstall mysql and recompile it. It was a real bummer. Fortunately, since I installed the 23061 version now, it supports the latest mariadb, so you don't have to bother with it.
202309070102175.png

Run worldserver again

/home/wow/server3.3.5/bin/worldserver

202309070104592.png

Remember that we only initialized the auth and characters databases? The world database is not initialized and is empty, so this error occurs here.
Then, download according to the address prompted later:

cd /home/wow/server3.3.5/bin/ wget https://github.com/TrinityCore/TrinityCore/releases/download/TDB335.24011/TDB_full_world_335.24011_2024_01_21.7z

Note: If GitHub is not accessible, you can also visit the following link to download:Unrivaled file sharing,访问密码为:”blog.tangwudi.com“,下载其中的”TDB_full_world_335.24011_2024_01_21.7z”文件,然后上传到/home/wow/server3.3.5/bin/Directory.
Install 7zip:

apt-get install p7zip-full

unzip:

7z x TDB_full_world_335.24011_2024_01_21.7z

Run worldserver again:

./worldserver

image.png

At this time, the world database is being generated, just wait:
image.png

success.

Login to the world

Add Account

Here I created an account with the username wow1 and password wow1, and upgraded it to GM level.

Create an account

First, create a wow account and enter the worldserver command line as follows:

TC> account create wow1 wow1 TC> Account created: wow1

Upgrade to GM

You can raise the gmlevel of wow1 to 3 and upgrade to a GM account. Enter the worldserver command line as follows:
Next we upgraded the wow1 account to gm

TC> account set gmlevel wow1 3 -1 TC> Security level of account WOW1 changed to 3.

Client Configuration

Open the client directory, find wow.exe, and createinit_connect.bat, the content is as follows.

echo SET realmlist "wlk.example.com" > Data\zhTW\realmlist.wtf echo SET realmlist "wlk.example.com" > Data\enTW\realmlist.wtf echo SET realmlist "wlk.example.com" > Data\zhCN\realmlist.wtf echo SET realmlist "wlk.example.com" > Data\enCN\realmlist.wtf echo SET realmlist "wlk.example.com" > Data\enUS\realmlist.wtf echo SET realmlist "wlk.example.com" > realmlist.wtf start Wow.exe

Then, run the script. At this point, the initialization client connection configuration is successful and you can log in to the game. In the future, you can directly run wow.exe to log in to the game.

If you want to start authserver and worldserver at boot, you can refer to my other article:3 common ways to set up commands or scripts for Debian series to start at boot.

For more information on how to build a high-end registration website to assist with user registration, please refer to my other article:Trinitycore Series Deployment World of Warcraft Trinitycore 3.3.5 Registration Website

I'll tell you a secret here. In fact, you can connect to my public welfare server directly by running wow.exe from the client downloaded from Baidu Netdisk. If you are lazy, you can just play directly.:), but you need to register an account on my registration website first, the URL link is as follows:Invincible Azeroth.

Afterword

In fact, if you just want to set it up for fun, it is very simple. Just install the database and server-side software on a host (such as a cloud host). However, I had more and more requirements later, and many applications used the same mariadb database, so I created a separate database and imported the original data there. Anyway, it was a lot of trouble. So I suggest that you think about it from the beginning. If this database is only used for wow, it is okay to install it on one device. If you have other plans later, it is recommended to separate them from the beginning to avoid trouble later. And if you have more ideas, such as adding npcbots (see my other article:Trinitycore series 3.3.5 (24011) version adds npcbots robots), it is recommended that you learn some common database operations, after all, there will be a lot of database operations involved later.

另:其实我本来不太想写这篇文章的,毕竟博主”开始沸腾了”的文章写得很好,但是trinitycore升级了2次小版本了,特别是他那个时候trinitycore的版本22061默认的数据库是mysql,但是在下一个版本23061的时候就变成mariadb了,改变非常大,而且安装细节也变了很多,我不得不重新记录,所以才写了这篇文章,一般对于优秀的文章我是不会费精力来重写的。

The content of the blog is original. Please indicate the source when reprinting! For more blog articles, you can go toSitemapUnderstand. The RSS address of the blog is:https://blog.tangwudi.com/feed, welcome to subscribe; if necessary, you can joinTelegram GroupDiscuss the problem together.

Comments

  1. ruomi
    Windows Chrome 130.0.0.0
    3 months ago
    2024-11-04 21:31:57

    I want to ask how much server configuration is needed if it only accommodates a small group of 100 people.

    • Owner
      ruomi
      Macintosh Chrome 130.0.0.0
      3 months ago
      2024-11-04 23:12:28

      We still need to consider several hundred people, but 100 people are not a lot. I think any mainstream computer will be fine. For Win, 16GB of memory will definitely be enough; for Linux host, 8GB of memory is probably enough, but I don't know if 4GB of memory will work.

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠(ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ°Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
Emoticons
Emoji
Little Dinosaur
flower!
Previous
Next
       
error:
en_US
Spring Festival
hapiness