A template for creating Lua-only addons for World of Warcraft.
(If you plan on using XML for frames definitions, this probably isn't for you.)
To create an addon based on this template:
.toc
and .lua
file into a folder in WoW/Interface/Addons
, named with your addon name.
WoW/Interface/Addons/MyAddon
MyAddon.lua
and MyAddon.toc
MyAddon.toc
and adjust the title, notes, author settings. The SavedVariablesPerCharacter
should be set to e.g. MyAddonPrefs
. The last line of the file must point to your .lua
file.MyAddon.lua
and replace every occurance of NewAddon
with MyAddon
The addon should spawn a black square in the center of the viewport, with a constantly changing number in it. Dragging the square around will move it. The position of the square will be stored in preferences. Right-clicking the square will show some text in chat.
You can now modify the addon to suit your purposes. Type /reload
into chat to see changes take effect.