# moonwell-taxi External CLI that reads custom flight data from `acore_world` and the three vanilla taxi DBCs, then generates merged DBCs ready to drop into both the server's `dbc/` directory and the client patch. ## Quick start ```bash # 1. install deps (PyMySQL only) pip install -r requirements.txt # 2. point at your vanilla DBC source and run the export ./bin/moonwell-taxi export-dbc \ --vanilla-dir /home/sindo/moonwell-core \ --output-dir /home/sindo/moonwell-core/build/taxi/export # Output: # /server/dbc/TaxiNodes.dbc # /server/dbc/TaxiPath.dbc # /server/dbc/TaxiPathNode.dbc # /client/DBFilesClient/TaxiNodes.dbc # /client/DBFilesClient/TaxiPath.dbc # /client/DBFilesClient/TaxiPathNode.dbc # # A sha256 manifest is written next to each half; the tool fails with a # non-zero exit if server and client copies do not match. # 3. pack the client half into an MPQ patch for native taxi UI ./bin/moonwell-taxi build-client-patch # Output: # /client/patch-Z.MPQ # # Copy that MPQ to the WoW 3.3.5a client's Data directory, delete the # client's Cache directory, then restart Wow.exe. Loose DBFilesClient/*.dbc # files are not enough for the stock 3.3.5a client taxi UI. ``` ## DB connection Reads connection params from environment variables (which `acore.sh` and `import-custom-sql.sh` already populate from `.env`): - `DOCKER_DB_EXTERNAL_PORT` (default 3306) - `DOCKER_DB_ROOT_PASSWORD` (default "password") - `MOONWELL_TAXI_DB_HOST` (default 127.0.0.1) - `MOONWELL_TAXI_DB_USER` (default root) - `MOONWELL_TAXI_DB_NAME` (default acore_world) CLI flags override env: `--db-host`, `--db-port`, `--db-user`, `--db-password`, `--db-name`. ## Subcommands - `export-dbc` — fully implemented: merges vanilla + custom into new DBCs, writes server and client copies, prints sha256 for both. Refuses to run if `--vanilla-dir` already contains records in the custom-id space (TaxiNode id ≥ 441, TaxiPath id ≥ 1979) — that means the directory was already merged once and re-running would compound rows. - `build-client-patch` — packs the exported client DBCs into a minimal MPQ patch with internal paths `DBFilesClient\TaxiNodes.dbc`, `DBFilesClient\TaxiPath.dbc`, and `DBFilesClient\TaxiPathNode.dbc`. This is required for the native flight-master map UI to see custom taxi nodes; otherwise the client can crash when the server sends a custom current-node id. - `thin --path [--min-yd 50] [--dry-run]` — drops waypoints that sit within `min-yd` (XY) of the previously kept point, preserves first and last, renumbers `node_index` from 0. Use it when an in-game recording produced too-dense waypoints (chat shows lots of `segment N->M is X.X yd (< 40 yd ...)` warnings) — server filters those via `IsNodeIncludedInShortenedPath` and the spline goes haywire. Backs up to `custom_taxi_path_nodes_backup__` before deleting; the rollback SQL is printed at the end. - `dump-vanilla [--limit N]` — debug helper: parses a `.dbc` file and prints header + first N records as raw uint32. Useful when adding new schemas. The other subcommands listed in the spec (build-mpq, deploy-server, backup, rollback, diff) are not part of the MVP and return a not-implemented error today. ## Default paths `--vanilla-dir` defaults to `/var/client-data-vanilla`. Keep that directory as a clean snapshot. `redeploy.sh` writes merged files into `/var/client-data-live/dbc`, not back into the vanilla snapshot.