Monday, February 16, 2009

World of Warcraft addon development is teh suXor

I’m leveling up a whole passel of toons. Six of them to be exact, and many of them have skinning as a profession. You can’t skin a corpse until you have looted it. Put those two together and you get “inventory is full”. A lot.

So I started writing an addon to notice when my bags filled up and destroy the cheapest grey item in my bag to make room for the new crappy loot item. When it was just that (find the single cheapest thing and get rid of it), it was all easy: just a bit of Lua code and Bob’s your uncle. Then I ran into the situation where I needed to loot two things before I could skin the mob. My addon destroyed the first item okay, but I was irked that I had to manually run the addon again to make room for the second crappy loot.

My friend SeanK suggested I open a window with some number of crappy grey items so I could easily click-to-destroy several of them at once. “No problem” I thought, and continued to think that right up until I actually tried to write the damned thing.

The documentation for the API is okay, such as it is, at WoWWiki. Blizzard of course doesn’t publish the API docs although I’m completely sure they have docs. But at least somebody is publishing something.

The big pain is the actual UI work. The UI is written in their FrameXML dialect (rather like XAML except really really poorly documented). The only saving grace was you can download a tool from Blizzard to extract all of the Blizzard-authored UI crap so you can see how they did it because really that’s all the docs they’re willing to share. Hmph.

The second big fly in the ointment is when you try to test the code. Lua errors in-game pop up a nice debugger window with stack traces and everything (from the !Swatter package, I think .. some addon I got as part of some other addon I wanted). But XML errors and your addon silently vanishes. Nothing. Nada.

And is there a schema file so you can validate your XML? Well, there’s a local copy embedded into the game files that you can extract via the Blizzard download tool, but why in the world does anybody do XML development environments without putting their schemata online at the URI where their namespace lives? Seriously … are you short the bandwidth or something?

Bah.

Anyway, I finally got a release candidate after about two hours of honest effort embedded over two days of full-time cursing/researching/ReloadUI() iteration. Man, I wish we (MSFT) would take on addon development seriously because we would put out some serious motherf*@#!ing tools because THAT’S THE MICROSOFT WAY.

4 comments:

Anonymous said...

You're gonna hate me.

http://www.codeplex.com/AddOnStudio

I'll pop for the next taco salad to make it up to you.

World of Warcraft Gold Guide said...

wow gold guide

Anonymous said...

...please where can I buy a unicorn?

Anonymous said...

Welche gute Phrase viagra viagra kaufen [url=http//t7-isis.org]viagra bestellen[/url]