WoW:User interface customization guide (source)
Revision as of 04:49, 15 August 2023
, 15 August 2023Move page script moved page User interface customization guide to WoW:User interface customization guide without leaving a redirect
m (Cleanup) |
m (Move page script moved page User interface customization guide to WoW:User interface customization guide without leaving a redirect) |
||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
This '''user interface customization guide''' is based upon [[slouken]]'s post on the official Beta UI forums ''(a long time ago in a galaxy far, far away)''. | This '''user interface customization guide''' is based upon [[slouken]]'s post on the official Beta UI forums ''(a long time ago in a galaxy far, far away)''. | ||
| Line 12: | Line 6: | ||
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. =) | ||
With that said, there are a number of websites devoted to user interface | With that said, there are a number of websites devoted to user interface customization (add-ons) available, such as [http://www.wowinterface.com/ WowInterface] and [http://www.curse.com Curse]. These sites have customized interfaces and add-ons for almost every conceivable need, so it is extremely unlikely that you will need to create an add-on from scratch yourself. If you find an Add-on suitable for your needs from one of these sites, you will find using them much easier than attempting to create a new add-on yourself. | ||
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)" | 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)" | |||
"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. | 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. | ||
The data folder contains all of the [[Lua]] and [[XML]] files which are used to describe and program the UI. | The data folder contains all of the [[Lua]] and [[XML]] files which are used to describe and program the UI. Editing these files will not do anything - they are there to show you how the Blizzard UI works, and a reference for examples of algorithms, syntax, using the game API and much more. | ||
The Blizzard Interface Tutorial is where you start. After you complete the tutorials, you should have enough knowledge to create a basic addon. From your addon, you can make whatever changes to the Blizzard UI that you want. | |||
== XML layout == | == XML layout == | ||
| Line 44: | Line 41: | ||
The best way to become familiar with the way Lua is used to script the interface is to look at the scripts in the XML files, denoted by the <script> tag, and to browse the lua files. The lua files typically contain functions which are used by the corresponding XML files. | The best way to become familiar with the way Lua is used to script the interface is to look at the scripts in the XML files, denoted by the <script> tag, and to browse the lua files. The lua files typically contain functions which are used by the corresponding XML files. | ||
As a reference, the [[World of Warcraft API]] page contains a (almost) complete list of available API functions in ''World of Warcraft''. Also the [[Widget API]] page contains an overview of the methods that are available when dealing with objects of the user interface — like action buttons or unit frames. Feel free to play around with the <tt>print()</tt> function to try out the various API functions. | As a reference, the [[World of Warcraft API]] page contains a (almost) complete list of available API functions in ''World of Warcraft''. When you want to figure something out, this is the first page you should turn to. Also the [[Widget API]] page contains an overview of the methods that are available when dealing with objects of the user interface — like action buttons or unit frames. Feel free to play around with the <tt>print()</tt> function to try out the various API functions. | ||
For example: | For example type this into the game chat: | ||
/run print(GetLocale()); | /run print(GetLocale()); | ||
GetLocale() is an API function. It returns the client locale ("enUS" for English clients, "deDE" for German clients, etc). Print() then prints that value into the default chat window. | |||
Your addons are loaded after the Blizzard files, so your addon can overwrite or change any Blizzard UI. For example, you could create an addon with one line of code: | |||
MailFrame:Show() | |||
MailFrame is the name of a Blizzard Frame, created in Blizzard Interface Data/FrameXML/MailFrame.xml. Anyframe:Show() will make that frame appear, even if you are nowhere near a mailbox. Type /run MailFrame:Show() in game to accomplish the same thing. | |||
== Getting started == | == Getting started == | ||
| Line 73: | Line 74: | ||
== Tips and tricks == | == Tips and tricks == | ||
''World of Warcraft'' supports dynamically '''reloading the user interface'''. At any time, you can modify the XML and Lua files and then reload them by | ''World of Warcraft'' supports dynamically '''reloading the user interface'''. At any time, you can modify the XML and Lua files and then reload them by typing any of the following slash-commands in the chat edit box: | ||
* <code>/console reloadui</code> | |||
* <code>/script ReloadUI()</code> | |||
Some (developer-) addons also register their own commands to reload the ui, they are usually short and so more convenient for development. Just try them out to see if they are available. | |||
* <code>/rl</code> (from Ace-Console) | |||
* <code>/rld</code> | |||
* <code>/reloadui</code> | |||
If you are not sure what is happening in | If you are not sure what is happening in a script, '''use the [[API print|print()]] function to print a message into the default chat frame'''. This function is extremely forgiving and will print any variable. | ||
Feel free to experiment. If you break something, starting fresh is really easy. If you have questions, look on the forums to see if other people have already figured out the answers. Occasionally, Blizzard staff will be available to answer scripting questions — we value your feedback! | Feel free to experiment. If you break something, starting fresh is really easy. If you have questions, look on the forums to see if other people have already figured out the answers. Occasionally, Blizzard staff will be available to answer scripting questions — we value your feedback! | ||