Modcraft - The community dedicated to quality WoW modding!

Projects => Software Development => Topic started by: Night on March 20, 2012, 09:38:19 pm

Title: [TOOL] DBC to SQL Converter
Post by: Night on March 20, 2012, 09:38:19 pm
Hey,
I just want to release an old project of mine, which may be usefull for some of you.

With this tool you can convert any given dbc file into a sql file. In order to do so, you have to specify the files format in a .xml file with the same name as the dbc.

For example Achievement.xml
http://pastebin.com/WHXxzC3z (http://pastebin.com/WHXxzC3z" onclick="window.open(this.href);return false;)

Output:
http://pastebin.com/sDiKyHaW (http://pastebin.com/sDiKyHaW" onclick="window.open(this.href);return false;)

20 more examples (for 3.3.5) are in the attached zip file.

XML Tags:
<primary> - This will tell the converter that this row should be used as the sql tables primary key. Gets parsed as an int.
<int> - Parses an int. Reads DBC.fieldsize bytes from the dbc file
<string x="n"> - This will parse a string. Replace n with the number of the following localisation indices (should be always 16). Nope, localisation isn't supported since I've never got any localized dbcs to play with.
<float> - Parses a float
<charArray x="n"> - Reads n characters directly from the current position in the file stream (not from the string block). Don't know if you actually need this, implemented it for debugging.


How does it work?
->Start the program.
->Klick on the button "choose dir" and select a folder which includes the dbc file you want to convert.
->Klick on the button "Start".
->Done! All converted files are now within the folder "sql".

The whole source code looks rather dirty since I've never finished this program, but maybe one of you guys get in use of it.

So far,
Night

PS: Written in C#. Sorry Linux and Mac users. Better get a proper operating system! :P
Title: Re: [TOOL] DBC to SQL Converter
Post by: Chaya_ on May 19, 2014, 05:33:26 am
Information

The selected attachment does not exist anymore.
Title: Re: [TOOL] DBC to SQL Converter
Post by: Alastor on May 21, 2014, 02:44:23 pm
Could i ask for is this ?
 i never needed DBCtoSQL at all and i don't even see why should someone even need this ?
i dont know ... maybe... someone will need this ...
i'm just looking for reason
Title: Re: [TOOL] DBC to SQL Converter
Post by: Steff on May 28, 2014, 06:06:46 am
If you have the dbcs in the mysql database you can use sql language to change or update the data.
I also do this with maruum.  Have written an editor that imports the dbcs to mysql.  This can now access all the data. What makes a powerfull and easy to use editor possible.
Title: Re: [TOOL] DBC to SQL Converter
Post by: Alastor on May 29, 2014, 01:12:21 am
ohh yes ...
if you need to do some mass Edit this will be very good way
Title: Re: [TOOL] DBC to SQL Converter
Post by: Steff on May 29, 2014, 09:10:11 am
Not only for mass edits. If you only work with mysql you often bave to put in dbc kd relations.  So open a dbc search the name add to mysql.  I just have a dropdown with dbc names and editor user dont have to care about numbers.
Title: Re: [TOOL] DBC to SQL Converter
Post by: megasus on June 23, 2014, 05:05:05 pm
Nice tool!

Do you think you could add db2 support, tho?