WildStar:API types

From AddOn Studio
Jump to navigation Jump to search

UI API < types

This is the main WildStar API 'value type' reference. The UI API uses rather complex values using Lua native types for some of its parameters and return values. Rather than re-explain them every time they're used. This reference provides list of 'distinct' Lua based data types used in WildStar. See also API events.


Simple types[edit]

nil - the Lua 'nil' type. a type, or variable state, which has no value
boolean - a Lua 'boolean' type, which holds Lua 'false' or 'true' values
number - a regular Lua number, which for WS is a 'double' size floating point number
string - a regular Lua string, always 1 byte per char. WS utf-8 encodes non-ASCII chars
function - a regular Lua function, which any variable can reference.
table - a regular Lua table, which any variable can reference.
userdata - a regular Lua userdata, which any variable can reference.

Complex types[edit]

bagId - Numbers representing bags you carry, bank bags, bank window, etc
itemString - A structured string holds item data, like Created by, itemId, ...
itemLink - A string that is clickable if shown in-game, contains an itemString.
itemType - String classification of an item, ["Armor", "Consumable", ...]
unitId - An identifier that specifies a unit or unit type ["target", "party1", ...]
auctionItem - A structured table containing information about a particular item on the Auction House, [BuyoutPrice, CurrentBid, etc]

Data types[edit]

Unit [userdata] - target-able unit data. prefixed unit, unitPlayer, unitTarget
Money [userdata] - currency data
Quest [userdata] - quest data
Item [userdata] - Item data
Ability [userdata] - Player Ability Information

Module types[edit]

Addon - actual AddOn instance type. see UI AddOn.
Package - actual library AddOn instance type. see UI AddOn.

See also[edit]