on_actions = {
	on_unit_leader_created = { # This uses the UNIT LEADER sub scope of a character, FROM == country
		effect = {
			character = {
				if = { 
					limit = {
						is_army_leader = yes
					}
					if = {
						limit = {	
							FROM = { has_idea = political_loyalty_spirit } #done here instead of the trait file to avoid some oddness with generating assignable traits under certain circumstances, makes it easier to control probabilities
						}
						root = {
							random_list = {
								50 = { 
									add_unit_leader_trait = media_personality
								}
								50 = { 
									add_unit_leader_trait = politically_connected
								}
							}
						}
						
					}
					else_if = {
						limit = {
							FROM = { has_idea = mobile_warfare_academy_spirit } #done here instead of the trait file to avoid some oddness with generating assignable traits under certain circumstances, makes it easier to control probabilities
						}
						root = {
							random_list = {
								50 = { 
									add_unit_leader_trait = panzer_leader
								}
								50 = {}
							}
						}
					}
					else_if = {
						limit = {
							FROM = { has_idea = mass_assault_academy_spirit } #done here instead of the trait file to avoid some oddness with generating assignable traits under certain circumstances, makes it easier to control probabilities
						}
						root = {
							random_list = {
								50 = { 
									add_unit_leader_trait = infantry_officer
								}
								50 = {}
							}
						}
					}
					else_if = {
						limit = {
							FROM = { has_idea = inventive_leadership_spirit } #done here instead of the trait file to avoid some oddness with generating assignable traits under certain circumstances, makes it easier to control probabilities
						}
						root = {
							random_list = {
								75 = { 
									random_list = {
										33 = { add_unit_leader_trait = naval_invader }
										33 = { add_unit_leader_trait = commando }
										33 = { add_unit_leader_trait = trickster }
									}
								}
								25 = {}
							}
						}
					}
					else_if = {
						limit = {
							FROM = { has_idea = superior_firepower_academy_spirit } #done here instead of the trait file to avoid some oddness with generating assignable traits under certain circumstances, makes it easier to control probabilities
						}
						root = {
							random_list = {
								50 = { 
									add_unit_leader_trait = engineer_officer
								}
								50 = {}
							}
						}
					}
					else_if = {
						limit = {
							FROM = { has_idea = theatre_training_spirit } #done here instead of the trait file to avoid some oddness with generating assignable traits under certain circumstances, makes it easier to control probabilities
						}
						root = {
							random_list = {
								50 = { 
									random_list = {
										50 = { add_unit_leader_trait = brilliant_strategist }
										50 = { add_unit_leader_trait = inflexible_strategist }
									}
								}
								50 = {}
							}
						}
					}
				}
				else_if = {
					limit = {
						FROM = { has_idea = fleet_in_being_academy_spirit } #done here instead of the trait file to avoid some oddness with generating assignable traits under certain circumstances, makes it easier to control probabilities
					}
					root = {
						random_list = {
							50 = { 
								add_unit_leader_trait = gunnery_expert
							}
							50 = {}
						}
					}
				}
				else_if = {
					limit = {
						FROM = { has_idea = trade_interdiction_academy_spirit } #done here instead of the trait file to avoid some oddness with generating assignable traits under certain circumstances, makes it easier to control probabilities
					}
					root = {
						random_list = {
							25 = { 
								add_unit_leader_trait = seawolf
							}
							25 = { 
								add_unit_leader_trait = blockade_runner
							}
							50 = {}
						}
					}
				}
				else_if = {
					limit = {
						FROM = { has_idea = base_strike_academy_spirit } #done here instead of the trait file to avoid some oddness with generating assignable traits under certain circumstances, makes it easier to control probabilities
					}
					root = {
						random_list = {
							50 = { 
								add_unit_leader_trait = aviation_enthusiast 
							}
							50 = {}
						}
					}
				}
			}
		}
	}

	
}