AddOn: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
== What is an AddOn? ==
== What is an AddOn? ==


AddOns are, basically, somewhat self-contained UI pieces. AddOns can be dependent on other AddOns to work though. There is currently no size restriction on AddOns, so you can make one huge lump of lua/xml if you want.
AddOns are generally self-contained User Interface (UI) modification components. AddOns can be dependent on other AddOns to work though, and some AddOns are actually collections of other AddOns. There is currently no size restriction on AddOns (so you can make one huge lump of lua/XML if you want).
 
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 explination, please see [http://forums.worldofwarcraft.com/thread.aspx?FN=wow-interface-customization&T=163945&P=1 The Definitive AddOn and Macro FAQ] (v2).'''


== How do I create an AddOn? ==
== How do I create an AddOn? ==
Line 11: Line 15:
== What is this .toc file? ==
== What is this .toc file? ==


You need to create a file named <YourAddOnDirectoryName>.toc in "Interface\AddOns\YourAddOnDirectoryName\".
'''.toc''' is short for 'table of contents'
 
A functioning AddOn will need a file named <code>&lt;YourAddOnDirectoryName&gt;.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 filename of an xml file you want to load. However, Blizzard asks that you include at least four lines.
This file needs to have two things - an interface keyword with a correct interface number, and the filename of an xml file you want to load. However, Blizzard asks that you include at least four lines.
Line 21: Line 27:
  YourAddOnDirectoryName.xml
  YourAddOnDirectoryName.xml


''Note'': Ensure you don't have any extra spaces at the end of the line with the filename specified. The extra space is taken as part of the filename and will cause your AddOn to silently fail to load. --[[User:Talonius|Talonius]] 08:46, 17 Dec 2004 (CST)
: 'TIP': Make sure you don't 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.  


Interface number for US as of March 22: 1300 (Yes, we know the logon page says 4284. It's lying again)
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.
Current Interface number for EU as of March 30: 1300 same like US shows 4284


''Note'': 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. ''This number has been incorrect for the past two patches. Use the Interface Customization Kit Blizzard provides for the real number''
Note: ''This number has been incorrect for the past two patches. For example, the Interface number for the United States (US)version, as of March 22 2005, is 1300, not "4284" as listed on the login screen. (As of March 30 2005, this is true for the
European (EU) version as well.)''<br>
Use the Interface Customization Kit that Blizzard provides to determine the real Interface number.''


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, 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:


  ## Notes: Short desription of the Addon
  ## Notes: Short desription of the Addon
Line 47: Line 53:
See [[Cosmos AddOns]] for [[Cosmos]]-specific Add-Ons
See [[Cosmos AddOns]] for [[Cosmos]]-specific Add-Ons


[[Category:Interface Customization]]
[[Category:Interface Customization]][[Category:AddOns]]

Revision as of 19:25, 10 July 2005

What is an AddOn?

AddOns are generally self-contained User Interface (UI) modification components. AddOns can be dependent on other AddOns to work though, and some AddOns are actually collections of other AddOns. There is currently no size restriction on AddOns (so you can make one huge lump of lua/XML if you want).

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).

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 kinda important, as it is what other AddOns use to refer to your AddOn (in dependencies and stuff). I would therefore recommend that you do not use version numbers in your AddOn directory name, or you will run the risk of having other AddOns "break" when you upgrade 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?

.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 filename of an xml file you want to load. However, Blizzard asks that you include at least four lines.

Minimal .toc file contents:

## Interface: 1500
## Title: My Add On
## Description: What my addon does
YourAddOnDirectoryName.xml
'TIP': Make sure you don't 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.

Note: This number has been incorrect for the past two patches. For example, the Interface number for the United States (US)version, as of March 22 2005, is 1300, not "4284" as listed on the login screen. (As of March 30 2005, this is true for the European (EU) version as well.)
Use the Interface Customization Kit that Blizzard provides to determine the real Interface number.

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.

For a more detailed look on Bindings.xml, click the wiki word.

What other keywords are there in the .toc file?

Please check out AddOn_Keywords for a more detailed list.

What Addons are available?

See Community AddOns List for a list of current Add-Ons.
See Cosmos AddOns for Cosmos-specific Add-Ons