This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [TOOL] DBC to SQL Converter  (Read 10650 times)

Night

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 12
    • View Profile
[TOOL] DBC to SQL Converter
« 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

Output:
http://pastebin.com/sDiKyHaW

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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Chaya_

  • Registred Member
  • MWCS Enthusiast
  • *****
  • Posts: 1
    • View Profile
    • http://www.it-webservices.net
Re: [TOOL] DBC to SQL Converter
« Reply #1 on: May 19, 2014, 05:33:26 am »
Information

The selected attachment does not exist anymore.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Das Leben ist nicht immer gerecht zu einen !

Alastor

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1105
    • View Profile
Re: [TOOL] DBC to SQL Converter
« Reply #2 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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
No matter how fast light travels it finds the darkness has always got there first and is waiting for it
Star Citizen Referral Code : STAR-XNFS-HVL9

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: [TOOL] DBC to SQL Converter
« Reply #3 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

Alastor

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1105
    • View Profile
Re: [TOOL] DBC to SQL Converter
« Reply #4 on: May 29, 2014, 01:12:21 am »
ohh yes ...
if you need to do some mass Edit this will be very good way
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
No matter how fast light travels it finds the darkness has always got there first and is waiting for it
Star Citizen Referral Code : STAR-XNFS-HVL9

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: [TOOL] DBC to SQL Converter
« Reply #5 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

megasus

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 10
    • View Profile
Re: [TOOL] DBC to SQL Converter
« Reply #6 on: June 23, 2014, 05:05:05 pm »
Nice tool!

Do you think you could add db2 support, tho?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »