Menu

Welcome, Guest. Please login or register.
Did you miss your activation email?
December 06, 2021, 01:01:45 pm

Login with username, password and session length

Author Topic: [TOOL] ADB/DB2/DBC <-> CSV convert  (Read 21967 times)

Luzifix

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 71
    • View Profile
[TOOL] ADB/DB2/DBC <-> CSV convert
« on: December 29, 2015, 01:40:36 pm »

Current Version: 0.0.6 ALPHA

ADB/DB2/DBC <-> CSV convert


Download


[paragraph:364lsxr8]You can download the converter from my CDN:
http://cdn.lost-code.de/dbconvert/dbconvert.zip[/paragraph:364lsxr8]

Requirements


[paragraph:364lsxr8]The converter requires NET Framework 3.5[/paragraph:364lsxr8]

How to use


[paragraph:364lsxr8]Before you can convert a db2 or dbc to csv, you most be sure you have a map for it.
the maps you found in the map.xml file.
If you have a map for your db2/dbc, you most only drag the db2/dbc over the dbconverter.exe and its work.

Allow DataTyps: uint8, int8, uint16, int16, uint32, int32, uint64, int64, string/char/std::string, float/single, double[/paragraph:364lsxr8]

Changelog


[paragraph:364lsxr8]Version 0.0.6 ALPHA
  • Add ADB support
  • Fix crash by unknow file format

Version 0.0.5 ALPHA
  • Add update check
  • Update copyright to 2016

Version 0.0.4 ALPHA
  • Add uint64 & int64 support

Version 0.0.3 ALPHA (WARNING: Version 0.0.3 cant read the old CSV files)

Version 0.0.2 ALPHA
  • A issue in string read fixed
  • Add char & std::string to allow DataTypes
  • Add CriteriaTree.dbc map

Version 0.0.1 ALPHA
  • Release the Converter
[/paragraph:364lsxr8]

Contributing


[paragraph:364lsxr8]
  • Cromon
  • KroniX
[/paragraph:364lsxr8]

Screenshots


[paragraph:364lsxr8]
http://cdn.lost-code.de/dbconvert/screenshot1.jpg


http://cdn.lost-code.de/dbconvert/screenshot2.jpg


http://cdn.lost-code.de/dbconvert/screenshot3.jpg


http://cdn.lost-code.de/dbconvert/screenshot4.jpg


http://cdn.lost-code.de/dbconvert/screenshot6.jpg[/paragraph:364lsxr8]
« Last Edit: January 22, 2016, 08:06:42 pm by Admin »

Chase

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 116
    • View Profile
Re: [TOOL] DB2/DBC <-> CSV convert
« Reply #1 on: December 29, 2015, 07:25:01 pm »
Why don't you auto detect the types like other dbc converters.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [TOOL] DB2/DBC <-> CSV convert
« Reply #2 on: December 29, 2015, 08:11:27 pm »
Quote from: "Chase"
Why don't you auto detect the types like other dbc converters.
that kind of auto detection nearly always is broken. either crawl dbcmeta in the binary, or require such a crawled definition.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Luzifix

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 71
    • View Profile
Re: [TOOL] DB2/DBC <-> CSV convert
« Reply #3 on: December 29, 2015, 11:01:50 pm »
Quote from: "schlumpf"
Quote from: "Chase"
Why don't you auto detect the types like other dbc converters.
that kind of auto detection nearly always is broken. either crawl dbcmeta in the binary, or require such a crawled definition.

Yes auto detect the types of the columns is not really good.
And DBC and DB2 Maps you found really simple. In Any Trinity based core you found it

SkyFire 5.4.8:
DB2: https://github.com/ProjectSkyfire/SkyFi ... tructure.h
DBC: https://github.com/ProjectSkyfire/SkyFi ... tructure.h
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Luzifix

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 71
    • View Profile
Re: [TOOL] DB2/DBC <-> CSV convert
« Reply #4 on: December 30, 2015, 03:39:21 am »
Screenshot from GUI version http://i.imgur.com/iPVtdKQ.png (currently in development)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: [TOOL] DB2/DBC <-> CSV convert
« Reply #5 on: December 30, 2015, 11:09:50 am »
I didn't have chance to test this tool yet so I don't know any drawbacks/bugs it can have but if it really works clearly then damn good job.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

Luzifix

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 71
    • View Profile
Re: [TOOL] DB2/DBC <-> CSV convert
« Reply #6 on: December 30, 2015, 03:28:30 pm »

//Update v0.0.2

« Last Edit: January 01, 1970, 01:00:00 am by Admin »

azeroc

  • Registred Member
  • MS Paint Freak
  • *****
  • Posts: 3
    • View Profile
Re: [TOOL] DB2/DBC <-> CSV convert
« Reply #7 on: January 02, 2016, 04:05:01 pm »
Tried quickly dumping down Item-sparse.db2 on the tool and it converted to .csv fine, however, if I took that same .CSV and dumped it on the tool, then it would error out with this:
Info: Open File Item-sparse.csv...
Info: Read Mapping...
Info: Read Header...
Info: Write DB2 Records...
Error: Index was outside the bounds of the array.

I double-checked map.xml and the format of Item-sparse.db2 was indeed correct (I was using MoP 548 Item-sparse.db2). Item.db2, however, converted without problems between CSV and DB2.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Luzifix

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 71
    • View Profile
Re: [TOOL] DB2/DBC <-> CSV convert
« Reply #8 on: January 02, 2016, 06:06:18 pm »
Quote from: "azeroc"
Tried quickly dumping down Item-sparse.db2 on the tool and it converted to .csv fine, however, if I took that same .CSV and dumped it on the tool, then it would error out with this:
Info: Open File Item-sparse.csv...
Info: Read Mapping...
Info: Read Header...
Info: Write DB2 Records...
Error: Index was outside the bounds of the array.

I double-checked map.xml and the format of Item-sparse.db2 was indeed correct (I was using MoP 548 Item-sparse.db2). Item.db2, however, converted without problems between CSV and DB2.

can you upload the CSV ?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

azeroc

  • Registred Member
  • MS Paint Freak
  • *****
  • Posts: 3
    • View Profile
Re: [TOOL] DB2/DBC <-> CSV convert
« Reply #9 on: January 02, 2016, 07:23:41 pm »
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Luzifix

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 71
    • View Profile
Re: [TOOL] DB2/DBC <-> CSV convert
« Reply #10 on: January 03, 2016, 12:00:46 pm »
Quote from: "azeroc"
Here ya go:
https://mega.nz/#!f9BFnL7A!2A96AHxM5Jhg ... gWAw2d09ng

Your Problem is fixed with the new Update 0.0.3
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Luzifix

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 71
    • View Profile
Re: [TOOL] DB2/DBC <-> CSV convert
« Reply #11 on: January 03, 2016, 12:01:18 pm »

//Update v0.0.3

« Last Edit: January 01, 1970, 01:00:00 am by Admin »

azeroc

  • Registred Member
  • MS Paint Freak
  • *****
  • Posts: 3
    • View Profile
Re: [TOOL] DB2/DBC <-> CSV convert
« Reply #12 on: January 04, 2016, 08:15:40 am »
Quote from: "Luzifix"
Quote from: "azeroc"
Here ya go:
https://mega.nz/#!f9BFnL7A!2A96AHxM5Jhg ... gWAw2d09ng

Your Problem is fixed with the new Update 0.0.3

Yup, it has been. Much thanks!
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Synric

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 57
    • View Profile
Re: [TOOL] DB2/DBC <-> CSV convert
« Reply #13 on: January 06, 2016, 05:27:11 am »
I could be wrong, but I think to convert spell.dbc we also need support for uint64. wowdev is 64+32 for SpellFamilyFlags, trinitycore is flag96 (which is just uint32+uint32+uint32). It's a clean convert with the only change on converting CSV back to DBC being replicating the final spell with a new spell ID, incase you need to test it yourself.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Luzifix

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 71
    • View Profile
Re: [TOOL] DB2/DBC <-> CSV convert
« Reply #14 on: January 06, 2016, 12:44:53 pm »
Quote from: "Serendipity"
I could be wrong, but I think to convert spell.dbc we also need support for uint64. wowdev is 64+32 for SpellFamilyFlags, trinitycore is flag96 (which is just uint32+uint32+uint32). It's a clean convert with the only change on converting CSV back to DBC being replicating the final spell with a new spell ID, incase you need to test it yourself.

Thx for the info, its come with the next update :)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »