# 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

#Glorval Here, anything I'll be writing here will be built
#as though I were just building functions back in my home of C


defined_text = {
	name = GetCountyNamePlural
	text = {
		trigger = {tag = CYM}
		localization_key = "Cantrefi"
	}
	text = {
		trigger = {tag = EDS}
		localization_key = "Duchies"
	}
	text = {
		trigger = {
			NOT = {tag = EDS}
			NOT = {tag = CYM}
		}
		localization_key = "Counties"
	}
}


defined_text = {
	name = GetCountyName
	text = {
		trigger = {tag = CYM}
		localization_key = "Cantref"
	}
	text = {
		trigger = {tag = EDS}
		localization_key = "Duchy"
	}
	text = {
		trigger = {
			NOT = {tag = EDS}
			NOT = {tag = CYM}
		}
		localization_key = "County"
	}
}



defined_text = {
	name = var_pillaging_arms_adding
	text = {
		trigger = {FROM = {check_variable = {arms_factory_level > 6}}}
		localization_key = "5"
	}
	text = {
		trigger = {FROM = {check_variable = {arms_factory_level > 4}}}
		localization_key = "3"
	}
	text = {
		trigger = {FROM =  {check_variable = {arms_factory_level > 2}}}
		localization_key = "2"
	}
	text = {
		trigger = {FROM = {check_variable = {arms_factory_level > 0}}}
		localization_key = "1"
	}
	text = {
		localization_key = "0"
	}
}

defined_text = {
	name = var_pillaging_civs_adding
	text = {
		trigger = {FROM = {check_variable = {industrial_complex_level > 6}}}
		localization_key = "5"
	}
	text = {
		trigger = {FROM = {check_variable = {industrial_complex_level > 4}}}
		localization_key = "3"
	}
	text = {
		trigger = {FROM =  {check_variable = {industrial_complex_level > 2}}}
		localization_key = "2"
	}
	text = {
		trigger = {FROM = {check_variable = {industrial_complex_level > 0}}}
		localization_key = "1"
	}
	text = {
		localization_key = "0"
	}
}