
# tag aliases are country tags that maps to different countries depending on a set of triggers

#TAG = { #name of alias tag. must be 3 letters and different from any other tags. once this is defined, it will be available in any script that uses country tags
#
#	# you can map an alias directly to an event target or another variable. only use one of the following entries
#	# if any of these are used, the alias will be mapped to that specific variable/event target and no other check will be done
#	variable = var_name
#	global_event_target = event_target_name
#	event_target = event_target_name
#
#	# if an alias is not mapped directly to a variable/event target, it will be searched within a list of countries that can be definied below
#	# you can use any combination of these below
#	# while checking for triggers/variables, current scope will be the country we are checking and PREV will be the scope that uses the alias
#	# if none of the following targets are defined, the game will check all existing countries but this is highly discouraged for performance reasons
#	original_tag = GER # pick a country that has original_tag of GER
#	targets = { GER FRA ENG } # search within the list of tags/variables
#	target_array = array_name # search within an array
#
#	# by default alias will return the first existing country that it matches and fulfils the triggers. you can also define a scoring system like this and it will pick the tag with the highest score > 0
#	country_score = {
#		base = 1
#		modifier = {
#			add = 10
#			# if mapped tag is in same faction with the country in scope that calls this alias give it a higher score
#			is_in_faction_with = PREV
#		}
#		modifier = {
#			add = 5
#			# if the mapped tag has fascism give it a higher score
#			has_government = fascism
#		}
#	}
#
#	fallback = GER # if the alias can't match anything, use this one as fallback (no triggers or weight will be checked)
#
#	# you can define a list of trigger, in that case it will chech is tags that this alias is mapped to and return only if the triggers are true
#	or = {
#		#only accept targets that is ally with us or is fascist
#		is_in_faction_with = PREV
#		has_government = fascism
#	}
#	# trigger 2
#	# trigger 3
#	# ...
#}

GER={
	targets = { PRS AUS BAV GEC }
	country_score = {
		base = 0
		modifier = {
			add = 10
			# Prussia forms germany
			trigger_is_germany = yes
		}
		modifier = {
			add = 5
			# if Bavaria formed it
			tag = GEC
		}
	}
	fallback = PRS
}

# USA={
	# targets = {	MIO ASA MIN TEX KTY NEG CAL ORE DAK UTA NMX KNS USA_free_states_of_america }
	# country_score = {
		# base = 1
		# modifier = {
			# # Any state solidifies hold of mantle
			# add = 10
			# trigger_solidify_claim_mantle_of_states
		# }
	# }
	# fallback USA_free_states_of_america
# }
CHI={
	targets = { QNG ROC PRC TAI GXC TAW PTH SIC YAL NIE BEI}
	has_country_flag = true_china
	#fallback = QNG
}

ITA={
	targets = { PIE TUS NSC PAP LVN SAR CBI }
	has_country_flag = is_literally_italy
	fallback = PIE
}

PKH = {  #Plyad Khanate -> Kazakh revolt
    original_tag = KOK
    has_country_flag = KOK_sided_with_the_rebels
}

AOR = {
	original_tag = GRE
	has_country_flag = GRE_anti_otto_rebellion_flag
}