Home › Class layouts › Unit › Unit::Experience

Needs the Community Extension. Not available in the unmodified game; works while the Community Extension mod is active (its own functions, or raw memory access with Mem/ObjMem).

Unit::Experience

GameCore::Unit::Experience — class, size 80 bytes (0x50).

Linux offset Member Type Windows Lua methods (inferred)
0x0 m_pUnit ParentPtr<GameCore::Unit::Instance>
0x8 m_bCanPromote bool
0x9 m_bCanPromoteNotifyNeeded bool
0xa m_bExperienceLocked bool
0xc m_iExperience int 0xc (same on Windows; verified)
0x10 m_iLevel int 0x10 (same on Windows; verified) writes: UnitExperience:ChangeExperience
0x14 m_iStoredPromotions int
0x18 m_iPromoteNoFinishMoves int
0x20 m_sVeteranName NameString writes: UnitExperience:SetVeteranName; reads: UnitExperience:SetVeteranName
0x28 m_xGeneralExperienceModifier FixedPoint
0x2c m_xAttackingExperienceModifierPercent FixedPoint
0x30 m_abPromotionsEarned Types::Vector<bool, Types::LinearAlloc::Default<1, 0> > reads: UnitExperience:SetPromotion
0x48 m_uiPromotionArraySize uint

The Windows column is filled in only for members that were checked against Windows code. For the rest, use the Linux offset with the rule above.