defined_text = {
	name = GetYearsUnderCurrentOverlord
	random = no

	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 50
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = string_years_under_current_overlord_at_least_50
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 49
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "49"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 48
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "48"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 47
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "47"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 46
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "46"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 45
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "45"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 44
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "44"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 43
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "43"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 42
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "42"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 41
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "41"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 40
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "40"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 39
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "39"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 38
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "38"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 37
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "37"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 36
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "36"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 35
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "35"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 34
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "34"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 33
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "33"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 32
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "32"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 31
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "31"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 30
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "30"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 29
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "29"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 28
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "28"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 27
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "27"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 26
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "26"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 25
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "25"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 24
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "24"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 23
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "23"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 22
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "22"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 21
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "21"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 20
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "20"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 19
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "19"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 18
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "18"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 17
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "17"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 16
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "16"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 15
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "15"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 14
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "14"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 13
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "13"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 12
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "12"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 11
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "11"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 10
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "10"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 9
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "9"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 8
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "8"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 7
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "7"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 6
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "6"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 5
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "5"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 4
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "4"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 3
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "3"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 2
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "2"
	}
	text = {
		trigger = {
			overlord = {
				PREV = {
					years_in_vassalage_under = {
						who = PREV
						years = 1
						all_subject_country = yes
					}
				}
			}
		}
		localisation_key = "1"
	}
	text = {
		trigger = {
			always = yes
		}
		localisation_key = "0"
	}
}

defined_text = {
	name = GetSeIntegratedPersonalUnionInheritChance
	random = no

	text = {
		trigger = {
			OR = {
				check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 10 }
				AND = {
					has_country_modifier = increase_chance_to_integrate_se_integrated_personal_union_modifier
					check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 9 }
				}
			}
		}
		localisation_key = "100%"
	}
	text = {
		trigger = {
			OR = {
				check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 9 }
				AND = {
					has_country_modifier = increase_chance_to_integrate_se_integrated_personal_union_modifier
					check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 8 }
				}
			}
		}
		localisation_key = "90%"
	}
	text = {
		trigger = {
			OR = {
				check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 8 }
				AND = {
					has_country_modifier = increase_chance_to_integrate_se_integrated_personal_union_modifier
					check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 7 }
				}
			}
		}
		localisation_key = "80%"
	}
	text = {
		trigger = {
			OR = {
				check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 7 }
				AND = {
					has_country_modifier = increase_chance_to_integrate_se_integrated_personal_union_modifier
					check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 6 }
				}
			}
		}
		localisation_key = "70%"
	}
	text = {
		trigger = {
			OR = {
				check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 6 }
				AND = {
					has_country_modifier = increase_chance_to_integrate_se_integrated_personal_union_modifier
					check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 5 }
				}
			}
		}
		localisation_key = "60%"
	}
	text = {
		trigger = {
			OR = {
				check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 5 }
				AND = {
					has_country_modifier = increase_chance_to_integrate_se_integrated_personal_union_modifier
					check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 4 }
				}
			}
		}
		localisation_key = "50%"
	}
	text = {
		trigger = {
			OR = {
				check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 4 }
				AND = {
					has_country_modifier = increase_chance_to_integrate_se_integrated_personal_union_modifier
					check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 3 }
				}
			}
		}
		localisation_key = "40%"
	}
	text = {
		trigger = {
			OR = {
				check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 3 }
				AND = {
					has_country_modifier = increase_chance_to_integrate_se_integrated_personal_union_modifier
					check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 2 }
				}
			}
		}
		localisation_key = "30%"
	}
	text = {
		trigger = {
			OR = {
				check_variable = { which = num_of_integrated_pu_random_chance_iterations value = 2 }
				has_country_modifier = increase_chance_to_integrate_se_integrated_personal_union_modifier
			}
		}
		localisation_key = "20%"
	}
	text = {
		trigger = {
			always = yes
		}
		localisation_key = "10%"
	}
}