###################################
# N3OW Standard Economy Buildings #
###################################

### tell mines

tell_mines_01 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_tell_mines_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_1_cost
	
	type_icon = "icon_building_tell_mines.dds"
	province_modifier = {
		monthly_income = normal_building_tax_tier_1
	}
	character_culture_modifier = {
		parameter = quarries_building_bonuses
		heavy_infantry_maintenance_mult = -0.01
		pikemen_maintenance_mult = -0.01
		heavy_cavalry_maintenance_mult = -0.01
		men_at_arms_recruitment_cost = -0.01
	}
	county_culture_modifier = {
		parameter = quarries_building_bonuses
		levy_size = 0.01
	}
	province_culture_modifier = {
		parameter = ancient_miners_quarries_building_bonuses
		monthly_income = poor_building_tax_tier_1
	}
	
	next_building = tell_mines_02

	type_icon = "icon_building_tell_mines.dds"
	
	ai_value = {
		base = 12 # A little bit higher than normal, they're very handy for further development
		ai_tier_1_building_modifier = yes
		ai_tier_1_economical_building_preference_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_quarries_improvement_from_culture_modifier = yes
		modifier = {
			factor = 0
			scope:holder = {
				government_has_flag = government_is_republic
			}
			NOT = {
				has_building_or_higher = guild_halls_01
			}
		}
	}
}

tell_mines_02 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_tell_mines_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		scope:holder.culture = {
			has_innovation = innovation_crop_rotation
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_2_cost
	
	type_icon = "icon_building_tell_mines.dds"
	province_modifier = {
		monthly_income = normal_building_tax_tier_2
	}
	county_modifier = {
		development_growth_factor = 0.025
	}
	character_culture_modifier = {
		parameter = quarries_building_bonuses
		heavy_infantry_maintenance_mult = -0.02
		pikemen_maintenance_mult = -0.02
		heavy_cavalry_maintenance_mult = -0.02
		men_at_arms_recruitment_cost = -0.02
	}
	county_culture_modifier = {
		parameter = quarries_building_bonuses
		levy_size = 0.02
	}
	province_culture_modifier = {
		parameter = ancient_miners_quarries_building_bonuses
		monthly_income = poor_building_tax_tier_2
	}
	
	next_building = tell_mines_03
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

tell_mines_03 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_tell_mines_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 02 }
		scope:holder.culture = {
			has_innovation = innovation_manorialism
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = cheap_building_tier_3_cost
	
	type_icon = "icon_building_tell_mines.dds"
	province_modifier = {
		monthly_income = normal_building_tax_tier_3
	}
	county_modifier = {
		development_growth_factor = 0.05
	}
	character_modifier = {
		cultural_head_fascination_mult = 0.005
	}
	character_culture_modifier = {
		parameter = quarries_building_bonuses
		heavy_infantry_maintenance_mult = -0.03
		pikemen_maintenance_mult = -0.03
		heavy_cavalry_maintenance_mult = -0.03
		men_at_arms_recruitment_cost = -0.03
	}
	county_culture_modifier = {
		parameter = quarries_building_bonuses
		levy_size = 0.03
	}
	province_culture_modifier = {
		parameter = ancient_miners_quarries_building_bonuses
		monthly_income = poor_building_tax_tier_3
	}
	
	next_building = tell_mines_04
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

tell_mines_04 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_tell_mines_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 02 }
		scope:holder.culture = {
			has_innovation = innovation_manorialism
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = cheap_building_tier_4_cost
	
	type_icon = "icon_building_tell_mines.dds"
	province_modifier = {
		monthly_income = normal_building_tax_tier_4
	}
	county_modifier = {
		development_growth_factor = 0.1
	}
	character_modifier = {
		cultural_head_fascination_mult = 0.01
	}
	character_culture_modifier = {
		parameter = quarries_building_bonuses
		heavy_infantry_maintenance_mult = -0.04
		pikemen_maintenance_mult = -0.04
		heavy_cavalry_maintenance_mult = -0.04
		men_at_arms_recruitment_cost = -0.04
	}
	county_culture_modifier = {
		parameter = quarries_building_bonuses
		levy_size = 0.04
	}
	province_culture_modifier = {
		parameter = ancient_miners_quarries_building_bonuses
		monthly_income = poor_building_tax_tier_4
	}
	
	next_building = tell_mines_05
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

tell_mines_05 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_tell_mines_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 03 }
		scope:holder.culture = {
			has_innovation = innovation_guilds
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = cheap_building_tier_5_cost
	
	type_icon = "icon_building_tell_mines.dds"
	province_modifier = {
		monthly_income = normal_building_tax_tier_5
	}
	county_modifier = {
		development_growth_factor = 0.15
	}
	character_modifier = {
		cultural_head_fascination_mult = 0.02
	}
	character_culture_modifier = {
		parameter = quarries_building_bonuses
		heavy_infantry_maintenance_mult = -0.05
		pikemen_maintenance_mult = -0.05
		heavy_cavalry_maintenance_mult = -0.05
		men_at_arms_recruitment_cost = -0.05
	}
	county_culture_modifier = {
		parameter = quarries_building_bonuses
		levy_size = 0.05
	}
	province_culture_modifier = {
		parameter = ancient_miners_quarries_building_bonuses
		monthly_income = poor_building_tax_tier_5
	}
	
	next_building = tell_mines_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

tell_mines_06 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_tell_mines_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 03 }
		scope:holder.culture = {
			has_innovation = innovation_guilds
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = cheap_building_tier_6_cost
	
	type_icon = "icon_building_tell_mines.dds"
	province_modifier = {
		monthly_income = normal_building_tax_tier_6
	}
	county_modifier = {
		development_growth_factor = 0.2
	}
	character_modifier = {
		cultural_head_fascination_mult = 0.03
	}
	character_culture_modifier = {
		parameter = quarries_building_bonuses
		heavy_infantry_maintenance_mult = -0.06
		pikemen_maintenance_mult = -0.06
		heavy_cavalry_maintenance_mult = -0.06
		men_at_arms_recruitment_cost = -0.06
	}
	county_culture_modifier = {
		parameter = quarries_building_bonuses
		levy_size = 0.06
	}
	province_culture_modifier = {
		parameter = ancient_miners_quarries_building_bonuses
		monthly_income = poor_building_tax_tier_6
	}
	
	next_building = tell_mines_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

tell_mines_07 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_tell_mines_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 04 }
		scope:holder.culture = {
			has_innovation = innovation_cranes
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = cheap_building_tier_7_cost
	
	type_icon = "icon_building_tell_mines.dds"
	province_modifier = {
		monthly_income = normal_building_tax_tier_7
	}
	county_modifier = {
		development_growth_factor = 0.3
	}
	character_modifier = {
		cultural_head_fascination_mult = 0.04
	}
	character_culture_modifier = {
		parameter = quarries_building_bonuses
		heavy_infantry_maintenance_mult = -0.07
		pikemen_maintenance_mult = -0.07
		heavy_cavalry_maintenance_mult = -0.07
		men_at_arms_recruitment_cost = -0.07
	}
	county_culture_modifier = {
		parameter = quarries_building_bonuses
		levy_size = 0.07
	}
	province_culture_modifier = {
		parameter = ancient_miners_quarries_building_bonuses
		monthly_income = poor_building_tax_tier_7
	}
	
	next_building = tell_mines_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

tell_mines_08 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_tell_mines_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 04 }
		scope:holder.culture = {
			has_innovation = innovation_cranes
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = cheap_building_tier_8_cost
	
	type_icon = "icon_building_tell_mines.dds"
	province_modifier = {
		monthly_income = normal_building_tax_tier_8
	}
	county_modifier = {
		development_growth_factor = 0.4
	}
	character_modifier = {
		cultural_head_fascination_mult = 0.05
	}
	character_culture_modifier = {
		parameter = quarries_building_bonuses
		heavy_infantry_maintenance_mult = -0.08
		pikemen_maintenance_mult = -0.08
		heavy_cavalry_maintenance_mult = -0.08
		men_at_arms_recruitment_cost = -0.08
	}
	county_culture_modifier = {
		parameter = quarries_building_bonuses
		levy_size = 0.08
	}
	province_culture_modifier = {
		parameter = ancient_miners_quarries_building_bonuses
		monthly_income = poor_building_tax_tier_8
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}



### Leclerc Dyeworks

leclerc_dyeworks_01 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_leclerc_dyeworks_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	cost_gold = normal_building_tier_2_cost

	province_modifier = {
		monthly_income = normal_building_tax_tier_2
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_2
		development_growth = normal_building_development_growth_tier_2
	}

	character_modifier = {
		monthly_influence = 0.3
	}

	on_complete = {
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = leclerc_dyeworks_02

	type_icon = "icon_building_murex_farms.dds"

	ai_value = {
		base = 9
		ai_tier_1_economical_building_preference_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
	}
}

leclerc_dyeworks_02 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_murex_farm_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 03 }
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 02 }
		scope:holder.culture = {
			has_innovation = innovation_manorialism
		}
	}

	cost_gold = normal_building_tier_5_cost

	province_modifier = {
		monthly_income = normal_building_tax_tier_5
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_5
		development_growth = normal_building_development_growth_tier_5
	}

	character_modifier = {
		monthly_influence = 1.3
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = leclerc_dyeworks_03

	type_icon = "icon_building_murex_farms.dds"

	ai_value = {
		base = 6
		ai_tier_1_economical_building_preference_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
	}
}

leclerc_dyeworks_03 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_murex_farm_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 04 }
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 04 }
		scope:holder.culture = {
			has_innovation = innovation_cranes
		}
	}

	cost_gold = normal_building_tier_7_cost

	province_modifier = {
		monthly_income = normal_building_tax_tier_7
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_7
		development_growth = normal_building_development_growth_tier_7
	}

	character_modifier = {
		monthly_influence = 2.3
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	type_icon = "icon_building_murex_farms.dds"

	ai_value = {
		base = 4
		ai_tier_1_economical_building_preference_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
	}
}

### Vineyards

vineyards_01 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_vineyards_requirement = yes
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_1_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_1
	}
	county_modifier = {
		development_growth_factor = 0.03
		county_opinion_add = 2
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.01
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = vineyards_02

	type_icon = "domicile_building_vineyard.dds"
	
	ai_value = {
		base = 15
		ai_tier_1_building_modifier = yes
		ai_tier_1_economical_building_preference_modifier = yes
		ai_orchard_improvement_from_culture_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
	}
}

vineyards_02 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_vineyards_requirement = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		scope:holder.culture = {
			has_innovation = innovation_crop_rotation
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_2_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_2
	}
	county_modifier = {
		development_growth_factor = 0.07
		county_opinion_add = 5
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.02
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = vineyards_03
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

vineyards_03 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_vineyards_requirement = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 02 }
		scope:holder.culture = {
			has_innovation = innovation_manorialism
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_3_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_3
		supply_limit_mult = 0.1
	}
	county_modifier = {
		development_growth_factor = 0.10
		county_opinion_add = 7
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.03
		supply_limit_mult = 0.1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = vineyards_04
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

vineyards_04 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_vineyards_requirement = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 02 }
		scope:holder.culture = {
			has_innovation = innovation_manorialism
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_4_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_4
		supply_limit_mult = 0.1
	}
	county_modifier = {
		development_growth_factor = 0.14
		county_opinion_add = 10
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.04
		supply_limit_mult = 0.1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = vineyards_05
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

vineyards_05 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_vineyards_requirement = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 03 }
		scope:holder.culture = {
			has_innovation = innovation_guilds
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_5_cost

	province_modifier = {
		monthly_income = normal_building_tax_tier_5
		supply_limit_mult = 0.1
	}
	county_modifier = {
		development_growth_factor = 0.18
		county_opinion_add = 13
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.05
		supply_limit_mult = 0.1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = vineyards_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

vineyards_06 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_vineyards_requirement = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 03 }
		scope:holder.culture = {
			has_innovation = innovation_guilds
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_6_cost

	province_modifier = {
		monthly_income = normal_building_tax_tier_6
		supply_limit = 1000
		supply_limit_mult = 0.1
	}
	county_modifier = {
		development_growth_factor = 0.22
		county_opinion_add = 16
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.06
		supply_limit_mult = 0.1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = vineyards_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

vineyards_07 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_vineyards_requirement = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 04 }
		scope:holder.culture = {
			has_innovation = innovation_cranes
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_7_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_7
		supply_limit = 1000
		supply_limit_mult = 0.1
	}
	county_modifier = {
		development_growth_factor = 0.26
		county_opinion_add = 20
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.07
		supply_limit_mult = 0.1
	}
	character_modifier = {
		monthly_prestige = 0.1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = vineyards_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

vineyards_08 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_vineyards_requirement = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 04 }
		scope:holder.culture = {
			has_innovation = innovation_cranes
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_8_cost

	province_modifier = {
		monthly_income = normal_building_tax_tier_8
		supply_limit = 1000
		supply_limit_mult = 0.1
	}
	county_modifier = {
		development_growth_factor = 0.30
		county_opinion_add = 25
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.08
		supply_limit_mult = 0.1
	}
	character_modifier = {
		monthly_prestige = 0.1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

potato_fields_01 = {
	construction_time = standard_construction_time
	effect_desc = potato_fields_effect_desc

	can_construct_potential = {
		building_potato_fields_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 01 }
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_1_cost
	
	province_modifier = {
		monthly_income = good_building_tax_tier_1
	}
	province_terrain_modifier = {
		terrain = steppe
		development_growth_factor = 0.04
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_1
	}
	
	province_terrain_modifier = {
		terrain = plains
		development_growth_factor = 0.04
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_1
	}
	
	province_terrain_modifier = {
		terrain = farmlands
		development_growth_factor = 0.04
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_1
	}

	province_culture_modifier = {
		parameter = collective_lands_farms_bonuses
		stationed_maa_damage_mult = normal_maa_damage_tier_1
		stationed_maa_toughness_mult = normal_maa_toughness_tier_1
	}
	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 2
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = potato_fields_02
	
	type_icon = "building_potato.dds"
	
	ai_value = {
		base = 15 # potato fields should take priority when possible
		ai_tier_1_building_modifier = yes
		ai_tier_1_economical_building_preference_modifier = yes
		ai_potato_fields_improvement_from_culture_modifier = yes # Only on the level 1 to secure having pasture when the AI is from an appropriate culture
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		modifier = {
			factor = 2
			scope:holder.capital_province = this
		}
		modifier = {
			factor = 2
			scope:holder.culture = { has_innovation = innovation_champa_rice }
		}
		modifier = {
			factor = 0
			scope:holder.culture = { has_innovation = innovation_champa_rice } # this also allows farm estates to be built in rice fields
			NOT = {
				has_building_or_higher = farm_estates_01
			}
		}
		modifier = {
			factor = 0
			building_orchards_requirement_terrain = yes
			NOT = {
				has_building_or_higher = orchards_01
			}
		}
	}
}

potato_fields_02 = {
	construction_time = standard_construction_time
	effect_desc = potato_fields_effect_desc

	can_construct_potential = {
		building_potato_fields_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 01 }
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_2_cost
	
	province_modifier = {
		monthly_income = good_building_tax_tier_2
	}

	province_terrain_modifier = {
		terrain = mountains
		development_growth_factor = 0.04
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_1
	}
	province_terrain_modifier = {
		terrain = tells
		development_growth_factor = 0.04
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_1
	}
	province_terrain_modifier = {
		terrain = hills
		development_growth_factor = 0.04
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_1
	}
	province_terrain_modifier = {
		terrain = steppe
		development_growth_factor = 0.08
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}
	
	province_terrain_modifier = {
		terrain = plains
		development_growth_factor = 0.08
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}
	
	province_terrain_modifier = {
		terrain = farmlands
		development_growth_factor = 0.08
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}

	province_culture_modifier = {
		parameter = collective_lands_farms_bonuses
		stationed_maa_damage_mult = normal_maa_damage_tier_2
		stationed_maa_toughness_mult = normal_maa_toughness_tier_2
	}
	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = potato_fields_03
	type_icon = "building_potato.dds"
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

potato_fields_03 = {
	construction_time = standard_construction_time
	effect_desc = potato_fields_effect_desc

	can_construct_potential = {
		building_potato_fields_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 02 }
		scope:holder.culture = {
			has_innovation = innovation_manorialism
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_3_cost
	
	province_modifier = {
		monthly_income = good_building_tax_tier_3
	}
	
	county_modifier = {
		supply_limit = 400
	}

	province_terrain_modifier = {
		terrain = mountains
		development_growth_factor = 0.08
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_1
	}
	province_terrain_modifier = {
		terrain = tells
		development_growth_factor = 0.08
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_1
	}
	province_terrain_modifier = {
		terrain = hills
		development_growth_factor = 0.08
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_1
	}
	province_terrain_modifier = {
		terrain = steppe
		development_growth_factor = 0.10
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}
	
	province_terrain_modifier = {
		terrain = plains
		development_growth_factor = 0.10
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}
	
	province_terrain_modifier = {
		terrain = farmlands
		development_growth_factor = 0.10
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}

	province_culture_modifier = {
		parameter = collective_lands_farms_bonuses
		stationed_maa_damage_mult = normal_maa_damage_tier_3
		stationed_maa_toughness_mult = normal_maa_toughness_tier_3
	}
	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = potato_fields_04
	type_icon = "building_potato.dds"
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

potato_fields_04 = {
	construction_time = standard_construction_time
	effect_desc = potato_fields_effect_desc

	can_construct_potential = {
		building_potato_fields_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 02 }
		scope:holder.culture = {
			has_innovation = innovation_manorialism
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_4_cost
	
	province_modifier = {
		monthly_income = good_building_tax_tier_4
	}
	
	county_modifier = {
		supply_limit = 400
		development_growth_factor = 0.05
	}

	province_terrain_modifier = {
		terrain = mountains
		development_growth_factor = 0.10
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_1
	}
	province_terrain_modifier = {
		terrain = tells
		development_growth_factor = 0.10
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_1
	}
	province_terrain_modifier = {
		terrain = hills
		development_growth_factor = 0.10
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_1
	}
	province_terrain_modifier = {
		terrain = steppe
		development_growth_factor = 0.12
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}
	
	province_terrain_modifier = {
		terrain = plains
		development_growth_factor = 0.12
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}
	
	province_terrain_modifier = {
		terrain = farmlands
		development_growth_factor = 0.12
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}

	province_culture_modifier = {
		parameter = collective_lands_farms_bonuses
		stationed_maa_damage_mult = normal_maa_damage_tier_4
		stationed_maa_toughness_mult = normal_maa_toughness_tier_4
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = potato_fields_05
	type_icon = "building_potato.dds"
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

potato_fields_05 = {
	construction_time = standard_construction_time
	effect_desc = potato_fields_effect_desc

	can_construct_potential = {
		building_potato_fields_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 03 }
		scope:holder.culture = {
			has_innovation = innovation_guilds
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_5_cost
	
	province_modifier = {
		monthly_income = good_building_tax_tier_5
	}
	
	county_modifier = {
		supply_limit = 400
		development_growth_factor = 0.05
		supply_limit_mult = 0.05
	}

	province_terrain_modifier = {
		terrain = mountains
		development_growth_factor = 0.12
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}
	province_terrain_modifier = {
		terrain = tells
		development_growth_factor = 0.12
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}
	province_terrain_modifier = {
		terrain = hills
		development_growth_factor = 0.12
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}
	province_terrain_modifier = {
		terrain = steppe
		development_growth_factor = 0.14
		tax_mult = innovation_champa_rice_tax_mult_value_3
		levy_size = innovation_champa_rice_levy_size_value_3
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_3
	}
	
	province_terrain_modifier = {
		terrain = plains
		development_growth_factor = 0.14
		tax_mult = innovation_champa_rice_tax_mult_value_3
		levy_size = innovation_champa_rice_levy_size_value_3
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_3
	}
	
	province_terrain_modifier = {
		terrain = farmlands
		development_growth_factor = 0.14
		tax_mult = innovation_champa_rice_tax_mult_value_3
		levy_size = innovation_champa_rice_levy_size_value_3
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_3
	}

	province_culture_modifier = {
		parameter = collective_lands_farms_bonuses
		stationed_maa_damage_mult = normal_maa_damage_tier_5
		stationed_maa_toughness_mult = normal_maa_toughness_tier_5
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = potato_fields_06
	type_icon = "building_potato.dds"
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

potato_fields_06 = {
	construction_time = standard_construction_time
	effect_desc = potato_fields_effect_desc

	can_construct_potential = {
		building_potato_fields_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 03 }
		scope:holder.culture = {
			has_innovation = innovation_guilds
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_6_cost
	
	province_modifier = {
		monthly_income = good_building_tax_tier_6
	}
	
	county_modifier = {
		supply_limit = 400
		development_growth_factor = 0.05
		supply_limit_mult = 0.05
		church_holding_build_gold_cost = -0.05
	}
	province_terrain_modifier = {
		terrain = mountains
		development_growth_factor = 0.14
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}
	province_terrain_modifier = {
		terrain = tells
		development_growth_factor = 0.14
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}
	province_terrain_modifier = {
		terrain = hills
		development_growth_factor = 0.14
		tax_mult = innovation_champa_rice_tax_mult_value_2
		levy_size = innovation_champa_rice_levy_size_value_2
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_2
	}
	province_terrain_modifier = {
		terrain = steppe
		development_growth_factor = 0.16
		tax_mult = innovation_champa_rice_tax_mult_value_3
		levy_size = innovation_champa_rice_levy_size_value_3
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_3
	}
	
	province_terrain_modifier = {
		terrain = plains
		development_growth_factor = 0.16
		tax_mult = innovation_champa_rice_tax_mult_value_3
		levy_size = innovation_champa_rice_levy_size_value_3
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_3
	}
	
	province_terrain_modifier = {
		terrain = farmlands
		development_growth_factor = 0.16
		tax_mult = innovation_champa_rice_tax_mult_value_3
		levy_size = innovation_champa_rice_levy_size_value_3
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_3
	}

	province_culture_modifier = {
		parameter = collective_lands_farms_bonuses
		stationed_maa_damage_mult = normal_maa_damage_tier_6
		stationed_maa_toughness_mult = normal_maa_toughness_tier_6
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = potato_fields_07
	type_icon = "building_potato.dds"
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

potato_fields_07 = {
	construction_time = standard_construction_time
	effect_desc = potato_fields_effect_desc

	can_construct_potential = {
		building_potato_fields_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 04 }
		scope:holder.culture = {
			has_innovation = innovation_cranes
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_7_cost
	
	province_modifier = {
		monthly_income = good_building_tax_tier_7
	}
	
	county_modifier = {
		levy_reinforcement_rate = 0.05
		supply_limit = 400
		development_growth_factor = 0.05
		supply_limit_mult = 0.05
		city_holding_build_gold_cost = -0.05
	}

	province_terrain_modifier = {
		terrain = mountains
		development_growth_factor = 0.16
		tax_mult = innovation_champa_rice_tax_mult_value_3
		levy_size = innovation_champa_rice_levy_size_value_3
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_3
	}
	province_terrain_modifier = {
		terrain = tells
		development_growth_factor = 0.16
		tax_mult = innovation_champa_rice_tax_mult_value_3
		levy_size = innovation_champa_rice_levy_size_value_3
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_3
	}
	province_terrain_modifier = {
		terrain = hills
		development_growth_factor = 0.16
		tax_mult = innovation_champa_rice_tax_mult_value_3
		levy_size = innovation_champa_rice_levy_size_value_3
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_3
	}
	province_terrain_modifier = {
		terrain = steppe
		development_growth_factor = 0.18
		tax_mult = innovation_champa_rice_tax_mult_value_4
		levy_size = innovation_champa_rice_levy_size_value_4
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_4
	}
	
	province_terrain_modifier = {
		terrain = plains
		development_growth_factor = 0.18
		tax_mult = innovation_champa_rice_tax_mult_value_4
		levy_size = innovation_champa_rice_levy_size_value_4
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_4
	}
	
	province_terrain_modifier = {
		terrain = farmlands
		development_growth_factor = 0.18
		tax_mult = innovation_champa_rice_tax_mult_value_4
		levy_size = innovation_champa_rice_levy_size_value_4
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_4
	}

	province_culture_modifier = {
		parameter = collective_lands_farms_bonuses
		stationed_maa_damage_mult = normal_maa_damage_tier_7
		stationed_maa_toughness_mult = normal_maa_toughness_tier_7
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = potato_fields_08
	type_icon = "building_potato.dds"
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

potato_fields_08 = {
	construction_time = standard_construction_time
	effect_desc = potato_fields_effect_desc

	can_construct_potential = {
		building_potato_fields_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 04 }
		scope:holder.culture = {
			has_innovation = innovation_cranes
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_8_cost
	
	province_modifier = {
		monthly_income = good_building_tax_tier_8
	}
	
	province_terrain_modifier = {
		terrain = mountains
		development_growth_factor = 0.18
		tax_mult = innovation_champa_rice_tax_mult_value_3
		levy_size = innovation_champa_rice_levy_size_value_3
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_3
	}
	province_terrain_modifier = {
		terrain = tells
		development_growth_factor = 0.18
		tax_mult = innovation_champa_rice_tax_mult_value_3
		levy_size = innovation_champa_rice_levy_size_value_3
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_3
	}
	province_terrain_modifier = {
		terrain = hills
		development_growth_factor = 0.18
		tax_mult = innovation_champa_rice_tax_mult_value_3
		levy_size = innovation_champa_rice_levy_size_value_3
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_3
	}
	province_terrain_modifier = {
		terrain = steppe
		development_growth_factor = 0.20
		tax_mult = innovation_champa_rice_tax_mult_value_4
		levy_size = innovation_champa_rice_levy_size_value_4
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_4
	}
	
	province_terrain_modifier = {
		terrain = plains
		development_growth_factor = 0.20
		tax_mult = innovation_champa_rice_tax_mult_value_4
		levy_size = innovation_champa_rice_levy_size_value_4
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_4
	}
	
	province_terrain_modifier = {
		terrain = farmlands
		development_growth_factor = 0.20
		tax_mult = innovation_champa_rice_tax_mult_value_4
		levy_size = innovation_champa_rice_levy_size_value_4
		development_growth_factor = innovation_champa_rice_development_growth_factor_value_4
	}
	
	county_modifier = {
		levy_reinforcement_rate = 0.05
		supply_limit = 1600
		development_growth_factor = 0.05
		supply_limit_mult = 0.05
		city_holding_build_gold_cost = -0.05
	}

	province_culture_modifier = {
		parameter = collective_lands_farms_bonuses
		stationed_maa_damage_mult = normal_maa_damage_tier_8
		stationed_maa_toughness_mult = normal_maa_toughness_tier_8
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

### Doggerland Ivory Deposits

doggerland_ivory_deposits_01 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_doggerland_ivory_deposits_requirement_terrain = yes
		trigger_if = { # Sometimes tribals can into botes
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = trade_ports_enabled_for_tribals
					}
				}
			}

			building_requirement_castle_city_church = { LEVEL = 01 }
		}
		trigger_else = {
			OR = {
				has_building_or_higher = tribe_01
				building_requirement_castle_city_church = { LEVEL = 01 }
			}
		}
	}

	can_construct_showing_failures_only = {
		# building_requirement_tribal = no

	}

	cost_gold = normal_building_tier_1_cost

	province_modifier = {
		monthly_income = normal_building_tax_tier_1
	}
	county_modifier = {
		development_growth_factor = 0.05
	}
	
	county_culture_modifier = {
		parameter = trade_ports_give_control_growth
		monthly_county_control_growth_add = 0.1
	}
	province_culture_modifier = {
		parameter = trade_ports_give_levies
		levy_size = 0.02
	}
	province_culture_modifier = {
		parameter = trade_ports_stationed_maa_bonus
		stationed_maa_toughness_mult = normal_maa_toughness_tier_1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = doggerland_ivory_deposits_02

	type_icon = "icon_building_quarries.dds"
	
	ai_value = {
		base = 10
		ai_tier_1_building_modifier = yes
		ai_tier_1_economical_building_preference_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		
		modifier = {
			add = 5
			culture = {
				has_cultural_parameter = trade_ports_enabled_for_tribals
			}
		}
		modifier = {
			add = 5
			culture = {
				has_cultural_parameter = trade_ports_stationed_maa_bonus
			}
		}
		modifier = {
			factor = 2
			AND = {
				building_watermills_requirement_terrain = yes
				building_windmills_requirement_terrain = yes
			}
		}
		modifier = {
			factor = 0
			building_farm_estates_requirement_terrain = yes
			NOT = {
				has_building_or_higher = farm_estates_01
			}
		}
		modifier = {
			factor = 0
			building_orchards_requirement_terrain = yes
			NOT = {
				has_building_or_higher = orchards_01
			}
		}

	}
}

doggerland_ivory_deposits_02 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_doggerland_ivory_deposits_requirement_terrain = yes
		

		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = trade_ports_enabled_for_tribals
					}
				}

			}
			building_requirement_castle_city_church = { LEVEL = 01 }
		}
		trigger_else = {
			OR = {
				has_building_or_higher = tribe_01
				building_requirement_castle_city_church = { LEVEL = 01 }
			}
		}
		
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_trade_ports
					}
				}
			}
			culture = {
				has_innovation = innovation_crop_rotation
			}
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_trade_ports

			}
		}
	}

	can_construct_showing_failures_only = {
		# building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_2_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_2
	}
	county_modifier = {
		development_growth_factor = 0.1
	}
	
	county_culture_modifier = {
		parameter = trade_ports_give_control_growth
		monthly_county_control_growth_add = 0.1
	}
	province_culture_modifier = {
		parameter = trade_ports_give_levies
		levy_size = 0.04
	}
	province_culture_modifier = {
		parameter = trade_ports_stationed_maa_bonus
		stationed_maa_toughness_mult = normal_maa_toughness_tier_2
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = doggerland_ivory_deposits_03
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

doggerland_ivory_deposits_03 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_doggerland_ivory_deposits_requirement_terrain = yes
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_trade_ports
					}
				}
			}
			culture = {
				has_innovation = innovation_manorialism
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
		trigger_else = {
			culture = {
				has_innovation = innovation_crop_rotation
			}
			culture = {
				has_cultural_parameter = next_level_trade_ports
			}
			building_requirement_castle_city_church = { LEVEL = 01 }
		}
	}

	is_enabled = {
		building_requirement_tribal = no
	}

	can_construct_showing_failures_only = {
		# building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_3_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_3
	}
	county_modifier = {
		development_growth_factor = 0.15
	}
	
	county_culture_modifier = {
		parameter = trade_ports_give_control_growth
		monthly_county_control_growth_add = 0.15
	}
	province_culture_modifier = {
		parameter = trade_ports_give_levies
		levy_size = 0.06
	}
	province_culture_modifier = {
		parameter = trade_ports_stationed_maa_bonus
		stationed_maa_toughness_mult = normal_maa_toughness_tier_3
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = doggerland_ivory_deposits_04
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

doggerland_ivory_deposits_04 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_doggerland_ivory_deposits_requirement_terrain = yes
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_trade_ports
					}
				}
			}
			culture = {
				has_innovation = innovation_manorialism
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
		trigger_else = {
			culture = {
				has_innovation = innovation_crop_rotation
			}
			culture = {
				has_cultural_parameter = next_level_trade_ports
			}
			building_requirement_castle_city_church = { LEVEL = 01 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_4_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_4
	}
	county_modifier = {
		development_growth_factor = 0.2
	}
	
	county_culture_modifier = {
		parameter = trade_ports_give_control_growth
		monthly_county_control_growth_add = 0.15
	}
	province_culture_modifier = {
		parameter = trade_ports_give_levies
		levy_size = 0.08
	}
	character_culture_modifier = {
		parameter = trade_ports_give_levies
		men_at_arms_limit = 1
	}
	province_culture_modifier = {
		parameter = trade_ports_stationed_maa_bonus
		stationed_maa_toughness_mult = normal_maa_toughness_tier_4
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = doggerland_ivory_deposits_05
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

doggerland_ivory_deposits_05 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_doggerland_ivory_deposits_requirement_terrain = yes
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_trade_ports
					}
				}
			}
			culture = {
				has_innovation = innovation_guilds
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
		trigger_else = {
			culture = {
				has_innovation = innovation_manorialism
			}
			culture = {
				has_cultural_parameter = next_level_trade_ports
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_5_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_5
	}
	county_modifier = {
		development_growth_factor = 0.25
	}
	
	county_culture_modifier = {
		parameter = trade_ports_give_control_growth
		monthly_county_control_growth_add = 0.2
	}
	province_culture_modifier = {
		parameter = trade_ports_give_levies
		levy_size = 0.1
	}
	character_culture_modifier = {
		parameter = trade_ports_give_levies
		men_at_arms_limit = 1
	}
	province_culture_modifier = {
		parameter = trade_ports_stationed_maa_bonus
		stationed_maa_toughness_mult = normal_maa_toughness_tier_5
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = doggerland_ivory_deposits_06
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

doggerland_ivory_deposits_06 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_doggerland_ivory_deposits_requirement_terrain = yes
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_trade_ports
					}
				}
			}
			culture = {
				has_innovation = innovation_guilds
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
		trigger_else = {
			culture = {
				has_innovation = innovation_manorialism
			}
			culture = {
				has_cultural_parameter = next_level_trade_ports
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_6_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_6
	}
	county_modifier = {
		development_growth_factor = 0.3
	}
	
	county_culture_modifier = {
		parameter = trade_ports_give_control_growth
		monthly_county_control_growth_add = 0.2
	}
	province_culture_modifier = {
		parameter = trade_ports_give_levies
		levy_size = 0.12
	}
	character_culture_modifier = {
		parameter = trade_ports_give_levies
		men_at_arms_limit = 2
	}
	province_culture_modifier = {
		parameter = trade_ports_stationed_maa_bonus
		stationed_maa_toughness_mult = normal_maa_toughness_tier_6
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = doggerland_ivory_deposits_07
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

doggerland_ivory_deposits_07 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_doggerland_ivory_deposits_requirement_terrain = yes
	}
	can_construct = {	
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_trade_ports
					}
				}
			}
			culture = {
				has_innovation = innovation_cranes
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
		}
		trigger_else = {
			culture = {
				has_innovation = innovation_guilds
			}
			culture = {
				has_cultural_parameter = next_level_trade_ports
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_7_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_7
	}
	county_modifier = {
		development_growth_factor = 0.35
	}
	
	county_culture_modifier = {
		parameter = trade_ports_give_control_growth
		monthly_county_control_growth_add = 0.25
	}
	province_culture_modifier = {
		parameter = trade_ports_give_levies
		levy_size = 0.14
	}
	character_culture_modifier = {
		parameter = trade_ports_give_levies
		men_at_arms_limit = 2
	}
	province_culture_modifier = {
		parameter = trade_ports_stationed_maa_bonus
		stationed_maa_toughness_mult = normal_maa_toughness_tier_7
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = doggerland_ivory_deposits_08
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

doggerland_ivory_deposits_08 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_doggerland_ivory_deposits_requirement_terrain = yes
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_trade_ports
					}
				}
			}
			culture = {
				has_innovation = innovation_cranes
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
		}
		trigger_else = {
			culture = {
				has_innovation = innovation_guilds
			}
			culture = {
				has_cultural_parameter = next_level_trade_ports
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_8_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_8
	}
	county_modifier = {
		development_growth_factor = 0.4
	}
	
	county_culture_modifier = {
		parameter = trade_ports_give_control_growth
		monthly_county_control_growth_add = 0.25
	}
	province_culture_modifier = {
		parameter = trade_ports_give_levies
		levy_size = 0.16
	}
	character_culture_modifier = {
		parameter = trade_ports_give_levies
		men_at_arms_limit = 3
	}
	province_culture_modifier = {
		parameter = trade_ports_stationed_maa_bonus
		stationed_maa_toughness_mult = normal_maa_toughness_tier_8
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}