A Python utility that converts the Questie Lua database (used by the World of Warcraft addon) into a structured MySQL database.
The Questie addon for World of Warcraft stores quest data in Lua files. This tool parses those Lua files and converts them to a relational MySQL database schema, making it easier to query and analyze quest data.
- Parses Questie Lua database files from different WoW versions (Classic, TBC, WotLK)
- Creates a normalized database schema with appropriate tables and relationships
- Handles complex nested data structures
- Provides detailed inspection and testing capabilities for data validation
- Can output SQL directly to a file or to stdout for piping to mysql
- Direct MySQL import capability (requires mysql-connector-python)
- Python 3.6 or higher
- (Optional) MySQL server for importing the data
- (Optional) mysql-connector-python package for direct database connections
-
Clone this repository or download the
questie-converter.py
script. -
(Optional) Install the MySQL connector if you want to connect directly to a database:
pip install mysql-connector-python
Generate SQL file from a Questie database:
python3 questie-converter.py --input path/to/questieDB.lua --output output.sql
Print SQL to stdout:
python3 questie-converter.py --input path/to/questieDB.lua --stdout
Import directly to a MySQL database:
python3 questie-converter.py --input path/to/questieDB.lua --user myuser --password mypass --database wow_quests
--input PATH Input Lua file path (required)
--output PATH Output SQL file path
--stdout Output SQL to stdout instead of a file
--user USERNAME MySQL username
--password PASSWORD MySQL password
--database NAME MySQL database name
--host HOST MySQL host (default: localhost)
--port PORT MySQL port (default: 3306)
--debug Enable debug output
--inspect ID Inspect a specific quest ID
--test-nested ID Test nested structure parsing for a specific quest ID
Inspect a specific quest:
python3 questie-converter.py --input path/to/questieDB.lua --inspect 26034
Test nested structure parsing:
python3 questie-converter.py --input path/to/questieDB.lua --test-nested 26034
The script creates the following tables:
- quests: Main quest information (ID, name, level, requirements, etc.)
- quest_objective_texts: Quest objective text descriptions
- quest_starters: NPCs, objects, or items that start quests
- quest_finishers: NPCs or objects that complete quests
- quest_reputation_rewards: Reputation rewards for completing quests
- quest_relationships: Quest prerequisite and chain relationships
- quest_required_items: Items needed for quests
- quest_objectives: Required objectives to complete quests
python3 questie-converter.py --input wotlkQuestDB.lua --output wotlk_quests.sql
python3 questie-converter.py --input classicQuestDB.lua --user root --password mypass --database wow_classic
python3 questie-converter.py --input tbcQuestDB.lua --stdout | mysql -u username -p database_name
If you see an error like:
ModuleNotFoundError: No module named 'mysql'
You can either:
- Install the required module:
pip install mysql-connector-python
- Use file output instead with
--output
or--stdout
If you encounter issues with nested data structures (like {{id}}
or {{{id}}}
), try using the --test-nested
option to debug a specific quest:
python3 questie-converter.py --input questDB.lua --test-nested 26034
WotLK quest data has a specific structure with fields including:
- Field 1: Quest name
- Field 2: Quest starter NPCs (in format {{id}})
- Field 3: Quest finisher NPCs (in format {{id}})
- Field 4: Required level
- Field 5: Quest level
- Fields 6-7: Race and class requirements
- Field 8: Objective text
- Field 10: Objectives (in format {{{id}}})
- Field 17: Zone ID
- Field 23: Quest flags
The script handles these specialized nested formats to extract the correct IDs.
- The Questie addon team for their work on documenting WoW quest data
- Contributors to the WoW database documentation