ESODecoded

GetPlayerStat

ESO Lua API function — used by 46 of the 3,030 addons we indexed (combined 6,511,276 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.

Official signature

GetPlayerStat([DerivedStats|#DerivedStats] derivedStat, [StatBonusOption|#StatBonusOption] statBonusOption)

Returns: integer value

Real usage — from LibCombat

local function GetStat(stat) -- helper function to make code shorter
	return GetPlayerStat(stat, STAT_BONUS_OPTION_APPLY_BONUS)
end

Short excerpt from the shipping addon LibCombatits ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.

Most-downloaded addons using it

AddonTotal downloads
LibCombat5,017,654
Greyskull : Weapon / Spell Damage Meter322,434
Constellations277,088
ESO-Database.com Export AddOn272,910
BSCs-AdvancedSynergy108,129
Omni Stats49,188