Sharp Aion2 Lua SDK
API reference

sdk.dataLua table

Look up shipped item, skill, NPC, pet, quest, dungeon, and localized quest text definitions.

SDK 1.7.0 introduced the game data libraries, and SDK 1.7.17 refreshes them for the November 4 game update. Each SDK download includes them with Download latest SDK. Install the updated client that supports SDK API version 6, download the SDK in the Scripts tab, then reload your module. Import sdk and use its sdk.data table. Each dataset loads only when you call its accessor; Lua caches the result within that script. Importing sdk alone does not load every catalog.

These are dated definitions from the installed game's data tables. They do not report current inventory, market availability, prices, cooldowns, quest progress, nearby NPCs, owned pets, or pet levels. Use the inventory, commerce, combat, and progression calls for current game information.

Treat returned tables as shared, read-only values. An unknown ID returns nil when you index its dataset. Names can be fallback names or localization keys; IDs provide the stable identity within the shipped data snapshot. A definition does not guarantee that an item or skill is available to your character.

Definitions

sdk.data.items()

No arguments. Returns a table keyed by numeric item ID with 9,403 definitions. Each row contains name, localized, category, grade, level, item_level, and icon. level is the character level requirement; item_level is the item's level. icon is an asset name, not an image URL. The catalog includes 9,179 localized names. Its grades and categories are definition labels and can be used to filter a user selection.

local sdk = require("sdk")
local items = sdk.data.items()
local item = items[511490001]
if item then
    log.info(string.format("%s | %s | item level %s",
        item.name, item.grade, tostring(item.item_level)))
end

sdk.data.skills()

No arguments. Returns a table keyed by numeric skill ID with 16,283 definitions. It includes client skill definitions beyond the skills learned by your character. Use IDs to join these definitions with current skill information.

Rows include name, localized, localization_key, max_level, level_group, grade, type, subtype, basic, casting_time, cooldown, cooldown_group, range, height_range, weapon_range, target_type, weapon_types, the six resource cost fields (mp_cost, hp_cost, sp_cost, fp_cost, dp_cost, ap_cost), item_cost, item_cost_count, icon, stigma, ground_radius, and ground_shape. These are definition values, not remaining cooldowns or effective stats after character modifiers. 15,565 skill names are localized. Capture date: November 5, 2026.

sdk.data.npcs()

No arguments. Returns a table keyed by numeric NPC ID with 13,536 definitions. An NPC definition is a type of NPC, rather than one placed or currently spawned character. This dataset does not provide a list of world coordinates.

Rows include name, localized, localization_key, internal_name, level, type, subtype, creature_type, terrain_type, relationship, grade, named, attackable, function_type, function_values, active_skills, resource, collision dimensions, movement speeds, interact_range, and portrait. 12,622 NPC names are localized using the captured client strings; other rows retain a fallback name and localized = false. Capture date: November 5, 2026.

A row also carries pet_id and pet_soul_item_id when the client's loot table links that NPC to one specific pet soul item. 436 NPC rows have both fields; the other rows have neither. These are static links from the client data tables. They do not report which pet a monster raises on your account, the pet's level, or how many souls it already holds. Use sdk.data.pets() to resolve the pet and soul item.

sdk.data.pets()

No arguments. Returns the static client pet catalog. The table has five sections:

SectionContents
pets211 pet definitions keyed by numeric pet ID
soul_drops436 confirmed NPC-to-pet links keyed by numeric NPC ID
unsupported_soul_drops28 NPC IDs whose only soul drop is the generic all-type crystal
soul_levels3 raw soul level rows keyed by level
creature_levels50 raw rows, grouped by creature genus and then by level

Three ID domains. A pet ID (1001 to 1363) identifies a pet definition in pets. It is not an NPC ID and not an item ID. An NPC ID is the same numeric domain as sdk.data.npcs(), and it is the key used by soul_drops and unsupported_soul_drops. A soul item ID is an item ID, so it joins with sdk.data.items().

A pets row contains name, localized, internal_name, localization_key, order, creature_type, soul_crystal_type, need_soul, soul_item_name, vehicle_item_name, open, resource_key, and npc_ids. All 211 names are localized, open is true for every row, and need_soul is 5 for every row. A row also carries soul_item_id when the client item table resolves one; 200 of the 211 rows have it. npc_ids lists the NPCs that drop that pet, and it matches the soul_drops keys for the same pet.

A soul_drops row contains pet_id and soul_item_id. The 436 links cover 161 of the 211 pets; the other 50 pets have no confirmed NPC source. unsupported_soul_drops holds 28 NPC rows whose only soul drop is the generic Charge_SoulCrystalAll_1_A_s_01a_b item, soul_item_id 531900009. Those rows have no pet_id, and the pet they belong to is not guessed.

A soul_levels row contains level, need_soul_count, and get_creature_exp. The three rows use need_soul_count 25, 75, and 0. They are the raw client cost table, not a per-pet requirement.

creature_levels is keyed by creature genus — Feral, Intellect, Nature, Special, or Trans — and then by level 1 to 10. Each of the 50 rows has id, level, need_exp, get_exp, and six prob_* weights (prob_common, prob_rare, prob_legend, prob_unique, prob_epic, prob_mythic) that add up to 10,000. A pet's creature_type selects its genus. These are genus-level rows, so they are not a per-pet level cap and they do not report how far along a pet is.

Static only. The catalog does not report which pets your character owns, a pet's level, its current souls, or whether a pet is already fully raised. No live pet collection reader is available, so a script cannot use this catalog to skip a pet that has reached its maximum. The catalog loads when the accessor is called and stays cached for the rest of the script.

local sdk = require("sdk")
local pets = sdk.data.pets()
local npcs = sdk.data.npcs()

-- Which NPCs drop the confirmed soul item of one pet?
local pet = pets.pets[1136]
if pet then
    log.info(string.format("%s (%s)", pet.name, pet.creature_type))
    for _, npcId in ipairs(pet.npc_ids) do
        local drop = pets.soul_drops[npcId]
        local npc = npcs[npcId]
        local soulItemId = drop and drop.soul_item_id or 0
        log.info(string.format("  NPC #%d %s -> soul item #%d",
            npcId, npc and npc.name or "?", soulItemId))
    end
end
local sdk = require("sdk")
local npcs = sdk.data.npcs()

-- Find every NPC whose client loot table names one pet soul item.
for npcId, npc in pairs(npcs) do
    if npc.pet_id and npc.pet_soul_item_id then
        log.info(string.format("%s (#%d) -> pet #%d, soul item #%d",
            npc.name, npcId, npc.pet_id, npc.pet_soul_item_id))
    end
end

game._pet_collection_snapshot()

Parameters: None. Returns: table {selected_id, pets}, or nil, error.

selected_id is the pet the character has selected; it is absent when no pet is selected. pets has one row for every pet in the client collection, owned or not:

FieldMeaning
idPet id; the key of sdk.data.pets().pets.
ownedtrue once the pet is unlocked.
levelPet level, 0 while the pet is not owned.
soul_pointsSouls collected toward unlocking the pet or toward its next level.

An unowned pet unlocks at its need_soul value. An owned pet reaches the next level at soul_levels[level].need_soul_count; a level whose need_soul_count is 0 is the maximum.

local sdk = require("sdk")
local data = sdk.data.pets()
local collection, err = game._pet_collection_snapshot()
if collection == nil then
    log.warn(err)
else
    for _, row in ipairs(collection.pets) do
        local pet = data.pets[row.id]
        local name = pet and pet.name or ("#" .. row.id)
        if not row.owned and pet then
            log.info(string.format("%s: %d/%d souls to unlock",
                name, row.soul_points, pet.need_soul))
        elseif row.owned then
            local step = data.soul_levels[row.level]
            local need = step and step.need_soul_count or 0
            log.info(need > 0
                and string.format("%s level %d: %d/%d souls", name, row.level, row.soul_points, need)
                or string.format("%s level %d: maximum", name, row.level))
        end
    end
end

sdk.data.quests()

No arguments. Returns 1,429 quest definitions keyed by numeric ID. Rows include name, title, kind, level, acquisition/completion map and dialogue identifiers, and steps. A step includes its order and goals. Some titles remain localization keys. The dataset does not track your completion state; see quest journal.

sdk.data.dungeons()

No arguments. Returns the dataset of 734 dungeon definitions and its related tables. Its named groups, entrances, buffs, and other sections retain their client table fields, including typed values. Use the dungeon catalog accessor below for linked records rather than assuming this table is a list keyed by map ID.

Catalog helpers

sdk.data.quest_catalog()

No arguments. Returns the quest lookup helper. Its find(quest_id) returns a definition or nil; step(entry, order) finds a step, and summary(quest_id, order) produces a text summary or nil.

local sdk = require("sdk")
local catalog = sdk.data.quest_catalog()
local text = catalog.summary(1100010, 1)
if text then
    log.info(text)
end

sdk.data.dungeon_catalog()

No arguments. Returns the dungeon lookup helper that joins the dungeon and its related tables. for_map(map_id) returns an array of expanded dungeon records or an empty array. summary(map_id) returns text or nil. Expanded records include identity, party and level limits, original fields, and related groups, points, buffs, ranks, waves, entrances, and abnormal effects. The underlying dataset remains available through sdk.data.dungeons().

Localized quest text

sdk.data.quest_text(locale)

Optional argument locale, a language tag string. It defaults to "en-US". Returns the quest text snapshot for that locale, or nil plus a reason string when the locale is not shipped. Supported locales are exactly "en-US" and "pt-BR"; a different tag such as "pt-br" or "ko-KR" is reported, never replaced by another locale. Use sdk.data.metadata().quest_text.locales for the shipped list.

Each locale table has locale, quests, events, and targets:

SectionContents
questsDefinitions keyed by numeric quest ID with title, title_key, and steps
eventsMap events keyed by name with map_id and stages
targetsNPC and object records keyed by client target name, with id or ids, optional name, and kind

A unique target has id; identical names reused by multiple client rows retain all matching IDs in ids. Missing translations leave name absent. Names shared by NPC and object tables are not guessed; only unambiguous references resolve, and type-prefixed keys preserve distinct target records when necessary.

A quest step has text, key, and objectives. An objective has text, kind, optional, values, and targets. A map event stage holds phases, and a phase has text, key, and objectives.

Two different index bases are used. steps follows the client step order and starts at 1, so the first step is steps[1]. stages and phases start at 0, so the first stage is stages[0] and its first phase is phases[0]. Do not use # to measure either table: a zero-based table can have stages[0] set and still report a length of zero.

A text field can be nil when that locale has no entry for the raw localization key. Check the field before displaying it; a missing label is not replaced by another label or a fallback title.

These are dated client strings. They do not report which quest is active, which step you have completed, or which objective is currently selected. Use the quest journal guide and the current quest calls for live progress.

local sdk = require("sdk")
local text, reason = sdk.data.quest_text("pt-BR")
if not text then
    log.warn(reason)
    return
end

local quest = text.quests[1102370]
local step = quest and quest.steps[3]
if step then
    for _, objective in ipairs(step.objectives) do
        log.info(string.format("%s: %s", objective.kind, objective.text or "?"))
        for _, target in ipairs(objective.targets) do
            log.info("  " .. (target.name or target.target))
        end
    end
end

Snapshot information

sdk.data.metadata()

No arguments. Returns a table with schema_version = 1, locale = "en-US", and items, skills, npcs, pets, quests, dungeons, and quest_text metadata sections. Sections describe their source and catalog hashes; item, skill, NPC, and pet sections also include count, localized, and capture. Skill and NPC sections list their public fields and source/name hashes. npcs.positions = false explicitly records that placed world coordinates are absent. The pets section records count 211, localized 211, soul_drops 436, unsupported_soul_drops 28, pets_with_drops 161, pets_with_soul_item 200, soul_levels 3, and creature_levels 50, together with the public fields list, the optional_fields list, and the client table hashes. quest_text lists its locales, the quest, map event, and target counts, its capture date, and the hash of each shipped locale catalog, locale file, and client quest table. Check this information when comparing results from different SDK downloads. The metadata describes the shipped snapshot; it does not verify the data against a future game update.

local sdk = require("sdk")
local metadata = sdk.data.metadata()
assert(type(metadata) == "table", "Game data is unavailable")
log.info(string.format("%s: %d items, %d skills, %d NPCs",
    metadata.locale, metadata.items.count, metadata.skills.count, metadata.npcs.count))

On this page