User Tools

Site Tools


servers:games:trinitycore_3.3.5_localhost

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
servers:games:trinitycore_3.3.5_localhost [2024/06/18 06:57] – [Script] Sean Rhoneservers:games:trinitycore_3.3.5_localhost [2024/08/13 16:37] (current) – removed Sean Rhone
Line 1: Line 1:
-====== Information ====== 
- 
-  * TrinityCore ((https://www.trinitycore.org)) 
-  * 3.3.5 ((https://github.com/TrinityCore/TrinityCore/tree/3.3.5)) 
-  * [[Information:Realm of Espionage]] 
- 
-  * These notes provide a local singleplayer server for World of Warcraft 3.3.5 on Linux (see [[windows:servers:games:trinitycore_3.3.5_localhost|these notes]] for Windows) 
-  * For a traditional dedicated server see [[servers:games:trinitycore_3.3.5|these notes]] 
- 
-====== Resources ====== 
- 
-  * [[https://trinitycore.org/|TrinityCore]] 
-  * [[https://trinitycore.info/|TrinityCore MMo Project Wiki]] 
- 
-===== Prerequisites ===== 
- 
-  * [[distros:fedora_workstation_gnome|Fedora Workstation (GNOME)]] 
-  * [[servers:mariadb|MariaDB]] 
-  * [[games:wine:world_of_warcraft_3.3.5|World of Warcraft (3.3.5)]] 
- 
-====== Dependencies ====== 
- 
-**** 
- 
-  sudo dnf install bzip2-devel gcc-c++ cmake git mariadb-devel boost boost-devel readline-devel 
- 
-====== 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 ====== 
- 
-  * This creates the ''authserver'', ''characters'', and ''worldserver'' databases 
-  * :!: Change the ''x'' for all three ''GRANT''s to a password 
- 
-  sudo mariadb 
- 
-  CREATE DATABASE authserver; 
- 
-  GRANT ALL PRIVILEGES ON authserver.* to 'authserver'@'localhost' IDENTIFIED BY 'x'; 
- 
-  CREATE DATABASE characters; 
- 
-  GRANT ALL PRIVILEGES ON characters.* to 'characters'@'localhost' IDENTIFIED BY 'x'; 
- 
-  CREATE DATABASE worldserver; 
- 
-  GRANT ALL PRIVILEGES ON worldserver.* to 'worldserver'@'localhost' IDENTIFIED BY 'x'; 
- 
-  FLUSH PRIVILEGES; 
- 
-  EXIT 
- 
-====== Initial Compile ====== 
- 
-  * 2024/06/02: Takes about 11 minutes on i5-8400H 
- 
-  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_BUILD_TYPE='Release' -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_BUILD_TYPE='Release' -DTOOLS='1' && sync && make --jobs=$(nproc) install && sync 
- 
-====== Content ====== 
- 
-  * Expects [[games:wine:world_of_warcraft_3.3.5|World of Warcraft 3.3.5]] 
- 
-===== DBCs, Maps, and Cameras ===== 
- 
-  * 2024/06/02: Takes about 30 seconds on i5-8400H ((''dbc'' folder is 86 MB, ''maps'' folder is 531 MB, ''Cameras'' folder is 34 KB)) 
- 
-  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 ==== 
- 
-  * 2024/06/02: Takes about 45 seconds on i5-8400H ((''vmaps'' folder is 1.23 GB)) 
- 
-  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 ==== 
- 
-  * 2024/06/02: Takes about 11 seconds on i5-8400H ((''vmaps'' folder is 1.23 GB)) 
- 
-  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 ===== 
- 
-  * :!: 2024/03/06: Takes about 43 minutes on i5-8400H ((''mmaps'' folder is 1.45 GB)) 
- 
-  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'' needs ''dbc'', ''maps'', ''Cameras'', ''vmaps'', and ''mmaps'' 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' && 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 ==== 
- 
-  * https://github.com/TrinityCore/TrinityCore/releases 
-  * Download the latest ''TDB 335'' ''.7z'' with a web browser 
- 
-  * Expects something like ''TDB_full_world_335.24041_2024_04_10.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 ====== 
- 
-  * See [[notes:trinitycore_3.3.5_localhost_confs|TrinityCore 3.3.5 localhost confs]] 
- 
-====== Realm ====== 
- 
-===== authserver ===== 
- 
-  * ''authserver'' needs started at least once to create the tables and to start ''worldserver'' for account creation 
-  * Ctrl + C to exit 
- 
-  cd ~/'Projects/trinity-335/run/bin' && ~/'Projects/trinity-335/run/bin/authserver' 
- 
-===== Realm ===== 
- 
-**** 
- 
-  sudo mariadb --execute="UPDATE authserver.realmlist SET name = 'localhost', address = 'localhost' WHERE realmlist.id = 1" 
- 
-====== Create GM Account ====== 
- 
-  * Change ''x'' to password 
- 
-  cd ~/'Projects/trinity-335/run/bin' && ~/'Projects/trinity-335/run/bin/worldserver' 
- 
-  account create Espionage724 x 
- 
-  account set gmlevel Espionage724 3 -1 
- 
-  server shutdown 1 
- 
-====== Launch ====== 
- 
-===== Commands ===== 
- 
-  cd ~/'Projects/trinity-335/run/bin' && ~/'Projects/trinity-335/run/bin/authserver' 
- 
-  cd ~/'Projects/trinity-335/run/bin' && ~/'Projects/trinity-335/run/bin/worldserver' 
- 
-===== Script ===== 
- 
-  nano ~/'Projects/trinity-335/run/tc-335-server-start.sh' && chmod +x ~/'Projects/trinity-335/run/tc-335-server-start.sh' 
- 
-<code> 
-#!/bin/bash 
- 
-cd ~/'Projects/trinity-335/run/bin' 
-gnome-terminal --title='WoW localhost authserver' -- ~/'Projects/trinity-335/run/bin/authserver' 
-gnome-terminal --title='WoW localhost worldserver' -- ~/'Projects/trinity-335/run/bin/worldserver' 
- 
-# End</code> 
- 
-  ~/'Projects/trinity-335/run/tc-335-server-start.sh' 
- 
-====== Character Data ====== 
- 
-===== Backup ===== 
- 
-  * Dumps ''authserver'' and ''characters'' MariaDB databases as ''.sql'' in ''~/Downloads'' 
- 
-==== Commands ==== 
- 
-=== authserver === 
- 
-**** 
- 
-  cd ~/'Downloads' && sudo mariadb-dump --user 'root' --databases 'authserver' --result-file='localserver-authserver-database-'$(date +%Y-%m-%d-%s)'.sql' && sudo chown $USER:$USER ~/'Downloads/localserver-authserver-database-'*'.sql' && sync 
- 
-=== characters === 
- 
-**** 
- 
-  cd ~/'Downloads' && sudo mariadb-dump --user 'root' --databases 'characters' --result-file='localserver-characters-database-'$(date +%Y-%m-%d-%s)'.sql' && sudo chown $USER:$USER ~/'Downloads/localserver-characters-database-'*'.sql' && sync 
- 
-==== Script ==== 
- 
-  nano ~/'Projects/trinity-335/run/tc-335-save-backup.sh' && chmod +x ~/'Projects/trinity-335/run/tc-335-save-backup.sh' 
- 
-<code> 
-#!/bin/bash 
- 
-cd ~/'Downloads' 
-sudo mariadb-dump --user 'root' --databases 'authserver' --result-file='localserver-authserver-database-'$(date +%Y-%m-%d-%s)'.sql' 
-sudo mariadb-dump --user 'root' --databases 'characters' --result-file='localserver-characters-database-'$(date +%Y-%m-%d-%s)'.sql' 
-sudo chown $USER:$USER ~/'Downloads/localserver-authserver-database-'*'.sql' ~/'Downloads/localserver-characters-database-'*'.sql' 
-sync 
-notify-send 'localserver databases have been successfully dumped.' 
- 
-# End</code> 
- 
-  ~/'Projects/trinity-335/run/tc-335-save-backup.sh' 
- 
-===== Restore ===== 
- 
-  * :!: This deletes the existing ''authserver'' and ''characters'' databases before restoring from backup 
-  * :!: Only have a single ''authserver'' and ''worldserver'' ''.sql'' in ''~/Downloads'' ((more than 1 makes ''mariadb'' throw ''ambiguous redirect'')) ((TODO: See if there's a way to select a newer file either via timestamp or filename as ''%s'' should always increase?)) 
- 
-==== authserver ==== 
- 
-  ls ~/'Downloads/localserver-authserver-database-'*'.sql' && sudo mariadb --execute='DROP DATABASE authserver' 
- 
-  sudo mariadb --execute='CREATE DATABASE authserver' 
- 
-  sudo mariadb 'authserver' < ~/'Downloads/localserver-authserver-database-'*'.sql' 
- 
-==== characters ==== 
- 
-  ls ~/'Downloads/localserver-characters-database-'*'.sql' && sudo mariadb --execute='DROP DATABASE characters' 
- 
-  sudo mariadb --execute='CREATE DATABASE characters' 
- 
-  sudo mariadb 'characters' < ~/'Downloads/localserver-characters-database-'*'.sql' 
- 
-==== Reapply Permissions ==== 
- 
-  sudo mariadb 
- 
-  GRANT ALL PRIVILEGES ON authserver.* to 'authserver'@'localhost' IDENTIFIED BY 'x'; 
- 
-  GRANT ALL PRIVILEGES ON characters.* to 'characters'@'localhost' IDENTIFIED BY 'x'; 
- 
-  FLUSH PRIVILEGES; 
- 
-  EXIT 
  
/srv/www/wiki/data/attic/servers/games/trinitycore_3.3.5_localhost.1718708232.txt.gz · Last modified: by Sean Rhone