WDB to CSV updated (v1.5)

Here it is, the latest patch. Works with BC and non BC clients.

CurseGaming Mirror (always up to date)
Local Mirror (version 1.5)

Enjoy, please comment if there are any issues.

32 Responses

  1. Tim Stoop Says:

    Hi, nice work on the program. But… it doesn’t seem to work! It only seems to detect two items…

    This is the output:

    Signature matches itemcache.wdb
    WARNING: Number of fields does not match definition,
    Temporarily adjusting fieldsize, this may be an older/newer version.

    NEW FIELD INFO:
    New fields: 3

    2 records loaded.

    The items are “Footpad’s Shirt” and “Footpad’s Pants”. But… It seems to start with some sort of offset that’s incorrect. “Footpad’s Shirt” should be ID “49″, which it recognises correctly. “Footpad’s Pants” shoult be ID “48″, but it finds “262144″. There seems to be an offset when reading the second item? Also, name 1 is displayed as “otpad’s Pants”. So it seems to start 2 bytes late?

    Also, do you have any idea where I can get a mapping of item-enchantment (”of the Bear”, “of the Eagle”, etc.) and the actual changes?

  2. Jb55 Says:

    I can tell your still using an older version because the newer one does not output new field info.

  3. Tim Stoop Says:

    Uhm, then you’re distributing old source :) I downloaded it from here, but had to recompile because I’m on a mac :)

  4. Jb55 Says:

    Ah yes, this is true. I haven’t been putting the latest source in because I’ve started reworking the whole thing so I could implement it into another program I have been working on.

    Here it is: http://www.jb55.com/_files/wdbtocsv15src.zip

  5. Tim Stoop Says:

    Thx man! Now to find out how to compile this :)

  6. Tim Stoop Says:

    Ah, too bad, you’re using strcpy_s, strcat_s, fopen_s and sprintf_s, which aren’t standard C and only work in Windows :( Ah well.

  7. Jb55 Says:

    It should work just fine by removing the _s and adjusting the parameters, but yeah I never coded it with cross-platform use in mind.

  8. Tim Stoop Says:

    Aye, did that and it works… sort of… Again, only 2 records and the ItemID of the second record is 4294967295, which is about 0xFFFFFFFF I think :) Could you point me to the part in the code where I could add a jump forward for 4 bytes?
    For the record, I’ve never programmed in C , fixed the code by google’ing and IRC :) Kinda proud of myself :P

  9. Jb55 Says:

    oh and make sure #define _BC is 1

  10. Tim Stoop Says:

    That helped, thx :) Mail me if you want a Unix/MacOSX compatible version.

  11. Joe Says:

    I wouldn’t mind a link to a working unix souce/compile, joefilas@gmail.com. Thanks. Nice work JB.

  12. Xavior Says:

    Thanks JB, new version works great.

  13. Joe Says:

    Having some issues parsing (and displaying in Excel) string fields (in questcache) that contain ” chars. \” appears to work for CSV parsers for not excel. Mail me for a sample wdb if desired, JB.

  14. Jb55 Says:

    Yeah nested quotes don’t fare well in excel it appears, even with escape characters. I’ll implement the escape character in the next version…

  15. tom Says:

    It works great with current WoW, but it fails on PTR for patch 2.1.
    Just to inform you. ;)

  16. laich321 Says:

    Can not smoothly conversion not English department crosspiece

    example:http://statue.sayya.org/wowdb/itemstats/WDB.rar

  17. Secosera Says:

    Darshu, email me, I need to get in touch with you.

  18. j0rma Says:

    wdb2csv 1.5 and wowclient bc v2.1 (enGB)
    when using on 5mb itemcache.wdb I only get a single record

    ..Cache\WDB\enGB>wdbtocsv itemcache.wdb
    ** WDB to CSV**
    by: Jb55
    Website: http://www.jb55.com
    Contact: jackbox55@gmail.com

    Signature matches itemcache.wdb (132 defined fields)
    1 records loaded.

    I could upload the wdb file if that helps in any way, just curious if there’s any way to get the rest of the data.

  19. zeeman Says:

    I’m getting the same problem. 1 row with latest 2.1 patch. Awesome program though. Hoping you have a v16 in the works. Cheers!

  20. zeeman Says:

    A little more info on my previous post. All the files failed to parse more than one line. I looked at BC v2.1.2 (build 6803). I had an old version of itemcache.wdb (build 6320, two builds old). It looks like there are 4 additional bytes per item record in the latest build. I didn’t have a copy of build 6337 to compare.

  21. Minister Says:

    Jb55,

    Any chance you will be publishing a fix for this converter? I am really reluctant to touch your code and even less so to tackle it when you’re so close to perfection. Also, I really enjoyed that you publish the executable version on Curse. This was a big help to me, even if it didn’t get more than one row.

    Thanks,

    Minister.Kel’Thuzad

  22. player Says:

    I can not Converts WDB cache files, use your tool of WDB to CSV v1.5.
    This tool can not Converts WDB, at Wow of Taiwan (v2.1.3).

    Maybe, WDB have many strings of UTF8.

    can you help me?
    I want data of WDB, build my WowWiki web.

    ex.
    itemcache.wdb (7573KB) -> itemcache.wdb.csv (4KB)
    questcache.wdb (424KB) -> questcache.wdb.csv (2KB)

    Why?

  23. player Says:

    my wow WDB Files.
    http://www.player.idv.tw/WDB_enTW.zip

  24. player Says:

    void parseWDB()
    {
    CWDBRecord tRec;
    wdbfield_t tField;
    wdbfield_t recID,recSize;
    wdbfield_t *pm_data = (wdbfield_t*)m_data;
    wdbfield_t *pm_dataSafe; //安全機制
    char *pcm_data;
    u16 *psm_data;
    u32 sLen;
    int i;

    // 0xFFFF is just a random number I chose, simply to avoid infinite loops
    // which shouldn’t happen anyways…
    for(i=0;i= m_datasize)
    break;

    // break if invalid ID
    if(recID.uivalgetNumFields();j )
    {

    // if the field is a string, the wdbfield will simply contain a pointer to the string
    // in the m_data block
    if (m_def->getFieldType(j) & t_str)
    {
    sLen = strlen((char*)pm_data);
    tField.pchar = (char*)pm_data;

    pcm_data = (char*)pm_data;
    pcm_data = sLen 1;
    pm_data = (wdbfield_t*)pcm_data;
    }
    // special case that occurs in creaturecache.wdb
    else if(m_def->getFieldType(j) & t_special2byte)
    {
    u16 sField;
    psm_data = (u16*)pm_data;
    sField = *psm_data;
    tField.uival = (u32)sField;

    psm_data ;
    pm_data = (wdbfield_t*)psm_data;
    } else {
    tField = *pm_data; pm_data ;
    }

    tRec.addField(tField,j);
    }

    m_records.push_back(tRec);

    //安全機制
    pm_data = pm_dataSafe;
    }

    printf(”%i records loaded.\n”,i);

    }

  25. player Says:

    http://www.player.idv.tw/wow/index.php?title=Wdb-to-csv

    I edit some code of this Tool.

  26. David Says:

    I downloaded and unzipped your 1.5v WDB converter into a folder named WBD Converter. I then dragged and dropped my WBD file onto the wdbtocsv.exe file and nothing happened. I searched for the CSV file to see if one was created someplace else but couldn’t find it. Any help would be appreciated.

  27. Fix For creature.wdb Says:

    void CWDB::parseWDB()
    {

    u8 *spsm_data;

    // special case that occurs in creaturecache.wdb
    else if(m_def->getFieldType(j) & t_special2byte){

    u8 sField;
    spsm_data = (u8*)pm_data;
    //psm_data = (u16*)pm_data;
    sField = *spsm_data;
    tField.uival = (u32)sField;

    spsm_data ;
    pm_data = (wdbfield_t*)spsm_data;

  28. Fix For creature.wdb ...continued Says:

    void LoadDefinitions(){

    CWDBDef def;

    // creaturecache.wdb (BOMW)
    def.setWDBName(”creaturecache.wdb”);
    def.setSignature(”BOMW”);

    // 15 fields
    //21
    def.addField(t_uint,”CreatureID”, 0);
    def.addField(t_uint,”Entry Size”, 0);
    def.addField(t_str,”Name 1″, 0);
    def.addField(t_str,”Name 2″, 0);
    def.addField(t_str,”Name 3″, 0);
    def.addField(t_str,”Name 4″, 0);
    def.addField(t_str,”Description”, 0);
    def.addField(t_str,”NA”, 0);
    def.addField(t_uint,”", 0); // unknown
    def.addField(t_uint,”TypeID”, 0);
    def.addField(t_uint,”FamilyID”, 0);
    def.addField(t_uint,”FlagID”, 0);
    def.addField(t_undefined,”", 0); // unknown
    def.addField(t_uint,”SpellDataID”, 0);
    def.addField(t_uint,”IconID”, 0);
    def.addField(t_undefined,”DisplayID2″, 0); // unknown
    def.addField(t_undefined,”DisplayID3″, 0); // unknown
    def.addField(t_undefined,”DisplayID4″, 0); // unknown

    def.addField(t_uint,”", 0);
    def.addField(t_uint,”", 0);

    def.addField(t_special2byte | t_uint,”", 0); // stupid 2byte field!

    gDefList.push_back(def);

  29. jb55 Says:

    Yeah the program hasn’t worked in awhile. I haven’t seen any other programs pop up to replace it yet either… Well since auto-detection of field changes is pretty much impossible at this point I was thinking about rewriting the whole thing to allow the definitions to be modified from an xml file, but due to school I haven’t really gotten around to it.

    Check back everynow and then or subscribe to the rss to see my status on the project, I’ll try to make a post to update my progress when I get around to it.

  30. Random Name Says:

    Doh! No longer works? Bummer. I REALLY need a library to parse the itemcache.wdb. Guess I’ll keep looking.

  31. jb55 Says:

    Well it works, it just needs the definitions updated. Updating the program every patch gets ridiculous (you can’t simply read the header and guess fields like dbc files), so an updating xml file would be ideal.

  32. newbie Says:

    nice to see that u want return back to development,
    It’s really needed, coz there is no any wdb converter, and it’s borrows too much time to take info from sites

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.