# 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

defined_text = { # Country
	name = Get_Yugo_Uprising_strength
	text = {
		trigger = {			
			check_variable = { yug_total_com_size < 0.3 }
		}
		localization_key = YUG_weak_communists
	}
	text = {
		trigger = {			
			check_variable = { yug_total_com_size > 0.29 }
			check_variable = { yug_total_com_size < 0.6 }
		}
		localization_key = YUG_average_communists
	}
	text = {
		trigger = {			
			check_variable = { yug_total_com_size > 0.59 }
			check_variable = { yug_total_com_size < 0.8 }
		}
		localization_key = YUG_strong_communists
	}
	text = {
		trigger = {			
			check_variable = { yug_total_com_size > 0.79 }
		}
		localization_key = YUG_very_strong_communists
	}
}

defined_text = {
	name = GetRomanianStrengthinState
	text = {
		trigger = {			
			check_variable = { claim_strength_ROM > 0 }
		}
		localization_key = ROM_strength
	}
}

defined_text = {
	name = GetGermanStrengthinState
	text = {
		trigger = {
			check_variable = { claim_strength_GER > 0 }
		}
		localization_key = GER_strength
	}
}

defined_text = {
	name = GetItalianStrengthinState
	text = {
		trigger = {			
			check_variable = { claim_strength_ITA > 0 }
		}
		localization_key = ITA_strength
	}
}

defined_text = {
	name = GetHungarianStrengthinState
	text = {
		trigger = {			
			check_variable = { claim_strength_HUN > 0 }
		}
		localization_key = HUN_strength
	}
}

defined_text = { # Country
	name = GetPrincessName
	text = {
		trigger = {			
			original_tag = ITA
		}
		localization_key = italian_princess_name
	}
	text = {
		trigger = {			
			original_tag = GER
		}
		localization_key = german_princess_name
	}
	text = {
		trigger = {			
			original_tag = HUN
		}
		localization_key = hungarian_princess_name
	}
	text = {
		trigger = {			
			original_tag = SPR
		}
		localization_key = spanish_princess_name
	}
}

defined_text = { # Country
	name = GetFamilyName
	text = {
		trigger = {			
			original_tag = ITA
		}
		localization_key = italian_dynasty_name
	}
	text = {
		trigger = {			
			original_tag = GER
		}
		localization_key = german_dynasty_name
	}
	text = {
		trigger = {			
			original_tag = HUN
		}
		localization_key = hungarian_dynasty_name
	}
	text = {
		trigger = {			
			original_tag = SPR
		}
		localization_key = spanish_dynasty_name
	}
}

defined_text = { # Country
	name = GetAlliesName
	text = {
		trigger = {			
			event_target:yugoslavia_wedding_partner = { original_tag = ITA }
		}
		localization_key = FACTION_NAME_GER_fascism
	}
	text = {
		trigger = {			
			event_target:yugoslavia_wedding_partner = { original_tag = GER }
		}
		localization_key = GER_central_powers_faction
	}
	text = {
		trigger = {			
			event_target:yugoslavia_wedding_partner = { original_tag = HUN }
		}
		localization_key = GER_central_powers_faction
	}
	text = {
		trigger = {			
			event_target:yugoslavia_wedding_partner = { original_tag = SPR }
		}
		localization_key = carlist_text
	}
	text = {
		localization_key = Allies
	}
}

defined_text = { # Country
	name = GetLondonBelgrade
	text = {
		trigger = {			
			has_war = yes
		}
		localization_key = VICTORY_POINTS_6103
	}
	text = {
		trigger = {			
			has_war = no
		}
		localization_key = VICTORY_POINTS_11586
	}
}

defined_text = { # Country
	name = GetWeddingGoodBad
	text = {
		trigger = {			
			has_war = yes
		}
		localization_key = YUG_wedding_bad
	}
	text = {
		trigger = {			
			has_war = no
		}
		localization_key = YUG_wedding_good
	}
}