Jump to content
Toggle menu
  • 17.3K articles
  • 8.2K files
  • 5 users
  • 280.7K edits
WoW Classic Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

HOWTO: Create AddOn Dependencies

From WoW Classic Wiki

What is a Dependent Addon?

A Dependent Addon is one that relies on another Addon or code library for it's full functionality. Generally, an Addon author should take into account that the user might not have the Addon/Library required, notify the user with a single error, and suppress all other errors that might occur.


How do I designate a Dependent Addon?

In order for a user to know your Addon is dependent, you must document this in the .toc file:

Example Standalone Addon .toc file:

##Interface: 1300
##Title: myAddon
##Description: Does stuff

Example Dependent Addon .toc file:

##Interface: 1300
##Title: myAddon
##Description: Does stuff
##Dependencies: ParentAddon, OtherAddon

What if other Addons only improve my Addon?

If an Addon's code is only used to somehow improve the usability/functionality of your Addon, but is not required for it to work, you can use the "OptionalDeps:" tag in your .toc file to have those Addons loaded prior to your own:

##Interface: 1300
##Title: myAddon
##Description: Does stuff
##Dependencies: ParentAddon, OtherAddon
##OptionalDeps: MakeMyAddonCooler

Keep in mind that you must handle any errors that may occur if the user does not have the Optionally Dependent Addon.