trade_post = {
	# Rus Trade Guild
	tr_rus_road_trade_guild_1 = { # Rus Trade Guild Stage 1
		desc = tr_trade_guild_1_desc
		potential = { trade_route = rus_road }
		trigger = {
			trading_post_building_allow = yes
			no_other_trade_guild_types_trigger = yes
			custom_tooltip = {
				text = TR_TRADE_GUILD_3_OTHER_PROVINCES_CONDITION

				NOT = {
					any_trade_route_province = {
						trade_post_has_building = tr_rus_road_trade_guild_1

						distance = {
							where = ROOT
							value < 300
						}
					}
				}
			}
			TECH_TRADE_PRACTICES >= 5
			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
		}
		gold_cost = 300
		build_time = 300

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 6	# Affects your cut of the trade route income
		tradevalue = 15			# 15 gold per year generated

		ai_creation_factor = 120
		extra_tech_building_start = 6.0
	}
	tr_rus_road_trade_guild_2 = { # Rus Trade Guild Stage 2
		desc = tr_trade_guild_2_desc
		potential = { trade_route = rus_road }
		trigger = {
			trading_post_building_allow = yes
			TECH_TRADE_PRACTICES >= 7
			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
		}
		upgrades_from = tr_rus_road_trade_guild_1
		gold_cost = 600
		build_time = 400

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 12	# Affects your cut of the trade route income
		tradevalue = 20			# 20 gold per year generated

		ai_creation_factor = 120
		extra_tech_building_start = 8
	}
	tr_rus_road_trade_guild_3 = { # Rus Trade Guild Stage 3
		desc = tr_trade_guild_3_desc
		potential = { trade_route = rus_road }
		trigger = {
			trading_post_building_allow = yes
			custom_tooltip = {
				text = TR_TRADE_GUILD_1_IN_WORLD
				has_province_modifier = trade_guild_hq # Only one guild headquarters in the world per route
			}
			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
		}
		upgrades_from = tr_rus_road_trade_guild_2
		gold_cost = 600
		build_time = 400

		trade_route_value = 24	# Affects your cut of the trade route income
		trade_route_wealth = 10	# Affects total value of trade route
		tradevalue = 30			# 30 gold per year generated

		ai_creation_factor = 120
		extra_tech_building_start = 8
	}

	# Amber Road Trade Guild
	tr_amber_road_trade_guild_1 = {	# Amber Trade Guild Stage 1
		desc = tr_trade_guild_1_desc
		gold_cost = 300
		build_time = 300
		ai_creation_factor = 120
		extra_tech_building_start = 6.0

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 6	# Affects your cut of the trade route income
		tradevalue = 15			# 15 gold per year generated

		potential = {
			trade_route = amber_road
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 5

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			# May only have 1 of the same type of guild every 300 range
			custom_tooltip = {
				text = TR_TRADE_GUILD_3_OTHER_PROVINCES_CONDITION

				NOT = {
					any_trade_route_province = {
						trade_post_has_building = tr_amber_road_trade_guild_1

						distance = {
							where = ROOT
							value < 300
						}
					}
				}
			}

			no_other_trade_guild_types_trigger = yes
			trading_post_building_allow = yes
		}
	}
	tr_amber_road_trade_guild_2 = {	# Amber Trade Guild Stage 2
		desc = tr_trade_guild_2_desc
		upgrades_from = tr_amber_road_trade_guild_1
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 12	# Affects your cut of the trade route income
		tradevalue = 20			# 20 gold per year generated

		potential = {
			trade_route = amber_road
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 7

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
			trading_post_building_allow = yes
		}
	}
	tr_amber_road_trade_guild_3 = {	# Amber Trade Guild Stage 3
		desc = tr_trade_guild_3_desc
		upgrades_from = tr_amber_road_trade_guild_2
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_value = 24	# Affects your cut of the trade route income
		trade_route_wealth = 10	# Affects total value of trade route
		tradevalue = 30			# 30 gold per year generated

		potential = {
			trade_route = amber_road
		}

		trigger = {
			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			custom_tooltip = {
				text = TR_TRADE_GUILD_1_IN_WORLD
				has_province_modifier = trade_guild_hq # Only one guild headquarters in the world per route
			}
			trading_post_building_allow = yes
		}
	}

	# Balkan Road Trade Guild
	tr_balkan_road_trade_guild_1 = { # Balkan Trade Guild Stage 1
		desc = tr_trade_guild_1_desc
		gold_cost = 300
		build_time = 300
		ai_creation_factor = 120
		extra_tech_building_start = 6.0

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 6	# Affects your cut of the trade route income
		tradevalue = 15			# 15 gold per year generated

		potential = {
			trade_route = balkan_road
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 5

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			# May only have 1 of the same type of guild every 300 range
			custom_tooltip = {
				text = TR_TRADE_GUILD_3_OTHER_PROVINCES_CONDITION

				NOT = {
					any_trade_route_province = {
						trade_post_has_building = tr_balkan_road_trade_guild_1

						distance = {
							where = ROOT
							value < 300
						}
					}
				}
			}

			no_other_trade_guild_types_trigger = yes
			trading_post_building_allow = yes
		}
	}
	tr_balkan_road_trade_guild_2 = { # Balkan Trade Guild Stage 2
		desc = tr_trade_guild_2_desc
		upgrades_from = tr_balkan_road_trade_guild_1
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 12	# Affects your cut of the trade route income
		tradevalue = 20			# 20 gold per year generated

		potential = {
			trade_route = balkan_road
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 7

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
			trading_post_building_allow = yes
		}
	}
	tr_balkan_road_trade_guild_3 = { # Balkan Trade Guild Stage 3
		desc = tr_trade_guild_3_desc
		upgrades_from = tr_balkan_road_trade_guild_2
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_value = 24	# Affects your cut of the trade route income
		trade_route_wealth = 10	# Affects total value of trade route
		tradevalue = 30			# 30 gold per year generated

		potential = {
			trade_route = balkan_road
		}

		trigger = {
			custom_tooltip = {
				text = TR_TRADE_GUILD_1_IN_WORLD
				has_province_modifier = trade_guild_hq # Only one guild headquarters in the world per route
			}

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
			trading_post_building_allow = yes
		}
	}

	# French Trade Guild
	tr_french_trade_guild_1 = {	# French Trade Guild Stage 1
		desc = tr_trade_guild_1_desc
		gold_cost = 300
		build_time = 300
		ai_creation_factor = 120
		extra_tech_building_start = 6.0

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 6	# Affects your cut of the trade route income
		tradevalue = 15			# 15 gold per year generated

		potential = {
			trade_route = french_trade
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 5

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			# May only have 1 of the same type of guild every 300 range
			custom_tooltip = {
				text = TR_TRADE_GUILD_3_OTHER_PROVINCES_CONDITION

				NOT = {
					any_trade_route_province = {
						trade_post_has_building = tr_french_trade_guild_1

						distance = {
							where = ROOT
							value < 300
						}
					}
				}
			}

			no_other_trade_guild_types_trigger = yes
			trading_post_building_allow = yes
		}
	}
	tr_french_trade_guild_2 = {	# French Trade Guild Stage 2
		desc = tr_trade_guild_2_desc
		upgrades_from = tr_french_trade_guild_1
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 12	# Affects your cut of the trade route income
		tradevalue = 20			# 20 gold per year generated

		potential = {
			trade_route = french_trade
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 7

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
			trading_post_building_allow = yes
		}
	}
	tr_french_trade_guild_3 = {	# French Trade Guild Stage 3
		desc = tr_trade_guild_3_desc
		upgrades_from = tr_french_trade_guild_2
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_value = 24	# Affects your cut of the trade route income
		trade_route_wealth = 10	# Affects total value of trade route
		tradevalue = 30			# 30 gold per year generated

		potential = {
			trade_route = french_trade
		}

		trigger = {
			custom_tooltip = {
				text = TR_TRADE_GUILD_1_IN_WORLD
				has_province_modifier = trade_guild_hq #Only one guild headquarters in the world per route
			}

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
			trading_post_building_allow = yes
		}
	}

	# Iberian Trade Guild
	tr_iberian_trade_guild_1 = { # Iberian Trade Guild Stage 1
		desc = tr_trade_guild_1_desc
		gold_cost = 300
		build_time = 300
		ai_creation_factor = 120
		extra_tech_building_start = 6.0

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 6	# Affects your cut of the trade route income
		tradevalue = 15			# 15 gold per year generated

		potential = {
			trade_route = iberian_trade
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 5

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			# May only have 1 of the same type of guild every 300 range
			custom_tooltip = {
				text = TR_TRADE_GUILD_3_OTHER_PROVINCES_CONDITION

				NOT = {
					any_trade_route_province = {
						trade_post_has_building = tr_iberian_trade_guild_1

						distance = {
							where = ROOT
							value < 300
						}
					}
				}
			}

			no_other_trade_guild_types_trigger = yes
			trading_post_building_allow = yes
		}
	}
	tr_iberian_trade_guild_2 = { # Iberian Trade Guild Stage 2
		desc = tr_trade_guild_2_desc
		upgrades_from = tr_iberian_trade_guild_1
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 12	# Affects your cut of the trade route income
		tradevalue = 20			# 20 gold per year generated

		potential = {
			trade_route = iberian_trade
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 7

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
			trading_post_building_allow = yes
		}
	}
	tr_iberian_trade_guild_3 = { # Iberian Trade Guild Stage 3
		desc = tr_trade_guild_3_desc
		upgrades_from = tr_iberian_trade_guild_2
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_value = 24	# Affects your cut of the trade route income
		trade_route_wealth = 10	# Affects total value of trade route
		tradevalue = 30			# 30 gold per year generated

		potential = {
			trade_route = iberian_trade
		}

		trigger = {
			custom_tooltip = {
				text = TR_TRADE_GUILD_1_IN_WORLD
				has_province_modifier = trade_guild_hq # Only one guild headquarters in the world per route
			}

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			trading_post_building_allow = yes
		}
	}

	# British Trade Guild
	tr_british_trade_guild_1 = { # British Trade Guild Stage 1
		desc = tr_trade_guild_1_desc
		gold_cost = 300
		build_time = 300
		ai_creation_factor = 120
		extra_tech_building_start = 6.0

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 6	# Affects your cut of the trade route income
		tradevalue = 15			# 15 gold per year generated

		potential = {
			trade_route = british_trade
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 5

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			# May only have 1 of the same type of guild every 300 range
			custom_tooltip = {
				text = TR_TRADE_GUILD_3_OTHER_PROVINCES_CONDITION

				NOT = {
					any_trade_route_province = {
						trade_post_has_building = tr_british_trade_guild_1

						distance = {
							where = ROOT
							value < 300
						}
					}
				}
			}

			no_other_trade_guild_types_trigger = yes
			trading_post_building_allow = yes
		}
	}
	tr_british_trade_guild_2 = { # British Trade Guild Stage 2
		desc = tr_trade_guild_2_desc
		upgrades_from = tr_british_trade_guild_1
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 12	# Affects your cut of the trade route income
		tradevalue = 20			# 20 gold per year generated

		potential = {
			trade_route = british_trade
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 7

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
			trading_post_building_allow = yes
		}
	}
	tr_british_trade_guild_3 = { # British Trade Guild Stage 3
		desc = tr_trade_guild_3_desc
		upgrades_from = tr_british_trade_guild_2
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_value = 24	# Affects your cut of the trade route income
		trade_route_wealth = 10	# Affects total value of trade route
		tradevalue = 30			# 30 gold per year generated

		potential = {
			trade_route = british_trade
		}

		trigger = {
			custom_tooltip = {
				text = TR_TRADE_GUILD_1_IN_WORLD
				has_province_modifier = trade_guild_hq # Only one guild headquarters in the world per route
			}

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
			trading_post_building_allow = yes
		}
	}

	# Atlantic Trade Guild
	tr_atlantic_trade_guild_1 = { # Atlantic Trade Guild Stage 1
		desc = tr_trade_guild_1_desc
		gold_cost = 300
		build_time = 300
		ai_creation_factor = 120
		extra_tech_building_start = 6.0

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 6	# Affects your cut of the trade route income
		tradevalue = 15			# 15 gold per year generated

		potential = {
			trade_route = atlantic_trade
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 5

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			# May only have 1 of the same type of guild every 300 range
			custom_tooltip = {
				text = TR_TRADE_GUILD_3_OTHER_PROVINCES_CONDITION

				NOT = {
					any_trade_route_province = {
						trade_post_has_building = tr_atlantic_trade_guild_1

						distance = {
							where = ROOT
							value < 300
						}
					}
				}
			}

			no_other_trade_guild_types_trigger = yes
			trading_post_building_allow = yes
		}
	}
	tr_atlantic_trade_guild_2 = { # Atlantic Trade Guild Stage 2
		desc = tr_trade_guild_2_desc
		upgrades_from = tr_atlantic_trade_guild_1
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 12	# Affects your cut of the trade route income
		tradevalue = 20			# 20 gold per year generated

		potential = {
			trade_route = atlantic_trade
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 7

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
			trading_post_building_allow = yes
		}
	}
	tr_atlantic_trade_guild_3 = { # Atlantic Trade Guild Stage 3
		desc = tr_trade_guild_3_desc
		upgrades_from = tr_atlantic_trade_guild_2
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_value = 24	# Affects your cut of the trade route income
		trade_route_wealth = 10	# Affects total value of trade route
		tradevalue = 30			# 30 gold per year generated

		potential = {
			trade_route = atlantic_trade
		}

		trigger = {
			custom_tooltip = {
				text = TR_TRADE_GUILD_1_IN_WORLD
				has_province_modifier = trade_guild_hq #Only one guild headquarters in the world per route
			}

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
			trading_post_building_allow = yes
		}
	}

	# Baltic Trade Guild
	tr_baltic_trade_guild_1 = { # Baltic Trade Guild Stage 1
		desc = tr_trade_guild_1_desc
		gold_cost = 300
		build_time = 300
		ai_creation_factor = 120
		extra_tech_building_start = 6.0

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 6	# Affects your cut of the trade route income
		tradevalue = 15			# 15 gold per year generated

		potential = {
			trade_route = baltic_sea
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 5

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			# May only have 1 of the same type of guild every 300 range
			custom_tooltip = {
				text = TR_TRADE_GUILD_3_OTHER_PROVINCES_CONDITION

				NOT = {
					any_trade_route_province = {
						trade_post_has_building = tr_baltic_trade_guild_1

						distance = {
							where = ROOT
							value < 300
						}
					}
				}
			}

			no_other_trade_guild_types_trigger = yes
			trading_post_building_allow = yes
		}
	}
	tr_baltic_trade_guild_2 = { # Baltic Trade Guild Stage 2
		desc = tr_trade_guild_2_desc
		upgrades_from = tr_baltic_trade_guild_1
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 12	# Affects your cut of the trade route income
		tradevalue = 20			# 20 gold per year generated

		potential = {
			trade_route = baltic_sea
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 7

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}
			trading_post_building_allow = yes
		}
	}
	tr_baltic_trade_guild_3 = {	# Baltic Trade Guild Stage 3
		desc = tr_trade_guild_3_desc
		upgrades_from = tr_baltic_trade_guild_2
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_value = 24	# Affects your cut of the trade route income
		trade_route_wealth = 10	# Affects total value of trade route
		tradevalue = 30			# 30 gold per year generated

		potential = {
			trade_route = baltic_sea
		}

		trigger = {
			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			custom_tooltip = {
				text = TR_TRADE_GUILD_1_IN_WORLD
				has_province_modifier = trade_guild_hq #Only one guild headquarters in the world per route
			}
			trading_post_building_allow = yes
		}
	}

	# Mediterranean Trade Guild
	tr_mediterranean_trade_guild_1 = { # Mediterranean Trade Guild Stage 1
		desc = tr_trade_guild_1_desc
		gold_cost = 300
		build_time = 300
		ai_creation_factor = 120
		extra_tech_building_start = 6.0

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 6	# Affects your cut of the trade route income
		tradevalue = 15			# 15 gold per year generated

		potential = {
			trade_route = mediterranean_trade
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 5

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			# May only have 1 of the same type of guild every 300 range
			custom_tooltip = {
				text = TR_TRADE_GUILD_3_OTHER_PROVINCES_CONDITION

				NOT = {
					any_trade_route_province = {
						trade_post_has_building = tr_mediterranean_trade_guild_1

						distance = {
							where = ROOT
							value < 300
						}
					}
				}
			}

			no_other_trade_guild_types_trigger = yes
			trading_post_building_allow = yes
		}
	}
	tr_mediterranean_trade_guild_2 = { # Mediterranean Guild Stage 2
		desc = tr_trade_guild_2_desc
		upgrades_from = tr_mediterranean_trade_guild_1
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 12	# Affects your cut of the trade route income
		tradevalue = 20			# 20 gold per year generated

		potential = {
			trade_route = mediterranean_trade
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 7

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			trading_post_building_allow = yes
		}
	}
	tr_mediterranean_trade_guild_3 = { # Mediterranean Trade Guild Stage 3
		desc = tr_trade_guild_3_desc
		upgrades_from = tr_mediterranean_trade_guild_2
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_value = 24	# Affects your cut of the trade route income
		trade_route_wealth = 10	# Affects total value of trade route
		tradevalue = 30			# 30 gold per year generated

		potential = {
			trade_route = mediterranean_trade
		}

		trigger = {
			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			custom_tooltip = {
				text = TR_TRADE_GUILD_1_IN_WORLD
				has_province_modifier = trade_guild_hq # Only one guild headquarters in the world per route
			}

			trading_post_building_allow = yes
		}
	}

	# Salt Road Trade Guild
	tr_salt_road_trade_guild_1 = { # Salt Road Trade Guild Stage 1
		desc = tr_trade_guild_1_desc
		gold_cost = 300
		build_time = 300
		ai_creation_factor = 120
		extra_tech_building_start = 6.0

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 6	# Affects your cut of the trade route income
		tradevalue = 15			# 15 gold per year generated

		potential = {
			trade_route = salt_road
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 5

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			# May only have 1 of the same type of guild every 300 range
			custom_tooltip = {
				text = TR_TRADE_GUILD_3_OTHER_PROVINCES_CONDITION

				NOT = {
					any_trade_route_province = {
						trade_post_has_building = tr_salt_road_trade_guild_1

						distance = {
							where = ROOT
							value < 300
						}
					}
				}
			}

			no_other_trade_guild_types_trigger = yes
			trading_post_building_allow = yes
		}
	}
	tr_salt_road_trade_guild_2 = { # Salt Road Guild Stage 2
		desc = tr_trade_guild_2_desc
		upgrades_from = tr_salt_road_trade_guild_1
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_wealth = 10	# Affects total value of trade route
		trade_route_value = 12	# Affects your cut of the trade route income
		tradevalue = 20			# 20 gold per year generated

		potential = {
			trade_route = salt_road
		}

		trigger = {
			TECH_TRADE_PRACTICES >= 7

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			trading_post_building_allow = yes
		}
	}
	tr_salt_road_trade_guild_3 = { # Salt Road Trade Guild Stage 3
		desc = tr_trade_guild_3_desc
		upgrades_from = tr_salt_road_trade_guild_2
		gold_cost = 600
		build_time = 400
		ai_creation_factor = 120
		extra_tech_building_start = 8

		trade_route_value = 24	# Affects your cut of the trade route income
		trade_route_wealth = 10	# Affects total value of trade route
		tradevalue = 30			# 30 gold per year generated

		potential = {
			trade_route = salt_road
		}

		trigger = {
			custom_tooltip = {
				text = TR_TRADE_GUILD_1_IN_WORLD
				has_province_modifier = trade_guild_hq # Only one guild headquarters in the world per route
			}

			FROM = { # Tribals and Nomads are not allowed to have anything past a trade post
				show_only_failed_conditions = yes

				is_tribal = no
				is_nomadic = no
			}

			trading_post_building_allow = yes
		}
	}
}