Using Libs (Libraries)

Libs (or Libraries) are scripts that contain helpful functions and definitions that all addons can make use of. These come prepackaged with Ashita and can be found within the /addons/libs/ folder.

Libraries can be used by addons easily, just simply 'require' them into your code. For example, most addons will make use of the 'common' Lua library include. This brings a collection of libraries into your code automatically. This can be used like this:

require 'common'

This will include the common library into your addons global Lua state. Libraries that are within sub-folders can be included like this:

require 'ffxi.recast'

This would include the following library:
<Path To Ashita>\addons\libs\ffxi\recast.lua