一键导入
dbcmem
Generate static Go code from WoW DBC files
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate static Go code from WoW DBC files
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
How the `dbcdata import` loader is structured and how to add a new game-data importer that uploads into a Chronicle dataset. Use when adding/modifying an Importer in scripts/dbcdata/cli, wiring a new DBC upload endpoint in api/gamedataapi, or migrating a game-data type (spells, items, talents, creatures) from compiled-in dbcmem to a database-backed dataset.
Chronicle's multi-tenant branding and CSS theming system. Covers the Branding struct, server-side CSS injection via Go templates, the ThemeEditor component, and how branding flows from database → API → HTML template → React components. Use when: modifying branding fields, adding theme knobs, changing how logos/colors/titles render, or debugging tenant vs site-level branding resolution.
AzerothCore ScriptAI hook system documentation. Covers the Observer pattern, creating new ScriptObject types, implementing hooks in ScriptMgr, naming conventions, and advanced patterns (filtering via references/bool returns, module-internal hooks). Use when: adding hooks to AzerothCore, creating modules, or working with ScriptMgr.
Multi-server build pipeline for Chronicle. Each WoW server (Turtle, Epoch, etc.) produces its own binary via Go build tags, its own Docker image, and its own Railway deployment. Covers the dbcmem driver-registration pattern, Dockerfile SERVER arg, CI matrix strategy, and how to add a new server.
Rankings and leaderboard system for Chronicle. Covers speedrun tracking (parser-side kill detection), leaderboard queries with version filtering, admin-configurable version requirements, and the semver encoding scheme for SQL-side comparison. Use when: adding ranking types, modifying speedrun rules, changing version requirements, or working with the leaderboard API/UI.
Guild Pages feature for Chronicle - customizable public pages for guilds with drag-drop panel editor
| name | dbcmem |
| description | Generate static Go code from WoW DBC files |
| globs | ["database/gamedb/chrondbc/dbcmem/**","scripts/dbcdata/**"] |
See also: the
multi-server-buildskill for the full build pipeline, CI/CD, Docker, and how to add a new server.
The dbcmem package contains Go lookup tables generated from World of Warcraft
DBC (Database Client) files. Types and getters live in dbcmem/types.go;
actual data lives in server-specific sub-packages (e.g. dbcmem/turtle/).
# Regenerate turtle DBC data
go generate ./database/gamedb/chrondbc/dbcmem/...
# Or run the tool directly for a specific server
go run ./scripts/dbcdata static --server=turtle --dbc=/path/to/client -o database/gamedb/chrondbc/dbcmem/turtle
go run ./scripts/dbcdata derived-statics --server=turtle --dbc=/path/to/client \
--go-dir=database/gamedb/chrondbc/dbcmem/turtle \
--ts-dir=frontend/chronicle/src/constants/dbmem \
--assets-dir=assets/generated
database/gamedb/chrondbc/dbcmem/
├── doc.go # go:generate directives
├── types.go # Shared types, nil vars, getters (NOT generated)
└── turtle/ # Generated data for Turtle WoW
├── casttimes.go # func init() { dbcmem.SpellCastTimes = ... }
├── spellicons.go
└── ... (11 files total)
scripts/dbcdata/
├── main.go # CLI entry point
└── cli/
├── static.go # Generates 7 DBC-direct tables
├── derivedstatics.go # Orchestrates 4 derived generators + JSON/TS
├── periodic.go # PeriodicSpells
├── vulnerability.go # VulnerabilitySpells
├── extraattacks.go # ExtraAttackSpells
└── durationmodifiers.go # DurationModifiers + ByClassBit
Add reader to database/gamedb/dbcdb/db.go:
func (w *WoWClient) SpellFoo() (Table[dbdefs.Ent_SpellFoo], error) {
data, err := w.ReadFile("DBFilesClient\\SpellFoo.dbc")
// ...
}
Add struct type to dbcmem/types.go:
type SpellFoo struct { ID int32; /* ... */ }
var SpellFoos map[int32]SpellFoo
func GetSpellFoo(id int32) SpellFoo { return SpellFoos[id] }
Add generator + template to scripts/dbcdata/cli/static.go:
generateSpellFoo(wc, outputDir, stdout, server)package {{.Server}} + func init() { dbcmem.SpellFoos = ... }Call generator in StaticPopulateCmd handler
Regenerate: go generate ./database/gamedb/chrondbc/dbcmem/...
--server flag controls the output package name and init() wrapping--dbc flag defaults to the Turtle WoW client path; override for other servers// Code generated header — don't edit manuallytypes.go is NOT generated — edit it manually when adding new tables