Reference

Table shapes

The fields of the tables the API returns.

Apart from Agent and Item handles, the game's data comes back as plain tables, copied when you ask for them. They don't change afterwards: ask again for fresh values. A field the game has no value for is nil.

Skill

A skill a character has, from agent:skills(), combat.skills() and similar.

id
The skill id.
slot
The skill bar slot it's in.
name
Its name.
icon
Its icon, for ui.image.
ready
Whether it can be used now.
cooldown, max_cooldown
Time left on its cooldown, and the full cooldown.
cooldown_alacrity_adjusted
The cooldown with alacrity taken into account.
ammo, ammo_cooldown, max_ammo_cooldown
Charges, and the time to the next one.
ground_target
Whether it's cast at a position.
cast_time, cast_time_quickness
How long it takes to cast, without and with quickness.

SkillDef

What a skill is, from content.skill(id).

id, name, icon
The skill id, name and icon.
interact_type
How it's used.
ground_target
Whether it's cast at a position.
breaks_stun
Whether it breaks stuns.
instant_cast
Whether it's instant.
skill_palette_ids
The palettes it's in.
cast_time, cast_time_quickness
How long it takes to cast.
info
More details: {stack_type, max_cooldown, max_ammo, max_ammo_cooldown, cost, unblockable, affected_by_quickness, flip_skill_ids, facts, range, static_radius, dyn_radius, distance0, distance1, static_damage, dyn_damage, static_barrier, dyn_barrier, dyn_life_force_cost}.

Each entry of info.facts has a kind and the fields that go with it: damage (hits, m1, m2), apply_buff (buff_id, duration, stack_count), duration, evade, stun, daze, knockdown, float (duration), knockback, launch, pull (distance), radius, distance, number_of_targets, healing, life_force_cost, revive_percentage, conditions_removed (value), barrier (base, scalar...), pierces and reflects_missiles. Every fact also has req_trait_id.

Buff

A boon, condition or effect on an agent, from agent:buffs().

id
The buff id (the same for every buff of its kind).
content_id
Its content id.
name
Its name.
stacks
How many stacks.
time_left
Milliseconds left; 0 for buffs without a duration.
max_duration
Its full duration.
timestamp
When it was applied, in game time.
stack_type
How it stacks.
source_agent_ids
The agent ids of who applied it.

ItemDef

What an item is, from content.item(id), item:def() and others.

id, name, icon
The item id, name and icon.
rarity
One of the inventory.RARITY_* constants.
item_type
One of the inventory.ITEM_TYPE_* constants.
flags
Raw item flags.
req_level
The level needed to use it.
tradeable, salvageable, usable, consumable
What can be done with it.
vendor_value
What a vendor pays, in copper.
bag_capacity
Slots, for bags.
armor_type, armor_weight_class
For armor.
weapon_type
For weapons.
trinket_type, upgrade_component_type
For trinkets and upgrades.
skin
Its default skin: {id, name, icon}.
container
For containers: {flags, has_use_all, container_type, choices}, each choice {item_id, quantity}.

MapDef

A map, from map.def(), content.map(id) and others.

id
The map id.
guid
Its guid, as 32 hex digits.
name
Its name.
map_type
Its type; see map.TYPE_*.
min_level, max_level
Its level range.
is_wvw_map
Whether it's a WvW map.

Marker

A marker on the map, from map.markers().

uid
The marker's id.
name, dynamic_name, hashed_name, description
Its texts.
position
Where it is.
agent, agent_id
The agent it marks.
map_icon, world_icon
Its icons.
is_commander, is_mentor, is_event, is_hero_challenge, is_mastery_insight
What it marks.
marker_type1, marker_type2, content_def_id1, content_def_id2, sector_def_id
Raw details.

Objective

An event objective, from objectives.list() and events.list(). Every objective has id, objective_type and kind; the other fields depend on the kind:

break_morale
count, name
capture_location
percentage, name
collect_items
percentage, contribution
counter
current, max, name
cull
remaining, name
defend_gadget
name, agent_id, percentage
defend_gadgets
current, max
escort
agent_id, name
intimidate
percentage, agent_id
kill_count
agent_id, name
repair_gadgets
agent_ids
timer
time_left

Spec

One of a player's three specializations, from specs.selected() and agent:specs(). An empty specialization slot is false.

index
The slot, 0 to 2.
id, name
The specialization.
minor_trait_ids, major_trait_ids
Its traits.
selected_traits
The three selected major traits, each {id, name, description, icon}. A tier with no trait selected is nil, so loop over 1 to 3 rather than with ipairs.

Stats

From agent:core_stats().

level
The level.
power, precision, toughness, vitality
The core attributes.
ferocity, healing_power, condition_damage, concentration, expertise
The other attributes.
agony_resistance
Agony resistance.