AddOn: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(→‎What is this .toc file?: Updated Interface Number)
No edit summary
Line 1: Line 1:
{{breadcrumb1|Interface Customization}} {{tocright}}
{{breadcrumb1|Interface Customization}} {{tocright}}
== 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, some can grow to be quite massive.
<div style="margin-left: 3%;">


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, an addon is just some files 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).
Often the name '''modification''' (or "mod" for short) is used interchangeably with '''addon'''. More specifically, mod is a third-party [[addon]] that alters or enhances some aspect of World of Warcraft's interface. Mods can perform a wide variety of tasks, including adding new buttons to the screen, altering the built-in player and party frames. In extreme cases, mods completely supplant the standard WoW [[UI|interface]], usually offering more advanced functionality.


Some mods are standalone, able to run without any additional software. Others are built on libraries such as [[Sea]] or [[Ace_(Addons)|Ace]]. Still others, such as [[Cosmos]], are compilations of many individually-developed mods.


Often the name '''modification''' (or "mod" for short) is used interchangeably with '''AddOn'''. More specifically, mod is a third-party [[AddOn]] that alters or enhances some aspect of World of Warcraft's interface. Mods can perform a wide variety of tasks, including adding new buttons to the screen, altering the built-in player and party frames. In extreme cases, mods completely supplant the standard WoW [[UI|interface]], usually offering more advanced functionality.
{{See also|[[Hosted Addon Pages]] for a list of addons hosted on the wiki. For a good introduction and explanation, please see [[UI FAQ|The Definitive Addon and Macro FAQ]].}}


Some mods are standalone, able to run without any additional software. Others are built on libraries such as [[Sea]] or [[Ace_(AddOns)|Ace]]. Still others, such as [[Cosmos]], are compilations of many individually-developed mods.
== 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.
* '''See [[Hosted AddOn Pages]] for a list of AddOn pages on the wiki.'''
* '''For a good introduction and explanation, please see [[UI FAQ|The Definitive AddOn and Macro FAQ]].'''
 
 
 
</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.
 
 
</div>


== What is this .toc file? ==
== What is this .toc file? ==
<div style="margin-left: 3%;">
{{infobox|'''.toc''' is short for "table of contents".}}
{{infobox|'''.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>".
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 name(s) of one or more files to load. However, Blizzard asks that you include at least these four lines:
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 three comment lines:


  ## Interface: 20003
  ## Interface: 20003
  ## Title: My Add On
  ## Title: My Add On
  ## Notes: A short description of my addon
  ## Notes: A short description of my addon
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.  
* 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.)
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.)


===Special case : [[Bindings.xml]]===
===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.
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?===
===What other keywords are there in the .toc file?===
Please check out [[The TOC Format]] for a more detailed list.
Please check out [[The TOC Format]] for a more detailed list.
</div>


== See Also ==
== See Also ==
<div style="margin-left: 3%;">
* [[UI Beginners Guide]] has plenty of reference links
* [[UI Beginners Guide]] has plenty of reference links
* [[The TOC Format]]
* [[The TOC Format]]
* [[Bindings.xml]] for creating key bindings
* [[Bindings.xml]] for creating key bindings
* [[UI FAQ/AddOns]]
* [[UI FAQ/Addons]]
* [[UI FAQ/AddOn Author Resources]]
* [[UI FAQ/Addon Author Resources]]
* [[Troubleshooting a mod]]
* [[Troubleshooting a mod]]
</div>


[[Category:Interface Customization]]
[[Category:Interface Customization]]
[[Category:AddOns| ]]
[[Category:Addons| ]]
[[Category:UI]]
[[Category:UI]]

Revision as of 04:06, 23 June 2007

Template:Breadcrumb1

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, some can grow to be quite massive.

In plain English, an addon is just some files 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).

Often the name modification (or "mod" for short) is used interchangeably with addon. More specifically, mod is a third-party addon that alters or enhances some aspect of World of Warcraft's interface. Mods can perform a wide variety of tasks, including adding new buttons to the screen, altering the built-in player and party frames. In extreme cases, mods completely supplant the standard WoW interface, usually offering more advanced functionality.

Some mods are standalone, able to run without any additional software. Others are built on libraries such as Sea or Ace. Still others, such as Cosmos, are compilations of many individually-developed mods.

Template:See also

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 three comment lines:

## Interface: 20003
## Title: My Add On
## Notes: A short description of my addon
  • 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.)

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 The TOC Format for a more detailed list.

See Also