User Tools

Site Tools


addons:using_libs

This is an old revision of the document!


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.
addons/using_libs.1492932559.txt.gz · Last modified: 2017/04/23 00:29 by atom0s