binarymuse / php-dbc-parser Goto Github PK
View Code? Open in Web Editor NEWThis project forked from dorwido/php-dbc-parser
Parses dbc file data into a MySql database
This project forked from dorwido/php-dbc-parser
Parses dbc file data into a MySql database
You will need a mpq extractor to get the dbc files from the client for example: Ladik's MPQ Editor http://www.zezula.net/en/mpq/download.html Nice to have but not a must is a DBC tool which can show the content of the dbc files, this will help you to find the information, you need. I not gonna write for now a tutorial how to use such tools there should be enough of them to find one easy with google. This works only with MySql. Attention: I wrote this long time back for one of my projects, it was very specific written for it and I currently rewrite this for a more general use, its still work in progress. While I wrote this with allowing to parse for strings several languages at once this dont work currently. Best is to leave everything to "en" even you gonna parse a different languages, just put those files into the "en" folder. Also it seems some dbc files were changed and cant be parsed. If you dont want to have the work to build structures yourself then you can just use Parse DBC data after setting up the config, it includes ready to use structures for faction,itemclass,itemsubclass,skilline,achievement_criteria. This allows to lookup the names for: minFactionId, itemClass, itemSubClass, requiredSkill, achievement_criteria names and for which achievement they are. How to use: Open the config.php.sample and set the needed variables, save it as config.php and create the database(s) Next you need to put the dbc files you wanna parse into the subdirectoy "dbc\en". Now you can start the script from a commandline with php index.php Choose now option 1 to generate raw structures, these will be placed in the sub directory "raw_struct" In that file is now for every column in the dbc file "$this->GetUnknown()", because there is not meta saying what column hold which data, the unknown means the raw data is parsed. You can specifiy now different types based on what kind of data it is (to figure that a dbc tool is really helpfull), you have the choice between: GetInt(fieldname) GetUInt(fieldname) GetFloat(fieldname) GetString(fieldname,lang) Attention: As for now lang should be ALWAYS "en" Those values are a must, optional as last paramater you can add "primary" to set the field as a primary key, you can set more than one as a primary then a composite primary key will be created. If you are done setting up the files, copy all the files from "raw_struct" to "final_struct" Now press 2 to generate the final structure, the script will exit and you need to restart it Press 3 and all the dbc files will parsed and put into the database you specified, its not needed to create any tables that is done automatic. Example: I left a little example in how those structures could look for the ItemSubclass db, to use it just goto "dbc\en" rename "ItemSubClass.dbc.sample" to "ItemSubClass.dbc" "raw_structs" rename "ItemSubClass.dbc.sample" to "ItemSubClass.dbc" Generate a final struct from script and parse dbc data.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.