Home › Native functions › City

Engine internals. No scripting access today. Listed for contributors and for understanding the game; using it needs a change to the game library.

City

Function Signature (Linux) Symbol Current From Lua Notes
BuildQueue::BuildQueue void City::BuildQueue::BuildQueue(City::BuildQueue* this) 0xf34f0 0xf36a0 no writes
BuildQueue::ChangeExtraUnitCopyTag void City::BuildQueue::ChangeExtraUnitCopyTag(City::BuildQueue* this, string sTag, int iChange) 0xfa990 0xfac80 no writes
BuildQueue::ChangeProductionModifier void City::BuildQueue::ChangeProductionModifier(City::BuildQueue* this, BuildingTypes eBuilding, int iDelta) (+3 overloads) 0x948f70 0x949730 Dev CE (experimental): CityBuildQueue.ChangeProductionModifier writes; called by EFFECT_ADJUST_PROJECT_PRODUCTION
BuildQueue::RemoveDistrictProgress void City::BuildQueue::RemoveDistrictProgress(City::BuildQueue* this, District::Instance* pkDistrict) 0x103260 0x103820 no edit_call, writes
BuildQueue::SetDistrictPercentComplete void City::BuildQueue::SetDistrictPercentComplete(City::BuildQueue* this, DistrictTypes eDistrict, int iPercent) 0x104020 0x1046f0 Dev CE (experimental): CityBuildQueue.SetDistrictPercentComplete writes
Buildings::AddGreatWork ★ void City::Buildings::AddGreatWork(City::Buildings* this, GreatWorkListIndex iIndex) 0x108b40 0x109290 Dev CE (experimental): CityBuildings.AddGreatWork analysed, signal, writes
Buildings::AddGreatWorkToSlot ★ void City::Buildings::AddGreatWorkToSlot(City::Buildings* this, GreatWorkListIndex iIndex, BuildingTypes eBuilding, int iSlot) 0x109260 0x1099b0 Dev CE (experimental): CityBuildings.AddGreatWorkToSlot analysed, writes
Buildings::ChangeWonderYieldChange void City::Buildings::ChangeWonderYieldChange(City::Buildings* this, YieldTypes eYield, int iChange) 0x1095e0 0x109d30 Dev CE (experimental): CityBuildings.ChangeWonderYieldChange writes; called by EFFECT_ADJUST_WONDER_YIELD_CHANGE
Buildings::ChangeYieldChange void City::Buildings::ChangeYieldChange(City::Buildings* this, BuildingTypes eBuilding, YieldTypes eYield, int iChange) 0x109670 0x109dc0 Dev CE (experimental): CityBuildings.ChangeYieldChange writes; called by EFFECT_ADJUST_BUILDING_YIELD_CHANGE
Buildings::ChangeYieldChangeCityStates void City::Buildings::ChangeYieldChangeCityStates(City::Buildings* this, BuildingTypes eBuilding, YieldTypes eYield, int iChange) 0x1097c0 0x109f10 Dev CE (experimental): CityBuildings.ChangeYieldChangeCityStates writes; called by EFFECT_ADJUST_BUILDING_YIELD_CHANGE
Buildings::ChangeYieldChangeFromFeature void City::Buildings::ChangeYieldChangeFromFeature(City::Buildings* this, FeatureTypes eFeature, YieldTypes eYield, int iChange) 0x109910 0x10a060 Dev CE (experimental): CityBuildings.ChangeYieldChangeFromFeature writes; called by EFFECT_ADJUST_BUILDING_FEATURE_YIELD_CHANGE
Buildings::ChangeYieldModifier void City::Buildings::ChangeYieldModifier(City::Buildings* this, BuildingTypes eBuilding, YieldTypes eYield, int iChange) 0x109a80 0x10a1d0 Dev CE (experimental): CityBuildings.ChangeYieldModifier writes; called by EFFECT_ADJUST_BUILDING_YIELD_MODIFIER, EFFECT_ADJUST_BUILDING_YIELD_MODIFIERS_FOR_DISTRICT
Buildings::IsInCity ★ bool City::Buildings::IsInCity(const City::Buildings* this, GreatWorkListIndex iIndex) 0x10c6a0 0x10cc60 Dev CE (experimental): CityBuildings.IsInCity analysed
Buildings::RemoveAllBuildings void City::Buildings::RemoveAllBuildings(City::Buildings* this) 0x10c9c0 0x10cf80 Dev CE (experimental): CityBuildings.RemoveAllBuildings signal, event, writes
Buildings::RemoveGreatWork ★ int City::Buildings::RemoveGreatWork(City::Buildings* this, GreatWorkListIndex iIndex) 0x10cdb0 0x10d370 only indirectly analysed
Buildings::SetEraCreatedToGameEra void City::Buildings::SetEraCreatedToGameEra(City::Buildings* this, BuildingTypes eBuilding) 0x10e2f0 0x10e880 Dev CE (experimental): CityBuildings.SetEraCreatedToGameEra writes
Combat::SetSiegeProtection void City::Combat::SetSiegeProtection(City::Combat* this, bool bProtected) 0x111580 0x111b10 Dev CE (experimental): City.SetSiegeProtection writes; called by EFFECT_ADJUST_CITY_SIEGE_PROTECTION
CulturalIdentity::ChangeAccumulatedIdentity void City::CulturalIdentity::ChangeAccumulatedIdentity(City::CulturalIdentity* this, PlayerTypes ePlayer, FixedPoint xIdentityChange) 0x114a10 0x114fa0 Dev CE (experimental): City.ChangeAccumulatedIdentity edit_call, writes
CulturalIdentity::ChangeCountAlwaysLoyalFlags void City::CulturalIdentity::ChangeCountAlwaysLoyalFlags(City::CulturalIdentity* this, int iDelta) 0x114b30 0x1150c0 Dev CE (experimental): City.ChangeCountAlwaysLoyalFlags writes; called by EFFECT_ADJUST_CITY_ALWAYS_LOYAL
CulturalIdentity::ChangeExtraIdentityPerTurnPerCitizen void City::CulturalIdentity::ChangeExtraIdentityPerTurnPerCitizen(City::CulturalIdentity* this, FixedPoint xDelta) 0x114b70 0x115100 Dev CE (experimental): City.ChangeExtraIdentityPerTurnPerCitizen writes; called by EFFECT_ADJUST_CITY_IDENTITY_PER_CITIZEN
CulturalIdentity::ChangeIdentityPressureFromAges void City::CulturalIdentity::ChangeIdentityPressureFromAges(City::CulturalIdentity* this, FixedPoint xChange) 0x114c20 0x1151b0 Dev CE (experimental): City.ChangeIdentityPressureFromAges writes; called by EFFECT_ADJUST_CITY_IDENTITY_PRESSURE_FROM_AGES
CulturalIdentity::ChangeIdentityPressureFromModifiers void City::CulturalIdentity::ChangeIdentityPressureFromModifiers(City::CulturalIdentity* this, FixedPoint xChange) 0x114c50 0x1151e0 Dev CE (experimental): City.ChangeIdentityPressureFromModifiers writes; called by EFFECT_ADJUST_CITY_IDENTITY_PRESSURE
Culture::ChangeGreatWorkYieldModifier void City::Culture::ChangeGreatWorkYieldModifier(City::Culture* this, GreatWorkObjectTypes eObjectType, YieldTypes eYield, int iYieldChange, int iScalingFactor) 0x11b650 0x11b800 Dev CE (experimental): City.ChangeGreatWorkYieldModifier writes; called by EFFECT_ADJUST_CITY_GREATWORK_YIELD
Culture::ChangeTourism void City::Culture::ChangeTourism(City::Culture* this, ImprovementTypes eImprovement, GreatWorkObjectTypes eObjectType, bool bAffectsWonders, bool bAffectsReligiousTourism, int iScalingFactor, int iModifierID) 0x11b7b0 0x11b960 Dev CE (experimental): City.ChangeTourism writes; called by EFFECT_ADJUST_CITY_TOURISM
Districts::DestroyAll void City::Districts::DestroyAll(City::Districts* this) 0x11e290 0x11e3f0 Dev CE (experimental): CityDistricts.DestroyAll writes
Gold::SetBuildingFaithPurchaseByDistrict void City::Gold::SetBuildingFaithPurchaseByDistrict(City::Gold* this, DistrictTypes eDistrict, bool bNewValue) 0x121ac0 0x121c20 Dev CE (experimental): City.SetBuildingFaithPurchaseByDistrict writes; called by EFFECT_ENABLE_BUILDING_FAITH_PURCHASE
Gold::SetUnitFaithPurchaseByTag void City::Gold::SetUnitFaithPurchaseByTag(City::Gold* this, string& kTag, bool bNewValue) 0x121ba0 0x121d00 no writes; called by EFFECT_ENABLE_UNIT_FAITH_PURCHASE
Growth::AddGrowth void City::Growth::AddGrowth(City::Growth* this, FixedPoint xGrowth) 0x123000 0x123160 Dev CE (experimental): CityGrowth.AddGrowth writes
Growth::ChangeFeatureAppealModifier void City::Growth::ChangeFeatureAppealModifier(City::Growth* this, FeatureTypes eFeature, int iChange) 0x123210 0x123370 Dev CE (experimental): CityGrowth.ChangeFeatureAppealModifier writes; called by EFFECT_ADJUST_FEATURE_APPEAL_MODIFIER
Instance::AddCityHappinessModifier void City::Instance::AddCityHappinessModifier(City::Instance* this, HappinessTypes eHappiness, YieldTypes eYield, GreatPersonClassTypes eGreatPersonClass, int iYieldChange, int iGreatPersonChange) 0x12f490 0x12f320 Dev CE (experimental): City.AddCityHappinessModifier edit_call, writes; called by EFFECT_ADJUST_CITY_HAPPINESS_GREAT_PERSON, EFFECT_ADJUST_CITY_HAPPINESS_YIELD
Instance::AddDynamicAdjacencyBonus void City::Instance::AddDynamicAdjacencyBonus(City::Instance* this, DistrictTypes eDistrict, TerrainTypes eTerrain, FeatureTypes eFeature, bool bIsRiver, int iAppeal, bool bAdjacentDistrict, YieldTypes eYield, int iTilesRequired, int iValue, LocalizationString szString) 0x12f5e0 0x12f470 no edit_call, writes; called by EFFECT_ADJUST_DISTRICT_YIELD_BASED_ON_APPEAL, EFFECT_DISTRICT_ADJACENCY, EFFECT_FEATURE_ADJACENCY +2 more
Instance::ChangeAllowIncomingRegionalStackingCount void City::Instance::ChangeAllowIncomingRegionalStackingCount(City::Instance* this, YieldTypes eYield, int iDelta) 0x131c00 0x131a90 Dev CE (experimental): City.ChangeAllowIncomingRegionalStackingCount edit_call, writes; called by EFFECT_ADJUST_CITY_ALLOWED_INCOMING_REGIONAL_STACKING
Instance::ChangeFollowerYieldModifier void City::Instance::ChangeFollowerYieldModifier(City::Instance* this, YieldTypes eYield, int iDelta) 0x131c60 0x131af0 Dev CE (experimental): City.ChangeFollowerYieldModifier edit_call, event, writes; called by EFFECT_ADJUST_FOLLOWER_YIELD_MODIFIER
Instance::ChangeYieldChange void City::Instance::ChangeYieldChange(City::Instance* this, YieldTypes eYield, int iDelta) 0x131dd0 0x131c60 Dev CE (experimental): City.ChangeYieldChange edit_call, event, writes; called by EFFECT_ADJUST_CITY_ALL_YIELDS_CHANGE, EFFECT_ADJUST_CITY_YIELD_CHANGE
Instance::ChangeYieldModifier void City::Instance::ChangeYieldModifier(City::Instance* this, YieldTypes eYield, int iDelta) 0x131e60 0x131cf0 Dev CE (experimental): City.ChangeYieldModifier edit_call, event, writes; called by EFFECT_ADJUST_CITY_YIELD_MODIFIER
Instance::ChangeYieldModifierPerGovernorTitle void City::Instance::ChangeYieldModifierPerGovernorTitle(City::Instance* this, YieldTypes eYield, FixedPoint xDelta) 0x131ef0 0x131d80 Dev CE (experimental): City.ChangeYieldModifierPerGovernorTitle edit_call, event, writes; called by EFFECT_ADJUST_CITY_YIELD_MODIFIER_PER_GOVERNOR_TITLE
Instance::RemoveCityHappinessModifier void City::Instance::RemoveCityHappinessModifier(City::Instance* this, HappinessTypes eHappiness, YieldTypes eYield, GreatPersonClassTypes eGreatPersonClass, int iYieldChange, int iGreatPersonChange) 0x134c40 0x1349b0 Dev CE (experimental): City.RemoveCityHappinessModifier edit_call, writes; called by EFFECT_ADJUST_CITY_HAPPINESS_GREAT_PERSON, EFFECT_ADJUST_CITY_HAPPINESS_YIELD
Instance::RemoveDynamicAdjacencyBonus void City::Instance::RemoveDynamicAdjacencyBonus(City::Instance* this, DistrictTypes eDistrict, TerrainTypes eTerrain, FeatureTypes eFeature, bool bIsRiver, int iAppeal, bool bAdjacentDistrict, YieldTypes eYield) 0x135020 0x134d90 Dev CE (experimental): City.RemoveDynamicAdjacencyBonus edit_call, writes; called by EFFECT_ADJUST_DISTRICT_YIELD_BASED_ON_APPEAL, EFFECT_DISTRICT_ADJACENCY, EFFECT_FEATURE_ADJACENCY +2 more
Instance::ResetCache void City::Instance::ResetCache(City::Instance* this) 0x135600 0x135370 Dev CE (experimental): City.ResetCache writes
Instance::SetOccupied void City::Instance::SetOccupied(City::Instance* this, bool bNewValue) 0x135cf0 0x135a30 Dev CE (experimental): City.SetOccupied event, writes
Manager::MoveCapital void City::Manager::MoveCapital(PlayerTypes ePlayer, City::Instance* pkNewCapital) 0x143a40 0x1425c0 no edit_call, event, writes
Manager::SetComplete void City::Manager::SetComplete(District::Instance* pkDistrict, bool bState, bool bOriginalConstruction) 0x144140 0x142cc0 no writes
Power::ChangeFreePower void City::Power::ChangeFreePower(City::Power* this, FixedPoint xFreePower, FreePowerSourceTypes eSource, PlotCoord kLocation) 0x148310 0x146f30 no writes; called by EFFECT_ADJUST_CITY_FREE_POWER
Power::RecalculatePower void City::Power::RecalculatePower(City::Power* this) 0x148f50 0x147e80 Dev CE (experimental): City.RecalculatePower signal, event, writes
Trade::ChangeFlatYieldBonusForInternational void City::Trade::ChangeFlatYieldBonusForInternational(City::Trade* this, YieldTypes eYield, FixedPoint xDelta) 0x14ec30 0x14da50 Dev CE (experimental): City.ChangeFlatYieldBonusForInternational writes; called by EFFECT_ADJUST_CITY_TRADE_ROUTE_YIELD_FOR_INTERNATIONAL
Trade::ChangeYieldFromForeignRoutesPassingThrough void City::Trade::ChangeYieldFromForeignRoutesPassingThrough(City::Trade* this, YieldTypes eYield, FixedPoint xDelta) 0x14ece0 0x14db00 Dev CE (experimental): City.ChangeYieldFromForeignRoutesPassingThrough writes; called by EFFECT_ADJUST_CITY_YIELD_FROM_FOREIGN_TRADE_ROUTES_PASSING_THROUGH
Trade::ChangeYieldPerDestinationLuxuryResourceForInternational void City::Trade::ChangeYieldPerDestinationLuxuryResourceForInternational(City::Trade* this, YieldTypes eYield, FixedPoint xDelta) 0x14ed10 0x14db30 Dev CE (experimental): City.ChangeYieldPerDestinationLuxuryResourceForInternational writes; called by EFFECT_ADJUST_CITY_TRADE_ROUTE_YIELD_PER_DESTINATION_LUXURY_RESOURCE_FOR_INTERNATIONAL
Trade::ChangeYieldPerDestinationStrategicResourceForDomestic void City::Trade::ChangeYieldPerDestinationStrategicResourceForDomestic(City::Trade* this, YieldTypes eYield, FixedPoint xDelta) 0x14ed40 0x14db60 Dev CE (experimental): City.ChangeYieldPerDestinationStrategicResourceForDomestic writes; called by EFFECT_ADJUST_CITY_TRADE_ROUTE_YIELD_PER_DESTINATION_STRATEGIC_RESOURCE_FOR_DOMESTIC
Trade::ChangeYieldPerDestinationStrategicResourceForInternational void City::Trade::ChangeYieldPerDestinationStrategicResourceForInternational(City::Trade* this, YieldTypes eYield, FixedPoint xDelta) 0x14ed70 0x14db90 Dev CE (experimental): City.ChangeYieldPerDestinationStrategicResourceForInternational writes; called by EFFECT_ADJUST_CITY_TRADE_ROUTE_YIELD_PER_DESTINATION_STRATEGIC_RESOURCE_FOR_INTERNATIONAL
Trade::ChangeYieldPerLocalBonusResourceForDomestic void City::Trade::ChangeYieldPerLocalBonusResourceForDomestic(City::Trade* this, YieldTypes eYield, FixedPoint xDelta) 0x14eda0 0x14dbc0 Dev CE (experimental): City.ChangeYieldPerLocalBonusResourceForDomestic writes; called by EFFECT_ADJUST_CITY_TRADE_ROUTE_YIELD_PER_LOCAL_BONUS_RESOURCE_FOR_DOMESTIC
Trade::ChangeYieldPerLocalBonusResourceForInternational void City::Trade::ChangeYieldPerLocalBonusResourceForInternational(City::Trade* this, YieldTypes eYield, FixedPoint xDelta) 0x14edd0 0x14dbf0 Dev CE (experimental): City.ChangeYieldPerLocalBonusResourceForInternational writes; called by EFFECT_ADJUST_CITY_TRADE_ROUTE_YIELD_PER_LOCAL_BONUS_RESOURCE_FOR_INTERNATIONAL
Trade::ChangeYieldPerLocalLuxuryResourceForInternational void City::Trade::ChangeYieldPerLocalLuxuryResourceForInternational(City::Trade* this, YieldTypes eYield, FixedPoint xDelta) 0x14ee00 0x14dc20 Dev CE (experimental): City.ChangeYieldPerLocalLuxuryResourceForInternational writes; called by EFFECT_ADJUST_CITY_TRADE_ROUTE_YIELD_PER_LOCAL_LUXURY_RESOURCE_FOR_INTERNATIONAL
Trade::ChangeYieldPerLocalStrategicResourceForInternational void City::Trade::ChangeYieldPerLocalStrategicResourceForInternational(City::Trade* this, YieldTypes eYield, FixedPoint xDelta) 0x14ee30 0x14dc50 Dev CE (experimental): City.ChangeYieldPerLocalStrategicResourceForInternational writes; called by EFFECT_ADJUST_CITY_TRADE_ROUTE_YIELD_PER_LOCAL_STRATEGIC_RESOURCE_FOR_INTERNATIONAL
Trade::ChangeYieldPerMajorTradePartner void City::Trade::ChangeYieldPerMajorTradePartner(City::Trade* this, YieldTypes eYield, FixedPoint xDelta) 0x14ee60 0x14dc80 Dev CE (experimental): City.ChangeYieldPerMajorTradePartner writes; called by EFFECT_ADJUST_CITY_YIELD_PER_MAJOR_TRADE_PARTNER
Trade::SetHasConstructedTradingPost void City::Trade::SetHasConstructedTradingPost(City::Trade* this, PlayerTypes ePlayer, bool bValue) 0x14fa50 0x14e720 via CE: CityTradeManager.SetHasConstructedTradingPost signal, writes; called by EFFECT_GRANT_CITY_TRADING_POST

Notes (★)

City::Buildings::AddGreatWork

Places a great work into the first empty slot in the city that accepts its object type.

City::Buildings::AddGreatWorkToSlot

Places a great work into a specific building's slot. A negative slot means 'first empty slot in that building'.

City::Buildings::IsInCity

True if a great work with this index sits in any slot of any building in this city.

City::Buildings::RemoveGreatWork

Clears the slot that holds a given great work in a city. Returns the slot number it was in, or -1 if this city does not hold it.