## Used for Fear of the Dark Random Events

defined_text = {
	name = GetSpecialization
	random = no
	text = {
		trigger = {
			OR = {
				has_trait = leader_trait_expertise_voidcraft
				has_trait = leader_trait_expertise_voidcraft_2
				has_trait = leader_trait_expertise_voidcraft_3
			}
		}
		localization_key = a_voidcraft
	}
	text = {
		trigger = {
			OR = {
				has_trait = leader_trait_expertise_computing
				has_trait = leader_trait_expertise_computing_2
				has_trait = leader_trait_expertise_computing_3
			}
		}
		localization_key = a_computing
	}
	text = {
		trigger = {
			OR = {
				has_trait = leader_trait_expertise_field_manipulation
				has_trait = leader_trait_expertise_field_manipulation_2
				has_trait = leader_trait_expertise_field_manipulation_3
			}
		}
		localization_key = a_field_manipulation
	}
	text = {
		trigger = {
			OR = {
				has_trait = leader_trait_expertise_particles
				has_trait = leader_trait_expertise_particles_2
				has_trait = leader_trait_expertise_particles_3
			}
		}
		localization_key = a_particle_physics
	}
	text = {
		trigger = {
			OR = {
				has_trait = leader_trait_expertise_biology
				has_trait = leader_trait_expertise_biology_2
				has_trait = leader_trait_expertise_biology_3
			}
		}
		localization_key = a_biology
	}
	text = {
		trigger = {
			OR = {
				has_trait = leader_trait_expertise_military_theory
				has_trait = leader_trait_expertise_military_theory_2
				has_trait = leader_trait_expertise_military_theory_3
			}
		}
		localization_key = a_military_theory
	}
	text = {
		trigger = {
			OR = {
				has_trait = leader_trait_expertise_new_worlds
				has_trait = leader_trait_expertise_new_worlds_2
				has_trait = leader_trait_expertise_new_worlds_3
			}
		}
		localization_key = a_new_worlds
	}
	text = {
		trigger = {
			OR = {
				has_trait = leader_trait_expertise_psionics
				has_trait = leader_trait_expertise_psionics_2
				has_trait = leader_trait_expertise_psionics_3
			}
		}
		localization_key = a_psionics
	}
	text = {
		trigger = {
			OR = {
				has_trait = leader_trait_expertise_statecraft
				has_trait = leader_trait_expertise_statecraft_2
				has_trait = leader_trait_expertise_statecraft_3
			}
		}
		localization_key = a_statecraft
	}
	text = {
		trigger = {
			OR = {
				has_trait = leader_trait_expertise_industry
				has_trait = leader_trait_expertise_industry_2
				has_trait = leader_trait_expertise_industry_3
			}
		}
		localization_key = a_industry
	}
	text = {
		trigger = {
			OR = {
				has_trait = leader_trait_expertise_materials
				has_trait = leader_trait_expertise_materials_2
				has_trait = leader_trait_expertise_materials_3
			}
		}
		localization_key = a_materials
	}
	text = {
		trigger = {
			OR = {
				has_trait = leader_trait_expertise_propulsion
				has_trait = leader_trait_expertise_propulsion_2
				has_trait = leader_trait_expertise_propulsion_3
			}
		}
		localization_key = a_propulsion
	}
	default = a_cloaking
}

defined_text = { # Focus of studies
	name = GetStudyTopic
	random = yes
	text = {
		localization_key = soil_composition
	}
	text = {
		localization_key = meteorological_patterns
	}
	text = {
		localization_key = city_planning
	}
	text = {
		localization_key = entertainment_consumption_habits
	}
	text = {
		localization_key = dietary_choices
	}
}

defined_text = { # Leader Coercion
	name = GetfotdCoercion
	random = yes
	text = {
		localization_key = fotdCoercion1
	}

	text = {
		localization_key = fotdCoercion2
	}

	text = {
		localization_key = fotdCoercion3
	}

	text = {
		localization_key = fotdCoercion4
	}
}

defined_text = { # Random technology
	name = fotdGetTech
	text = {
		trigger = { has_country_flag = terraforming_tech }
		localization_key = fotd_terraforming_tech_loc
	}
	text = {
		trigger = { has_country_flag = unity_tech }
		localization_key = fotd_unity_tech_loc
	}
	text = {
		trigger = { has_country_flag = cloaking_tech }
		localization_key = fotd_cloaking_tech_loc
	}
	text = {
		trigger = { has_country_flag = laser_tech }
		localization_key = fotd_laser_tech_loc
	}
	text = {
		trigger = { has_country_flag = mining_tech }
		localization_key = fotd_mining_tech_loc
	}
	text = {
		trigger = { has_country_flag = building_tech }
		localization_key = fotd_building_tech
	}
}

defined_text = { # Random technology
	name = fotdGetTechPrice
	text = {
		trigger = { has_country_flag = slowed_science_ships }
		localization_key = fotd_slowed_science_ships_loc
	}
	text = {
		trigger = { has_country_flag = slowed_first_contact }
		localization_key = fotd_slowed_first_contact_loc
	}
	text = {
		trigger = { has_country_flag = break_defensive_pact }
		localization_key = fotd_break_defensive_pact_loc
	}
	text = {
		trigger = { has_country_flag = break_migration_pact }
		localization_key = fotd_break_migration_pact_loc
	}
	text = {
		trigger = { has_country_flag = support_speratists }
		localization_key = fotd_support_seperatists_loc
	}
	text = {
		trigger = { has_country_flag = stop_communing_with_shroud }
		localization_key = fotd_stop_communicating_with_shroud_loc
	}
	text = {
		trigger = { has_country_flag = leave_federation }
		localization_key = fotd_leave_federation_loc
	}
	text = {
		trigger = { has_country_flag = have_no_voice }
		localization_key = fotd_have_no_voice_loc
	}
}

defined_text = { # First Contact Precluded Friendship tooltip
	name = GetPrecludedFriendshipCause
	text = {
		trigger = {
			has_country_flag = special_intro_for@root
			has_origin = origin_slavers
		}
		localization_key = friendship_already_precluded_slave_origins
	}
	default = friendship_already_precluded_hostile
}

# Payback Repair the Gene Clinic event chain
defined_text = {
	name = GetAgreementStatus
	text = {
		trigger = {
			any_country = {
				has_research_agreement = root.owner
			}
		}
		localization_key = payback_repair_clinic_yes_agreement
	}
	default = payback_repair_clinic_no_agreement
}

defined_text = {
	name = GetBiologicalLithoidUpper
	text = {
		trigger = {
			has_trait = trait_lithoid
		}
		localization_key = lithoid
	}
	default = biological
}

defined_text = {
	name = GetBiologicalLithoidLower
	text = {
		trigger = {
			has_trait = trait_lithoid
		}
		localization_key = lithoid_lower
	}
	default = biological_lower
}

defined_text = {
	name = GetLiquidState
	text = {
		trigger = {
			has_trait = trait_lithoid
		}
		localization_key = sand
	}
	default = liquid
}

defined_text = {
	name = GetDisguiseState
	text = {
		trigger = {
			species = { is_robotic = no }
			NOT = { has_technology = tech_gene_tailoring }
		}
		localization_key = operation_no_disguise_bio
	}
	text = {
		trigger = {
			species = { is_robotic = yes }
			NOR = {
				has_technology = tech_robomodding
				has_technology = tech_robomodding_m # Machine Intelligence variant
			}
		}
		localization_key = operation_no_disguise_machine
	}
	default = operation_has_disguise
}

defined_text = {
	name = GetFleshy
	text = {
		trigger = {
			is_species_class = LITHOID
		}
		localization_key = fleshy_rock
	}
	text = {
		trigger = {
			is_species_class = PLANT
		}
		localization_key = fleshy_plant
	}
	text = {
		trigger = {
			is_species_class = FUN
		}
		localization_key = fleshy_mushroom
	}
	text = {
		trigger = {
			is_species_class = ART
		}
		localization_key = fleshy_arthropod
	}
	default = fleshy_flesh
}

# Use before GetPreFTLLower to get the appropriate "A" or "An"
defined_text = {
	name = GetAAnPreFTLUpper
	text = {
		trigger = {
			OR = {
				is_fanatic_materialist = yes
				is_fanatic_spiritualist = yes
			}
		}
		localization_key = string_An_Upper
	}
	default = string_A_Upper
}
# Use before GetPreFTLLower to get the appropriate "a" or "an"
defined_text = {
	name = GetAAnPreFTLLower
	text = {
		trigger = {
			OR = {
				is_fanatic_materialist = yes
				is_fanatic_spiritualist = yes
			}
		}
		localization_key = string_an
	}
	default = string_a
}

defined_text = {
	name = GetPreFTLUpper
	text = {
		trigger = {
			is_fanatic_authoritarian = yes
		}
		localization_key = primitive
	}
	text = {
		trigger = {
			OR = {
				is_fanatic_xenophobe = yes
				has_valid_civic = civic_hive_devouring_swarm
			}
		}
		localization_key = savage
	}
	text = {
		trigger = {
			is_fanatic_spiritualist = yes
		}
		localization_key = unenlightened
	}
	text = {
		trigger = {
			is_fanatic_materialist = yes
		}
		localization_key = unsophisticated
	}
	text = {
		trigger = {
			is_fanatic_militarist = yes
		}
		localization_key = barbarian
	}
	default = pre_ftl
}

defined_text = {
	name = GetPreFTLLower
	text = {
		trigger = {
			is_fanatic_authoritarian = yes
		}
		localization_key = primitive_lower
	}
	text = {
		trigger = {
			OR = {
				is_fanatic_xenophobe = yes
				has_valid_civic = civic_hive_devouring_swarm
			}
		}
		localization_key = savage_lower
	}
	text = {
		trigger = {
			is_fanatic_spiritualist = yes
		}
		localization_key = unenlightened_lower
	}
	text = {
		trigger = {
			is_fanatic_materialist = yes
		}
		localization_key = unsophisticated_lower
	}
	text = {
		trigger = {
			is_fanatic_militarist = yes
		}
		localization_key = barbarian_lower
	}
	default = pre_ftl_lower
}

defined_text = {
	name = GetPreFTLUpperPlural
	text = {
		trigger = {
			is_fanatic_authoritarian = yes
		}
		localization_key = primitive_plural
	}
	text = {
		trigger = {
			OR = {
				is_fanatic_xenophobe = yes
				has_valid_civic = civic_hive_devouring_swarm
			}
		}
		localization_key = savage_plural
	}
	text = {
		trigger = {
			is_fanatic_spiritualist = yes
		}
		localization_key = unenlightened_plural
	}
	text = {
		trigger = {
			is_fanatic_materialist = yes
		}
		localization_key = unsophisticated_plural
	}
	text = {
		trigger = {
			is_fanatic_militarist = yes
		}
		localization_key = barbarian_plural
	}
	default = pre_ftl_plural
}

defined_text = {
	name = GetPreFTLLowerPlural
	text = {
		trigger = {
			is_fanatic_authoritarian = yes
		}
		localization_key = primitive_plural_lower
	}
	text = {
		trigger = {
			OR = {
				is_fanatic_xenophobe = yes
				has_valid_civic = civic_hive_devouring_swarm
			}
		}
		localization_key = savage_plural_lower
	}
	text = {
		trigger = {
			is_fanatic_spiritualist = yes
		}
		localization_key = unenlightened_plural_lower
	}
	text = {
		trigger = {
			is_fanatic_materialist = yes
		}
		localization_key = unsophisticated_plural_lower
	}
	text = {
		trigger = {
			is_fanatic_militarist = yes
		}
		localization_key = barbarian_plural_lower
	}
	default = pre_ftl_plural_lower
}

defined_text = {
	name = GetRandomCompassDirection
	random = yes
	text = {
		localization_key = northern
	}
	text = {
		localization_key = southern
	}
	text = {
		localization_key = eastern
	}
	text = {
		localization_key = western
	}
}

defined_text = {
	name = GetAMountainFeature
	text = {
		trigger = {
			NOT = { is_planet_class = pc_habitat }
		}
		localization_key = mountain
	}
	text = {
		trigger = {
			is_planet_class = pc_habitat
		}
		localization_key = mountain_habitat
	}
}

defined_text = {
	name = GetFanXenoInsightGain
	text = {
		trigger = {
			has_first_contact_dlc = yes
		}
		localization_key = fan_xenophile_insight_gain_has_dlc
	}
	text = {
		trigger = {
			has_first_contact_dlc = no
		}
		localization_key = fan_xenophile_insight_gain_has_no_dlc
	}
}

defined_text = {
	name = GetXenoInsightGain
	text = {
		trigger = {
			has_first_contact_dlc = yes
		}
		localization_key = xenophile_insight_gain_has_dlc
	}
	text = {
		trigger = {
			has_first_contact_dlc = no
		}
		localization_key = xenophile_insight_gain_has_no_dlc
	}
}

defined_text = {
	name = GetPassiveObservationInsights
	text = {
		trigger = {
			has_first_contact_dlc = yes
		}
		localization_key = passive_observation_insight_gain_has_dlc
	}
	text = {
		trigger = {
			has_first_contact_dlc = no
		}
		localization_key = passive_observation_insight_gain_has_no_dlc
	}
}

defined_text = {
	name = GetAggressiveObservationInsights
	text = {
		trigger = {
			has_first_contact_dlc = yes
		}
		localization_key = aggressive_observation_insight_gain_has_dlc
	}
	text = {
		trigger = {
			has_first_contact_dlc = no
		}
		localization_key = aggressive_observation_insight_gain_has_no_dlc
	}
}

defined_text = {
	name = GetCreativeInsultTooltip
	random = no
	text = {
		trigger = {
			has_technology = tech_satisfying_insults
			has_modifier = satisfying_insult_recently
		}
		localization_key = satisfying_insult_cooldown
	}
	text = {
		trigger = {
			has_technology = tech_satisfying_insults
			NOT = {
				has_modifier = satisfying_insult_recently
			}
		}
		localization_key = gain_satisfying_insult_recently
	}
	text = {
		trigger = {
			NOT = { has_technology = tech_satisfying_insults }
		}
		localization_key = aggressive_observation_insight_gain_has_no_dlc
	}
}

defined_text = {
	name = GetFotDAid
	random = no
	text = {
		trigger = {
			any_situation = {
				is_situation_type = situation_energy_deficit
			}
		}
		localization_key = fotdEnergyAid
	}
	text = {
		trigger = {
			any_situation = {
				is_situation_type = situation_food_deficit
			}
		}
		localization_key = fotdFoodAid
	}
	text = {
		trigger = {
			any_situation = {
				is_situation_type = situation_alloys_deficit
			}
		}
		localization_key = fotdAlloyAid
	}
	text = {
		trigger = {
			any_situation = {
				is_situation_type = situation_mineral_deficit
			}
		}
		localization_key = fotdMineralAid
	}
	text = {
		trigger = {
			any_situation = {
				is_situation_type = situation_consumer_goods_deficit
			}
		}
		localization_key = fotdConsumerGoodsAid
	}
	text = {
		trigger = {
			any_situation = {
				is_situation_type = situation_exotic_gases_deficit
			}
		}
		localization_key = fotdGasAid
	}
	text = {
		trigger = {
			any_situation = {
				is_situation_type = situation_rare_crystals_deficit
			}
		}
		localization_key = fotdCrystalAid
	}
	text = {
		trigger = {
			any_situation = {
				is_situation_type = situation_volatile_motes_deficit
			}
		}
		localization_key = fotdMotesAid
	}
}

defined_text = {
	name = GetSeperatistAid
	random = no
	text = {
		trigger = {
			has_country_flag = energy_seperatist_deficit
		}
		localization_key = fotdEnergyAid
	}
	text = {
		trigger = {
			has_country_flag = food_seperatist_deficit
		}
		localization_key = fotdFoodAid
	}
	text = {
		trigger = {
			has_country_flag = alloy_seperatist_deficit
		}
		localization_key = fotdAlloyAid
	}
	text = {
		trigger = {
			has_country_flag = mineral_seperatist_deficit
		}
		localization_key = fotdMineralAid
	}
	text = {
		trigger = {
			has_country_flag = consumer_goods_seperatist_deficit
		}
		localization_key = fotdConsumerGoodsAid
	}
}

defined_text = {
	name = GetStartingDrive
	random = no
	text = {
		trigger = {
			is_eager_explorer_empire = no
		}
		localization_key = hyper_drive
	}
	text = {
		trigger = {
			is_eager_explorer_empire = yes
		}
		localization_key = subspace_drive
	}
}

defined_text = {
	name = GetStartingDriveCap
	random = no
	text = {
		trigger = {
			is_eager_explorer_empire = no
		}
		localization_key = hyper_drive_cap
	}
	text = {
		trigger = {
			is_eager_explorer_empire = yes
		}
		localization_key = subspace_drive_cap
	}
}

defined_text = {
	name = GetStartingDrivePlural
	random = no
	text = {
		trigger = {
			is_eager_explorer_empire = no
		}
		localization_key = hyper_drive_plural
	}
	text = {
		trigger = {
			is_eager_explorer_empire = yes
		}
		localization_key = subspace_drive_plural
	}
}

defined_text = {
	name = GetStartingDrivePluralCap
	random = no
	text = {
		trigger = {
			is_eager_explorer_empire = no
		}
		localization_key = hyper_drive_plural_cap
	}
	text = {
		trigger = {
			is_eager_explorer_empire = yes
		}
		localization_key = subspace_drive_plural_cap
	}
}

defined_text = {
	name = GetDebtCollectorsDeal
	random = no
	text = {
		trigger = {
			has_country_flag = debt_collectors_pay_energy
		}
		localization_key = payback_debt_collectors_chain_energy
	}
	text = {
		trigger = {
			has_country_flag = debt_collectors_pay_consumer_goods
		}
		localization_key = payback_debt_collectors_chain_consumer_goods
	}
	text = {
		trigger = {
			has_country_flag = debt_collectors_pay_alloys
		}
		localization_key = payback_debt_collectors_chain_alloys
	}
	text = {
		trigger = {
			has_country_flag = debt_collectors_pay_slaves
		}
		localization_key = payback_debt_collectors_chain_pops
	}
	text = {
		trigger = {
			has_country_flag = payback_debt_collectors_chain_refused_pay_won
		}
		localization_key = payback_debt_collectors_chain_refused_won
	}
	text = {
		trigger = {
			has_country_flag = payback_debt_collectors_chain_refused_pay_lost
		}
		localization_key = payback_debt_collectors_chain_refused_lost
	}
	default = payback_debt_collectors_chain_empty
}

defined_text = {
	name = GetAwarenessLevel
	random = no
	text = {
		trigger = {
			current_awareness_level = none
		}
		localization_key = awareness_unaware
	}
	text = {
		trigger = {
			current_awareness_level = low
		}
		localization_key = awareness_low
	}
	text = {
		trigger = {
			current_awareness_level = medium
		}
		localization_key = awareness_partial
	}
	text = {
		trigger = {
			current_awareness_level = high
		}
		localization_key = awareness_high
	}
	text = {
		trigger = {
			current_awareness_level = full
		}
		localization_key = awareness_full
	}
}

defined_text = {
	name = GetNewAge
	random = no
	text = {
		trigger = {
			has_country_flag = new_stone_age
		}
		localization_key = stone_age
	}
	text = {
		trigger = {
			has_country_flag = new_bronze_age
		}
		localization_key = bronze_age
	}
	text = {
		trigger = {
			has_country_flag = new_iron_age
		}
		localization_key = iron_age
	}
	text = {
		trigger = {
			has_country_flag = new_late_medieval_age
		}
		localization_key = late_medieval_age
	}
	text = {
		trigger = {
			has_country_flag = new_renaissance_age
		}
		localization_key = renaissance_age
	}
	text = {
		trigger = {
			has_country_flag = new_steam_age
		}
		localization_key = steam_age
	}
	text = {
		trigger = {
			has_country_flag = new_industrial_age
		}
		localization_key = industrial_age
	}
	text = {
		trigger = {
			has_country_flag = new_machine_age
		}
		localization_key = machine_age
	}
	text = {
		trigger = {
			has_country_flag = new_atomic_age
		}
		localization_key = atomic_age
	}
	text = {
		trigger = {
			has_country_flag = new_early_space_age
		}
		localization_key = early_space_age
	}
}

# For referring to regular empires or pre-FTL societies in tooltips, etc.:
defined_text = {
	name = GetEmpireSocietyLower
	random = no
	text = {
		trigger = {
			NOT = { is_country_type = primitive }
		}
		localization_key = empire_lower
	}
	text = {
		trigger = {
			is_country_type = primitive
		}
		localization_key = society_lower
	}
}
defined_text = {
	name = GetEmpireSocietyUpper
	random = no
	text = {
		trigger = {
			NOT = { is_country_type = primitive }
		}
		localization_key = empire_upper
	}
	text = {
		trigger = {
			is_country_type = primitive
		}
		localization_key = society_upper
	}
}

defined_text = {
	name = GetPaybackChainDescSwords
	random = no
	text = {
		trigger = {
			exists = event_target:MSI_country
		}
		localization_key = payback_make_them_pay_swords_chain_desc_MSI
	}
	text = {
		trigger = {
			NOT = { exists = event_target:MSI_country }
		}
		localization_key = payback_make_them_pay_swords_chain_desc_no_MSI
	}
}

defined_text = {
	name = GetPaybackChainDescWords
	random = no
	text = {
		trigger = {
			exists = event_target:MSI_country
		}
		localization_key = payback_make_them_pay_words_chain_desc_no_MSI
	}
	text = {
		trigger = {
			NOT = { exists = event_target:MSI_country }
		}
		localization_key = payback_make_them_pay_words_chain_desc_no_MSI
	}
}
