View Single Post
01-03-23, 06:30 PM   #1
pstatix
A Murloc Raider
Join Date: Jan 2023
Posts: 8
Questions on the history of AddOn creation

Hello!

TL;DR: Is it documented anywhere how Blizzard knows to look in Interface/AddOns, converts XML to Lua and uses a restricted Lua environment?

Long time player, first time AddOn author.

I'm a SWE by day and gamer by night, and wanted to give a go at creating a simple AddOn for my toon.
As I went about searching for documentation, pretty much everything points at the various WoW-wiki sites. While this is extensive and can get you started, I've already fallen into several rabbit holes chasing down how it all works. Since this is the largest forum community for the development, I am hoping somebody can answer some of the questions I've come up with:
  1. No official Blizzard docs, so how was the AddOn load sequence discovered?

    The Interface/AddOns directory seems straight forward, but there is nothing in the WoW root directory, or officially provided by Blizzard that indicates "Create an AddOns folder and place a .toc, .xml/.lua file(s) in it and an AddOn will be loaded". So how/when did the load process for AddOns get exposed?

  2. FrameXML and loading XML to Lua, but how?

    Following the "discovery" mindset of the first question, it would seem that WoW has some sort of XML to Lua parser? We can set references to other functions defined in a .lua to an objects tags (such as <OnLoad>) and those functions are injected to the tables of the instantiated XML layouts. Again, nothing documenting this, so I want to make sure I understand that every addon is a root Frame (typically) and the XML is in fact being parsed by some loader and generating Lua objects.

  3. Lua 5.1, but not really?

    In trying to load multiple files, I initially gave a shot to the "require" keyword, only to find that its not supported. Several Google's lead me to some StackOverflow posts that indicated WoW uses a restricted version of the Lua 5.1 compiler/environment. Again, unfortunately, there isn't anything that documents this environment, so how was this learned/confirmed and what else can't it do?

As you can probably surmise, all my questions are around the history of how AddOn development documentation (as is) came be. Since Blizzard provides no official environment overview/documentation, I'm curious how these elements of AddOn development were discovered and if my understanding of them is correct.

Cheers!

Aeth

Last edited by pstatix : 01-03-23 at 08:55 PM.
  Reply With Quote