So I am researching how to create addons, and I can’t find this answer. Can I use libraries I’ve added to Lua?
short answer is no.
think of it this way. the game client is your Lua install and you cant touch it as its locked down. you can only use what it provides, or what you can build from whats been provided.
if you would normally install that library into Lua itself to provide more functionality then its not going to work as theres no way to install that same library into the game.
if you’ve written a library - in Lua - then yes, the game will let you add that library to your mod
eg, you cant add a CRC32 library directly to the game but you can write CRC32 hashing functions in Lua and add those to your mod. yes theyre slower but its the only way.
So if I have the source code for the library included in the addon.
yes, if you have the source code, and its in Lua
you will probably have to tweak it a bit to be warcraft Lua viable but it is do-able
In all likely hood no unless it is a source library of very basic self contained functionality.
The lua used by WoW is very much stripped back. It does not support communcation with external sourced (libs, dlls, WinAPI calls etc. etc. etc.).
It does not support file io other than thought the SavedVariables mechanism.
…
As to creating a WoW addon, you can paste some code into the website addon.bool.no and it will give you a basic addon with .toc and source file.
The name of the folder under WoWs _retail_\Interface\AddOns that the addon is placed in and the name of the .toc file in that folder MUST be the same.
Files (addon, source, images, sounds files etc.) created and/or added to WoW won’t be “recognised”(usable) until you completely exit and re-start the game.