Home › Class layouts › City › City::Buildings

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

City::Buildings

GameCore::City::Buildings — class, size 304 bytes (0x130).

Per-city building state. The great-work slots of the city live in m_aGreatWorkBuildings.

See also: City::GreatWorkBuilding, City::GreatWorkSlot, Game::GreatWork

Linux offset Member Type Windows Lua methods (inferred)
0x0 m_pCity ParentPtr<GameCore::City::Instance>
0x8 m_aiBuildingLoc Types::Vector<short, Types::LinearAlloc::Default<1, 0> > reads: CityBuildings:GetBuildingLocation, CityBuildings:SetBuildingLocation
0x20 m_abPillaged Types::Vector<bool, Types::LinearAlloc::Default<1, 0> >
0x38 m_aeEraCreated Types::Vector<short, Types::LinearAlloc::Default<1, 0> >
0x50 m_aiNumUnitsSupported Types::Vector<short, Types::LinearAlloc::Default<1, 0> >
0x68 m_aYieldModifiers BuildingYieldModifierArray
0x80 m_aYieldChanges BuildingYieldModifierArray
0x98 m_aYieldChangesCityStates BuildingYieldModifierArray
0xb0 m_aWonderYieldChanges WonderYieldModifierArray
0xc8 m_aGreatWorkBuildings GreatWorkBuildingArray 0xc8 (same on Windows; verified) writes: CityBuildings:RemoveBuilding, CityBuildings:SetBuildingLocation; reads: CityBuildings:RemoveBuilding, CityBuildings:SetBuildingLocation
0xe0 m_aExtraGreatWorks ExtraGreatWorkSlotsArray reads: CityBuildings:RemoveBuilding
0xf8 m_aYieldChangeFromFeatures YieldChangeFromFeaturesArray
0x110 m_aBuildingNameOverrides BuildingNameArray

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.