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

trade_post = {

	tr_port_1 = {
		potential = {
			port = yes
		}
		trigger = {
			TECH_TRADE_PRACTICES = 1
			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				is_tribal = no
				is_nomadic = no
			}
		}
		desc = tr_port_1_desc
		gold_cost = 100
		build_time = 182
		ai_creation_factor = 95
		
		tradevalue = 10
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	tr_port_2 = {
		potential = {
			port = yes			
		}
		trigger = {
			TECH_TRADE_PRACTICES = 3
			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				is_tribal = no
				is_nomadic = no
			}
		}
		desc = tr_port_2_desc
		gold_cost = 150
		build_time = 274
		upgrades_from = tr_port_1
		ai_creation_factor = 94
		
		tradevalue = 15
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	tr_port_3 = {
		potential = {
			port = yes			
		}
		trigger = {
			TECH_TRADE_PRACTICES = 5
			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				is_tribal = no
				is_nomadic = no
			}
		}
		desc = tr_port_3_desc
		gold_cost = 200
		build_time = 365
		upgrades_from = tr_port_2
		ai_creation_factor = 93
		
		tradevalue = 20
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	tr_enclave_1 = {
		potential = {
			port = yes
			FROM = {
				is_patrician = yes
			}
		}
		desc = tr_enclave_1_desc
		trigger = { TECH_TRADE_PRACTICES = 0 }
		gold_cost = 100
		build_time = 182
		ai_creation_factor = 90
		
		tax_income = 1
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	tr_enclave_2 = {
		potential = {
			port = yes
			FROM = {
				is_patrician = yes
			}
		}
		desc = tr_enclave_2_desc
		trigger = { TECH_TRADE_PRACTICES = 0 }
		gold_cost = 150
		build_time = 274
		upgrades_from = tr_enclave_1
		ai_creation_factor = 89
		
		tax_income = 1.5
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	tr_enclave_3 = {
		potential = {
			port = yes
			FROM = {
				is_patrician = yes
			}
		}
		desc = tr_enclave_3_desc
		trigger = { TECH_TRADE_PRACTICES = 0 }
		gold_cost = 200
		build_time = 365
		upgrades_from = tr_enclave_2
		ai_creation_factor = 88
		
		scouting = yes
		tax_income = 2
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	tr_garrison_1 = {
		potential = {
			FROM = {
				is_patrician = yes
			}
		}
		desc = tr_garrison_1_desc
		trigger = { TECH_TRADE_PRACTICES = 0 }
		gold_cost = 100
		build_time = 182
		ai_creation_factor = 91
		
		retinuesize = 20
		garrison_size = 1.0
		fort_level = 1
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	tr_garrison_2 = {
		potential = {
			FROM = {
				is_patrician = yes
			}
		}
		desc = tr_garrison_2_desc
		trigger = { TECH_TRADE_PRACTICES = 0 }
		gold_cost = 150
		build_time = 274
		upgrades_from = tr_garrison_1
		ai_creation_factor = 90
		
		retinuesize = 30
		garrison_size = 1.5
		fort_level = 2
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	tr_garrison_3 = {
		potential = {
			FROM = {
				is_patrician = yes
			}
		}
		desc = tr_garrison_3_desc
		trigger = { TECH_TRADE_PRACTICES = 0 }
		gold_cost = 200
		build_time = 365
		upgrades_from = tr_garrison_2
		ai_creation_factor = 89
		
		retinuesize = 50
		garrison_size = 2.0
		fort_level = 3
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}

	tr_silk_road_1 = {	# Silk Road Trading Post
		potential = {
			trade_route = silk_road
		}
		desc = tr_silk_road_1_desc
		trigger = {
			TECH_TRADE_PRACTICES = 1
			custom_tooltip = {
				text = TR_SILK_ROAD_1_OTHER_PROVINCES_CONDITION
				NOT = {
					any_trade_route_province = {
						NOT = {
							distance = {
								where = ROOT
								value = 100
							}
						}
						OR = {
							trade_post_has_building = tr_silk_road_1
							trade_post_has_building = tr_silk_road_2
							trade_post_has_building = tr_silk_road_3
						}
					}
				}
			}
		}
		gold_cost = 200
		build_time = 150
		ai_creation_factor = 95
		
		trade_route_wealth = 3	# Affects total value of trade route
		trade_route_value = 1	# Affects your cut of the trade route income
		tradevalue = 10
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	tr_silk_road_2 = {	# Silk Road Market
		potential = {
			trade_route = silk_road
		}
		desc = tr_silk_road_2_desc
		trigger = {
			TECH_TRADE_PRACTICES = 2
			custom_tooltip = {
				text = TR_SILK_ROAD_2_OTHER_PROVINCES_CONDITION
				NOT = {
					any_trade_route_province = {
						NOT = {
							distance = {
								where = ROOT
								value = 200
							}
						}
						OR = {
							trade_post_has_building = tr_silk_road_2
							trade_post_has_building = tr_silk_road_3
						}
					}
				}
			}
		}
		gold_cost = 400
		build_time = 300
		upgrades_from = tr_silk_road_1
		ai_creation_factor = 95
		
		trade_route_wealth = 5	# Affects total value of trade route
		trade_route_value = 2	# Affects your cut of the trade route income
		tradevalue = 20
		fort_level = 1
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
	tr_silk_road_3 = {	# Major Silk Road City
		potential = {
			trade_route = silk_road
		}
		desc = tr_silk_road_3_desc
		trigger = {
			TECH_TRADE_PRACTICES = 4
			custom_tooltip = {
				text = TR_SILK_ROAD_3_OTHER_PROVINCES_CONDITION
				NOT = {
					any_trade_route_province = {
						NOT = {
							distance = {
								where = ROOT
								value = 500
							}
						}
						trade_post_has_building = tr_silk_road_3
					}
				}
			}
		}
		gold_cost = 800
		build_time = 600
		upgrades_from = tr_silk_road_2
		ai_creation_factor = 95
		
		trade_route_wealth = 15	# Affects total value of trade route
		trade_route_value = 3	# Affects your cut of the trade route income
		tradevalue = 20
		fort_level = 3
		
		extra_tech_building_start = 10.0 # Never get at start of game
	}
	
}
