Home › Class layouts › Definition › Definition::Resource

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).

Definition::Resource

GameCore::Definition::Resource — class, size 352 bytes (0x160).

Bases: Definition::IProperties at 0x0

Linux offset Member Type
0x10 m_DatabaseRowId int32
0x14 m_CollectionIndex uint32
0x18 m_ResourceClassTypeHash uint32
0x1c m_ResourceTypeHash uint32
0x20 m_Frequency int32
0x24 m_Happiness int32
0x28 m_RevealedEra int32
0x2c m_SeaFrequency int32
0x30 m_Name Basic
0x38 m_PeakEra Basic
0x40 m_ResourceClassType Basic
0x48 m_ResourceType Basic
0x50 m_PrereqCivic Optional<String::BasicT<String::BasicStringAlloc, ASCII> >
0x60 m_PrereqTech Optional<String::BasicT<String::BasicStringAlloc, ASCII> >
0x70 m_AdjacentToLand (bit-field, 1 bits) bool
0x70 m_Clumped (bit-field, 1 bits) bool
0x70 m_LakeEligible (bit-field, 1 bits) bool
0x70 m_NoRiver (bit-field, 1 bits) bool
0x70 m_RequiresRiver (bit-field, 1 bits) bool
0x78 m_Harvests Resource_HarvestReferenceCollection
0x90 m_ImprovementAdjacentResourceCollection Improvement_ValidAdjacentResourceReferenceCollection
0xa8 m_ImprovementCollection Improvement_ValidResourceReferenceCollection
0xc0 m_PrereqCivicReference const GameCore::Definition::Civic*
0xc8 m_PrereqTechReference const GameCore::Definition::Technology*
0xd0 m_ResourceProjectCollection ProjectReferenceCollection
0xe8 m_StartBiasResourceCollection StartBiasResourceReferenceCollection
0x100 m_StrategicUnitCollection UnitReferenceCollection
0x118 m_TradeRouteYieldChanges Resource_TradeRouteYieldReferenceCollection
0x130 m_ValidTerrains TerrainReferenceCollection
0x148 m_YieldChangeCollection Resource_YieldChangeReferenceCollection

Virtual functions

Slot order of the class's own vtable (inferred, see Virtual function tables). A virtual call call [vptr+offset] uses the byte offset. Owner is shown when the entry is inherited or overridden elsewhere.

Slot Offset Method Address in current build
0 0x0 \~Resource 0x7b1b20