Root project for Duskhaven's branch of TSWoW
  • C 40.2%
  • C++ 31.5%
  • TypeScript 20.5%
  • Lua 2.9%
  • Shell 1.4%
  • Other 3.2%
Find a file
kebful d5809c4eea
Some checks failed
Sync to GitHub / sync-to-github (push) Failing after 56s
msdf
2026-10-07 20:40:49 -05:00
.forgejo better work 2026-05-12 20:16:45 -05:00
.github put back ubuntu builder 2026-05-25 10:59:45 -04:00
.vscode debug stuff 2026-09-13 11:21:02 -05:00
cores hash 2026-10-02 21:13:57 -05:00
misc msdf 2026-10-07 20:40:49 -05:00
tswow-core fix(packets): preserve packet data when resetting callbacks 2026-09-10 20:14:57 -05:00
tswow-scripts fix proc issue 2026-10-06 22:26:38 -05:00
.clang-format chore: added some configuration files 2024-04-14 07:43:23 +02:00
.clang-tidy chore: added some configuration files 2024-04-14 07:43:23 +02:00
.cmake-format chore: added some configuration files 2024-04-14 07:43:23 +02:00
.editorconfig chore: added some configuration files 2024-04-14 07:43:23 +02:00
.gitignore fixes for some spell stuff 2026-07-08 17:54:18 -04:00
.gitmodules build(adt): use the Duskhaven ADT Creator repository 2026-09-10 19:38:22 -05:00
build.default.conf Linux: hands-off setup (deps preflight, self-managed MariaDB, client data) 2026-09-09 22:07:36 -05:00
build.js Linux: hands-off setup (deps preflight, self-managed MariaDB, client data) 2026-09-09 22:07:36 -05:00
LICENSE datascripts: fix wotlk compiler errors 2022-02-11 18:36:32 +01:00
package-lock.json package changes for cli; spell tooltip fixes and item tooltip implementation; add some bunny handlers; add adt scanning; temp WMO logging extension for local testing 2026-04-05 10:36:22 -04:00
package.json fix(npm): allow required deasync native build in project installs 2026-09-09 21:25:56 -05:00
README.md debug stuff 2026-09-13 11:21:02 -05:00

TSWoW - Duskhaven Edition

Duskhaven is built utilizing the modding framework from TSWoW (TypeScript WoW) this repository is a fork of that project with duskhaven specific changes. All credits for the modding framework go to TSWoW.

Any other TSWoW projects are welcome to cherry pick our changes from this.

TSWoW (TypeScript WoW) is a free modding framework, mod loader and integrated development environment for the World of Warcraft: Wrath of the Lich King (WotLK) expansion build around the TrinityCore emulator.

With TSWoW, you use the TypeScript programming language and the VSCodium editor to easily modify the World of Warcraft game data and to script the behavior of the server.

Who is TSWoW for?

  • Modding Beginners - We have crash course aimed just at getting new people started!

  • Modding Veterans - TSWoW is primarily aimed at making modding more efficient and powerful. You will very fast realize the power of improving your workflow using programming.

TSWoW is a programming environment, and the language we use is TypeScript. This is among the easier languages to learn, and is very similar to Java, C#, JavaScript, Python etc. If you know any of those, you can probably learn TSWoW by just following the crash course. However, if any of the following is foreign to you then you might want to review them before you get started:

  • Integrated development environment (IDE)
  • JSON
  • Functions, objects, classes, methods
  • Callback functions / Delegates
  • Command-line interface

Introduction & Installation

Issues

Discord


The purpose of this document is to walk through building the Duskhaven fork of TS-WoW with TrinityCore from source as well as link to relevant upstream documentation.

Credits to Project Epoch for utilizing their instruction installations and modifying to be Duskhaven specific.

Important Notes

  • Please make sure there are no spaces anywhere in the pathname to your WoW client or the TSWoW installation.

Pre-Requisites

Build Stage Directory / File Setup

It is recommended to keep your Client alongside your source build due to a Windows limitation with symlinking required for TS-WoW to function.

  • Create a directory in a location of your choosing named DuskhavenSource.
  • Within DuskhavenSource create the following subdirectories:
    • build
    • client (Paste the contents of your 3.3.5a enUS / enGB client within)
    • release
  • Using a terminal of your choosing such as PowerShell or Git Bash reach your DuskhavenSource directory.
  • git clone https://github.com/duskhaven-reforged/dusk-tswow.git --recurse source
  • Wait for clone to complete, you should have a final source directory alongside your other 3 build, client, release folders.
  • Copy source/build.default.conf to source/build.conf and open it. Here you can configure where tswow should place build and install directories.
  • Set the following within source/build.conf
BuildDirectory = "../build"
InstallDirectory = "../release"
  • Using a terminal of your choosing such as PowerShell or Git Bash reach your DuskhavenSource/source directory.
  • Run the command npm i

Building Stage - Compiling (First Time)

  • When compiling it is recommended that you have closed your world and auth servers, if this is your first build this is irrelevant.
  • Using a terminal of your choosing such as PowerShell or Git Bash reach your DuskhavenSource/source directory.
  • For a first setup we strongly recommend a full build which will get any further dependencies and compile every part of TS-WoW. From this point you can later more strategically compile only certain aspects.
  • Run npm run build full
  • This may take a long time to complete.
  • Once this completes your DuskhavenSource/release directory should now be populated.

Building Stage - Server Core

  • To rebuild only the core ensure that you have closed any running framework instances or world / auth servers.
  • Run npm run build trinitycore-relwithdebinfo.
  • Once complete run npm run start within your DuskhavenSource/release directory.

Final Setup

  • Within DuskhavenSource/release open node.conf and set Default.Client to your WoW client path. This should be in the DuskhavenSource/client directory.
  • Using a terminal of your choosing such as PowerShell or Git Bash reach your DuskhavenSource/release directory.
  • Run the command npm run start. This will start the automatic installation and then start the server. Wait for the core database installation and maps to be extracted. This is a long process on the first installation and can take a long time depending on your machine. 20-30 minutes isn’t rare. You know the installation is done when you see a message similar to
TrinityCore rev. 2a67a101096e 2021-04-23 09:24:53 +0200 (tswow branch) (Win64, RelWithDebInfo, Dynamic) (worldserver-daemon) ready...
  • To create a gm account, type create account myuser mypassword 3
  • You can now start the client with the command start client and log in to the game

Known Issues

For common issues when installing please refer to upstream TS-WoW Documentation.

Debugging the realm on Linux

Build/install the runtime scripts and generated npm commands after updating source:

cd source
npm run build:scripts
npm run build:config
npm run build:trinitycore-relwithdebinfo # only needed if this core build is missing/outdated
cd ../release
npm run debug

Requires GDB (sudo apt install gdb on Debian/Ubuntu) and an interactive terminal. Stop the existing instance of the selected realm before starting its debugger. The command starts DefaultRealm under GDB using the RelWithDebInfo core, keeps normal database/data setup and configured authserver startup, and does not launch WoW or other realms. Select another realm with npm run debug -- --realm=module.realm. This command is Linux-only; npm run start is unchanged.

A crash stops in GDB and prints thread stacks and the current source location. For a hang, press Ctrl+C to pause the realm and inspect its threads. Useful GDB commands:

  • bt full: current thread's call stack and local variables.
  • thread apply all bt full: all thread stacks and available locals.
  • frame N, list, info locals: select a stack frame and inspect its source/variables.
  • continue: resume the realm.
  • quit: end debugging (confirm termination of the realm when prompted).

The normal TSWoW/realm command prompt is replaced by GDB during this session. A temporary private config disables the realm console and watchdog; the regular config is preserved. Realm automatic restart is bypassed so crashes remain available for inspection. Optimized builds can omit some variables; use matching source and unstripped debug symbols. This is terminal debugging, not an automatic VSCodium editor attachment.

Graphical realm debugging in VSCodium (Linux)

Install Native Debug (codium --install-extension webfreak.debug) and open the source folder in VSCodium. Start the realm normally with npm run start from release, using the RelWithDebInfo core. Do not run the terminal GDB session at the same time. Find the realm PID with pgrep -af worldserver (the executable, not a GDB/launcher process).

Open Run and Debug (Ctrl+Shift+D), select Attach to Dusk realm (Linux), press F5, and enter that PID. On systems with restricted ptrace, a desktop password prompt authorizes GDB for this session. Attachment pauses the realm initially. Click the editor gutter to add breakpoints, use Continue (F5) or Pause, and inspect CALL STACK, VARIABLES and WATCH. Select a stack frame to open its source line. Disconnect detaches from the realm; it is an attach session, not a launch session. Pausing a production realm pauses service for players. Avoid long pauses with the normal world's watchdog enabled; for extended debugging set MaxCoreStuckTime to 0 in that realm's worldserver.conf before starting, then restore it afterward.

The source launch config and Linux GDB wrapper are versioned with the repository. If opening the installation root instead, add source with File > Add Folder to Workspace so its debug configuration is available. The same setup works inside VSCodium on the Debian RDP desktop; install the extension there separately.