One annoying problem for armoury mining is that the armoury servers do not give the name of the enchant attached to an enchanted item. What you get are the bonuses granted by the enchant, along with a magic number key that references some internal Blizz data source.

The trick is to find the enchant that goes with the bonus, since the thingy that grants the bonus is what matters to players.

So we get bonus strings like +10 Defense Rating/+10 Stamina/+15 Block Value. But that’s not a lot of use unless I can tell you how to get these bonuses. What you need to know is that Presence of Might grants this. But nothing in the armoury gives us that link.

I must admit that I’d basically filed this one away in the too-hard basket – that’s why there is no enchant data on this site. But now my plan to do twink analysis means that I can no longer ignore the problem – it’d be a pretty tenth-rate twink that wasn’t enchanted up to the gills.

Fortunately, over at Armory Musings, Okoloth came up with an ingenious solution to this problem. You can read all about it here, but basically what he’s doing is searching various sites in the WoW datasphere for the bonus strings, and finding the matching enchant or item. Brilliant!

Okoloth produced an XML file that maps the enchants-to-bonuses he was able to discover. You can get that XML file from here. But being a do-it-yourself kinda bloke, I thought I’d have a go at the problem myself and see what I could do.

Now, when you mention search, one word pops into my mind straight away – starts with ‘G’… Fortunately, Google offers a way of using their data from software. It is possible to write a program that will get Google to search for a phrase, and return the search results in a structured form that in turn can be processed locally. In particular, you get the URL of the page, which is what we want for the link, and the title of the page – which should,with a bit of luck, be the name of the enchant spell or item. The rest of the page indexed by Google can be ignored – that’s the two pieces of data we’re after.

A bit of string-searching on the returned results for a well-known WoW database site like Wowhead or Thottbot is all that is required. The correct search results can be identified and written out to XML or whatever.

Google has a nice REST API, intended for embedding in webpages, but easily callable from your favourite programming or scripting language. There is even an open-source C# wrapper for those of us trapped in Billg-land. If you want to repeat this exercise from an MS environment, I highly recommend this, which hides all the googly grunge.

It didn’t take long to write the code and I was ready to boldly go where only one armoury datamining site had gone before. And it worked pretty well too; with a being as omniscient as Google on my side, how could I possibly lose?

Not every enchant bonus string is accurately found. Some are too vague. +2 Fishing gets a lot of hits on bait-and-tackle shops, for example. A few end up finding no matches for reasons I can’t quite fathom. But the vast majority of bonuses find a matching enchant spell or item, and the rest can be fixed up by hand.

Those ones that my software couldn’t match can generally be found by a manual search because they are buried away in tables such as those at WoWWiki.

The other problem is that a lot of enchants have links to both spells and items. Generally what we want is an item, if one exists, since that is what you have to obtain ingame to start the process. But that is not a fatal problem, since the spell-to-item cross-links can be found in the WoW database sites themselves. All I need to give you  is one link to Wowhead. When you get there, you’ll find the spells and items linked together and you can sort it all out quickly.

Okoloth made his XML file freely available so it would be remiss of me not to do the same. For some mad reason I can’t post XML here, so I’ve renamed the extension to .doc. But if you look inside you’ll see it is well-formed XML; just remove the .doc extension and you’re good to go. You can download it here: {link temporarily removed by me – see update}.

Thanks again to Okoloth for solving this irksome little problem!

UPDATE: Not quite there yet – I’ve removed the xml file download as the quality isn’t quite up to scratch. I’m still confident that this method will work but there are a couple of issues to work through before I release it.