# Allows you to create your own dynamic keys
# to be called in localization.
# defined_text -> this is it, we're defining the text
# text -> a discrete entry that can be picked to display in loc.
# trigger -> determines if a text entry will be picked or not.
# (The triggers need to be valid for the scope the key is called in
# (eg Root or From.From).)
# localization_key -> points to the localization key
# that'll be used if trigger passes


##### Example #####

defined_text = {
	name = GetRajName
	text = {
		trigger = {
			tag = RAJ
		}
		localization_key = india
	}
	text = {
		trigger = {
			tag = PAK
		}
		localization_key = pakistan
	}

	text = {
		trigger = {
			tag = BAN
		}
		localization_key = bangladesh
	}
}


defined_text = {
	name = GetRajAdjective
	text = {
		trigger = {
			tag = RAJ
		}
		localization_key = indian
	}
	text = {
		trigger = {
			tag = PAK
		}
		localization_key = pakistani
	}

	text = {
		trigger = {
			tag = BAN
		}
		localization_key = bangladeshi
	}
}

defined_text = {
	name = GetFamineTimeframe
	text = {
		trigger = {
			has_country_flag = reveal_true_famine_timeframe
		}
		localization_key = RAJ_famine_scripted_timeframe_reveal_desc
	}
	text = {
		trigger = {
			NOT = { has_country_flag = reveal_true_famine_timeframe }
		}
		localization_key = RAJ_famine_scripted_timeframe_non_reveal_desc
	}
}

defined_text = {
	name = GetPressureTextRAJ

	text = { #I am RAJ, BAN Exists and havent revealed pressure
		trigger = {
			ROOT = { 
				original_tag = RAJ 
				NOT = { has_country_flag = reveal_pressure }
			}
			BAN = { 
				is_subject = no 
				exists = yes
			}
		}
		localization_key = RAJ_hidden_pressure_RAJ_BAN_exists
	}

	text = { #I am RAJ, BAN does not exist and havent revealed pressure
		trigger = {
			ROOT = { 
				original_tag = RAJ 
				NOT = { has_country_flag = reveal_pressure }
			}
			BAN = { 
				OR = {
					is_subject = yes 
					exists = no
				}
			}
		}
		localization_key = RAJ_hidden_pressure_RAJ_BAN_does_not_exist
	}


	text = { #I am PAK, BAN Exists and havent revealed pressure
		trigger = {
			ROOT = { 
				original_tag = PAK 
				NOT = { has_country_flag = reveal_pressure }
			}
			BAN = { 
				is_subject = no 
				exists = yes
			}
		}
		localization_key = RAJ_hidden_pressure_PAK_BAN_exists
	}

	text = { #I am RAJ, BAN does not exist and havent revealed pressure
		trigger = {
			ROOT = { 
				original_tag = PAK 
				NOT = { has_country_flag = reveal_pressure }
			}
			BAN = { 
				OR = {
					is_subject = yes 
					exists = no
				}
			}
		}
		localization_key = RAJ_hidden_pressure_PAK_BAN_does_not_exist
	}

}


defined_text = {
	name = GetDividendsStatus

	text = { #I am RAJ, BAN Exists and havent revealed pressure
		trigger = {
			ROOT = { 
				original_tag = RAJ 
				has_country_flag = has_payed_small_dividends
			}
		}
		localization_key = RAJ_dividend_status_small
	}

	text = { #I am RAJ, BAN Exists and havent revealed pressure
		trigger = {
			ROOT = { 
				original_tag = RAJ 
				has_country_flag = has_payed_normal_dividends
			}
		}
		localization_key = RAJ_dividend_status_normal
	}

	text = { #I am RAJ, BAN Exists and havent revealed pressure
		trigger = {
			ROOT = { 
				original_tag = RAJ 
				has_country_flag = has_payed_high_dividends
			}
		}
		localization_key = RAJ_dividend_status_high
	}

	text = { #I am RAJ, BAN Exists and havent revealed pressure
		trigger = {
			ROOT = { 
				original_tag = RAJ 
				NOT = {
					has_country_flag = has_payed_high_dividends
					has_country_flag = has_payed_normal_dividends
					has_country_flag = has_payed_small_dividends
				}
			}
		}
		localization_key = RAJ_dividend_status_none
	}
}

defined_text = {
	name = GetMughalCivilWarStatus

	text = { 
		trigger = {
			ROOT = { 
				original_tag = RAJ 
			}
		}
		localization_key = RAJ_secure_states
	}

	text = { #I am RAJ, BAN Exists and havent revealed pressure
		trigger = {
			ROOT = { 
				original_tag = ENG 
			}
		}
		localization_key = RAJ_defend_states
	}
}

defined_text = {
	name = MeetWithKremlinLoc
	text = { 
		trigger = {
			SOU = {
				has_government = communism
				exists = yes
				is_subject = no
			}
		}
		localization_key = MeetWithKremlinLocUSSR
	}

	text = { #I am RAJ, BAN Exists and havent revealed pressure
		trigger = {
			SOU = {
				OR = {
					exists = no
					NOT = { has_government = communism }
					is_subject = yes
				}
				
			}
		}
		localization_key = MeetWithKremlinLocNoUSSR
	}
}


defined_text = {
	name = MeetWithKremlinLocFlag
	text = { 
		trigger = {
			SOU = {
				has_government = communism
				exists = yes
				is_subject = no
			}
		}
		localization_key = RAJ_has_met_with_kremlin_flag_USSR
	}

	text = { #I am RAJ, BAN Exists and havent revealed pressure
		trigger = {
			SOU = {
				OR = {
					exists = no
					NOT = { has_government = communism }
					is_subject = yes
				}
				
			}
		}
		localization_key = RAJ_has_met_with_kremlin_flag_NO_USSR
	}
}

defined_text = {
	name = GetCountryToAnnexTarget
	text = {
		trigger = {
			var:RAJ_annexing_country_target = {
				original_tag = BRM
			}
		}
		localization_key = BRM #BURMA
	}
	text = {
		localization_key = STRATEGICREGION_188 #MALAYA
	}
}



