 # 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
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
		}
		gold_cost = 25
		build_time = 365
		
		fort_level = 0.25
		levy_size = 0.05
		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
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 0
		}
		upgrades_from = tb_hillfort_1
		gold_cost = 50
		build_time = 365
		
		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_temple = tp_wall_1
		
		extra_tech_building_start = 1.5
	}
	
	tb_hillfort_3 = {
		desc = tb_hillfort_3_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 1
		}
		upgrades_from = tb_hillfort_2
		gold_cost = 75
		build_time = 365
		
		fort_level = 0.25
		levy_size = 0.05
		ai_creation_factor = 99
		ai_feudal_modifier = 10
		ai_republic_modifier = -10
		
		extra_tech_building_start = 2
	}
	
	tb_hillfort_4 = {
		desc = tb_hillfort_4_desc
		trigger = {
			TECH_CASTLE_CONSTRUCTION = 1
		}
		upgrades_from = tb_hillfort_3
		gold_cost = 100
		build_time = 365
		
		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_temple = tp_wall_2
		
		extra_tech_building_start = 2.5
	}
	
	tb_market_town_1 = {
		desc = tb_market_town_1_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 0
		}
		gold_cost = 25
		build_time = 365
		
		tax_income = 0.5
		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
		trigger = {
			TECH_CITY_CONSTRUCTION = 0
		}
		upgrades_from = tb_market_town_1
		gold_cost = 50
		build_time = 365
		
		tax_income = 0.5
		ai_creation_factor = 98
		ai_feudal_modifier = -10
		ai_republic_modifier = 10
		
		convert_to_castle = ca_town_1
		convert_to_temple = tp_town_1
		
		extra_tech_building_start = 1.5
	}
	
	tb_market_town_3 = {
		desc = tb_market_town_3_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 1
		}
		upgrades_from = tb_market_town_2
		gold_cost = 75
		build_time = 365
		
		tax_income = 0.5
		ai_creation_factor = 99
		ai_feudal_modifier = -10
		ai_republic_modifier = 10
		
		extra_tech_building_start = 2
	}
	
	tb_market_town_4 = {
		desc = tb_market_town_4_desc
		trigger = {
			TECH_CITY_CONSTRUCTION = 1
		}
		upgrades_from = tb_market_town_3
		gold_cost = 100
		build_time = 365
		
		tax_income = 0.5
		ai_creation_factor = 100
		ai_feudal_modifier = -10
		ai_republic_modifier = 10
		
		convert_to_castle = ca_town_2
		convert_to_temple = tp_town_2
		
		extra_tech_building_start = 2.5
	}
	
	tb_shipyard_1 = {
		desc = shipyard_desc
		port = yes
		trigger = {
			TECH_NAVAL = 1
		}
		prestige_cost = 300
		build_time = 365
		galleys = 6
		ai_creation_factor = 96
		ai_republic_modifier = 5
		
		convert_to_castle = ca_shipyard_1
		convert_to_city = ct_shipyard_1
		convert_to_temple = tp_shipyard_1
		
		extra_tech_building_start = 0.3
	}
	
	tb_shipyard_2 = {
		desc = shipyard_desc
		port = yes
		trigger = {
			TECH_NAVAL = 2
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_shipyard_1
		prestige_cost = 400
		build_time = 730
		galleys = 7
		ai_creation_factor = 95
		ai_republic_modifier = 5
		
		convert_to_castle = ca_shipyard_2
		convert_to_city = ct_shipyard_2
		convert_to_temple = tp_shipyard_2
		
		extra_tech_building_start = 0.3
	}
	
	tb_shipyard_3 = {
		desc = shipyard_desc
		port = yes
		trigger = {
			TECH_NAVAL = 3
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_shipyard_2
		prestige_cost = 500
		build_time = 1095
		galleys = 8
		ai_creation_factor = 94
		ai_republic_modifier = 5
		
		convert_to_castle = ca_shipyard_3
		convert_to_city = ct_shipyard_3
		convert_to_temple = tp_shipyard_3
		
		extra_tech_building_start = 0.3
	}
	
	tb_shipyard_4 = {
		desc = shipyard_desc
		port = yes
		trigger = {
			TECH_NAVAL = 4
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_shipyard_3
		prestige_cost = 600
		build_time = 1460
		galleys = 9
		ai_creation_factor = 93
		ai_republic_modifier = 5
		
		convert_to_castle = ca_shipyard_4
		convert_to_city = ct_shipyard_4
		convert_to_temple = tp_shipyard_4
		
		extra_tech_building_start = 0.3
	}
	
	tb_training_grounds_1 = {
		desc = tb_training_grounds_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prestige_cost = 300
		build_time = 547
		levy_size = 0.025
		garrison_size = 0.025
		ai_creation_factor = 98

		extra_tech_building_start = 0.3
	}
	
	tb_training_grounds_2 = {
		desc = tb_training_grounds_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_training_grounds_1
		prestige_cost = 400
		build_time = 730
		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 = 1.5
	} 
	
	tb_training_grounds_3 = {
		desc = tb_training_grounds_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_training_grounds_2
		prestige_cost = 500
		build_time = 1095
		levy_size = 0.075
		garrison_size = 0.075
		ai_creation_factor = 96

		extra_tech_building_start = 2
	}
	
	tb_training_grounds_4 = {
		desc = tb_training_grounds_desc
		trigger = {
			TECH_FORTIFICATIONS_CONSTRUCTION = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_training_grounds_3
		prestige_cost = 600
		build_time = 1460
		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 = 2.5
	} 
	
	tb_war_camp_1 = {
		desc = tb_war_camp_desc
		trigger = {
			TECH_LIGHT_INFANTRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prestige_cost = 300
		build_time = 365
		light_infantry = 40
		ai_creation_factor = 95
		
		extra_tech_building_start = 0.3
	}
	
	tb_war_camp_2 = {
		desc = tb_war_camp_desc
		trigger = {
			TECH_LIGHT_INFANTRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_war_camp_1
		prestige_cost = 400
		build_time = 547
		light_infantry = 40
		ai_creation_factor = 94
		
		convert_to_castle = ca_barracks_1
		convert_to_city = ct_guard_1

		extra_tech_building_start = 1.5
	}
	
	tb_war_camp_3 = {
		desc = tb_war_camp_desc
		trigger = {
			TECH_LIGHT_INFANTRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_war_camp_2
		prestige_cost = 500
		build_time = 730
		light_infantry = 40
		ai_creation_factor = 93
		
		extra_tech_building_start = 2
	}
	
	tb_war_camp_4 = {
		desc = tb_war_camp_desc
		trigger = {
			TECH_LIGHT_INFANTRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_war_camp_3
		prestige_cost = 600
		build_time = 1095
		light_infantry = 40
		ai_creation_factor = 92
		
		convert_to_castle = ca_barracks_2
		convert_to_city = ct_guard_2

		extra_tech_building_start = 2.5
	}
	
	tb_practice_range_1 = {
		desc = tb_practice_range_desc
		trigger = {
			TECH_LIGHT_INFANTRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prestige_cost = 300
		build_time = 365
		archers = 15
		ai_creation_factor = 95
		
		extra_tech_building_start = 0.3
	}
	
	tb_practice_range_2 = {
		desc = tb_practice_range_desc
		trigger = {
			TECH_LIGHT_INFANTRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_practice_range_1
		prestige_cost = 400
		build_time = 547
		archers = 15
		ai_creation_factor = 94
		
		convert_to_castle = ca_militia_barracks_1
		convert_to_city = ct_barracks_1
		convert_to_temple = tp_barracks_1

		extra_tech_building_start = 1.5
	}
	
	tb_practice_range_3 = {
		desc = tb_practice_range_desc
		trigger = {
			TECH_LIGHT_INFANTRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_practice_range_2
		prestige_cost = 500
		build_time = 730
		archers = 15
		ai_creation_factor = 93
		
		extra_tech_building_start = 2
	}
	
	tb_practice_range_4 = {
		desc = tb_practice_range_desc
		trigger = {
			TECH_LIGHT_INFANTRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_practice_range_3
		prestige_cost = 600
		build_time = 1095
		archers = 15
		ai_creation_factor = 92
		
		convert_to_castle = ca_militia_barracks_2
		convert_to_city = ct_barracks_2
		convert_to_temple = tp_barracks_2

		extra_tech_building_start = 2.5
	}
	
	tb_steppe_barracks_1 = {
		desc = ca_steppe_barracks_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = tb_war_camp_1
		trigger = {
			TECH_CAVALRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prestige_cost = 300
		build_time = 365
		archers = 12
		light_cavalry = 10
		ai_creation_factor = 105
		
		extra_tech_building_start = 0.3
	}
	
	tb_steppe_barracks_2 = {
		desc = ca_steppe_barracks_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = tb_war_camp_2
		trigger = {
			TECH_CAVALRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_steppe_barracks_1
		prestige_cost = 400
		build_time = 547
		archers = 12
		light_cavalry = 10
		ai_creation_factor = 104
		
		convert_to_castle = ca_steppe_barracks_1
		convert_to_city = ct_guard_1
		
		extra_tech_building_start = 1.5
	}
	
	tb_steppe_barracks_3 = {
		desc = ca_steppe_barracks_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = tb_war_camp_3
		trigger = {
			TECH_CAVALRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_steppe_barracks_2
		prestige_cost = 500
		build_time = 730
		archers = 12
		light_cavalry = 10
		ai_creation_factor = 103
		
		extra_tech_building_start = 2
	}
	
	tb_steppe_barracks_4 = {
		desc = ca_steppe_barracks_desc
		potential = {
			terrain = steppe
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
				}
			}
		}
		replaces = tb_war_camp_4
		trigger = {
			TECH_CAVALRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_steppe_barracks_3
		prestige_cost = 600
		build_time = 1095
		archers = 12
		light_cavalry = 10
		ai_creation_factor = 102
		
		convert_to_castle = ca_steppe_barracks_2
		convert_to_city = ct_guard_2
		
		extra_tech_building_start = 2.5
	}
	
	tb_steppe_stable_1 = {
		desc = ca_steppe_stable_desc
		potential = {
			OR = {
				terrain = plains
				terrain = steppe
			}
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
					culture = alan
				}
			}
		}
		replaces = tb_practice_range_1
		trigger = {
			TECH_CAVALRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prestige_cost = 300
		build_time = 365
		light_cavalry = 12
		horse_archers = 5
		ai_creation_factor = 89
		
		extra_tech_building_start = 0.3
	}
	
	tb_steppe_stable_2 = {
		desc = ca_steppe_stable_desc
		potential = {
			OR = {
				terrain = plains
				terrain = steppe
			}
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
					culture = alan
				}
			}
		}
		replaces = tb_practice_range_2
		trigger = {
			TECH_CAVALRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_steppe_stable_1
		prestige_cost = 400
		build_time = 547
		light_cavalry = 12
		horse_archers = 5
		ai_creation_factor = 88
		
		convert_to_castle = ca_steppe_stable_1
		convert_to_city = ct_barracks_1

		extra_tech_building_start = 1.5
	}
	
	tb_steppe_stable_3 = {
		desc = ca_steppe_stable_desc
		potential = {
			OR = {
				terrain = plains
				terrain = steppe
			}
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
					culture = alan
				}
			}
		}
		replaces = tb_practice_range_3
		trigger = {
			TECH_CAVALRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_steppe_stable_2
		prestige_cost = 500
		build_time = 730
		light_cavalry = 12
		horse_archers = 5
		ai_creation_factor = 87

		extra_tech_building_start = 2
	}
	
	tb_steppe_stable_4 = {
		desc = ca_steppe_stable_desc
		potential = {
			OR = {
				terrain = plains
				terrain = steppe
			}
			FROM = {
				OR = {
					culture_group = altaic
					culture_group = magyar
					culture = alan
				}
			}
		}
		replaces = tb_practice_range_4
		trigger = {
			TECH_CAVALRY = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_steppe_stable_3
		prestige_cost = 600
		build_time = 1095
		light_cavalry = 12
		horse_archers = 5
		ai_creation_factor = 86
		
		convert_to_castle = ca_steppe_stable_2
		convert_to_city = ct_barracks_2

		extra_tech_building_start = 2.5
	}
	
	tb_arsenal_1 = {
		desc = tb_arsenal_desc
		trigger = {
			TECH_RECRUITMENT = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		prestige_cost = 300
		build_time = 547
		land_morale = 0.1
		levy_reinforce_rate = 0.1
		ai_creation_factor = 98

		extra_tech_building_start = 0.3
	}
	
	tb_arsenal_2 = {
		desc = tb_arsenal_desc
		trigger = {
			TECH_RECRUITMENT = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_arsenal_1
		prestige_cost = 400
		build_time = 730
		land_morale = 0.1
		levy_reinforce_rate = 0.1
		ai_creation_factor = 97

		extra_tech_building_start = 1.5
		
		convert_to_castle = ca_training_grounds_1
		convert_to_city = ct_rep_arsenal_1
		convert_to_temple = tp_elite_barracks_1
	}
	
	tb_arsenal_3 = {
		desc = tb_arsenal_desc
		trigger = {
			TECH_RECRUITMENT = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_arsenal_2
		prestige_cost = 500
		build_time = 1095
		land_morale = 0.1
		levy_reinforce_rate = 0.1
		ai_creation_factor = 96
		
		extra_tech_building_start = 2
	}
	
	tb_arsenal_4 = {
		desc = tb_arsenal_desc
		trigger = {
			TECH_RECRUITMENT = 0
			hidden_tooltip = {
				FROM = {
					OR = {
						ai = no
						NOT = { has_character_modifier = ai_austerity }
					}
				}
			}
		}
		upgrades_from = tb_arsenal_3
		prestige_cost = 600
		build_time = 1460
		land_morale = 0.1
		levy_reinforce_rate = 0.1
		ai_creation_factor = 95
		
		extra_tech_building_start = 2.5
		
		convert_to_castle = ca_training_grounds_2
		convert_to_city = ct_rep_arsenal_2
		convert_to_temple = tp_elite_barracks_2
	}

	tb_desert_stable_1 = {
		desc = tb_desert_stable_desc
		potential = {
			terrain = desert
			FROM = {
				OR = {
					culture_group = east_african
					culture_group = west_african
					culture_group = arabic
					culture_group = iranian
					culture_group = amazigh
					culture_group = maghrebi
				}
			}
		}
		replaces = tb_practice_range_1
		trigger = { TECH_CAVALRY = 0 }
		prestige_cost = 300
		build_time = 365
		light_cavalry = 12
		horse_archers = 5
		ai_creation_factor = 89
		
		extra_tech_building_start = 0.3
	}
	
	tb_desert_stable_2 = {
		desc = tb_desert_stable_desc
		potential = {
			terrain = desert
			FROM = {
				OR = {
					culture_group = east_african
					culture_group = west_african
					culture_group = arabic
					culture_group = iranian
					culture_group = amazigh
					culture_group = maghrebi
				}
			}
		}
		replaces = tb_practice_range_2
		trigger = { TECH_CAVALRY = 0 }
		upgrades_from = tb_desert_stable_1
		prestige_cost = 400
		build_time = 547
		light_cavalry = 12
		horse_archers = 5
		ai_creation_factor = 88
		
		convert_to_castle = ca_desert_stable_1
		convert_to_city = ct_barracks_1

		extra_tech_building_start = 1.5
	}
	
	tb_desert_stable_3 = {
		desc = tb_desert_stable_desc
		potential = {
			terrain = desert
			FROM = {
				OR = {
					culture_group = east_african
					culture_group = west_african
					culture_group = arabic
					culture_group = iranian
					culture_group = amazigh
					culture_group = maghrebi
				}
			}
		}
		replaces = tb_practice_range_3
		trigger = { TECH_CAVALRY = 0 }
		upgrades_from = tb_desert_stable_2
		prestige_cost = 500
		build_time = 730
		light_cavalry = 12
		horse_archers = 5
		ai_creation_factor = 87

		extra_tech_building_start = 2
	}
	
	tb_desert_stable_4 = {
		desc = tb_desert_stable_desc
		potential = {
			terrain = desert
			FROM = {
				OR = {
					culture_group = east_african
					culture_group = west_african
					culture_group = arabic
					culture_group = iranian
					culture_group = amazigh
					culture_group = maghrebi
				}
			}
		}
		replaces = tb_practice_range_4
		trigger = { TECH_CAVALRY = 0 }
		upgrades_from = tb_desert_stable_3
		prestige_cost = 600
		build_time = 1095
		light_cavalry = 12
		horse_archers = 5
		ai_creation_factor = 86
		
		convert_to_castle = ca_desert_stable_2
		convert_to_city = ct_barracks_2

		extra_tech_building_start = 2.5
	}
}	
	