Sharp Aion2 Lua SDK
Guides

Use the generated class SDK

Read named class members with inherited getters and set up editor completion.

SDK 1.6.1 introduced the ue library alongside the existing sdk, entity, UI, quest, and dungeon libraries. SDK 1.7.26 ships 224 packages, 7,783 class wrappers, 7,292 struct declarations, and 2,625 enum declarations from the November 26, 2026 snapshot of the November 25 game update. Packages load when you first use them.

Use the game SDK browser to search every package, inspect members and inherited declarations, browse enum values, and copy a Lua getter.

Install the library

In the updated client, select Download latest SDK in the Scripts tab. The generated class library installs into Scripts/lib/ with the standard libraries. Restart your running module after the download so it imports the new files.

Older clients can install the standard SDK without installing the generated class library. If require("ue") reports that the library is missing, download the generated SDK and editor definitions. Extract it, back up any edited shared libraries, and copy its top-level .lua files into the Scripts folder shown by your Scripts tab, under lib/. Keep the definitions folder for your editor rather than placing it in lib/.

Read a member from the local character

Save this as Scripts/modules/class_member/main.lua, then load it in the Scripts tab. The module reports the character actor's custom time dilation every two seconds. It only reads the value.

local UE = assert(require("ue"))
local elapsed = 0

function on_tick(dt)
    elapsed = elapsed + dt
    if elapsed < 2 then return end
    elapsed = 0

    local actor, actorError = UE.local_actor()
    if not actor then
        log.warn(actorError or "Character unavailable")
        return
    end

    local value, readError = actor:Get_CustomTimeDilation()
    if value == nil then
        log.warn(readError or "Member unavailable")
        return
    end
    log.info("Custom time dilation: " .. tostring(value))
end

Use value == nil when checking reads: zero and false can be successful results. This example has been syntax checked; its game result has not been verified.

Class wrappers and inherited getters

Names retain their class spelling. For example, UE.Engine.AActor is a class in the Engine package. Its .wrap(handle) function returns a checked object wrapper or nil, error. The number must be a valid object handle supplied by a compatible script API, not an arbitrary number.

actor:Get("CustomTimeDilation") and actor:Get_CustomTimeDilation() perform the same read. Getters also work for inherited members. Each read resolves the named member again and validates the object; the generated library contains no saved member locations. Members that move can still be read without updating the library. A removed member returns an error. Changed member names or types, changed enum values, and changed inheritance can still require a newer SDK.

Functions

UE.local_actor()

Return the local character wrapped as UE.Engine.AActor, or nil, error while the character or class is unavailable. Obtain it again after changing maps or characters instead of retaining a wrapper indefinitely.

Class.wrap(handle)

Return an object wrapper for that generated class, or nil, error for an invalid handle or a class mismatch.

object:Get(memberName)

Read a supported scalar member and return value, error. Supported values are integer numbers, floating-point numbers, and unpacked Booleans. Named getters have the form object:Get_MemberName() and return the same pair.

object:IsValid()

Return true for a currently valid object of the wrapper's class, or false, error. This checks the object at the time of the call; a later read can still fail.

object:Method(methodName)

Return declared method details including path, callable, and reason, or nil, error if the method is unknown. callable is currently false; these details do not invoke a game action.

Editor completion

Download the editor definitions ZIP and extract it into your script project. Add its definitions folder to Lua Language Server's workspace.library setting. For example, if you extract it into generated-sdk:

{
  "Lua.workspace.library": ["./generated-sdk/definitions"]
}

The definitions describe packages, classes, inheritance, wrapping, and named getters. They are editor files; do not import or run them as script libraries.

Current limits

Structs and game methods are declarations only. Packed Booleans, fixed arrays, object-reference members, strings, containers, enum members, and struct members return an unsupported-type error. Duplicate member names are unreadable. Conflicting enum names are omitted from the enum table and listed in UE.enum_ambiguities under the enum's class path.

Use the standard SDK for its supported game actions and the entity helpers for common nearby-object tasks. The generated class library does not turn every declared game method into a callable action.

On this page