Using Libs

Ashita's addon package comes with a handful of stock libraries (known as libs) that include various useful features.

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.target'

This would include the following library:
Ashita\Scripts\Addons\libs\ffxi\target.lua


Available Libraries

Library Name Description
color Includes various helpful functions to deal with chat colors.
common Includes a handful of commonly used libraries.
events Includes various additional events an addon can make use of from packet information.
log Includes helpful commands for logging information.
mathex Includes extensions to the base Lua math namespace.
packet Includes helpful functions for dealing with packets.
settings Includes helpful functions for dealing with settings for an addon.
stringex Includes extensions to the base Lua string namespace.
tableex Includes extensions to the base Lua table namespace.
timer Exposes useful timer functions to an addon.
ffxi.common Contains various definitions that are useful for various functions.
ffxi.recast Includes functions for reading recast information from the FFXI client.
ffxi.target Includes functions for reading various target information from the FFXI client.
ffxi.vanatime Includes functions for using Vana'diel time.
ffxi.weather Includes functions for reading weather information from the FFXI client.