TrinityCore笔记
准备工作
在群晖的Virtual Machine Manager
里创建新的虚拟机
在Debian官网下载镜像(https://www.debian.org/distrib/)
建议内存4GB/硬盘40GB
服务器安装
最好先安装lnmp
之前的工作看这里
- LNMP安装笔记
接着做环境准备下载3.3.5源码
1
2
3
4$ sudo apt-get update
$ sudo apt-get install git clang cmake make gcc g++ libmariadbclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev libboost-all-dev p7zip-full
$ sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
$ sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang 100配置1
2$ cd ~/
$ git clone -b 3.3.5 git://github.com/TrinityCore/TrinityCore.git1
$ sudo cmake ../ -DCMAKE_INSTALL_PREFIX=/home/wow/server
- DTOOLS=0 是不编译地图提取工具的选项
编译后续可以拉取git代码更新1
2$ sudo make
$ sudo make install1
2$ cd ~/TrinityCore/
$ git pull origin 3.3.5服务器设置
上传客户端到~/wow_client
提取DBC和Maps提取vmaps(可选)1
2
3
4$ cd ~/wow_client/
$ /home/wow/server/bin/mapextractor
$ mkdir /home/wow/server/data
$ cp -r dbc maps /home/wow/server/data提取mmaps(可选,我用了6个多小时)1
2
3
4
5$ cd ~/wow_client/
$ /home/wow/server/bin/vmap4extractor
$ mkdir vmaps
$ /home/wow/server/bin/vmap4assembler Buildings vmaps
$ cp -r vmaps /home/wow/server/data拷贝配置文件1
2
3
4$ cd ~/wow_client/
$ mkdir mmaps
$ /home/wow/server/bin/mmaps_generator
$ cp -r mmaps /home/wow/server/data编辑worldserver.conf1
2
3$ cd ~/server/etc/
$ cp worldserver.conf.dist worldserver.conf
$ cp authserver.conf.dist authserver.conf还有数据库配置(帐号wow,密码trinity)1
DataDir = "../data"
编辑authserver.conf1
2
3LoginDatabaseInfo = "127.0.0.1;3306;wow;trinity;auth" #worldserver.conf
WorldDatabaseInfo = "127.0.0.1;3306;wow;trinity;world" #worldserver.conf
CharacterDatabaseInfo = "127.0.0.1;3306;wow;trinity;characters" #worldserver.conf1
LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth"
安装数据库
这三个数据库的说明如下1
2
3
4
5
6CREATE DATABASE `world` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DATABASE `characters` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DATABASE `auth` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON `world` . * TO 'wow'@'localhost' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON `characters` . * TO 'wow'@'localhost' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON `auth` . * TO 'wow'@'localhost' WITH GRANT OPTION;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
hotfixes (master only) - holds fixes not already added to the core or other official databases.
下载最新的数据库文件(https://github.com/TrinityCore/TrinityCore/releases)
把它放在server/bin
目录下
1 | $ cd ~/server/bin/ |
执行结束,数据库导入完成
配置修改
修改本机客户端文件\Data\zhCN\realmlist.wtf
,改为服务器地址
1 | set realmlist xxx.xxx.xxx.xxx |
修改数据库auth
表realmlist
name
是服务器名称address
是服务器地址gamebuild
是客户端版本号(客户端启动时左下角可见)
测试
启动服务器
1 | $ cd ~/server/bin/ |
创建帐号并设置为gm(3级权限)
1 | account create user password |
如果要和朋友一起玩,就映射一个域名上去
frp映射好本地服务器的3724
和8085
端口
frp服务器开对应的防火墙端口即可
gm指令请惠存
(https://trinitycore.atlassian.net/wiki/spaces/tc/pages/2130065/GM+Commands)
优秀插件
(https://rochet2.github.io/downloads/)
引用
https://trinitycore.atlassian.net/wiki/spaces/tc/pages/2130077/Installation+Guide