$ show cmangos/classic-db
This is the primary game content database for the CMaNGOS World of Warcraft Classic emulator (mangos-classic). It consists entirely of SQL migration files that define creature spawns, waypoints, loot tables, quest scripts, vendor lists, gameobject placements, and creature AI for the vanilla 1.12.1 game client. The repository is a curated dataset derived from multiple sources: official sniffs, web archives (Wowhead, Allakhazam), and cross-ports from other emulator databases (TDB, VDB, vmangos). Updates are applied sequentially via `InstallFullDB.sh` and require the matching mangos-classic core. The data is organized into a flat `Updates/` directory with numbered patches and subdirectories for instance-specific content. Notable patterns include a variable-based GUID allocation system to avoid collisions, extensive use of `spawn_group` for random formation spawns, `creature_spell_list` for data-driven creature AI, and reference loot templates for item pools. While tightly coupled to the MaNGOS schema, the data engineering patterns (idempotent SQL, user-defined variables for GUIDs, incremental updates with version tracking) are well-executed and could be adapted to other game database projects. The ACID subproject provides a standalone EventAI scripting system that is reusable across expansions.
The LLM identified 4 files worth highlighting for reuse:
A complete raid instance build for Molten Core, demonstrating reusable patterns: variable-based GUID ranges (@CGUID, @OGUID, @PGUID, @GROUP_ID, @PATH_ID) to avoid collisions, structured sections for creatures, gameobjects, spawn groups, formations, creature linking, pools, and addon data. This modular approach can be copied and adapted for any instance within the MaNGOS ecosystem.
The Artifical Creature Intelligence Database (ACID) for classic – a comprehensive set of EventAI scripts that govern creature combat behavior. This is a standalone, reusable component that pairs with ScriptDev2. It can be extracted and applied to any MaNGOS-based emulator to provide non-player combat AI without modifying core code.
A reusable batch script for finding and fixing common data quality issues in the world database, such as duplicate spawns, missing creature references, incorrect npcflag values, and orphaned entries. It follows a pattern of DELETE/UPDATE with self-joins and can be adapted to any MaNGOS database instance for routine maintenance.
A schema migration that adds displayid probability columns to creature spawning tables and populates them with calculated probabilities. This demonstrates a clean pattern for introducing new data-driven behavior via SQL alone, without requiring core engine changes. The approach is generalizable to any database that needs to randomize lookups from static probability distributions.