Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetAbilityData

From RoR Wiki
Revision as of 19:42, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Game functions
Version: WAR 1.4.8

Returns a table describing one ability.

abilityData = GetAbilityData(abilityId)

Arguments

abilityId
number – Id of the ability.

Returns

abilityData
table – An ability data table (see below), plus the field isActive.

Ability data table

Key Type Meaning
id number Ability id.
name wstring Ability name from the AbilityNames string table. L"" if that table is not available.
iconNum number Icon id for GetIconData.
abilityType number Ability type, compared with GameData.AbilityType values.
targetType number —
tacticType number Tactic type; indexes the result of GetNumTacticsSlots.
numTacticSlots number Non-zero for tactics. The stock UI uses it to recognise a tactic.
moraleLevel number Morale level of a morale ability; 0 for other abilities.
moraleCost number —
hasAPCostPerSecond boolean —
abilityCost number —
reuseTimer number Reuse timer, in seconds.
reuseTimerMax number Maximum reuse timer, in seconds.
cooldown number Same value as reuseTimerMax.
specialization number —
stanceOrder number —
careerID number —
abilityImprovementThreshold number —
abilityImprovementCap number —
requiresPet boolean —
isBuff, isDebuff, isDamaging, isHealing, isDefensive, isOffensive, isStatsBuff, isGranted, isPassive boolean Flags of the ability. Always present.
isHex, isCurse, isCripple, isAilment, isBolster, isAugmentation, isBlessing, isEnchantment boolean Effect type flags. Only set (to true) when one of the ability's effects has that type; otherwise the key is absent.
typeColorRed, typeColorGreen, typeColorBlue number Colour of an effect type, 0–255. Only present when an effect type has a colour.

Details

  • abilityId is converted to an integer.
  • isActive is true only for ability 2490 while a particular player state flag is set. For every other ability it is false.
  • The client always returns a table. The stock wrapper Player.GetAbilityData (easystem_utils/source/player.lua) treats a result whose id is nil or 0 as "not found".
  • If there is no player object, or the Lua state is not available, the function returns nothing.
  • The same ability data table is used for the entries of GetAbilityTable.

Errors

None.

Example

From easystem_utils/source/player.lua:

local abilityData = GetAbilityData (abilityId)

if (abilityData == nil or abilityData.id == nil or abilityData.id == 0) then
    return nil
end

return abilityData

Building a tooltip, from ea_abilitieswindow/source/abilitieswindow.lua:

Tooltips.CreateAbilityTooltip( GetAbilityData(data.id), SystemData.ActiveWindow.name, AbilitiesWindow.TOOLTIP_ANCHOR)

See also