tr_est_isolation_adopt = {
	unlocks_agenda = agenda_est_isolation
	modifier = {
		empire_size_pops_mult = -0.10
	}	
}

tr_est_isolation_finish = {
	custom_tooltip = tr_est_isolation_finish_desc

	on_enabled = {
		if = { 
			limit = {
				is_at_war = no
			}
			add_modifier = {
				modifier = "mod_est_isolation_finish"
			}
		}
	}
	
	modifier = {	
		ascension_perks_add = 1
	}
	
	tradition_swap = {
		custom_tooltip = tr_est_isolation_finish_GC_desc
	
		name = tr_est_isolation_finish_GC
		inherit_icon = yes
		inherit_name = yes
		trigger = { is_gestalt = yes }	
		modifier = {
			ascension_perks_add = 1
		}
		on_enabled = {
			if = { 
				limit = {
					is_at_war = no
				}
				add_modifier = {
					modifier = "mod_est_isolation_finish_GC"
				}
			}
		}
		weight = { factor = 1 }
	}
}


tr_est_isolation_1 = {
	modifier = {
		starbases_upkeep_mult = -0.15
		starbase_defense_platform_capacity_add = 3
	}

	ai_weight = { factor = 5000 }
}

tr_est_isolation_2 = {
	modifier = {
		army_defense_morale_mult = 0.5
		ship_home_territory_fire_rate_mult = 0.2
	}

	ai_weight = { factor = 5000 }
}

tr_est_isolation_3 = {
	custom_tooltip = tr_est_isolation_3_desc

	possible = { 
		has_tradition = tr_est_isolation_1
		has_tradition = tr_est_isolation_2
	}
	
	modifier = {
		starbase_outpost_alloys_cost_mult = -0.20
		country_starbase_influence_cost_mult = -0.10 # Only outposts should cost influence.
	}

	ai_weight = { factor = 5000 }
}

tr_est_isolation_4 = {
	possible = { has_tradition = tr_est_isolation_3 }
	
	modifier = {
		pop_government_ethic_attraction = 0.15
	}
	
	tradition_swap = {
		name = tr_est_isolation_4_GC
		trigger = { is_gestalt = yes }	
		modifier = {
			country_border_friction_mult = -0.80
		}
		weight = { factor = 1 }
	}

	ai_weight = { factor = 5000 }
}

tr_est_isolation_5 = {
	custom_tooltip = tr_est_isolation_5_desc

	possible = { has_tradition = tr_est_isolation_3 }
	
	on_enabled = {
		if = {
			limit = {
				NOT = {
					any_relation = {
						has_communications = root
						OR = {
							has_diplo_migration_treaty = root
							has_research_agreement = root
							is_in_federation_with = root
							is_guaranteeing = root
							has_defensive_pact = root
						}
					}
				}	
				#trade_income < 1
				#trade_expenses < 1
			}				
			add_modifier = {
				modifier = "mod_est_isolation_5"
			}		
		}
	}
	
	tradition_swap = {
		custom_tooltip = tr_est_isolation_5_GC_desc
	
		name = tr_est_isolation_5_GC
		trigger = { is_gestalt = yes }	
		on_enabled = {
			if = {
				limit = {
					NOT = {
						any_relation = {
							has_communications = root
							OR = {
								has_diplo_migration_treaty = root
								has_research_agreement = root
								is_in_federation_with = root
								is_guaranteeing = root
								has_defensive_pact = root
							}
						}
					}	
					#trade_income < 1
					#trade_expenses < 1
				}				
				add_modifier = {
					modifier = "mod_est_isolation_5_GC"
				}	
			}
		}
		weight = { factor = 1 }
	}

	ai_weight = { factor = 5000 }
}