taxi builder

This commit is contained in:
2026-05-11 18:35:47 +04:00
parent 0a3d3b6afa
commit 13747727cf
21 changed files with 3578 additions and 0 deletions
+87
View File
@@ -0,0 +1,87 @@
# 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:
# <output-dir>/server/dbc/TaxiNodes.dbc
# <output-dir>/server/dbc/TaxiPath.dbc
# <output-dir>/server/dbc/TaxiPathNode.dbc
# <output-dir>/client/DBFilesClient/TaxiNodes.dbc
# <output-dir>/client/DBFilesClient/TaxiPath.dbc
# <output-dir>/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:
# <output-dir>/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 <id> [--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_<pathId>_<ts>` before
deleting; the rollback SQL is printed at the end.
- `dump-vanilla <path> [--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 `<repo>/var/client-data-vanilla`. Keep that
directory as a clean snapshot. `redeploy.sh` writes merged files into
`<repo>/var/client-data-live/dbc`, not back into the vanilla snapshot.