GetCourtType = {
	type = character

	text = {
		trigger = { has_government = landless_adventurer_government }
		localization_key = game_concept_camp
	}

	text = {
		trigger = { is_landless_adventurer = no }
		localization_key = game_concept_court
	}
}

GetCourtTypePlural = {
	type = character

	text = {
		trigger = { has_government = landless_adventurer_government }
		localization_key = game_concept_camps
	}

	text = {
		trigger = { is_landless_adventurer = no }
		localization_key = game_concept_courts
	}
}

GetCourtTypeConcept = {
	type = character

	text = {
		trigger = { has_government = landless_adventurer_government }
		localization_key = CAMP
	}

	text = {
		trigger = { is_landless_adventurer = no }
		localization_key = COURT_CONCEPT
	}
}

GetCourtierType = {
	type = character

	text = {
		trigger = { has_government = landless_adventurer_government }
		localization_key = game_concept_follower
	}

	text = {
		trigger = { is_landless_adventurer = no }
		localization_key = game_concept_courtier
	}
}

GetCourtierTypePlural = {
	type = character

	text = {
		trigger = { has_government = landless_adventurer_government }
		localization_key = game_concept_followers
	}

	text = {
		trigger = { is_landless_adventurer = no }
		localization_key = game_concept_courtiers
	}
}

GetCourtierTypeConcept = {
	type = character

	text = {
		trigger = { has_government = landless_adventurer_government }
		localization_key = FOLLOWER
	}

	text = {
		trigger = { is_landless_adventurer = no }
		localization_key = COURTIER
	}
}

GetCourtiersTypeConcept = {
	type = character

	text = {
		trigger = { is_landless_adventurer = yes }
		localization_key = FOLLOWER_PLURAL
	}

	text = {
		trigger = { is_landless_adventurer = no }
		localization_key = COURTIER_PLURAL
	}
}

TriumphReligiousLocation = {
	type = character

	random_valid = yes

	text = {
		trigger = {
			# Constantinople
			location = province:496
			# Christian
			OR = { faith.religion = religion:protestant_religion faith.religion = religion:catholic_religion faith.religion = religion:eastern_orthodox_religion }
		}
		localization_key = building_type_hagia_sophia_01
	}

	text = {
		trigger = {
			# not Constantinople
			NOT = { location = province:496 }
			# Christian
			OR = { faith.religion = religion:protestant_religion faith.religion = religion:catholic_religion faith.religion = religion:eastern_orthodox_religion }
		}
		localization_key = cathedral
	}

	text = {
		trigger = {
			# Constantinople
			location = province:496
			# Muslim
			faith.religion = religion:islam_religion
		}
		localization_key = building_hagia_sophia_02
	}



	text = {
		trigger = {
			# Other faith
			NOR = {
				OR = { faith.religion = religion:protestant_religion faith.religion = religion:catholic_religion faith.religion = religion:eastern_orthodox_religion }
				faith.religion = religion:islam_religion
			}
		}
		localization_key = main_temple
	}
}

TriumphReligiousLocationCapitalized = {
	type = character

	text = {
		trigger = {
			# Constantinople
			location = province:496
			# Christian
			OR = { faith.religion = religion:protestant_religion faith.religion = religion:catholic_religion faith.religion = religion:eastern_orthodox_religion }
		}
		localization_key = building_type_hagia_sophia_01
	}

	text = {
		trigger = {
			# not Constantinople
			NOT = { location = province:496 }
			# Christian
			OR = { faith.religion = religion:protestant_religion faith.religion = religion:catholic_religion faith.religion = religion:eastern_orthodox_religion }
		}
		localization_key = cathedral_capital
	}

	text = {
		trigger = {
			# Constantinople
			location = province:496
			# Muslim
			faith.religion = religion:islam_religion
		}
		localization_key = building_hagia_sophia_02
	}

	text = {
		trigger = {
			# Other faith
			NOR = {
				OR = { faith.religion = religion:protestant_religion faith.religion = religion:catholic_religion faith.religion = religion:eastern_orthodox_religion }
				faith.religion = religion:islam_religion
			}
		}
		localization_key = main_temple_capital
	}
}

### Chariot Racing
GetChariotTeamColor = {
	type = character
	text = {
		trigger = {
			OR = {
				var:wager_team ?= flag:blues
				has_trait = charioteer_blue
			}
		}
		localization_key = chariot_team_blue
	}
	text = {
		trigger = {
			OR = {
				var:wager_team ?= flag:greens
				has_trait = charioteer_green
			}
		}
		localization_key = chariot_team_green
	}
	text = {
		trigger = {
			OR = {
				var:wager_team ?= flag:whites
				has_trait = charioteer_white
			}
		}
		localization_key = chariot_team_white
	}
	text = {
		trigger = {
			OR = {
				var:wager_team ?= flag:reds
				has_trait = charioteer_red
			}
		}
		localization_key = chariot_team_red
	}
}

GetChariotTeamColorPlural = {
	type = character
	text = {
		trigger = {
			OR = {
				var:wager_team ?= flag:blues
				has_trait = charioteer_blue
			}
		}
		localization_key = chariot_team_blues
	}
	text = {
		trigger = {
			OR = {
				var:wager_team ?= flag:greens
				has_trait = charioteer_green
			}
		}
		localization_key = chariot_team_greens
	}
	text = {
		trigger = {
			OR = {
				var:wager_team ?= flag:whites
				has_trait = charioteer_white
			}
		}
		localization_key = chariot_team_whites
	}
	text = {
		trigger = {
			OR = {
				var:wager_team ?= flag:reds
				has_trait = charioteer_red
			}
		}
		localization_key = chariot_team_reds
	}
}

GetChariotTeamColorPluralPossessive = {
	type = character
	text = {
		trigger = {
			var:wager_team ?= flag:blues
		}
		localization_key = chariot_team_blues_possessive
	}
	text = {
		trigger = {
			var:wager_team ?= flag:greens
		}
		localization_key = chariot_team_greens_possessive
	}
	text = {
		trigger = {
			var:wager_team ?= flag:whites
		}
		localization_key = chariot_team_whites_possessive
	}
	text = {
		trigger = {
			var:wager_team ?= flag:reds
		}
		localization_key = chariot_team_reds_possessive
	}
}

GetChariotTeamColorPluralGlossed = {
	type = character
	text = {
		trigger = {
			OR = {
				var:wager_team ?= flag:blues
				has_trait = charioteer_blue
			}
		}
		localization_key = chariot_team_blues_glossed
	}
	text = {
		trigger = {
			OR = {
				var:wager_team ?= flag:greens
				has_trait = charioteer_green
			}
		}
		localization_key = chariot_team_greens_glossed
	}
	text = {
		trigger = {
			OR = {
				var:wager_team ?= flag:whites
				has_trait = charioteer_white
			}
		}
		localization_key = chariot_team_whites_glossed
	}
	text = {
		trigger = {
			OR = {
				var:wager_team ?= flag:reds
				has_trait = charioteer_red
			}
		}
		localization_key = chariot_team_reds_glossed
	}
}

GetChariotTeamColorPluralPossessiveGlossed = {
	type = character
	text = {
		trigger = {
			var:wager_team ?= flag:blues
		}
		localization_key = chariot_team_blues_possessive_glossed
	}
	text = {
		trigger = {
			var:wager_team ?= flag:greens
		}
		localization_key = chariot_team_greens_possessive_glossed
	}
	text = {
		trigger = {
			var:wager_team ?= flag:whites
		}
		localization_key = chariot_team_whites_possessive_glossed
	}
	text = {
		trigger = {
			var:wager_team ?= flag:reds
		}
		localization_key = chariot_team_reds_possessive_glossed
	}
}

GetWinPlaceShow = {
	type = character
	text = {
		trigger = { var:wager_type ?= flag:win }
		localization_key = chariot_wager_type_win
	}
	text = {
		trigger = { var:wager_type ?= flag:place }
		localization_key = chariot_wager_type_place
	}
	text = {
		trigger = { var:wager_type ?= flag:show }
		localization_key = chariot_wager_type_show
	}
}

GetChariotRacePlacement = {
	type = character
	text = {
		trigger = { var:current_place_in_race = 1 }
		localization_key = first_place
	}
	text = {
		trigger = { var:current_place_in_race = 2 }
		localization_key = second_place
	}
	text = {
		trigger = { var:current_place_in_race = 3 }
		localization_key = third_place
	}
	text = {
		trigger = { var:current_place_in_race = 4 }
		localization_key = fourth_place
	}
	text = {
		trigger = { var:current_place_in_race = 5 }
		localization_key = fifth_place
	}
	text = {
		trigger = { var:current_place_in_race = 6 }
		localization_key = sixth_place
	}
	text = {
		trigger = { var:current_place_in_race = 7 }
		localization_key = seventh_place
	}
	text = {
		trigger = { var:current_place_in_race = 8 }
		localization_key = eighth_place
	}
	text = {
		trigger = { var:current_place_in_race = 9 }
		localization_key = ninth_place
	}
	text = {
		trigger = { var:current_place_in_race = 10 }
		localization_key = tenth_place
	}
	text = {
		trigger = { var:current_place_in_race = 11 }
		localization_key = eleventh_place
	}
	text = {
		trigger = { var:current_place_in_race = 12 }
		localization_key = twelfth_place
	}
}

GetCharioteerOrTeamNameFromWager = {
	type = character
	
	text = {
		trigger = { NOT = { var:wager_target = root } }
		localization_key = chariot_wager_target_character
	}
	text = {
		trigger = {
			var:wager_target = root 
			var:wager_team = flag:blues
		}
		localization_key = chariot_team_blues_definite
	}

	text = {
		trigger = {
			var:wager_target = root
			var:wager_team = flag:greens
		}
		localization_key = chariot_team_greens_definite
	}

	text = {
		trigger = {
			var:wager_target = root
			var:wager_team = flag:whites
		}
		localization_key = chariot_team_whites_definite
	}

	text = {
		trigger = {
			var:wager_target = root
			var:wager_team = flag:reds
		}
		localization_key = chariot_team_reds_definite
	}
}

BuildChariotRaceWagerTooltip = {
	type = character

	text = {
		setup_scope = { root = { save_scope_as = root_scope } }
		localization_key = chariot_wager_tooltip
	}
}

GetVictoriousChariotMovement = {
	type = character
	text = {
		localization_key = chariot_movement_cut_off_at_turn
	}
}

GetChariotComebackMovement = {
	type = character
	text = {
		localization_key = chariot_comeback_blazing
	}
	text = {
		localization_key = chariot_comeback_sprinting
	}
	text = {
		localization_key = chariot_comeback_surging
	}
	text = {
		localization_key = chariot_comeback_dashing
	}
	text = {
		localization_key = chariot_comeback_rocketing
	}
	text = {
		localization_key = chariot_comeback_bursting
	}
	text = {
		localization_key = chariot_comeback_miracle
	}
	text = {
		localization_key = chariot_comeback_rallying
	}
	text = {
		localization_key = chariot_comeback_soaring
	}
	text = {
		localization_key = chariot_comeback_propelling
	}
	text = {
		localization_key = chariot_comeback_fallback
	}
}

GetGovernorChitChat = {
	type = character

	text = {
		localization_key = chariot_governor_chitchat_1
	}
	text = {
		localization_key = chariot_governor_chitchat_2
	}
	text = {
		localization_key = chariot_governor_chitchat_3
	}
	text = {
		localization_key = chariot_governor_chitchat_4
	}
	text = {
		localization_key = chariot_governor_chitchat_5
	}
	text = {
		localization_key = chariot_governor_chitchat_6
	}
	text = {
		localization_key = chariot_governor_chitchat_7
	}
	text = {
		localization_key = chariot_governor_chitchat_8
	}
	text = {
		localization_key = chariot_governor_chitchat_9
	}
	text = {
		localization_key = chariot_governor_chitchat_10
	}
}

### End Chariot Racing

GetLaampDescribeTypeSelf = {
	type = character
	random_valid = yes

	# Mercenary
	text = {
		trigger = { has_realm_law = camp_purpose_mercenaries }
		localization_key = camp_purpose_type_mercenary
	}

	# Wanderer
	text = {
		trigger = { has_realm_law = camp_purpose_wanderers }
		fallback = yes
		localization_key = camp_purpose_type_wanderer
	}

	# Scholar
	text = {
		trigger = { has_realm_law = camp_purpose_scholars }
		localization_key = camp_purpose_type_scholar
	}

	# Explorer
	text = {
		trigger = { has_realm_law = camp_purpose_explorers }
		localization_key = camp_purpose_type_explorer
	}

	# Freebooter
	text = {
		trigger = { has_realm_law = camp_purpose_brigands }
		localization_key = camp_purpose_type_freebooter
	}

	# Legitimist
	text = {
		trigger = { has_realm_law = camp_purpose_legitimists }
		localization_key = camp_purpose_type_legitimist
	}
}

GetLaampDescribeTypeSelfArticle = {
	type = character
	random_valid = yes

	# Mercenary
	text = {
		trigger = { has_realm_law = camp_purpose_mercenaries }
		localization_key = article_a
	}

	# Wanderer
	text = {
		trigger = { has_realm_law = camp_purpose_wanderers }
		fallback = yes
		localization_key = article_a
	}

	# Scholar
	text = {
		trigger = { has_realm_law = camp_purpose_scholars }
		localization_key = article_a
	}

	# Explorer
	text = {
		trigger = { has_realm_law = camp_purpose_explorers }
		localization_key = article_an
	}

	# Freebooter
	text = {
		trigger = { has_realm_law = camp_purpose_brigands }
		localization_key = article_a
	}

	# Legitimist
	text = {
		trigger = { has_realm_law = camp_purpose_legitimists }
		localization_key = article_a
	}
}

GetLaampDescribeTypeSelfPlural = {
	type = character
	random_valid = yes

	# Mercenary
	text = {
		trigger = { has_realm_law = camp_purpose_mercenaries }
		localization_key = camp_purpose_type_mercenaries
	}

	# Wanderer
	text = {
		trigger = { has_realm_law = camp_purpose_wanderers }
		fallback = yes
		localization_key = camp_purpose_type_wanderers
	}

	# Scholar
	text = {
		trigger = { has_realm_law = camp_purpose_scholars }
		localization_key = camp_purpose_type_scholars
	}

	# Explorer
	text = {
		trigger = { has_realm_law = camp_purpose_explorers }
		localization_key = camp_purpose_type_explorers
	}

	# Freebooter
	text = {
		trigger = { has_realm_law = camp_purpose_brigands }
		localization_key = camp_purpose_type_freebooters
	}

	# Legitimist
	text = {
		trigger = { has_realm_law = camp_purpose_legitimists }
		localization_key = camp_purpose_type_legitimists
	}
}

GetLaampDescribeTypeInsult = {
	type = character
	random_valid = yes

	# Mercenary (hireling)
	text = {
		trigger = { has_realm_law = camp_purpose_mercenaries }
		localization_key = camp_purpose_type_mercenary.insult
	}

	# Wanderer (vagabond)
	text = {
		trigger = { has_realm_law = camp_purpose_wanderers }
		fallback = yes
		localization_key = camp_purpose_type_wanderer.insult
	}

	# Scholar (layabout)
	text = {
		trigger = { has_realm_law = camp_purpose_scholars }
		localization_key = camp_purpose_type_scholar.insult
	}

	# Explorer (rambler)
	text = {
		trigger = { has_realm_law = camp_purpose_explorers }
		localization_key = camp_purpose_type_explorer.insult
	}

	# Freebooter (brigand)
	text = {
		trigger = { has_realm_law = camp_purpose_brigands }
		localization_key = camp_purpose_type_freebooter.insult
	}

	# Legitimist (pretender)
	text = {
		trigger = { has_realm_law = camp_purpose_legitimists }
		localization_key = camp_purpose_type_legitimist.insult
	}
}

GetOutOfControlAnimalTypePlural = {
	type = character

	### BIG CATS ###
	text = {
		trigger = { var:animal_type_event ?= flag:lion }
		localization_key = animal_type_lions
	}
	text = {
		trigger = { var:animal_type_event ?= flag:tiger }
		localization_key = animal_type_tigers
	}
	text = {
		trigger = { var:animal_type_event ?= flag:leopard }
		localization_key = animal_type_leopards
	}

	### BOAR ###
	text = {
		trigger = { var:animal_type_event ?= flag:boar }
		localization_key = animal_type_boars
	}

	### SMALL ###
	text = {
		trigger = { var:animal_type_event ?= flag:hyena }
		localization_key = animal_type_hyenas
	}
	text = {
		trigger = { var:animal_type_event ?= flag:lynx }
		localization_key = animal_type_lynxs
	}
	text = {
		trigger = { var:animal_type_event ?= flag:wolf }
		localization_key = animal_type_wolves
	}

	### BEAR ###
	text = {
		trigger = { var:animal_type_event ?= flag:bear }
		localization_key = animal_type_bears
	}

	### FALLBACK ###
	text = {
		trigger = { var:animal_type_event ?= flag:dog }
		localization_key = animal_type_dogs
	}
}

GetRandomCampBuilding = {
	type = character
	random_valid = yes

	# Pavillion
	text = {
		# No trigger: you'll always have a pavillion.
		localization_key = GetRandomCampBuilding_Pavillion
	}

	# Supply Tent
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = supply_tent_01 }
		}
		localization_key = GetRandomCampBuilding_SupplyTent
	}

	# Barber's Tent
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = barber_tent_01 }
		}
		localization_key = GetRandomCampBuilding_BarberTent
	}

	# Lead Baggage Cart
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = baggage_train_01 }
		}
		localization_key = GetRandomCampBuilding_BaggageTrain
	}

	# Mess Tent
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = mess_tent_01 }
		}
		localization_key = GetRandomCampBuilding_Mess
	}

	# Central Fire Pit
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = camp_fire_01 }
		}
		localization_key = GetRandomCampBuilding_CampFire
	}

	# Edge of the Proving Grounds
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = proving_grounds_01 }
		}
		localization_key = GetRandomCampBuilding_ProvindGrounds
	}

	# Sutler's Tent
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = supply_tent_sutler }
		}
		localization_key = GetRandomCampBuilding_Sutler
	}
	# Mender's Tent
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = supply_tent_mender }
		}
		localization_key = GetRandomCampBuilding_Mender
	}
	# Smithy Tent
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = supply_tent_smithy }
		}
		localization_key = GetRandomCampBuilding_SmithyTent
	}
	# Arsenal
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = supply_tent_arsenal }
		}
		localization_key = GetRandomCampBuilding_Arsenal
	}

	# Steed Pens
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = baggage_train_ample_steeds }
		}
		localization_key = GetRandomCampBuilding_AmpleSteeds
	}
	# Cluster of Porter Tents
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = baggage_train_porters }
		}
		localization_key = GetRandomCampBuilding_Porters
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = baggage_train_trackers }
		}
		localization_key = GetRandomCampBuilding_Trackers
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = baggage_train_kennel }
		}
		localization_key = GetRandomCampBuilding_Kennels
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = baggage_train_siege_engineers }
		}
		localization_key = GetRandomCampBuilding_Engineers
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = baggage_train_shrine }
		}
		localization_key = GetRandomCampBuilding_Shrine
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = baggage_train_scribes }
		}
		localization_key = GetRandomCampBuilding_Scribes
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = baggage_train_bartering_grounds }
		}
		localization_key = GetRandomCampBuilding_BarteringGrounds
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = baggage_train_proof_of_claims }
		}
		localization_key = GetRandomCampBuilding_ProofOfClaims
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = baggage_train_ransom_cages }
		}
		localization_key = GetRandomCampBuilding_RansomCages
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = baggage_train_negotiators }
		}
		localization_key = GetRandomCampBuilding_Negotiators
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = baggage_train_ascetics }
		}
		localization_key = GetRandomCampBuilding_Ascetics
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = baggage_train_pleasure_tents }
		}
		localization_key = GetRandomCampBuilding_PleasureTents
	}

	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = mess_tent_herbalists }
		}
		localization_key = GetRandomCampBuilding_Herbalists
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = mess_tent_brewers }
		}
		localization_key = GetRandomCampBuilding_Brewers
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = mess_tent_curers }
		}
		localization_key = GetRandomCampBuilding_Curers
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = mess_tent_bakers }
		}
		localization_key = GetRandomCampBuilding_Bakers
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = mess_tent_cooks }
		}
		localization_key = GetRandomCampBuilding_Cooks
	}

	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = camp_fire_trailing_musicians }
		}
		localization_key = GetRandomCampBuilding_Musicians
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = camp_fire_wandering_poets }
		}
		localization_key = GetRandomCampBuilding_Poets
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = camp_fire_capering_fools }
		}
		localization_key = GetRandomCampBuilding_Fools
	}

	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = proving_grounds_the_stump }
		}
		localization_key = GetRandomCampBuilding_Stump
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = proving_grounds_training_circle }
		}
		localization_key = GetRandomCampBuilding_TrainingCircle
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = proving_grounds_lockwagon }
		}
		localization_key = GetRandomCampBuilding_LockWagon
	}
	# 
	text = {
		trigger = {
			domicile = { has_domicile_building_or_higher = proving_grounds_the_stick_game }
		}
		localization_key = GetRandomCampBuilding_StickGame
	}
}

GetStumpName = {
	type = character
	
	# Fallback
	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = GetStumpName_Fallback
	}
	# Plains
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = { terrain = plains }
		}
		localization_key = GetStumpName_Plains
	}
	# Hills
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = { terrain = hills }
		}
		localization_key = GetStumpName_Hills
	}
	# Mountains
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = { terrain = mountains }
		}
		localization_key = GetStumpName_Mountains
	}
	# Desert
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = { terrain = desert }
		}
		localization_key = GetStumpName_Desert
	}
	# Desert_mountains
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = { terrain = desert_mountains }
		}
		localization_key = GetStumpName_Desert_mountains
	}
	# Jungle
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = { terrain = jungle }
		}
		localization_key = GetStumpName_Jungle
	}
	# Forest
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = { terrain = forest }
		}
		localization_key = GetStumpName_Forest
	}
	# Oasis
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = { terrain = oasis }
		}
		localization_key = GetStumpName_Oasis
	}
	# Taiga
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = { terrain = taiga }
		}
		localization_key = GetStumpName_Taiga
	}
	# Wetlands
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = { terrain = wetlands }
		}
		localization_key = GetStumpName_Wetlands
	}
	# Steppe
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = { terrain = steppe }
		}
		localization_key = GetStumpName_Steppe
	}
	# Farmlands
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = { terrain = farmlands }
		}
		localization_key = GetStumpName_Farmlands
	}
	# Floodplains
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = { terrain = floodplains }
		}
		localization_key = GetStumpName_Floodplains
	}
	# Drylands
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = { terrain = drylands }
		}
		localization_key = GetStumpName_Drylands
	}
	# Winter
	text = {
		trigger = {
			# Gotta check if we actually exists because we might be used on an unconstructed hypothetical building or elsewhere in UI.
			exists = this
			location = {
				OR = {
					has_province_modifier = winter_normal_modifier
					has_province_modifier = winter_harsh_modifier
				}
			}
		}
		localization_key = GetStumpName_Winter
	}
}

GetChariotMiddlingLapCount = {
	type = character
	random_valid = yes
	text = {
		localization_key = third_place
	}
	text = {
		localization_key = fourth_place
	}
	text = {
		localization_key = fifth_place
	}
}

# Byzant Flavor
GetThroneRoom = {
	type = character
	text = {
		trigger = {
			has_title = title:e_byzantium
			capital_province = province:496
		}
		localization_key = throne_room_chrysotriklinos
	}
	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = throne_room_default
	}
}

GetMartialMenWomen = {
	type = character
	text = {
		trigger = {
			save_temporary_scope_as = char
			dummy_male = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:char }
			}
			NOT = {
				dummy_female = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:char }
				}
			}
		}
		localization_key = CHARACTER_MEN
	}
	text = {
		trigger = {
			save_temporary_scope_as = char
			dummy_male = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:char }
			}
			NOT = {
				dummy_female = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:char }
				}
			}
		}
		localization_key = CHARACTER_WOMEN
	}
	text = {
		trigger = {
			save_temporary_scope_as = char
			dummy_male = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:char }
			}
			dummy_female = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:char }
			}
		}
		localization_key = warriors
	}
}

GetGovernorConcept = {
	type = character

	text = {
		trigger = {
			top_liege.culture ?= { has_cultural_pillar = heritage_byzantine }
		}
		localization_key = STRATEGOS_CONCEPT
	}

	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = GOVERNOR_CONCEPT
	}
}

GetGovernorConceptNoTooltip = {
	parent = GetGovernorConcept
	suffix = "_NO_TOOLTIP"
}

GetGovernorConceptPossessiveNoTooltip = {
	parent = GetGovernorConcept
	suffix = "_POSSESSIVE_NO_TOOLTIP"
}

GetGovernorPluralConcept = {
	type = character

	text = {
		trigger = {
			top_liege.culture ?= { has_cultural_pillar = heritage_byzantine }
		}
		localization_key = STRATEGOI_CONCEPT
	}

	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = GOVERNORS_CONCEPT
	}
}

GetGovernorPluralConceptNoTooltip = {
	parent = GetGovernorPluralConcept
	suffix = "_NO_TOOLTIP"
}

GetGovernorPluralConceptPossessiveNoTooltip = {
	parent = GetGovernorPluralConcept
	suffix = "_POSSESSIVE_NO_TOOLTIP"
}

GetProvinceConcept = {
	type = character

	text = {
		trigger = {
			top_liege.culture ?= { has_cultural_pillar = heritage_byzantine }
		}
		localization_key = THEME_CONCEPT
	}

	text = {
		trigger = {
			top_liege ?= {
				government_has_flag = government_is_celestial
			}
		}
		localization_key = CIRCUIT_CONCEPT
	}

	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = PROVINCE_CONCEPT
	}
}

GetProvinceConceptNoTooltip = {
	parent = GetProvinceConcept
	suffix = "_NO_TOOLTIP"
}

GetProvincePluralConcept = {
	parent = GetProvinceConcept
	suffix = "_PLURAL"
}

GetProvincePluralConceptNoTooltip = {
	parent = GetProvinceConcept
	suffix = "_PLURAL_NO_TOOLTIP"
}

GetProvinceAdministrationConcept = {
	type = character

	text = {
		trigger = {
			top_liege.culture ?= { has_cultural_pillar = heritage_byzantine }
		}
		localization_key = THEME_ADMINISTRATION_CONCEPT
	}

	text = {
		trigger = {
			top_liege ?= {
				government_has_flag = government_is_celestial
			}
		}
		localization_key = CIRCUIT_ADMINISTRATION_CONCEPT
	}

	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = PROVINCE_ADMINISTRATION_CONCEPT
	}
}

GetProvincialConcept = {
	type = character

	text = {
		trigger = {
			top_liege.culture ?= { has_cultural_pillar = heritage_byzantine }
		}
		localization_key = THEME_CONCEPT_ADJECTIVE
	}

	text = {
		trigger = {
			top_liege ?= {
				government_has_flag = government_is_celestial
			}
		}
		localization_key = CIRCUIT_CONCEPT_ADJECTIVE
	}

	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = PROVINCE_CONCEPT_ADJECTIVE
	}
}

GetProvincialConceptNoTooltip = {
	parent = GetProvincialConcept
	suffix = "_NO_TOOLTIP"
}

GetProvincialArmyConcept = {
	type = character

	text = {
		trigger = {
			top_liege.culture ?= { has_cultural_pillar = heritage_byzantine }
		}
		localization_key = THEMATIC_ARMY_CONCEPT
	}

	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = PROVINCIAL_ARMY_CONCEPT
	}
}

GetProvincialArmyConceptNoTooltip = {
	parent = GetProvincialArmyConcept
	suffix = "_NO_TOOLTIP"
}

GetProvincialArmiesConcept = {
	type = character

	text = {
		trigger = {
			top_liege.culture ?= { has_cultural_pillar = heritage_byzantine }
		}
		localization_key = THEMATIC_ARMIES_CONCEPT
	}

	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = PROVINCIAL_ARMIES_CONCEPT
	}
}

GetProvincialArmiesConceptNoTooltip = {
	parent = GetProvincialArmiesConcept
	suffix = "_NO_TOOLTIP"
}

GetByzantineCoinWithGloss = {
	type = province

	text = {
		trigger = { 
			current_year < 1092 
			culture = { has_cultural_pillar = heritage_byzantine }
		}
		localization_key = SOLIDUS
	}

	text = {
		trigger = { 
			current_year >= 1092 
			culture = { has_cultural_pillar = heritage_byzantine }
		}
		localization_key = HYPERPYRON
	}

	text = {
		fallback = yes
		localization_key = FALLBACK_COIN
	}
}

GetBestEmpireWithAdjective = {
	type = character

	text = {
		trigger = {
			top_liege = {
				OR = {
					is_roman_emperor_trigger = yes
					has_title = title:e_latin_empire
				}
			}
		}
		localization_key = getbestempirewithadjective.rome
	}
	text = {
		trigger = {
			top_liege = { has_title = title:e_mongol_empire }
		}
		localization_key = getbestempirewithadjective.mongolia
	}
	text = {
		trigger = {
			top_liege = { has_title = title:e_outremer }
		}
		localization_key = getbestempirewithadjective.outremer
	}
	text = {
		trigger = {
			top_liege = { has_title = title:e_slavia }
		}
		localization_key = getbestempirewithadjective.slavia
	}
	text = {
		trigger = {
			top_liege = { has_title = title:e_armenia }
		}
		localization_key = getbestempirewithadjective.great_armenia
	}
	text = {
		trigger = {
			top_liege = { has_title = title:h_india }
		}
		localization_key = getbestempirewithadjective.india
	}
	text = {
		trigger = { always = no }
		localization_key = getbestempirewithadjective.the_empire
		fallback = yes
	}
}

GetGuestsOrNot = {
	type = character

	text = {
		trigger = { has_government = landless_adventurer_government }
		localization_key = COURT_WINDOW_HAS_FOLLOWERS
	}

	text = {
		trigger = { is_landless_adventurer = no }
		localization_key = COURT_WINDOW_HAS_COURTIERS
	}
}

GetNoGuestsOrNot = {
	type = character

	text = {
		trigger = { has_government = landless_adventurer_government }
		localization_key = COURT_WINDOW_NO_FOLLOWERS
	}

	text = {
		trigger = { is_landless_adventurer = no }
		localization_key = COURT_WINDOW_NO_COURTIERS
	}
}

GetAntiquarianOrArmorer = {
	type = character

	text = {
		trigger = { has_government = landless_adventurer_government }
		localization_key = armorer_camp_officer
	}

	text = {
		trigger = { is_landless_adventurer = no }
		localization_key = antiquarian_court_position
	}
}

GetSeason = {
	type = character

	text = {
		trigger = {
			current_season_trigger = {
				SEASON = spring
			}
		}
		localization_key = generatepoem_title_spring
	}
	text = {
		trigger = {
			current_season_trigger = {
				SEASON = summer
			}
		}
		localization_key = generatepoem_title_summer
	}
	text = {
		trigger = {
			current_season_trigger = {
				SEASON = autumn
			}
		}
		localization_key = generatepoem_title_autumn
	}
	text = {
		trigger = {
			current_season_trigger = {
				SEASON = winter
			}
		}
		localization_key = generatepoem_title_winter
	}
	text = {
		trigger = {
			current_season_trigger = {
				SEASON = dry_season
			}
		}
		localization_key = dry_season
	}
	text = {
		trigger = {
			current_season_trigger = {
				SEASON = rainy_season
			}
		}
		localization_key = rainy_season
	}
	#Hot season can also be our fallback
	text = {
		localization_key = rainy_season
	}
}

GetSeasonAdj = {
	type = character

	text = {
		trigger = {
			current_season_trigger = {
				SEASON = spring
			}
		}
		localization_key = generatepoem_title_spring_adj
	}
	text = {
		trigger = {
			current_season_trigger = {
				SEASON = summer
			}
		}
		localization_key = generatepoem_title_summer_adj
	}
	text = {
		trigger = {
			current_season_trigger = {
				SEASON = autumn
			}
		}
		localization_key = generatepoem_title_autumn_adj
	}
	text = {
		trigger = {
			current_season_trigger = {
				SEASON = winter
			}
		}
		localization_key = generatepoem_title_winter_adj
	}
}

GetSchemeType = {
	type = scheme

	text = {
		trigger = { scheme_skill = diplomacy }
		localization_key = diplomacy
	}

	text = {
		trigger = { scheme_skill = martial }
		localization_key = martial
	}

	text = {
		trigger = { scheme_skill = stewardship }
		localization_key = stewardship
	}

	text = {
		trigger = { scheme_skill = intrigue }
		localization_key = intrigue
	}

	text = {
		trigger = { scheme_skill = learning }
		localization_key = learning
	}

	text = {
		trigger = { scheme_skill = prowess }
		localization_key = prowess
	}
}

GetPubAdjective = {
	type = character
	random_valid = yes
	
	text = {
		localization_key = pub_adjective_red
	}
	text = {
		localization_key = pub_adjective_white
	}
	text = {
		localization_key = pub_adjective_blue
	}
	text = {
		localization_key = pub_adjective_green
	}
	text = {
		localization_key = pub_adjective_ebony
	}
	text = {
		localization_key = pub_adjective_scarlet
	}
	text = {
		localization_key = pub_adjective_spotted
	}
	text = {
		localization_key = pub_adjective_golden
	}
	text = {
		localization_key = pub_adjective_sapphire
	}
	text = {
		localization_key = pub_adjective_ashen
	}
	text = {
		localization_key = pub_adjective_girthy
	}
	text = {
		localization_key = pub_adjective_thundering
	}
	text = {
		localization_key = pub_adjective_stinking
	}
	text = {
		localization_key = pub_adjective_lazy
	}
	text = {
		localization_key = pub_adjective_happy
	}
}

GetPubName = {
	type = character
	random_valid = yes
	
	text = {
		localization_key = pub_noun_prince
	}
	text = {
		localization_key = pub_noun_princess
	}
	text = {
		localization_key = pub_noun_king
	}
	text = {
		localization_key = pub_noun_queen
	}
	text = {
		localization_key = pub_noun_bull
	}
	text = {
		localization_key = pub_noun_horse
	}
	text = {
		localization_key = pub_noun_hound
	}
	text = {
		localization_key = pub_full_crown
	}
	text = {
		localization_key = pub_full_arms
	}
	text = {
		localization_key = pub_full_head
	}
	text = {
		localization_key = pub_full_oak
	}
	text = {
		localization_key = pub_full_plough
	}
	text = {
		localization_key = pub_full_tuns
	}
	text = {
		trigger = { 
			culture = {
				OR = {
					has_cultural_pillar = heritage_west_germanic
					has_cultural_pillar = heritage_brythonic
					has_cultural_pillar = heritage_goidelic
				}
			}
		}
		localization_key = pub_full_druid
	}
	text = {
		localization_key = pub_noun_duck
	}
}

4061_size_adjective = {
	type = character

	text = {
		trigger = { var:4061_size_adjective >= 12 }
		localization_key = ep3_laamp_flavour_ewan.4061.size_adjective.titanic
	}

	text = {
		trigger = { var:4061_size_adjective >= 10 }
		localization_key = ep3_laamp_flavour_ewan.4061.size_adjective.colossal
	}

	text = {
		trigger = { var:4061_size_adjective >= 8 }
		localization_key = ep3_laamp_flavour_ewan.4061.size_adjective.mammoth
	}

	text = {
		trigger = { var:4061_size_adjective >= 6 }
		localization_key = ep3_laamp_flavour_ewan.4061.size_adjective.huge
	}

	text = {
		trigger = { var:4061_size_adjective >= 4 }
		localization_key = ep3_laamp_flavour_ewan.4061.size_adjective.large
	}

	text = {
		localization_key = ep3_laamp_flavour_ewan.4061.size_adjective.sizeable
	}
}

GetAdventurerType = {
	type = character
	
	text = {
		trigger = { has_realm_law = camp_purpose_wanderers }
		localization_key = tooltipped_camp_purpose_wanderers
	}
	text = {
		trigger = { has_realm_law = camp_purpose_mercenaries }
		localization_key = tooltipped_camp_purpose_mercenaries
	}
	text = {
		trigger = { has_realm_law = camp_purpose_scholars }
		localization_key = tooltipped_camp_purpose_scholars
	}
	text = {
		trigger = { has_realm_law = camp_purpose_explorers }
		localization_key = tooltipped_camp_purpose_explorers
	}
	text = {
		trigger = { has_realm_law = camp_purpose_brigands }
		localization_key = tooltipped_camp_purpose_brigands
	}
	text = {
		trigger = { has_realm_law = camp_purpose_legitimists }
		localization_key = tooltipped_camp_purpose_legitimists
	}
}

GetInvalidatedContractType = {
	type = character

	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_transport_vip }
		localization_key = invalidated_laamp_transport_vip
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_transport_artifact }
		localization_key = invalidated_laamp_transport_artifact
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_transport_gold }
		localization_key = invalidated_laamp_transport_gold
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_transport_ward }
		localization_key = invalidated_laamp_transport_ward
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_transport_explorer }
		localization_key = invalidated_laamp_transport_explorer
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_transport_animal }
		localization_key = invalidated_laamp_transport_animal
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_raid_contract }
		localization_key = invalidated_laamp_raid_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_join_war_contract }
		localization_key = invalidated_laamp_join_war_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_help_claimant_contract }
		localization_key = invalidated_laamp_help_claimant_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_steal_artifact_contract }
		localization_key = invalidated_laamp_steal_artifact_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_construction_contract }
		localization_key = invalidated_laamp_construction_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_treasure_hunting_contract }
		localization_key = invalidated_laamp_treasure_hunting_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_cultural_minority_contract }
		localization_key = invalidated_laamp_cultural_minority_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_religious_minority_contract }
		localization_key = invalidated_laamp_religious_minority_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_prison_break_contract }
		localization_key = invalidated_laamp_prison_break_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_treasure_map_contract }
		localization_key = invalidated_laamp_treasure_map_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_join_faction_contract }
		localization_key = invalidated_laamp_join_faction_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_help_faith_conversion_contract }
		localization_key = invalidated_laamp_help_faith_conversion_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_fight_faith_conversion_contract }
		localization_key = invalidated_laamp_fight_faith_conversion_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_help_train_commanders_contract }
		localization_key = invalidated_laamp_help_train_commanders_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_help_find_secrets_contract }
		localization_key = invalidated_laamp_help_find_secrets_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_help_fabricate_claim_contract }
		localization_key = invalidated_laamp_help_fabricate_claim_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_help_increase_control_contract }
		localization_key = invalidated_laamp_help_increase_control_contract
	}
	text = {
		trigger = { var:invalidated_task_contract_type = flag:laamp_base_4100 }
		localization_key = invalidated_laamp_base_4100
	}
}

GetContractOrIssue = {
	type = character

	text = {
		trigger = {
			government_has_flag = government_is_administrative
		}
		localization_key = TASK_CONTRACT_ISSUE
	}

	text = {
		trigger = {
			government_has_flag = government_is_nomadic
		}
		localization_key = TASK_CONTRACT_SETTLEMENT_ISSUE
	}

	text = {
		trigger = {
			government_has_flag = government_is_mandala
		}
		localization_key = TASK_CONTRACT_MANDALA_RITUAL
	}

	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = TASK_CONTRACT_CONTRACT
	}	
}

GetContractOrIssuePlural = {
	parent = GetContractOrIssue
	suffix = "_PLURAL"
}

GetContractOrIssuePossessive = {
	parent = GetContractOrIssue
	suffix = "_POSSESSIVE"
}

GetContractOrIssuePossessivePlural = {
	parent = GetContractOrIssue
	suffix = "_POSSESSIVE_PLURAL"
}

GetContractOrIssueGameConcept = {
	type = character

	text = {
		trigger = {
			government_has_flag = government_is_administrative
		}
		localization_key = GOVERNANCE_ISSUE
	}

	text = {
		trigger = {
			government_has_flag = government_is_nomadic
		}
		localization_key = SETTLEMENT_ISSUE
	}

	text = {
		trigger = {
			government_has_flag = government_is_mandala
		}
		localization_key = MANDALA_RITUAL
	}

	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = TASK_CONTRACT
	}	
}
