## INTRO ##
# Character has given the ghost 							(Default)
# Character has abandoned his mortal coil 					(Default)
# Character has passed on 									(Default)
# Character has left this world 							(Default)
# Character's spirit has flown to GetHeaven	 				(virtuous/pious)
# Character's soul has finally been cast to GetHell	 		(wicked)
# Character has finally found peace 						(incapable/wounded)
# Character has bravely fallen in battle 					(death_battle reason)
# Character rests in Christ 								(Christianity)
# Character rests in the arms of the Lord 					(Christianity)
# Character has steadfastly fallen asleep in the Lord 		(Christianity)
# Character has joined the feast in Valhalla 				(Norse)
# Character has sailed for river Styx 						(Hellenic)
# Character has transcended his material form 				(Eastern)
# Character has crossed the door to the Spirit world	 	(African/Finno-Ugric/Tribal)

DeathMessageIntro = {
	type = character

	random_valid = yes
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_DEFAULT_1
		trigger = {
			always = yes
		}
		weight_multiplier = {
			base = 0.1
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_DEFAULT_2
		trigger = {
			always = yes
		}
		weight_multiplier = {
			base = 0.1
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_DEFAULT_3
		trigger = {
			always = yes
		}
		weight_multiplier = {
			base = 0.1
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_DEFAULT_4
		trigger = {
			always = yes
		}
		weight_multiplier = {
			base = 0.1
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_PIOUS
		trigger = {
			num_sinful_traits = 0
			num_virtuous_traits >= 2
			has_personality_benevolent_trigger = yes
			NOT = {
				has_trait = excommunicated
			}
		}
		weight_multiplier = {
			base = 0.5
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_WICKED
		trigger = {
			OR = {
				AND = {
					num_virtuous_traits = 0
					has_personality_malicious_trigger = yes
					num_sinful_traits >= 2
				}
				has_trait = excommunicated
				AND = {
					has_trait = kinslayer
					NOT = { faith = { has_doctrine = doctrine_kinslaying_accepted } }
				}
				AND = {
					has_trait = deviant
					NOT = { faith = { has_doctrine_parameter = deviancy_accepted } }
				}
				AND = {
					has_trait = cannibal
					NOT = {
						faith = { has_doctrine_parameter = cannibalism_legal }
					}
				}
				AND = {
					has_trait = sodomite
					NOT = { faith = { has_doctrine = doctrine_homosexuality_accepted } }
				}
				AND = {
					has_trait = incestuous
					NOT = { faith = { has_doctrine = doctrine_consanguinity_unrestricted } }
				}
				AND = {
					OR = {
						has_trait = adulterer
						has_trait = fornicator
					}
					is_female = no
					NOT = { faith = { has_doctrine = doctrine_adultery_men_accepted } }
				}
				AND = {
					OR = {
						has_trait = adulterer
						has_trait = fornicator
					}
					is_female = yes
					NOT = { faith = { has_doctrine = doctrine_adultery_women_accepted } }
				}
				has_trait = murderer
				AND = {
					has_trait = witch
					NOT = { faith = { has_doctrine_parameter = witchcraft_accepted } }
				}
			}
		}
		weight_multiplier = {
			base = 0.5
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_WOUNDED
		trigger = {
			OR = {
				has_trait = incapable
				has_trait = maimed
				has_treatable_disease_trigger = yes
				has_wounds_trigger = yes
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_CHRISTIANITY_1
		trigger = {
			faith.religion = faith:catholic.religion
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_CHRISTIANITY_2
		trigger = {
			faith.religion = faith:catholic.religion
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_ISLAM_1
		trigger = {
			faith.religion = faith:ashari.religion
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_ISLAM_2
		trigger = {
			faith.religion = faith:ashari.religion
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_ISLAM_3
		trigger = {
			faith.religion = faith:ashari.religion
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_NORSE_1
		trigger = {
			faith.religion = faith:norse_pagan.religion
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_HELLENIC_1
		trigger = {
			faith.religion = faith:hellenic_pagan.religion
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_EASTERN_1
		trigger = {
			OR = {
				faith.religion = faith:vaishnavism.religion
				faith.religion = faith:theravada.religion
				faith.religion = faith:digambara.religion
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_INTRO_TRIBAL_1
		trigger = {
			OR = {
				faith.religion = faith:finnish_pagan.religion
				faith.religion = faith:west_african_bori_pagan.religion
				government_has_flag = government_is_tribal
			}
		}
	}
}

DeathMessageReason = {
	type = character

	random_valid = yes
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_REASON_1
		trigger = {
			always = yes
		}
	}
}
## OUTRO ##

# AGE
# Very Young
# Very Old
# Immortal
# Pregnant

# BODY STATE
# Leper
# Disfigured
# Maimed
# Hunchback
# Giant
# Dwarf
# Strong
# Pretty (young)
# Pretty (old)
# Weak
# Ugly
# Incapable

# MENTAL STATE
# Lunatic
# Possessed (pos)
# Possessed (neg)
# Depressed
# Genius
# Dumb
# Infirm

# SCANDALS
# Excommunicated
# Kinslayer
# Deviant
# Cannibal
# Sodomite
# Incestous
# Adulterer
# Fornicator
# Murderer
# Witch

# ACCOMPLISHMENTS
# Saoshyant
# Restorer of Rome
# Crusader/Crusader King

# LIFESTYLES
# lifestyle_reveler
# lifestyle_blademaster
# lifestyle_hunter
# administrator
# schemer
# seducer
# scholar
# torturer
# family_first
# lifestyle_mystic
# lifestyle_physician
# lifestyle_gallant
# lifestyle_herbalist

DeathMessageOutro = {
	type = character

	random_valid = yes
	# AGE
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_AGE_CHILD
		trigger = {
			age < 14
		}
		weight_multiplier = {
			base = 0.5
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_AGE_OLD
		trigger = {
			age > 50
			age < 100
		}
		weight_multiplier = {
			base = 0.25
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_AGE_IMMORTAL
		trigger = {
			age > 100
		}
		weight_multiplier = {
			base = 0.5
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_AGE_PREGNANT
		trigger = {
			has_trait = pregnant
		}
		weight_multiplier = {
			base = 0.5
		}
	}
	# BODY STATE
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_LEPER
		trigger = {
			has_trait = leper
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_DISFIGURED
		trigger = {
			has_trait = disfigured
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_MANGLED
		trigger = {
			has_trait = maimed
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_HUNCHBACK
		trigger = {
			has_trait = hunchbacked
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_GIANT
		trigger = {
			has_trait = giant
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_DWARF
		trigger = {
			has_trait = dwarf
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_STRONG
		trigger = {
			has_trait = physique_good
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_PRETTY_YOUNG
		trigger = {
			has_trait = beauty_good
			age < 35
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_PRETTY_OLD
		trigger = {
			has_trait = beauty_good
			age >= 35
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_WEAK
		trigger = {
			has_trait = physique_bad
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_UGLY
		trigger = {
			has_trait = beauty_bad
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_BODY_INCAPABLE
		trigger = {
			has_trait = incapable
		}
	}

	# MENTAL STATE
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_LUNATIC
		trigger = {
			has_trait = lunatic
		}
		weight_multiplier = {
			base = 3
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_POSSESSED_POSITIVE
		trigger = {
			has_trait = possessed
			faith = { has_doctrine = tenet_adorcism }
		}
		weight_multiplier = {
			base = 3
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_POSSESSED_NEGATIVE
		trigger = {
			has_trait = possessed
			NOT = { faith = { has_doctrine = tenet_adorcism } }
		}
		weight_multiplier = {
			base = 3
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_DEPRESSED
		trigger = {
			has_trait = depressed
		}
		weight_multiplier = {
			base = 2
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_GENIUS
		trigger = {
			has_trait = intellect_good
		}
		weight_multiplier = {
			base = 2
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_DUMB
		trigger = {
			has_trait = intellect_bad
		}
		weight_multiplier = {
			base = 2
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_MIND_INFIRM
		trigger = {
			has_trait = infirm
		}
		weight_multiplier = {
			base = 2
		}
	}
	# SCANDALS
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_EXCOMMUNICATED
		trigger = {
			has_trait = excommunicated
		}
		weight_multiplier = {
			base = 2
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_KINSLAYER
		trigger = {
			has_trait = kinslayer
			NOT = { faith = { has_doctrine = doctrine_kinslaying_accepted } }
		}
		weight_multiplier = {
			base = 2
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_DEVIANT
		trigger = {
			has_trait = deviant
			NOT = { faith = { has_doctrine_parameter = deviancy_accepted } }
		}
		weight_multiplier = {
			base = 2
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_CANNIBAL
		trigger = {
			has_trait = cannibal
			NOT = {
				faith = { has_doctrine_parameter = cannibalism_legal }
			}
		}
		weight_multiplier = {
			base = 2
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_SODOMITE
		trigger = {
			has_trait = sodomite
			NOT = { faith = { has_doctrine = doctrine_homosexuality_accepted } }
		}
		weight_multiplier = {
			base = 2
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_INCESTUOUS
		trigger = {
			has_trait = incestuous
			NOT = { faith = { has_doctrine = doctrine_consanguinity_unrestricted } }
		}
		weight_multiplier = {
			base = 2
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_ADULTERER
		trigger = {
			has_trait = adulterer
			OR = {
				AND = {
					is_female = no
					NOT = { faith = { has_doctrine = doctrine_adultery_men_accepted } }
				}
				AND = {
					is_female = yes
					NOT = { faith = { has_doctrine = doctrine_adultery_women_accepted } }
				}
			}
		}
		weight_multiplier = {
			base = 2
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_FORNICATOR
		trigger = {
			has_trait = fornicator
			OR = {
				AND = {
					is_female = no
					NOT = { faith = { has_doctrine = doctrine_adultery_men_accepted } }
				}
				AND = {
					is_female = yes
					NOT = { faith = { has_doctrine = doctrine_adultery_women_accepted } }
				}
			}
		}
		weight_multiplier = {
			base = 2
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_MURDERER
		trigger = {
			has_trait = murderer
		}
		weight_multiplier = {
			base = 2
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_SCANDAL_WITCH
		trigger = {
			has_trait = witch
			NOT = { faith = { has_doctrine_parameter = witchcraft_accepted } }
		}
		weight_multiplier = {
			base = 2
		}
	}
	# ACCOMPLISHMENTS
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_ACCOMPLISHMENT_SAOSHYANT
		trigger = {
			has_trait = saoshyant
		}
		weight_multiplier = {
			base = 100
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_ACCOMPLISHMENT_RESTORER_ROME
		trigger = {
			has_trait = augustus
			is_roman_emperor_excluding_byzantium_trigger = yes
			has_character_flag = flag_restorer_of_rome #used for Eulogy.
		}
		weight_multiplier = {
			base = 100
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_ACCOMPLISHMENT_CRUSADER
		trigger = {
			OR = {
				has_trait = faith_warrior
				has_trait = crusader_king
			}
		}
		weight_multiplier = {
			base = 100
		}
	}
	# LIFESTYLES
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_DIPLOMAT
		trigger = {
			has_diplomacy_lifestyle_trait_trigger = yes
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_REVELER
		trigger = {
			has_trait = lifestyle_reveler
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_BLADEMASTER
		trigger = {
			has_trait = lifestyle_blademaster
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_HUNTER
		trigger = {
			has_trait = lifestyle_hunter
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_GENERAL
		trigger = {
			has_martial_lifestyle_trait_trigger = yes
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_ADMINISTRATOR
		trigger = {
			has_stewardship_lifestyle_trait_trigger = yes
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_SCHEMER
		trigger = {
			has_intrigue_lifestyle_trait_trigger = yes
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_SEDUCER
		trigger = {
			has_trait = seducer
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_SCHOLAR
		trigger = {
			has_learning_lifestyle_trait_trigger = yes
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_TORTURER
		trigger = {
			has_trait = torturer
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_FAMILY_FIRST
		trigger = {
			has_trait = family_first
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_MYSTIC
		trigger = {
			has_trait = lifestyle_mystic
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_PHYSICIAN
		trigger = {
			has_trait = lifestyle_physician
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_GALLANT
		trigger = {
			has_trait = gallant
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_LIFESTYLE_HERBALIST
		trigger = {
			has_trait = lifestyle_herbalist
		}
	}
	#PERSONALITY
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_MALICIOUS
		trigger = {
			has_personality_malicious_trigger = yes
		}
		weight_multiplier = {
			base = 0.1
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_BENEVOLENT
		trigger = {
			has_personality_benevolent_trigger = yes
		}
		weight_multiplier = {
			base = 0.1
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_DOMINANT
		trigger = {
			has_personality_dominant_trigger = yes
		}
		weight_multiplier = {
			base = 0.1
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_SUBMISSIVE
		trigger = {
			has_personality_submissive_trigger = yes
		}
		weight_multiplier = {
			base = 0.1
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_APATHETIC
		trigger = {
			has_personality_submissive_trigger = no
			has_personality_dominant_trigger = no
			has_personality_benevolent_trigger = no
			has_personality_malicious_trigger = no
		}
		weight_multiplier = {
			base = 0.001
		}
	}
	#SINS/VIRTUES
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_LUSTFUL
		trigger = {
			has_trait = lustful
		}
		weight_multiplier = {
			base = 0.01
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_GLUTTONOUS
		trigger = {
			has_trait = gluttonous
		}
		weight_multiplier = {
			base = 0.01
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_GREEDY
		trigger = {
			has_trait = greedy
		}
		weight_multiplier = {
			base = 0.01
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_LAZY
		trigger = {
			has_trait = lazy
		}
		weight_multiplier = {
			base = 0.01
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_FICKLE
		trigger = {
			has_trait = fickle
		}
		weight_multiplier = {
			base = 0.01
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_WRATHFUL
		trigger = {
			has_trait = wrathful
		}
		weight_multiplier = {
			base = 0.01
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_ARROGANT
		trigger = {
			has_trait = arrogant
		}
		weight_multiplier = {
			base = 0.01
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_CHASTE
		trigger = {
			has_trait = chaste
		}
		weight_multiplier = {
			base = 0.01
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_TEMPERATE
		trigger = {
			has_trait = temperate
		}
		weight_multiplier = {
			base = 0.01
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_GENEROUS
		trigger = {
			has_trait = generous
		}
		weight_multiplier = {
			base = 0.01
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_DILIGENT
		trigger = {
			has_trait = diligent
		}
		weight_multiplier = {
			base = 0.01
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_COMPASSIONATE
		trigger = {
			has_trait = compassionate
		}
		weight_multiplier = {
			base = 0.01
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_PATIENT
		trigger = {
			has_trait = patient
		}
		weight_multiplier = {
			base = 0.01
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_DEAD_OUTRO_PERSONALITY_HUMBLE
		trigger = {
			has_trait = humble
		}
		weight_multiplier = {
			base = 0.01
		}
	}
}


# Callous + NOT Gregarious
# Vengeful
# Depressed
# Giant
# Blind and weak/maimed
# Excommunicated
# Berserker
# Cannibal
# Other crime (rumored to have unsavory habits, bad reputation)
# Heir is a Witch/Mystic/Herbalist

HeirMessageInterface = {
	type = character

	random_valid = yes
	#############
	#	Base	#
	#############
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_UNDERAGE
		trigger = {
			is_adult = no
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_USELESS
		trigger = {
			NOR = {
				diplomacy >= 5
				stewardship >= 5
				intrigue >= 5
				learning >= 5
				martial >= 5
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_DREAD
		trigger = {
			dread >= medium_dread
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_GENDER
		trigger = {
			OR = {
				AND = {
					is_female = yes
					OR = {
						has_realm_law = male_only_law
						has_realm_law = male_preference_law
					}
				}
				AND = {
					is_female = no
					OR = {
						has_realm_law = female_only_law
						has_realm_law = female_preference_law
					}
				}
			}
		}
	}
	#############
	# Education #
	#############
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_MILITARY
		trigger = {
			NOT = {
				has_trait = craven
			}
			martial >= 12
			has_trait = education_martial
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_LEARNING
		trigger = {
			NOT = {
				has_trait = lazy
			}
			learning >= 12
			has_trait = education_learning
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_STEWARDSHIP
		trigger = {
			NOT = {
				has_trait = gluttonous
			}
			stewardship >= 12
			has_trait = education_stewardship
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_INTRIGUE
		trigger = {
			NOT = {
				has_trait = honest
			}
			intrigue >= 12
			has_trait = education_intrigue
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_DIPLOMACY
		trigger = {
			NOT = {
				has_trait = deceitful
			}
			diplomacy >= 12
			has_trait = education_diplomacy
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_STRONG_AND_SMART
		trigger = {
			OR = {
				has_trait = physique_good
				has_trait = strong
			}
			OR = {
				has_trait = intellect_good
				has_trait = shrewd
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_WEAK_AND_DUMB
		trigger = {
			OR = {
				has_trait = physique_bad
				has_trait = weak
			}
			OR = {
				has_trait = intellect_bad
				has_trait = dull
			}
		}
	}
	#############
	# Lifestyle #
	#############
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_REVELER
		trigger = {
			is_adult = yes
			has_trait = lifestyle_reveler
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ADMINISTRATOR
		trigger = {
			is_adult = yes
			has_stewardship_lifestyle_trait_trigger = yes
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_SCHOLAR
		trigger = {
			is_adult = yes
			has_learning_lifestyle_trait_trigger = yes
			NOT = { government_has_flag = government_is_theocracy }
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_VARANGIAN
		trigger = {
			is_adult = yes
			has_trait = varangian
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_LUNATIC
		trigger = {
			has_trait = lunatic
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_POSSESSED_BAD
		trigger = {
			has_trait = possessed
			NOT = { faith = { has_doctrine = tenet_adorcism } }
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_POSSESSED_GOOD
		trigger = {
			has_trait = possessed
			faith = { has_doctrine = tenet_adorcism }
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_FAIR
		trigger = {
			is_adult = yes
			has_trait = beauty_good
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ADVENTURER
		trigger = {
			is_adult = yes
			has_trait = adventurer
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_UGLY_DECEITFUL
		trigger = {
			is_adult = yes
			has_trait = beauty_bad
			has_trait = deceitful
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_GLUTTON_GREEDY
		trigger = {
			is_adult = yes
			has_trait = gluttonous
			has_trait = greedy
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CYNICAL_JUST
		trigger = {
			is_adult = yes
			has_trait = cynical
			has_trait = just
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CONTENT_ARBITRARY
		trigger = {
			is_adult = yes
			has_trait = content
			has_trait = arbitrary
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CRAVEN_MILITARY_ED
		trigger = {
			is_adult = yes
			has_trait = craven
			has_trait = education_martial
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_SHY_CONTENT
		trigger = {
			is_adult = yes
			has_trait = shy
			has_trait = content
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ZEALOUS_PARANOID
		trigger = {
			is_adult = yes
			has_trait = zealous
			has_trait = paranoid
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ZEALOUS_GENEROUS
		trigger = {
			is_adult = yes
			has_trait = zealous
			has_trait = generous
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ARROGANT_BRAVE
		trigger = {
			is_adult = yes
			has_trait = arrogant
			has_trait = brave
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CYNICAL_CRUEL
		trigger = {
			is_adult = yes
			has_trait = cynical
			OR = {
				has_trait = callous
				has_trait = sadistic
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_HUMBLE_STUBBORN
		trigger = {
			is_adult = yes
			has_trait = humble
			has_trait = stubborn
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_DECEITFUL_CALLOUS
		trigger = {
			is_adult = yes
			has_trait = deceitful
			has_trait = callous
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_PATIENT_TRUSTING
		trigger = {
			is_adult = yes
			has_trait = patient
			has_trait = trusting
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_PARANOID_STRESSED
		trigger = {
			is_adult = yes
			has_trait = paranoid
			stress >= medium_stress
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_STUBBORN_COMPASSIONATE
		trigger = {
			is_adult = yes
			has_trait = stubborn
			has_trait = compassionate
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_STRONG_BRAVE
		trigger = {
			is_adult = yes
			OR = {
				has_trait = strong
				has_trait = giant
			}
			OR = {
				has_trait = brave
				has_trait = berserker
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_TEMPERATE_LUSTFUL
		trigger = {
			is_adult = yes
			has_trait = temperate
			has_trait = lustful
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_GENEROUS_JUST
		trigger = {
			is_adult = yes
			has_trait = generous
			has_trait = just
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_DILIGENT_GREEDY
		trigger = {
			is_adult = yes
			has_trait = diligent
			has_trait = greedy
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CRAVEN_HONEST
		trigger = {
			is_adult = yes
			has_trait = craven
			has_trait = honest
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_SHY_TRUSTING
		trigger = {
			is_adult = yes
			has_trait = shy
			has_trait = trusting
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_GREGARIOUS_HONEST
		trigger = {
			is_adult = yes
			has_trait = gregarious
			has_trait = honest
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CYNICAL_ARBITRARY
		trigger = {
			is_adult = yes
			has_trait = cynical
			OR = {
				has_trait = arbitrary
				has_trait = fickle
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CRUEL_WRATHFUL
		trigger = {
			is_adult = yes
			OR = {
				AND = {
					has_trait = callous
					has_trait = wrathful
				}
				AND = {
					has_trait = callous
					has_trait = vengeful
				}
				has_trait = sadistic
				has_trait = torturer
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_WRATHFUL_ZEALOUS
		trigger = {
			is_adult = yes
			AND = {
				has_trait = vengeful
				has_trait = wrathful
			}
			has_trait = zealous
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_PARANOID_DECEITFUL
		trigger = {
			is_adult = yes
			has_trait = paranoid
			has_trait = deceitful
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CALLOUS_LONER
		trigger = {
			is_adult = yes
			has_trait = callous
			NOT = { has_trait = gregarious }
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_VENGEFUL
		trigger = {
			is_adult = yes
			has_trait = vengeful
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_BLIND_WEAK
		trigger = {
			is_adult = yes
			has_trait = blind
			OR = {
				has_trait = weak
				has_trait = physique_bad
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_EXCOMMUNICATED
		trigger = {
			is_adult = yes
			has_trait = excommunicated
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_BERSERKER
		trigger = {
			is_adult = yes
			has_trait = berserker
			NOT = { has_trait = craven }
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CANNIBAL
		trigger = {
			is_adult = yes
			has_trait = cannibal
			NOT = {
				faith = { has_doctrine_parameter = cannibalism_legal }
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CRIMINAL
		trigger = {
			is_adult = yes
			AND = {
				has_trait = kinslayer
				NOT = { faith = { has_doctrine = doctrine_kinslaying_accepted } }
			}
			AND = {
				has_trait = deviant
				NOT = { faith = { has_doctrine_parameter = deviancy_accepted } }
			}
			AND = {
				has_trait = sodomite
				NOT = { faith = { has_doctrine = doctrine_homosexuality_accepted } }
			}
			AND = {
				has_trait = incestuous
				NOT = { faith = { has_doctrine = doctrine_consanguinity_unrestricted } }
			}
			AND = {
				OR = {
					has_trait = adulterer
					has_trait = fornicator
				}
				is_female = no
				NOT = { faith = { has_doctrine = doctrine_adultery_men_accepted } }
			}
			AND = {
				OR = {
					has_trait = adulterer
					has_trait = fornicator
				}
				is_female = yes
				NOT = { faith = { has_doctrine = doctrine_adultery_women_accepted } }
			}
			has_trait = murderer
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_WITCH
		trigger = {
			is_adult = yes
			AND = {
				has_trait = witch
				NOT = { faith = { has_doctrine_parameter = witchcraft_accepted } }
			}
		}
	}
	#####################
	# Generic Fallbacks #
	#####################
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_COMPASSIONATE
		trigger = {
			is_adult = yes
			has_trait = compassionate
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ARROGANT
		trigger = {
			is_adult = yes
			has_trait = arrogant
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CYNICAL
		trigger = {
			is_adult = yes
			has_trait = cynical
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_GREGARIOUS
		trigger = {
			is_adult = yes
			has_trait = gregarious
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ZEALOUS
		trigger = {
			is_adult = yes
			has_trait = zealous
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_AMBITIOUS
		trigger = {
			is_adult = yes
			has_trait = ambitious
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_DILIGENT
		trigger = {
			is_adult = yes
			has_trait = diligent
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_DECEITFUL
		trigger = {
			is_adult = yes
			OR = {
				has_trait = deceitful
				has_intrigue_lifestyle_trait_trigger = yes
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_SHY
		trigger = {
			is_adult = yes
			has_trait = shy
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_HUMBLE
		trigger = {
			is_adult = yes
			has_trait = humble
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_ARBITRARY
		trigger = {
			is_adult = yes
			has_trait = arbitrary
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_TEMPERATE
		trigger = {
			is_adult = yes
			has_trait = temperate
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CHASTE
		trigger = {
			is_adult = yes
			OR = {
				has_trait = chaste
				has_trait = family_first
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_LUSTFUL
		trigger = {
			is_adult = yes
			OR = {
				has_trait = lustful
				has_trait = seducer
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CONTENT
		trigger = {
			is_adult = yes
			has_trait = content
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_PATIENT
		trigger = {
			is_adult = yes
			has_trait = patient
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_BRAVE
		trigger = {
			is_adult = yes
			has_trait = brave
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_JUST
		trigger = {
			is_adult = yes
			has_trait = just
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_GLUTTONOUS
		trigger = {
			is_adult = yes
			has_trait = gluttonous
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CALLOUS
		trigger = {
			is_adult = yes
			has_trait = callous
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CRAVEN
		trigger = {
			is_adult = yes
			has_trait = craven
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_GREEDY
		trigger = {
			is_adult = yes
			has_trait = greedy
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_CRUEL
		trigger = {
			is_adult = yes
			has_trait = sadistic
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_TRUSTING
		trigger = {
			is_adult = yes
			has_trait = trusting
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_HONEST
		trigger = {
			is_adult = yes
			has_trait = honest
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_LAZY
		trigger = {
			is_adult = yes
			has_trait = lazy
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_GENEROUS
		trigger = {
			is_adult = yes
			has_trait = generous
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_WRATHFUL
		trigger = {
			is_adult = yes
			has_trait = wrathful
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_PARANOID
		trigger = {
			is_adult = yes
			has_trait = paranoid
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TRAIT_STUBBORN
		trigger = {
			is_adult = yes
			has_trait = stubborn
		}
	}
	##################
	# Circumstancial #
	##################
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_PIETY
		trigger = {
			is_adult = yes
			piety_level >= 3
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_PRESTIGE
		trigger = {
			is_adult = yes
			prestige_level >= 5
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_FRIENDS
		trigger = {
			num_of_relation_friend >= 3
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_TYRANT
		trigger = {
			tyranny >= medium_tyranny
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_RICH
		trigger = {
			gold >= 5000
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_CHILDREN
		trigger = {
			any_child = { count >= 8 }
			NOR = {
				government_has_flag = government_is_republic
				government_has_flag = government_is_theocracy
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_RIVALS
		trigger = {
			num_of_relation_rival >= 3
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_COMBAT_SKILLS
		trigger = {
			is_adult = yes
			OR = {
				prowess >= high_skill_rating
				has_trait = lifestyle_blademaster
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_POOR_HEALTH
		trigger = {
			health <= poor_health
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_BASTARD
		trigger = {
			OR = {
				has_trait = bastard
				has_trait = legitimized_bastard
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_VIKING
		trigger = {
			is_adult = yes
			has_trait = viking
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_CRUSADER
		trigger = {
			is_adult = yes
			OR = {
				has_trait = faith_warrior
				has_trait = crusader_king
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_THREE_SKILLS
		trigger = {
			calc_true_if = {
				amount >= 3
				amount < 5
				diplomacy >= 10
				stewardship >= 10
				intrigue >= 10
				learning >= 10
				martial >= 10
			}
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_FIVE_SKILLS
		trigger = {
			diplomacy >= 10
			stewardship >= 10
			intrigue >= 10
			learning >= 10
			martial >= 10
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_HEIR_UNIMPRESSIVE
		trigger = {
			is_adult = yes
			piety_level < 3
			prestige_level < 5
			num_of_relation_friend < 3
			gold < 5000
			prowess < high_skill_rating
			NOR = {
				has_trait = faith_warrior
				has_trait = crusader_king
				has_trait = viking
				has_trait = lifestyle_blademaster
			}
		}
		weight_multiplier = {
			factor = 0.001
		}
	}
}

GameOverMessageInterface = {
	type = character

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_INTRO_UNLANDED
		trigger = {
			is_playable_character = no
			is_alive = yes
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_INTRO_BARON
		trigger = {
			primary_title.tier = tier_barony
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_INTRO
	}
}

GameOverMessageInterfaceDuration = {
	type = character

	random_valid = yes

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_CENTURIES
		trigger = {
			years_from_game_start >= 200
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_CENTURY
		trigger = {
			years_from_game_start < 200
			years_from_game_start >= 100
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_DECADES
		trigger = {
			years_from_game_start < 100
			years_from_game_start >= 20
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_DECADE
		trigger = {
			years_from_game_start < 20
			years_from_game_start >= 10
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_YEARS
		trigger = {
			years_from_game_start < 10
			years_from_game_start >= 2
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_YEAR
		trigger = {
			years_from_game_start < 2
			years_from_game_start > 1
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_YEAR_SINGLE
		trigger = {
			years_from_game_start <= 1
		}
	}
}

GameOverMessageInterfaceSplendor = {
	type = character

	random_valid = yes

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_MAX_SPLENDOR
		trigger = {
			dynasty = { dynasty_prestige_level >= max_dynasty_prestige_level }
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_HIGH_SPLENDOR
		trigger = {
			dynasty = {
				dynasty_prestige_level < max_dynasty_prestige_level
				dynasty_prestige_level >= high_dynasty_prestige_level
			}
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_MEDIUM_SPLENDOR
		trigger = {
			dynasty = {
				dynasty_prestige_level < high_dynasty_prestige_level
				dynasty_prestige_level >= medium_dynasty_prestige_level
			}
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_LOW_SPLENDOR
		trigger = {
			dynasty = {
				dynasty_prestige_level < medium_dynasty_prestige_level
				dynasty_prestige_level >= low_dynasty_prestige_level
			}
			years_from_game_start > 1
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_LOW_SPLENDOR_SHORT
		trigger = {
			dynasty = {
				dynasty_prestige_level < medium_dynasty_prestige_level
				dynasty_prestige_level >= low_dynasty_prestige_level
			}
			years_from_game_start <= 1
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_GAME_OVER_MIN_SPLENDOR
		trigger = {
			dynasty = {
				dynasty_prestige_level < low_dynasty_prestige_level
				dynasty_prestige_level >= min_dynasty_prestige_level
			}
		}
	}
}

GameOverMessageNotableAchievements = {
	type = character

	# Have you ever restored a kingdom/empire/etc.?
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_RESTORED_ROMAN_EMPIRE_DESC
		trigger = {
			exists = global_var:flag_restored_roman_empire
			dynasty = global_var:flag_restored_roman_empire.dynasty
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_RESTORED_DUMNONIA_DESC
		trigger = {
			exists = global_var:flag_restored_dumnonia
			dynasty = global_var:flag_restored_dumnonia.dynasty
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_RESTORED_CAROLINGIAN_DESC
		trigger = {
			exists = global_var:flag_reformed_carolingian_empire
			dynasty = global_var:flag_reformed_carolingian_empire.dynasty
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_RESTORED_HOLY_ROMAN_EMPIRE_DESC
		trigger = {
			exists = global_var:restore_holy_roman_empire_decision
			dynasty = global_var:restore_holy_roman_empire_decision.dynasty
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_RESTORED_OLD_VASCONIA_DESC
		trigger = {
			exists = global_var:flag_restored_old_vasconia
			dynasty = global_var:flag_restored_old_vasconia.dynasty
		}
	}

	# Have you ever unified a kingdom/empire/etc.?
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_UNIFICATION_SPANISH_DESC
		trigger = {
			exists = global_var:unite_the_spanish_thrones_decision
			exists = global_var:unite_the_spanish_thrones_decision.dynasty
			dynasty = global_var:unite_the_spanish_thrones_decision.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_UNIFICATION_SLAVS_DESC
		trigger = {
			exists = global_var:unite_the_slavs_decision
			exists = global_var:unite_the_slavs_decision.dynasty
			dynasty = global_var:unite_the_slavs_decision.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_UNIFICATION_SOUTHERN_SLAVS_DESC
		trigger = {
			exists = global_var:unite_the_southern_slavs_decision
			exists = global_var:unite_the_southern_slavs_decision.dynasty
			dynasty = global_var:unite_the_southern_slavs_decision.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_UNIFICATION_WESTERN_SLAVS_DESC
		trigger = {
			exists = global_var:unite_the_western_slavs_decision
			exists = global_var:unite_the_western_slavs_decision.dynasty
			dynasty = global_var:unite_the_western_slavs_decision.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_UNIFICATION_BURGUNDY_DESC
		trigger = {
			exists = global_var:flag_unified_burgundy_kingdom
			exists = global_var:flag_unified_burgundy_kingdom.dynasty
			dynasty = global_var:flag_unified_burgundy_kingdom.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_UNIFICATION_ITALY_DESC
		trigger = {
			exists = global_var:flag_unified_italian_empire
			exists = global_var:flag_unified_italian_empire.dynasty
			dynasty = global_var:flag_unified_italian_empire.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_UNIFICATION_AFRICA_DESC
		trigger = {
			exists = global_var:unite_africa_decision
			exists = global_var:unite_africa_decision.dynasty
			dynasty = global_var:unite_africa_decision.dynasty
		}
	}

	# Have you ever formed/created/founded a kingdom/empire/etc.?
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_PORTUGAL_DESC
		trigger = {
			exists = global_var:form_portugal_decision
			dynasty = global_var:form_portugal_decision.dynasty
		}
	}
	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_CANARIAS_DESC
		trigger = {
			exists = global_var:declare_canarias_decision
			dynasty = global_var:declare_canarias_decision.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_BOSNIA_DESC
		trigger = {
			exists = global_var:flag_founded_kingdom_of_bosnia
			dynasty = global_var:flag_founded_kingdom_of_bosnia.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_ARMENIA_DESC
		trigger = {
			exists = global_var:flag_created_armenian_empire
			dynasty = global_var:flag_created_armenian_empire.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_VIET_DESC
		trigger = {
			exists = global_var:flag_created_dai_viet_empire
			dynasty = global_var:flag_created_dai_viet_empire.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_MAJAPAHIT_DESC
		trigger = {
			exists = global_var:flag_created_majapahit_empire
			dynasty = global_var:flag_created_majapahit_empire.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_RYUKYU_DESC
		trigger = {
			exists = global_var:flag_created_ryukyu_empire
			dynasty = global_var:flag_created_ryukyu_empire.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_SIAM_DESC
		trigger = {
			exists = global_var:flag_created_siam_kingdom
			dynasty = global_var:flag_created_siam_kingdom.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_RUM_DESC
		trigger = {
			exists = global_var:flag_formed_rum_sultanate
			dynasty = global_var:flag_formed_rum_sultanate.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_ISRAEL_DESC
		trigger = {
			exists = global_var:create_israel_kingdom
			dynasty = global_var:create_israel_kingdom.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_OUTREMER_DESC
		trigger = {
			exists = global_var:flag_created_outremer_empire
			dynasty = global_var:flag_created_outremer_empire.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_SWITZERLAND_DESC
		trigger = {
			exists = global_var:flag_formed_switzerland_kingdom
			dynasty = global_var:flag_formed_switzerland_kingdom.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_AUSTRIA_DESC
		trigger = {
			exists = global_var:flag_formed_austria_kingdom
			dynasty = global_var:flag_formed_austria_kingdom.dynasty
		}
	}

	text = {
		localization_key = SUCCESSION_EVENT_WINDOW_END_DATE_CREATED_ARAGON_DESC
		trigger = {
			exists = global_var:flag_formed_kingdom_of_aragon
			dynasty = global_var:flag_formed_kingdom_of_aragon.dynasty
		}
	}
}
