WoW:User interface customization guide (source)
Revision as of 00:40, 25 January 2009
, 25 January 2009Removed archaic note about Cosmos slash command
m (WW:MOS) |
m (Removed archaic note about Cosmos slash command) |
||
| Line 12: | Line 12: | ||
No official support exists for modifying the WoW interface. If you break it, you get to keep both pieces. =) | No official support exists for modifying the WoW interface. If you break it, you get to keep both pieces. =) | ||
To | To get started, download the [http://us.blizzard.com/support/article.xml?articleId=21466 World of Warcraft Interface AddOn Kit] and use that application to extract both User Interface Data & User Interface Art. This creates three new directories called "Blizzard Interface Data (enUS)", "Blizzard Interface Art (enUS)" and "Blizzard Interface Tutorial". | ||
The art folder contains all of the graphics used in the built-in UI. They are generally [[BLP_files|BLP files]], which are a simple container DirectX-formatted texture data. The [[BLP_files|BLP files]] page lists several tools for converting between BLP and other image formats. | |||
Before | The data folder contains all of the [[Lua]] and [[XML]] files which are used to describe and program the UI. These files make a great reference for examples of algorithms, syntax, using the game API and much more. | ||
A quick reminder: when developing addons you will often encounter bugs that you just can't figure out. If you're like most of us, you will quickly begin to think that it's Blizzard's fault. Before reporting a bug in the game UI, disable all addons and verify that the bug is present in the unmodified game. Maybe it is Blizzard's bug, but there's an even better chance that the bug is yours or another addon you're running during your development. | |||
== XML Layout == | == XML Layout == | ||
The files containing the layout for the game user interface can be found in Interface\FrameXML | The files containing the layout and scripts for the game user interface can be found in Blizzard Interface Data\FrameXML. | ||
Each XML file | The FrameXML.toc file is a plain text file and contains a list of [[Lua]] and [[XML]] files to load at login. The files are loaded in the order they're listed and any load errors are written to FrameXML.log in the game's Log folder. | ||
In your own addons you will also have a .toc file which performs the same function for your own code. You will list your Lua and XML files in it and they will be loaded during login. Errors which occur while loading your addon will also be written to the FrameXML.log file. | |||
Each XML file describes a collection of UI elements and Blizzard separates their XML files into functional modules. You will find files for the GameTooltip, ActionBarFrame, ReadyCheck and everything else in the built-in UI. The Blizzard XML and Lua files make a great reference for understanding how to develop an addon. | |||
The XML files strictly adhere to the XML standard and if your text editor supports XML syntax checking, the file UI.xsd in the FrameXML folder contains the schema used by the WoW interface. | |||
Lots more details here: [[XML User Interface]] | Lots more details here: [[XML User Interface]] | ||
| Line 75: | Line 82: | ||
* /rld | * /rld | ||
If you are not sure what is happening in the script, use the '''message() function to print a message and view variables'''. Once the dialog is shown, your script keeps on executing, but no other message() calls will show anything until you click the button to dismiss the dialog. | If you are not sure what is happening in the script, use the '''message() function to print a message and view variables'''. Once the dialog is shown, your script keeps on executing, but no other message() calls will show anything until you click the button to dismiss the dialog. | ||