User:Cogswobble/Addon Tutorial

I've been planning to create a couple of addons for WoW, so I figured I'd document my process as a tutorial for other who might be interested. Use the Nav bar at the bottom of the page to navigate through the tutorial.

If you have any questions, please put them on my talk page. Be sure to sign it so I know where to reply.

Building Addons
Building addons is not a trivial undertaking. There is a lot to learn (e.g. XML, Lua, and Blizzard's twist on both) before you ever start writing your addon. Then you will run into incomplete, bad, or out of date information. You are going to have problems with the code you write. Hopefully the errors will be obvious, but don't count on it. And when you finally get it working, Blizzard will change the interface on you.

That's not to say it's not worth doing. But realize that anything more than a trivial addon is going to take a while.

About me
I'm a software engineer in real life, so some of this stuff comes pretty easily for me. I'll try to explain what I'm doing, but don't expect this to be a programming tutorial. I don't really have time for that. I WILL point out things that I don't find to be very intuitive, especially to professional software engineers. And, I may occasionally bitch about things Blizzard has done when I disagree with it. It's my nature.

Download file editors (if desired)
You'll need to edit your TOC, XML, and Lua files with some tool. You can use Notepad (if you are running Windows), but other tools exist that might make your work easier and help manage your files. Check the main page under the Interface tab for Development Tools.

I'm currently using Addon Studio for World of Warcraft as it's built on Microsoft Visual Studio which I use at work.

Download the World of Warcraft Interface Addon Kit
Blizzard provides a kit with all of their user interface components and some of their code for managing it. You'll need this to reuse their components and to read through their code to figure out how to use some of it. Get the kit from: http://us.blizzard.com/support/article.xml?articleId=21466. Download the kit appropriate to your OS. (You might want to bookmark that page, as you will have to pull it back down when the UI version changes.

Extract the kit (some tools, like AddOn Studio, may want you to copy it to a specific place).