#AVIALABLE CUSTOM LOCALISATION KEYS
#When adding new custom loc keys, add them to the appropriate category (or add a new one) and describe them. Name the strings "String_X" where x is its content.
# To not display anything, you can use 'localisation_key = ""'

defined_text = {
	name = GetCourtFactionMood

	text = {
		localisation_key = String_Happy
		trigger = {
			liege = { has_character_flag = faction_court_happy }
		}
	}
	text = {
		localisation_key = String_Content
		trigger = {
			liege = { 
				NOR = {
					has_character_flag = faction_court_happy
					has_character_flag = faction_court_unhappy
					has_character_flag = faction_court_angry
				}
			}
		}
	}
	text = {
		localisation_key = String_Unhappy
		trigger = {
			liege = { has_character_flag = faction_court_unhappy }
		}
	}
	text = {
		localisation_key = String_Angry
		trigger = {
			liege = { has_character_flag = faction_court_angry }
		}
	}
}

defined_text = {
	name = GetGloryFactionMood

	text = {
		localisation_key = String_Happy
		trigger = {
			liege = { has_character_flag = faction_glory_happy }
		}
	}
	text = {
		localisation_key = String_Content
		trigger = {
			liege = { 
				NOR = {
					has_character_flag = faction_glory_happy
					has_character_flag = faction_glory_unhappy
					has_character_flag = faction_glory_angry
				}
			}
		}
	}
	text = {
		localisation_key = String_Unhappy
		trigger = {
			liege = { has_character_flag = faction_glory_unhappy }
		}
	}
	text = {
		localisation_key = String_Angry
		trigger = {
			liege = { has_character_flag = faction_glory_angry }
		}
	}
}

defined_text = {
	name = GetTraditionFactionMood

	text = {
		localisation_key = String_Happy
		trigger = {
			liege = { has_character_flag = faction_tradition_happy }
		}
	}
	text = {
		localisation_key = String_Content
		trigger = {
			liege = { 
				NOR = {
					has_character_flag = faction_tradition_happy
					has_character_flag = faction_tradition_unhappy
					has_character_flag = faction_tradition_angry
				}
			}
		}
	}
	text = {
		localisation_key = String_Unhappy
		trigger = {
			liege = { has_character_flag = faction_tradition_unhappy }
		}
	}
	text = {
		localisation_key = String_Angry
		trigger = {
			liege = { has_character_flag = faction_tradition_angry }
		}
	}
}

defined_text = {
	name = GetProsperityFactionMood

	text = {
		localisation_key = String_Happy
		trigger = {
			liege = { has_character_flag = faction_prosperity_happy }
		}
	}
	text = {
		localisation_key = String_Content
		trigger = {
			liege = { 
				NOR = {
					has_character_flag = faction_prosperity_happy
					has_character_flag = faction_prosperity_unhappy
					has_character_flag = faction_prosperity_angry
				}
			}
		}
	}
	text = {
		localisation_key = String_Unhappy
		trigger = {
			liege = { has_character_flag = faction_prosperity_unhappy }
		}
	}
	text = {
		localisation_key = String_Angry
		trigger = {
			liege = { has_character_flag = faction_prosperity_angry }
		}
	}
}

defined_text = {
	name = GetImperialDecadence

	text = {
		localisation_key = String_imperial_decadence
		trigger = {
			tier = emperor
			primary_title = {
				check_variable = { which = "imperial_decadence" value = 0 }
			}
		}
	}
}

defined_text = {
	name = ValidateChecksum
	
	text = {
		localisation_key = String_ValidChecksum
		trigger = {
			supported_checksum = yes
		}
	}
	
	text = {
		localisation_key = String_InvalidChecksum
		trigger = {
			supported_checksum = no
		}
	}
}

defined_text = {
	name = GetIsraeliteCulture
	
	text = {
		localisation_key = String_Ashkenazi
		trigger = {
			any_demesne_province = {
				any_province_holding = { has_building = ct_jewish_community_1 }
				OR = {
					region = world_europe_west_germania
					region = world_europe_east
					region = world_europe_west_brittania
					region = world_europe_south_east
				}
			}
		}
	}
	
	text = {
		localisation_key = String_Sephardi
		trigger = {
			any_demesne_province = {
				any_province_holding = { has_building = ct_jewish_community_1 }
				OR = {
					region = world_europe_west_iberia
					region = world_africa_north
					region = world_europe_west_francia
					region = custom_roman_italia
					region = world_africa_west
				}
			}
		}
	}
	
	text = {
		localisation_key = String_Mizrahim
		trigger = {
			any_demesne_province = {
				any_province_holding = { has_building = ct_jewish_community_1 }
				NOR = {
					region = world_europe_west_germania
					region = world_europe_east
					region = world_europe_west_brittania
					region = world_europe_south_east
					region = world_europe_west_iberia
					region = world_africa_north
					region = world_europe_west_francia
					region = custom_roman_italia
					region = world_africa_west
				}
			}
		}
	}
}

defined_text = {
	name = GetTradeGuildHQ

	text = {
		localisation_key = amber_road
		trigger = {
			trade_post_has_building = tr_amber_road_trade_guild_1
		}
	}
	
	text = {
		localisation_key = atlantic_trade
		trigger = {
			trade_post_has_building = tr_atlantic_trade_guild_1
		}
	}
	
	text = {
		localisation_key = balkan_road
		trigger = {
			trade_post_has_building = tr_balkan_road_trade_guild_1
		}
	}
	
	text = {
		localisation_key = baltic_sea
		trigger = {
			trade_post_has_building = tr_baltic_trade_guild_1
		}
	}
	
	text = {
		localisation_key = british_trade
		trigger = {
			trade_post_has_building = tr_british_trade_guild_1
		}
	}
	
	text = {
		localisation_key = french_trade
		trigger = {
			trade_post_has_building = tr_french_trade_guild_1
		}
	}
	
	text = {
		localisation_key = iberian_trade
		trigger = {
			trade_post_has_building = tr_iberian_trade_guild_1
		}
	}
	
	text = {
		localisation_key = mediterranean_trade
		trigger = {
			trade_post_has_building = tr_mediterranean_trade_guild_1
		}
	}
	
	text = {
		localisation_key = salt_road
		trigger = {
			trade_post_has_building = tr_salt_road_trade_guild_1
		}
	}
	
	text = {
		localisation_key = rus_road
		trigger = {
			trade_post_has_building = tr_rus_road_trade_guild_1
		}
	}
}

defined_text = {
	name = GetTributaryPeriod

	text = {
		localisation_key = String_tributary_period
		trigger = {
			OR = {
				is_tributary = { type = forced }
				is_tributary = { type = voluntary }
			}
			primary_title = {
				check_variable = { which = "tributary_years" value = 0 }
				NOT = { check_variable = { which = "tributary_years" value = 30 } }
			}
		}
	}

	text = {
		localisation_key = String_tributary_period_vassalize
		trigger = {
			OR = {
				is_tributary = { type = forced }
				is_tributary = { type = voluntary }
			}
			primary_title = {
				check_variable = { which = "tributary_years" value = 30 }
			}
		}
	}
}

defined_text = {
	name = GetFeastAppetizer

	text = {
		localisation_key = EVTOPTA_PLUS_4601
		trigger = { has_character_flag = jd_feast_salmon }
	}
	text = {
		localisation_key = EVTOPTB_PLUS_4601
		trigger = { has_character_flag = jd_feast_cheese_eggs }
	}
	text = {
		localisation_key = EVTOPTC_PLUS_4601
		trigger = { has_character_flag = jd_feast_roasted_milk }
	}
	text = {
		localisation_key = EVTOPTD_PLUS_4601
		trigger = { has_character_flag = jd_feast_balls }
	}
}

defined_text = {
	name = GetFeastMainDish

	text = {
		localisation_key = EVTOPTA_PLUS_4602
		trigger = { has_character_flag = jd_feast_poultry }
	}
	text = {
		localisation_key = EVTOPTB_PLUS_4602
		trigger = { has_character_flag = jd_feast_cattle }
	}
	text = {
		localisation_key = EVTOPTC_PLUS_4602
		trigger = { has_character_flag = jd_feast_pig }
	}
	text = {
		localisation_key = EVTOPTD_PLUS_4602
		trigger = { has_character_flag = jd_feast_horse }
	}
}

defined_text = {
	name = GetTerribleDish

	text = {
		localisation_key = EVTOPTD_PLUS_4601
		trigger = { has_character_flag = jd_feast_balls }
	}
	text = {
		localisation_key = EVTOPTD_PLUS_4602
		trigger = { has_character_flag = jd_feast_horse }
	}
}