# 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 = {
	name = SWI_GetCouncilor1name
	text = {
		trigger = {
			SWI = {
				has_variable = SWI_councilor_1
			}
		}
		localization_key = SWI_councilor1_loc_key
	}
	text = {
		localization_key = SWI_no_councilor
	}
}

defined_text = {
	name = SWI_GetCouncilor2name
	text = {
		trigger = {
			SWI = {
				has_variable = SWI_councilor_2
			}
		}
		localization_key = SWI_councilor2_loc_key
	}
	text = {
		localization_key = SWI_no_councilor
	}
}

defined_text = {
	name = SWI_GetCouncilor3name
	text = {
		trigger = {
			SWI = {
				has_variable = SWI_councilor_3
			}
		}
		localization_key = SWI_councilor3_loc_key
	}
	text = {
		localization_key = SWI_no_councilor
	}
}

defined_text = {
	name = SWI_GetPresidentName
	text = {
		trigger = {
			SWI = {
				has_variable = SWI_confederation_president
			}
		}
		localization_key = SWI_confederation_president_loc_key
	}
	text = {
		localization_key = SWI_no_president
	}
}

defined_text = { #Text for Hostile country decision 
	name = SWI_get_country_angry_mission_title
	text = {
		trigger = {
			SWI = { 
				has_country_flag  = SWI_in_breach_of_neutrality 
				has_variable = SWI_angriest_country
			}
		}
		localization_key = SWI_country_angry_mission_active
	}
	text = {
		trigger = {
			SWI = {
				NOT = { has_country_flag  = SWI_in_breach_of_neutrality }
				has_variable = SWI_last_angriest_country				
			}
		}
		localization_key = SWI_country_angry_mission_completed		
	}
	text = {
		localization_key = SWI_country_angry_mission_default
	}
}

defined_text = { #Text to get fascis-est neighbor 
	name = SWI_get_fascist_neighbor
	text = {
		trigger = {
			GER = {
				exists = yes
				has_government = fascism 
				is_major = yes
			}
		}
		localization_key = "[GER.GetNameDef]"
	}
	text = {
		trigger = {
			ITA = {
				exists = yes 
				has_government = fascism 
				is_major = yes
			}
		}
		localization_key = "[ITA.GetNameDef]"
	}
	text = {
		trigger = {
			FRA = {
				exists = yes
				SWI_is_country_to_balance = yes 
				has_government = fascism 
			}
		}
		localization_key = "[FRA.GetNameDef]"
	}	
	text = {
		trigger = {
			ENG = {
				exists = yes
				SWI_is_country_to_balance = yes 
				has_government = fascism 
			}
		}
		localization_key = "[ENG.GetNameDef]"
	}
	text = {
		localization_key = SWI_generic_fascist_neighbor
	}
}

defined_text = { #Text to get fascis-est neighbor 
	name = SWI_get_fascist_neighbor_cap
	text = {
		trigger = {
			GER = {
				exists = yes
				has_government = fascism 
				is_major = yes
			}
		}
		localization_key = "[GER.GetNameDefCap]"
	}
	text = {
		trigger = {
			ITA = {
				exists = yes 
				has_government = fascism 
				is_major = yes
			}
		}
		localization_key = "[ITA.GetNameDefCap]"
	}
	text = {
		trigger = {
			FRA = {
				exists = yes
				SWI_is_country_to_balance = yes 
				has_government = fascism 
			}
		}
		localization_key = "[FRA.GetNameDefCap]"
	}	
	text = {
		trigger = {
			ENG = {
				exists = yes
				SWI_is_country_to_balance = yes 
				has_government = fascism 
			}
		}
		localization_key = "[ENG.GetNameDefCap]"
	}
	text = {
		localization_key = SWI_generic_fascist_neighbor_cap
	}
}

defined_text = { #How to call your fascist-est neighbor  
	name = SWI_get_fascist_neighbor_adjective
	text = {
		trigger = {
			GER = {
				exists = yes
				has_government = fascism 
				is_major = yes
			}
		}
		localization_key = "[GER.GetAdjective]"
	}
	text = {
		trigger = {
			ITA = {
				exists = yes 
				has_government = fascism 
				is_major = yes
			}
		}
		localization_key = "[ITA.GetAdjective]"
	}
	text = {
		trigger = {
			FRA = {
				exists = yes
				SWI_is_country_to_balance = yes 
				has_government = fascism 
			}
		}
		localization_key = "[FRA.GetAdjective]"
	}
	text = {
		trigger = {
			ENG = {
				exists = yes
				SWI_is_country_to_balance = yes 
				has_government = fascism 
			}
		}
		localization_key = "[ENG.GetAdjective]"
	}
	text = {
		localization_key = SWI_fascist
	}
}

defined_text = { #Text shown in the oust councilor decision 
	name = SWI_Get_ousted_councilor_text_1 
	text = {
		trigger = {
			has_variable = SWI_councilor_1
		}
		localization_key = SWI_decision_remove_councilor_1_text
	}
	text = {
		localization_key = SWI_councilor_ousted_alt_text
	}
}

defined_text = { #Text shown in the oust councilor decision 
	name = SWI_Get_ousted_councilor_text_2 
	text = {
		trigger = {
			has_variable = SWI_councilor_2
		}
		localization_key = SWI_decision_remove_councilor_2_text
	}
	text = {
		localization_key = SWI_councilor_ousted_alt_text
	}
}

defined_text = { #Text shown in the oust councilor decision 
	name = SWI_Get_ousted_councilor_text_3 
	text = {
		trigger = {
			has_variable = SWI_councilor_3
		}
		localization_key = SWI_decision_remove_councilor_3_text
	}
	text = {
		localization_key = SWI_councilor_ousted_alt_text
	}
}

defined_text = { #Text to show for the title of the influence event
	name = SWI_influenced_state 
	text = {
		trigger = {
			SWI = { has_variable = SWI_influence_target_state } 
		}
		localization_key = SWI_expantion_state_loc
	}
	text = {
		localization_key = SWI_expansion_no_state
	}
}

defined_text = { #Text to show for the title of the pressing for a state event
	name = SWI_pressed_state 
	text = {
		trigger = {
			SWI = { has_variable = SWI_state_being_claimed } 
		}
		localization_key = SWI_claiming_state_loc
	}
	text = {
		localization_key = SWI_claiming_no_state_loc
	}
}

defined_text = {
	name = SWI_purchase_democratic_planes_title
	text = {
		trigger = {
			SWI_dem_usa_valid_to_buy_planes = yes 
		}
		localization_key = SWI_purchase_american_planes_usa
	}
	text = {
		localization_key = SWI_purchase_american_planes_other
	}
}

defined_text = {
	name = SWI_purchase_american_planes_second_paragraph
	text = {
		trigger = {
			SWI_dem_usa_valid_to_buy_planes = yes
		}
		localization_key = SWI_american_planes_desc_usa
	}
	text = {
		localization_key = SWI_american_planes_desc_other 
	}
}

defined_text = {
	name = SWI_purchase_fascist_planes_name
	text = {
		trigger = {
			SWI = { has_variable = SWI_biggest_fascist }
			var:SWI_biggest_fascist = { tag = GER }
		}
		localization_key = SWI_purchase_german_planes_default
	}
	text = {
		localization_key = SWI_purchase_german_planes_alt
	}
}

defined_text = {
		name = SWI_FROM_or_fake_country_word
		text = {
			trigger = {
				NOT = { has_completed_focus = SWI_fund_resistance_groups }
			}
			localization_key = SWI_fake_country_word
		}
		text = {
			localization_key = "[FROM.GetName]"
		} 
}

defined_text = {
		name = SWI_renounce_guiding_princpiples_desc_loc
		text = {
			trigger = {
				has_power_balance_modifier = {
					id = SWI_centralization_bop 
					modifier = SWI_guiding_principles_cantons
				}				
			}
			localization_key = SWI_renounce_guiding_principles_desc_cantons
		}
		text = {
			localization_key = SWI_renounce_guiding_principles_desc_council
		}
}

defined_text = {
	name = SWI_get_buy_ships_from_country_title
	text = {
		trigger = {
			FROM = {
				tag = ENG
			}
		}
		localization_key = SWI_buy_ships_ENG
	}
	text = {
		trigger = {
			FROM = {
				tag = SOV
			}
		}
		localization_key = SWI_buy_ships_SOV
	}
	text = {
		trigger = {
			FROM = {
				tag = GER
			}
		}
		localization_key = SWI_buy_ships_GER
	}
	text = {
		trigger = {
			FROM = {
				tag = USA
			}
		}
		localization_key = SWI_buy_ships_USA
	}
	text = {
		localization_key = SWI_buy_ships_from_country_generic
	}
}

defined_text = { #This is the extra paragraph for when Switzerland asks for independence and the overlord has part of the alps
	name = GetDemandingAlpsParagraph
	text = {
		trigger = {
			ROOT = {
				SWI_country_has_alpine_states = yes
			}
		}
		localization_key = SWI_independence_demand_alps_paragraph
	}
}

defined_text = { #Response to give independence changes text if they have alps, so it's clear they're only getting independence but specifically not the alps.  
	name = SWI_only_independence_response
	text = {
		trigger = {
			ROOT = {
				SWI_country_has_alpine_states = yes
			}
		}
		localization_key = SWI_have_alps_but_only_independence		
	}
	text = {
		localization_key = SWI_no_alps_independence
	}
}

defined_text = { #Explanation for first Election Event.
	name = SWI_get_extra_election_paragraph 
	text = {
		trigger = {
			SWI = {
				NOT = { has_country_flag = SWI_first_election_passed } 
			}
		}
		localization_key = SWI_first_election_text
	}
}

defined_text = { #Text to show extra explanation of Council System in Decision Category. Should disappear once the player did their first election. 
	name = SWI_get_temp_explanation_of_council_system
	text = {
		trigger = {
			SWI = { 
				NOT = { has_country_flag = SWI_first_election_passed }
			}
		}
		localization_key = SWI_basic_council_TT
	}
}

defined_text = {
	name = SWI_country_to_appease_status_2
	text = {
		trigger = {
			var:SWI.SWI_country_to_appease_2 = {
				SWI_country_opinion_is_excellent = yes
			}			
		}
		localization_key = SWI_opinion_excellent_text

	}
	text = {
		trigger = {
			var:SWI.SWI_country_to_appease_2 = {
				SWI_country_opinion_is_good = yes
			}	
		}
		localization_key = SWI_opinion_good_text
	}
}

defined_text = {
		name = SWI_get_correct_council_category_description
		text = {
			trigger = {
				SWI = {
					has_government = fascism
					OR = {
						has_completed_focus = SWI_promote_tobler 
						has_completed_focus = SWI_promote_henne
					}
				} 
			}
			localization_key = SWI_federal_council_decisions_category_desc_fasc
		}
		text = {
			trigger = {
				SWI = {
					NOT = {
						has_country_leader = {
							character = SWI_federal_assembly
							ruling_only = yes
						}
						has_country_leader = {
							character = SWI_federal_council
							ruling_only = yes
						}
					} 
				}
			}
			localization_key = SWI_federal_council_decisions_category_desc_alt	
		}
		text = {
			localization_key = SWI_federal_council_decisions_category_desc_dem
		}
}