# -*- ck2.buildings -*-

 # Triggers are in Province scope. The From Scope contains the settlement holder (character)
 # start trigger is in title scope.

tribal = {
	tb_hillfort_1 = {
		desc = tb_hillfort_1_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			emf_is_building_construction_allowed = yes
		}
		gold_cost = 25
		build_time = 730

		fort_level = 0.25
		levy_size = 0.05
		retinuesize = 100
		ai_creation_factor = 97
		ai_feudal_modifier = 10
		ai_republic_modifier = -10

		extra_tech_building_start = 0.3
	}

	tb_hillfort_2 = {
		desc = tb_hillfort_2_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_hillfort_1
		gold_cost = 50
		build_time = 730

		fort_level = 0.25
		levy_size = 0.05
		ai_creation_factor = 98
		ai_feudal_modifier = 10
		ai_republic_modifier = -10

		convert_to_city = ct_wall_1
		convert_to_castle = ca_wall_1

		extra_tech_building_start = 1.5
	}

	tb_hillfort_3 = {
		desc = tb_hillfort_3_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 1
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_hillfort_2
		gold_cost = 75
		build_time = 730

		fort_level = 0.25
		levy_size = 0.05
		ai_creation_factor = 99
		ai_feudal_modifier = 10
		ai_republic_modifier = -10

		convert_to_castle = ca_wall_1 # EMF

		extra_tech_building_start = 2
	}

	tb_hillfort_4 = {
		desc = tb_hillfort_4_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 1
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_hillfort_3
		gold_cost = 100
		build_time = 730

		fort_level = 0.25
		levy_size = 0.05
		ai_creation_factor = 100
		ai_feudal_modifier = 10
		ai_republic_modifier = -10

		convert_to_city = ct_wall_2
		convert_to_castle = ca_wall_2

		extra_tech_building_start = 2.5
	}

	tb_market_town_1 = {
		desc = tb_market_town_1_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_CITY_CONSTRUCTION = 0
			emf_is_building_construction_allowed = yes
		}
		gold_cost = 25
		build_time = 730

		tax_income = 0.5
		retinuesize = 20
		ai_creation_factor = 97
		ai_feudal_modifier = -10
		ai_republic_modifier = 10

		extra_tech_building_start = 0.3
	}

	tb_market_town_2 = {
		desc = tb_market_town_2_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_CITY_CONSTRUCTION = 0
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_market_town_1
		gold_cost = 50
		build_time = 730

		tax_income = 0.5
		ai_creation_factor = 98
		ai_feudal_modifier = -10
		ai_republic_modifier = 10

		convert_to_castle = ca_town_1
		convert_to_city = ct_marketplace_1

		extra_tech_building_start = 1.5
	}

	tb_market_town_3 = {
		desc = tb_market_town_3_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_CITY_CONSTRUCTION = 1
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_market_town_2
		gold_cost = 75
		build_time = 730

		tax_income = 0.5
		ai_creation_factor = 99
		ai_feudal_modifier = -10
		ai_republic_modifier = 10

		convert_to_city = ct_marketplace_1 # EMF

		court_size_modifier = 1
		extra_tech_building_start = 2
	}

	tb_market_town_4 = {
		desc = tb_market_town_4_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_CITY_CONSTRUCTION = 1
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_market_town_3
		gold_cost = 100
		build_time = 730

		tax_income = 0.5
		ai_creation_factor = 100
		ai_feudal_modifier = -10
		ai_republic_modifier = 10

		convert_to_castle = ca_town_2
		convert_to_city = ct_marketplace_2

		extra_tech_building_start = 2.5
	}
	
	tb_defensive_fortifications_1 = {
		desc = tb_defensive_fortifications_1_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			emf_is_building_construction_allowed = yes
		}
		prestige_cost = 100
		build_time = 365
		
		fort_level = 0.25
		ai_creation_factor = 92
		ai_feudal_modifier = 10
		ai_republic_modifier = -10
		
		extra_tech_building_start = 0.3
	}
	
	tb_defensive_fortifications_2 = {
		desc = tb_defensive_fortifications_2_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_defensive_fortifications_1
		prestige_cost = 200
		build_time = 365
		
		fort_level = 0.25
		ai_creation_factor = 93
		ai_feudal_modifier = 10
		ai_republic_modifier = -10
		
		convert_to_city = ct_wall_q_1
		convert_to_castle = ca_wall_q_1
		
		extra_tech_building_start = 2
	}
	
	tb_defensive_fortifications_3 = {
		desc = tb_defensive_fortifications_3_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 1
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_defensive_fortifications_2
		prestige_cost = 300
		build_time = 365
		
		fort_level = 0.25
		ai_creation_factor = 94
		ai_feudal_modifier = 10
		ai_republic_modifier = -10
		
		extra_tech_building_start = 3
	}
	
	tb_defensive_fortifications_4 = {
		desc = tb_defensive_fortifications_4_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 1
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_defensive_fortifications_3
		prestige_cost = 400
		build_time = 365
		
		fort_level = 0.25
		ai_creation_factor = 95
		ai_feudal_modifier = 10
		ai_republic_modifier = -10
		
		convert_to_city = ct_wall_q_2
		convert_to_castle = ca_wall_q_2
		
		extra_tech_building_start = 4
	}

	tb_shipyard_1 = {
		desc = shipyard_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		port = yes
		trigger = {
			TECH_NAVAL = 1
			emf_is_building_construction_allowed = yes
		}
		prestige_cost = 150
		build_time = 730
		galleys = 6
		ai_creation_factor = 96
		ai_republic_modifier = 5

		convert_to_castle = ca_shipyard_1
		convert_to_city = ct_shipyard_1

		extra_tech_building_start = 0.3
	}
	
	tb_shipyard_2 = {
		desc = shipyard_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		port = yes
		trigger = {
			TECH_NAVAL = 2
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_shipyard_1
		prestige_cost = 300
		build_time = 1095
		galleys = 7
		ai_creation_factor = 95
		ai_republic_modifier = 5
		
		convert_to_castle = ca_shipyard_2
		convert_to_city = ct_shipyard_2
		
		extra_tech_building_start = 0.3
	}
	
	tb_shipyard_3 = {
		desc = shipyard_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		port = yes
		trigger = {
			TECH_NAVAL = 3
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_shipyard_2
		prestige_cost = 450
		build_time = 1460
		galleys = 8
		ai_creation_factor = 94
		ai_republic_modifier = 10
		
		convert_to_castle = ca_shipyard_2
		convert_to_city = ct_shipyard_2
		
		extra_tech_building_start = 0.3
	}
	
	tb_shipyard_4 = {
		desc = shipyard_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		port = yes
		trigger = {
			TECH_NAVAL = 4
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_shipyard_3
		prestige_cost = 600
		build_time = 1825
		galleys = 9
		ai_creation_factor = 93
		ai_republic_modifier = 10
		
		convert_to_castle = ca_shipyard_3
		convert_to_city = ct_shipyard_3
		
		extra_tech_building_start = 0.3
	}

	tb_training_grounds_1 = {
		desc = tb_training_grounds_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 0
			emf_is_building_construction_allowed = yes
		}
		prestige_cost = 150
		build_time = 547
		levy_size = 0.025
		garrison_size = 0.025
		ai_creation_factor = 98

		extra_tech_building_start = 1
	}

	tb_training_grounds_2 = {
		desc = tb_training_grounds_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 0
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_training_grounds_1
		prestige_cost = 300
		build_time = 1095
		levy_size = 0.05
		garrison_size = 0.05
		ai_creation_factor = 97

		convert_to_castle = ca_keep_1
		convert_to_city = ct_training_grounds_1

		extra_tech_building_start = 2
	}

	tb_training_grounds_3 = {
		desc = tb_training_grounds_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 0
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_training_grounds_2
		prestige_cost = 450
		build_time = 1460
		levy_size = 0.075
		garrison_size = 0.075
		ai_creation_factor = 96

		extra_tech_building_start = 3
	}

	tb_training_grounds_4 = {
		desc = tb_training_grounds_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 0
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_training_grounds_3
		prestige_cost = 600
		build_time = 1825
		levy_size = 0.1
		garrison_size = 0.1
		ai_creation_factor = 95

		convert_to_castle = ca_keep_2
		convert_to_city = ct_training_grounds_2

		extra_tech_building_start = 4
	}

	tb_war_camp_1 = {
		desc = tb_war_camp_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				NAND = {
					terrain = steppe
					emf_province_is_steppe_culture = yes
				}
				has_building = tb_war_camp_1
			}
		}
		is_active_trigger = {
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
		}
		trigger = {
			TECH_INFANTRY = 0
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
			emf_is_building_construction_allowed = yes
		}
		prestige_cost = 150
		build_time = 730
		light_infantry = 30
		ai_creation_factor = 99

		extra_tech_building_start = 1
	}

	tb_war_camp_2 = {
		desc = tb_war_camp_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				NAND = {
					terrain = steppe
					emf_province_is_steppe_culture = yes
				}
				has_building = tb_war_camp_1
				has_building = tb_war_camp_2
			}
		}
		is_active_trigger = {
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
		}
		trigger = {
			TECH_INFANTRY = 0
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_war_camp_1
		prestige_cost = 300
		build_time = 547
		light_infantry = 30
		ai_creation_factor = 98

		convert_to_castle = ca_barracks_1
		convert_to_city = ct_guard_1

		extra_tech_building_start = 2
	}

	tb_war_camp_3 = {
		desc = tb_war_camp_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				NAND = {
					terrain = steppe
					emf_province_is_steppe_culture = yes
				}
				has_building = tb_war_camp_1
				has_building = tb_war_camp_2
				has_building = tb_war_camp_3
			}
		}
		is_active_trigger = {
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
		}
		trigger = {
			TECH_INFANTRY = 0
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_war_camp_2
		prestige_cost = 450
		build_time = 1095
		light_infantry = 30
		ai_creation_factor = 97

		extra_tech_building_start = 3
	}

	tb_war_camp_4 = {
		desc = tb_war_camp_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				NAND = {
					terrain = steppe
					emf_province_is_steppe_culture = yes
				}
				has_building = tb_war_camp_1
				has_building = tb_war_camp_2
				has_building = tb_war_camp_3
				has_building = tb_war_camp_4
			}
		}
		is_active_trigger = {
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
		}
		trigger = {
			TECH_INFANTRY = 0
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_war_camp_3
		prestige_cost = 600
		build_time = 1460
		light_infantry = 30
		ai_creation_factor = 96

		convert_to_castle = ca_barracks_2
		convert_to_city = ct_guard_2

		extra_tech_building_start = 4
	}

	tb_practice_range_1 = {
		desc = tb_practice_range_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				NOR = {
					AND = {
						terrain = steppe
						emf_province_is_steppe_culture = yes
					}
					AND = {
						terrain = desert
						emf_province_is_desert_culture = yes
					}
				}
				has_building = tb_practice_range_1
			}
		}
		is_active_trigger = {
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
			trigger_else_if = {
				limit = { terrain = desert }
				NOT = { emf_province_is_desert_culture = yes }
			}
		}
		trigger = {
			TECH_INFANTRY = 0
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
			trigger_else_if = {
				limit = { terrain = desert }
				NOT = { emf_province_is_desert_culture = yes }
			}
			emf_is_building_construction_allowed = yes
		}
		prestige_cost = 150
		build_time = 730
		archers = 10
		ai_creation_factor = 95

		extra_tech_building_start = 1
	}

	tb_practice_range_2 = {
		desc = tb_practice_range_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				NOR = {
					AND = {
						terrain = steppe
						emf_province_is_steppe_culture = yes
					}
					AND = {
						terrain = desert
						emf_province_is_desert_culture = yes
					}
				}
				has_building = tb_practice_range_1
				has_building = tb_practice_range_2
			}
		}
		is_active_trigger = {
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
			trigger_else_if = {
				limit = { terrain = desert }
				NOT = { emf_province_is_desert_culture = yes }
			}
		}
		trigger = {
			TECH_INFANTRY = 0
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
			trigger_else_if = {
				limit = { terrain = desert }
				NOT = { emf_province_is_desert_culture = yes }
			}
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_practice_range_1
		prestige_cost = 300
		build_time = 547
		archers = 10
		ai_creation_factor = 96

		convert_to_castle = ca_militia_barracks_1
		convert_to_city = ct_barracks_1

		extra_tech_building_start = 2
	}

	tb_practice_range_3 = {
		desc = tb_practice_range_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				NOR = {
					AND = {
						terrain = steppe
						emf_province_is_steppe_culture = yes
					}
					AND = {
						terrain = desert
						emf_province_is_desert_culture = yes
					}
				}
				has_building = tb_practice_range_1
				has_building = tb_practice_range_2
				has_building = tb_practice_range_3
			}
		}
		is_active_trigger = {
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
			trigger_else_if = {
				limit = { terrain = desert }
				NOT = { emf_province_is_desert_culture = yes }
			}
		}
		trigger = {
			TECH_INFANTRY = 0
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
			trigger_else_if = {
				limit = { terrain = desert }
				NOT = { emf_province_is_desert_culture = yes }
			}
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_practice_range_2
		prestige_cost = 450
		build_time = 1095
		archers = 10
		ai_creation_factor = 97

		extra_tech_building_start = 3
	}

	tb_practice_range_4 = {
		desc = tb_practice_range_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				NOR = {
					AND = {
						terrain = steppe
						emf_province_is_steppe_culture = yes
					}
					AND = {
						terrain = desert
						emf_province_is_desert_culture = yes
					}
				}
				has_building = tb_practice_range_1
				has_building = tb_practice_range_2
				has_building = tb_practice_range_3
				has_building = tb_practice_range_4
			}
		}
		is_active_trigger = {
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
			trigger_else_if = {
				limit = { terrain = desert }
				NOT = { emf_province_is_desert_culture = yes }
			}
		}
		trigger = {
			TECH_INFANTRY = 0
			trigger_if = {
				limit = { terrain = steppe }
				NOT = { emf_province_is_steppe_culture = yes }
			}
			trigger_else_if = {
				limit = { terrain = desert }
				NOT = { emf_province_is_desert_culture = yes }
			}
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_practice_range_3
		prestige_cost = 600
		build_time = 1460
		archers = 10
		ai_creation_factor = 98

		convert_to_castle = ca_militia_barracks_2
		convert_to_city = ct_barracks_2

		extra_tech_building_start = 4
	}

	tb_steppe_barracks_1 = {
		desc = ca_steppe_barracks_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				AND = {
					terrain = steppe
					emf_province_is_steppe_culture = yes
				}
				has_building = tb_steppe_barracks_1
			}
		}
		is_active_trigger = {
			emf_province_is_steppe_culture = yes
		}
		trigger = {
			TECH_CAVALRY = 0
			emf_province_is_steppe_culture = yes
			emf_is_building_construction_allowed = yes
		}
		prestige_cost = 150
		build_time = 730
		archers = 9
		light_cavalry = 7
		ai_creation_factor = 105

		extra_tech_building_start = 1
	}

	tb_steppe_barracks_2 = {
		desc = ca_steppe_barracks_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				AND = {
					terrain = steppe
					emf_province_is_steppe_culture = yes
				}
				has_building = tb_steppe_barracks_1
				has_building = tb_steppe_barracks_2
			}
		}
		is_active_trigger = {
			emf_province_is_steppe_culture = yes
		}
		trigger = {
			TECH_CAVALRY = 0
			emf_province_is_steppe_culture = yes
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_steppe_barracks_1
		prestige_cost = 300
		build_time = 547
		archers = 9
		light_cavalry = 7
		ai_creation_factor = 104

		convert_to_castle = ca_steppe_barracks_1
		convert_to_city = ct_guard_1

		extra_tech_building_start = 2
	}

	tb_steppe_barracks_3 = {
		desc = ca_steppe_barracks_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				AND = {
					terrain = steppe
					emf_province_is_steppe_culture = yes
				}
				has_building = tb_steppe_barracks_1
				has_building = tb_steppe_barracks_2
				has_building = tb_steppe_barracks_3
			}
		}
		is_active_trigger = {
			emf_province_is_steppe_culture = yes
		}
		trigger = {
			TECH_CAVALRY = 0
			emf_province_is_steppe_culture = yes
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_steppe_barracks_2
		prestige_cost = 450
		build_time = 1095
		archers = 9
		light_cavalry = 7
		ai_creation_factor = 103

		extra_tech_building_start = 3
	}

	tb_steppe_barracks_4 = {
		desc = ca_steppe_barracks_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				AND = {
					terrain = steppe
					emf_province_is_steppe_culture = yes
				}
				has_building = tb_steppe_barracks_1
				has_building = tb_steppe_barracks_2
				has_building = tb_steppe_barracks_3
				has_building = tb_steppe_barracks_4
			}
		}
		is_active_trigger = {
			emf_province_is_steppe_culture = yes
		}
		trigger = {
			TECH_CAVALRY = 0
			emf_province_is_steppe_culture = yes
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_steppe_barracks_3
		prestige_cost = 600
		build_time = 1460
		archers = 9
		light_cavalry = 7
		ai_creation_factor = 102

		convert_to_castle = ca_steppe_barracks_2
		convert_to_city = ct_guard_2

		extra_tech_building_start = 4
	}

	tb_steppe_stable_1 = {
		desc = ca_steppe_stable_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				AND = {
					terrain = steppe
					emf_province_is_steppe_culture = yes
				}
				has_building = tb_steppe_stable_1
			}
		}
		is_active_trigger = {
			emf_province_is_steppe_culture = yes
		}
		trigger = {
			TECH_CAVALRY = 0
			emf_province_is_steppe_culture = yes
			emf_is_building_construction_allowed = yes
		}
		prestige_cost = 150
		build_time = 730
		light_cavalry = 10
		horse_archers = 4
		ai_creation_factor = 89

		extra_tech_building_start = 1
	}

	tb_steppe_stable_2 = {
		desc = ca_steppe_stable_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				AND = {
					terrain = steppe
					emf_province_is_steppe_culture = yes
				}
				has_building = tb_steppe_stable_1
				has_building = tb_steppe_stable_2
			}
		}
		is_active_trigger = {
			emf_province_is_steppe_culture = yes
		}
		trigger = {
			TECH_CAVALRY = 0
			emf_province_is_steppe_culture = yes
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_steppe_stable_1
		prestige_cost = 300
		build_time = 547
		light_cavalry = 10
		horse_archers = 4
		ai_creation_factor = 88

		convert_to_castle = ca_steppe_stable_1
		convert_to_city = ct_barracks_1

		extra_tech_building_start = 2
	}

	tb_steppe_stable_3 = {
		desc = ca_steppe_stable_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				AND = {
					terrain = steppe
					emf_province_is_steppe_culture = yes
				}
				has_building = tb_steppe_stable_1
				has_building = tb_steppe_stable_2
				has_building = tb_steppe_stable_3
			}
		}
		is_active_trigger = {
			emf_province_is_steppe_culture = yes
		}
		trigger = {
			TECH_CAVALRY = 0
			emf_province_is_steppe_culture = yes
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_steppe_stable_2
		prestige_cost = 450
		build_time = 1095
		light_cavalry = 10
		horse_archers = 4
		ai_creation_factor = 87

		extra_tech_building_start = 3
	}

	tb_steppe_stable_4 = {
		desc = ca_steppe_stable_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				AND = {
					terrain = steppe
					emf_province_is_steppe_culture = yes
				}
				has_building = tb_steppe_stable_1
				has_building = tb_steppe_stable_2
				has_building = tb_steppe_stable_3
				has_building = tb_steppe_stable_4
			}
		}
		is_active_trigger = {
			emf_province_is_steppe_culture = yes
		}
		trigger = {
			TECH_CAVALRY = 0
			emf_province_is_steppe_culture = yes
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_steppe_stable_3
		prestige_cost = 600
		build_time = 1460
		light_cavalry = 10
		horse_archers = 4
		ai_creation_factor = 86

		convert_to_castle = ca_steppe_stable_2
		convert_to_city = ct_barracks_2

		extra_tech_building_start = 4
	}

	tb_arsenal_1 = {
		desc = tb_arsenal_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_RECRUITMENT = 0
			emf_is_building_construction_allowed = yes
		}
		prestige_cost = 150
		build_time = 730
		land_morale = 0.075
		levy_reinforce_rate = 0.05
		retinuesize = 10
		ai_creation_factor = 98

		extra_tech_building_start = 1
	}

	tb_arsenal_2 = {
		desc = tb_arsenal_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_RECRUITMENT = 0
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_arsenal_1
		prestige_cost = 300
		build_time = 1095
		land_morale = 0.075
		levy_reinforce_rate = 0.05
		retinuesize = 10
		ai_creation_factor = 97

		extra_tech_building_start = 2

		convert_to_castle = ca_training_grounds_1
		convert_to_city = ct_rep_arsenal_1
	}

	tb_arsenal_3 = {
		desc = tb_arsenal_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_RECRUITMENT = 0
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_arsenal_2
		prestige_cost = 450
		build_time = 1460
		land_morale = 0.075
		levy_reinforce_rate = 0.05
		retinuesize = 10
		ai_creation_factor = 96

		extra_tech_building_start = 3
	}

	tb_arsenal_4 = {
		desc = tb_arsenal_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
		}
		trigger = {
			TECH_RECRUITMENT = 0
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_arsenal_3
		prestige_cost = 600
		build_time = 1825
		land_morale = 0.075
		levy_reinforce_rate = 0.05
		retinuesize = 10
		ai_creation_factor = 95

		extra_tech_building_start = 4

		convert_to_castle = ca_training_grounds_2
		convert_to_city = ct_rep_arsenal_2
	}

	tb_desert_stable_1 = {
		desc = tb_desert_stable_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				AND = {
					terrain = desert
					emf_province_is_desert_culture = yes
				}
				has_building = tb_desert_stable_1
			}
		}
		is_active_trigger = {
			emf_province_is_desert_culture = yes
		}
		trigger = {
			TECH_CAVALRY = 0
			emf_province_is_desert_culture = yes
			emf_is_building_construction_allowed = yes
		}
		prestige_cost = 150
		build_time = 730
		light_cavalry = 10
		camel_cavalry = 4
		ai_creation_factor = 89
		
		extra_tech_building_start = 1
	}
	
	tb_desert_stable_2 = {
		desc = tb_desert_stable_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				AND = {
					terrain = desert
					emf_province_is_desert_culture = yes
				}
				has_building = tb_desert_stable_1
				has_building = tb_desert_stable_2
			}
		}
		is_active_trigger = {
			emf_province_is_desert_culture = yes
		}
		trigger = {
			TECH_CAVALRY = 0
			emf_province_is_desert_culture = yes
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_desert_stable_1
		prestige_cost = 300
		build_time = 547
		light_cavalry = 10
		camel_cavalry = 4
		ai_creation_factor = 88
		
		convert_to_castle = ca_desert_stable_1
		convert_to_city = ct_barracks_1

		extra_tech_building_start = 2
	}
	
	tb_desert_stable_3 = {
		desc = tb_desert_stable_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				AND = {
					terrain = desert
					emf_province_is_desert_culture = yes
				}
				has_building = tb_desert_stable_1
				has_building = tb_desert_stable_2
				has_building = tb_desert_stable_3
			}
		}
		is_active_trigger = {
			emf_province_is_desert_culture = yes
		}
		trigger = {
			TECH_CAVALRY = 0
			emf_province_is_desert_culture = yes
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_desert_stable_2
		prestige_cost = 450
		build_time = 1095
		light_cavalry = 10
		camel_cavalry = 4
		ai_creation_factor = 87

		extra_tech_building_start = 3
	}
	
	tb_desert_stable_4 = {
		desc = tb_desert_stable_desc
		potential = {
			has_game_rule = {
				name = dacse_buildings
				value = HIP
			}
			OR = {
				AND = {
					terrain = desert
					emf_province_is_desert_culture = yes
				}
				has_building = tb_desert_stable_1
				has_building = tb_desert_stable_2
				has_building = tb_desert_stable_3
				has_building = tb_desert_stable_4
			}
		}
		is_active_trigger = {
			emf_province_is_desert_culture = yes
		}
		trigger = {
			TECH_CAVALRY = 0
			emf_province_is_desert_culture = yes
			emf_is_building_construction_allowed = yes
		}
		upgrades_from = tb_desert_stable_3
		prestige_cost = 600
		build_time = 1460
		light_cavalry = 10
		camel_cavalry = 4
		ai_creation_factor = 86
		
		convert_to_castle = ca_desert_stable_2
		convert_to_city = ct_barracks_2

		extra_tech_building_start = 4
	}
}

