PDA

View Full Version : Help Parsing itemcache.wdb


tok3n
11-05-2004, 07:57 AM
I am in the middle of working on my guild's DKP database and was looking for an accurate way to "upload" items found during raids. I figured I could parse the itemcache.wdb but even trying to read it seems to be hard. Not even sure what to use to open that file let alone read the structure.

I'm no programmer but have a basic understanding of PHP and MySQL. Does anyone have a good method/code to parse all parts of an item found in itemcache.wdb? Anyone have ALL possible item attributes?

I haven't decided if I want to make that upload directly to my site or not. Would it be pretty easy to just copy the text into an input box to parse when I want it to? I don't want to make a bug database of all items. Just of what good loot is found on a raid.

Also, what if I or another officer who is doing items is not using cosmos. I assume I would need to write my own UI to gather item info like cosmos does?

Where is good info on basics of WoW UI scripting?

WiZCoke
11-05-2004, 12:26 PM
The itemcache.wdb file contains all items your client ever saw so how on earth are you going to find the particular one you looted this raid among the thousands of other items. It doesnt only contain items you possessed but also all linked to in chat.

I am building up an item database at:

http://wow.gamergod.com/items.cfm

Those 5000+ items you see there come from 5 peoples cachefiles and I built a parser in Cold Fusion to parse and upload all items from a cachefile to our database. You can always upload your file there and let me parse it into our database and then you can copy the details.

There is some other recent post here where most bytes in the itemcache.wdb is defined.

tok3n
11-05-2004, 02:58 PM
Good point.

I guess I could make a UI where I can target a person or myself and activate the item cache. Then parse that and have the php script list the items so I can select (check box?) the ones I want to add to the database there and then. Then I can clear the cache file.

Is there anyway to look at the .wdb file without it looking all grabled? Normal txt editors do that.

Is this the thread you are refering to: http://www.cosmosui.org/forums/viewtopic.php?t=305 ?

All attributes of items have been found?

sarf
11-07-2004, 04:30 PM
Tok3n, the itemcache.wdb is a data file (not a text file).

It is created, maintained, and used by WoW itself, not the scripts. The scripts can't interact directly with it (but could interact with it indirectly by, for example, automatically /inspecting all players in range all the time).

Sarf
---
It's not easy to do nothing. You never know when you're done!

tok3n
11-08-2004, 05:26 AM
What items are put into ItemCache.wdb? Are they only items on you character and those you target? I tested that but I got a whole bunch of other items not on myself or the person I targeted (this was after the file was deleted).

sarf
11-08-2004, 09:30 AM
I think all items that your client "sees" gets put into the itemcache. I dunno what items your client will "see".

Sarf
---
Moderation is for monks.

WiZCoke
11-09-2004, 11:31 AM
It's definately all the items that the client sees - I use to leave my character in IronForge when I am AFK just to harvest items from the trade channel.

Inspecting other characters is a good idea and I think I will try to write a little macro to target and inspect people moving by. Lots of movement outside Auction House and Bank...

tok3n
11-11-2004, 07:28 AM
If anyone has very up to date info on the structure of itemcache.wdb and any MPQ/dbc files refered to by items in itemcache.wdb (such as spells.dbc) that would be great.

I just need to know how to parse itemcache.wdb and get the proper referenced IDs in the dbc files.

I'm trying to construct a nice item database for my guild and want to use itemcache.wdb. But even once I get that parsed, any spell effects will only be referenced to an ID so I need to get what IDs go with what effects, etc. That is in the MPQ files.

Now, can anyone think of any other referenced IDs? I can think of spell effects off of procs and maybe right click item effects (althought that might also be counted under spells). What else?

Realmrh
11-18-2004, 06:21 PM
even trying to read it seems to be hard .... not even sure what to use to open that file

i got the same problem excatly :(.
Anyone can tell me which methode or program i can use to read the wdb files the normal way? :D

tok3n
11-18-2004, 07:19 PM
WDB are in binary and as such must be read with a hex editor. I've been slowly getting through the structure. If you want some help, I may be able to show you on the right path but as I am learning it myself I don't know how much I can do :).

Realmrh
11-20-2004, 06:45 PM
thx 4 the tip.
I can open the File now. :D

I am trying to read the (itemcache) WDB-File(s) to store the informations in a simple Database (mysql).

Finaly i want to create a little Database for out Guild so i can put characterinformation (level, items, etc) on the Homepage.
But i dont realy know how to parse the informations from itemcache.wdb.
I miss a little tool that converts the binary WDB files into a "normal" fileformat - thats my ain problem :(.

Egris
11-20-2004, 08:20 PM
Here's a quick WDB Viewer I wrote yesterday, it can also export them to CSV. It only handles the creature and item file at this time. I have also made the source code available in VB6 for those that would like to look at it and/or customize it.

http://bwt.no-ip.com/wdb/wdb.jpg

Executable (http://bwt.no-ip.com/wdb/WDBViewer*****)
VB Source Code (http://bwt.no-ip.com/wdb/VB-source.zip)
If needed -> mshflxgd.ocx (http://www.zerohack.it/downloads/components/mshflxgd.zip)
VB6 Runtime (http://www.microsoft.com/downloads/details.aspx?familyid=7b9ba261-7a9c-43e7-9117-f673077ffb3c&displaylang=en)

sarf
11-20-2004, 08:49 PM
Neat work, Egris!

Thanks for sharing the code with the community!

<impressed>

Sarf
---
Pass the pickles.

Realmrh
11-20-2004, 08:55 PM
yes - great thx from my side too! :D

EDIT:
hmm is feedback wanted for the tool?
I am not realy good in VB - so i cant fix / edit somethings by myself - but i found some "Bugs":

1) i can only open itemcache.wdb and creaturecache.wdb - on other wdb-files i got this error:
http://www.cor-o-rodyn.de/download/error.jpg

2) i thought that ItemID is the unique attribute to identify a item or?
In my WDB are some items with double ItemIDs (not unique) - same on InventoryName (i thought Items have unique names but i am not sure :roll: )

Egris
11-21-2004, 07:13 PM
1) i can only open itemcache.wdb and creaturecache.wdb
It only handles those two files currently, I should have the new version sometime this afternoon.

2) i thought that ItemID is the unique attribute to identify a item or?
In my WDB are some items with double ItemIDs (not unique) - same on InventoryName (i thought Items have unique names but i am not sure :roll: )
ItemID's are unique there is a bug with the export that's stripping the first number from the ItemID's so it's showing duplicates, but the table should be accurate. I have this fixed in the new version already. InventoryName is not a unique field, two items can have the same name but different stats. This is really common in the gameobjectcache file because there a many "wooden chair's" but they use different models.

Realmrh
11-21-2004, 09:39 PM
Would be realy great if u update your tool - the tool is realy a great help :D.


ItemID's are unique there is a bug with the export that's stripping the first number from the ItemID's so it's showing duplicates, but the table should be accurate.

Last night i checked the exportet csv file and the list in our tool - and i came to the same end :D. Must be a bug in the export - the tooltable was ok. :D

Egris
11-21-2004, 11:12 PM
Would be realy great if u update your tool - the tool is realy a great help :D.

Updated. Same links as before.

-Fixed export bug
-can now read all wdb files!

If anyone figures out any columns that are marked unknown please post and I'll update the code.

Realmrh
11-22-2004, 03:48 AM
nice Update - very thx. ATM i dont find any bugs :D.

_Psycho
11-22-2004, 07:08 PM
Egris, email me at colsen24 AT hotmail dot COM

I will send you the item struct, from our "old" SC server source code if you know what it is, it should be pretty complete. Since you seem to have figure out most of the format already, i hope it will be usefull :)

I have some other struct from monsters cache and quest cache, etc if thats can be usefull for a guild DB, or something. (kinda like thottbot is doing anyway).

_Psycho

Realmrh
11-24-2004, 01:30 AM
so far so good.
WDB file is readable, WDB file is exportable, exported WDB Data is importable to a mysql-db.

The Item-DB could no start to work - but one little problem.
I dont understand the connection between "IconID" (in WDB File and mysql-db) and the Iconnames (nearly 2000 Icons found in the MPQ File and exportet / converted).

Anyone got a idea where the connection is?
For example:
IconID = 9906
IconName = INV_Shirt_05

*hamering head against wall since to nights* :D

Egris
11-24-2004, 02:39 PM
Anyone got a idea where the connection is?
For example:
IconID = 9906
IconName = INV_Shirt_05

IconID = 1st Column in ItemDisplayInfo.dbc
IconName = 5th Column in ItemDisplayInfo.dbc

Probably doesn't help you much unless you already have a dbc decoder. I have a couple written I'll try to get posted sometime this week. I had posted the source code of one on the BH forums but apparently they took down the server emulation section.

Realmrh
11-28-2004, 03:39 PM
hmm i am sure that i got a DBC Converter long time ago - early in the time of leaked Alpha-Versions months bevor the Beta release :(.


Maybe this is ur Post in BH Forum ... or the Post can help u? :D
push me (http://www.blizzhackers.com/viewtopic.php?p=1564402&highlight=#1564402)

Realmrh
12-08-2004, 01:35 PM
first - sry 4 doublepost but its many days ago :D


IconID = 1st Column in ItemDisplayInfo.dbc
IconName = 5th Column in ItemDisplayInfo.dbc

Probably doesn't help you much unless you already have a dbc decoder.

finaly i found the old dbc converter and i got all(?) IconID <-> IconNames.

Now i am trying to find the connection between SpellID <-> Spelltext.
This is mostly shown in the tooltip of consumable items like "restores XY health over YX time".
I found some information in the Spell.dbc but there a 2 fields which contains "text-information".
So my question is how do u get the information that IconID = 1st Column and IconName = 5th Column. I think SpellID = 1st Column ... but what Column excatly is the "text-information"? Any idea? :D

goodi
03-27-2005, 08:14 PM
- forget what I posted - :-)

Golemicus
12-01-2005, 10:58 AM
Here's a quick WDB Viewer I wrote yesterday, it can also export them to CSV. It only handles the creature and item file at this time. I have also made the source code available in VB6 for those that would like to look at it and/or customize it.[/url]

I try to use this useful software, but not work properly.
Da you have an upgrade?

I read that someone of you had create a coldfusion parser for this files, can you send me please.

Thank you very much

Golemicus

P.S. sorry for my bad english