on_actions = {
	
	#Root is exile
	#From is new host
	#FromFrom is old host
	on_host_changed_from_capitulation = {
		effect = {
			#Transfer exile leaders to new host
			From.From = {
				every_army_leader = {
					limit = { is_exiled_leader_from = Root }
					set_nationality = Root.From
				}
			}
		}
	}

	#Root is exile
	#From is old host
	on_exile_government_reinstated = {
		effect = {
			From = {
				every_army_leader = {
					limit = { is_exiled_leader_from = Root }
					set_nationality = Root
				}
			}
			Root = {
				every_army_leader = {
					limit = { is_exiled_leader_from = Root }
					remove_unit_leader_trait = exiled_leader
					remove_exile_tag = yes
				}
			}
		}
	}

	on_unit_leader_created = {
		effect = {
			if = {
				limit = { is_exiled_leader = yes }
				From.From = { save_event_target_as = exile_nation }
				add_unit_leader_trait = exiled_leader
				
				add_random_trait = {
					old_guard
					brilliant_strategist
					inflexible_strategist
					war_hero
					trait_cautious
					trait_reckless
					media_personality
					harsh_leader
					infantry_officer
					cavalry_officer
					armor_officer
				}

				add_random_trait = {
					organizer
					panzer_leader
					cavalry_leader
					trait_engineer
					infantry_leader
					naval_invader						
					commando
					skilled_staffer
					trickster					
				}

				unit_leader_event = { id = mtg_exile_leader_added.1 }
			}
		}
	}

	#ROOT is winner #FROM gets annexed - This will also fire on_annex
	

	#ROOT is winner #FROM gets annexed - This fires just before FROM gets annexed, meaning the country and everything it owns still exists. It will also fire on_annex and on_civil_war_end
	

	#FROM is war target
	
	
	#ROOT = nation being puppeted, FROM = overlord
	

	# ROOT is capitulated country, FROM is winner
	

	#ROOT is winner #FROM is loser
	

	#ROOT is new controller #FROM is old controller #FROM.FROM is state ID
	

	# FROM is the sinker, ROOT is the owner of the ship being sunk

}
