I used to use this method of enforcing mutual exclusion on buildings, but as heavenfall rightly points out, the AI will get some multiple of this resource due to the difficulty settings. This is one of the reasons I put my building mod on hold.
There appears to be a work-around to this. If you set a negative production bonus in your unique improvement equal to the resource production in your cityhub, the two should cancel each other out. In that case it shouldn't make a difference if the AI gets a production multiplier because it will also multiply the (negative) production of the improvement. I have tried it and it appears to work. Am I missing something?
Local Resource:
[code]
<ResourceTypes>
<!-- ************** -->
<!-- ** Local_1 *** -->
<!-- ************** -->
<ResourceType InternalName="L1_Local">
<DisplayName>Local_Resource</DisplayName>
<Type>Local_1</Type>
<HarvestType>Mining</HarvestType>
<IconColor>0,0,0</IconColor>
<Icon>Gfx//Icons//Icon_Metal.png</Icon>
<ClothIcon>gfx\\TacticalIcons\\MetalOre_1.png</ClothIcon>
<TileDesign>Res_MetalOre_01</TileDesign>
<ModelColor>0,0,0</ModelColor>
<Production>1.0</Production>
<Worth>1</Worth>
<Global>1</Global>
<Rarity>0.0</Rarity>
<Stored>0</Stored>
<Shared>0</Shared>
<TradedByCaravans>0</TradedByCaravans>
<ShownInGlobalDisplay>1</ShownInGlobalDisplay>
<Medallions InternalName="IronOre_Res_Medallions">
<All>Res_Ores_Plains.png</All>
</Medallions>
</ResourceType>
<ResourceTypes>
[/code]
City Hub: (only lvl 1 included)
[code]
<ImprovementTypes>
<DataChecksum NoParse="1">
<Ignore>DisplayName</Ignore>
<Translate>DisplayName</Translate>
</DataChecksum>
<!--******************************-->
<!-- Capital Level 1 -->
<!--******************************-->
<ImprovementType InternalName="K_Capital">
<DisplayName>Capital</DisplayName>
<AIName>Outpost</AIName>
<TileDesign>F_Outpost_02_v2</TileDesign>
<TileStagePopulation>2</TileStagePopulation>
<TileStageDesign>F_Outpost_03</TileStageDesign>
<TileStagePopulation>4</TileStagePopulation>
<TileStageDesign>F_Outpost_04</TileStageDesign>
<TileStagePopulation>7</TileStagePopulation>
<TileStageDesign>F_Outpost_05</TileStageDesign>
<TileStagePopulation>10</TileStagePopulation>
<TileStageDesign>F_Outpost_06</TileStageDesign>
<TileStagePopulation>14</TileStagePopulation>
<TileStageDesign>F_Outpost_02</TileStageDesign>
<IsCityHub>true</IsCityHub>
<RequiresCity>False</RequiresCity>
<SupportedTerrainType>Land</SupportedTerrainType>
<SupportedTerrainType>City</SupportedTerrainType>
<DrawnIcon>Gfx/TacticalIcons/F_Hovel.dds</DrawnIcon>
<DrawnIconDefended>Gfx/TacticalIcons/WorldMap_Outpost_Def.png</DrawnIconDefended>
<Thumbnail>Gfx/Medallions/Building_Inn1.png</Thumbnail>
<ZOCMinRadius>1</ZOCMinRadius>
<ZOCMaxRadius>3</ZOCMaxRadius>
<ZOCRadiusTurnsBeforeUpdate>10</ZOCRadiusTurnsBeforeUpdate>
<BuildRadius>1</BuildRadius>
<BuildableTiles>50</BuildableTiles>
<CitywideDuplicateImpLimit>1</CitywideDuplicateImpLimit>
<OnSelectSFX>Click_Paper_5</OnSelectSFX>
<OnSelectSFX>Click_Paper_4</OnSelectSFX>
<Prereq InternalName="L1_Allegiance_Prereq">
<Type>Allegiance</Type>
<Attribute>Empire</Attribute>
</Prereq>
<GameModifier InternalName="L1_Local">
<ModType>Resource</ModType>
<Attribute>Local_1</Attribute>
<Value>1</Value>
<PerTurn>1</PerTurn>
<ResourceShared>0</ResourceShared>
</GameModifier>
<!--Holds some population-->
<GameModifier InternalName="L1_Storage_Population">
<ModType>ResourceStorage</ModType>
<Attribute>Population</Attribute>
<Value>10.0</Value>
<Cumulative>true</Cumulative>
</GameModifier>
<!-- Level-up Cap -->
<GameModifier InternalName="L1_LevelCap">
<ModType>LevelBarrier</ModType>
<Attribute>Population</Attribute>
<Value>15.0</Value>
<CityUpgrade>F_Capital_L2</CityUpgrade>
</GameModifier>
<GameModifier>
<ModType>City</ModType>
<Attribute>AdjustDefendingUnit</Attribute>
<Value>5</Value>
<Operator>+</Operator>
<StrVal>UnitStat_HitPoints</StrVal>
<PerTurn>1</PerTurn>
</GameModifier>
<GameModifier>
<ModType>Resource</ModType>
<Attribute>local_1</Attribute>
<Value>1.0</Value> <!-- multiply this -->
<PerTurn>1</PerTurn>
</GameModifier>
<!-- Item Shop - Base Items -->
<UnlocksShopItem>SaltedPork</UnlocksShopItem>
<UnlocksShopItem>GnarledClub</UnlocksShopItem>
<UnlocksShopItem>Staff</UnlocksShopItem>
<UnlocksShopItem>TravelingBoots</UnlocksShopItem>
</ImprovementType>
</ImprovementTypes>
[/code]
Unique Improvement:
[code]
<ImprovementTypes>
<DataChecksum NoParse="1">
<Ignore>DisplayName</Ignore>
<Translate>DisplayName</Translate>
</DataChecksum>
<!-- ********** -->
<!-- ** Farm ** -->
<!-- ********** -->
<ImprovementType InternalName="Unique_Improvement">
<DisplayName>Unique_1</DisplayName>
<Description>Unique Improvement</Description>
<!-- Improvement Data -->
<TileDesign>K_Farm_01</TileDesign>
<ConstructionTileDesign>K_Farm_Build_01</ConstructionTileDesign>
<SupportedTerrainType>Land</SupportedTerrainType>
<SupportedTerrainType>City</SupportedTerrainType>
<DrawnIcon>Gfx/TacticalIcons/K_Farm1.png</DrawnIcon>
<DrawnIconConstruction>Gfx/TacticalIcons/K_Farm1_C.png</DrawnIconConstruction>
<Thumbnail>K_Farm_01_Thumb.png</Thumbnail>
<IgnoreDuplicateImpLimit>True</IgnoreDuplicateImpLimit>
<!-- Medallion Data -->
<Medallions InternalName="">
<All>K_Farm_01_Thumb.png</All>
<Border_All>
</Border_All>
</Medallions>
<!-- Prerequisites -->
<RequiresCity>True</RequiresCity>
<!-- Unlock this through the farming tech -->
<!-- Cost -->
<IgnoreDuplicateImpLimit>True</IgnoreDuplicateImpLimit>
<LaborToBuild>1.0</LaborToBuild>
<!-- Building Production/Consumption. -->
<GameModifier>
<ModType>ConstructionResourceCost</ModType>
<Attribute>Local_1</Attribute>
<Value>-1.0</Value>
</GameModifier>
<GameModifier InternalName="Production1">
<ModType>Resource</ModType>
<Attribute>Local_1</Attribute>
<Value>-1</Value> <!-- and multiply this -->
<PerTurn>1</PerTurn>
</GameModifier>
<GameModifier InternalName="Production1">
<ModType>Resource</ModType>
<Attribute>Rations</Attribute>
<Value>5.0</Value>
<PerTurn>1</PerTurn>
</GameModifier>
<Prereq>
<Type>Allegiance</Type>
<Attribute>Kingdom</Attribute>
</Prereq>
<!-- AI Info -->
<AIData AIPersonality="AI_General">
<AITag>Farming</AITag>
/AIData>
</ImprovementType>
</ImprovementTypes>
[/code]