Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetAbilityUpgradeRank

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 · Ability functions
Version: WAR 1.4.8

Returns the player's upgrade rank of an ability.

rank = GetAbilityUpgradeRank(abilityId)

Arguments

abilityId
number – Id of the ability. It is converted to a 16-bit integer.

Returns

rank
number – Upgrade rank, 0 to 255.

Details

  • The stock ability tooltip shows "no rank" when the value is 0.
  • If there is no player object, or the Lua state is not available, the function returns nothing.

Errors

None besides the generic Invalid Parameters message when the argument is missing or not a number.

Example

From easystem_tooltips/source/abilitytooltips.lua:

local upgradeRank = GetAbilityUpgradeRank (abilityData.id)

if (upgradeRank > 0)
then
    return (GetStringFormat (StringTables.Default.LABEL_ABILITY_TOOLTIP_ABILITY_RANK, {upgradeRank}))
end

return (GetString (StringTables.Default.LABEL_ABILITY_TOOLTIP_ABILITY_NO_RANK))

See also