WoW:Getting the current interface number: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(rewrite, update)
Line 1: Line 1:
This page is on how to go about '''getting the current interface number'''.
{{UIHowTo}}
When loading the interface, the WoW client skips over any addons whose interface version does not match its own. This is an effort to keep the client's behavior free of errors due to changes in the API. Each addon specifies (in its [[TOC format|.toc file]]) the interface version with which it complies. So an addon's .toc file most likely contains a line similar to:
## Interface: 20400
Here, 20400 would mean that the addon is designed against the [[Patch 2.4]] client (and any subsequent minor releases).


When loading the interface, the WoW client skips over any addons whose interface version does not match its own. This is an effort to keep the client's behavior free of errors due to changes in the API.
There are a number of ways to get the current interface version:
 
:; It could be {{API LatestInterface}} : This number is [[Template:API LatestInterface|maintained locally]], so it ''might'' be out of date.
Each addon specifies (in its [[The TOC Format|.toc file]]) the interface version with which it complies. So an addon's .toc file most likely contains a line similar to:
:; Steal it from another addon : Recently updated addons, which are not listed as "out of date" by the client contain the latest Interface version in their toc tag.
 
:; Use {{api|GetBuildInfo}} : In particular, <code>/run print((select(4, GetBuildInfo()));</code> should output the correct version to your chat frame.
  ## Interface: 20403
:; Extract FrameXML and check FrameXML.toc: You can download Blizzard's [http://www.blizzard.com/support/wow/?id=aww01669p User Interface Customization tool], use it to extract interface data, and peek at <code>World of Warcraft\Blizzard Interface Data (usUS)\FrameXML\FrameXML.toc</code>
 
:; View FrameXML.toc online: For instance at [{{wdnlink|FrameXML/FrameXML.toc}} wowcompares].
This would mean the version of 2.4.3.
 
== Finding the client UI version locally ==
The WoW client's current version number is stored in (and determined by) Blizzard's FrameXML.toc file. The following assumes you've already extracted (using Blizzard's [http://www.blizzard.com/support/wow/?id=aww01669p Extraction Tool] for Mac or Windows) the client UI files from an MPQ archive into a directory filled with .xml files, .lua files, and one .toc file. 
 
The extracted files end up in a directory called '''Blizzard Interface Data (enUS)''', or something similar, under the root directory of your WoW installation. 
 
The second line of the
 
''&lt;path to WoW installation&gt;''\Blizzard Interface Data ''&lt;your locale&gt;''\FrameXML\FrameXML.toc
 
file determines the current version. ''Note that if your client has been patched since the last time you ran the extractor, you need to extract again. The patch downloader will only update the .mpq''
 
== An online alternative ==
This information is also available online: [{{wdnlink|FrameXML/FrameXML.toc}} FrameXML.toc]
 
== In-Game ==
Use [[API GetBuildInfo|GetBuildInfo]].
local interfaceNumber = select(4, GetBuildInfo())
 
== External links ==
{{elink|site=wow&#91;"compares"&#93;.com|link=http://wowcompares.com/|desc= - a WoW interface .lua, .toc, and .xml viewer}}
:{{elink|site=wow&#91;"compares"&#93;.com|link=http://wowcompares.com/live/FrameXML/FrameXML.toc|desc= - current FrameXML.toc}}
[[Category:HOWTOs|Get Current Interface Number]]
[[Category:Interface customization]]

Revision as of 21:27, 6 August 2009

HOWTOs

When loading the interface, the WoW client skips over any addons whose interface version does not match its own. This is an effort to keep the client's behavior free of errors due to changes in the API. Each addon specifies (in its .toc file) the interface version with which it complies. So an addon's .toc file most likely contains a line similar to:

## Interface: 20400

Here, 20400 would mean that the addon is designed against the Patch 2.4 client (and any subsequent minor releases).

There are a number of ways to get the current interface version:

It could be 80205
This number is maintained locally, so it might be out of date.
Steal it from another addon
Recently updated addons, which are not listed as "out of date" by the client contain the latest Interface version in their toc tag.
Use GetBuildInfo
In particular, /run print((select(4, GetBuildInfo())); should output the correct version to your chat frame.
Extract FrameXML and check FrameXML.toc
You can download Blizzard's User Interface Customization tool, use it to extract interface data, and peek at World of Warcraft\Blizzard Interface Data (usUS)\FrameXML\FrameXML.toc
View FrameXML.toc online
For instance at [DEPRECATED http://wowprogramming.com/utils/xmlbrowser/live/FrameXML/FrameXML.toc wowcompares].