WoW:User interface customization guide: Difference between revisions

m
Removed 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 start fresh, download the [http://us.blizzard.com/support/article.xml?articleId=21466 "User Interface Customization Tool"] and extract both Data & Art. This creates a new directory called "Interface". This directory will override any built-in user interface. To remove all customized UI, just remove the Interface directory. Be sure that you never remove the Interface directory in Data\, only remove the top level Interface directory the tool created for you. For example, if you installed WoW to the default directory on Windows 2000/XP, you'll need to delete the "Interface" folder located in ''C:\Program Files\World of Warcraft\''.
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".


When the game is updated, your customized files will not be modified, which means that you'll need to get an updated version of Interface.zip and apply your changes to the new files.  
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 you report a bug in the interface, move your custom interface directory out of the way, to make sure the bug occurs in the unmodified game.
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.
The file "FrameXML.toc" contains a list of XML files to load when you enter the game. The files listed are loaded in order. Any errors that occur when loading the files are written to FrameXML.log in the toplevel directory.  


Each XML file typically describes one element of UI on the screen. To get a feeling for the syntax, take a look at the files provided. The XML files strictly adhere to the XML 1.0 standard. For those lucky enough to have access to a syntax checker, the file UI.xsd contains the schema used by the WoW interface.
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 using Cosmos, you can use the shorcut /rl.


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.  
Anonymous user