Thursday, 4 December 2008

Armory XML: permanentenchant attribute decoded

Something that really bothered me with the previous reports was the mysterious "permanentenchant" attribute on each 'slot' element in the Armory's XML. It didn't correlate to anything useful on the usual fan sites, as far as I could tell it wasn't an 'item', 'spell' or 'object' ID as far as WowHead was concerned.

This morning I wrote a really simple script that does the following:
  • Collate a list of all the permanentenchant attribute values from my database.

  • For each permanentenchant ID:

    - Locate a character (realm & name) with that enchant in the correct slot in my database

    - Fetch the item tooltip for that character's enchanted slot and parse the 'enchant' element

Now I had a list mapping the permanentenchant ID to the text displayed in the tooltip '2669' -> '+40 Spell Power'. Pretty neat start, but not quite what I wanted - I needed to figure out that '+40 Spell Power' on a Weapon actually means 'Enchant Weapon - Major Spellpower'.

  • Next, I try a pretty dumb lookup on WowHead '+40 Spell Power' didn't work but others like 'Unholy Weapon' were correctly identified.

  • For anything that's left, I compare the '+40 Spell Power' to the huge enchantment list on WoWWiki and then return to WowHead with the name of the enchant as seen on WowWiki.

One clever thing I did add is the distinction between enchantments that are spells (by Enchanters) and enchantments that are items (Spellthread).

Thirty seconds later the script has finished and my list now maps:
permanentenchant:'2669' -> tooltip:'+40 Spell Power' -> spell:'27975'

The result of all this is I now publish an XML file from my database with all the permanentenchant ID's mapped either to a 'spell' or 'item' ID suitable for WowHead. There are a few in the list where both 'spell' and 'item' are 0 - these haven't been figured out and will require manual attention to update.

This XML File is published under a Creative Commons Attribution 3.0 License, you are free to copy, distribute and adapt the data provided credit is given to the source of the data (i.e. a link to my site).

New Dataz!


Justin said...

Hello. I have been trying to find a way to create a crawler/spider for wowarmory as well for data and statistics about the game. Can you share any information about the spider that you are using? Any information would be very much appreciated! Thanks!

Xew said...

Hey, its good to see your back. I was wondering, will you do a population (ally-horde) balance again where we can see whats the balance like between the two factions on the European realms. I'm really curious to see whats the population balance on Al'Akir (EU).