Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SkyFire Database Editor

Native C++ desktop database editor for Project SkyFire 5.4.8, inspired by Keira3.

This repository is the standalone home for SkyFireDBEditor. It targets SkyFire 5.4.8 world databases and is built separately from the SkyFire core tree.

Goals

Keira3 is an Electron + Angular app tailored to AzerothCore. SkyFireDBEditor aims to provide a similar workflow for SkyFire maintainers using a native Qt GUI:

  • Connect to a SkyFire MySQL world database
  • Browse and edit common world tables from a desktop app
  • Automatically generate diff and full SQL as you edit
  • Copy or execute generated SQL directly from the app
  • Expand over time toward parity with Keira3 editors (creatures, quests, loot, gossip, SmartAI, conditions, etc.)

Current status (v0.2.5-rc1)

Implemented:

  • Connection dialog with saved profiles (password is never stored)
  • Dashboard overview
  • Creature template editor (creature_template) with flag/bitmask selectors
  • Item template editor (item_template)
  • Gameobject template editor (gameobject_template) with flag selectors
  • Quest template editor (quest_template, full schema)
  • Inline SmartAI editor (smart_scripts) — editable grid, add/delete rows, enum dropdowns, comment generator, event/action/target tooltips
  • Keira3-style tree sidebar — grouped sub-editors with Collapse All, categories start collapsed, tighter child alignment
  • Loot editors — creature loot plus item loot, disenchant, prospecting, and milling under Items
  • Manual SQL editor with result grid
  • Diff/full SQL output panel
  • Flag/bitmask selectorsnpcflag, unit_flags, unit_flags2, dynamicflags, type_flags, flags_extra, gameobject flags
  • Static field dropdownsAIName, MovementType, item class/Quality/bonding, SmartAI event/action/target types

Planned next:

  • Embed SmartAI inside Creature/Gameobject editors
  • More Keira3-style sub-editors (item enchantment, etc.)

UX design notes

Current behavior:

  • Collapsible sections — each field group (Identity, Flags, Stats, etc.) can be collapsed via its checkbox title
  • Scroll wheel guard — numeric fields ignore mouse wheel unless focused, so scrolling the form does not accidentally change values
  • Field tooltips — hover labels/fields for short descriptions of what each column does
  • Dropdown selectors — static fields such as AIName, MovementType, item class/Quality/bonding, and SmartAI event/action/target types use editable combo boxes
  • Flag/bitmask selectors — creature and gameobject flag fields show a decimal value, hex preview, and a Flags... dialog with checkboxes
  • Inline SmartAI editing — load scripts by entry/GUID + source type, edit rows in a table, generate comments, diff/full SQL for the whole script set
  • SmartAI tooltips — hover event/action/target dropdowns for descriptions of what each type does and key parameters
  • Entity previews — ID fields show a resolved name and Wowhead link where possible (see below)

Where preview names come from

Entity Source Why
Quest quest_template.Title in world DB SkyFire stores quest text server-side
Item item_template.name in world DB Same — items need names for loot, vendors, etc.
Creature creature_template.name in world DB Same
Spell spell_dbc overrides, then optional dbc_export/Spell.csv Almost all spell data lives in client DBC files; world spell_dbc only has custom overrides (~100 rows), not the full spell catalog

Without dbc_export/Spell.csv, spell previews still show Spell #ID with a working Wowhead link. When you build SkyFireDBEditor, CMake copies Spell.csv from the repo's dbc_export/ folder into Release/dbc_export/ next to the executable (set SKYFIRE_DB_EDITOR_SPELL_CSV if your export lives elsewhere). Export Spell.csv once from your 5.4.8 client DBCs if you do not already have it.

Planned UX:

  • Tree sidebar — grouped editors (Creatures, Items, etc.) with Collapse All under Dashboard; categories start collapsed and expand when you open a child
  • Keira3-style sub-editors — nested editors per domain (e.g. under Item: template, enchantment, loot tables)
  • Richer tooltips with inline field descriptions where SkyFire schemas need extra context

Requirements

Component Notes
CMake 3.27.7+ Already used by SkyFire
C++20 compiler MSVC 2022 recommended on Windows
Qt 6 (Core, Widgets) Any recent 6.x (e.g. 6.8, 6.11)
MySQL client dev files mysql.h, libmysql.lib, libmysql.dll

Installing Qt 6 (Windows)

Use the Qt Online Installer and select:

  • Qt 6.x (e.g. 6.11.1)
  • MSVC 2022 64-bit desktop kit (match your compiler)
  • Qt Base / Qt Widgets (included in the desktop kit)

Typical install path:

C:\Qt\6.11.1\msvc2022_64\

Note: choco install qtcreator installs only the Qt Creator IDE plus runtime DLLs. It does not include the Qt SDK headers/libraries needed to compile this project, and it does not include windeployqt. You still need the full Qt kit from the official installer (or aqtinstall).

MySQL client (Windows)

SkyFireDBEditor links against the MySQL C client library. Chocolatey installs are usually at:

C:\tools\mysql\current\
  include\mysql.h
  lib\libmysql.lib
  lib\libmysql.dll

The CMake script auto-detects C:/tools/mysql/current when present.


Build

From the repository root:

cmake -S contrib/SkyFireDBEditor -B build-skyfire-db-editor `
  -DCMAKE_PREFIX_PATH="C:/Qt/6.11.1/msvc2022_64" `
  -DMYSQL_ROOT="C:/tools/mysql/current"

cmake --build build-skyfire-db-editor --config Release

Adjust paths for your Qt and MySQL installs.

Linux example:

cmake -S contrib/SkyFireDBEditor -B build-skyfire-db-editor \
  -DCMAKE_PREFIX_PATH=/opt/Qt/6.11.1/gcc_64
cmake --build build-skyfire-db-editor --config Release

Output (Windows, multi-config generator):

build-skyfire-db-editor\Release\SkyFireDBEditor.exe
build-skyfire-db-editor\Release\dbc_export\Spell.csv

On Windows, the post-build step automatically:

  1. Copies libmysql.dll next to the executable
  2. Copies dbc_export/Spell.csv next to the executable (from the repo's dbc_export/Spell.csv when present)
  3. Runs windeployqt to copy Qt DLLs and plugins (when found)

Override the spell CSV source path at configure time if needed:

-DSKYFIRE_DB_EDITOR_SPELL_CSV="D:/wow/exports/Spell.csv"

Disable bundling with -DSKYFIRE_DB_EDITOR_BUNDLE_SPELL_CSV=OFF.


Portable release (Windows)

For sharing or GitHub Releases, use the packaging script to produce a trimmed folder, a zip, and a single portable .exe (Keira3-style: one file to download and run).

From the repository root, after a Release build:

./contrib/SkyFireDBEditor/scripts/package-portable.ps1 -IncludeSpellCsv

Outputs (under build-skyfire-db-editor/dist/):

Artifact Purpose
SkyFireDBEditor-<version>-win64-portable.exe Recommended for users — double-click to run
SkyFireDBEditor-<version>-win64.zip Same contents as a folder, for manual extraction
SkyFireDBEditor-<version>-win64/ Staging folder (trimmed Qt deploy, no loose dev clutter)

The portable .exe extracts to %LOCALAPPDATA%\SkyFireDBEditor and launches the editor. Re-running the portable exe refreshes that folder (handy when updating).

Requirements: 7-Zip installed (standard on GitHub Actions runners) to produce the single-file .exe. Without 7-Zip, the script still produces the folder and zip.

GitHub Releases

A workflow at .github/workflows/skyfire-db-editor-release.yml builds and packages on demand:

  • Manual: Actions → SkyFireDBEditor Release → Run workflow
  • Tag: push a tag like db-editor-v0.2.0 to publish a GitHub Release with the portable exe and zip attached
git tag db-editor-v0.2.0
git push origin db-editor-v0.2.0

Common build issues

Could NOT find WrapVulkanHeaders

Harmless for this Widgets-only app. Ignore it.

Could NOT find MySQL

Qt ships its own FindMySQL.cmake which can conflict. SkyFireDBEditor prepends SkyFire's finder, but you must still point at your MySQL client:

-DMYSQL_ROOT="C:/tools/mysql/current"

Verify these exist:

C:\tools\mysql\current\include\mysql.h
C:\tools\mysql\current\lib\libmysql.lib

Qt Creator from Chocolatey is not enough

C:\tools\qtcreator contains the IDE and Qt runtime DLLs for running Creator, but not qmake, headers, import libraries, or windeployqt. Install the full Qt SDK separately.


Running and deploying (Windows)

Do not copy only Qt6Core.dll, Qt6Gui.dll, Qt6Widgets.dll

Qt also needs platform plugins. Without them you get:

This application failed to start because no QT platform plugin could be initialized

Recommended: windeployqt

After building, from the output folder:

cd C:\SkyFire_548\build-skyfire-db-editor\Release
C:\Qt\6.11.1\msvc2022_64\bin\windeployqt.exe SkyFireDBEditor.exe

This copies required Qt DLLs, the platforms\qwindows.dll plugin, and other dependencies.

If you rebuilt with the current CMakeLists, windeployqt also runs automatically on each build when it is found in your Qt install.

Manual fallback

If windeployqt is unavailable, place this layout next to the .exe:

Release\
  SkyFireDBEditor.exe
  Qt6Core.dll
  Qt6Gui.dll
  Qt6Widgets.dll
  libmysql.dll
  platforms\
    qwindows.dll        ← required; copy from Qt\6.x\msvc2022_64\plugins\platforms\

The folder must be named platforms and sit beside the executable.

Running from Qt Creator

  1. Open contrib/SkyFireDBEditor/CMakeLists.txt in Qt Creator
  2. Configure with your MSVC + Qt 6.11 kit
  3. Set -DMYSQL_ROOT=C:/tools/mysql/current in CMake initial parameters if needed
  4. Build and run — Creator handles deployment when using the Qt kit

Usage

  1. Launch SkyFireDBEditor.exe from the Release folder (after windeployqt).
  2. Open an editor from the sidebar; the connection dialog appears on first use.
  3. Enter MySQL host, credentials, and the world database name.
  4. Save a connection profile (optional; password is never stored).
  5. Search for an entity by ID or name, edit fields, and review generated SQL in the bottom panel.
  6. Copy the diff query for update files, or use the full query when backing up/creating a whole entity.
  7. Use Execute in the SQL panel to apply changes directly (always back up first).

Diff vs full query

  • Diff query: only the columns you changed (UPDATE ... SET ... WHERE ...). Best for SQL update files and small fixes.
  • Full query: DELETE + INSERT representing the entire row. Best for backing up or creating custom content.

Project layout

contrib/SkyFireDBEditor/
├── CMakeLists.txt
├── README.md
└── src/
    ├── core/          Database connection, SQL builder, table metadata, flag/SmartAI enums
    ├── ui/            Main window, connection dialog, SQL output, flag selectors
    └── ui/editors/    Creature, item, quest, SmartAI, SQL editors

Architecture follows Keira3's editor pattern in simplified form:

  • SingleRowEditorPage — reusable base for one-row entities (creature_template, quest_template)
  • FlagValueEditor / FlagSelectorDialog — bitmask editing for flag columns
  • SmartScriptsEditorPage — multi-row inline editor for smart_scripts
  • SqlQueryBuilder — generates diff/full SQL from original vs edited row data
  • TableMetadata — field groupings and tooltips for SkyFire 5.4.8 schemas
  • SmartAiOptions / SmartScriptComment — SkyFire enum values and comment generation

Field names in TableMetadata must match MySQL column names exactly as stored in the database (use SHOW COLUMNS FROM <table>). SkyFire often uses lowercase names such as name, displayid, and class even when the C++ loader queries mixed-case aliases.

To add a new editor:

  1. Add field definitions in src/core/TableMetadata.cpp
  2. Create a new *EditorPage extending SingleRowEditorPage (or EditorPage for multi-row)
  3. Register it in src/ui/MainWindow.cpp

Keira3-style sub-editor model (future)

Keira3 organizes editors by domain with multiple related tables under each sidebar entry. SkyFireDBEditor will adopt the same pattern over time. Example structure:

Domain Sub-editors (Keira3 parity)
Creatures Template, spawn, addon, template addon, equipment, model, text, formation, SmartAI
Vendors Vendor items (npc_vendor)
Trainers Trainer spells (npc_trainer)
Quests Quest template, quest POI, quest relations
Gameobjects Template, spawn, addon, SmartAI
Items Item template, enchantment template, item loot, disenchant loot, prospecting loot, mining loot
Loot Creature loot, gameobject loot, reference loot, fishing loot, etc.
Gossips Gossip menu, gossip options, conditions
Conditions conditions table with source/target pickers
SmartAI Standalone editor (done); later embedded in creature/gameobject editors

Current sidebar lists top-level editors only. Sub-editors will be added incrementally as each domain matures.


Roadmap / next actions

Priority order for reaching Keira3-like parity on SkyFire 5.4.8:

Phase 1 — Core editing quality (highest value)

  1. Complete creature_template fields — core columns covered; WDBVerified added
  2. Complete quest_template fields — full column set from SkyFire schema added
  3. Item editor (item_template)done in v0.1
  4. Gameobject editor (gameobject_template)done in v0.1

Phase 2 — SmartAI (high value for SkyFire work)

  1. Inline SmartAI editor — editable grid with event/action/target fields
  2. Enum-aware dropdowns — SkyFire SmartScriptMgr.h values for event/action/target types
  3. SAI comment generator — auto-fill the comment column
  4. Embed SmartAI inside Creature/Gameobject editors — Template | SmartAI tabs on creature and gameobject editors

Phase 3 — Keira3-style UX

  1. Dropdown selectorsAIName, MovementType, item fields, SmartAI enums done
  2. Flag/bitmask selectors — creature and gameobject flag fields
  3. Keira3-style sub-editors (initial) — tree sidebar with Creatures/Items/Quests groups; creature loot added
  4. Entity search dialogs — modal Browse... pickers for creature, item, quest, gameobject, SmartAI entry
  5. Item loot sub-editors — item loot, disenchant, prospecting, milling under Items
  6. Gameobject loot and reference loot editors — gameobject loot under Gameobjects; standalone Reference Loot under Loot; nested reference panel in loot editors

Phase 4 — Polish

  1. Entity previews — inline name resolution for item/quest/spell/creature ID fields with Wowhead links
  2. SQL update file exportExport... saves diff/full SQL to sql/pending_updates/world/ naming format
  3. Auth/characters DB support — optional connection to non-world databases (declined for now)
  4. Unused GUID search — Tools → GUID Search for creature/gameobject spawn GUIDs with strict related-table checks
  5. Vendor / gossip / conditions sub-editorsnpc_vendor, gossip_menu, and conditions editors with creature cross-links
  6. Gossip optionsgossip_menu_option editor under Gossips with menu cross-link
  7. Spawn / addon sub-editorscreature / gameobject spawn editors and creature_addon (join-based load/delete)
  8. Trainer sub-editornpc_trainer editor under Creatures with spell name previews

Suggested immediate next step

Embed SmartAI inside Creature/Gameobject editors or add item enchantment and other remaining Keira3-style sub-editors.


Notes

  • This tool edits live database content. Always back up before executing generated SQL.
  • Passwords are requested at runtime and are not written to saved connection profiles.
  • SkyFireDBEditor targets SkyFire 5.4.8 schemas; other emulator versions may differ.
  • Generated SQL should be consolidated into sql/pending_updates/world/ files using the SkyFire naming convention when committing fixes to the repo.

License

Follow the same license terms as Project SkyFire unless otherwise noted for contrib tooling.

About

Native Qt database editor for Project SkyFire 5.4.8 world DB (Keira3-inspired).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages