Skip to content

VoxCore84/tc-packet-tools

Repository files navigation

TC Packet Tools

Bash License: MIT GitHub release

Server launcher wrapper and packet parsing toolkit for TrinityCore 12.x / Midnight. Automates the capture-to-decode pipeline using WowPacketParser.

What It Does

  1. Starts bnetserver in a separate window
  2. Starts worldserver in the foreground (interactive console)
  3. When you exit the worldserver (server exit), it automatically:
    • Kills bnetserver
    • Runs WowPacketParser on the captured packet log
    • Lists all output files with sizes

No more manually running WPP after every session.

Setup

Prerequisites

Install

  1. Copy start-worldserver.sh into your TrinityCore server bin directory (next to worldserver.exe and bnetserver.exe)

  2. Create the PacketLog/ subdirectory:

    mkdir PacketLog
  3. Edit worldserver.conf to log packets to the subfolder:

    PacketLogFile = "PacketLog/World.pkt"
    
  4. Edit the WPP path at the top of start-worldserver.sh to point to your WowPacketParser install:

    WPP="C:/Tools/WowPacketParser/WowPacketParser.exe"

WPP Config (Optional)

Copy WowPacketParser.dll.config.template to your WPP directory as WowPacketParser.dll.config. It comes pre-configured with:

  • TargetedDatabase = 10 (Midnight)
  • All SQL output tables enabled (creatures, gameobjects, quests, hotfixes, gossip, vendors, trainers, broadcast text, etc.)
  • ParseAllHotfixes = true
  • SplitSQLFile = true (separate _world.sql, _hotfixes.sql, _WPP.sql files)
  • LogErrors + LogPacketErrors = true
  • All CPU threads used for parsing

Update the TODO fields in the template for your environment (MySQL password, DBC path, DBCache.bin path).

Usage

cd /path/to/your/server/bin
bash start-worldserver.sh

Play the game, then type server exit in the worldserver console when done. WPP runs automatically and you'll see output like:

==========================================
  Worldserver exited (code 0)
  Stopping bnetserver...
==========================================
==========================================
  Running WowPacketParser...
==========================================
Packet log: 39M
[1/1 World.pkt]: Parsing 39MB of packets. Detected version V12_0_1_66102
...
==========================================
  WPP finished. Output files:
==========================================
456M PacketLog/World_parsed.txt
 12K PacketLog/World_errors.txt
2.1M PacketLog/World_world.sql
 89K PacketLog/World_hotfixes.sql

Output Files

All output lands in the PacketLog/ subdirectory alongside the .pkt:

File Description
World.pkt Raw binary packet capture (written by worldserver)
World_parsed.txt Human-readable decoded packets (main output)
World_errors.txt Packets that failed to parse (if any)
World_world.sql Extracted world DB data (creatures, GOs, quests, etc.)
World_hotfixes.sql Extracted hotfix data
World_WPP.sql WPP internal data (sniff metadata, object names)

SQL output depends on what you did in-game — opening vendor windows generates npc_vendor SQL, observing creature spawns generates creature SQL, etc.

Troubleshooting

Problem Solution
WPP says "file is being used by another process" The worldserver still has World.pkt locked. Make sure it fully exited before WPP runs (the wrapper handles this)
WPP says "Save file is in use" Close World_parsed.txt in your text editor — old output files block WPP from writing new ones
Empty _parsed.txt (0 bytes) Usually means the output file was locked. Delete it and re-run WPP
No SQL files generated Normal if the sniff didn't contain relevant data. SQL output requires specific in-game actions (opening vendors, observing spawns, etc.)
NullReferenceException in LoadBroadcastText The wpp MySQL database may not exist. Non-fatal — parsing still works, just no broadcast text name resolution
DBC folder not found DBC/DB2 files not extracted to WPP's dbc/enUS/ folder. Non-fatal — just no DBC name lookups
bnetserver window doesn't close Run taskkill //IM bnetserver.exe //F manually

About

Server launcher and packet parsing toolkit for TrinityCore 12.x — auto-runs WowPacketParser on exit

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages