Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetAbilityUpgradeRank

From RoR Wiki

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