Home › Lua API › UnitExperience

Available out of the box. Usable from Lua in the unmodified game.

UnitExperience

13 methods. Symbol/current columns are function addresses (RVA) of the native wrapper.

Community reference for this object: UnitExperience (Sukrit Tan, external).

Signatures are recovered from the game code. ⚠ = partly understood (arguments may be missing or approximate). ? after a name = optional argument. Types: integer/number are Lua numbers, enum-typed arguments show the C++ type in brackets. Two signatures mean the method is registered separately for the UI and the gameplay state and each wrapper was decoded on its own. "same code as" in the Symbol column means the compiler merged identical functions: those methods share one wrapper and cannot be told apart by address.

Method Signature Where Reference Symbol Current
CanPromote UnitExperience:CanPromote() → boolean gameplay yes ↗ 0x6ffad0 0x700220
ChangeExperience UnitExperience:ChangeExperience(iExperience: integer) (or nothing) gameplay yes ↗ 0x6ffb20 0x700270
ChangeStoredPromotions UnitExperience:ChangeStoredPromotions(iDelta: integer) (or nothing)
args: iDelta — A number. (inferred)
gameplay yes ↗ 0x6ffb70 0x7002c0
GetExperienceForNextLevel UI state: UnitExperience:GetExperienceForNextLevel() → number
gameplay state: UnitExperience:GetExperienceForNextLevel() → number
✓ called in the game: 1 value(s) as documented
returns: The scripts pass the result to UnitExperience.ChangeExperience (parameter iExperience). (inferred)
ui-cache, gameplay yes ↗ 0x6be4d0 0x6bea50
GetExperiencePoints UI state: UnitExperience:GetExperiencePoints() → number
gameplay state: UnitExperience:GetExperiencePoints() → number
✓ called in the game: 1 value(s) as documented
ui-cache, gameplay yes ↗ 0x6be520 0x6beaa0
GetLevel UnitExperience:GetLevel() → number
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6be570 0x6beaf0
GetPromotions UnitExperience:GetPromotions() → number[]
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6be5c0 0x6beb40
GetUnit UnitExperience:GetUnit() → Unit
✓ called in the game: 1 value(s) as documented
ui-cache yes ↗ 0x6be6d0 0x6bec50
GetVeteranName UI state: UnitExperience:GetVeteranName() → nil
gameplay state: UnitExperience:GetVeteranName() → nil/string
✓ called in the game: 1 value(s) as documented
ui-cache, gameplay yes ↗ 0x6be710 0x6bec90
HasPromotion UI state: UnitExperience:HasPromotion(ePromotion?: number) → boolean
gameplay state: UnitExperience:HasPromotion(ePromotion: integer[UnitPromotionTypes]) → boolean
✓ exists at runtime (not called)
ui-cache, gameplay yes ↗ 0x6be770 0x6becf0
SetExperienceLocked UnitExperience:SetExperienceLocked(bExpLocked: boolean) (or nothing)
args: bExpLocked — A boolean flag (true/false).
gameplay yes ↗ 0x6ffd10 0x700460
SetPromotion UnitExperience:SetPromotion(ePromotion: integer[UnitPromotionTypes]) (or nothing)
args: ePromotion — Index of a row of the UnitPromotions table (the value of GameInfo.UnitPromotions[...].Index).
gameplay yes ↗ 0x6ffd50 0x7004a0
SetVeteranName UnitExperience:SetVeteranName(sName?: string) (or nothing) gameplay yes ↗ 0x6ffda0 0x7004f0