WoW:AddOn: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{uiaddon}}
{{uiaddon}}
This is the [[WoW AddOn]] development main reference. Use '''Reference''' for detailed information, '''Guides''' for getting started and further understanding, and '''Summary''' for overall concepts details. See [[AddOns]] for information on the general ''AddOn'' term used in WoW.
This is the WoW [[AddOn]] main technical reference. WoW AddOns allow for altering and customizing the game, specifically through the [[user interface]].
 
Use the '''Reference''' section for detailed information, '''Guides''' for getting started and further understanding, and '''Summary''' for overall concepts details. See [[AddOns]] for information on the general ''AddOn'' term used in WoW.


== Reference ==
== Reference ==
Line 16: Line 18:
=== Content Files ===
=== Content Files ===
* [[BLP file]] · - Main WoW art and texture format.
* [[BLP file]] · - Main WoW art and texture format.
* [[TGA file]] · - ALternative WoW art and texture format.
* [[TGA file]] · - Alternative WoW art and texture format.
* [[Edge file]] · - Texture file with special layout for use as a border.
* [[Edge file]] · - Texture file with special layout for use as a border.


Line 32: Line 34:
* [[Real Addon, Real Tutorial]]
* [[Real Addon, Real Tutorial]]


* [[Getting started with writing AddOns]]
* [[Getting started with writing addons]]
* [[AddOn programming tutorial]]
* [[AddOn programming tutorial]]
* [[UI beginner's guide]] has plenty of reference links
* [[UI beginner's guide]] has plenty of reference links
* [[Creating a WoW AddOn]]
* [[Creating a WoW AddOn]]
=== FAQs ===
=== FAQs ===
* [[UI FAQ/AddOns]]
* [[UI FAQ/AddOns]]
Line 43: Line 46:


== Summary ==
== Summary ==
WoW is capable of loading special files used to describe and create UI elements and code. WoW uses these files to create User Interface functionality for its own interface. These files and facilities can also be used for creating custom user UI functionality, or [[AddOn]]s for WoW. Before getting started, every developer should read familiarize themselves with the [[Blizzard AddOn Policy]].
WoW uses [[AddOn]]s in-part to create functionality for its own user interface. WOW users are allowed load their own addons.
 
These user created addons allow for custom UI functionality in the game. Before getting started, every developer should read familiarize themselves with the [[Blizzard AddOn Policy]].


Example file layout anatomy of a basic [[WoW AddOn]]:
== Layout ==
Example anatomy, or file layout, of a basic WoW AddOn:


* {WoW Install} (folder) - your WoW installation folder
* {WoW Install} (folder) - your WoW installation folder
** Interface (folder)
** Interface (folder)
*** AddOns (folder)
*** AddOns (folder)
**** MyAddOn (folder) - your addons own folder, must match the .toc name
**** MyAddOn (folder) - your addon's own folder, must match the .toc name
***** MyAddOn.toc ([[WoW AddOn/TOC File|TOC File]]) - WoW AddOn "manifest" file
***** MyAddOn.toc ([[TOC file]]) - WoW AddOn "manifest" file
***** MyAddOn.xml ([[FrameXML]]) - [[XML]] file with visible element definitions
***** MyAddOn.xml ([[FrameXML]]) - [[XML]] file with visible element definitions
***** MyAddOn.lua ([[Lua]]) - [[Code]] file, with instructions for AddOn behavior
***** MyAddOn.lua ([[Lua]]) - Code file, with instructions for AddOn behavior




This example establishes a WoW AddOn named 'MyAddOn' with one xml frame file and one lua code file.
This example establishes a WoW AddOn named 'MyAddOn' with one xml frame file and one lua code file.
=== Classic and Retail ===
With the addition of WoW Classic, around August 2019, the '_classic_' or '_retail_' folders are now the main WoW folders, which are inside the WoW install folder. Each of these folders are a nearly self-contained and distinct version of WoW themselves.
* {WoW Install} (folder) - your WoW installation folder
** _classic_ or _retail_ (folder)
*** Interface (folder)
**** AddOns (folder)
***** MyAddOn (folder) - your addons own folder, must match the .toc name
****** ... addon files
From looking at this, you can see that the actual folder layout is almost exactly the same as before. The exception is that there is now an extra child folder under the WoW install folder, that then contains the specific game variant. Inside that game variant are the same folders that were under WoW the install folder before.
== Variants ==
With the addition of these new WoW game variants, like '__retail__' and '__classic__', each variant additionally has its own separate set of installed addons.
An addon needs to follow the rules for the variant it's placed under. This includes using the correct [[getting the current interface number|interface version]] numbers for the variant it is installed under, which is set in the addon [[TOC file]].
Classic currently has a different interface version from the Retail interface version number, just as any '_ptr_' variant may have a different interface version number. For example, any addon in classic will need a matching version number to the current classic interface version number in order to get loaded automatically.
Because of these reasons, each variant may require a alternate version of the *same addon*, for the addon to have complete functionality for that variant. This may include only a different interface version number, or significant differences in files and code for the same addon.

Revision as of 06:16, 20 June 2020

WoW AddOn

This is the WoW AddOn main technical reference. WoW AddOns allow for altering and customizing the game, specifically through the user interface.

Use the Reference section for detailed information, Guides for getting started and further understanding, and Summary for overall concepts details. See AddOns for information on the general AddOn term used in WoW.

Reference

WoW AddOn files and related files and concepts

Code Files

Details

Content Files

  • BLP file · - Main WoW art and texture format.
  • TGA file · - Alternative WoW art and texture format.
  • Edge file · - Texture file with special layout for use as a border.

WoW Files

Help

Guides

FAQs

Other

Summary

WoW uses AddOns in-part to create functionality for its own user interface. WOW users are allowed load their own addons.

These user created addons allow for custom UI functionality in the game. Before getting started, every developer should read familiarize themselves with the Blizzard AddOn Policy.

Layout

Example anatomy, or file layout, of a basic WoW AddOn:

  • {WoW Install} (folder) - your WoW installation folder
    • Interface (folder)
      • AddOns (folder)
        • MyAddOn (folder) - your addon's own folder, must match the .toc name
          • MyAddOn.toc (TOC file) - WoW AddOn "manifest" file
          • MyAddOn.xml (FrameXML) - XML file with visible element definitions
          • MyAddOn.lua (Lua) - Code file, with instructions for AddOn behavior


This example establishes a WoW AddOn named 'MyAddOn' with one xml frame file and one lua code file.

Classic and Retail

With the addition of WoW Classic, around August 2019, the '_classic_' or '_retail_' folders are now the main WoW folders, which are inside the WoW install folder. Each of these folders are a nearly self-contained and distinct version of WoW themselves.

  • {WoW Install} (folder) - your WoW installation folder
    • _classic_ or _retail_ (folder)
      • Interface (folder)
        • AddOns (folder)
          • MyAddOn (folder) - your addons own folder, must match the .toc name
            • ... addon files

From looking at this, you can see that the actual folder layout is almost exactly the same as before. The exception is that there is now an extra child folder under the WoW install folder, that then contains the specific game variant. Inside that game variant are the same folders that were under WoW the install folder before.

Variants

With the addition of these new WoW game variants, like '__retail__' and '__classic__', each variant additionally has its own separate set of installed addons.

An addon needs to follow the rules for the variant it's placed under. This includes using the correct interface version numbers for the variant it is installed under, which is set in the addon TOC file.

Classic currently has a different interface version from the Retail interface version number, just as any '_ptr_' variant may have a different interface version number. For example, any addon in classic will need a matching version number to the current classic interface version number in order to get loaded automatically.

Because of these reasons, each variant may require a alternate version of the *same addon*, for the addon to have complete functionality for that variant. This may include only a different interface version number, or significant differences in files and code for the same addon.