AddOn: Difference between revisions
mNo edit summary |
(Add some of the intermixed links to See Also section. Yank links to addon collection pages here on wowwiki. Add breadcrumb. Formatting.) |
||
Line 1: | Line 1: | ||
== What is an AddOn? == | {{breadcrumb1|Interface Customization}} {{tocright}} | ||
== What is an AddOn? == <div style="margin-left: 3%;"> | |||
AddOns are generally self-contained User Interface (UI) modification components. AddOns can be dependent on other AddOns to work | AddOns are generally self-contained User Interface (UI) modification components. However, some AddOns can be dependent on other AddOns to work, and some AddOns are actually collections of other AddOns. There is no size restriction on AddOns - you can actually implement a whole AddOn collection as one big Lua+XML chunk. | ||
In plain English, it's just something you can put in your game folder that can (theoretically) improve your interaction with the World of Warcraft game (i.e. make it easier to play, or give you more information about what's going on in the game). | In plain English, it's just something you can put in your game folder that can (theoretically) improve your interaction with the World of Warcraft game (i.e. make it easier to play, or give you more information about what's going on in the game). | ||
Line 7: | Line 8: | ||
*'''For a good introduction and explanation, please see [http://forums.worldofwarcraft.com/thread.aspx?FN=wow-interface-customization&T=211489 The Definitive AddOn and Macro FAQ] (v3).''' | *'''For a good introduction and explanation, please see [http://forums.worldofwarcraft.com/thread.aspx?FN=wow-interface-customization&T=211489 The Definitive AddOn and Macro FAQ] (v3).''' | ||
First of all, you need to create a new directory in Interface\AddOns. The name of this directory is | </div> | ||
== How do I create an AddOn? == <div style="margin-left: 3%;"> | |||
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. | Major version numbers as part of AddOn directory names might work, though. | ||
== What is this .toc file? == | </div> | ||
== What is this .toc file? == <div style="margin-left: 3%;"> | |||
{{infobox|'''.toc''' is short for "table of contents".}} | |||
A functioning AddOn will need a file named <code><YourAddOnDirectoryName>.toc</code> in "<code>Interface\AddOns\YourAddOnDirectoryName\</code>". | A functioning AddOn will need a file named <code><YourAddOnDirectoryName>.toc</code> in "<code>Interface\AddOns\YourAddOnDirectoryName\</code>". | ||
This file needs to have two things - an interface keyword with a correct interface number, and the | 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 four lines: | ||
## Interface: 11000 | |||
## Interface: | |||
## Title: My Add On | ## Title: My Add On | ||
## Description: What my addon does | ## Description: What my addon does | ||
YourAddOnDirectoryName.xml | YourAddOnDirectoryName.xml | ||
* 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. | |||
The interface number can be seen in the WoW login screen, at the lower left. 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.) | |||
It's also probably a good idea to add a short description of your AddOn, since this is now displayed in the Addon List UI. To do so, simply add a line like the following after the Title or Description line: | It's also probably a good idea to add a short description of your AddOn, since this is now displayed in the Addon List UI. To do so, simply add a line like the following after the Title or Description line: | ||
Line 45: | Line 45: | ||
===What other keywords are there in the .toc file?=== | ===What other keywords are there in the .toc file?=== | ||
Please check out [[ | Please check out [[AddOn Keywords]] for a more detailed list. | ||
===More Information=== | ===More Information=== | ||
Line 51: | Line 51: | ||
For more information, see: [[The TOC Format]] | For more information, see: [[The TOC Format]] | ||
== | |||
</div> | |||
== See Also == <div style="margin-left: 3%;"> | |||
* [[UI Beginners Guide]] has plenty of reference links | |||
* [[AddOn Keywords]] | |||
* [[The TOC Format]] | |||
* [[Bindings.xml]] for creating key bindings | |||
</div> | |||
[[Category:Interface Customization]] | [[Category:Interface Customization]] | ||
[[Category:AddOns| ]] | [[Category:AddOns| ]] |
Revision as of 16:01, 12 June 2006
== What is an AddOn? ==
AddOns are generally self-contained User Interface (UI) modification components. However, some AddOns can be dependent on other AddOns to work, and some AddOns are actually collections of other AddOns. There is no size restriction on AddOns - you can actually implement a whole AddOn collection as one big Lua+XML chunk.
In plain English, it's just something you can put in your game folder that can (theoretically) improve your interaction with the World of Warcraft game (i.e. make it easier to play, or give you more information about what's going on in the game).
- For a good introduction and explanation, please see The Definitive AddOn and Macro FAQ (v3).
== How do I create 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.
== What is this .toc file? ==
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 four lines:
## Interface: 11000 ## Title: My Add On ## Description: What my addon does YourAddOnDirectoryName.xml
- 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.
The interface number can be seen in the WoW login screen, at the lower left. 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.)
It's also probably a good idea to add a short description of your AddOn, since this is now displayed in the Addon List UI. To do so, simply add a line like the following after the Title or Description line:
## Notes: Short desription of the Addon
Special case : 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.
What other keywords are there in the .toc file?
Please check out AddOn Keywords for a more detailed list.
More Information
For more information, see: The TOC Format
== See Also ==
- UI Beginners Guide has plenty of reference links
- AddOn Keywords
- The TOC Format
- Bindings.xml for creating key bindings