<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetAbilityData</id>
	<title>API:GetAbilityData - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetAbilityData"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetAbilityData&amp;action=history"/>
	<updated>2026-10-18T02:11:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:GetAbilityData&amp;diff=30323&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetAbilityData&amp;diff=30323&amp;oldid=prev"/>
		<updated>2026-10-16T19:42:44Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Game}}&lt;br /&gt;
Returns a table describing one ability.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
abilityData = GetAbilityData(abilityId)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;abilityId : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Id of the ability.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;abilityData : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – An ability data table (see below), plus the field &amp;lt;code&amp;gt;isActive&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Ability data table ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Ability id.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; || Ability name from the &amp;lt;code&amp;gt;AbilityNames&amp;lt;/code&amp;gt; string table. &amp;lt;code&amp;gt;L&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; if that table is not available.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;iconNum&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Icon id for [[API:GetIconData|GetIconData]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;abilityType&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Ability type, compared with &amp;lt;code&amp;gt;GameData.AbilityType&amp;lt;/code&amp;gt; values.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;targetType&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;tacticType&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Tactic type; indexes the result of [[API:GetNumTacticsSlots|GetNumTacticsSlots]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;numTacticSlots&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Non-zero for tactics. The stock UI uses it to recognise a tactic.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;moraleLevel&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Morale level of a morale ability; 0 for other abilities.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;moraleCost&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;hasAPCostPerSecond&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;abilityCost&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;reuseTimer&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Reuse timer, in seconds.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;reuseTimerMax&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Maximum reuse timer, in seconds.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cooldown&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Same value as &amp;lt;code&amp;gt;reuseTimerMax&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;specialization&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stanceOrder&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;careerID&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;abilityImprovementThreshold&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;abilityImprovementCap&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;requiresPet&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isBuff&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isDebuff&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isDamaging&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isHealing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isDefensive&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isOffensive&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isStatsBuff&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isGranted&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isPassive&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || Flags of the ability. Always present.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isHex&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isCurse&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isCripple&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isAilment&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isBolster&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isAugmentation&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isBlessing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isEnchantment&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || Effect type flags. Only set (to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;) when one of the ability&amp;#039;s effects has that type; otherwise the key is absent.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;typeColorRed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;typeColorGreen&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;typeColorBlue&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Colour of an effect type, 0–255. Only present when an effect type has a colour.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* &amp;lt;code&amp;gt;abilityId&amp;lt;/code&amp;gt; is converted to an integer.&lt;br /&gt;
* &amp;lt;code&amp;gt;isActive&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; only for ability 2490 while a particular player state flag is set. For every other ability it is &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The client always returns a table. The stock wrapper &amp;lt;code&amp;gt;Player.GetAbilityData&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;easystem_utils/source/player.lua&amp;lt;/code&amp;gt;) treats a result whose &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; or 0 as &amp;quot;not found&amp;quot;.&lt;br /&gt;
* If there is no player object, or the Lua state is not available, the function returns nothing.&lt;br /&gt;
* The same ability data table is used for the entries of [[API:GetAbilityTable|GetAbilityTable]].&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;easystem_utils/source/player.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local abilityData = GetAbilityData (abilityId)&lt;br /&gt;
&lt;br /&gt;
if (abilityData == nil or abilityData.id == nil or abilityData.id == 0) then&lt;br /&gt;
    return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return abilityData&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Building a tooltip, from &amp;lt;code&amp;gt;ea_abilitieswindow/source/abilitieswindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Tooltips.CreateAbilityTooltip( GetAbilityData(data.id), SystemData.ActiveWindow.name, AbilitiesWindow.TOOLTIP_ANCHOR)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetAbilityTable|GetAbilityTable]]&lt;br /&gt;
* [[API:GetIconData|GetIconData]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>