WoW:Creating a WoW AddOn

From AddOn Studio
Revision as of 20:40, 2 August 2012 by Bear (talk | contribs) (Created page with "== Creating an AddOn == First of all, you need to create a new directory in Interface\AddOns. The name of this directory is kind of important, as it is what other AddOns use to r...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW AddOn


Creating an AddOn

First of all, you need to create a new directory in Interface\AddOns. The name of this directory is kind of important, as it is what other AddOns use to refer to your AddOn (in dependencies). Therefore, using version numbers in your AddOn directory name can be a bad idea; you will run the risk of having other AddOns "break" when you change the version. This will probably lead to people either not depending on your AddOn or, worse, that they'll keep using an old version.

Major version numbers as part of AddOn directory names might work, though.

Look at Getting started with writing addons to get a better idea of the structure of an addon.

Toc files

.toc is short for "table of contents".

A functioning AddOn will need a file named <YourAddOnDirectoryName>.toc in "Interface\AddOns\YourAddOnDirectoryName\".

This file needs to have two things - an interface keyword with a correct interface number, and the name(s) of one or more files to load. However, Blizzard asks that you include at least these five client recognized tag lines:

## Interface: 40000
## Title: My Add On
## Version: 1.0.0
## Notes: A short description of my AddOn
## Author: Your name or memorable descriptor (e.g. LuckyLuke)
  • Tip: Make sure you do not have any extra spaces at the end of the line with the filename specified. If you do, the extra space is taken as part of the filename and will cause your AddOn to silently fail to load.
  • Tip: The .toc file is not reloaded when you reload the user interface; if you make changes to it, you will need to quit all the way to the desktop before they take effect.

To get the latest interface number, see Getting the current interface number. The number in the .toc file must match the current build or the add on will not be loaded/active, unless the user has explicitly told WoW to load out-of-date Addons. If the .toc file declares an interface number prior to 2.0.0 (i.e. pre-The Burning Crusade), the AddOn can not be loaded, regardless of the load out of date AddOns setting.

  • 40300 is the current interface number as of March 9th, 2012

Bindings.xml

If you include a Bindings.xml file, it does not have to be included in your .toc list of files to load - WoW loads this file automatically. This file is used to set key bindings specific to the AddOn.

Other keywords in the toc file

Please check out The TOC Format for a more detailed list.

Troubleshooting an AddOn

As of Patch 2.3, if you get a message "Interface action failed because of an AddOn", this means that an AddOn interfered with the Blizzard UI in some way. To diagnose this, enter the following into chat "/console taintLog 1" and restart the game and try to reproduce it. If you reproduce it, you can quit the game and search through the file Logs\taint.log for the word "blocked" and mail the log to the author of the AddOn listed there. Once you have done this you can turn off logging by entering the following into chat "/console taintLog 0"

See also

Video Guides

<Youtube>Bfskba8B07g</Youtube> <youtube>22ukGjLugpQ</youtube> <youtube>zM6WjGgQCwQ</youtube>

References

See also

External links

Addon Providers

Updaters

General info

News

Template:Mists-inline &beta; News