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

# Tradeports - Normal Tax, Development
# Cattle Pastures - Poor Tax, Normal Levy, Supply Limit
# Hunting Grounds - Poor Tax, Small Levy, Defensive Advantage
# Orchards - Normal Tax, Small Levy, Development
# Farm Estates - Massive Tax
# Cereal Fields - Large Tax, Mixed Bonuses
# Logging Camps - Normal Tax, Normal Build Speed
# Peat Quarries - Normal Tax, Poor Build Speed
# Hill Farms - Normal Tax, Defensive Advantage
# Elephant Pens - Normal Tax, Elephant Cavalry
# Plantations - Normal Tax
# Quarries - Poor Tax, Poor Build Speed
# Caravanserai - Late Game Building - Massive Tax, Defender Advantage, Dev Growth % and flat value, MaA maintenance and Merc hire cost
# Windmills - Late Game Building - Massive Tax, Supply Limit, Holding Taxes, Dev Growth % and flat value 
# Watermills - Late Game Building - Massive Tax, Supply Limit, Building and Holding construction cost reduction, Holding Taxes, Dev Growth % and flat value
# Qanats - Cultural Building - Dev Growth % and flat value, Supply Limit, Travel bonus
# Murex Farms - Mediterranean Building - Influence, Dev Growth % and flat value, Tax
# Waterworks - is in India, Southeast Asia, or China, prov is county captain and terrain is NOT mountains or desert mountains

### caravanserai

caravanserai_01 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_caravanserai_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		scope:holder.culture = {
			has_innovation = innovation_guilds
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no

		trigger_if = {
			limit = {
				culture = { has_cultural_parameter = second_caravanserai }
			}
			custom_tooltip = {
				text = has_two_caravanserai_in_county
				county = {
					any_county_province = {
						count < 2
						has_building_or_higher = caravanserai_01
					}
				}
			}
		}
		trigger_else = {
			custom_tooltip = {
				text = not_allowed_second_caravanserai
				county = {
					any_county_province = {
						count < 1
						has_building_or_higher = caravanserai_01
					}
				}
			}
		}
	}
	
	is_enabled = {
		trigger_if = {
			limit = {
				NOR = {
					scope:holder.culture = {
						has_cultural_parameter = watermills_windmills_cities
					}
					culture = {
						has_cultural_parameter = second_caravanserai
					}
				}
			}
			is_county_capital = yes
		}
		trigger_else_if = {
			limit = {
				scope:holder.culture = {
					has_cultural_parameter = watermills_windmills_cities
				}
				NOT = {
					culture = {
						has_cultural_parameter = second_caravanserai
					}
				}
			}
			OR = {
				is_county_capital = yes
				AND = {
					NOR = {
						has_building_or_higher = watermills_01
						has_building_or_higher = windmills_01
					}
					has_building_or_higher = city_01
				}
			}
		}
		trigger_else_if = {
			limit = {
				culture = {
					has_cultural_parameter = second_caravanserai
				}
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = watermills_windmills_cities
					}
				}
			}
			OR = {
				is_county_capital = yes
				AND = {
					county = {
						any_county_province = {
							count <= 2
							has_building_or_higher = caravanserai_01
						}
					}
				}
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = watermills_windmills_cities
			}
			culture = {
				has_cultural_parameter = second_caravanserai
			}
			OR = {
				is_county_capital = yes
				AND = {
					NOR = {
						has_building_or_higher = watermills_01
						has_building_or_higher = windmills_01
					}
					has_building_or_higher = city_01
				}
				AND = {
					county = {
						any_county_province = {
							count <= 2
							has_building_or_higher = caravanserai_01
						}
					}
				}
			}

		}
	}
	show_disabled = yes
	
	can_construct = {
	}

	cost_gold = expensive_building_tier_1_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_1
		defender_holding_advantage = normal_building_advantage_tier_1
	}
	
	character_modifier = {
		men_at_arms_maintenance = normal_building_maa_maintenance_tier_1
		mercenary_hire_cost_mult = normal_building_maa_maintenance_tier_1
	}
	
	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_1
		development_growth = normal_building_development_growth_tier_1
		travel_danger = -1
	}

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

	type_icon = "icon_building_caravanserai.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 = 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_cereal_fields_requirement_terrain = yes
			NOT = {
				has_building_or_higher = cereal_fields_01
			}
		}
	}
}

caravanserai_02 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_caravanserai_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
	}
	
	can_construct = {
		scope:holder.culture = {
			has_innovation = innovation_guilds
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_2_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_2
		defender_holding_advantage = normal_building_advantage_tier_2
	}
	
	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_2
		development_growth = normal_building_development_growth_tier_2
		travel_danger = -2
	}
	
	character_modifier = {
		men_at_arms_maintenance = normal_building_maa_maintenance_tier_2
		mercenary_hire_cost_mult = normal_building_maa_maintenance_tier_2
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = caravanserai_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
		}
	}
}

caravanserai_03 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_caravanserai_requirement_terrain = yes
	}
	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 02 }
		scope:holder.culture = {
			has_innovation = innovation_guilds
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_3_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_3
		defender_holding_advantage = normal_building_advantage_tier_3
		hostile_raid_time = 0.2
	}
	
	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_3
		development_growth = normal_building_development_growth_tier_3
		travel_danger = -3
	}
	
	character_modifier = {
		men_at_arms_maintenance = normal_building_maa_maintenance_tier_3
		mercenary_hire_cost_mult = normal_building_maa_maintenance_tier_3
	}

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

caravanserai_04 = {
	construction_time = slow_construction_time
	effect_desc = caravanserai_effects_desc

	can_construct_potential = {
		building_caravanserai_requirement_terrain = yes
	}
	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 02 }
		scope:holder.culture = {
			has_innovation = innovation_guilds
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_4_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_4
		defender_holding_advantage = normal_building_advantage_tier_4
		hostile_raid_time = 0.4
	}
	
	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_4
		development_growth = normal_building_development_growth_tier_4
		travel_danger = -4
	}
	
	character_modifier = {
		men_at_arms_maintenance = normal_building_maa_maintenance_tier_4
		mercenary_hire_cost_mult = normal_building_maa_maintenance_tier_4
	}

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

caravanserai_05 = {
	construction_time = slow_construction_time
	effect_desc = caravanserai_effects_desc

	can_construct_potential = {
		building_caravanserai_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 = expensive_building_tier_5_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_5
		defender_holding_advantage = normal_building_advantage_tier_5
		hostile_raid_time = 0.6
	}
	
	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_5
		development_growth = normal_building_development_growth_tier_5
		travel_danger = -5
	}
	
	character_modifier = {
		men_at_arms_maintenance = normal_building_maa_maintenance_tier_5
		mercenary_hire_cost_mult = normal_building_maa_maintenance_tier_5
	}

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

caravanserai_06 = {
	construction_time = slow_construction_time
	effect_desc = caravanserai_effects_desc

	can_construct_potential = {
		building_caravanserai_requirement_terrain = yes
	}
	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 03 }
		scope:holder.culture = {
			has_innovation = innovation_cranes
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_6_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_6
		defender_holding_advantage = normal_building_advantage_tier_6
		hostile_raid_time = 0.8
	}
	
	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_6
		development_growth = normal_building_development_growth_tier_6
		travel_danger = -6
	}
	
	character_modifier = {
		men_at_arms_maintenance = normal_building_maa_maintenance_tier_6
		mercenary_hire_cost_mult = normal_building_maa_maintenance_tier_6
		#small artifact quality bonus if TIT-40761 gets implemented
	}

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

caravanserai_07 = {
	construction_time = slow_construction_time
	effect_desc = caravanserai_effects_desc

	can_construct_potential = {
		building_caravanserai_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 = expensive_building_tier_7_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_7
		defender_holding_advantage = normal_building_advantage_tier_7
		hostile_raid_time = 1
	}
	
	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_7
		development_growth = normal_building_development_growth_tier_7
		travel_danger = -7
		#small artifact quality bonus if TIT-40761 gets implemented
	}
	
	character_modifier = {
		men_at_arms_maintenance = normal_building_maa_maintenance_tier_7
		mercenary_hire_cost_mult = normal_building_maa_maintenance_tier_7
	}

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

caravanserai_08 = {
	construction_time = slow_construction_time
	effect_desc = caravanserai_effects_desc

	can_construct_potential = {
		building_caravanserai_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 = expensive_building_tier_8_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_8
		defender_holding_advantage = normal_building_advantage_tier_8
		hostile_raid_time = 1.2
	}
	
	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_8
		development_growth = normal_building_development_growth_tier_8
		travel_danger = -8
		#small artifact quality bonus if TIT-40761 gets implemented
	}
	
	character_modifier = {
		men_at_arms_maintenance = normal_building_maa_maintenance_tier_8
		mercenary_hire_cost_mult = normal_building_maa_maintenance_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
	}
}

### watermills

watermills_01 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		OR = {
			building_watermills_requirement_terrain = yes
			AND = {
				has_building_or_higher = logging_camps_04
				culture = {
					has_cultural_parameter = watermills_forestries_unlock
				}
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	is_enabled = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = watermills_windmills_cities
					}
				}
			}
			is_county_capital = yes
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = watermills_windmills_cities
			}
			OR = {
				is_county_capital = yes
				AND = {
					NOR = {
						has_building_or_higher = windmills_01
						has_building_or_higher = caravanserai_01
					}
					has_building_or_higher = city_01
				}
				
			}
		}	
	}
	show_disabled = yes
	
	can_construct = {
		trigger_if = {
			limit = {
				has_holding_type = city_holding
				is_county_capital = no
				culture = {
					has_cultural_parameter = watermills_windmills_cities
				}
			}
			has_building_or_higher = city_01
			NOR = {
				has_building_or_higher = windmills_01
				has_building_or_higher = caravanserai_01
			}
		}
		trigger_else = {
			building_requirement_castle_city_church = { LEVEL = 01 }
			is_county_capital = yes
		}
		OR = {
			culture = { # Standard unlock from innovation (High medieval)
				has_innovation = innovation_windmills
			}
			culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval)
				has_cultural_parameter = next_level_w_mills
				has_innovation = innovation_manorialism
			}
			AND = { # Unlock from Cultural Tradition
				has_building_or_higher = logging_camps_04
				culture = {
					has_cultural_parameter = watermills_forestries_unlock
				}
			}
		} 	
	}

	cost_gold = expensive_building_tier_1_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_1
		supply_limit_mult = 0.1
		holding_build_gold_cost = -0.05
		build_gold_cost = -0.05
	}
	
	county_modifier = {
		development_growth = good_building_development_growth_tier_1
	}

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

	type_icon = "icon_building_watermills.dds"
	
	ai_value = {
		base = 20
		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 = {
			factor = 10
			has_building_or_higher = windmills_01
		}
		modifier = {
			factor = 2
			AND = {
				building_watermills_requirement_terrain = yes
				building_windmills_requirement_terrain = yes
			}
		}
	}
}

watermills_02 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		OR = {
			building_watermills_requirement_terrain = yes
			AND = {
				has_building_or_higher = logging_camps_04
				culture = {
					has_cultural_parameter = watermills_forestries_unlock
				}
			}
		}
		building_requirement_castle_city_church = { LEVEL = 01 }
	}
	
	can_construct = {




		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = next_level_w_mills
					}
					culture = {
						has_cultural_parameter = watermills_forestries_unlock
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_windmills
			}
		}
		trigger_else = {
			OR = {
				culture = { # Standard unlock from innovation (High medieval)
					has_innovation = innovation_windmills
				}
				culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval)
					has_cultural_parameter = next_level_w_mills
					has_innovation = innovation_manorialism
				}
				AND = { # Unlock from Cultural Tradition
					has_building_or_higher = logging_camps_04
					culture = {
						has_cultural_parameter = watermills_forestries_unlock
					}
				}
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_2_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_2
		supply_limit_mult = 0.2
		holding_build_gold_cost = -0.10
		build_gold_cost = -0.10
	}
	
	county_modifier = {
		development_growth = good_building_development_growth_tier_2
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = watermills_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
		}
	}
}

watermills_03 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		OR = {
			building_watermills_requirement_terrain = yes
			AND = {
				has_building_or_higher = logging_camps_04
				culture = {
					has_cultural_parameter = watermills_forestries_unlock
				}
			}
		}
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = next_level_w_mills
					}
					culture = {
						has_cultural_parameter = watermills_forestries_unlock
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_windmills
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
		trigger_else = {
			OR = {
				culture = { # Standard unlock from innovation (High medieval)
					has_innovation = innovation_windmills
				}
				culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval)
					has_cultural_parameter = next_level_w_mills
					has_innovation = innovation_manorialism
				}
				AND = { # Unlock from Cultural Tradition
					has_building_or_higher = logging_camps_04
					culture = {
						has_cultural_parameter = watermills_forestries_unlock
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 01 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_3_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_3
		supply_limit_mult = 0.3
		holding_build_gold_cost = -0.14
		build_gold_cost = -0.14
	}
	
	county_modifier = {
		development_growth = good_building_development_growth_tier_3
		development_growth_factor = normal_building_development_growth_factor_tier_1
		tax_mult = normal_building_tax_mult_tier_1
	}

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

watermills_04 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		OR = {
			building_watermills_requirement_terrain = yes
			AND = {
				has_building_or_higher = logging_camps_04
				culture = {
					has_cultural_parameter = watermills_forestries_unlock
				}
			}
		}
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = next_level_w_mills
					}
					culture = {
						has_cultural_parameter = watermills_forestries_unlock
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_windmills
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
		trigger_else = {
			OR = {
				culture = { # Standard unlock from innovation (High medieval)
					has_innovation = innovation_windmills
				}
				culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval)
					has_cultural_parameter = next_level_w_mills
					has_innovation = innovation_manorialism
				}
				AND = { # Unlock from Cultural Tradition
					has_building_or_higher = logging_camps_04
					culture = {
						has_cultural_parameter = watermills_forestries_unlock
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 01 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_4_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_4
		supply_limit_mult = 0.4
		holding_build_gold_cost = -0.18
		build_gold_cost = -0.18
	}
	
	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_2
		development_growth = good_building_development_growth_tier_4
		tax_mult = normal_building_tax_mult_tier_2
	}

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

watermills_05 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_watermills_requirement_terrain = yes
	}
	can_construct = {
		scope:holder.culture = {
			has_innovation = innovation_cranes
		}
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = next_level_w_mills
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = next_level_w_mills
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_5_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_5
		supply_limit_mult = 0.5
		holding_build_gold_cost = -0.22
		build_gold_cost = -0.22
	}
	
	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_3
		development_growth = good_building_development_growth_tier_5
		tax_mult = normal_building_tax_mult_tier_3
	}

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

watermills_06 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_watermills_requirement_terrain = yes
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = next_level_w_mills
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
			scope:holder.culture = {
				has_innovation = innovation_cranes
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = next_level_w_mills
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
			scope:holder.culture = {
				has_innovation = innovation_windmills
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_6_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_6
		supply_limit_mult = 0.6
		holding_build_gold_cost = -0.24
		build_gold_cost = -0.24
	}
	
	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_4
		development_growth = good_building_development_growth_tier_6
		tax_mult = normal_building_tax_mult_tier_4
	}

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

watermills_07 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_watermills_requirement_terrain = yes
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = next_level_w_mills
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
			scope:holder.culture = {
				has_innovation = innovation_cranes
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = next_level_w_mills
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
			scope:holder.culture = {
				has_innovation = innovation_windmills
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_7_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_7
		supply_limit_mult = 0.7
		holding_build_gold_cost = -0.26
		build_gold_cost = -0.26
	}
	
	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_5
		development_growth = good_building_development_growth_tier_7
		tax_mult = normal_building_tax_mult_tier_5
	}

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

watermills_08 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_watermills_requirement_terrain = yes
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = next_level_w_mills
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
			scope:holder.culture = {
			has_innovation = innovation_cranes
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = next_level_w_mills
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
			scope:holder.culture = {
				has_innovation = innovation_windmills
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_8_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_8
		supply_limit_mult = 0.8
		holding_build_gold_cost = -0.30
		build_gold_cost = -0.30
	}
	
	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_6
		development_growth = good_building_development_growth_tier_8
		tax_mult = normal_building_tax_mult_tier_6
	}

	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
	}
}

### Windmills

windmills_01 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		OR = {
			building_windmills_requirement_terrain = yes
			AND = {
				has_building_or_higher = hill_farms_04
				culture = {
					has_cultural_parameter = windmills_hill_farms_unlock
				}
			}
		}
		building_requirement_castle_city_church = { LEVEL = 01 }
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	is_enabled = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
					has_cultural_parameter = watermills_windmills_cities
					}
				}
			}
			is_county_capital = yes
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = watermills_windmills_cities
			}
			OR = {
				is_county_capital = yes
				AND = {
					NOR = {
						has_building_or_higher = watermills_01
						has_building_or_higher = caravanserai_01
					}
					has_building_or_higher = city_01
				}
				
			}
		}	
	}
	show_disabled = yes
	
	can_construct = {
		trigger_if = {
			limit = {
				has_holding_type = city_holding
			}
			has_building_or_higher = city_01
			culture = {
				has_cultural_parameter = watermills_windmills_cities
			}
			NOR = {
				has_building_or_higher = watermills_01
				has_building_or_higher = caravanserai_01
			}
		}
		trigger_else_if = {
			limit = {
				OR = {
					has_holding_type = castle_holding
					has_holding_type = church_holding
					has_holding_type = temple_citadel_holding
				}
			}
			is_county_capital = yes
		}
		trigger_else = {
			always = no
		}
		OR = {
			culture = { # Standard unlock from inovation (High medieval)
				has_innovation = innovation_windmills
			}
			culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval)
				has_cultural_parameter = next_level_w_mills
				has_innovation = innovation_manorialism
			}
			AND = { # Unlock from Culture trad
				has_building_or_higher = hill_farms_04
				culture = {
					has_cultural_parameter = windmills_hill_farms_unlock
				}
			}
		}
	}

	cost_gold = expensive_building_tier_1_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_1
		tax_mult = good_building_tax_mult_tier_1
		supply_limit_mult = 0.1
	}
	
	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_1
		development_growth = good_building_development_growth_tier_1
	}

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

	type_icon = "icon_building_windmills.dds"
	
	ai_value = {
		base = 20
		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 = {
			factor = 10
			has_building_or_higher = watermills_01
		}
		modifier = {
			factor = 2
			is_coastal = yes
		}
		modifier = {
			factor = 2
			AND = {
				building_watermills_requirement_terrain = yes
				building_windmills_requirement_terrain = yes
			}
		}
	}
}

windmills_02 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		OR = {
			building_windmills_requirement_terrain = yes
			AND = {
				has_building_or_higher = hill_farms_04
				culture = {
					has_cultural_parameter = windmills_hill_farms_unlock
				}
			}
		}
		building_requirement_castle_city_church = { LEVEL = 01 }
	}
	
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = next_level_w_mills
					}
					culture = {
						has_cultural_parameter = windmills_hill_farms_unlock
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_windmills
			}
		}
		trigger_else = {
			OR = {
				culture = { # Standard unlock from inovation (High medieval)
					has_innovation = innovation_windmills
				}
				culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval)
					has_cultural_parameter = next_level_w_mills
					has_innovation = innovation_manorialism
				}
				AND = { # Unlock from Culture trad
					has_building_or_higher = hill_farms_04
					culture = {
						has_cultural_parameter = windmills_hill_farms_unlock
					}
				}
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_2_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_2
		tax_mult = good_building_tax_mult_tier_2
		supply_limit_mult = 0.2
	}
	
	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_2
		development_growth = good_building_development_growth_tier_2
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = windmills_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
		}
	}
}

windmills_03 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		OR = {
			building_windmills_requirement_terrain = yes
			AND = {
				has_building_or_higher = hill_farms_04
				culture = {
					has_cultural_parameter = windmills_hill_farms_unlock
				}
			}
		}
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = next_level_w_mills
					}
					culture = {
						has_cultural_parameter = windmills_hill_farms_unlock
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_windmills
			}
		}
		trigger_else = {
			OR = {
				culture = { # Standard unlock from inovation (High medieval)
					has_innovation = innovation_windmills
				}
				culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval)
					has_cultural_parameter = next_level_w_mills
					has_innovation = innovation_manorialism
				}
				AND = { # Unlock from Culture trad
					has_building_or_higher = hill_farms_04
					culture = {
						has_cultural_parameter = windmills_hill_farms_unlock
					}
				}
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_3_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_3
		tax_mult = good_building_tax_mult_tier_3
		supply_limit_mult = 0.3
	}
	
	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_3
		development_growth = good_building_development_growth_tier_3
	}

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

windmills_04 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		OR = {
			building_windmills_requirement_terrain = yes
			AND = {
				has_building_or_higher = hill_farms_04
				culture = {
					has_cultural_parameter = windmills_hill_farms_unlock
				}
			}
		}
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = next_level_w_mills
					}
					culture = {
						has_cultural_parameter = windmills_hill_farms_unlock
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
		trigger_else = {
			OR = {
				culture = { # Standard unlock from inovation (High medieval)
					has_innovation = innovation_windmills
				}
				culture = { # Unlock from culture trad early but still need the previous Civic economic building inovation (Early medieval)
					has_cultural_parameter = next_level_w_mills
					has_innovation = innovation_manorialism
				}
				AND = { # Unlock from Culture trad
					has_building_or_higher = hill_farms_04
					culture = {
						has_cultural_parameter = windmills_hill_farms_unlock
					}
				}
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_4_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_4
		tax_mult = good_building_tax_mult_tier_4
		supply_limit_mult = 0.4
	}
	
	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_4
		development_growth = good_building_development_growth_tier_4
	}

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

windmills_05 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_windmills_requirement_terrain = yes
	}
	can_construct = {
		scope:holder.culture = {
			has_innovation = innovation_windmills
		}
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = next_level_w_mills
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = next_level_w_mills
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_5_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_5
		tax_mult = good_building_tax_mult_tier_5
		supply_limit_mult = 0.5
	}
	
	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_5
		development_growth = good_building_development_growth_tier_5
	}

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

windmills_06 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_windmills_requirement_terrain = yes
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = next_level_w_mills
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
			scope:holder.culture = {
			has_innovation = innovation_cranes
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = next_level_w_mills
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
			scope:holder.culture = {
			has_innovation = innovation_windmills
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_6_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_6
		tax_mult = good_building_tax_mult_tier_6
		supply_limit_mult = 0.6
	}
	
	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_6
		development_growth = good_building_development_growth_tier_6
	}

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

windmills_07 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_windmills_requirement_terrain = yes
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = next_level_w_mills
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
			scope:holder.culture = {
			has_innovation = innovation_cranes
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = next_level_w_mills
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
			scope:holder.culture = {
			has_innovation = innovation_windmills
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = expensive_building_tier_7_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_7
		tax_mult = good_building_tax_mult_tier_7
		supply_limit_mult = 0.7
	}
	
	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_7
		development_growth = good_building_development_growth_tier_7
	}

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

windmills_08 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_windmills_requirement_terrain = yes
	}
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = next_level_w_mills
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
			scope:holder.culture = {
			has_innovation = innovation_cranes
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = next_level_w_mills
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
			scope:holder.culture = {
			has_innovation = innovation_windmills
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_8_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_8
		tax_mult = good_building_tax_mult_tier_8
		supply_limit_mult = 0.8
	}
	
	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_8
		development_growth = good_building_development_growth_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
	}
}




# Qanats

qanats_01 = {
	construction_time = standard_construction_time

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

	is_enabled = {
		is_county_capital = yes
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_1_cost

	province_modifier = {
		monthly_income = poor_building_tax_tier_1
		supply_limit = normal_building_supply_limit_tier_1
	}

	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_1
		development_growth = good_building_development_growth_tier_1
		travel_danger = -1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = qanats_02

	type_icon = "icon_building_qanats.dds"

	ai_value = {
		base = 20
		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 = {
			factor = 2
			scope:holder.capital_province = this
		}
	}
}

qanats_02 = {
	construction_time = standard_construction_time

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_2_cost

	province_modifier = {
		monthly_income = poor_building_tax_tier_2
		supply_limit = normal_building_supply_limit_tier_2
	}

	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_2
		development_growth = good_building_development_growth_tier_2
		travel_danger = -2
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = qanats_03

	type_icon = "icon_building_qanats.dds"

	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = {
			factor = 2
			scope:holder.capital_province = this
		}
	}
}

qanats_03 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_qanats_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 02 }
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_3_cost

	province_modifier = {
		monthly_income = poor_building_tax_tier_3
		supply_limit = normal_building_supply_limit_tier_3
		build_speed = normal_building_build_speed_tier_3
	}

	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_3
		development_growth = good_building_development_growth_tier_3
		travel_danger = -3
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = qanats_04

	type_icon = "icon_building_qanats.dds"

	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = {
			factor = 2
			scope:holder.capital_province = this
		}
	}
}

qanats_04 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_qanats_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 02 }
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_4_cost

	province_modifier = {
		monthly_income = poor_building_tax_tier_4
		supply_limit = normal_building_supply_limit_tier_4
		build_speed = normal_building_build_speed_tier_4
	}

	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_4
		development_growth = good_building_development_growth_tier_4
		travel_danger = -4
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = qanats_05

	type_icon = "icon_building_qanats.dds"

	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = {
			factor = 2
			scope:holder.capital_province = this
		}
	}
}

qanats_05 = {
	construction_time = standard_construction_time

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_5_cost

	province_modifier = {
		monthly_income = poor_building_tax_tier_5
		supply_limit = normal_building_supply_limit_tier_5
		build_speed = normal_building_build_speed_tier_5
	}

	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_5
		development_growth = good_building_development_growth_tier_5
		travel_danger = -5
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	effect_desc =  unlocks_cereal_fields_and_orchards

	next_building = qanats_06

	type_icon = "icon_building_qanats.dds"

	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = {
			factor = 2
			scope:holder.capital_province = this
		}
	}
}

qanats_06 = {
	construction_time = standard_construction_time

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_6_cost

	province_modifier = {
		monthly_income = poor_building_tax_tier_6
		supply_limit = normal_building_supply_limit_tier_6
		build_speed = normal_building_build_speed_tier_6
	}

	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_6
		development_growth = good_building_development_growth_tier_6
		travel_danger = -6
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	effect_desc =  unlocks_cereal_fields_and_orchards

	next_building = qanats_07

	type_icon = "icon_building_qanats.dds"

	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = {
			factor = 2
			scope:holder.capital_province = this
		}
	}
}

qanats_07 = {
	construction_time = standard_construction_time

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_7_cost

	province_modifier = {
		monthly_income = poor_building_tax_tier_7
		supply_limit = normal_building_supply_limit_tier_7
		build_speed = normal_building_build_speed_tier_7
	}

	character_modifier = {
		negate_health_penalty_add = 0.1
	}

	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_7
		development_growth = good_building_development_growth_tier_7
		travel_danger = -7
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	effect_desc =  unlocks_cereal_fields_and_orchards

	next_building = qanats_08

	type_icon = "icon_building_qanats.dds"

	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = {
			factor = 2
			scope:holder.capital_province = this
		}
	}
}

qanats_08 = {
	construction_time = standard_construction_time

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_8_cost

	province_modifier = {
		monthly_income = poor_building_tax_tier_8
		supply_limit = normal_building_supply_limit_tier_8
		build_speed = normal_building_build_speed_tier_8
	}

	character_modifier = {
		negate_health_penalty_add = 0.2
	}

	county_modifier = {
		development_growth_factor = good_building_development_growth_factor_tier_8
		development_growth = good_building_development_growth_tier_8
		travel_danger = -8
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	effect_desc =  unlocks_cereal_fields_and_orchards


	type_icon = "icon_building_qanats.dds"

	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
		modifier = {
			factor = 2
			scope:holder.capital_province = this
		}
	}
}

# Murex Farms

murex_farm_01 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_murex_farm_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
	}
	
	is_enabled = {
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.1
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_1_cost

	province_modifier = {
		monthly_income = normal_building_tax_tier_1
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_1
		development_growth = normal_building_development_growth_tier_1
	}

	character_modifier = {
		monthly_influence = 0.1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = murex_farm_02

	type_icon = "icon_building_murex_farms.dds"

	ai_value = {
		base = 14
		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 = {
			factor = 2
			scope:holder.capital_province = this
		}
		modifier = {
			factor = 2
			scope:holder = {
				government_has_flag = government_is_administrative
			}
		}
	}
}

murex_farm_02 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_murex_farm_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
	}
	
	is_enabled = {
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.2
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	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 = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = murex_farm_03

	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
	}
}

murex_farm_03 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_murex_farm_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 02 }
	}
	
	is_enabled = {
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.3
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_3_cost

	province_modifier = {
		monthly_income = normal_building_tax_tier_3
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_3
		development_growth = normal_building_development_growth_tier_3
	}

	character_modifier = {
		monthly_influence = 0.6
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = murex_farm_04

	type_icon = "icon_building_murex_farms.dds"

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

murex_farm_04 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_murex_farm_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 02 }
	}
	
	is_enabled = {
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.4
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_4_cost

	province_modifier = {
		monthly_income = normal_building_tax_tier_4
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_4
		development_growth = normal_building_development_growth_tier_4
	}

	character_modifier = {
		monthly_influence = 1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = murex_farm_05

	type_icon = "icon_building_murex_farms.dds"

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

murex_farm_05 = {
	construction_time = standard_construction_time

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

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.5
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	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 = murex_farm_06

	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
	}
}

murex_farm_06 = {
	construction_time = standard_construction_time

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

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.6
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_6_cost

	province_modifier = {
		monthly_income = normal_building_tax_tier_6
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_6
		development_growth = normal_building_development_growth_tier_6
	}

	character_modifier = {
		monthly_influence = 1.8
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = murex_farm_07

	type_icon = "icon_building_murex_farms.dds"

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

murex_farm_07 = {
	construction_time = standard_construction_time

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

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.7
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	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
	}

	next_building = murex_farm_08

	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
	}
}

murex_farm_08 = {
	construction_time = standard_construction_time

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

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.8
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_8_cost

	province_modifier = {
		monthly_income = normal_building_tax_tier_8
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_8
		development_growth = normal_building_development_growth_tier_8
	}

	character_modifier = {
		monthly_influence = 3
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	type_icon = "icon_building_murex_farms.dds"

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

### paddy_fields

paddy_fields_01 = {
	construction_time = standard_construction_time
	effect_desc = paddy_fields_effect_desc

	can_construct_potential = {
		building_paddy_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 = terraced_hills
		development_growth_factor = 0.02
	}
	province_terrain_modifier = {
		terrain = floodplains
		development_growth_factor = 0.02
	}
	
	province_terrain_modifier = {
		parameter = champa_rice_building_bonuses
		terrain = terraced_hills
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
	}
	province_terrain_modifier = {
		parameter = champa_rice_building_bonuses
		terrain = wetlands
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
	}
	province_terrain_modifier = {
		parameter = champa_rice_building_bonuses
		terrain = floodplains
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_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
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.1
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.5
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = paddy_fields_02
	
	type_icon = "building_rice.dds"
	
	ai_value = {
		base = 15 # paddy fields should take priority when possible
		ai_tier_1_building_modifier = yes
		ai_tier_1_economical_building_preference_modifier = yes
		ai_paddy_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
			}
		}
	}
}

paddy_fields_02 = {
	construction_time = standard_construction_time
	effect_desc = paddy_fields_effect_desc

	can_construct_potential = {
		building_paddy_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 = terraced_hills
		development_growth_factor = 0.04
	}
	province_terrain_modifier = {
		terrain = floodplains
		development_growth_factor = 0.04
	}

	province_terrain_modifier = {
		parameter = champa_rice_building_bonuses
		terrain = terraced_hills
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
	}
	province_terrain_modifier = {
		parameter = champa_rice_building_bonuses
		terrain = floodplains
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
	}
	province_terrain_modifier = {
		parameter = champa_rice_building_bonuses
		terrain = wetlands
		tax_mult = innovation_champa_rice_tax_mult_value_1
		levy_size = innovation_champa_rice_levy_size_value_1
	}

	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
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.2
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.6
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = paddy_fields_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
		}
	}
}

paddy_fields_03 = {
	construction_time = standard_construction_time
	effect_desc = paddy_fields_effect_desc

	can_construct_potential = {
		building_paddy_fields_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = rice_cultivators_next_level_paddy_fields
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
			scope:holder.culture = {
				has_innovation = innovation_manorialism
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = rice_cultivators_next_level_paddy_fields
			}
			building_requirement_castle_city_church = { LEVEL = 01 }
		}
	}

	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
	}
	province_terrain_modifier = {
		terrain = terraced_hills
		development_growth_factor = 0.06
	}
	province_terrain_modifier = {
		terrain = floodplains
		development_growth_factor = 0.06
	}
	
	county_modifier = {
		supply_limit = 400
	}

	province_terrain_modifier = {
		parameter = champa_rice_building_bonuses
		terrain = terraced_hills
		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 = {
		parameter = champa_rice_building_bonuses
		terrain = floodplains
		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 = {
		parameter = champa_rice_building_bonuses
		terrain = wetlands
		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
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.3
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.7
	}

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

paddy_fields_04 = {
	construction_time = standard_construction_time
	effect_desc = paddy_fields_effect_desc

	can_construct_potential = {
		building_paddy_fields_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = rice_cultivators_next_level_paddy_fields
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
			scope:holder.culture = {
				has_innovation = innovation_manorialism
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = rice_cultivators_next_level_paddy_fields
			}
			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 = good_building_tax_tier_4
	}
	province_terrain_modifier = {
		terrain = terraced_hills
		development_growth_factor = 0.08
	}
	province_terrain_modifier = {
		terrain = floodplains
		development_growth_factor = 0.08
	}
	
	county_modifier = {
		supply_limit = 400
		development_growth_factor = 0.05
	}

	province_terrain_modifier = {
		parameter = champa_rice_building_bonuses
		terrain = terraced_hills
		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 = {
		parameter = champa_rice_building_bonuses
		terrain = floodplains
		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 = {
		parameter = champa_rice_building_bonuses
		terrain = wetlands
		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
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.4
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.8
	}


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

paddy_fields_05 = {
	construction_time = standard_construction_time
	effect_desc = paddy_fields_effect_desc

	can_construct_potential = {
		building_paddy_fields_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = rice_cultivators_next_level_paddy_fields
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
			scope:holder.culture = {
				has_innovation = innovation_guilds
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = rice_cultivators_next_level_paddy_fields
			}
			scope:holder.culture = {
				has_innovation = innovation_manorialism
			}
			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 = good_building_tax_tier_5
	}
	province_terrain_modifier = {
		terrain = terraced_hills
		development_growth_factor = 0.12
	}
	province_terrain_modifier = {
		terrain = floodplains
		development_growth_factor = 0.12
	}
	
	county_modifier = {
		supply_limit = 400
		development_growth_factor = 0.05
		supply_limit_mult = 0.05
	}

	province_terrain_modifier = {
		parameter = champa_rice_building_bonuses
		terrain = terraced_hills
		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 = {
		parameter = champa_rice_building_bonuses
		terrain = floodplains
		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 = {
		parameter = champa_rice_building_bonuses
		terrain = wetlands
		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
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.5
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.9
	}


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

paddy_fields_06 = {
	construction_time = standard_construction_time
	effect_desc = paddy_fields_effect_desc

	can_construct_potential = {
		building_paddy_fields_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = rice_cultivators_next_level_paddy_fields
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
			scope:holder.culture = {
				has_innovation = innovation_guilds
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = rice_cultivators_next_level_paddy_fields
			}
			scope:holder.culture = {
				has_innovation = innovation_manorialism
			}
			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 = good_building_tax_tier_6
	}
	province_terrain_modifier = {
		terrain = terraced_hills
		development_growth_factor = 0.16
	}
	province_terrain_modifier = {
		terrain = floodplains
		development_growth_factor = 0.16
	}
	
	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 = {
		parameter = champa_rice_building_bonuses
		terrain = terraced_hills
		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 = {
		parameter = champa_rice_building_bonuses
		terrain = floodplains
		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 = {
		parameter = champa_rice_building_bonuses
		terrain = wetlands
		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
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.6
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1
	}

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

paddy_fields_07 = {
	construction_time = standard_construction_time
	effect_desc = paddy_fields_effect_desc

	can_construct_potential = {
		building_paddy_fields_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = rice_cultivators_next_level_paddy_fields
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
			scope:holder.culture = {
				has_innovation = innovation_cranes
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = rice_cultivators_next_level_paddy_fields
			}
			scope:holder.culture = {
				has_innovation = innovation_guilds
			}
			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 = good_building_tax_tier_7
	}
	province_terrain_modifier = {
		terrain = terraced_hills
		development_growth_factor = 0.18
	}
	province_terrain_modifier = {
		terrain = floodplains
		development_growth_factor = 0.18
	}
	
	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 = {
		parameter = champa_rice_building_bonuses
		terrain = terraced_hills
		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 = {
		parameter = champa_rice_building_bonuses
		terrain = floodplains
		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 = {
		parameter = champa_rice_building_bonuses
		terrain = wetlands
		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
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.7
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1.1
	}

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

paddy_fields_08 = {
	construction_time = standard_construction_time
	effect_desc = paddy_fields_effect_desc

	can_construct_potential = {
		building_paddy_fields_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					scope:holder.culture = {
						has_cultural_parameter = rice_cultivators_next_level_paddy_fields
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
			scope:holder.culture = {
				has_innovation = innovation_cranes
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = rice_cultivators_next_level_paddy_fields
			}
			scope:holder.culture = {
				has_innovation = innovation_guilds
			}
			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 = good_building_tax_tier_8
	}
	province_terrain_modifier = {
		terrain = terraced_hills
		development_growth_factor = 0.20
	}
	province_terrain_modifier = {
		terrain = floodplains
		development_growth_factor = 0.20
	}
	
	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_terrain_modifier = {
		parameter = champa_rice_building_bonuses
		terrain = terraced_hills
		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 = {
		parameter = champa_rice_building_bonuses
		terrain = floodplains
		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 = {
		parameter = champa_rice_building_bonuses
		terrain = wetlands
		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_8
		stationed_maa_toughness_mult = normal_maa_toughness_tier_8
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.8
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1.2
	}

	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
	}
}

# Spice plantations

spice_plantation_01 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_spice_plantation_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
	}
	
	is_enabled = {
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.1
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_1_cost

	character_modifier = {
		monthly_prestige = 0.03
	}

	province_modifier = {
		monthly_income = normal_building_tax_tier_1
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 0.1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = spice_plantation_02

	type_icon = "icon_building_spice_plantation.dds"

	ai_value = {
		base = 12
		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 = {
			factor = 2
			scope:holder.capital_province = this
		}
		modifier = {
			factor = 2
			scope:holder = {
				government_has_flag = government_is_administrative
			}
		}
	}
}

spice_plantation_02 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_spice_plantation_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
	}
	
	is_enabled = {
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.2
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_2_cost

	character_modifier = {
		monthly_prestige = 0.06
	}

	province_modifier = {
		monthly_income = normal_building_tax_tier_2
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 0.3
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = spice_plantation_03

	type_icon = "icon_building_spice_plantation.dds"

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

spice_plantation_03 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_spice_plantation_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 02 }
	}
	
	is_enabled = {
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.3
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_3_cost

	character_modifier = {
		monthly_prestige = 0.09
	}

	province_modifier = {
		monthly_income = normal_building_tax_tier_3
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 0.6
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = spice_plantation_04

	type_icon = "icon_building_spice_plantation.dds"

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

spice_plantation_04 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_spice_plantation_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 02 }
	}
	
	is_enabled = {
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.4
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_4_cost

	character_modifier = {
		monthly_prestige = 0.12
		legitimacy_gain_mult = 0.01
	}

	province_modifier = {
		monthly_income = normal_building_tax_tier_4
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = spice_plantation_05

	type_icon = "icon_building_spice_plantation.dds"

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

spice_plantation_05 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_spice_plantation_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 03 }
	}
	
	is_enabled = {
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.5
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_5_cost

	character_modifier = {
		monthly_prestige = 0.15
		legitimacy_gain_mult = 0.02
	}

	province_modifier = {
		monthly_income = normal_building_tax_tier_5
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 1.3
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = spice_plantation_06

	type_icon = "icon_building_spice_plantation.dds"

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

spice_plantation_06 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_spice_plantation_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 03 }
	}
	
	is_enabled = {
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.6
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_6_cost

	character_modifier = {
		monthly_prestige = 0.18
		legitimacy_gain_mult = 0.03
	}

	province_modifier = {
		monthly_income = normal_building_tax_tier_6
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 1.8
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = spice_plantation_07

	type_icon = "icon_building_spice_plantation.dds"

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

spice_plantation_07 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_spice_plantation_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 04 }
	}
	
	is_enabled = {
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.7
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_7_cost

	character_modifier = {
		monthly_prestige = 0.21
		legitimacy_gain_mult = 0.04
	}

	province_modifier = {
		monthly_income = normal_building_tax_tier_7
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 2.3
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = spice_plantation_08

	type_icon = "icon_building_spice_plantation.dds"

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

spice_plantation_08 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_spice_plantation_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 04 }
	}
	
	is_enabled = {
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = 0.8
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		county = { NOT = { has_county_modifier = backwater_county_modifier } }
	}

	can_construct = {
	}

	cost_gold = normal_building_tier_8_cost

	character_modifier = {
		monthly_prestige = 0.24
		legitimacy_gain_mult = 0.05
	}

	province_modifier = {
		monthly_income = normal_building_tax_tier_8
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 3
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	type_icon = "icon_building_spice_plantation.dds"

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

# Waterworks
# building_waterworks_requirement_terrain = is in India, Southeast Asia, or China, prov is county captain and terrain is NOT mountains or desert mountains

waterworks_01 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_waterworks_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
	}
	
	is_enabled = {
	}

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

	can_construct = {
	}

	cost_gold = normal_building_tier_1_cost

	province_modifier = {
		supply_limit_mult = 0.1
		tax_mult = low_building_tax_mult_tier_1
		levy_size = 0.02
		epidemic_resistance = 2
	}

	county_culture_modifier = {
		parameter = waterworks_additional_bonuses
		build_gold_cost = -0.01
		development_growth_factor = normal_building_development_growth_factor_tier_1
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_1
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 0.1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = waterworks_02

	type_icon = "icon_building_waterworks.dds"

	ai_value = {
		base = 10
		ai_tier_1_building_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		modifier = {
			factor = 2
			scope:holder.capital_province = this
		}
		modifier = {
			add = 2
			scope:holder = {
				government_has_flag = government_is_administrative # infrastucture, babeyyy
			}
		}
		modifier = {
			factor = 0
			num_buildings < 5
		}
		modifier = {
			factor = 0
			NOR = {
				has_building_or_higher = farm_estates_01
				has_building_or_higher = orchards_01
				has_building_or_higher = cereal_fields_01
				has_building_or_higher = paddy_fields_01
				num_buildings >= 8
			}
		}
	}
}

waterworks_02 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_waterworks_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
	}
	
	is_enabled = {
	}

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

	can_construct = {
	}

	cost_gold = normal_building_tier_2_cost

	province_modifier = {
		supply_limit_mult = 0.2
		tax_mult = low_building_tax_mult_tier_2
		levy_size = 0.04
		epidemic_resistance = 4
	}

	county_culture_modifier = {
		parameter = waterworks_additional_bonuses
		build_gold_cost = -0.02
		development_growth_factor = normal_building_development_growth_factor_tier_2
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_2
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 0.3
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = waterworks_03

	type_icon = "icon_building_waterworks.dds"

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

waterworks_03 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_waterworks_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 02 }
	}
	
	is_enabled = {
	}

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

	can_construct = {
	}

	cost_gold = normal_building_tier_3_cost

	province_modifier = {
		supply_limit_mult = 0.3
		tax_mult = low_building_tax_mult_tier_3
		levy_size = 0.06
		epidemic_resistance = 6
	}

	county_culture_modifier = {
		parameter = waterworks_additional_bonuses
		build_gold_cost = -0.03
		development_growth_factor = normal_building_development_growth_factor_tier_3
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_3
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 0.6
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = waterworks_04

	type_icon = "icon_building_waterworks.dds"

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

waterworks_04 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_waterworks_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 02 }
	}
	
	is_enabled = {
	}

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

	can_construct = {
	}

	cost_gold = normal_building_tier_4_cost

	province_modifier = {
		supply_limit_mult = 0.4
		tax_mult = low_building_tax_mult_tier_4
		levy_size = 0.08
		epidemic_resistance = 8
	}

	county_culture_modifier = {
		parameter = waterworks_additional_bonuses
		build_gold_cost = -0.04
		development_growth_factor = normal_building_development_growth_factor_tier_4
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_4
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = waterworks_05

	type_icon = "icon_building_waterworks.dds"

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

waterworks_05 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_waterworks_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 03 }
	}
	
	is_enabled = {
	}

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

	can_construct = {
	}

	cost_gold = normal_building_tier_5_cost

	province_modifier = {
		supply_limit_mult = 0.5
		tax_mult = low_building_tax_mult_tier_5
		levy_size = 0.1
		epidemic_resistance = 10
	}

	county_culture_modifier = {
		parameter = waterworks_additional_bonuses
		build_gold_cost = -0.05
		development_growth_factor = normal_building_development_growth_factor_tier_5
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_5
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 1.3
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = waterworks_06

	type_icon = "icon_building_waterworks.dds"

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

waterworks_06 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_waterworks_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 03 }
	}
	
	is_enabled = {
	}

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

	can_construct = {
	}

	cost_gold = normal_building_tier_6_cost

	province_modifier = {
		supply_limit_mult = 0.6
		tax_mult = low_building_tax_mult_tier_6
		levy_size = 0.12
		epidemic_resistance = 12
	}

	county_culture_modifier = {
		parameter = waterworks_additional_bonuses
		build_gold_cost = -0.06
		development_growth_factor = normal_building_development_growth_factor_tier_6
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_6
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 1.8
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = waterworks_07

	type_icon = "icon_building_waterworks.dds"

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

waterworks_07 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_waterworks_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 04 }
	}
	
	is_enabled = {
	}

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

	can_construct = {
	}

	cost_gold = normal_building_tier_7_cost

	province_modifier = {
		supply_limit_mult = 0.7
		tax_mult = low_building_tax_mult_tier_7
		levy_size = 0.14
		epidemic_resistance = 14
	}

	county_culture_modifier = {
		parameter = waterworks_additional_bonuses
		build_gold_cost = -0.07
		development_growth_factor = normal_building_development_growth_factor_tier_7
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_7
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 2.3
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	next_building = waterworks_08

	type_icon = "icon_building_waterworks.dds"

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

waterworks_08 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_waterworks_requirement_terrain  = yes
		building_requirement_castle_city_church = { LEVEL = 04 }
	}
	
	is_enabled = {
	}

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

	can_construct = {
	}

	cost_gold = normal_building_tier_8_cost

	province_modifier = {
		supply_limit_mult = 1
		tax_mult = low_building_tax_mult_tier_8
		levy_size = 0.16
		epidemic_resistance = 16
	}

	county_culture_modifier = {
		parameter = waterworks_additional_bonuses
		build_gold_cost = -0.08
		development_growth_factor = normal_building_development_growth_factor_tier_8
	}

	county_modifier = {
		development_growth_factor = normal_building_development_growth_factor_tier_8
	}

	character_government_modifier = {
		parameter = government_has_influence
		monthly_influence = 3
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}

	type_icon = "icon_building_waterworks.dds"

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

### Trade Port

common_tradeport_01 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_common_tradeport_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_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = -0.3
		monthly_income = 0.1
	}
	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 = common_tradeport_02

	type_icon = "icon_building_tradeport.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
			}
		}

	}
}

common_tradeport_02 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_common_tradeport_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

			}
		}
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = -0.6
		monthly_income = 0.2
	}
	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 = common_tradeport_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
		}
	}
}

common_tradeport_03 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_common_tradeport_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 }
		}
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = -0.9
		monthly_income = 0.3
	}
	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 = common_tradeport_04
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

common_tradeport_04 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_common_tradeport_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 }
		}
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = -1.2
		monthly_income = 0.4
	}
	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 = common_tradeport_05
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

common_tradeport_05 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_common_tradeport_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 }
		}
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = -1.5
		monthly_income = 0.5
	}
	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 = common_tradeport_06
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

common_tradeport_06 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_common_tradeport_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 }
		}
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = -1.8
		monthly_income = 0.6
	}
	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 = common_tradeport_07
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

common_tradeport_07 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_common_tradeport_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 }
		}
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = -2.1
		monthly_income = 0.7
	}
	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 = common_tradeport_08
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

common_tradeport_08 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_common_tradeport_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 }
		}
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_barter_goods = -2.4
		monthly_income = 0.8
	}
	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
	}
}

### Pastures

pastures_01 = {
	construction_time = quick_construction_time

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	show_disabled = yes
	
	cost_gold = normal_building_tier_1_cost
	
	levy = small_building_levy_tier_1
	province_modifier = {
		monthly_income = normal_building_tax_tier_1
		supply_limit = normal_building_supply_limit_tier_1
	}
	character_culture_modifier = {
		parameter = pastures_building_bonuses
		light_cavalry_maintenance_mult = -0.01
	}
	province_culture_modifier = {
		parameter = pastures_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_1
		tax_mult = 0.01
		levy_size = 0.01
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.01
		levy_size = 0.01
	}
	
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.1
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.5
	}
	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = pastures_02

	type_icon = "icon_building_pastures.dds"
	
	ai_value = {
		base = 10
		ai_tier_1_building_modifier = yes
		ai_tier_1_economical_building_preference_modifier = yes
		ai_pasture_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 = 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
			}
		}
		modifier = {
			factor = 4
			culture = {
				has_cultural_parameter = farm_estates_pastures_unlock
			}
		}
	}
}

pastures_02 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_pastures_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 = normal_building_tier_2_cost
	
	levy = small_building_levy_tier_2
	province_modifier = {
		monthly_income = normal_building_tax_tier_2
		supply_limit = normal_building_supply_limit_tier_2
	}
	character_culture_modifier = {
		parameter = pastures_building_bonuses
		light_cavalry_maintenance_mult = -0.02
	}
	province_culture_modifier = {
		parameter = pastures_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_2
		tax_mult = 0.01
		levy_size = 0.01
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.01
		levy_size = 0.01
	}
	
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.2
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.6
	}
	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = pastures_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
		}
	}
}

pastures_03 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_pastures_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
	
	levy = small_building_levy_tier_3
	province_modifier = {
		monthly_income = normal_building_tax_tier_3
		supply_limit = normal_building_supply_limit_tier_3
		levy_reinforcement_rate = 0.1
	}
	character_culture_modifier = {
		parameter = pastures_building_bonuses
		light_cavalry_maintenance_mult = -0.03
	}
	province_culture_modifier = {
		parameter = pastures_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_3
		tax_mult = 0.02
		levy_size = 0.02
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.02
		levy_size = 0.02
	}
	
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.3
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.7
	}

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

pastures_04 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_pastures_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
	
	levy = small_building_levy_tier_4
	province_modifier = {
		monthly_income = normal_building_tax_tier_4
		supply_limit = normal_building_supply_limit_tier_4
		levy_reinforcement_rate = 0.1
	}
	county_modifier = {
		development_growth_factor = 0.02
	}
	character_culture_modifier = {
		parameter = pastures_building_bonuses
		light_cavalry_maintenance_mult = -0.04
	}
	province_culture_modifier = {
		parameter = pastures_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_4
		tax_mult = 0.02
		levy_size = 0.02
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.02
		levy_size = 0.02
	}
	
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.4
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.8
	}

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

pastures_05 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_pastures_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
	
	levy = small_building_levy_tier_5
	province_modifier = {
		monthly_income = normal_building_tax_tier_5
		supply_limit = normal_building_supply_limit_tier_5
		levy_reinforcement_rate = 0.1
		garrison_size = 0.05
	}
	character_culture_modifier = {
		parameter = pastures_building_bonuses
		light_cavalry_maintenance_mult = -0.05
	}
	province_culture_modifier = {
		parameter = pastures_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_5
		tax_mult = 0.03
		levy_size = 0.03
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.03
		levy_size = 0.03
	}
	county_modifier = {
		development_growth_factor = 0.02
	}

	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.5
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.9
	}
	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = pastures_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

pastures_06 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_pastures_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
	
	levy = small_building_levy_tier_6
	province_modifier = {
		monthly_income = normal_building_tax_tier_6
		supply_limit = normal_building_supply_limit_tier_6
		levy_reinforcement_rate = 0.1
		garrison_size = 0.05
	}
	county_modifier = {
		development_growth_factor = 0.02
		county_opinion_add = 2
	}
	character_culture_modifier = {
		parameter = pastures_building_bonuses
		light_cavalry_maintenance_mult = -0.06
	}
	province_culture_modifier = {
		parameter = pastures_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_6
		tax_mult = 0.03
		levy_size = 0.03
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.03
		levy_size = 0.03
	}

	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.6
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1
	}
	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = pastures_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

pastures_07 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_pastures_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
	
	levy = small_building_levy_tier_7
	province_modifier = {
		monthly_income = normal_building_tax_tier_7
		supply_limit = normal_building_supply_limit_tier_7
		levy_reinforcement_rate = 0.1
		garrison_size = 0.05
	}
	county_modifier = {
		development_growth_factor = 0.02
		county_opinion_add = 2
	}
	character_culture_modifier = {
		parameter = pastures_building_bonuses
		light_cavalry_maintenance_mult = -0.07
	}
	province_culture_modifier = {
		parameter = pastures_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_7
		tax_mult = 0.04
		levy_size = 0.04
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.04
		levy_size = 0.04
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.7
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1.1
	}
	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = pastures_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

pastures_08 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_pastures_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
	
	levy = small_building_levy_tier_8
	province_modifier = {
		monthly_income = normal_building_tax_tier_8
		supply_limit = normal_building_supply_limit_tier_8
		levy_reinforcement_rate = 0.15
		garrison_size = 0.05
	}
	county_modifier = {
		development_growth_factor = 0.02
		county_opinion_add = 2
	}
	character_culture_modifier = {
		parameter = pastures_building_bonuses
		light_cavalry_maintenance_mult = -0.08
	}
	province_culture_modifier = {
		parameter = pastures_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_8
		tax_mult = 0.04
		levy_size = 0.04
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.04
		levy_size = 0.04
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.8
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1.2
	}


	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
	}
}

### hunting_grounds

hunting_grounds_01 = {
	construction_time = quick_construction_time
	effect_desc = hunting_grounds_desc

	can_construct_potential = {
		building_hunting_grounds_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		scope:holder.culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	is_enabled = {
		scope:holder.culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
		culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
	}

	show_disabled = yes
	
	cost_gold = cheap_building_tier_1_cost
	
	levy = poor_building_levy_tier_1
	province_modifier = {
		defender_holding_advantage = normal_building_advantage_tier_1
		monthly_income = poor_building_tax_tier_1
		hostile_raid_time = 0.1
	}

	character_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		archers_maintenance_mult = -0.01
		archers_recruitment_cost_mult = -0.01
	}
	
	province_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_1
		stationed_archers_toughness_mult = low_maa_toughness_tier_1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = hunting_grounds_02
	
	type_icon = "icon_building_hunting_grounds.dds"
	
	ai_value = {
		base = 10
		ai_tier_1_building_modifier = yes
		ai_tier_1_economical_building_preference_modifier = yes
		ai_hunting_grounds_improvement_from_culture_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		modifier = {
			factor = 0
			building_cereal_fields_requirement_terrain = yes
			NOT = {
				has_building_or_higher = cereal_fields_01
			}
		}
		modifier = {
			factor = 0
			scope:holder = {
				government_has_flag = government_is_republic
			}
			NOT = {
				has_building_or_higher = guild_halls_01
			}
		}
	}
}

hunting_grounds_02 = {
	construction_time = quick_construction_time
	effect_desc = hunting_grounds_desc

	can_construct_potential = {
		building_hunting_grounds_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		scope:holder.culture = {
			has_innovation = innovation_crop_rotation
		}
		scope:holder.culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	is_enabled = {
		scope:holder.culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
		culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
	}

	show_disabled = yes

	cost_gold = cheap_building_tier_2_cost
	
	levy = poor_building_levy_tier_2
	province_modifier = {
		defender_holding_advantage = normal_building_advantage_tier_2
		monthly_income = poor_building_tax_tier_2
		hostile_raid_time = 0.2
	}

	character_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		archers_maintenance_mult = -0.02
		archers_recruitment_cost_mult = -0.02
	}
	
	province_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_2
		stationed_archers_toughness_mult = low_maa_toughness_tier_2
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = hunting_grounds_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
		}
	}
}

hunting_grounds_03 = {
	construction_time = quick_construction_time
	effect_desc = hunting_grounds_desc

	can_construct_potential = {
		building_hunting_grounds_requirement_terrain = yes
	}

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

	is_enabled = {
		scope:holder.culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
		culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
	}

	show_disabled = yes

	cost_gold = cheap_building_tier_3_cost
	
	levy = poor_building_levy_tier_3
	province_modifier = {
		defender_holding_advantage = normal_building_advantage_tier_3
		monthly_income = poor_building_tax_tier_3
		hostile_raid_time = 0.3
	}

	character_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		archers_maintenance_mult = -0.02
		archers_recruitment_cost_mult = -0.02
	}
	
	province_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_3
		stationed_archers_toughness_mult = low_maa_toughness_tier_3
	}

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

hunting_grounds_04 = {
	construction_time = quick_construction_time
	effect_desc = hunting_grounds_desc

	can_construct_potential = {
		building_hunting_grounds_requirement_terrain = yes
	}

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

	is_enabled = {
		scope:holder.culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
		culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
	}

	show_disabled = yes
	
	cost_gold = cheap_building_tier_4_cost
	
	levy = poor_building_levy_tier_4
	province_modifier = {
		defender_holding_advantage = normal_building_advantage_tier_4
		monthly_income = poor_building_tax_tier_4
		hostile_raid_time = 0.4
	}

	character_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		archers_maintenance_mult = -0.03
		archers_recruitment_cost_mult = -0.03
	}
	
	province_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_4
		stationed_archers_toughness_mult = low_maa_toughness_tier_4
	}

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

hunting_grounds_05 = {
	construction_time = quick_construction_time
	effect_desc = hunting_grounds_desc

	can_construct_potential = {
		building_hunting_grounds_requirement_terrain = yes
	}

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

	is_enabled = {
		scope:holder.culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
		culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
	}

	show_disabled = yes
	
	cost_gold = cheap_building_tier_5_cost
	
	levy = poor_building_levy_tier_5
	province_modifier = {
		defender_holding_advantage = normal_building_advantage_tier_5
		monthly_income = poor_building_tax_tier_5
		hostile_raid_time = 0.5
	}
	
	character_modifier = {
		men_at_arms_maintenance = -0.01
	}

	character_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		archers_maintenance_mult = -0.03
		archers_recruitment_cost_mult = -0.03
	}
	
	province_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_5
		stationed_archers_toughness_mult = low_maa_toughness_tier_5
	}
	
	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = hunting_grounds_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

hunting_grounds_06 = {
	construction_time = quick_construction_time
	effect_desc = hunting_grounds_desc

	can_construct_potential = {
		building_hunting_grounds_requirement_terrain = yes
	}

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

	is_enabled = {
		scope:holder.culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
		culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
	}

	show_disabled = yes
	
	cost_gold = cheap_building_tier_6_cost
	
	levy = poor_building_levy_tier_6
	province_modifier = {
		defender_holding_advantage = normal_building_advantage_tier_6
		monthly_income = poor_building_tax_tier_6
		hostile_raid_time = 0.6
	}
	
	character_modifier = {
		men_at_arms_maintenance = -0.01
	}

	character_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		archers_maintenance_mult = -0.03
		archers_recruitment_cost_mult = -0.03
	}
	
	province_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_6
		stationed_archers_toughness_mult = low_maa_toughness_tier_6
	}
	
	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = hunting_grounds_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

hunting_grounds_07 = {
	construction_time = quick_construction_time
	effect_desc = hunting_grounds_desc

	can_construct_potential = {
		building_hunting_grounds_requirement_terrain = yes
	}

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

	is_enabled = {
		scope:holder.culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
		culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
	}

	show_disabled = yes
	
	cost_gold = cheap_building_tier_7_cost
	
	levy = poor_building_levy_tier_7
	province_modifier = {
		defender_holding_advantage = normal_building_advantage_tier_7
		monthly_income = poor_building_tax_tier_7
		hostile_raid_time = 0.7
	}
	
	character_modifier = {
		men_at_arms_maintenance = -0.01
	}

	character_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		archers_maintenance_mult = -0.04
		archers_recruitment_cost_mult = -0.04
	}
	
	province_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_7
		stationed_archers_toughness_mult = low_maa_toughness_tier_7
	}
	
	county_modifier = {
		development_growth_factor = 0.02
	}

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

hunting_grounds_08 = {
	construction_time = quick_construction_time
	effect_desc = hunting_grounds_desc

	can_construct_potential = {
		building_hunting_grounds_requirement_terrain = yes
	}

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

	is_enabled = {
		scope:holder.culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
		culture = {
			NOT = {
				has_cultural_parameter = vegetarian_building_ban
			}
		}
	}

	show_disabled = yes
	
	cost_gold = cheap_building_tier_8_cost
	
	levy = poor_building_levy_tier_8
	province_modifier = {
		defender_holding_advantage = normal_building_advantage_tier_8
		monthly_income = poor_building_tax_tier_8
		hostile_raid_time = 0.8
	}
	
	character_modifier = {
		men_at_arms_maintenance = -0.01
	}

	character_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		archers_maintenance_mult = -0.04
		archers_recruitment_cost_mult = -0.04
	}
	
	province_culture_modifier = {
		parameter = hunting_archery_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_8
		stationed_archers_toughness_mult = low_maa_toughness_tier_8
	}
	
	county_modifier = {
		development_growth_factor = 0.02
	}

	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
	}
}

### orchards

orchards_01 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_1_cost
	
	levy = small_building_levy_tier_1
	province_modifier = {
		monthly_income = normal_building_tax_tier_1
	}
	county_modifier = {
		development_growth_factor = 0.05
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.01
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.1
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.5
	}

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

	type_icon = "icon_building_orchards.dds"
	
	ai_value = {
		base = 15 # Significantly higher than normal, they're just that good
		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
		modifier = {
			factor = 2
			AND = {
				building_watermills_requirement_terrain = yes
				building_windmills_requirement_terrain = yes
			}
		}
		modifier = {
			factor = 2
			culture = {
				has_cultural_parameter = vegetarian_fruit_orchard_allowed
			}
		}
	}
}

orchards_02 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_orchards_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 = normal_building_tier_2_cost
	
	levy = small_building_levy_tier_2
	province_modifier = {
		monthly_income = normal_building_tax_tier_2
		levy_reinforcement_rate = 0.1
	}
	county_modifier = {
		development_growth_factor = 0.1
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.02
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.2
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.6
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = orchards_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
		}
	}
}

orchards_03 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_orchards_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
	
	levy = small_building_levy_tier_3
	province_modifier = {
		monthly_income = normal_building_tax_tier_3
		levy_reinforcement_rate = 0.1
		supply_limit_mult = 0.1
	}
	county_modifier = {
		development_growth_factor = 0.15
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.03
		supply_limit_mult = 0.1
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.3
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.7
	}


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

orchards_04 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_orchards_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
	
	levy = small_building_levy_tier_4
	province_modifier = {
		monthly_income = normal_building_tax_tier_4
		levy_reinforcement_rate = 0.1
		supply_limit_mult = 0.1
	}
	county_modifier = {
		development_growth_factor = 0.2
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.04
		supply_limit_mult = 0.1
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.4
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.8
	}


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

orchards_05 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_orchards_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
	
	levy = small_building_levy_tier_5
	province_modifier = {
		monthly_income = normal_building_tax_tier_5
		levy_reinforcement_rate = 0.1
		supply_limit_mult = 0.1
	}
	county_modifier = {
		development_growth_factor = 0.25
		levy_size = 0.02
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.05
		supply_limit_mult = 0.1
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.5
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.9
	}

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

orchards_06 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_orchards_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
	
	levy = small_building_levy_tier_6
	province_modifier = {
		monthly_income = normal_building_tax_tier_6
		supply_limit = 1000
		levy_reinforcement_rate = 0.1
		supply_limit_mult = 0.1
	}
	county_modifier = {
		development_growth_factor = 0.3
		levy_size = 0.02
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.06
		supply_limit_mult = 0.1
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.6
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1
	}

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

orchards_07 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_orchards_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
	
	levy = small_building_levy_tier_7
	province_modifier = {
		monthly_income = normal_building_tax_tier_7
		supply_limit = 1000
		levy_reinforcement_rate = 0.1
		supply_limit_mult = 0.1
	}
	county_modifier = {
		development_growth_factor = 0.35
		levy_size = 0.02
	}
	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
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.7
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1.1
	}

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

orchards_08 = {
	construction_time = standard_construction_time
	effect_desc = orchards_effect_desc

	can_construct_potential = {
		building_orchards_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
	
	levy = small_building_levy_tier_8
	province_modifier = {
		monthly_income = normal_building_tax_tier_8
		supply_limit = 1000
		levy_reinforcement_rate = 0.1
		supply_limit_mult = 0.1
	}
	county_modifier = {
		development_growth_factor = 0.4
		levy_size = 0.02
	}
	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
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.8
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1.2
	}


	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
	}
}

### farm estates

farm_estates_01 = {
	construction_time = slow_construction_time
	effect_desc = farm_estates_effect_desc
	
	can_construct_potential = {
		OR = {
			AND = {
				building_farm_estates_requirement_terrain = yes
				building_requirement_castle_city_church = { LEVEL = 01 }
			}		
			AND = {
				has_building_or_higher = pastures_04
				culture = {
					has_cultural_parameter = farm_estates_pastures_unlock
				}
			}
			AND = {
				building_paddy_fields_requirement_terrain = yes
				scope:holder.culture = { has_innovation = innovation_champa_rice }
				building_requirement_castle_city_church = { LEVEL = 01 }
			}
		}	
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		OR = {
			building_farm_estates_requirement_terrain = yes
			AND = {
				has_building_or_higher = pastures_04
				culture = {
					has_cultural_parameter = farm_estates_pastures_unlock
				}
			}
			building_paddy_fields_requirement_terrain = yes
		}
	}
	
	cost_gold = normal_building_tier_1_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_1
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.02
	}
	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 2
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.1
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.5
	}

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

	type_icon = "icon_building_farm_estates.dds"
	
	ai_value = {
		base = 15 # Significantly higher than normal, they're just that good
		ai_tier_1_building_modifier = yes
		ai_tier_1_economical_building_preference_modifier = yes
		ai_farm_estate_improvement_from_culture_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		modifier = {
			factor = 2
			AND = {
				building_watermills_requirement_terrain = yes
				building_windmills_requirement_terrain = yes
			}
		}
	}
}

farm_estates_02 = {
	construction_time = slow_construction_time
	effect_desc = farm_estates_effect_desc

	can_construct_potential = {
		OR = {
			AND = {
				building_requirement_castle_city_church = { LEVEL = 01 }
				scope:holder.culture = {
					has_innovation = innovation_crop_rotation
				}
				building_farm_estates_requirement_terrain = yes
			}			
			AND = {
				has_building_or_higher = pastures_04
				culture = {
					has_cultural_parameter = farm_estates_pastures_unlock
				}
			}
			AND = {
				building_paddy_fields_requirement_terrain = yes
				scope:holder.culture = { has_innovation = innovation_champa_rice }
				building_requirement_castle_city_church = { LEVEL = 01 }
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		OR = {
			building_farm_estates_requirement_terrain = yes
			AND = {
				has_building_or_higher = pastures_04
				culture = {
					has_cultural_parameter = farm_estates_pastures_unlock
				}
			}
			building_paddy_fields_requirement_terrain = yes
		}
	}
	
	cost_gold = normal_building_tier_2_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_2
		supply_limit_mult = 0.15
		supply_limit = 500
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.03
	}

	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 4
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.2
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.6
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = farm_estates_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
		}
	}
}

farm_estates_03 = {
	construction_time = slow_construction_time
	effect_desc = farm_estates_effect_desc
	
	can_construct_potential = {
		farm_estates_3_4_trigger = yes
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		OR = {
			building_farm_estates_requirement_terrain = yes
			AND = {
				has_building_or_higher = pastures_04
				culture = {
					has_cultural_parameter = farm_estates_pastures_unlock
				}
			}
			building_paddy_fields_requirement_terrain = yes
		}
	}
	
	cost_gold = normal_building_tier_3_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_3
		supply_limit_mult = 0.15
		supply_limit = 500
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.04
	}
	
	county_modifier = {
		development_growth_factor = 0.02
	}

	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 6
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.3
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.7
	}

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

farm_estates_04 = {
	construction_time = slow_construction_time
	effect_desc = farm_estates_effect_desc
	
	can_construct_potential = {
		farm_estates_3_4_trigger = yes
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		OR = {
			building_farm_estates_requirement_terrain = yes
			AND = {
				has_building_or_higher = pastures_04
				culture = {
					has_cultural_parameter = farm_estates_pastures_unlock
				}
			}
			building_paddy_fields_requirement_terrain = yes
		}
	}
	
	cost_gold = normal_building_tier_4_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_4
		supply_limit_mult = 0.15
		supply_limit = 1000
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.05
	}
	
	county_modifier = {
		development_growth_factor = 0.02
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.4
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.8
	}


	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 8
	}

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

farm_estates_05 = {
	construction_time = slow_construction_time
	effect_desc = farm_estates_effect_desc
	
	can_construct_potential = {
		OR = {
			building_farm_estates_requirement_terrain = yes
			AND = {
				building_paddy_fields_requirement_terrain = yes
				scope:holder.culture = { 
					has_innovation = innovation_champa_rice 
				}
			}
		}
	}

	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
		OR = {
			terrain = farmlands
			building_paddy_fields_requirement_terrain = yes
		}
	}
	
	cost_gold = normal_building_tier_5_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_5
		supply_limit_mult = 0.15
		levy_size = 0.05
		supply_limit = 1000
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.06
	}
	
	county_modifier = {
		development_growth_factor = 0.02
	}

	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 10
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.5
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.9
	}

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

farm_estates_06 = {
	construction_time = slow_construction_time
	effect_desc = farm_estates_effect_desc
	
	can_construct_potential = {
		OR = {
			building_farm_estates_requirement_terrain = yes
			AND = {
				building_paddy_fields_requirement_terrain = yes 
				scope:holder.culture = { 
					has_innovation = innovation_champa_rice 
				}
			}
		}
	}

	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
		OR = {
			terrain = farmlands
			building_paddy_fields_requirement_terrain = yes
		}
	}
	
	cost_gold = normal_building_tier_6_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_6
		supply_limit_mult = 0.15
		levy_size = 0.05
		supply_limit = 1000
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.06
	}
	
	county_modifier = {
		development_growth_factor = 0.05
		tax_mult = 0.01
	}

	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 12
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.6
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1
	}

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

farm_estates_07 = {
	construction_time = slow_construction_time
	effect_desc = farm_estates_effect_desc
	
	can_construct_potential = {
		OR = {
			building_farm_estates_requirement_terrain = yes
			AND = {
				building_paddy_fields_requirement_terrain = yes
				scope:holder.culture = { 
					has_innovation = innovation_champa_rice 
				}
			}
		}
	}

	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
		OR = {
			terrain = farmlands
			building_paddy_fields_requirement_terrain = yes
		}
	}
	
	cost_gold = normal_building_tier_7_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_7
		supply_limit_mult = 0.15
		levy_size = 0.05
		supply_limit = 1000
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.07
	}
	
	county_modifier = {
		development_growth_factor = 0.05
		tax_mult = 0.01
		monthly_county_control_growth_add = 0.2
	}

	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 14
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.7
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1.1
	}

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

farm_estates_08 = {
	construction_time = slow_construction_time
	effect_desc = farm_estates_effect_desc
	
	can_construct_potential = {
		OR = {
			building_farm_estates_requirement_terrain = yes
			AND = {
				building_paddy_fields_requirement_terrain = yes
				scope:holder.culture = { 
					has_innovation = innovation_champa_rice 
				}
			}
		}
	}

	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
		OR = {
			terrain = farmlands
			building_paddy_fields_requirement_terrain = yes
		}
	}
	
	cost_gold = normal_building_tier_8_cost
	
	province_modifier = {
		monthly_income = excellent_building_tax_tier_8
		supply_limit_mult = 0.15
		levy_size = 0.05
		supply_limit = 1000
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.08
	}
	county_modifier = {
		development_growth_factor = 0.05
		tax_mult = 0.02
		monthly_county_control_growth_add = 0.2
	}

	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 16
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.8
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1.2
	}


	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
	}
}

### cereal_fields

cereal_fields_01 = {
	construction_time = standard_construction_time
	effect_desc = cereal_fields_effect_desc

	can_construct_potential = {
		building_cereal_fields_requirement_terrain = yes
		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 = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.02
	}
	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
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.1
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.5
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = cereal_fields_02
	
	type_icon = "icon_building_cereal_fields.dds"
	
	ai_value = {
		base = 12 # A little bit higher than normal, they're just that good
		ai_tier_1_building_modifier = yes
		ai_tier_1_economical_building_preference_modifier = yes
		ai_cereal_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 = {
			add = 6
			county = {
				has_county_modifier = fertile_desert_mountains_modifier
			}
		}
		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
			}
		}
	}
}

cereal_fields_02 = {
	construction_time = standard_construction_time
	effect_desc = cereal_fields_effect_desc

	can_construct_potential = {
		building_cereal_fields_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		trigger_if = {
			limit = {
				NOT = { 
					scope:holder.culture = {
						has_cultural_parameter = vegetarian_next_level_cereal_fields
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_crop_rotation
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = vegetarian_next_level_cereal_fields
			}
		}
	}

	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 = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.03
	}

	county_modifier = {
		tax_mult = 0.01
	}

	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
	}

	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 4
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.2
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.6
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = cereal_fields_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
		}
	}
}

cereal_fields_03 = {
	construction_time = standard_construction_time
	effect_desc = cereal_fields_effect_desc

	can_construct_potential = {
		building_cereal_fields_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = { 
					scope:holder.culture = {
						has_cultural_parameter = vegetarian_next_level_cereal_fields
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
			scope:holder.culture = { 
				has_innovation = innovation_manorialism 
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = vegetarian_next_level_cereal_fields
				has_innovation = innovation_crop_rotation
			}
			building_requirement_castle_city_church = { LEVEL = 01 }
		}
	}

	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
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.04
	}

	county_modifier = {
		tax_mult = 0.01
		supply_limit = 400
	}

	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
	}

	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 6
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.3
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.7
	}


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

cereal_fields_04 = {
	construction_time = standard_construction_time
	effect_desc = cereal_fields_effect_desc

	can_construct_potential = {
		building_cereal_fields_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = { 
					scope:holder.culture = {
						has_cultural_parameter = vegetarian_next_level_cereal_fields
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
			scope:holder.culture = { 
				has_innovation = innovation_manorialism
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = vegetarian_next_level_cereal_fields
				has_innovation = innovation_crop_rotation
			}
			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 = good_building_tax_tier_4
	}

	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.05
	}

	county_modifier = {
		tax_mult = 0.01
		supply_limit = 400
		development_growth_factor = 0.05
	}

	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
	}

	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 8
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.4
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.8
	}

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

cereal_fields_05 = {
	construction_time = standard_construction_time
	effect_desc = cereal_fields_effect_desc

	can_construct_potential = {
		building_cereal_fields_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = { 
					scope:holder.culture = {
						has_cultural_parameter = vegetarian_next_level_cereal_fields
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
			scope:holder.culture = {
				has_innovation = innovation_guilds
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = vegetarian_next_level_cereal_fields
				has_innovation = innovation_manorialism
			}
			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 = good_building_tax_tier_5
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.06
	}

	county_modifier = {
		tax_mult = 0.01
		supply_limit = 400
		development_growth_factor = 0.05
		supply_limit_mult = 0.05
	}

	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
	}

	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 10
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.5
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.9
	}
	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = cereal_fields_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

cereal_fields_06 = {
	construction_time = standard_construction_time
	effect_desc = cereal_fields_effect_desc

	can_construct_potential = {
		building_cereal_fields_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = { 
					scope:holder.culture = {
						has_cultural_parameter = vegetarian_next_level_cereal_fields
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
			scope:holder.culture = {
				has_innovation = innovation_guilds
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = vegetarian_next_level_cereal_fields
				has_innovation = innovation_manorialism
			}
			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 = good_building_tax_tier_6
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.07
	}

	county_modifier = {
		tax_mult = 0.01
		supply_limit = 400
		development_growth_factor = 0.05
		supply_limit_mult = 0.05
		church_holding_build_gold_cost = -0.05
	}

	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
	}

	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 12
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.6
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1
	}

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

cereal_fields_07 = {
	construction_time = standard_construction_time
	effect_desc = cereal_fields_effect_desc

	can_construct_potential = {
		building_cereal_fields_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = { 
					scope:holder.culture = {
						has_cultural_parameter = vegetarian_next_level_cereal_fields
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
			scope:holder.culture = {
				has_innovation = innovation_cranes
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = vegetarian_next_level_cereal_fields
				has_innovation = innovation_guilds
			}
			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 = good_building_tax_tier_7
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.08
	}

	county_modifier = {
		levy_reinforcement_rate = 0.05
		tax_mult = 0.01
		supply_limit = 400
		development_growth_factor = 0.05
		supply_limit_mult = 0.05
		church_holding_build_gold_cost = -0.05
	}

	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
	}

	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 14
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.7
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1.1
	}
	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = cereal_fields_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_economy_modifier = yes
		ai_economical_building_preference_modifier = yes
	}
}

cereal_fields_08 = {
	construction_time = standard_construction_time
	effect_desc = cereal_fields_effect_desc

	can_construct_potential = {
		building_cereal_fields_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = { 
					scope:holder.culture = {
						has_cultural_parameter = vegetarian_next_level_cereal_fields
					}
				}
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
			scope:holder.culture = {
				has_innovation = innovation_cranes
			}
		}
		trigger_else = {
			scope:holder.culture = {
				has_cultural_parameter = vegetarian_next_level_cereal_fields
				has_innovation = innovation_guilds
			}
			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 = good_building_tax_tier_8
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.09
	}
	
	county_modifier = {
		levy_reinforcement_rate = 0.05
		tax_mult = 0.02
		supply_limit = 1600
		development_growth_factor = 0.05
		supply_limit_mult = 0.05
		church_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
	}

	province_culture_modifier = {
		parameter = brewery_farming_bonus
		county_opinion_add = 16
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.8
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1.2
	}


	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
	}
}

### logging_camps

logging_camps_01 = {
	construction_time = standard_construction_time
	effect_desc = logging_camps_desc

	can_construct_potential = {
		building_logging_camps_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_1	
		build_speed = good_building_build_speed_tier_1
	}
	province_culture_modifier = {
		parameter = logging_camps_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_1
		stationed_skirmishers_damage_mult = low_maa_damage_tier_1
	}
	county_culture_modifier = {
		parameter = logging_camps_building_bonuses
		build_speed = -0.02
		build_gold_cost = -0.01
	}

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

	type_icon = "icon_building_logging_camps.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_logging_camp_improvement_from_culture_modifier = yes
		modifier = {
			factor = 0
			scope:holder = {
				government_has_flag = government_is_republic
			}
			NOT = {
				has_building_or_higher = guild_halls_01
			}
		}
		modifier = {
			factor = 4
			scope:holder.culture = {
				has_cultural_parameter = watermills_forestries_unlock
			}
		}
	}
}

logging_camps_02 = {
	construction_time = standard_construction_time
	effect_desc = logging_camps_desc

	can_construct_potential = {
		building_logging_camps_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_2
		build_speed = good_building_build_speed_tier_2
	}
	county_modifier = {
		church_holding_build_gold_cost = -0.05
	}
	province_culture_modifier = {
		parameter = logging_camps_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_2
		stationed_skirmishers_damage_mult = low_maa_damage_tier_2
	}
	county_culture_modifier = {
		parameter = logging_camps_building_bonuses
		build_speed = -0.04
		build_gold_cost = -0.02
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = logging_camps_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
		}
		modifier = {
			factor = 4
			scope:holder.culture = {
				has_cultural_parameter = watermills_forestries_unlock
			}
		}
	}
}

logging_camps_03 = {
	construction_time = standard_construction_time
	effect_desc = logging_camps_desc

	can_construct_potential = {
		building_logging_camps_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_3
		build_speed = good_building_build_speed_tier_3
	}
	
	character_modifier = {
		army_maintenance_mult = -0.01
	}
	
	county_modifier = {
		church_holding_build_gold_cost = -0.05
	}
	province_culture_modifier = {
		parameter = logging_camps_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_3
		stationed_skirmishers_damage_mult = low_maa_damage_tier_3
	}
	county_culture_modifier = {
		parameter = logging_camps_building_bonuses
		build_speed = -0.06
		build_gold_cost = -0.03
	}

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

logging_camps_04 = {
	construction_time = standard_construction_time
	effect_desc = logging_camps_desc

	can_construct_potential = {
		building_logging_camps_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_4
		build_speed = good_building_build_speed_tier_4
	}
	
	character_modifier = {
		army_maintenance_mult = -0.01
	}
	
	county_modifier = {
		church_holding_build_gold_cost = -0.05
		supply_limit = 300
	}
	province_culture_modifier = {
		parameter = logging_camps_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_4
		stationed_skirmishers_damage_mult = low_maa_damage_tier_4
	}
	county_culture_modifier = {
		parameter = logging_camps_building_bonuses
		build_speed = -0.08
		build_gold_cost = -0.04
	}

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

logging_camps_05 = {
	construction_time = standard_construction_time
	effect_desc = logging_camps_desc

	can_construct_potential = {
		building_logging_camps_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_5
		build_speed = good_building_build_speed_tier_5
	}
	
	character_modifier = {
		army_maintenance_mult = -0.01
	}
	
	county_modifier = {
		church_holding_build_gold_cost = -0.05
		supply_limit = 300
		tax_mult = 0.01
	}
	province_culture_modifier = {
		parameter = logging_camps_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_5
		stationed_skirmishers_damage_mult = low_maa_damage_tier_5
	}
	county_culture_modifier = {
		parameter = logging_camps_building_bonuses
		build_speed = -0.1
		build_gold_cost = -0.05
	}

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

logging_camps_06 = {
	construction_time = standard_construction_time
	effect_desc = logging_camps_desc

	can_construct_potential = {
		building_logging_camps_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_6
		build_speed = good_building_build_speed_tier_6
	}
	
	character_modifier = {
		army_maintenance_mult = -0.01
	}
	
	county_modifier = {
		church_holding_build_gold_cost = -0.05
		supply_limit = 600
		tax_mult = 0.01
	}
	province_culture_modifier = {
		parameter = logging_camps_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_6
		stationed_skirmishers_damage_mult = low_maa_damage_tier_6
	}
	county_culture_modifier = {
		parameter = logging_camps_building_bonuses
		build_speed = -0.12
		build_gold_cost = -0.06
	}

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

logging_camps_07 = {
	construction_time = standard_construction_time
	effect_desc = logging_camps_desc

	can_construct_potential = {
		building_logging_camps_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_7
		build_speed = good_building_build_speed_tier_7
	}
	
	character_modifier = {
		army_maintenance_mult = -0.01
	}
	
	county_modifier = {
		church_holding_build_gold_cost = -0.05
		supply_limit = 600
		tax_mult = 0.02
	}
	province_culture_modifier = {
		parameter = logging_camps_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_7
		stationed_skirmishers_damage_mult = low_maa_damage_tier_7
	}
	county_culture_modifier = {
		parameter = logging_camps_building_bonuses
		build_speed = -0.14
		build_gold_cost = -0.07
	}

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

logging_camps_08 = {
	construction_time = standard_construction_time
	effect_desc = logging_camps_desc

	can_construct_potential = {
		building_logging_camps_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_8
		build_speed = good_building_build_speed_tier_8
	}
	
	character_modifier = {
		army_maintenance_mult = -0.01
	}
	
	county_modifier = {
		church_holding_build_gold_cost = -0.05
		supply_limit = 600
		tax_mult = 0.02
		development_growth_factor = 0.02
	}
	province_culture_modifier = {
		parameter = logging_camps_building_bonuses
		stationed_archers_damage_mult = low_maa_damage_tier_8
		stationed_skirmishers_damage_mult = low_maa_damage_tier_8
	}
	county_culture_modifier = {
		parameter = logging_camps_building_bonuses
		build_speed = -0.16
		build_gold_cost = -0.08
	}

	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
	}
}

### peat_quarries

peat_quarries_01 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_peat_quarries_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

	province_modifier = {
		monthly_income = normal_building_tax_tier_1
		build_speed = normal_building_build_speed_tier_1
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.02
	}
	county_culture_modifier = {
		parameter = peat_quarries_building_bonuses
		build_speed = -0.02
		build_gold_cost = -0.01
	}

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

	type_icon = "icon_building_peat_quarries.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_peat_quarries_improvement_from_culture_modifier = yes
	}
}

peat_quarries_02 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_peat_quarries_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_2
		build_speed = normal_building_build_speed_tier_2
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.03
	}
	
	county_modifier = {
		build_gold_cost = -0.05
	}
	county_culture_modifier = {
		parameter = peat_quarries_building_bonuses
		build_speed = -0.04
		build_gold_cost = -0.02
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = peat_quarries_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
		}
	}
}

peat_quarries_03 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_peat_quarries_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_3
		build_speed = normal_building_build_speed_tier_3
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.04
	}
	
	county_modifier = {
		build_gold_cost = -0.05
		supply_limit = 200
	}
	county_culture_modifier = {
		parameter = peat_quarries_building_bonuses
		build_speed = -0.06
		build_gold_cost = -0.03
	}

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

peat_quarries_04 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_peat_quarries_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_4
		build_speed = normal_building_build_speed_tier_4
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.05
	}
	
	county_modifier = {
		build_gold_cost = -0.05
		supply_limit = 200
		supply_limit_mult = 0.05
	}
	county_culture_modifier = {
		parameter = peat_quarries_building_bonuses
		build_speed = -0.08
		build_gold_cost = -0.04
	}

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

peat_quarries_05 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_peat_quarries_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_5
		build_speed = normal_building_build_speed_tier_5
		hostile_raid_time = 0.1
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.06
	}
	
	county_modifier = {
		build_gold_cost = -0.05
		supply_limit = 200
		supply_limit_mult = 0.05
	}
	county_culture_modifier = {
		parameter = peat_quarries_building_bonuses
		build_speed = -0.10
		build_gold_cost = -0.05
	}

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

peat_quarries_06 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_peat_quarries_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_6
		build_speed = normal_building_build_speed_tier_6
		hostile_raid_time = 0.1
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.07
	}
	
	county_modifier = {
		build_gold_cost = -0.05
		supply_limit = 200
		supply_limit_mult = 0.05
		development_growth_factor = 0.05
	}
	county_culture_modifier = {
		parameter = peat_quarries_building_bonuses
		build_speed = -0.12
		build_gold_cost = -0.06
	}

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

peat_quarries_07 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_peat_quarries_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_7
		build_speed = normal_building_build_speed_tier_7
		hostile_raid_time = 0.1
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.08
	}
	
	county_modifier = {
		build_gold_cost = -0.1
		supply_limit = 200
		supply_limit_mult = 0.05
		development_growth_factor = 0.05
	}
	county_culture_modifier = {
		parameter = peat_quarries_building_bonuses
		build_speed = -0.14
		build_gold_cost = -0.07
	}

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

peat_quarries_08 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_peat_quarries_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_8
		build_speed = normal_building_build_speed_tier_8
		hostile_raid_time = 0.1
	}
	province_terrain_modifier = {
		parameter = coastal_agriculture_building_bonuses
		is_coastal = yes
		tax_mult = 0.09
	}
	
	county_modifier = {
		build_gold_cost = -0.1
		supply_limit = 600
		supply_limit_mult = 0.05
		development_growth_factor = 0.05
	}
	county_culture_modifier = {
		parameter = peat_quarries_building_bonuses
		build_speed = -0.16
		build_gold_cost = -0.08
	}

	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
	}
}

### hill_farms

hill_farms_01 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_hill_farms_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_1
	}
	character_culture_modifier = {
		parameter = hill_farms_building_bonuses
		knight_effectiveness_mult = 0.01
		counter_efficiency = 0.01
	}
	province_culture_modifier = {
		parameter = hill_farms_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_1
	}
	county_culture_modifier = {
		parameter = hill_farms_building_bonuses
		levy_size = 0.01
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.1
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.5
	}

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

	type_icon = "icon_building_hill_farms.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
		ai_hill_farms_improvement_from_culture_modifier = yes
		modifier = {
			factor = 0
			scope:holder = {
				government_has_flag = government_is_republic
			}
			NOT = {
				has_building_or_higher = guild_halls_01
			}
		}
		modifier = {
			factor = 4
			culture = {
				has_cultural_parameter = windmills_hill_farms_unlock
			}
		}
	}
}

hill_farms_02 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_hill_farms_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_2
		defender_holding_advantage = 1
		stationed_skirmishers_toughness_mult = 0.02
	}
	character_culture_modifier = {
		parameter = hill_farms_building_bonuses
		knight_effectiveness_mult = 0.02
		counter_efficiency = 0.02
	}
	province_culture_modifier = {
		parameter = hill_farms_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_2
	}
	county_culture_modifier = {
		parameter = hill_farms_building_bonuses
		levy_size = 0.01
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.2
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.6
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = hill_farms_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
		}
	}
}

hill_farms_03 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_hill_farms_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_3
		defender_holding_advantage = 1
		stationed_skirmishers_toughness_mult = 0.02
	}
	
	county_modifier = {
		supply_limit = 300
	}
	character_culture_modifier = {
		parameter = hill_farms_building_bonuses
		knight_effectiveness_mult = 0.03
		counter_efficiency = 0.03
	}
	province_culture_modifier = {
		parameter = hill_farms_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_3
	}
	county_culture_modifier = {
		parameter = hill_farms_building_bonuses
		levy_size = 0.02
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.3
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.7
	}


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

hill_farms_04 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_hill_farms_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_4
		defender_holding_advantage = 2
		stationed_skirmishers_toughness_mult = 0.04
	}
	
	county_modifier = {
		supply_limit = 300
	}
	character_culture_modifier = {
		parameter = hill_farms_building_bonuses
		knight_effectiveness_mult = 0.04
		counter_efficiency = 0.04
	}
	province_culture_modifier = {
		parameter = hill_farms_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_4
	}
	county_culture_modifier = {
		parameter = hill_farms_building_bonuses
		levy_size = 0.02
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.4
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.8
	}

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

hill_farms_05 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_hill_farms_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_5
		defender_holding_advantage = 2
		stationed_skirmishers_toughness_mult = 0.04
	}
	
	county_modifier = {
		supply_limit = 300
		supply_limit_mult = 0.02
	}
	character_culture_modifier = {
		parameter = hill_farms_building_bonuses
		knight_effectiveness_mult = 0.05
		counter_efficiency = 0.05
	}
	province_culture_modifier = {
		parameter = hill_farms_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_5
	}
	county_culture_modifier = {
		parameter = hill_farms_building_bonuses
		levy_size = 0.03
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.5
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.9
	}

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

hill_farms_06 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_hill_farms_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_6
		defender_holding_advantage = 2
		stationed_skirmishers_toughness_mult = 0.04
	}
	
	county_modifier = {
		supply_limit = 300
		supply_limit_mult = 0.02
		development_growth_factor = 0.05
	}
	character_culture_modifier = {
		parameter = hill_farms_building_bonuses
		knight_effectiveness_mult = 0.06
		counter_efficiency = 0.06
	}
	province_culture_modifier = {
		parameter = hill_farms_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_6
	}
	county_culture_modifier = {
		parameter = hill_farms_building_bonuses
		levy_size = 0.03
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.6
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1
	}

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

hill_farms_07 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_hill_farms_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_7
		defender_holding_advantage = 2
		stationed_skirmishers_toughness_mult = 0.04
	}
	
	county_modifier = {
		supply_limit = 600
		supply_limit_mult = 0.02
		development_growth_factor = 0.05
	}
	character_culture_modifier = {
		parameter = hill_farms_building_bonuses
		knight_effectiveness_mult = 0.07
		counter_efficiency = 0.07
	}
	province_culture_modifier = {
		parameter = hill_farms_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_7
	}
	county_culture_modifier = {
		parameter = hill_farms_building_bonuses
		levy_size = 0.04
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.7
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1.1
	}

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

hill_farms_08 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_hill_farms_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
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_8
		defender_holding_advantage = 2
		stationed_skirmishers_toughness_mult = 0.04
	}
	
	county_modifier = {
		supply_limit = 600
		supply_limit_mult = 0.02
		development_growth_factor = 0.1
	}
	character_culture_modifier = {
		parameter = hill_farms_building_bonuses
		knight_effectiveness_mult = 0.08
		counter_efficiency = 0.08
	}
	province_culture_modifier = {
		parameter = hill_farms_building_bonuses
		defender_holding_advantage = normal_building_advantage_tier_8
	}
	county_culture_modifier = {
		parameter = hill_farms_building_bonuses
		levy_size = 0.04
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.8
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1.2
	}

	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
	}
}

### elephant_pens

elephant_pens_01 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_elephant_pens_requirement_terrain = yes
		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
		build_speed = good_building_build_speed_tier_1
		stationed_elephant_cavalry_damage_mult = high_maa_damage_tier_1
		stationed_elephant_cavalry_toughness_mult = high_maa_toughness_tier_1
	}
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_1
	}
	character_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		elephant_cavalry_maintenance_mult = -0.01
	}
	county_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		development_growth_factor = 0.05
	}

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

	type_icon = "icon_building_elephant_pens.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
	}
}

elephant_pens_02 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_elephant_pens_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 = normal_building_tier_2_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_2
		build_speed = good_building_build_speed_tier_2
		stationed_elephant_cavalry_damage_mult = high_maa_damage_tier_2
		stationed_elephant_cavalry_toughness_mult = high_maa_toughness_tier_2
	}
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_2
	}
	character_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		elephant_cavalry_maintenance_mult = -0.02
	}
	county_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		development_growth_factor = 0.1
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = elephant_pens_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
		}
	}
}

elephant_pens_03 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_elephant_pens_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 = normal_building_tax_tier_3
		build_speed = good_building_build_speed_tier_3
		stationed_elephant_cavalry_damage_mult = high_maa_damage_tier_3
		stationed_elephant_cavalry_toughness_mult = high_maa_toughness_tier_3
	}
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_3
	}
	county_modifier = {
		build_gold_cost = -0.02
	}
	character_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		elephant_cavalry_maintenance_mult = -0.03
	}
	county_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		development_growth_factor = 0.15
	}

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

elephant_pens_04 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_elephant_pens_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 = normal_building_tax_tier_4
		build_speed = good_building_build_speed_tier_4
		stationed_elephant_cavalry_damage_mult = high_maa_damage_tier_4
		stationed_elephant_cavalry_toughness_mult = high_maa_toughness_tier_4
	}
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_4
	}
	county_modifier = {
		build_gold_cost = -0.02
	}
	character_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		elephant_cavalry_maintenance_mult = -0.04
	}
	county_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		development_growth_factor = 0.20
	}

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

elephant_pens_05 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_elephant_pens_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 = normal_building_tax_tier_5
		build_speed = good_building_build_speed_tier_5
		stationed_elephant_cavalry_damage_mult = high_maa_damage_tier_5
		stationed_elephant_cavalry_toughness_mult = high_maa_toughness_tier_5
	}
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_5
	}
	county_modifier = {
		build_gold_cost = -0.02
	}
	character_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		elephant_cavalry_maintenance_mult = -0.05
	}
	county_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		development_growth_factor = 0.25
	}

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

elephant_pens_06 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_elephant_pens_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 = normal_building_tax_tier_6
		build_speed = good_building_build_speed_tier_6
		stationed_elephant_cavalry_damage_mult = high_maa_damage_tier_6
		stationed_elephant_cavalry_toughness_mult = high_maa_toughness_tier_6
	}
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_6
	}
	county_modifier = {
		build_gold_cost = -0.02
	}
	character_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		elephant_cavalry_maintenance_mult = -0.06
	}
	county_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		development_growth_factor = 0.30
	}

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

elephant_pens_07 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_elephant_pens_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 = normal_building_tax_tier_7
		build_speed = good_building_build_speed_tier_7
		stationed_elephant_cavalry_damage_mult = high_maa_damage_tier_7
		stationed_elephant_cavalry_toughness_mult = high_maa_toughness_tier_7
	}
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_7
	}
	county_modifier = {
		build_gold_cost = -0.02
		development_growth_factor = 0.05
	}
	character_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		elephant_cavalry_maintenance_mult = -0.07
	}
	county_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		development_growth_factor = 0.35
	}

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

elephant_pens_08 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_elephant_pens_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 = normal_building_tax_tier_8
		build_speed = good_building_build_speed_tier_8
		stationed_elephant_cavalry_damage_mult = high_maa_damage_tier_8
		stationed_elephant_cavalry_toughness_mult = high_maa_toughness_tier_8
	}
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_8
	}
	county_modifier = {
		build_gold_cost = -0.02
		development_growth_factor = 0.05
	}
	character_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		elephant_cavalry_maintenance_mult = -0.08
	}
	county_culture_modifier = {
		parameter = elephant_pens_building_bonuses
		development_growth_factor = 0.40
	}

	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
	}
}

### plantations

plantations_01 = {
	construction_time = quick_construction_time
	effect_desc = plantations_effect_desc

	can_construct_potential = {
		building_plantations_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
	
	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_income = 0.1
	}
	province_modifier = {
		monthly_income = poor_building_tax_tier_1
	}
	character_culture_modifier = {
		parameter = plantations_building_bonuses
		light_cavalry_maintenance_mult = -0.01
		camel_cavalry_maintenance_mult = -0.01
		light_cavalry_recruitment_cost_mult = -0.01
		camel_cavalry_recruitment_cost_mult = -0.01
	}
	province_culture_modifier = {
		parameter = plantations_building_bonuses
		monthly_income = poor_building_extra_tax_tier_1
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.1
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.5
	}

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

	type_icon = "icon_building_plantations.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
		ai_plantations_improvement_from_culture_modifier = yes
		modifier = {
			factor = 0
			building_orchards_requirement_terrain = yes
			NOT = {
				has_building_or_higher = orchards_01
			}
		}
		modifier = {
			factor = 0
			building_pastures_requirement_terrain = yes
			NOT = {
				has_building_or_higher = pastures_01
			}
		}
		modifier = {
			factor = 0
			building_cereal_fields_requirement_terrain = yes
			NOT = {
				has_building_or_higher = cereal_fields_01
			}
		}
		modifier = {
			factor = 0
			has_building_or_higher = city_01
			NOT = {
				has_building_or_higher = guild_halls_01
			}
		}
	}
}

plantations_02 = {
	construction_time = quick_construction_time
	effect_desc = plantations_effect_desc

	can_construct_potential = {
		building_plantations_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		scope:holder.culture = {
			has_innovation = innovation_crop_rotation
		}
	}
	
	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_income = 0.2
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = cheap_building_tier_2_cost
	
	province_modifier = {
		monthly_income = poor_building_tax_tier_2
		tax_mult = 0.01
	}
	character_culture_modifier = {
		parameter = plantations_building_bonuses
		light_cavalry_maintenance_mult = -0.02
		camel_cavalry_maintenance_mult = -0.02
		light_cavalry_recruitment_cost_mult = -0.02
		camel_cavalry_recruitment_cost_mult = -0.02
	}
	province_culture_modifier = {
		parameter = plantations_building_bonuses
		monthly_income = poor_building_extra_tax_tier_2
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.2
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.6
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = plantations_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
		}
	}
}

plantations_03 = {
	construction_time = quick_construction_time
	effect_desc = plantations_effect_desc

	can_construct_potential = {
		building_plantations_requirement_terrain = yes
	}

	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 02 }
		scope:holder.culture = {
			has_innovation = innovation_manorialism
		}
	}
	
	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_income = 0.3
	}
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = cheap_building_tier_3_cost
	
	province_modifier = {
		monthly_income = poor_building_tax_tier_3
		tax_mult = 0.01
		stationed_light_cavalry_toughness_mult = 0.02
	}
	character_culture_modifier = {
		parameter = plantations_building_bonuses
		light_cavalry_maintenance_mult = -0.03
		camel_cavalry_maintenance_mult = -0.03
		light_cavalry_recruitment_cost_mult = -0.03
		camel_cavalry_recruitment_cost_mult = -0.03
	}
	province_culture_modifier = {
		parameter = plantations_building_bonuses
		monthly_income = poor_building_extra_tax_tier_3
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.3
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.7
	}


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

plantations_04 = {
	construction_time = quick_construction_time
	effect_desc = plantations_effect_desc

	can_construct_potential = {
		building_plantations_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
	}

	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_income = 0.4
	}
	cost_gold = cheap_building_tier_4_cost
	
	province_modifier = {
		monthly_income = poor_building_tax_tier_4
		tax_mult = 0.02
		stationed_light_cavalry_toughness_mult = 0.02
	}
	character_culture_modifier = {
		parameter = plantations_building_bonuses
		light_cavalry_maintenance_mult = -0.04
		camel_cavalry_maintenance_mult = -0.04
		light_cavalry_recruitment_cost_mult = -0.04
		camel_cavalry_recruitment_cost_mult = -0.04
	}
	province_culture_modifier = {
		parameter = plantations_building_bonuses
		monthly_income = poor_building_extra_tax_tier_4
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.4
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.8
	}


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

plantations_05 = {
	construction_time = quick_construction_time
	effect_desc = plantations_effect_desc

	can_construct_potential = {
		building_plantations_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
	
	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_income = 0.5
	}
	province_modifier = {
		monthly_income = poor_building_tax_tier_5
		tax_mult = 0.02
		supply_limit = 200
		stationed_light_cavalry_toughness_mult = 0.02
	}
	county_modifier = {
		development_growth_factor = 0.02
	}
	character_culture_modifier = {
		parameter = plantations_building_bonuses
		light_cavalry_maintenance_mult = -0.05
		camel_cavalry_maintenance_mult = -0.05
		light_cavalry_recruitment_cost_mult = -0.05
		camel_cavalry_recruitment_cost_mult = -0.05
	}
	province_culture_modifier = {
		parameter = plantations_building_bonuses
		monthly_income = poor_building_extra_tax_tier_5
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.5
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 0.9
	}

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

plantations_06 = {
	construction_time = quick_construction_time
	effect_desc = plantations_effect_desc

	can_construct_potential = {
		building_plantations_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
	
	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_income = 0.6
	}
	province_modifier = {
		monthly_income = poor_building_tax_tier_6
		tax_mult = 0.02
		supply_limit = 400
		stationed_light_cavalry_toughness_mult = 0.02
	}
	county_modifier = {
		development_growth_factor = 0.02
	}
	character_culture_modifier = {
		parameter = plantations_building_bonuses
		light_cavalry_maintenance_mult = -0.06
		camel_cavalry_maintenance_mult = -0.06
		light_cavalry_recruitment_cost_mult = -0.06
		camel_cavalry_recruitment_cost_mult = -0.06
	}
	province_culture_modifier = {
		parameter = plantations_building_bonuses
		monthly_income = poor_building_extra_tax_tier_6
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.6
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1
	}

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

plantations_07 = {
	construction_time = quick_construction_time
	effect_desc = plantations_effect_desc

	can_construct_potential = {
		building_plantations_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
	
	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_income = 0.7
	}
	province_modifier = {
		monthly_income = poor_building_tax_tier_7
		tax_mult = 0.02
		supply_limit = 400
		stationed_light_cavalry_toughness_mult = 0.02
	}
	county_modifier = {
		development_growth_factor = 0.05
	}
	character_culture_modifier = {
		parameter = plantations_building_bonuses
		light_cavalry_maintenance_mult = -0.07
		camel_cavalry_maintenance_mult = -0.07
		light_cavalry_recruitment_cost_mult = -0.07
		camel_cavalry_recruitment_cost_mult = -0.07
	}
	province_culture_modifier = {
		parameter = plantations_building_bonuses
		monthly_income = poor_building_extra_tax_tier_7
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.7
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1.1
	}

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

plantations_08 = {
	construction_time = quick_construction_time
	effect_desc = plantations_effect_desc

	can_construct_potential = {
		building_plantations_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
	
	province_government_modifier = {
		parameter = government_is_urepublic
		monthly_income = 0.8
	}
	province_modifier = {
		monthly_income = poor_building_tax_tier_8
		tax_mult = 0.02
		supply_limit = 600
		stationed_light_cavalry_toughness_mult = 0.02
	}
	county_modifier = {
		development_growth_factor = 0.05
	}
	character_culture_modifier = {
		parameter = plantations_building_bonuses
		light_cavalry_maintenance_mult = -0.08
		camel_cavalry_maintenance_mult = -0.08
		light_cavalry_recruitment_cost_mult = -0.08
		camel_cavalry_recruitment_cost_mult = -0.08
	}
	province_culture_modifier = {
		parameter = plantations_building_bonuses
		monthly_income = poor_building_extra_tax_tier_8
	}
	province_government_modifier = {
		parameter = government_is_prepublic
		monthly_barter_goods = 0.8
	}
	county_culture_modifier = {
		parameter = use_farmer_republics
		county_fertility_growth_add = 1.2
	}


	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
	}
}

### quarries

quarries_01 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_quarries_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
	
	province_modifier = {
		monthly_income = poor_building_tax_tier_1
		build_speed = good_building_build_speed_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
	}

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

	type_icon = "icon_building_quarries.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
			}
		}
	}
}

quarries_02 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_quarries_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
	
	province_modifier = {
		monthly_income = poor_building_tax_tier_2
		build_speed = good_building_build_speed_tier_2
	}
	character_modifier = {
		men_at_arms_maintenance = -0.01
	}
	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
	}

	on_complete = {
		#Mandala Creator Aspect
		creator_mandala_built_regular_building_piety_effect = yes
	}
	
	next_building = quarries_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
		}
	}
}

quarries_03 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_quarries_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
	
	province_modifier = {
		monthly_income = poor_building_tax_tier_3
		build_speed = good_building_build_speed_tier_3
	}
	county_modifier = {
		development_growth_factor = 0.02
	}
	character_modifier = {
		men_at_arms_maintenance = -0.01
	}
	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
	}

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

quarries_04 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_quarries_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
	
	province_modifier = {
		monthly_income = poor_building_tax_tier_4
		build_speed = good_building_build_speed_tier_4
	}
	county_modifier = {
		development_growth_factor = 0.02
		build_gold_cost = -0.05
	}
	character_modifier = {
		men_at_arms_maintenance = -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
	}

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

quarries_05 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_quarries_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
	
	province_modifier = {
		monthly_income = poor_building_tax_tier_5
		build_speed = good_building_build_speed_tier_5
	}
	county_modifier = {
		development_growth_factor = 0.02
		build_gold_cost = -0.05
	}
	character_modifier = {
		men_at_arms_maintenance = -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
	}

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

quarries_06 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_quarries_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
	
	province_modifier = {
		monthly_income = poor_building_tax_tier_6
		build_speed = good_building_build_speed_tier_6
	}
	county_modifier = {
		development_growth_factor = 0.02
		build_gold_cost = -0.05
		garrison_size = 0.1
	}
	character_modifier = {
		men_at_arms_maintenance = -0.02
	}
	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
	}

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

quarries_07 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_quarries_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
	
	province_modifier = {
		monthly_income = poor_building_tax_tier_7
		build_speed = good_building_build_speed_tier_7
		stationed_heavy_infantry_toughness_mult = 0.02
		stationed_pikemen_toughness_mult = 0.02
	}
	county_modifier = {
		development_growth_factor = 0.02
		build_gold_cost = -0.05
		garrison_size = 0.1
	}
	character_modifier = {
		men_at_arms_maintenance = -0.02
	}
	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
	}

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

quarries_08 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_quarries_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
	
	province_modifier = {
		monthly_income = poor_building_tax_tier_8
		build_speed = good_building_build_speed_tier_8
		stationed_heavy_infantry_toughness_mult = 0.04
		stationed_pikemen_toughness_mult = 0.04
		stationed_heavy_cavalry_toughness_mult = 0.08
	}
	county_modifier = {
		development_growth_factor = 0.02
		build_gold_cost = -0.05
		garrison_size = 0.1
	}
	character_modifier = {
		men_at_arms_maintenance = -0.02
	}
	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
	}

	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
	}
}
