Scripts for syncing game data into the JSON files consumed by the app.
For the end-to-end pipeline and source ownership, see:
Start with master.mdb to establish what's live on Global, then sync GameTora for the full catalog:
bun run db:fetch # 1. Download latest master.mdb
bun run extract:all # 2. Extract course geometry from master.mdb
bun run sync:data # 3. Sync entity catalog (skills, umas, cards) from GameToraWhat that produces:
sync:datawrites GameTora snapshots undersrc/modules/data/json/gametora/extract:allwritessrc/modules/data/json/course_data.json- course extraction also updates
data-manifest.json(masterDb.extractedAt, andmasterDb.resourceVersionwhen provided or resolved)
| Source | Owns | Command |
|---|---|---|
| GameTora snapshots | skills, character cards, support cards, support effects, training events, reward dictionaries | bun run sync:data |
| master.mdb | course geometry only | bun run extract:all or bun run extract:course-data |
- bun
- master.mdb — required for
extract:all/extract:course-data - Network access — required for
sync:data; optional forfetch:support-events
Place master.mdb in a db/ directory at the project root (gitignored):
uma-sim/
├── db/
│ └── master.mdb
├── scripts/
└── ...
All extract scripts auto-detect this path. You can also pass a custom path:
bun scripts/data-extract/extract-course-data.ts /path/to/master.mdbPlatform defaults:
- Windows:
%APPDATA%\..\LocalLow\Cygames\Umamusume\master\master.mdb - macOS/Linux (Steam):
~/.local/share/Steam/steamapps/compatdata/[AppID]/pfx/.../master.mdb
| Script | Command | Role |
|---|---|---|
sync-gametora.ts |
bun run sync:data |
Sync GameTora snapshots for the entity catalog |
extract-all.ts |
bun run extract:all |
Primary master.mdb pipeline; currently runs course extraction only |
extract-course-data.ts |
bun run extract:course-data |
Extract course geometry directly |
These scripts still work, but they are no longer part of the recommended pipeline because entity catalog data now comes from GameTora snapshots.
| Script | Command | Output |
|---|---|---|
extract-skills.ts |
bun run extract:skills |
src/modules/data/json/skills.json |
extract-support-cards.ts |
bun run extract:support-cards |
src/modules/data/json/support-cards.json |
extract-uma-info.ts |
bun run extract:uma-info |
src/modules/data/json/umas.json |
| Script | Command | Status |
|---|---|---|
fetch-support-events.ts |
bun run fetch:support-events |
Redundant for the main pipeline; support card events now come from GameTora snapshots |
fetch:support-events is kept for now as a standalone utility, but it is no longer required for normal data syncs.
Course extraction updates data-manifest.json after a successful run.
# Use a known resource version
bun run extract:all -- --resource-version 10004010
# Resolve the latest version from uma.moe before writing the manifest
bun run extract:all -- --resolve-resource-versionThe same flags also work with bun run extract:course-data.
| File | Source | Produced by |
|---|---|---|
src/modules/data/json/gametora/*.json |
GameTora | bun run sync:data |
src/modules/data/json/course_data.json |
master.mdb | bun run extract:all / bun run extract:course-data |
data-manifest.json |
sync metadata | bun run sync:data, then updated by course extraction |
| File | Source | Produced by |
|---|---|---|
src/modules/data/json/skills.json |
master.mdb | bun run extract:skills |
src/modules/data/json/support-cards.json |
master.mdb | bun run extract:support-cards |
src/modules/data/json/umas.json |
master.mdb | bun run extract:uma-info |
src/modules/data/json/support-events.json |
GameTora | bun run fetch:support-events |
Course extraction still supports the existing modes:
| Mode | Behavior | Use when |
|---|---|---|
| Merge (default) | Updates courses found in master.mdb, preserves others |
Regular updates |
Replace (--replace) |
Overwrites with only current master.mdb courses |
Clean rebuild |
bun run extract:all
bun run extract:all -- --replacescripts/master-data/shared.ts— JSON I/O, key sorting, DB path resolutionscripts/master-data/database.ts— SQLite helpersscripts/master-data/uma-api.ts— latest resource version lookup viauma.moe
- "Failed to open database" — check the
master.mdbpath, permissions, and whether the game is locking the file. - "Could not read courseeventparams" — ensure the
courseeventparams/directory exists with course JSON files. sync:datanetwork errors — retry when connectivity is restored.fetch:support-eventsnetwork errors — the script falls back to.cache/gametora/automatically.