User Tools

Site Tools


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

Available Libraries

Library Name Description
common Includes the various common libraries in a simple single lib for addons to include.
imguidef Includes the enums, functions and other features to interact with Ashitas UI system.
logging Includes helper functions to write to Ashitas log files.
ltn12 Helper library for LuaSocket.
mathex Includes extensions to Lua's math namespace.
mime Helper library for LuaSocket.
settings Includes helper functions for reading and writing simple configuration files for addons.
socket LuaSocket library allowing addons to make use of sockets.
stringex Includes extensions to Lua's string namespace.
tableex Includes extensions to Lua's table namespace.
timer Includes functions that allow addons to create timers to fire functions at specific intervals.
ffxi.enums Contains various FFXI related enumerations.
ffxi.recast Contains functions to interact with FFXIs recast timers.
ffxi.targets Contains functions to interfact with FFXIs various targeting objects.
ffxi.vanatime Contains functions to obtain various aspects of the Vana'diel time. Contains functions to obtain weather information.
json.json Library used to read and write JSON files.
socket.ftp LuaSocket library used for the FTP protocol.
socket.headers LuaSocket library used for various HTTP header related things.
socket.http LuaSocket library used for HTTP connections.
socket.smtp LuaSocket library used for SMTP connections. LuaSocket library used for SMTP connections.
socket.url LuaSocket library used for URI parsing.
addons/using_libs.txt · Last modified: 2017/04/23 00:33 by atom0s