Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:User interface customization guide
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Lua scripting == All of the functionality in the interface is provided through Lua scripting. It is also possible to create any layout that is possible with the XML markup in pure Lua scripting. The manual for Lua 5.1.4 (http://www.lua.org) is available online at http://www.lua.org/manual/5.1. For more concise help, topic-specific Lua tutorials can be found at: http://lua-users.org/wiki/TutorialDirectory. 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''. 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 type this into the game chat: /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.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)