###############################
# Standard Military Buildings #
###############################

# Regimental Grounds - High Levy, All MaA, High MaA Maintenance
#	- Farmland, Floodplain
# Barracks - Normal Levy, Heavy Infantry, Pikemen
#	- Farmland, Plain, Dryland, Floodplain
# Warrior Lodges - Poor Levy, Heavy Infantry, Pikemen, Skirmishers, Flat Stationed MaA Pursuit
#	- Certain Regions: Mountains, Desert Mountains, Hills (certain regions)
# Hillside Grazing - Poor Levy, Heavy Cavalry, Light Cavalry, Horse Archers
#	- Certain Regions: Mountains, Desert Mountains, Hills (certain regions)
# Outposts - Poor Levy, Super Poor Tax, Defensive Advantage, Raid Time, Skirmishers, Archers
#	- Forest, Taiga, Jungle, Wetland
# Camel Farms - Poor Levy, Super Poor Tax, Camel Cavalry, Light Cavalry
#	- Camelry Region: Desert, Floodplain, Oasis, Dryland
# Horse Pastures - Low Levy, Low tax, Horse Archers, Light Cavalry, Flat Stationed MaA Screen
#	- Eastern Steppe Region/Steppe Terrain
# Blacksmiths - Normal Stationed MaA bonuses, Holding Taxes %, Levy Reinforcement, Low Knight Effectiveness
# Stables - Low Levy, Light Cavalry, Heavy Cavalry
# Militia Camps - Normal Levy, Archers, Skirmishers
# Workshops - Late Game Building - Normal Tax, Siege Weapons, Recruitment Cost for Archers/Skirmishers, Maintenance for Archers/Skirmishers
# Wind Furnaces - Good Tax, Good Stationed MaA bonuses, high Knight Effectiveness
#	- Wootz Steel Innovation


### wind_furnace

wind_furnace_01 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_wind_furnace_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 = {
		stationed_maa_damage_mult = high_maa_damage_tier_1
		stationed_maa_toughness_mult = high_maa_toughness_tier_1
		monthly_income = good_building_tax_tier_1
	}
	character_modifier = {
		#knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_1
	}
	
	next_building = wind_furnace_02

	type_icon = "icon_building_wind_furnaces.dds"
	
	ai_value = {
		base = 100
		ai_tier_1_building_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes

		modifier = {
			factor = 0
			has_holding_type = city_holding
		}
		modifier = {
			factor = 0
			has_holding_type = church_holding
		}
	}
}

wind_furnace_02 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_wind_furnace_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		scope:holder.culture = {
			has_innovation = innovation_barracks
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_2_cost
	
	province_modifier = {
		stationed_maa_damage_mult = high_maa_damage_tier_2
		stationed_maa_toughness_mult = high_maa_toughness_tier_2
		monthly_income = good_building_tax_tier_2
	}
	character_modifier = {
		#knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_2
	}
	
	next_building = wind_furnace_03
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

wind_furnace_03 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_wind_furnace_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_3_cost
	
	province_modifier = {
		stationed_maa_damage_mult = high_maa_damage_tier_3
		stationed_maa_toughness_mult = high_maa_toughness_tier_3
		monthly_income = good_building_tax_tier_3
	}
	character_modifier = {
		knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_3
	}
	
	next_building = wind_furnace_04
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

wind_furnace_04 = {
	construction_time = standard_construction_time
	effect_desc = windfurnaces_effects_desc

	can_construct_potential = {
		building_wind_furnace_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_4_cost
	
	province_modifier = {
		stationed_maa_damage_mult = high_maa_damage_tier_4
		stationed_maa_toughness_mult = high_maa_toughness_tier_4
		monthly_income = good_building_tax_tier_4
	}
	character_modifier = {
		knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_4
	}
	
	next_building = wind_furnace_05
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

wind_furnace_05 = {
	construction_time = standard_construction_time
	effect_desc = windfurnaces_effects_desc

	can_construct_potential = {
		building_wind_furnace_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_5_cost
	
	province_modifier = {
		stationed_maa_damage_mult = high_maa_damage_tier_5
		stationed_maa_toughness_mult = high_maa_toughness_tier_5
		monthly_income = good_building_tax_tier_5
	}
	character_modifier = {
		knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_5
	}
	
	next_building = wind_furnace_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

wind_furnace_06 = {
	construction_time = standard_construction_time
	effect_desc = windfurnaces_effects_desc

	can_construct_potential = {
		building_wind_furnace_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_6_cost
	
	province_modifier = {
		stationed_maa_damage_mult = high_maa_damage_tier_6
		stationed_maa_toughness_mult = high_maa_toughness_tier_6
		monthly_income = good_building_tax_tier_6
	}
	character_modifier = {
		knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_6
	}
	
	next_building = wind_furnace_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

wind_furnace_07 = {
	construction_time = standard_construction_time
	effect_desc = windfurnaces_effects_desc

	can_construct_potential = {
		building_wind_furnace_requirement_terrain = yes
	}
	
	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 04 }
		scope:holder.culture = {
			has_innovation = innovation_royal_armory
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_7_cost
	
	province_modifier = {
		stationed_maa_damage_mult = high_maa_damage_tier_7
		stationed_maa_toughness_mult = high_maa_toughness_tier_7
		monthly_income = good_building_tax_tier_7
	}
	character_modifier = {
		knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_7
	}
	
	next_building = wind_furnace_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

wind_furnace_08 = {
	construction_time = standard_construction_time
	effect_desc = windfurnaces_effects_desc

	can_construct_potential = {
		building_wind_furnace_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_8_cost
	
	province_modifier = {
		stationed_maa_damage_mult = high_maa_damage_tier_8
		stationed_maa_toughness_mult = high_maa_toughness_tier_8
		monthly_income = good_building_tax_tier_8
	}
	character_modifier = {
		knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_8
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

### workshops

workshops_01 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_workshops_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		scope:holder.culture = {
			has_innovation = innovation_advanced_bowmaking
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_1_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_1
		stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_1
		stationed_maa_siege_value_add = 0.05
	}
	character_modifier = {
		skirmishers_maintenance_mult = good_building_maa_maintenance_tier_1
		archers_maintenance_mult = good_building_maa_maintenance_tier_1
	}
	
	next_building = workshops_02

	type_icon = "icon_building_workshops.dds"
	
	ai_value = {
		base = 10
		ai_tier_1_building_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_military_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
			}
		}
	}
}

workshops_02 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_workshops_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		scope:holder.culture = {
			has_innovation = innovation_advanced_bowmaking
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_2_cost
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_2
		stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_2
		stationed_maa_siege_value_add = 0.1
	}
	character_modifier = {
		skirmishers_maintenance_mult = good_building_maa_maintenance_tier_2
		archers_maintenance_mult = good_building_maa_maintenance_tier_2
	}
	
	next_building = workshops_03
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

workshops_03 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_workshops_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_3_cost
	
	
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_3
		stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_3
		stationed_archers_damage_mult = high_maa_damage_tier_1
		stationed_skirmishers_damage_mult = high_maa_damage_tier_1
		stationed_maa_siege_value_add = 0.15
	}
	character_modifier = {
		skirmishers_maintenance_mult = good_building_maa_maintenance_tier_3
		archers_maintenance_mult = good_building_maa_maintenance_tier_3
	}
	
	next_building = workshops_04
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

workshops_04 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_workshops_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_4_cost
	
	
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_4
		stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_4
		stationed_archers_damage_mult = high_maa_damage_tier_2
		stationed_skirmishers_damage_mult = high_maa_damage_tier_2
		stationed_maa_siege_value_add = 0.2
	}
	character_modifier = {
		skirmishers_maintenance_mult = good_building_maa_maintenance_tier_4
		archers_maintenance_mult = good_building_maa_maintenance_tier_4
	}
	
	next_building = workshops_05
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

workshops_05 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_workshops_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_5_cost
	
	
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_5
		stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_5
		stationed_archers_damage_mult = high_maa_damage_tier_3
		stationed_skirmishers_damage_mult = high_maa_damage_tier_3
		stationed_maa_siege_value_add = 0.25
	}
	character_modifier = {
		skirmishers_maintenance_mult = good_building_maa_maintenance_tier_5
		archers_maintenance_mult = good_building_maa_maintenance_tier_5
		cultural_head_fascination_mult = 0.05
	}
	
	next_building = workshops_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

workshops_06 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_workshops_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_6_cost
	
	
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_6
		stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_6
		stationed_archers_damage_mult = high_maa_damage_tier_4
		stationed_skirmishers_damage_mult = high_maa_damage_tier_4
		stationed_maa_siege_value_add = 0.3
	}
	character_modifier = {
		skirmishers_maintenance_mult = good_building_maa_maintenance_tier_6
		archers_maintenance_mult = good_building_maa_maintenance_tier_6
		cultural_head_fascination_mult = 0.10
	}
	
	next_building = workshops_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

workshops_07 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_workshops_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_7_cost
	
	
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_7
		stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_7
		stationed_archers_damage_mult = high_maa_damage_tier_5
		stationed_skirmishers_damage_mult = high_maa_damage_tier_5
		stationed_maa_siege_value_add = 0.35
	}
	character_modifier = {
		skirmishers_maintenance_mult = good_building_maa_maintenance_tier_7
		archers_maintenance_mult = good_building_maa_maintenance_tier_7
		cultural_head_fascination_mult = 0.15
	}
	
	next_building = workshops_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

workshops_08 = {
	construction_time = slow_construction_time

	can_construct_potential = {
		building_workshops_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_8_cost
	
	
	
	province_modifier = {
		monthly_income = normal_building_tax_tier_8
		stationed_siege_weapon_siege_value_mult = normal_maa_siege_value_tier_8
		stationed_archers_damage_mult = high_maa_damage_tier_6
		stationed_skirmishers_damage_mult = high_maa_damage_tier_6
		stationed_maa_siege_value_add = 0.4
	}
	character_modifier = {
		skirmishers_maintenance_mult = good_building_maa_maintenance_tier_8
		archers_maintenance_mult = good_building_maa_maintenance_tier_8
		cultural_head_fascination_mult = 0.20
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

### horse_pastures

horse_pastures_01 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_horse_pastures_requirement_terrain = yes
	}

	can_construct_showing_failures_only = {
	}
	
	cost_gold = cheap_building_tier_1_cost
	
	levy = small_building_levy_tier_1
	
	character_modifier = {
		movement_speed = high_movement_speed_tier_1
		movement_speed_land_raiding = high_movement_speed_tier_1
	}
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_1
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_1
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_1
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_1
		stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_1
		stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_1
	}
	
	next_building = horse_pastures_02

	type_icon = "icon_building_horse_pastures.dds"
	
	ai_value = {
		base = 10
		ai_tier_1_building_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		ai_stacking_bonus_camel_farms_modifier = yes
		ai_stacking_bonus_hillside_grazing_modifier = yes
		ai_stacking_bonus_stables_modifier = yes
		ai_anti_synergy_armored_infantry_modifier = yes
		ai_anti_synergy_light_infantry_modifier = yes
		ai_archer_cavalry_modifier = yes
		ai_light_cavalry_modifier = yes
		modifier = {
			factor = 0
			building_regimental_grounds_requirement_terrain = yes
			NOT = {
				has_building_or_higher = regimental_grounds_01
			}
		}
		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 = {
			add = -9
			has_building_or_higher = city_01
		}
		modifier = {
			add = -9
			scope:holder = {
				OR = {
					AND = {
						government_has_flag = government_is_theocracy
						highest_held_title_tier <= tier_barony
					}
					is_theocratic_lessee = yes
				}
			}
		}
	}
}

horse_pastures_02 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_horse_pastures_requirement_terrain = yes
		scope:holder.culture = {
			has_innovation = innovation_barracks
		}
	}

	can_construct_showing_failures_only = {
	}
	
	cost_gold = cheap_building_tier_2_cost
	
	levy = small_building_levy_tier_2
	
	character_modifier = {
		movement_speed = high_movement_speed_tier_2
		movement_speed_land_raiding = high_movement_speed_tier_2
	}
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_2
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_2
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_2
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_2
		stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_2
		stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_2
	}
	
	next_building = horse_pastures_03
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

horse_pastures_03 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_horse_pastures_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_3_cost
	
	levy = small_building_levy_tier_3
	
	character_modifier = {
		movement_speed = high_movement_speed_tier_3
		movement_speed_land_raiding = high_movement_speed_tier_3
	}
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_3
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_3
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_3
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_3
		stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_3
		stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_3
	}
	
	next_building = horse_pastures_04
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

horse_pastures_04 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_horse_pastures_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_4_cost
	
	levy = small_building_levy_tier_4
	
	character_modifier = {
		movement_speed = high_movement_speed_tier_4
		movement_speed_land_raiding = high_movement_speed_tier_4
	}
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_4
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_4
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_4
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_4
		stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_4
		stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_4
	}
	
	next_building = horse_pastures_05
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

horse_pastures_05 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_horse_pastures_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_5_cost
	
	levy = small_building_levy_tier_5
	
	character_modifier = {
		movement_speed = high_movement_speed_tier_5
		movement_speed_land_raiding = high_movement_speed_tier_5
	}
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_5
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_5
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_5
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_5
		stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_5
		stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_5
	}
	
	next_building = horse_pastures_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

horse_pastures_06 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_horse_pastures_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_6_cost
	
	levy = small_building_levy_tier_6
	
	character_modifier = {
		movement_speed = high_movement_speed_tier_6
		movement_speed_land_raiding = high_movement_speed_tier_6
	}
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_6
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_6
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_6
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_6
		stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_6
		stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_6
	}
	
	next_building = horse_pastures_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

horse_pastures_07 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_horse_pastures_requirement_terrain = yes
	}
	
	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 04 }
		scope:holder.culture = {
			has_innovation = innovation_royal_armory
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = cheap_building_tier_7_cost
	
	levy = small_building_levy_tier_7
	
	character_modifier = {
		movement_speed = high_movement_speed_tier_7
		movement_speed_land_raiding = high_movement_speed_tier_7
	}
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_7
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_7
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_7
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_7
		stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_7
		stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_7
	}
	
	next_building = horse_pastures_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

horse_pastures_08 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_horse_pastures_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_8_cost
	
	levy = small_building_levy_tier_8
	
	character_modifier = {
		movement_speed = high_movement_speed_tier_8
		movement_speed_land_raiding = high_movement_speed_tier_8
	}
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = normal_maa_toughness_tier_8
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_8
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_8
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_8
		stationed_archer_cavalry_screen_mult = normal_maa_screen_tier_8
		stationed_archer_cavalry_pursuit_mult = normal_maa_pursuit_tier_8
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}


### hillside_grazing

hillside_grazing_01 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_hillside_grazing_requirement_terrain = yes
	}

	can_construct_showing_failures_only = {
	}
	
	cost_gold = cheap_building_tier_1_cost
	
	levy = small_building_levy_tier_1
	
	province_modifier = {
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_1
		stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_1
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_1
		monthly_income = super_poor_building_tax_tier_1

	}
	
	next_building = hillside_grazing_02

	type_icon = "icon_building_hillside_grazing.dds"
	
	ai_value = {
		base = 11 # Little nudge
		ai_tier_1_building_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		ai_stacking_bonus_camel_farms_modifier = yes
		ai_stacking_bonus_horse_pastures_modifier = yes
		ai_stacking_bonus_stables_modifier = yes
		ai_archer_cavalry_modifier = yes
		ai_light_cavalry_modifier = yes
		ai_heavy_cavalry_modifier = yes
		modifier = {
			factor = 0
			building_regimental_grounds_requirement_terrain = yes
			NOT = {
				has_building_or_higher = regimental_grounds_01
			}
		}
		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 = {
			add = -10
			has_building_or_higher = city_01
		}
	}
}

hillside_grazing_02 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_hillside_grazing_requirement_terrain = yes
		scope:holder.culture = {
			has_innovation = innovation_barracks
		}
	}

	can_construct_showing_failures_only = {
	}
	
	cost_gold = cheap_building_tier_2_cost
	
	levy = small_building_levy_tier_2
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_1
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_2
		stationed_heavy_cavalry_toughness_mult = low_maa_toughness_tier_1
		stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_2
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_1
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_2
		monthly_income = super_poor_building_tax_tier_2
	}
	
	next_building = hillside_grazing_03
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

hillside_grazing_03 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_hillside_grazing_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_3_cost
	
	levy = small_building_levy_tier_3
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_2
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_3
		stationed_heavy_cavalry_toughness_mult = low_maa_toughness_tier_2
		stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_3
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_2
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_3
		monthly_income = super_poor_building_tax_tier_3
		stationed_maa_screen_add = 4
	}
	
	next_building = hillside_grazing_04
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

hillside_grazing_04 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_hillside_grazing_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_4_cost
	
	levy = small_building_levy_tier_4
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_3
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_4
		stationed_heavy_cavalry_toughness_mult = low_maa_toughness_tier_3
		stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_4
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_3
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_4
		monthly_income = super_poor_building_tax_tier_4
		stationed_maa_screen_add = 6
	}
	
	next_building = hillside_grazing_05
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

hillside_grazing_05 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_hillside_grazing_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_5_cost
	
	levy = small_building_levy_tier_5
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_4
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_5
		stationed_heavy_cavalry_toughness_mult = low_maa_toughness_tier_4
		stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_5
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_4
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_5
		monthly_income = super_poor_building_tax_tier_5
		stationed_maa_screen_add = 8
	}
	
	next_building = hillside_grazing_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

hillside_grazing_06 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_hillside_grazing_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_6_cost
	
	levy = small_building_levy_tier_6
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_5
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_6
		stationed_heavy_cavalry_toughness_mult = low_maa_toughness_tier_5
		stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_6
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_5
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_6
		monthly_income = super_poor_building_tax_tier_6
		stationed_maa_screen_add = 12
	}
	
	next_building = hillside_grazing_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

hillside_grazing_07 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_hillside_grazing_requirement_terrain = yes
	}
	
	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 04 }
		scope:holder.culture = {
			has_innovation = innovation_royal_armory
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = cheap_building_tier_7_cost
	
	levy = small_building_levy_tier_7
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_6
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_7
		stationed_heavy_cavalry_toughness_mult = low_maa_toughness_tier_6
		stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_7
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_6
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_7
		monthly_income = super_poor_building_tax_tier_7
		stationed_maa_screen_add = 16
	}
	
	next_building = hillside_grazing_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

hillside_grazing_08 = {
	construction_time = quick_construction_time

	can_construct_potential = {
		building_hillside_grazing_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_8_cost
	
	levy = small_building_levy_tier_8
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_7
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_8
		stationed_heavy_cavalry_toughness_mult = low_maa_toughness_tier_7
		stationed_heavy_cavalry_damage_mult = normal_maa_damage_tier_8
		stationed_archer_cavalry_toughness_mult = low_maa_toughness_tier_7
		stationed_archer_cavalry_damage_mult = normal_maa_damage_tier_8
		monthly_income = super_poor_building_tax_tier_8
		stationed_maa_screen_add = 20
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}


### warrior_lodges

warrior_lodges_01 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_civil_cost_low_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_warrior_lodges_requirement_terrain = yes
	}

	can_construct_showing_failures_only = {
	}
	
	cost_gold = cheap_building_tier_1_cost
	
	levy = normal_building_levy_tier_1
	
	province_modifier = {
		stationed_skirmishers_damage_mult = normal_maa_damage_tier_1
		stationed_pikemen_damage_mult = normal_maa_damage_tier_1
		stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_1
		travel_danger = -1
	}
	
	next_building = warrior_lodges_02

	type_icon = "icon_building_warrior_lodges.dds"
	
	ai_value = {
		base = 11 # Little nudge
		ai_tier_1_building_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		ai_stacking_bonus_military_camps_modifier = yes
		ai_stacking_bonus_smiths_modifier = yes
		ai_stacking_bonus_wind_furnaces_modifier = yes
		ai_stacking_bonus_outposts_modifier = yes
		ai_skirmisher_modifier = yes
		ai_pikemen_modifier = yes
		ai_heavy_infantry_modifier = yes
		modifier = {
			factor = 0
			building_regimental_grounds_requirement_terrain = yes
			NOT = {
				has_building_or_higher = regimental_grounds_01
			}
		}
		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 = {
			add = -10
			has_building_or_higher = city_01
		}
		modifier = {
			add = -10
			scope:holder = {
				OR = {
					AND = {
						government_has_flag = government_is_theocracy
						highest_held_title_tier <= tier_barony
					}
					is_theocratic_lessee = yes
				}
			}
		}
	}
}

warrior_lodges_02 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_civil_cost_low_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_warrior_lodges_requirement_terrain = yes
		scope:holder.culture = {
			has_innovation = innovation_barracks
		}
	}

	can_construct_showing_failures_only = {
	}
	
	cost_gold = cheap_building_tier_2_cost
	
	levy = normal_building_levy_tier_2
	
	province_modifier = {
		stationed_skirmishers_toughness_mult = low_maa_toughness_tier_1
		stationed_skirmishers_damage_mult = normal_maa_damage_tier_2
		stationed_pikemen_toughness_mult = low_maa_toughness_tier_1
		stationed_pikemen_damage_mult = normal_maa_damage_tier_2
		stationed_heavy_infantry_toughness_mult = low_maa_toughness_tier_1
		stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_2
		travel_danger = -2
	}
	
	next_building = warrior_lodges_03
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

warrior_lodges_03 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_civil_cost_low_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_warrior_lodges_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_3_cost
	
	levy = normal_building_levy_tier_3
	
	province_modifier = {
		stationed_skirmishers_toughness_mult = low_maa_toughness_tier_2
		stationed_skirmishers_damage_mult = normal_maa_damage_tier_3
		stationed_pikemen_toughness_mult = low_maa_toughness_tier_2
		stationed_pikemen_damage_mult = normal_maa_damage_tier_3
		stationed_heavy_infantry_toughness_mult = low_maa_toughness_tier_2
		stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_3
		stationed_maa_pursuit_add = 4
		travel_danger = -3
	}
	
	next_building = warrior_lodges_04
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

warrior_lodges_04 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_civil_cost_low_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_warrior_lodges_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_4_cost
	
	levy = normal_building_levy_tier_4
	
	province_modifier = {
		stationed_skirmishers_toughness_mult = low_maa_toughness_tier_3
		stationed_skirmishers_damage_mult = normal_maa_damage_tier_4
		stationed_pikemen_toughness_mult = low_maa_toughness_tier_3
		stationed_pikemen_damage_mult = normal_maa_damage_tier_4
		stationed_heavy_infantry_toughness_mult = low_maa_toughness_tier_3
		stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_4
		stationed_maa_pursuit_add = 6
		travel_danger = -4
	}
	
	next_building = warrior_lodges_05
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

warrior_lodges_05 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_civil_cost_low_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_warrior_lodges_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_5_cost
	
	levy = normal_building_levy_tier_5
	
	province_modifier = {
		stationed_skirmishers_toughness_mult = low_maa_toughness_tier_4
		stationed_skirmishers_damage_mult = normal_maa_damage_tier_5
		stationed_pikemen_toughness_mult = low_maa_toughness_tier_4
		stationed_pikemen_damage_mult = normal_maa_damage_tier_5
		stationed_heavy_infantry_toughness_mult = low_maa_toughness_tier_4
		stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_5
		stationed_maa_pursuit_add = 8
		travel_danger = -5
	}
	
	next_building = warrior_lodges_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

warrior_lodges_06 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_civil_cost_low_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_warrior_lodges_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_6_cost
	
	levy = normal_building_levy_tier_6
	
	province_modifier = {
		stationed_skirmishers_toughness_mult = low_maa_toughness_tier_5
		stationed_skirmishers_damage_mult = normal_maa_damage_tier_6
		stationed_pikemen_toughness_mult = low_maa_toughness_tier_5
		stationed_pikemen_damage_mult = normal_maa_damage_tier_6
		stationed_heavy_infantry_toughness_mult = low_maa_toughness_tier_5
		stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_6
		stationed_maa_pursuit_add = 12
		travel_danger = -6
	}
	
	next_building = warrior_lodges_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

warrior_lodges_07 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_civil_cost_low_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_warrior_lodges_requirement_terrain = yes
	}
	
	can_construct = {
		building_requirement_castle_city_church = { LEVEL = 04 }
		scope:holder.culture = {
			has_innovation = innovation_royal_armory
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = cheap_building_tier_7_cost
	
	levy = normal_building_levy_tier_7
	
	province_modifier = {
		stationed_skirmishers_toughness_mult = low_maa_toughness_tier_6
		stationed_skirmishers_damage_mult = normal_maa_damage_tier_7
		stationed_pikemen_toughness_mult = low_maa_toughness_tier_6
		stationed_pikemen_damage_mult = normal_maa_damage_tier_7
		stationed_heavy_infantry_toughness_mult = low_maa_toughness_tier_6
		stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_7
		stationed_maa_pursuit_add = 16
		travel_danger = -7
	}
	
	next_building = warrior_lodges_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

warrior_lodges_08 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_civil_cost_low_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_warrior_lodges_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_8_cost
	
	levy = normal_building_levy_tier_8
	
	province_modifier = {
		stationed_skirmishers_toughness_mult = low_maa_toughness_tier_7
		stationed_skirmishers_damage_mult = normal_maa_damage_tier_8
		stationed_pikemen_toughness_mult = low_maa_toughness_tier_7
		stationed_pikemen_damage_mult = normal_maa_damage_tier_8
		stationed_heavy_infantry_toughness_mult = low_maa_toughness_tier_7
		stationed_heavy_infantry_damage_mult = normal_maa_damage_tier_8
		stationed_maa_pursuit_add = 20
		travel_danger = -8
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

### military_camps

military_camps_01 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_archery_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_military_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
	
	levy = normal_building_levy_tier_1
	
	province_modifier = {
		stationed_archers_damage_mult = high_maa_damage_tier_1
		stationed_skirmishers_damage_mult = high_maa_damage_tier_1
		stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_1
		travel_danger = -1
	}
	
	next_building = military_camps_02

	type_icon = "icon_building_military_camps.dds"
	
	ai_value = {
		base = 10
		ai_tier_1_building_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		ai_stacking_bonus_warrior_lodges_modifier = yes
		ai_stacking_bonus_outposts_modifier = yes
		ai_anti_synergy_armored_infantry_modifier = yes
		ai_anti_synergy_cavalry_modifier = yes
		ai_anti_synergy_light_infantry_modifier = yes
		ai_skirmisher_modifier = yes
		ai_archer_modifier = yes
		modifier = {
			add = non_stationed_maa_bonus
			has_stationed_regiment = yes
			NOR = {
				has_stationed_regiment_of_base_type = skirmishers
				has_stationed_regiment_of_base_type = archers
			}
		}
		modifier = {
			factor = 0
			building_regimental_grounds_requirement_terrain = yes
			NOT = {
				has_building_or_higher = regimental_grounds_01
			}
		}
		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 = 0
			building_horse_pastures_requirement_terrain = yes
			NOT = {
				has_building_or_higher = horse_pastures_01
			}
		}
		modifier = {
			factor = 0
			building_hillside_grazing_requirement_terrain = yes
			NOT = {
				has_building_or_higher = hillside_grazing_01
			}
		}
		modifier = {
			factor = 0
			building_warrior_lodges_requirement_terrain = yes
			NOT = {
				has_building_or_higher = warrior_lodges_01
			}
		}
		modifier = {
			add = -9
			has_building_or_higher = city_01
		}
		modifier = {
			add = -3
			OR = {
				exists = barony.lessee
				scope:holder = {
					highest_held_title_tier <= tier_barony
				}
			}
		}
		modifier = {
			add = -10
			scope:holder = {
				OR = {
					AND = {
						government_has_flag = government_is_theocracy
						highest_held_title_tier <= tier_barony
					}
					is_theocratic_lessee = yes
				}
			}
		}
	}
}

military_camps_02 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_archery_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_military_camps_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_military_camps
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_barracks
			}
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_military_camps
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_2_cost
	
	levy = normal_building_levy_tier_2
	
	province_modifier = {
		stationed_archers_damage_mult = high_maa_damage_tier_2
		stationed_skirmishers_damage_mult = high_maa_damage_tier_2
		stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_2
		travel_danger = -2
	}
	
	next_building = military_camps_03
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

military_camps_03 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_archery_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_military_camps_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_3_cost
	
	levy = normal_building_levy_tier_3
	
	province_modifier = {
		stationed_archers_damage_mult = high_maa_damage_tier_3
		stationed_skirmishers_damage_mult = high_maa_damage_tier_3
		stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_3
		stationed_skirmishers_screen_mult = normal_maa_screen_tier_1
		stationed_archers_toughness_mult = normal_maa_toughness_tier_1
		stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_1
		travel_danger = -3
	}
	
	next_building = military_camps_04
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

military_camps_04 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_archery_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_military_camps_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_4_cost
	
	levy = normal_building_levy_tier_4
	
	county_modifier = {
		supply_limit = 200
		monthly_county_control_growth_factor = 0.05
	}
	
	province_modifier = {
		stationed_archers_damage_mult = high_maa_damage_tier_4
		stationed_skirmishers_damage_mult = high_maa_damage_tier_4
		stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_4
		stationed_skirmishers_screen_mult = normal_maa_screen_tier_2
		stationed_archers_toughness_mult = normal_maa_toughness_tier_2
		stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_2
		travel_danger = -4
	}
	
	next_building = military_camps_05
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

military_camps_05 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_archery_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_military_camps_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_military_camps
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_military_camps
			}
			scope:holder.culture = {
				has_innovation = innovation_burhs
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_5_cost
	
	levy = normal_building_levy_tier_5
	
	character_modifier = {
		men_at_arms_maintenance = normal_building_maa_maintenance_tier_5
	}
	
	county_modifier = {
		supply_limit = 400
		monthly_county_control_growth_factor = 0.1
	}
	
	province_modifier = {
		stationed_archers_damage_mult = high_maa_damage_tier_5
		stationed_skirmishers_damage_mult = high_maa_damage_tier_5
		stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_5
		stationed_skirmishers_screen_mult = normal_maa_screen_tier_3
		stationed_archers_toughness_mult = normal_maa_toughness_tier_3
		stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_3
		travel_danger = -5
	}
	
	next_building = military_camps_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

military_camps_06 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_archery_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_military_camps_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_military_camps
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_royal_armory
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_military_camps
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_6_cost
	
	levy = normal_building_levy_tier_6
	
	character_modifier = {
		men_at_arms_maintenance = normal_building_maa_maintenance_tier_6
	}
	
	county_modifier = {
		supply_limit = 600
		monthly_county_control_growth_factor = 0.15
	}
	
	province_modifier = {
		stationed_archers_damage_mult = high_maa_damage_tier_6
		stationed_skirmishers_damage_mult = high_maa_damage_tier_6
		stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_6
		stationed_skirmishers_screen_mult = normal_maa_screen_tier_4
		stationed_archers_toughness_mult = normal_maa_toughness_tier_4
		stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_4
		travel_danger = -6
	}
	
	next_building = military_camps_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

military_camps_07 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_archery_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_military_camps_requirement_terrain = yes
	}
	
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_military_camps
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_royal_armory
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_military_camps
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = cheap_building_tier_7_cost
	
	levy = normal_building_levy_tier_7
	
	character_modifier = {
		men_at_arms_maintenance = normal_building_maa_maintenance_tier_7
	}
	
	county_modifier = {
		supply_limit = 800
		monthly_county_control_growth_factor = 0.20
	}
	
	province_modifier = {
		stationed_archers_damage_mult = high_maa_damage_tier_7
		stationed_skirmishers_damage_mult = high_maa_damage_tier_7
		stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_7
		stationed_skirmishers_screen_mult = normal_maa_screen_tier_5
		stationed_archers_toughness_mult = normal_maa_toughness_tier_5
		stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_5
		travel_danger = -7
	}
	
	next_building = military_camps_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

military_camps_08 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_archery_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_military_camps_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_military_camps
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_royal_armory
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_military_camps
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_8_cost
	
	levy = normal_building_levy_tier_8
	
	character_modifier = {
		men_at_arms_maintenance = normal_building_maa_maintenance_tier_8
	}
	
	county_modifier = {
		supply_limit = 1000
		monthly_county_control_growth_factor = 0.25
	}
	
	province_modifier = {
		stationed_archers_damage_mult = high_maa_damage_tier_8
		stationed_skirmishers_damage_mult = high_maa_damage_tier_8
		stationed_skirmishers_pursuit_mult = high_maa_pursuit_tier_8
		stationed_skirmishers_screen_mult = normal_maa_screen_tier_6
		stationed_archers_toughness_mult = normal_maa_toughness_tier_6
		stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_6
		travel_danger = -8
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

### regimental_grounds

regimental_grounds_01 = {
	construction_time = slow_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_wrestling_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_regimental_grounds_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_1_cost
	
	levy = excellent_building_levy_tier_1
	
	character_modifier = {
		men_at_arms_maintenance = good_building_maa_maintenance_tier_1
	}
	
	province_modifier = {
		stationed_maa_damage_mult = normal_maa_damage_tier_1
		stationed_maa_toughness_mult = normal_maa_toughness_tier_1
		travel_danger = -1
	}
	county_modifier = {
		levy_reinforcement_rate = high_levy_reinforcement_rate_tier_1
	}
	
	next_building = regimental_grounds_02

	type_icon = "icon_building_regimental_grounds.dds"
	
	ai_value = {
		base = 13 # One of the best buildings, a slight nudge
		ai_tier_1_building_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		modifier = {
			add = -99
			has_building_or_higher = city_01
		}
		modifier = {
			add = -10
			scope:holder = {
				OR = {
					AND = {
						government_has_flag = government_is_theocracy
						highest_held_title_tier <= tier_barony
					}
					is_theocratic_lessee = yes
				}
			}
		}
	}
}

regimental_grounds_02 = {
	construction_time = slow_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_wrestling_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_regimental_grounds_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		scope:holder.culture = {
			has_innovation = innovation_barracks
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_2_cost
	
	levy = excellent_building_levy_tier_2
	
	character_modifier = {
		men_at_arms_maintenance = good_building_maa_maintenance_tier_2
	}
	
	province_modifier = {
		stationed_maa_damage_mult = normal_maa_damage_tier_2
		stationed_maa_toughness_mult = normal_maa_toughness_tier_2
		travel_danger = -2
	}
	
	county_modifier = {
		levy_reinforcement_rate = high_levy_reinforcement_rate_tier_2
		monthly_county_control_growth_factor = 0.05
	}
	
	next_building = regimental_grounds_03
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

regimental_grounds_03 = {
	construction_time = slow_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_wrestling_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_regimental_grounds_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_3_cost
	
	levy = excellent_building_levy_tier_3
	
	character_modifier = {
		men_at_arms_maintenance = good_building_maa_maintenance_tier_3
	}
	
	province_modifier = {
		stationed_maa_damage_mult = normal_maa_damage_tier_3
		stationed_maa_toughness_mult = normal_maa_toughness_tier_3
		travel_danger = -3
	}
	
	county_modifier = {
		levy_reinforcement_rate = high_levy_reinforcement_rate_tier_3
		monthly_county_control_growth_factor = 0.05
	}
	
	next_building = regimental_grounds_04
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

regimental_grounds_04 = {
	construction_time = slow_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_wrestling_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_regimental_grounds_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_4_cost
	
	levy = excellent_building_levy_tier_4
	
	character_modifier = {
		men_at_arms_maintenance = good_building_maa_maintenance_tier_4
	}
	
	province_modifier = {
		stationed_maa_damage_mult = normal_maa_damage_tier_4
		stationed_maa_toughness_mult = normal_maa_toughness_tier_4
		travel_danger = -4
	}
	
	county_modifier = {
		levy_reinforcement_rate = high_levy_reinforcement_rate_tier_4
		monthly_county_control_growth_factor = 0.05
		levy_size = 0.02
	}
	
	next_building = regimental_grounds_05
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

regimental_grounds_05 = {
	construction_time = slow_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_wrestling_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_regimental_grounds_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_5_cost
	
	levy = excellent_building_levy_tier_5
	
	character_modifier = {
		men_at_arms_maintenance = good_building_maa_maintenance_tier_5
	}
	
	province_modifier = {
		stationed_maa_damage_mult = normal_maa_damage_tier_5
		stationed_maa_toughness_mult = normal_maa_toughness_tier_5
		supply_limit = 1000
		travel_danger = -5
	}
	
	county_modifier = {
		levy_reinforcement_rate = high_levy_reinforcement_rate_tier_5
		monthly_county_control_growth_factor = 0.05
		levy_size = 0.02
	}
	
	next_building = regimental_grounds_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

regimental_grounds_06 = {
	construction_time = slow_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_wrestling_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_regimental_grounds_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_6_cost
	
	levy = excellent_building_levy_tier_6
	
	character_modifier = {
		men_at_arms_maintenance = good_building_maa_maintenance_tier_6
	}
	
	province_modifier = {
		stationed_maa_damage_mult = normal_maa_damage_tier_6
		stationed_maa_toughness_mult = normal_maa_toughness_tier_6
		supply_limit = 1000
		travel_danger = -6
	}
	
	county_modifier = {
		levy_reinforcement_rate = high_levy_reinforcement_rate_tier_6
		monthly_county_control_growth_factor = 0.05
		levy_size = 0.02
	}
	
	next_building = regimental_grounds_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

regimental_grounds_07 = {
	construction_time = slow_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_wrestling_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_regimental_grounds_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_7_cost
	
	levy = excellent_building_levy_tier_7
	
	character_modifier = {
		men_at_arms_maintenance = good_building_maa_maintenance_tier_7
		knight_limit = 1
	}
	
	province_modifier = {
		stationed_maa_damage_mult = normal_maa_damage_tier_7
		stationed_maa_toughness_mult = normal_maa_toughness_tier_7
		supply_limit = 1000
		travel_danger = -7
	}
	
	county_modifier = {
		levy_reinforcement_rate = high_levy_reinforcement_rate_tier_7
		monthly_county_control_growth_factor = 0.05
		levy_size = 0.02
	}
	
	next_building = regimental_grounds_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

regimental_grounds_08 = {
	construction_time = slow_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_wrestling_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_regimental_grounds_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = expensive_building_tier_8_cost
	
	levy = excellent_building_levy_tier_8
	
	character_modifier = {
		men_at_arms_maintenance = good_building_maa_maintenance_tier_8
		knight_limit = 1
		army_maintenance_mult = -0.01
	}
	
	province_modifier = {
		stationed_maa_damage_mult = normal_maa_damage_tier_8
		stationed_maa_toughness_mult = normal_maa_toughness_tier_8
		supply_limit = 1000
		travel_danger = -8
	}
	
	county_modifier = {
		levy_reinforcement_rate = high_levy_reinforcement_rate_tier_8
		monthly_county_control_growth_factor = 0.05
		levy_size = 0.02
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

### outposts

outposts_01 = {
	construction_time = quick_construction_time
	effect_desc = outposts_desc

	can_construct_potential = {
		building_outposts_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
	
	levy = poor_building_levy_tier_1
	province_modifier = {
		monthly_income = super_poor_building_tax_tier_1
		defender_holding_advantage = normal_building_advantage_tier_1
		stationed_skirmishers_damage_mult = low_maa_damage_tier_1
		stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_1
		stationed_skirmishers_screen_mult = normal_maa_screen_tier_1
		stationed_archers_damage_mult = low_maa_damage_tier_1
		stationed_archers_toughness_mult = normal_maa_toughness_tier_1
		hostile_raid_time = 0.1
		travel_danger = -1
	}
	character_culture_modifier = {
		parameter = outposts_building_bonuses
		skirmishers_maintenance_mult = -0.01
		archers_maintenance_mult = -0.01
		skirmishers_recruitment_cost_mult = -0.01
		archers_recruitment_cost_mult = -0.01
	}
	province_culture_modifier = {
		parameter = outposts_building_bonuses
		monthly_income = super_poor_building_tax_tier_1
		levy_size = 0.01
	}
	
	next_building = outposts_02

	type_icon = "icon_building_outposts.dds"
	
	ai_value = {
		base = 10
		ai_tier_1_building_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		ai_skirmisher_modifier = yes
		ai_archer_modifier = yes
		ai_stacking_bonus_warrior_lodges_modifier = yes
		ai_stacking_bonus_military_camps_modifier = yes
		ai_anti_synergy_armored_infantry_modifier = yes
		ai_anti_synergy_cavalry_modifier = yes
		modifier = {
			factor = 0
			building_camel_farms_requirement_terrain = yes
			NOT = {
				has_building_or_higher = camel_farms_01
			}
		}
		modifier = {
			factor = 0
			building_horse_pastures_requirement_terrain = yes
			NOT = {
				has_building_or_higher = horse_pastures_01
			}
		}
		modifier = {
			factor = 0
			building_hillside_grazing_requirement_terrain = yes
			NOT = {
				has_building_or_higher = hillside_grazing_01
			}
		}
		modifier = {
			factor = 0
			building_warrior_lodges_requirement_terrain = yes
			NOT = {
				has_building_or_higher = warrior_lodges_01
			}
		}
		modifier = { # It now has a small economic component; build it last
			add = -3
			has_building_or_higher = city_01
		}
		modifier = {
			add = -10
			scope:holder = {
				OR = {
					AND = {
						government_has_flag = government_is_theocracy
						highest_held_title_tier <= tier_barony
					}
					is_theocratic_lessee = yes
				}
			}
		}
	}
}

outposts_02 = {
	construction_time = quick_construction_time
	effect_desc = outposts_desc

	can_construct_potential = {
		building_outposts_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		scope:holder.culture = {
			has_innovation = innovation_barracks
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_2_cost
	
	levy = poor_building_levy_tier_2
	province_modifier = {
		monthly_income = super_poor_building_tax_tier_2
		defender_holding_advantage = normal_building_advantage_tier_2
		stationed_skirmishers_damage_mult = low_maa_damage_tier_2
		stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_2
		stationed_skirmishers_screen_mult = normal_maa_screen_tier_2
		stationed_archers_damage_mult = low_maa_damage_tier_2
		stationed_archers_toughness_mult = normal_maa_toughness_tier_2
		hostile_raid_time = 0.2
		travel_danger = -2
	}
	county_modifier = {
		monthly_county_control_growth_add = 0.1
	}
	character_culture_modifier = {
		parameter = outposts_building_bonuses
		skirmishers_maintenance_mult = -0.02
		archers_maintenance_mult = -0.02
		skirmishers_recruitment_cost_mult = -0.02
		archers_recruitment_cost_mult = -0.02
	}
	province_culture_modifier = {
		parameter = outposts_building_bonuses
		monthly_income = super_poor_building_tax_tier_2
		levy_size = 0.02
	}
	
	next_building = outposts_03
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

outposts_03 = {
	construction_time = quick_construction_time
	effect_desc = outposts_desc

	can_construct_potential = {
		building_outposts_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_3_cost
	
	levy = poor_building_levy_tier_3
	province_modifier = {
		monthly_income = super_poor_building_tax_tier_3
		defender_holding_advantage = normal_building_advantage_tier_3
		stationed_skirmishers_damage_mult = low_maa_damage_tier_3
		stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_3
		stationed_skirmishers_screen_mult = normal_maa_screen_tier_3
		stationed_archers_damage_mult = low_maa_damage_tier_3
		stationed_archers_toughness_mult = normal_maa_toughness_tier_3
		hostile_raid_time = 0.3
		travel_danger = -3
	}
	county_modifier = {
		monthly_county_control_growth_add = 0.1
	}
	character_culture_modifier = {
		parameter = outposts_building_bonuses
		skirmishers_maintenance_mult = -0.03
		archers_maintenance_mult = -0.03
		skirmishers_recruitment_cost_mult = -0.03
		archers_recruitment_cost_mult = -0.03
	}
	province_culture_modifier = {
		parameter = outposts_building_bonuses
		monthly_income = super_poor_building_tax_tier_3
		levy_size = 0.03
	}
	
	next_building = outposts_04
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

outposts_04 = {
	construction_time = quick_construction_time
	effect_desc = outposts_desc

	can_construct_potential = {
		building_outposts_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_4_cost
	
	levy = poor_building_levy_tier_4
	province_modifier = {
		monthly_income = super_poor_building_tax_tier_4
		defender_holding_advantage = normal_building_advantage_tier_4
		stationed_skirmishers_damage_mult = low_maa_damage_tier_4
		stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_4
		stationed_skirmishers_screen_mult = normal_maa_screen_tier_4
		stationed_archers_damage_mult = low_maa_damage_tier_4
		stationed_archers_toughness_mult = normal_maa_toughness_tier_4
		hostile_raid_time = 0.4
		travel_danger = -4
	}
	county_modifier = {
		monthly_county_control_growth_add = 0.1
	}
	character_culture_modifier = {
		parameter = outposts_building_bonuses
		skirmishers_maintenance_mult = -0.04
		archers_maintenance_mult = -0.04
		skirmishers_recruitment_cost_mult = -0.04
		archers_recruitment_cost_mult = -0.04
	}
	province_culture_modifier = {
		parameter = outposts_building_bonuses
		monthly_income = super_poor_building_tax_tier_4
		levy_size = 0.04
	}
	
	next_building = outposts_05
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

outposts_05 = {
	construction_time = quick_construction_time
	effect_desc = outposts_desc

	can_construct_potential = {
		building_outposts_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_5_cost
	
	levy = poor_building_levy_tier_5
	province_modifier = {
		monthly_income = super_poor_building_tax_tier_5
		defender_holding_advantage = normal_building_advantage_tier_5
		stationed_skirmishers_damage_mult = low_maa_damage_tier_5
		stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_5
		stationed_skirmishers_screen_mult = normal_maa_screen_tier_5
		stationed_archers_damage_mult = low_maa_damage_tier_5
		stationed_archers_toughness_mult = normal_maa_toughness_tier_5
		hostile_raid_time = 0.5
		travel_danger = -5
	}
	county_modifier = {
		monthly_county_control_growth_add = 0.1
		garrison_size = 0.05
	}
	character_culture_modifier = {
		parameter = outposts_building_bonuses
		skirmishers_maintenance_mult = -0.05
		archers_maintenance_mult = -0.05
		skirmishers_recruitment_cost_mult = -0.05
		archers_recruitment_cost_mult = -0.05
	}
	province_culture_modifier = {
		parameter = outposts_building_bonuses
		monthly_income = super_poor_building_tax_tier_5
		levy_size = 0.05
	}
	
	next_building = outposts_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

outposts_06 = {
	construction_time = quick_construction_time
	effect_desc = outposts_desc

	can_construct_potential = {
		building_outposts_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_6_cost
	
	levy = poor_building_levy_tier_6
	province_modifier = {
		monthly_income = super_poor_building_tax_tier_6
		defender_holding_advantage = normal_building_advantage_tier_6
		stationed_skirmishers_damage_mult = low_maa_damage_tier_6
		stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_6
		stationed_skirmishers_screen_mult = normal_maa_screen_tier_6
		stationed_archers_damage_mult = low_maa_damage_tier_6
		stationed_archers_toughness_mult = normal_maa_toughness_tier_6
		hostile_raid_time = 0.6
		travel_danger = -6
	}
	county_modifier = {
		monthly_county_control_growth_add = 0.1
		garrison_size = 0.05
	}
	character_culture_modifier = {
		parameter = outposts_building_bonuses
		skirmishers_maintenance_mult = -0.06
		archers_maintenance_mult = -0.06
		skirmishers_recruitment_cost_mult = -0.06
		archers_recruitment_cost_mult = -0.06
	}
	province_culture_modifier = {
		parameter = outposts_building_bonuses
		monthly_income = super_poor_building_tax_tier_6
		levy_size = 0.06
	}
	
	next_building = outposts_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

outposts_07 = {
	construction_time = quick_construction_time
	effect_desc = outposts_desc

	can_construct_potential = {
		building_outposts_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_7_cost
	
	levy = poor_building_levy_tier_7
	province_modifier = {
		monthly_income = super_poor_building_tax_tier_7
		defender_holding_advantage = normal_building_advantage_tier_7
		stationed_skirmishers_damage_mult = low_maa_damage_tier_7
		stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_7
		stationed_skirmishers_screen_mult = normal_maa_screen_tier_7
		stationed_archers_damage_mult = low_maa_damage_tier_7
		stationed_archers_toughness_mult = normal_maa_toughness_tier_7
		hostile_raid_time = 0.7
		travel_danger = -7
	}
	county_modifier = {
		monthly_county_control_growth_add = 0.1
		garrison_size = 0.05
	}
	character_culture_modifier = {
		parameter = outposts_building_bonuses
		skirmishers_maintenance_mult = -0.07
		archers_maintenance_mult = -0.07
		skirmishers_recruitment_cost_mult = -0.07
		archers_recruitment_cost_mult = -0.07
	}
	province_culture_modifier = {
		parameter = outposts_building_bonuses
		monthly_income = super_poor_building_tax_tier_7
		levy_size = 0.07
	}
	
	next_building = outposts_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

outposts_08 = {
	construction_time = quick_construction_time
	effect_desc = outposts_desc

	can_construct_potential = {
		building_outposts_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = cheap_building_tier_8_cost
	
	levy = poor_building_levy_tier_8
	province_modifier = {
		monthly_income = super_poor_building_tax_tier_8
		defender_holding_advantage = normal_building_advantage_tier_8
		stationed_skirmishers_damage_mult = low_maa_damage_tier_8
		stationed_skirmishers_toughness_mult = normal_maa_toughness_tier_8
		stationed_skirmishers_screen_mult = normal_maa_screen_tier_8
		stationed_archers_damage_mult = low_maa_damage_tier_8
		stationed_archers_toughness_mult = normal_maa_toughness_tier_8
		hostile_raid_time = 0.8
		travel_danger = -8
	}
	county_modifier = {
		monthly_county_control_growth_factor = 0.15
		monthly_county_control_growth_add = 0.1
		garrison_size = 0.05
	}
	character_culture_modifier = {
		parameter = outposts_building_bonuses
		skirmishers_maintenance_mult = -0.08
		archers_maintenance_mult = -0.08
		skirmishers_recruitment_cost_mult = -0.08
		archers_recruitment_cost_mult = -0.08
	}
	province_culture_modifier = {
		parameter = outposts_building_bonuses
		monthly_income = super_poor_building_tax_tier_8
		levy_size = 0.08
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

### barracks

barracks_01 = {
	construction_time = standard_construction_time
	effect_desc = tournament_cost_effect_desc

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
		#higher innovation req?
	}
	
	cost_gold = normal_building_tier_1_cost
	
	levy = normal_building_levy_tier_1
	
	province_modifier = {
		stationed_heavy_infantry_damage_mult = high_maa_damage_tier_1
		stationed_pikemen_damage_mult = high_maa_damage_tier_1
		travel_danger = -1
	}
	character_culture_modifier = {
		parameter = building_barracks_piety_bonuses
		monthly_piety = 0.1
	}

	province_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus
		stationed_heavy_infantry_damage_mult = -0.20
		stationed_pikemen_damage_mult = -0.20
		stationed_maa_damage_mult = low_maa_damage_tier_1
	}
	
	next_building = barracks_02
	
	type_icon = "icon_building_barracks.dds"
	
	ai_value = {
		base = 10
		ai_tier_1_building_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		ai_anti_synergy_cavalry_modifier = yes
		ai_anti_synergy_light_infantry_modifier = yes
		ai_heavy_infantry_modifier = yes
		ai_pikemen_modifier = yes
		modifier = {
			add = non_stationed_maa_bonus
			has_stationed_regiment = yes
			NOR = {
				has_stationed_regiment_of_base_type = pikemen
				has_stationed_regiment_of_base_type = heavy_infantry
			}
		}
		modifier = {
			add = -9
			has_building_or_higher = city_01
		}
		modifier = {
			add = -10
			scope:holder = {
				has_government = theocracy_government
				highest_held_title_tier <= tier_barony
			}
		}
	}
}

barracks_02 = {
	construction_time = standard_construction_time
	effect_desc = tournament_cost_effect_desc

	can_construct_potential = {
		building_barracks_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_barracks
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_barracks
			}
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_barracks
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_2_cost
	
	levy = normal_building_levy_tier_2
	
	province_modifier = {
		stationed_heavy_infantry_damage_mult = high_maa_damage_tier_2
		stationed_pikemen_damage_mult = high_maa_damage_tier_2
		travel_danger = -2
	}
	character_culture_modifier = {
		parameter = building_barracks_piety_bonuses
		monthly_piety = 0.2
	}

	character_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus 
		men_at_arms_limit = 1
	}

	province_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus
		stationed_heavy_infantry_damage_mult = -0.30
		stationed_pikemen_damage_mult = -0.30
		stationed_maa_damage_mult = low_maa_damage_tier_2
	}
	
	next_building = barracks_03
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

barracks_03 = {
	construction_time = standard_construction_time
	effect_desc = tournament_cost_effect_desc

	can_construct_potential = {
		building_barracks_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_barracks
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_burhs
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_barracks
			}
			building_requirement_castle_city_church = { LEVEL = 01 }
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_3_cost
	
	levy = normal_building_levy_tier_3
	
	province_modifier = {
		stationed_heavy_infantry_damage_mult = high_maa_damage_tier_3
		stationed_pikemen_damage_mult = high_maa_damage_tier_3
		stationed_heavy_infantry_toughness_mult = high_maa_toughness_tier_1
		stationed_pikemen_toughness_mult = high_maa_toughness_tier_1
		travel_danger = -3
	}
	character_culture_modifier = {
		parameter = building_barracks_piety_bonuses
		monthly_piety = 0.3
	}

	character_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus 
		men_at_arms_limit = 1
	}

	province_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus
		stationed_heavy_infantry_damage_mult = -0.40
		stationed_pikemen_damage_mult = -0.40
		stationed_heavy_infantry_toughness_mult = -0.20
		stationed_pikemen_toughness_mult = -0.20
		stationed_maa_damage_mult = low_maa_damage_tier_3
	}
	
	next_building = barracks_04
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

barracks_04 = {
	construction_time = standard_construction_time
	effect_desc = tournament_cost_effect_desc

	can_construct_potential = {
		building_barracks_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_4_cost
	
	levy = normal_building_levy_tier_4
	
	county_modifier = {
		levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_1
	}
	province_modifier = {
		stationed_heavy_infantry_damage_mult = high_maa_damage_tier_4
		stationed_pikemen_damage_mult = high_maa_damage_tier_4
		stationed_heavy_infantry_toughness_mult = high_maa_toughness_tier_2
		stationed_pikemen_toughness_mult = high_maa_toughness_tier_2
		travel_danger = -4
	}
	character_culture_modifier = {
		parameter = building_barracks_piety_bonuses
		monthly_piety = 0.4
	}

	character_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus 
		men_at_arms_limit = 2
	}

	province_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus
		stationed_heavy_infantry_damage_mult = -0.50
		stationed_pikemen_damage_mult = -0.50
		stationed_heavy_infantry_toughness_mult = -0.30
		stationed_pikemen_toughness_mult = -0.30
		stationed_maa_damage_mult = low_maa_damage_tier_4
	}
	
	next_building = barracks_05
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

barracks_05 = {
	construction_time = standard_construction_time
	effect_desc = tournament_cost_effect_desc

	can_construct_potential = {
		building_barracks_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_barracks
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_barracks
			}
			scope:holder.culture = {
				has_innovation = innovation_burhs
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_5_cost
	
	levy = normal_building_levy_tier_5
	
	county_modifier = {
		levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_2
		levy_size = 0.01
		garrison_size = 0.01
	}
	province_modifier = {
		stationed_heavy_infantry_damage_mult = high_maa_damage_tier_5
		stationed_pikemen_damage_mult = high_maa_damage_tier_5
		stationed_heavy_infantry_toughness_mult = high_maa_toughness_tier_3
		stationed_pikemen_toughness_mult = high_maa_toughness_tier_3
		travel_danger = -5
	}
	character_culture_modifier = {
		parameter = building_barracks_piety_bonuses
		monthly_piety = 0.5
	}

	character_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus 
		men_at_arms_limit = 2
	}

	province_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus
		stationed_heavy_infantry_damage_mult = -0.60
		stationed_pikemen_damage_mult = -0.60
		stationed_heavy_infantry_toughness_mult = -0.40
		stationed_pikemen_toughness_mult = -0.40
		stationed_maa_damage_mult = low_maa_damage_tier_5
	}
	
	next_building = barracks_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

barracks_06 = {
	construction_time = standard_construction_time
	effect_desc = tournament_cost_effect_desc

	can_construct_potential = {
		building_barracks_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_barracks
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_royal_armory
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_barracks
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_6_cost
	
	levy = normal_building_levy_tier_6
	
	county_modifier = {
		levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_3
		levy_size = 0.02
		garrison_size = 0.02
	}
	province_modifier = {
		stationed_heavy_infantry_damage_mult = high_maa_damage_tier_6
		stationed_pikemen_damage_mult = high_maa_damage_tier_6
		stationed_heavy_infantry_toughness_mult = high_maa_toughness_tier_4
		stationed_pikemen_toughness_mult = high_maa_toughness_tier_4
		travel_danger = -6
	}
	character_culture_modifier = {
		parameter = building_barracks_piety_bonuses
		monthly_piety = 0.6
	}

	character_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus 
		men_at_arms_limit = 3
	}

	province_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus
		stationed_heavy_infantry_damage_mult = -0.70
		stationed_pikemen_damage_mult = -0.70
		stationed_heavy_infantry_toughness_mult = -0.50
		stationed_pikemen_toughness_mult = -0.50
		stationed_maa_damage_mult = low_maa_damage_tier_6
	}
	
	next_building = barracks_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

barracks_07 = {
	construction_time = standard_construction_time
	effect_desc = tournament_cost_effect_desc

	can_construct_potential = {
		building_barracks_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_barracks
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_royal_armory
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_barracks
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_7_cost
	
	levy = normal_building_levy_tier_7
	
	county_modifier = {
		levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_4
		levy_size = 0.03
		garrison_size = 0.03
	}
	province_modifier = {
		stationed_heavy_infantry_damage_mult = high_maa_damage_tier_7
		stationed_pikemen_damage_mult = high_maa_damage_tier_7
		stationed_heavy_infantry_toughness_mult = high_maa_toughness_tier_5
		stationed_pikemen_toughness_mult = high_maa_toughness_tier_5
		travel_danger = -7
	}
	character_culture_modifier = {
		parameter = building_barracks_piety_bonuses
		monthly_piety = 0.7
	}

	character_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus 
		men_at_arms_limit = 3
	}

	province_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus
		stationed_heavy_infantry_damage_mult = -0.80
		stationed_pikemen_damage_mult = -0.80
		stationed_heavy_infantry_toughness_mult = -0.60
		stationed_pikemen_toughness_mult = -0.60
		stationed_maa_damage_mult = low_maa_damage_tier_7
	}
	
	next_building = barracks_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

barracks_08 = {
	construction_time = standard_construction_time
	effect_desc = tournament_cost_effect_desc

	can_construct_potential = {
		building_barracks_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_barracks
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_royal_armory
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_barracks
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_8_cost
	
	levy = normal_building_levy_tier_8
	
	county_modifier = {
		levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_5
		levy_size = 0.04
		garrison_size = 0.04
	}
	province_modifier = {
		stationed_heavy_infantry_damage_mult = high_maa_damage_tier_8
		stationed_pikemen_damage_mult = high_maa_damage_tier_8
		stationed_heavy_infantry_toughness_mult = high_maa_toughness_tier_6
		stationed_pikemen_toughness_mult = high_maa_toughness_tier_6
		travel_danger = -8
	}
	character_culture_modifier = {
		parameter = building_barracks_piety_bonuses
		monthly_piety = 0.8
	}

	character_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus 
		men_at_arms_limit = 4
	}

	province_culture_modifier = {
		parameter = strength_in_numbers_maa_limit_bonus
		stationed_heavy_infantry_damage_mult = -0.90
		stationed_pikemen_damage_mult = -0.90
		stationed_heavy_infantry_toughness_mult = -0.70
		stationed_pikemen_toughness_mult = -0.70
		stationed_maa_damage_mult = low_maa_damage_tier_7
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

### camel_farms

camel_farms_01 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_camel_farms_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
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_1
	}
	
	province_modifier = {
		stationed_camel_cavalry_damage_mult = high_maa_damage_tier_1
		stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_1
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_1
		stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_1
		monthly_income = super_poor_building_tax_tier_1
	}
	
	next_building = camel_farms_02
	
	type_icon = "icon_building_camel_farms.dds"
	
	ai_value = {
		base = 10
		ai_tier_1_building_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		ai_stacking_bonus_stables_modifier = yes
		ai_stacking_bonus_horse_pastures_modifier = yes
		ai_stacking_bonus_hillside_grazing_modifier = yes
		modifier = {
			factor = 0
			building_regimental_grounds_requirement_terrain = yes
			NOT = {
				has_building_or_higher = regimental_grounds_01
			}
		}
		modifier = { # It now has a small economic component; build it last
			add = -3
			has_building_or_higher = city_01
		}
		modifier = {
			add = -10
			scope:holder = {
				OR = {
					AND = {
						government_has_flag = government_is_theocracy
						highest_held_title_tier <= tier_barony
					}
					is_theocratic_lessee = yes
				}
			}
		}
	}
}

camel_farms_02 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_camel_farms_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		scope:holder.culture = {
			has_innovation = innovation_barracks
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_2_cost
	
	levy = small_building_levy_tier_2
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_2
	}
	
	province_modifier = {
		stationed_camel_cavalry_damage_mult = high_maa_damage_tier_2
		stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_2
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_2
		stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_2
		monthly_income = super_poor_building_tax_tier_2
	}
	
	county_modifier = {
		supply_limit = 200
	}
	
	next_building = camel_farms_03
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

camel_farms_03 = {
	construction_time = standard_construction_time

	can_construct_potential = {
		building_camel_farms_requirement_terrain = yes
	}

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

	cost_gold = normal_building_tier_3_cost
	
	levy = small_building_levy_tier_3
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_3
	}
	
	province_modifier = {
		stationed_camel_cavalry_damage_mult = high_maa_damage_tier_3
		stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_3
		stationed_camel_cavalry_toughness_mult = high_maa_toughness_tier_1
		stationed_camel_cavalry_screen_mult = normal_maa_screen_tier_1
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_3
		stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_3
		stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_1
		stationed_light_cavalry_screen_mult = low_maa_screen_tier_1
		monthly_income = super_poor_building_tax_tier_3
	}
	
	county_modifier = {
		supply_limit = 200
	}
	
	next_building = camel_farms_04
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

camel_farms_04 = {
	construction_time = standard_construction_time
	effect_desc = camel_farms_effect_desc

	can_construct_potential = {
		building_camel_farms_requirement_terrain = yes
	}

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

	cost_gold = normal_building_tier_4_cost
	
	levy = small_building_levy_tier_4
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_4
	}
	
	province_modifier = {
		stationed_camel_cavalry_damage_mult = high_maa_damage_tier_4
		stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_4
		stationed_camel_cavalry_toughness_mult = high_maa_toughness_tier_2
		stationed_camel_cavalry_screen_mult = normal_maa_screen_tier_2
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_4
		stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_4
		stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_2
		stationed_light_cavalry_screen_mult = low_maa_screen_tier_2
		monthly_income = super_poor_building_tax_tier_4
	}
	
	county_modifier = {
		supply_limit = 200
	}
	
	next_building = camel_farms_05
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

camel_farms_05 = {
	construction_time = standard_construction_time
	effect_desc = camel_farms_effect_desc

	can_construct_potential = {
		building_camel_farms_requirement_terrain = yes
	}

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

	cost_gold = normal_building_tier_5_cost
	
	levy = small_building_levy_tier_5
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_5
	}
	
	province_modifier = {
		stationed_camel_cavalry_damage_mult = high_maa_damage_tier_5
		stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_5
		stationed_camel_cavalry_toughness_mult = high_maa_toughness_tier_3
		stationed_camel_cavalry_screen_mult = normal_maa_screen_tier_3
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_5
		stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_5
		stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_3
		stationed_light_cavalry_screen_mult = low_maa_screen_tier_3
		monthly_income = super_poor_building_tax_tier_5
	}
	
	county_modifier = {
		supply_limit = 200
	}
	
	next_building = camel_farms_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

camel_farms_06 = {
	construction_time = standard_construction_time
	effect_desc = camel_farms_effect_desc

	can_construct_potential = {
		building_camel_farms_requirement_terrain = yes
	}

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

	cost_gold = normal_building_tier_6_cost
	
	levy = small_building_levy_tier_6
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_6
	}
	
	province_modifier = {
		stationed_camel_cavalry_damage_mult = high_maa_damage_tier_6
		stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_6
		stationed_camel_cavalry_toughness_mult = high_maa_toughness_tier_4
		stationed_camel_cavalry_screen_mult = normal_maa_screen_tier_4
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_6
		stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_6
		stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_4
		stationed_light_cavalry_screen_mult = low_maa_screen_tier_4
		monthly_income = super_poor_building_tax_tier_6
		hostile_raid_time = 0.2
	}
	
	county_modifier = {
		supply_limit = 200
	}
	
	next_building = camel_farms_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

camel_farms_07 = {
	construction_time = standard_construction_time
	effect_desc = camel_farms_effect_desc

	can_construct_potential = {
		building_camel_farms_requirement_terrain = yes
	}

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

	cost_gold = normal_building_tier_7_cost
	
	levy = small_building_levy_tier_7
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_7
	}
	
	province_modifier = {
		stationed_camel_cavalry_damage_mult = high_maa_damage_tier_7
		stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_7
		stationed_camel_cavalry_toughness_mult = high_maa_toughness_tier_5
		stationed_camel_cavalry_screen_mult = normal_maa_screen_tier_5
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_7
		stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_7
		stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_5
		stationed_light_cavalry_screen_mult = low_maa_screen_tier_5
		monthly_income = super_poor_building_tax_tier_7
		hostile_raid_time = 0.2
	}
	
	county_modifier = {
		supply_limit = 200
	}
	
	next_building = camel_farms_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

camel_farms_08 = {
	construction_time = standard_construction_time
	effect_desc = camel_farms_effect_desc

	can_construct_potential = {
		building_camel_farms_requirement_terrain = yes
	}

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

	cost_gold = normal_building_tier_8_cost
	
	levy = small_building_levy_tier_8
	character_modifier = {
		knight_effectiveness_mult = high_knight_effectiveness_mult_tier_8
	}
	
	province_modifier = {
		stationed_camel_cavalry_damage_mult = high_maa_damage_tier_8
		stationed_camel_cavalry_pursuit_mult = normal_maa_pursuit_tier_8
		stationed_camel_cavalry_toughness_mult = high_maa_toughness_tier_6
		stationed_camel_cavalry_screen_mult = normal_maa_screen_tier_6
		stationed_light_cavalry_damage_mult = normal_maa_damage_tier_8
		stationed_light_cavalry_pursuit_mult = low_maa_pursuit_tier_8
		stationed_light_cavalry_toughness_mult = low_maa_toughness_tier_6
		stationed_light_cavalry_screen_mult = low_maa_screen_tier_6
		monthly_income = super_poor_building_tax_tier_8
		hostile_raid_time = 0.2
	}

	county_modifier = {
		supply_limit = 200
	}

	type_icon = "icon_building_camel_farms.dds"
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}


### stables

stables_01 = {
	construction_time = quick_construction_time
	effect_desc = stables_effect_desc

	can_construct_potential = {
		building_stables_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 = normal_building_levy_tier_1
	
	character_modifier = {
		movement_speed = normal_movement_speed_tier_1
		character_travel_speed_mult = normal_movement_speed_tier_1
	}
	
	province_modifier = {
		stationed_light_cavalry_damage_mult = high_maa_damage_tier_1
		stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_1
		stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_1
	}
	
	next_building = stables_02

	type_icon = "icon_building_stables.dds"
	
	ai_value = {
		base = 10
		ai_tier_1_building_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		ai_stacking_bonus_camel_farms_modifier = yes
		ai_stacking_bonus_horse_pastures_modifier = yes
		ai_stacking_bonus_hillside_grazing_modifier = yes
		ai_anti_synergy_armored_infantry_modifier = yes
		ai_anti_synergy_light_infantry_modifier = yes
		ai_light_cavalry_modifier = yes
		ai_heavy_cavalry_modifier = yes
		ai_compensate_light_cavalry_modifier = yes # Specifically for buildings that boosts HC and LC
		ai_compensate_heavy_cavalry_modifier = yes # Specifically for buildings that boosts HC and LC
		modifier = {
			add = non_stationed_maa_bonus
			has_stationed_regiment = yes
			NOR = {
				has_stationed_regiment_of_base_type = light_cavalry
				has_stationed_regiment_of_base_type = heavy_cavalry
			}
		}
		modifier = {
			factor = 0
			building_regimental_grounds_requirement_terrain = yes
			NOT = {
				has_building_or_higher = regimental_grounds_01
			}
		}
		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 = 0
			building_hillside_grazing_requirement_terrain = yes
			NOT = {
				has_building_or_higher = hillside_grazing_01
			}
		}
		modifier = {
			factor = 0
			building_warrior_lodges_requirement_terrain = yes
			NOT = {
				has_building_or_higher = warrior_lodges_01
			}
		}
		modifier = {
			add = -9
			has_building_or_higher = city_01
		}
		modifier = {
			add = -3
			OR = {
				exists = barony.lessee
				scope:holder = {
					highest_held_title_tier <= tier_barony
				}
			}
		}
		modifier = {
			add = -10
			scope:holder = {
				OR = {
					AND = {
						government_has_flag = government_is_theocracy
						highest_held_title_tier <= tier_barony
					}
					is_theocratic_lessee = yes
				}
			}
		}
	}
}

stables_02 = {
	construction_time = quick_construction_time
	effect_desc = stables_effect_desc

	can_construct_potential = {
		building_stables_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_stables
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_barracks
			}
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_stables
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_2_cost
	
	levy = normal_building_levy_tier_2
	
	character_modifier = {
		movement_speed = normal_movement_speed_tier_2
		character_travel_speed_mult = normal_movement_speed_tier_2
	}
	
	province_modifier = {
		stationed_light_cavalry_damage_mult = high_maa_damage_tier_2
		stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_2	
		stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_2
	}
	
	next_building = stables_03
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

stables_03 = {
	construction_time = quick_construction_time
	effect_desc = stables_effect_desc
	
	can_construct_potential = {
		building_stables_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_3_cost
	
	levy = normal_building_levy_tier_3
	
	character_modifier = {
		movement_speed = normal_movement_speed_tier_3
		character_travel_speed_mult = normal_movement_speed_tier_3
	}
	
	province_modifier = {
		stationed_light_cavalry_damage_mult = high_maa_damage_tier_3
		stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_3	
		stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_3
		stationed_light_cavalry_toughness_mult = high_maa_toughness_tier_1
		stationed_heavy_cavalry_toughness_mult = high_maa_toughness_tier_1
	}
	
	next_building = stables_04
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

stables_04 = {
	construction_time = quick_construction_time
	effect_desc = stables_effect_desc

	can_construct_potential = {
		building_stables_requirement_terrain = yes
	}

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

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_4_cost
	
	levy = normal_building_levy_tier_4
	
	character_modifier = {
		movement_speed = normal_movement_speed_tier_4
		character_travel_speed_mult = normal_movement_speed_tier_4
	}
	
	province_modifier = {
		stationed_light_cavalry_damage_mult = high_maa_damage_tier_4
		stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_4	
		stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_4
		stationed_light_cavalry_toughness_mult = high_maa_toughness_tier_2
		stationed_heavy_cavalry_toughness_mult = high_maa_toughness_tier_2
	}
	
	next_building = stables_05
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

stables_05 = {
	construction_time = quick_construction_time
	effect_desc = stables_effect_desc

	can_construct_potential = {
		building_stables_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_stables
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_stables
			}
			scope:holder.culture = {
				has_innovation = innovation_burhs
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_5_cost
	
	levy = normal_building_levy_tier_5
	
	character_modifier = {
		movement_speed = normal_movement_speed_tier_5
		character_travel_speed_mult = normal_movement_speed_tier_5
	}
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = high_maa_toughness_tier_3
		stationed_light_cavalry_damage_mult = high_maa_damage_tier_5
		stationed_light_cavalry_screen_mult = normal_maa_screen_tier_1
		stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_5
		stationed_heavy_cavalry_toughness_mult = high_maa_toughness_tier_3
		stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_5
		stationed_heavy_cavalry_screen_mult = normal_maa_screen_tier_1
		stationed_heavy_cavalry_pursuit_mult = normal_maa_pursuit_tier_1
	}
	
	next_building = stables_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

stables_06 = {
	construction_time = quick_construction_time
	effect_desc = stables_effect_desc

	can_construct_potential = {
		building_stables_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_stables
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_royal_armory
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_stables
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_6_cost
	
	levy = normal_building_levy_tier_6
	
	character_modifier = {
		movement_speed = normal_movement_speed_tier_6
		character_travel_speed_mult = normal_movement_speed_tier_6
	}
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = high_maa_toughness_tier_4
		stationed_light_cavalry_damage_mult = high_maa_damage_tier_6
		stationed_light_cavalry_screen_mult = normal_maa_screen_tier_2
		stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_6
		stationed_heavy_cavalry_toughness_mult = high_maa_toughness_tier_4
		stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_6
		stationed_heavy_cavalry_screen_mult = normal_maa_screen_tier_2
		stationed_heavy_cavalry_pursuit_mult = normal_maa_pursuit_tier_2
	}
	
	next_building = stables_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

stables_07 = {
	construction_time = quick_construction_time
	effect_desc = stables_effect_desc

	can_construct_potential = {
		building_stables_requirement_terrain = yes
	}
	
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_stables
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_royal_armory
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_stables
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
	}
	
	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}

	cost_gold = normal_building_tier_7_cost
	
	levy = normal_building_levy_tier_7
	
	character_modifier = {
		movement_speed = normal_movement_speed_tier_7
		character_travel_speed_mult = normal_movement_speed_tier_7
	}
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = high_maa_toughness_tier_5
		stationed_light_cavalry_damage_mult = high_maa_damage_tier_7
		stationed_light_cavalry_screen_mult = normal_maa_screen_tier_3
		stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_7
		stationed_heavy_cavalry_toughness_mult = high_maa_toughness_tier_5
		stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_7
		stationed_heavy_cavalry_screen_mult = normal_maa_screen_tier_3
		stationed_heavy_cavalry_pursuit_mult = normal_maa_pursuit_tier_3
	}
	
	next_building = stables_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

stables_08 = {
	construction_time = quick_construction_time
	effect_desc = stables_effect_desc

	can_construct_potential = {
		building_stables_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_stables
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_royal_armory
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_stables
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_8_cost
	
	levy = normal_building_levy_tier_8
	
	character_modifier = {
		movement_speed = normal_movement_speed_tier_8
		character_travel_speed_mult = normal_movement_speed_tier_8
	}
	
	province_modifier = {
		stationed_light_cavalry_toughness_mult = high_maa_toughness_tier_6
		stationed_light_cavalry_damage_mult = high_maa_damage_tier_8
		stationed_light_cavalry_screen_mult = normal_maa_screen_tier_4
		stationed_light_cavalry_pursuit_mult = normal_maa_pursuit_tier_8
		stationed_heavy_cavalry_toughness_mult = high_maa_toughness_tier_6
		stationed_heavy_cavalry_damage_mult = high_maa_damage_tier_8
		stationed_heavy_cavalry_screen_mult = normal_maa_screen_tier_4
		stationed_heavy_cavalry_pursuit_mult = normal_maa_pursuit_tier_4
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		
	}
}


### smiths

smiths_01 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_duel_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_smiths_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 = {
		stationed_maa_damage_mult = normal_maa_damage_tier_1
		tax_mult = low_building_tax_mult_tier_1
	}
	county_modifier = {
		levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_1
	}
	character_modifier = {
		knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_1
	}

	character_culture_modifier = {
		parameter = frugal_blacksmith_maa_size 
		knight_limit = 1
	}
	
	next_building = smiths_02

	type_icon = "icon_building_smiths.dds"
	
	ai_value = {
		base = 10
		ai_tier_1_building_modifier = yes
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		ai_stacking_bonus_warrior_lodges_modifier = yes
		ai_stacking_bonus_wind_furnaces_modifier = yes
		ai_anti_synergy_cavalry_modifier = yes
		ai_anti_synergy_light_infantry_modifier = yes
		ai_heavy_infantry_modifier = yes
		ai_pikemen_modifier = yes
		modifier = {
			add = non_stationed_maa_bonus
			has_stationed_regiment = yes
			NOR = {
				has_stationed_regiment_of_base_type = pikemen
				has_stationed_regiment_of_base_type = heavy_infantry
			}
		}
		modifier = {
			factor = 0
			building_regimental_grounds_requirement_terrain = yes
			NOT = {
				has_building_or_higher = regimental_grounds_01
			}
		}
		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 = 0
			building_horse_pastures_requirement_terrain = yes
			NOT = {
				has_building_or_higher = horse_pastures_01
			}
		}
		modifier = {
			factor = 0
			building_hillside_grazing_requirement_terrain = yes
			NOT = {
				has_building_or_higher = hillside_grazing_01
			}
		}
		modifier = {
			factor = 0
			building_warrior_lodges_requirement_terrain = yes
			NOT = {
				has_building_or_higher = warrior_lodges_01
			}
		}
		modifier = {
			add = -9
			has_building_or_higher = city_01
		}
		modifier = {
			add = -3
			OR = {
				exists = barony.lessee
				scope:holder = {
					highest_held_title_tier <= tier_barony
				}
			}
		}
		modifier = {
			add = -10
			scope:holder = {
				OR = {
					AND = {
						government_has_flag = government_is_theocracy
						highest_held_title_tier <= tier_barony
					}
					is_theocratic_lessee = yes
				}
			}
		}
	}
}

smiths_02 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_duel_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_smiths_requirement_terrain = yes
		building_requirement_castle_city_church = { LEVEL = 01 }
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_smiths
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_barracks
			}
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_smiths
			}
		}
	}

	can_construct_showing_failures_only = {
		building_requirement_tribal = no
	}
	
	cost_gold = normal_building_tier_2_cost
	
	province_modifier = {
		stationed_maa_damage_mult = normal_maa_damage_tier_2
		tax_mult = low_building_tax_mult_tier_2
	}
	county_modifier = {
		levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_2
	}
	character_modifier = {
		knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_2
	}

	character_culture_modifier = {
		parameter = frugal_blacksmith_maa_size 
		knight_limit = 1
		men_at_arms_limit = 1
	}
	
	next_building = smiths_03
	
	ai_value = {
		base = 9
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
		modifier = { # Fill all building slots before going for upgrades
			factor = 0
			free_building_slots > 0
		}
	}
}

smiths_03 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_duel_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_smiths_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_smiths
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_burhs
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_smiths
			}
			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 = {
		stationed_maa_damage_mult = normal_maa_damage_tier_3
		stationed_maa_toughness_mult = normal_maa_toughness_tier_1
		tax_mult = low_building_tax_mult_tier_3
	}
	county_modifier = {
		levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_3
	}
	character_modifier = {
		knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_3
	}

	character_culture_modifier = {
		parameter = frugal_blacksmith_maa_size 
		knight_limit = 2
		men_at_arms_limit = 1
	}
	
	
	next_building = smiths_04
	
	ai_value = {
		base = 8
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

smiths_04 = {
	construction_time = quick_construction_time
	effect_desc = {
		triggered_desc = {
			trigger = { has_dlc_feature = tours_and_tournaments }
			desc = tournament_duel_cost_discount_effect_toto_desc
		}
	}
	can_construct_potential = {
		building_smiths_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_smiths
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_burhs
			}
			building_requirement_castle_city_church = { LEVEL = 02 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_smiths
			}
			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 = {
		stationed_maa_damage_mult = normal_maa_damage_tier_4
		stationed_maa_toughness_mult = normal_maa_toughness_tier_2
		tax_mult = low_building_tax_mult_tier_4
	}
	county_modifier = {
		levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_4
	}
	character_modifier = {
		knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_4
	}

	character_culture_modifier = {
		parameter = frugal_blacksmith_maa_size 
		knight_limit = 2
		men_at_arms_limit = 1
	}
	
	next_building = smiths_05
	
	ai_value = {
		base = 7
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

smiths_05 = {
	construction_time = quick_construction_time
	effect_desc = smiths_effect_desc

	can_construct_potential = {
		building_smiths_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_smiths
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_smiths
			}
			scope:holder.culture = {
				has_innovation = innovation_burhs
			}
			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 = {
		stationed_maa_damage_mult = normal_maa_damage_tier_5
		stationed_maa_toughness_mult = normal_maa_toughness_tier_3
		tax_mult = low_building_tax_mult_tier_5
	}
	county_modifier = {
		levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_5
	}
	character_modifier = {
		knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_5
	}

	character_culture_modifier = {
		parameter = frugal_blacksmith_maa_size 
		knight_limit = 3
		men_at_arms_limit = 1
	}
	
	next_building = smiths_06
	
	ai_value = {
		base = 6
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

smiths_06 = {
	construction_time = quick_construction_time
	effect_desc = smiths_effect_desc

	can_construct_potential = {
		building_smiths_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_smiths
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_royal_armory
			}
			building_requirement_castle_city_church = { LEVEL = 03 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_smiths
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			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 = {
		stationed_maa_damage_mult = normal_maa_damage_tier_6
		stationed_maa_toughness_mult = normal_maa_toughness_tier_4
		tax_mult = low_building_tax_mult_tier_6
	}
	county_modifier = {
		levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_6
	}
	character_modifier = {
		knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_6
	}

	character_culture_modifier = {
		parameter = frugal_blacksmith_maa_size 
		knight_limit = 3
		men_at_arms_limit = 2
	}
	
	next_building = smiths_07
	
	ai_value = {
		base = 5
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

smiths_07 = {
	construction_time = quick_construction_time
	effect_desc = smiths_effect_desc

	can_construct_potential = {
		building_smiths_requirement_terrain = yes
	}
	
	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_smiths
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_royal_armory
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_smiths
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			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 = {
		stationed_maa_damage_mult = normal_maa_damage_tier_7
		stationed_maa_toughness_mult = normal_maa_toughness_tier_5
		tax_mult = low_building_tax_mult_tier_7
	}
	county_modifier = {
		levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_7
	}
	character_modifier = {
		knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_7
	}

	character_culture_modifier = {
		parameter = frugal_blacksmith_maa_size 
		knight_limit = 4
		men_at_arms_limit = 2
	}
	
	next_building = smiths_08
	
	ai_value = {
		base = 4
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}

smiths_08 = {
	construction_time = quick_construction_time
	effect_desc = smiths_effect_desc

	can_construct_potential = {
		building_smiths_requirement_terrain = yes
	}

	can_construct = {
		trigger_if = {
			limit = {
				NOT = {
					culture = {
						has_cultural_parameter = next_level_smiths
					}
				}
			}
			scope:holder.culture = {
				has_innovation = innovation_royal_armory
			}
			building_requirement_castle_city_church = { LEVEL = 04 }
		}
		trigger_else = {
			culture = {
				has_cultural_parameter = next_level_smiths
			}
			scope:holder.culture = {
				has_innovation = innovation_castle_baileys
			}
			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 = {
		stationed_maa_damage_mult = normal_maa_damage_tier_8
		stationed_maa_toughness_mult = normal_maa_toughness_tier_6
		tax_mult = low_building_tax_mult_tier_8
	}
	county_modifier = {
		levy_reinforcement_rate = normal_levy_reinforcement_rate_tier_8
	}
	character_modifier = {
		knight_effectiveness_mult = normal_knight_effectiveness_mult_tier_8
	}

	character_culture_modifier = {
		parameter = frugal_blacksmith_maa_size 
		knight_limit = 4
		men_at_arms_limit = 3
	}
	
	ai_value = {
		base = 3
		ai_general_building_modifier = yes
		directive_to_build_military_modifier = yes
	}
}
