servers:linux:games:trinitycore_3.3.5_localhost
Table of Contents
Information
- These notes provide a local singleplayer server for World of Warcraft 3.3.5 on Linux
- For a traditional dedicated server see these notes
- 2024/10/28: Clang, Mold (linker), MariaDB
Media
Resources
Prerequisites
Dependencies
sudo dnf install bzip2-devel gcc-c++ clang cmake git-core boost boost-devel readline-devel zlib-ng-compat-devel openssl-devel mariadb-devel
Mold Linker
- Can be verified with readelf
sudo dnf install 'mold'
sudo update-alternatives --config 'ld'
ls -la '/etc/alternatives/ld'
Download Source
cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/trinity-335/src' && git clone --branch '3.3.5' --depth '1' --recurse-submodules 'https://github.com/TrinityCore/TrinityCore.git' ~/'Projects/trinity-335/src' && sync
Databases
mariadb -u 'root' -p
CREATE DATABASE authserver;
CREATE DATABASE characters;
CREATE DATABASE worldserver;
CREATE USER 'authserver'@'localhost' IDENTIFIED BY 'x';
CREATE USER 'characters'@'localhost' IDENTIFIED BY 'x';
CREATE USER 'worldserver'@'localhost' IDENTIFIED BY 'x';
GRANT ALL PRIVILEGES ON authserver.* to 'authserver'@'localhost';
GRANT ALL PRIVILEGES ON characters.* to 'characters'@'localhost';
GRANT ALL PRIVILEGES ON worldserver.* to 'worldserver'@'localhost';
FLUSH PRIVILEGES;
EXIT
Initial Compile
rm -Rf ~/'Projects/trinity-335/build' ~/'Projects/trinity-335/run' && mkdir -p ~/'Projects/trinity-335/build' ~/'Projects/trinity-335/run' && cd ~/'Projects/trinity-335/build' && cmake ~/'Projects/trinity-335/src' -DCMAKE_INSTALL_PREFIX=~/'Projects/trinity-335/run' -DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++' -DCMAKE_BUILD_TYPE='Release' -DWITHOUT_METRICS='1' -DTOOLS='1' && sync && make --jobs=$(nproc) install && sync
Update
git -C ~/'Projects/trinity-335/src' pull origin '3.3.5' && cd ~/'Projects/trinity-335/build' && cmake ~/'Projects/trinity-335/src' -DCMAKE_INSTALL_PREFIX=~/'Projects/trinity-335/run' -DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++' -DCMAKE_BUILD_TYPE='Release' -DWITHOUT_METRICS='1' -DTOOLS='1' && sync && make --jobs=$(nproc) install && cp -v --remove-destination ~/'Projects/trinity-335/run/etc/authserver.conf.dist' ~/'Projects/trinity-335/run/etc/authserver.conf' && cp -v --remove-destination ~/'Projects/trinity-335/run/etc/worldserver.conf.dist' ~/'Projects/trinity-335/run/etc/worldserver.conf' && sync
Clean Compile
rm -Rf ~/'Projects/trinity-335/build' && mkdir -p ~/'Projects/trinity-335/build'
Content
- Expects World of Warcraft 3.3.5
DBCs, Maps, and Cameras
- Sizes 3)
cp --force ~/'Projects/trinity-335/run/bin/mapextractor' ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && cd ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && rm -Rf 'dbc' 'maps' 'Cameras' && ./'mapextractor' -f '0' && sync
VMaps
Extract
cp --force ~/'Projects/trinity-335/run/bin/vmap4extractor' ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && cd ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && rm -Rf 'Buildings' && ./'vmap4extractor' -l && sync
Assemble
- Size 4)
cp --force ~/'Projects/trinity-335/run/bin/vmap4assembler' ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && cd ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && rm -Rf 'vmaps' && mkdir -p 'vmaps' && ./'vmap4assembler' 'Buildings' 'vmaps' && sync
MMaps
- Size 5)
- Takes 30+ minutes on i5-8400H
cp --force ~/'Projects/trinity-335/run/bin/mmaps_generator' ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && cd ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && rm -Rf 'mmaps' && mkdir -p 'mmaps' && ./'mmaps_generator' --bigBaseUnit 'true' --threads $(nproc) && sync
Move Files
cd ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && mv --force 'dbc' 'maps' 'Cameras' 'vmaps' 'mmaps' ~/'Projects/trinity-335/run/bin' && rm -f 'mapextractor' 'vmap4extractor' 'vmap4assembler' 'mmaps_generator' && cd ~ && sync
Check Files
~/Projects/trinity-335/run/bin
needsCameras
,dbc
,maps
,mmaps
, andvmaps
folders
ls --directory ~/'Projects/trinity-335/run/bin/dbc' ~/'Projects/trinity-335/run/bin/maps' ~/'Projects/trinity-335/run/bin/Cameras' ~/'Projects/trinity-335/run/bin/vmaps' ~/'Projects/trinity-335/run/bin/mmaps'
gio open ~/'Projects/trinity-335/run/bin/'
Clean-up
cd ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && rm -Rf 'Buildings' 'mapextractor' 'vmap4extractor' 'vmap4assembler' 'mmaps_generator' 'WoWDL.lnk' && cd ~ && sync
gio open ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/'
World Database
TDB
- Download the latest
TDB 335
.7z
with a web browser
- Expects something like
TDB_full_world_335.24081_2024_08_17.7z
in~/Downloads
rm -Rf ~/'Projects/trinity-335/run/bin/TDB_full_world_335.'*'.sql' && cd ~/'Projects/trinity-335/run/bin' && 7za x ~/'Downloads/TDB_full_world_335.'*'.7z' && cd ~
Settings
authserver
- Last commit: Jul 28, 2021
68bf7e6
cp ~/'Projects/trinity-335/run/etc/authserver.conf.dist' ~/'Projects/trinity-335/run/etc/authserver.conf'
mkdir -p ~/'Projects/trinity-335/authserver.conf.d' && nano ~/'Projects/trinity-335/authserver.conf.d/localhost-authserver.conf'
[authserver] # Connection BindIP = "127.0.0.1" LoginDatabaseInfo = ".;/var/lib/mysql/mysql.sock;authserver;x;authserver" AllowLoggingIPAddressesInDatabase = 0 # Etc RealmsStateUpdateDelay = 0 Updates.EnableDatabases = 1 Updates.CleanDeadRefMaxCount = -1 # End
worldserver
- Last commit: Feb 16, 2023
e11613e
cp ~/'Projects/trinity-335/run/etc/worldserver.conf.dist' ~/'Projects/trinity-335/run/etc/worldserver.conf'
mkdir -p ~/'Projects/trinity-335/worldserver.conf.d' && nano ~/'Projects/trinity-335/worldserver.conf.d/localhost-worldserver.conf'
[worldserver] # Connection BindIP = "127.0.0.1" LoginDatabaseInfo = ".;/var/lib/mysql/mysql.sock;authserver;x;authserver" WorldDatabaseInfo = ".;/var/lib/mysql/mysql.sock;worldserver;x;worldserver" CharacterDatabaseInfo = ".;/var/lib/mysql/mysql.sock;characters;x;characters" AllowLoggingIPAddressesInDatabase = 0 # Server HotSwap.Enabled = 0 HotSwap.EnableReCompiler = 0 FlashAtStart = 0 Server.LoginInfo = 1 Motd = "Welcome to your localhost server!" AllowTickets = 0 Updates.CleanDeadRefMaxCount = -1 # Quests Quests.LowLevelHideDiff = -1 Quests.HighLevelHideDiff = -1 # Character GM.LoginState = 0 CharDelete.Method = 1 CharDelete.KeepDays = 0 # Protections MaxOverspeedPings = 0 PacketSpoof.Policy = 0 ChatFakeMessagePreventing = 0 ChatFlood.MessageCount = 0 # End
Launch
- 2 separate Terminal windows
cd ~/'Projects/trinity-335/run/bin' && ~/'Projects/trinity-335/run/bin/authserver' --config-dir ~/'Projects/trinity-335/authserver.conf.d'
cd ~/'Projects/trinity-335/run/bin' && ~/'Projects/trinity-335/run/bin/worldserver' --config-dir ~/'Projects/trinity-335/worldserver.conf.d'
Create GM Account
worldserver
- Change
x
to password
account create Espionage724 x
account set gmlevel Espionage724 3 -1
server shutdown 1
Scripts
Server Start
mkdir -p ~/'Projects/trinity-335/scripts' && nano ~/'Projects/trinity-335/scripts/tc-335-server-start.sh' && chmod +x ~/'Projects/trinity-335/scripts/tc-335-server-start.sh'
#!/bin/bash cd ~/'Projects/trinity-335/run/bin' ptyxis --standalone --title='WoW 3.3.5 localhost authserver — ' -- ~/'Projects/trinity-335/run/bin/authserver' --config-dir ~/'Projects/trinity-335/authserver.conf.d' & ptyxis --standalone --title='WoW 3.3.5 localhost worldserver — ' -- ~/'Projects/trinity-335/run/bin/worldserver' --config-dir ~/'Projects/trinity-335/worldserver.conf.d' # End
~/'Projects/trinity-335/scripts/tc-335-server-start.sh'
Update
mkdir -p ~/'Projects/trinity-335/scripts' && nano ~/'Projects/trinity-335/scripts/tc-335-server-update.sh' && chmod +x ~/'Projects/trinity-335/scripts/tc-335-server-update.sh'
#!/bin/bash git -C ~/'Projects/trinity-335/src' pull origin '3.3.5' cd ~/'Projects/trinity-335/build' cmake ~/'Projects/trinity-335/src' -DCMAKE_INSTALL_PREFIX=~/'Projects/trinity-335/run' -DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++' -DCMAKE_BUILD_TYPE='Release' -DWITHOUT_METRICS='1' -DTOOLS='1' make --jobs=$(nproc) install cp -v --remove-destination ~/'Projects/trinity-335/run/etc/authserver.conf.dist' ~/'Projects/trinity-335/run/etc/authserver.conf' cp -v --remove-destination ~/'Projects/trinity-335/run/etc/worldserver.conf.dist' ~/'Projects/trinity-335/run/etc/worldserver.conf' sync echo '' read -n '1' -s -r -p 'WoW 3.3.5 localserver has been updated. Press any key to exit.' # End
~/'Projects/trinity-335/scripts/tc-335-server-update.sh'
Database Back-up
mkdir -p ~/'Projects/trinity-335/scripts' && nano ~/'Projects/trinity-335/scripts/tc-335-save-backup.sh' && chmod +x ~/'Projects/trinity-335/scripts/tc-335-save-backup.sh'
#!/bin/bash cd ~/'Downloads' echo 'Root MariaDB user password prompts:' echo '' mariadb-dump -u 'root' -p --opt -r 'localserver-authserver-database-'$(date +%Y-%m-%d-%s)'.sql' 'authserver' mariadb-dump -u 'root' -p --opt -r 'localserver-characters-database-'$(date +%Y-%m-%d-%s)'.sql' 'characters' sync read -n '1' -s -r -p 'localserver databases have been dumped to Downloads. Press any key to exit.' # End
~/'Projects/trinity-335/scripts/tc-335-save-backup.sh'
Character Data
Backup
- Dumps
authserver
andcharacters
MySQL databases as.sql
in~/Downloads
cd ~/'Downloads' && mariadb-dump -u 'root' -p --opt -r 'localserver-authserver-database-'$(date +%Y-%m-%d-%s)'.sql' 'authserver'
cd ~/'Downloads' && mariadb-dump -u 'root' -p --opt -r 'localserver-characters-database-'$(date +%Y-%m-%d-%s)'.sql' 'characters'
Restore
authserver
x
is path to aauthserver
.sql
database dump
mariadb --user='root' --password --execute='DROP DATABASE authserver'
mariadb --user='root' --password --execute='CREATE DATABASE authserver'
mariadb --user='root' --password 'authserver' < x
characters
x
is path to acharacters
.sql
database dump
mariadb --user='root' --password --execute='DROP DATABASE characters'
mariadb --user='root' --password --execute='CREATE DATABASE characters'
mariadb --user='root' --password 'characters' < x
Reapply Permissions
mariadb -u 'root' -p
GRANT ALL PRIVILEGES ON authserver.* to 'authserver'@'localhost';
GRANT ALL PRIVILEGES ON characters.* to 'characters'@'localhost';
FLUSH PRIVILEGES;
EXIT
Troubleshooting
ldd ~/'Projects/trinity-335/run/bin/worldserver'
readelf --string-dump='.comment' ~/'Projects/trinity-335/run/bin/worldserver'
/var/www/wiki/data/pages/servers/linux/games/trinitycore_3.3.5_localhost.txt · Last modified: by Sean Rhone