This AddOn is called OobieUtil and it does everything for me from automatically repairing my gear to rewriting my bandage macro to use the highest bandage available and automatically accepting invites from the guild leader during raid times.
OobieUtil does next to nothing graphically speaking, but it keeps my UI running smoothly - like engine oil as it were. I code into this mod many repetitive or convoluted procedures that clutter up the UI, distract me from the game or just plain annoy me.
To me, OobieUtil is as indispensable as DeadlyBossMods or a good action bar AddOn - I can't imagine playing without it. With a little inscturction anybody can accomplish much of what I do in my utility AddOn, it just takes a bit of copy/paste action and the right resources.
In this first tutorial I'll go over the basics of what you need for an AddOn... the basic infrastructure that you'll need to start coding modifications into your UI to streamline it. Here are some examples of things I do with this utility:
OobieUtil
- Provides notifications when my character is running low on ammunition i.e. Hunter ammo pouch or Warlock soul bag is below a certain percent full.
- Rewrites a bandage macro to use the highest available bandage. All characters share the same macro and it's automatically rewritten on character changes and inventory updates.
- Rewrites an assist macro via a slash command - more advanced version scans a party and automatically find the tank and rewrites the macro.
- Automatically watches a faction you've recently gained reputation with.
- Automatically repairs gear at a vendor using guild funds if the option is available.
- Rewrites a macro that will equip a lance or the weapon equipped at the time the lance was picked up. Knows which lance you picked up and adjusts the macro accordingly.
Note: This tutorial is for Windows PCs, though AddOns for Mac follow the same format some specific instructions in terms of how you interact with your OS may not translate properly.
HelloWorld
If you already know a bit about programming chances are that you've made a "Hello World" program before. It's generally the first program written when learning a new language - but don't let that intimidate you. There are a small handful of programming techniques that will help accomplishing certain tasks in an AddOn but for the most part the WoW API is very user friendly and a great deal of things can be accomplished without advanced programming techniques.
For this tutorial, however, I won't be talking about any techniques, just the framework needed for an AddOn.
Next you'll want to open Notepad or another text editor of your choice. Stay away from Office products when editing AddOn files, though. They tend to add unnecessary formatting tags that could cause your AddOn to not work properly. My own personal favorite is Notepad++.
Type or copy/paste the following into your text editor of choice:
## Interface: 30200Once you have this much typed in save the file with the name 'HelloWorld.toc' inside the folder we made earlier. Before you save make sure to change drop down menu below the file name box to say 'All Files' otherwise you may end up accidentally saving the file with an extra file extension, which WoW will not know what to do with.
## Title: HelloWorld
HelloWorld.lua
print("Hello World!")Once that's done save the file in the same folder with the name 'HelloWorld.lua'.
For the AddOn to do anything really meaningful in the game world you need to get into registering and handling events but that, dear reader, is for another tutorial.