namespace = cato_education_events_setup_non_hereditary
###1-7 The player picking an education
###All events in this file should be hidden to players. Currently use mtth, could they be hooked to election on_action? Compatibility is primary concern.
############
### Events for assigning and upgrading Republics and Theocracies education traits
############
country_event = {
	id = cato_education_events_setup_non_hereditary.1 ###Marks them as having finished an education, which may be important for event triggers
	title = cato_education_events_setup_non_hereditary.1.title
	desc = cato_education_events_setup_non_hereditary.1.desc
	picture = ECONOMY_eventPicture
	
	hidden = yes
	trigger = {
		government_does_not_use_hereditary_heir = yes
		no_education_trait_ruler = yes
		NOT = {
			has_ruler_flag = heir_finished_education
		}
	}
	immediate = {
		set_ruler_flag = heir_finished_education
	}
	
	
	option = {
		name = cato_education_events_setup_non_hereditary.1.a
		country_event = {
			id = cato_education_events_setup_non_hereditary.2
		}
		ai_chance = {
			factor = 1
		}
	}
}
country_event = {
	id = cato_education_events_setup_non_hereditary.2 ###Hidden event where the ruler is assigned a category, based on things like personality traits, advisors, ideas, etc.
	title = cato_education_events_setup_non_hereditary.2.title
	desc = cato_education_events_setup_non_hereditary.2.desc
	picture = ECONOMY_eventPicture
	is_triggered_only = yes
	hidden = yes
	trigger = {
	}
	
	option = {
		name = cato_education_events_setup_non_hereditary.2.a
		set_ruler_flag = started_admin_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.3
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = economic_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = administrative_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = innovativeness_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = religious_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = humanist_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = expansion_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = aristocracy_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = plutocracy_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = trade_ideas
			}
			modifier = {
				factor = 3
				faction_in_power = mr_guilds
			}
			modifier = {
				factor = 1.2
				adm = 3
			}
			modifier = {
				factor = 1.2
				adm = 6
			}
		}
	}
	option = {
		name = cato_education_events_setup_non_hereditary.2.a
		set_ruler_flag = started_dip_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.4
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = trade_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = spy_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = influence_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = diplomatic_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = exploration_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = expansion_ideas
			}
			modifier = {
				factor = 3
				faction_in_power = mr_traders
			}
			modifier = {
				factor = 1.2
				dip = 3
			}
			modifier = {
				factor = 1.2
				dip = 6
			}
		}
	}
	option = {
		name = cato_education_events_setup_non_hereditary.2.a
		set_ruler_flag = started_mil_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.5
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = quality_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = quantity_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = offensive_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = defensive_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = naval_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = maritime_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = horde_gov_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = theocracy_gov_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = indigenous_ideas
			}
			modifier = {
				factor = 3
				faction_in_power = mr_aristocrats
			}
			modifier = {
				factor = 1.2
				mil = 3
			}
			modifier = {
				factor = 1.2
				mil = 6
			}
		}
	}
}
country_event = {
	id = cato_education_events_setup_non_hereditary.3 ###Hidden event where the ruler is assigned an administrative sub-category
	title = cato_education_events_setup_non_hereditary.3.title
	desc = cato_education_events_setup_non_hereditary.3.desc
	picture = ECONOMY_eventPicture
	
	is_triggered_only = yes
	hidden = yes
	trigger = {
	}
	
	option = {
		name = cato_education_events_setup_non_hereditary.3.a
		set_ruler_flag = clerical_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.6
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = religious_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = humanist_ideas
			}
		}
	}
	option = {
		name = cato_education_events_setup_non_hereditary.3.a
		set_ruler_flag = administrative_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.6
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = administrative_ideas
			}
		}
	}
	option = {
		name = cato_education_events_setup_non_hereditary.3.a
		set_ruler_flag = scholastic_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.6
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = innovativeness_ideas
			}
		}
	}
	option = {
		name = cato_education_events_setup_non_hereditary.3.a
		set_ruler_flag = industrial_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.6
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = economic_ideas
			}
		}
	}
}
country_event = {
	id = cato_education_events_setup_non_hereditary.4 ###Hidden event where the ruler is assigned a diplomatic sub-category
	title = cato_education_events_setup_non_hereditary.4.title
	desc = cato_education_events_setup_non_hereditary.4.desc
	picture = ECONOMY_eventPicture
	
	is_triggered_only = yes
	hidden = yes
	trigger = {
	}
	
	option = {
		name = cato_education_events_setup_non_hereditary.4.a
		set_ruler_flag = diplomacy_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.6
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = diplomatic_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = influence_ideas
			}
		}
	}
	option = {
		name = cato_education_events_setup_non_hereditary.4.a
		set_ruler_flag = intrigue_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.6
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = spy_ideas
			}
		}
	}
	option = {
		name = cato_education_events_setup_non_hereditary.4.a
		set_ruler_flag = trade_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.6
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = trade_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = economic_ideas
			}
		}
	}
	option = {
		name = cato_education_events_setup_non_hereditary.4.a
		set_ruler_flag = colonial_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.6
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = exploration_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = expansion_ideas
			}
		}
	}
}
country_event = {
	id = cato_education_events_setup_non_hereditary.5 ###Hidden event where the ruler is assigned a military sub-category
	title = cato_education_events_setup_non_hereditary.5.title
	desc = cato_education_events_setup_non_hereditary.5.desc
	picture = ECONOMY_eventPicture
	
	is_triggered_only = yes
	hidden = yes
	trigger = {
	}
	
	option = {
		name = cato_education_events_setup_non_hereditary.5.a
		set_ruler_flag = martial_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.6
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = quality_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = quantity_ideas
			}
		}
	}
	option = {
		name = cato_education_events_setup_non_hereditary.5.a
		set_ruler_flag = naval_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.6
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = maritime_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = naval_ideas
			}
		}
	}
	option = {
		name = cato_education_events_setup_non_hereditary.5.a
		set_ruler_flag = logistics_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.6
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = offensive_ideas
			}
			modifier = {
				factor = 1.2
				has_idea_group = defensive_ideas
			}
		}
	}
	option = {
		name = cato_education_events_setup_non_hereditary.5.a
		set_ruler_flag = modern_army_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.6
		}
		ai_chance = {
			factor = 1
			modifier = {
				factor = 1.2
				has_idea_group = quality_ideas
			}
		}
	}
}
country_event = {
	id = cato_education_events_setup_non_hereditary.6 ###Hidden event where the ruler is assigned an education level
	title = cato_education_events_setup_non_hereditary.6.title
	desc = cato_education_events_setup_non_hereditary.6.desc
	picture = ECONOMY_eventPicture
	
	is_triggered_only = yes
	hidden = yes
	trigger = {
	}
	
	option = {
		name = cato_education_events_setup_non_hereditary.6.a
		set_ruler_flag = poor_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.7
		}
		ai_chance = {
			factor = 10 ###Republics have a 10% chance for a basic education, 40% for okay, 40% for good, and 10% for masterful by default.
			modifier = {
				factor = 0.5 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				republican_tradition = 85
			}
			modifier = {
				factor = 0.75 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				republican_tradition = 65
				NOT = {
					republican_tradition = 85
				}
			}
			modifier = {
				factor = 1.5 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				republican_tradition = 15
				NOT = {
					republican_tradition = 35
				}
			}
			modifier = {
				factor = 2 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				NOT = {
					republican_tradition = 15
				}
			}
			modifier = {
				factor = 0.5 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				NOT = {
					corruption = 2.5
				}
			}
			modifier = {
				factor = 0.75 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				corruption = 2.5
				NOT = {
					corruption = 10
				}
			}
			modifier = {
				factor = 1.5 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				corruption = 20
				NOT = {
					corruption = 40
				}
			}
			modifier = {
				factor = 2 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				corruption = 40
			}
			modifier = {
				factor = 0.9 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 20
				NOT = {
					innovativeness = 40
				}
			}
			modifier = {
				factor = 0.8 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 40
				NOT = {
					innovativeness = 60
				}
			}
			modifier = {
				factor = 0.7 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 60
				NOT = {
					innovativeness = 80
				}
			}
			modifier = {
				factor = 0.6 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 80
				NOT = {
					innovativeness = 100
				}
			}
			modifier = {
				factor = 0.5 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 100
			}
		}
	}
	option = {
		name = cato_education_events_setup_non_hereditary.6.a
		set_ruler_flag = okay_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.7
		}
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0.5 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				republican_tradition = 85
			}
			modifier = {
				factor = 0.75 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				republican_tradition = 65
				NOT = {
					republican_tradition = 85
				}
			}
			modifier = {
				factor = 1.5 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				republican_tradition = 15
				NOT = {
					republican_tradition = 35
				}
			}
			modifier = {
				factor = 2 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				NOT = {
					republican_tradition = 15
				}
			}
			modifier = {
				factor = 0.5 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				NOT = {
					corruption = 2.5
				}
			}
			modifier = {
				factor = 0.75 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				corruption = 2.5
				NOT = {
					corruption = 10
				}
			}
			modifier = {
				factor = 1.5 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				corruption = 20
				NOT = {
					corruption = 40
				}
			}
			modifier = {
				factor = 2 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				corruption = 40
			}
			modifier = {
				factor = 0.9 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 20
				NOT = {
					innovativeness = 40
				}
			}
			modifier = {
				factor = 0.8 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 40
				NOT = {
					innovativeness = 60
				}
			}
			modifier = {
				factor = 0.7 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 60
				NOT = {
					innovativeness = 80
				}
			}
			modifier = {
				factor = 0.6 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 80
				NOT = {
					innovativeness = 100
				}
			}
			modifier = {
				factor = 0.5 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 100
			}
		}
	}
	option = {
		name = cato_education_events_setup_non_hereditary.6.a
		set_ruler_flag = good_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.7
		}
		ai_chance = {
			factor = 40
			modifier = {
				factor = 2 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				republican_tradition = 85
			}
			modifier = {
				factor = 1.5 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				republican_tradition = 65
				NOT = {
					republican_tradition = 85
				}
			}
			modifier = {
				factor = 0.75 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				republican_tradition = 15
				NOT = {
					republican_tradition = 35
				}
			}
			modifier = {
				factor = 0.5 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				NOT = {
					republican_tradition = 15
				}
			}
			modifier = {
				factor = 2 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				NOT = {
					corruption = 2.5
				}
			}
			modifier = {
				factor = 1.5 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				corruption = 2.5
				NOT = {
					corruption = 10
				}
			}
			modifier = {
				factor = 0.75 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				corruption = 20
				NOT = {
					corruption = 40
				}
			}
			modifier = {
				factor = 0.5 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				corruption = 40
			}
			modifier = {#Bonus for having matching idea groups
				factor = 1.15
				if = {
					limit = {
						has_ruler_flag = clerical_education
					}
					OR = {
						has_idea_group = religious_ideas
						has_idea_group = humanist_ideas
					}
				}
				else_if = {
					limit = {
						has_ruler_flag = administrative_education
					}
					OR = {
						has_idea_group = administrative_ideas
						has_idea_group = economic_ideas
						has_idea_group = expansion_ideas
					}
				}
				else_if = {
					limit = {
						has_ruler_flag = scholastic_education
					}
					has_idea_group = innovativeness_ideas
				}
				else_if = {
					limit = {
						has_ruler_flag = industrial_education
					}
					has_idea_group = economic_ideas
				}
				else_if = {
					limit = {
						has_ruler_flag = diplomacy_education
					}
					OR = {
						has_idea_group = diplomatic_ideas
						has_idea_group = influence_ideas
					}
				}
				else_if = {
					limit = {
						has_ruler_flag = intrigue_education
					}
					has_idea_group = spy_ideas
				}
				else_if = {
					limit = {
						has_ruler_flag = trade_education
					}
					OR = {
						has_idea_group = trade_ideas
						has_idea_group = economic_ideas
						has_idea_group = plutocracy_ideas
						has_idea_group = maritime_ideas
					}
				}
				else_if = {
					limit = {
						has_ruler_flag = colonial_education
					}
					OR = {
						has_idea_group = exploration_ideas
						has_idea_group = expansion_ideas
					}
				}
				else_if = {
					limit = {
						OR = {
							has_ruler_flag = martial_education
							has_ruler_flag = logistics_education
							has_ruler_flag = modern_army_education
						}
					}
					OR = {
						has_idea_group = quality_ideas
						has_idea_group = quantity_ideas
						has_idea_group = defensive_ideas
						has_idea_group = offensive_ideas
						has_idea_group = aristocracy_ideas
						has_idea_group = plutocracy_ideas
					}
				}
				else_if = {
					limit = {
						has_ruler_flag = naval_education
					}
					OR = {
						has_idea_group = naval_ideas
						has_idea_group = plutocracy_ideas
						has_idea_group = aristocracy_ideas
						has_idea_group = exploration_ideas
						has_idea_group = maritime_ideas
					}
				}
			}
		}
	}
	option = {
		name = cato_education_events_setup_non_hereditary.6.a
		set_ruler_flag = best_education
		country_event = {
			id = cato_education_events_setup_non_hereditary.7
		}
		ai_chance = {
			factor = 10
			modifier = {
				factor = 2 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				republican_tradition = 85
			}
			modifier = {
				factor = 1.5 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				republican_tradition = 65
				NOT = {
					republican_tradition = 85
				}
			}
			modifier = {
				factor = 0.75 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				republican_tradition = 15
				NOT = {
					republican_tradition = 35
				}
			}
			modifier = {
				factor = 0.5 ###Republican tradition reduces likelihood of morons and increases chances of smart people.
				NOT = {
					republican_tradition = 15
				}
			}
			modifier = {
				factor = 2 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				NOT = {
					corruption = 2.5
				}
			}
			modifier = {
				factor = 1.5 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				corruption = 2.5
				NOT = {
					corruption = 10
				}
			}
			modifier = {
				factor = 0.75 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				corruption = 20
				NOT = {
					corruption = 40
				}
			}
			modifier = {
				factor = 0.5 ###Corruption follows the same idea, but with opposite affects (low corruption means smarter rulers on average, high corruption does opposite)
				corruption = 40
			}
			modifier = {#Bonus for having matching idea groups
				factor = 1.25
				if = {
					limit = {
						has_ruler_flag = clerical_education
					}
					OR = {
						has_idea_group = religious_ideas
						has_idea_group = humanist_ideas
					}
				}
				else_if = {
					limit = {
						has_ruler_flag = administrative_education
					}
					OR = {
						has_idea_group = administrative_ideas
						has_idea_group = economic_ideas
						has_idea_group = expansion_ideas
					}
				}
				else_if = {
					limit = {
						has_ruler_flag = scholastic_education
					}
					has_idea_group = innovativeness_ideas
				}
				else_if = {
					limit = {
						has_ruler_flag = industrial_education
					}
					has_idea_group = economic_ideas
				}
				else_if = {
					limit = {
						has_ruler_flag = diplomacy_education
					}
					OR = {
						has_idea_group = diplomatic_ideas
						has_idea_group = influence_ideas
					}
				}
				else_if = {
					limit = {
						has_ruler_flag = intrigue_education
					}
					has_idea_group = spy_ideas
				}
				else_if = {
					limit = {
						has_ruler_flag = trade_education
					}
					OR = {
						has_idea_group = trade_ideas
						has_idea_group = economic_ideas
						has_idea_group = plutocracy_ideas
						has_idea_group = maritime_ideas
					}
				}
				else_if = {
					limit = {
						has_ruler_flag = colonial_education
					}
					OR = {
						has_idea_group = exploration_ideas
						has_idea_group = expansion_ideas
					}
				}
				else_if = {
					limit = {
						OR = {
							has_ruler_flag = martial_education
							has_ruler_flag = logistics_education
							has_ruler_flag = modern_army_education
						}
					}
					OR = {
						has_idea_group = quality_ideas
						has_idea_group = quantity_ideas
						has_idea_group = defensive_ideas
						has_idea_group = offensive_ideas
						has_idea_group = aristocracy_ideas
						has_idea_group = plutocracy_ideas
					}
				}
				else_if = {
					limit = {
						has_ruler_flag = naval_education
					}
					OR = {
						has_idea_group = naval_ideas
						has_idea_group = plutocracy_ideas
						has_idea_group = aristocracy_ideas
						has_idea_group = exploration_ideas
						has_idea_group = maritime_ideas
					}
				}
			}
			modifier = {
				factor = 1.1 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 20
				NOT = {
					innovativeness = 40
				}
			}
			modifier = {
				factor = 1.2 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 40
				NOT = {
					innovativeness = 60
				}
			}
			modifier = {
				factor = 1.3 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 60
				NOT = {
					innovativeness = 80
				}
			}
			modifier = {
				factor = 1.4 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 80
				NOT = {
					innovativeness = 100
				}
			}
			modifier = {
				factor = 1.5 ###Innovativeness increaseses chance of good rulers.
				innovativeness = 100
			}
		}
	}
}
country_event = {
	id = cato_education_events_setup_non_hereditary.7 ###Hidden event where the ruler is assigned proper modifier based upon their education category and aptitude level
	title = cato_education_events_setup_non_hereditary.7.title
	desc = cato_education_events_setup_non_hereditary.7.desc
	picture = ECONOMY_eventPicture
	
	is_triggered_only = yes
	hidden = yes
	trigger = {
	}
	option = {
		name = cato_education_events_setup_non_hereditary.7.a
		if = {
			limit = {
				has_ruler_flag = clerical_education
				has_ruler_flag = poor_education
			}
			add_ruler_modifier = {
				name = poor_clerical_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = clerical_education
				has_ruler_flag = okay_education
			}
			add_ruler_modifier = {
				name = okay_clerical_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = clerical_education
				has_ruler_flag = good_education
			}
			add_good_clerical_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = clerical_education
				has_ruler_flag = best_education
			}
			add_best_clerical_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = administrative_education
				has_ruler_flag = poor_education
			}
			add_ruler_modifier = {
				name = poor_administrative_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = administrative_education
				has_ruler_flag = okay_education
			}
			add_ruler_modifier = {
				name = okay_administrative_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = administrative_education
				has_ruler_flag = good_education
			}
			add_good_administrative_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = administrative_education
				has_ruler_flag = best_education
			}
			add_best_administrative_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = scholastic_education
				has_ruler_flag = poor_education
			}
			add_ruler_modifier = {
				name = poor_scholastic_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = scholastic_education
				has_ruler_flag = okay_education
			}
			add_ruler_modifier = {
				name = okay_scholastic_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = scholastic_education
				has_ruler_flag = good_education
			}
			add_good_scholastic_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = scholastic_education
				has_ruler_flag = best_education
			}
			add_best_scholastic_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = industrial_education
				has_ruler_flag = poor_education
			}
			add_ruler_modifier = {
				name = poor_industrial_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = industrial_education
				has_ruler_flag = okay_education
			}
			add_ruler_modifier = {
				name = okay_industrial_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = industrial_education
				has_ruler_flag = good_education
			}
			add_good_industrial_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = industrial_education
				has_ruler_flag = best_education
			}
			add_best_industrial_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = diplomacy_education
				has_ruler_flag = poor_education
			}
			add_ruler_modifier = {
				name = poor_diplomacy_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = diplomacy_education
				has_ruler_flag = okay_education
			}
			add_ruler_modifier = {
				name = okay_diplomacy_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = diplomacy_education
				has_ruler_flag = good_education
			}
			add_ruler_modifier = {
				name = good_diplomacy_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = diplomacy_education
				has_ruler_flag = best_education
			}
			add_best_diplomacy_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = intrigue_education
				has_ruler_flag = poor_education
			}
			add_ruler_modifier = {
				name = poor_intrigue_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = intrigue_education
				has_ruler_flag = okay_education
			}
			add_ruler_modifier = {
				name = okay_intrigue_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = intrigue_education
				has_ruler_flag = good_education
			}
			add_good_intrigue_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = intrigue_education
				has_ruler_flag = best_education
			}
			add_best_intrigue_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = trade_education
				has_ruler_flag = poor_education
			}
			add_ruler_modifier = {
				name = poor_trade_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = trade_education
				has_ruler_flag = okay_education
			}
			add_ruler_modifier = {
				name = okay_trade_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = trade_education
				has_ruler_flag = good_education
			}
			add_good_trade_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = trade_education
				has_ruler_flag = best_education
			}
			add_best_trade_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = colonial_education
				has_ruler_flag = poor_education
			}
			add_ruler_modifier = {
				name = poor_colonial_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = colonial_education
				has_ruler_flag = okay_education
			}
			add_ruler_modifier = {
				name = okay_colonial_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = colonial_education
				has_ruler_flag = good_education
			}
			add_good_colonial_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = colonial_education
				has_ruler_flag = best_education
			}
			add_best_colonial_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = martial_education
				has_ruler_flag = poor_education
			}
			add_ruler_modifier = {
				name = poor_martial_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = martial_education
				has_ruler_flag = okay_education
			}
			add_ruler_modifier = {
				name = okay_martial_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = martial_education
				has_ruler_flag = good_education
			}
			add_good_martial_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = martial_education
				has_ruler_flag = best_education
			}
			add_best_martial_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = naval_education
				has_ruler_flag = poor_education
			}
			add_ruler_modifier = {
				name = poor_naval_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = naval_education
				has_ruler_flag = okay_education
			}
			add_ruler_modifier = {
				name = okay_naval_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = naval_education
				has_ruler_flag = good_education
			}
			add_good_naval_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = naval_education
				has_ruler_flag = best_education
			}
			add_best_naval_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = logistics_education
				has_ruler_flag = poor_education
			}
			add_ruler_modifier = {
				name = poor_logistics_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = logistics_education
				has_ruler_flag = okay_education
			}
			add_ruler_modifier = {
				name = okay_logistics_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = logistics_education
				has_ruler_flag = good_education
			}
			add_good_logistics_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = logistics_education
				has_ruler_flag = best_education
			}
			add_best_logistics_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = modern_army_education
				has_ruler_flag = poor_education
			}
			add_ruler_modifier = {
				name = poor_modern_army_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = modern_army_education
				has_ruler_flag = okay_education
			}
			add_ruler_modifier = {
				name = okay_modern_army_education
				duration = -1
			}
		}
		else_if = {
			limit = {
				has_ruler_flag = modern_army_education
				has_ruler_flag = good_education
			}
			add_good_modern_army_education = yes
		}
		else_if = {
			limit = {
				has_ruler_flag = modern_army_education
				has_ruler_flag = best_education
			}
			add_best_modern_army_education = yes
		}
		ai_chance = {
			factor = 1
		}
	}
}