﻿
namespace = travel_events

############################
## Travel Flavor Events
## 2000-2999
## by Filippa Gannholm Kirsten
############################
# travel_events.2000-1 - Good omen? - Encounter a duck
# travel_events.2002 - Crossing an ant path - Ignore or don't ignore your guide
# travel_events.2003 - Visit the local military place (barrack/military camp/regiment grounds) - Try to improve your martial
# travel_events.2004 - Visit (your own) crappy pasture - Try to address or ignore the issues
# travel_events.2005 - Visit another ruler's pasture - Give advice or sabotage the pasture
# travel_events.2006 - Visit a camel farm - Get defiled by a camel
# travel_events.2007 - Visit an elephant pen - Train with the elephants
# travel_events.2008 - Visit an elephant pen, your rival is on site - Attempt to crush your rival?
# travel_events.2010-11 - Visit an orchard - Kid falls out of tree
# travel_events.2012 - Visit a plantation - Fire!
# travel_events.2013 - Visit a hillfort - Train to gain military skillz
# travel_events.2014 - Visit a logging camp - Burn off some stress chopping wood
# travel_events.2015 - Visit a peat quarry - Try not to fall asleep
# travel_events.2016 - Visit a hill farm - Bull rush!
# travel_events.2017-24 - Visit a 'haunted' mansion (farm estate) - Enter at your own peril
# travel_events.2025 - Visit your own farm estate - Tax or don't tax your hospitable subject
# travel_events.2026 - Visit someone else's farm estate - Pay or don't pay for the hospitality
# travel_events.2027 - Visit your own quarry - Encounter hungry workers
# travel_events.2028 - Visit someone else's quarry - Encounter an architect
# travel_events.2029-30 - Visit a cereal field - Encounter a heathen
# travel_events.2031 - Visit another cereal field - Encounter a gardener
# travel_events.2032 - Visit a ramparts/forest fort - Encounter a herbalist/physician
# travel_events.2033 - Visit some hunting grounds - Your entourage prisoner escapes. Manhunt?
# travel_events.2034-35 - Your escaped manhunted prisoner seeks revenge
# travel_events.2036 - Your escaped/reformed prisoner is... pretty peaceful actually
# travel_events.2037 - Visit some hunting grounds - Sadistic province owner is manhunting
# travel_events.2038-39 - Visit some hunting grounds - Friendly competition with an entourage member
# travel_events.2040 - The rescued manhunt prisoner from travel_events.2037 turns out to be a psycho
############################
## Travel Ruler Events
## 2100-2199
## by Filippa Gannholm Kirsten
############################
# travel_events.2100-5 - Someone is trying to assassinate the local ruler!
# travel_events.2106-12 - You get attacked while passing through a capital province; will the County Holder help you?


scripted_trigger 2000_is_sadistically_inclined_trigger = {
	OR = {
		has_trait = sadistic
		has_trait = callous
	}
}

#Good omen? - Encounter a duck
travel_events.2000 = { 
	type = character_event
	title = travel_events.2000.t
	desc = {
		desc = travel_events.2000.desc
		first_valid = {
			triggered_desc = {
				trigger = { 
					exists = var:duck_stalking
					var:duck_stalking = flag:positive
				}
				desc = travel_events.2000.desc_good_memory
			}
			triggered_desc = {
				trigger = { 
					exists = var:duck_stalking
					var:duck_stalking = flag:negative
				}
				desc = travel_events.2000.desc_bad_memory
			}
			triggered_desc = {
				trigger = {
					exists = var:duck_stalking
					var:duck_stalking = flag:delicious
				}
				desc = travel_events.2000.desc_delicious_memory
			}
			triggered_desc = {
				trigger = { 
					exists = var:duck_stalking
					var:duck_stalking = flag:awkward
				}
				desc = travel_events.2000.desc_meh_memory
			}
			triggered_desc = {
				desc = travel_events.2000.desc_default
			}
		}
	}
	theme = travel
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				exists = var:duck_stalking
				OR = {
					var:duck_stalking = flag:negative
					var:duck_stalking = flag:awkward
				}
			}
			animation = personality_cynical
		}
		triggered_animation = {
			trigger = { 2000_is_sadistically_inclined_trigger = yes }
			animation = boredom
		}
		animation = love
	}
	cooldown = { years = 20 }
	trigger = {
		static_group_filter = {
			group = travel_events.2000
			match = 0.25
		}
		is_available_travelling = yes
		is_playable_character = yes
		#Not a lot of ducks in these regions / terrain
		is_location_valid_for_travel_event_on_land = yes
		location = {
			NOR = {
				geographical_region = world_steppe_east
				geographical_region = world_tibet
				geographical_region = world_africa
				geographical_region = world_himalaya
				geographical_region = world_burma
				geographical_region = world_middle_east
			}
			NOR = {
				terrain = desert
				terrain = desert_mountains
				terrain = mountains
			}
		}
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_very_small }
	}
	#That's nice
	option = { 
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { 2000_is_sadistically_inclined_trigger = yes }
						desc = travel_events.2000.a_sadist
					}
					triggered_desc = {
						desc = travel_events.2000.a
					}
				}
			}
		}
		add_character_modifier = {
			modifier = travel_soothing_quack_modifier
			years = 5
		}
		stress_impact = {   
			sadistic = minor_stress_impact_gain
			callous = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = calm
					has_trait = content
					has_trait = arbitrary
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_energy = -1
				ai_rationality = 1	
			}
		}
	}
	#Follow the duck
	option = { 
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { 2000_is_sadistically_inclined_trigger = yes }
						desc = travel_events.2000.b_sadist
					}
					triggered_desc = {
						desc = travel_events.2000.b
					}
				}
			}
		}
		custom_tooltip = travel_events.2000.b.tt
		hidden_effect = {
			random_list = {
				#Something good happens
				20 = {
					add_character_flag = {
						flag = positive_duck_stalking
						days = 5
					}
				}
				#Something bad happens
				20 = {
					add_character_flag = {
						flag = negative_duck_stalking
						days = 5
					}
				}
				#Nothing happens
				60 = {
					#Neutral event
				}
			}
			trigger_event = travel_events.2001
		}
		stress_impact = {
			eccentric = major_stress_impact_loss
			paranoid = medium_stress_impact_gain
			craven = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					is_adult = no
					has_trait = brave
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_energy = 2
				ai_boldness = 2
				ai_compassion = 1	
				ai_rationality = -1	
			}
		}
	}
	#Ick, fowl
	option = { 
		name = travel_events.2000.c
		stress_impact = {
			sadistic = miniscule_stress_impact_loss
			callous = miniscule_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = impatient
					has_trait = arrogant
				}
				add = 25
			}
			modifier = {
				OR = {
					has_trait = paranoid
					has_trait = craven
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = callous
					has_trait = sadistic
				}
				add = 50
			}
			ai_value_modifier = {
				ai_compassion = -1
			}
		}
	}
}

#Duck follow-up
travel_events.2001 = { 
	type = character_event
	title = {
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = { has_character_flag = positive_duck_stalking }
					desc = travel_events.2001.t_positive
				}
				triggered_desc = {
					trigger = { has_character_flag = negative_duck_stalking }
					desc = travel_events.2001.t_negative
				}
				triggered_desc = {
					desc = travel_events.2001.t
				}
			}
		}
	}
	desc = {
		desc = travel_events.2001.intro
		first_valid = {
			#A1: Positive event
			triggered_desc = {
				trigger = {
					has_character_flag = positive_duck_stalking
				}
				desc = travel_events.2001.desc_positive
			}
			#A2: Negative event
			triggered_desc = {
				trigger = {
					has_character_flag = negative_duck_stalking
				}
				desc = travel_events.2001.desc_negative
			}
			#A3: Neutral event
			triggered_desc = {
				desc = travel_events.2001.desc
			}
		}
		first_valid = {
			#A1: Positive event and sadist/callous
			triggered_desc = {
				trigger = {
					has_character_flag = positive_duck_stalking
					2000_is_sadistically_inclined_trigger = yes
				}
				desc = travel_events.2001.desc_positive_sadist
			}
			#A1: Positive event, adorable
			triggered_desc = {
				trigger = {
					has_character_flag = positive_duck_stalking
				}
				desc = travel_events.2001.desc_positive_default
			}
		}
	}
	theme = travel
	left_portrait = {
		character = root
		#You're a callous sadist watching a nest of baby ducklings
		triggered_animation = {
			trigger = {
				has_character_flag = positive_duck_stalking
				2000_is_sadistically_inclined_trigger = yes
			}
			animation = disbelief
		}
		#You're watching a nest of baby ducklings
		triggered_animation = {
			trigger = {
				has_character_flag = positive_duck_stalking
			}
			animation = love
		}
		#You're watching a terrifying beast
		triggered_animation = {
			trigger = {
				has_character_flag = negative_duck_stalking
			}
			animation = shock
		}
		#You're ... a bit stalkery. And a bit awkward.
		animation = shame
	}
	immediate = {
		if = {
			limit = { 
				has_character_flag = positive_duck_stalking
				2000_is_sadistically_inclined_trigger = yes
			}
			create_character_memory = {
				type = encountered_delicious_ducklings_memory
			}
			if = {
				limit = { 
					exists = var:duck_stalking
					NOT = { var:duck_stalking = flag:delicious }
				}
				remove_variable = duck_stalking
				set_variable = {
					name = duck_stalking
					value = flag:delicious
				}
			}
			else = {
				set_variable = {
					name = duck_stalking
					value = flag:delicious
				}
			}
		}
		else_if = {
			limit = { has_character_flag = positive_duck_stalking }
			create_character_memory = {
				type = encountered_fluffy_ducklings_memory
			}
			if = {
				limit = { 
					exists = var:duck_stalking
					NOT = { var:duck_stalking = flag:positive }
				}
				remove_variable = duck_stalking
				set_variable = {
					name = duck_stalking
					value = flag:positive
				}
			}
			else = {
				set_variable = {
					name = duck_stalking
					value = flag:positive
				}
			}
		}
		else_if = {
			limit = { has_character_flag = negative_duck_stalking }
			create_character_memory = {
				type = attacked_by_wild_beast_memory
			}
			if = {
				limit = { 
					exists = var:duck_stalking
					NOT = { var:duck_stalking = flag:negative }
				}
				remove_variable = duck_stalking
				set_variable = {
					name = duck_stalking
					value = flag:negative
				}
			}
			else = {
				set_variable = {
					name = duck_stalking
					value = flag:negative
				}
			}
		}
		else = {
			create_character_memory = {
				type = fooled_by_duck_memory
			}
			if = {
				limit = { 
					exists = var:duck_stalking
					NOT = { var:duck_stalking = flag:awkward }
				}
				remove_variable = duck_stalking
				set_variable = {
					name = duck_stalking
					value = flag:awkward
				}
			}
			else = {
				set_variable = {
					name = duck_stalking
					value = flag:awkward
				}
			}
		}
		if = {
			limit = { exists = scope:new_memory }
			scope:new_memory = {
				set_variable = {
					name = duck_location
					value = root.location
				}
				if = {
					limit = { exists = var:duck_location }
					#To prevent 'unused except in loc' errors :catto:
				}
			}
		}	
	}
	#A1: Positive event
	#This is... TOO CUTE SQUEEE
	option = {
		name = travel_events.2001.a
		trigger = { 
			has_character_flag = positive_duck_stalking
			2000_is_sadistically_inclined_trigger = no 
		}
		if = {
			limit = {
				age >= 60
				health <= poor_health
			}
			random_list = {
				95 = {
					desc = travel_events.2001.a_tt
					add_character_modifier = {
						modifier = travel_bundle_of_quacks_modifier
						years = 10
					}
				}
				#You die from cuteness overload
				5 = {
					desc = travel_events.2001.a_tt_death
					death = {
						death_reason = death_cuteness_overload
					}
				}
			}
		}
		else = {
			send_interface_toast = {
				left_icon = root
				title = travel_events.2001.a_tt
				add_character_modifier = {
					modifier = travel_bundle_of_quacks_modifier
					years = 10
				}
			}
		}
		ai_chance = {
			base = 100
		}
	}
	#A1: Positive event
	#You're a hungry /callous/sadist
	option = {
		name = travel_events.2001.b
		trigger = {
			has_character_flag = positive_duck_stalking
			2000_is_sadistically_inclined_trigger = yes 
		}
		stress_impact = {   
			compassionate = medium_stress_impact_gain
			sadistic = minor_stress_impact_loss
			callous = minor_stress_impact_loss
		}
		random_list = {
			#A good meal
			50 = {
				send_interface_toast = {
					left_icon = root
					title = travel_events.2001.b_success.tt
					add_character_modifier = {
						modifier = travel_well_fed_modifier
						years = 10
					}
				}
			}
			#Choke on a bone
			50 = {
				send_interface_toast = {
					left_icon = root
					title = travel_events.2001.b_failure.tt
					add_character_modifier = {
						modifier = travel_choke_on_a_bone_modifier
						years = 10
					}
				}
			}
		}
		ai_chance = {
			base = 100
		}
	}
	#A2: Negative event
	#Make a run for it!
	option = {
		name = travel_events.2001.c
		trigger = { has_character_flag = negative_duck_stalking }
		duel = {
			skill = prowess
			value = medium_skill_rating
			#You manage to outrun the beast!
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = travel_events.2001.c_ran
				send_interface_toast = {
					type = event_toast_text_and_effect_good
					left_icon = root
					title = travel_events.2001.c_success.tt
					desc = travel_events.2001.c_ran
					add_character_modifier = {
						modifier = travel_ran_like_the_wind_modifier
						years = 10
					}
					stress_impact = {
						base = minor_stress_impact_gain
					}
				}
			}
			#You become wounded
			30 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = travel_events.2001.c_hit_and_ran
				send_interface_toast = {
					type = event_toast_text_and_effect_bad
					left_icon = root
					title = travel_events.2001.c_failure.tt
					desc = travel_events.2001.c_hit_and_ran
					increase_wounds_effect = { REASON = fight }
					stress_impact = {
						base = medium_stress_impact_gain
					}
				}
			}
			#You die
			5 = {
				desc = travel_events.2001.c_critical_failure
				death = {
					death_reason = death_maimed_by_wild_beast
				}
			}
		}
		stress_impact = {
			eccentric = major_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				intrigue > martial
				prowess > intrigue
				factor = 2
			}
			modifier = {
				martial > intrigue
				prowess > martial
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = craven
					has_trait = paranoid
				}
				add = 50
			}
			ai_value_modifier = {
				ai_rationality = 2
				ai_compassion = 1
				ai_boldness = -1	
			}
		}
	}
	#A2: Negative event
	#Attack it!
	option = {
		name = travel_events.2001.d
		trigger = { has_character_flag = negative_duck_stalking }
		if = {
			limit = { intrigue > martial }
			duel = {
				skill = intrigue
				value = medium_skill_rating
				#You hit it, the beast runs off!
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					desc = travel_events.2001.d_scare_beast
					send_interface_toast = {
						type = event_toast_text_and_effect_good
						left_icon = root
						title = travel_events.2001.c_success.tt
						desc = travel_events.2001.d_scare_beast
						add_prestige = medium_prestige_gain
						stress_impact = {
							base = minor_stress_impact_gain
						}
					}
				}
				#You become wounded
				30 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					desc = travel_events.2001.d_beast_hit
					send_interface_toast = {
						type = event_toast_text_and_effect_bad
						left_icon = root
						title = travel_events.2001.c_failure.tt
						desc = travel_events.2001.d_beast_hit
						add_prestige = minor_prestige_gain
						increase_wounds_effect = { REASON = fight }
						stress_impact = {
							base = medium_stress_impact_gain
						}
					}
				}
				#You die
				5 = {
					desc = travel_events.2001.c_critical_failure
					death = {
						death_reason = death_maimed_by_wild_beast
					}
				}
			}
		}
		else = {
			duel = {
				skill = martial
				value = medium_skill_rating
				#You hit it, the beast runs off!
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					desc = travel_events.2001.d_scare_beast
					send_interface_toast = {
						left_icon = root
						title = travel_events.2001.c_success.tt
						add_prestige = medium_prestige_gain
						stress_impact = {
							base = minor_stress_gain
							craven = minor_stress_impact_gain
						}
					}
				}
				#You become wounded
				30 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					desc = travel_events.2001.d_beast_hit
					send_interface_toast = {
						left_icon = root
						title = travel_events.2001.c_failure.tt
						add_prestige = minor_prestige_gain
						increase_wounds_effect = { REASON = fight }
						stress_impact = {
							base = medium_stress_impact_gain
							craven = minor_stress_impact_gain
						}
					}
				}
				#You die
				5 = {
					desc = travel_events.2001.c_critical_failure
					death = {
						death_reason = death_maimed_by_wild_beast
					}
				}
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				intrigue > martial
				intrigue > prowess
				factor = 2
			}
			modifier = {
				martial > intrigue
				martial > prowess
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = brave
					has_trait = wrathful
				}
				add = 50
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_energy = 1
				ai_vengefulness = 1
			}
		}
	}
	#A3: Neutral event
	#Oh well
	option = {
		name = travel_events.2001.e
		trigger = { 
			NOR = {
				has_character_flag = positive_duck_stalking
				has_character_flag = negative_duck_stalking 
			}
		}
		stress_impact = {
			arrogant = minor_stress_impact_gain
			irritable = minor_stress_impact_gain
			wrathful = minor_stress_impact_gain
			calm = minor_stress_impact_loss
		}
		ai_chance = {
			base = 100
		}
	}
}

scripted_trigger is_suitable_guide_trigger = {
	NOT = { is_close_or_extended_family_of = root }
	is_available_travelling_adult = yes
	OR = {
		#Desert person
		AND = {
			OR = {
				location = { terrain = drylands }
				location = { terrain = desert }
			}
			has_trait = desert_warrior
		}
		#Open terrain person
		AND = {
			OR = {
				location = { terrain = plains }
				location = { terrain = farmlands }
			}
			has_trait = open_terrain_expert
		}
		#Rough terrain person
		AND = {
			OR = {
				location = { terrain = hills }
				location = { terrain = mountains }
			}
			has_trait = rough_terrain_expert
		}
		#Jungle person
		AND = {
			location = { terrain = jungle }
			has_trait = jungle_stalker
		}
		#River person
		AND = {
			location = { terrain = floodplains }
			location = { terrain = wetlands }
			has_trait = forder
		}
		#Forest person
		AND = {
			location = { terrain = forest }
			has_trait = forest_fighter
		}
		#Winter person
		AND = {
			location_has_winter_trigger = yes
			has_trait = winter_soldier
		}
		#Random educated person
		AND = {
			learning > medium_skill_rating
			OR = {
				has_trait = scholar
				has_trait = education_learning_3
				has_trait = education_learning_4
				has_trait = education_learning_5
			}
			#Organized person
			OR = {
				has_trait = logistician
				has_trait = organizer
				has_trait = adventurer
				has_trait = lifestyle_hunter
			}
		}
	}
}

#Crossing an ant path - Ignore or don't ignore your guide
travel_events.2002 = {
	type = character_event
	title = travel_events.2002.t
	desc = travel_events.2002.desc
	theme = travel
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { 2000_is_sadistically_inclined_trigger = yes }
			animation = boredom
		}
		triggered_animation = {
			trigger = { has_trait = lunatic }
			animation = personality_irrational
		}
	   	animation = personality_rational
	}
	right_portrait = {
		character = scope:guide_leader
		animation = worry
	}
	cooldown = { years = 10 }
	trigger = {
		trigger_if = {
			limit = {
				is_ai = yes
			}
			static_group_filter = {
				group = travel_events.2002
				match = 0.1
			}
		}
		trigger_else = {
			static_group_filter = {
				group = travel_events.2002
				match = 0.5
			}
		}
		is_available_travelling = yes
		is_playable_character = yes
		current_travel_plan = {
			any_entourage_character = {
				is_suitable_guide_trigger = yes
			}
			num_entourage_characters > 3
		}
		is_location_valid_for_travel_event_on_land = yes
	}
	immediate = {
		mp_delay_travel_plan = { DAYS = 90 }
		current_travel_plan = {
			random_entourage_character = {
				limit = { is_suitable_guide_trigger = yes }
				hidden_effect = {
					if = {
						limit = {
							NOT = {
								has_character_modifier = bp1_superstition_modifier
							}
						}
						add_character_modifier = bp1_superstition_modifier
					}
				}
				save_scope_as = guide_leader
			}
		}
		random_list = {
			50 = {
				dummy_female = {
					save_scope_as = great_grand_parent
				}
			}
			50 = {
				dummy_male = {
					save_scope_as = great_grand_parent
				}
			}
		}
	}
	#Let's find another path
	option = { 
		name = travel_events.2002.a
		reverse_add_opinion = {
			modifier = grateful_opinion
			target = scope:guide_leader
			opinion = 30
		}
		add_prestige = miniscule_prestige_loss
		progress_towards_friend_effect = {
			CHARACTER = scope:guide_leader
			OPINION = 0
			REASON = friend_humored_antpath_superstition
		}
		current_travel_plan = {
			delay_travel_plan = { days = 5 }
		}
		stress_impact = {
			impatient = medium_stress_impact_gain
			arrogant = minor_stress_impact_gain 
			sadistic = minor_stress_impact_gain
			callous = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_relation_friend = scope:guide_leader
					opinion = {
						target = scope:guide_leader
						value >= medium_positive_opinion
					}
				}	
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = impatient
					has_trait = arrogant
				}
				add = -25
			}
			ai_value_modifier = {
				ai_honor = 1
				ai_compassion = 1
			}
		}
	}
	#This is nonsense
	option = { 
		name = travel_events.2002.b
		reverse_add_opinion = {
			modifier = ignored_concerns
			target = scope:guide_leader
			opinion = -20
		}
		progress_towards_rival_effect = {
			CHARACTER = scope:guide_leader
			OPINION = 0
			REASON = rival_dismissed_antpath_superstition
		}
		duel = {
			skills = { stewardship prowess }
			value = medium_skill_rating
			50 = { # You find your way through!
				desc = travel_competent_guide_tt
				compare_modifier = {
					value = scope:duel_value
					multiplier = 0.5
				}
				send_interface_toast = {
					title = travel.competent_guide
					left_icon = root
					add_prestige = minor_prestige_gain
				}
			}
			50 = { # You get lost
				desc = travel_get_lost_tt
				compare_modifier = {
					value = scope:duel_value
					multiplier = -0.5
				}
				send_interface_toast = {
					title = travel.got_lost
					left_icon = root
					current_travel_plan = {
						delay_travel_plan = { days = 5 }
					}
					add_prestige = minor_prestige_loss
				}
			}
		}
		stress_impact = {   
			eccentric = minor_stress_impact_gain
			paranoid = minor_stress_impact_gain
			craven = miniscule_stress_impact_gain
			compassionate = medium_stress_impact_gain
			humble = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_relation_rival = scope:guide_leader
					opinion = {
						target = scope:guide_leader
						value <= low_negative_opinion
					}
				}	
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = impatient
					has_trait = arrogant
				}
				add = 25
			}
			ai_value_modifier = {
				ai_rationality = 2
				ai_compassion = -1 	
			}
		}
	}
	#Whip the guide
	option = { 
		name = travel_events.2002.c
		trigger = { has_trait = sadistic }
		scope:guide_leader = {
			increase_wounds_effect = { REASON = whipping }
		}
		reverse_add_opinion = {
			modifier = whipped_me_opinion
			target = scope:guide_leader
			opinion = -40
		}
		stress_impact = {
			compassionate = major_stress_impact_gain
			sadistic = minor_stress_impact_loss
			eccentric = minor_stress_impact_loss
			callous = miniscule_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				has_trait = sadistic
				OR = {
					has_relation_rival = scope:guide_leader
					opinion = {
						target = scope:guide_leader
						value <= low_negative_opinion
					}
				}	
				factor = 2
			}
			ai_value_modifier = {
				ai_vengefulness = 2
				ai_honor = -1
				ai_rationality = -1
				ai_energy = -1
				ai_compassion = -2
			}
		}
	}
    after = {
		mp_resume_travel_plan = yes
    }
}

scripted_trigger 2003_lowborn_pool_person_trigger ={
	is_lowborn = yes
	has_dynasty = no
	faith = location.county.faith
	culture = location.county.culture
	has_any_good_relationship_with_root_trigger = no
	has_any_bad_relationship_with_root_trigger = no
}

#Visit a local military place (barrack/military camp/regiment grounds) - Try to improve your martial
travel_events.2003 = { 
	type = character_event
	title = travel_events.2003.t
	desc = {
		desc = travel_events.2003.intro
		first_valid = {
			triggered_desc = {
				trigger = {
					has_character_flag = visiting_barracks
				}
				desc = travel_events.2003.desc_barracks
			}
			triggered_desc = {
				trigger = {
					has_character_flag = visiting_regiment
				}
				desc = travel_events.2003.desc_regiment
			}
			triggered_desc = {
				trigger = {
					has_character_flag = visiting_army_camp
				}
				desc = travel_events.2003.desc_camp
			}
		}
		desc = travel_events.2003.outro
	}
	theme = travel
	override_background = {
		trigger = {
			OR = {
				has_character_flag = visiting_barracks
				has_character_flag = visiting_regiment
			}
		}
		reference = armory
	}
	override_background = {
		trigger = { has_character_flag = visiting_army_camp }
		reference = army_camp
	}
	left_portrait = {
		character = root
		animation = personality_bold
	}
	right_portrait = {
		character = scope:local_captain
		animation = personality_content
	}
	#Show the external liege
	lower_right_portrait = {
		trigger = { exists = scope:county_liege }
		character = scope:county_liege
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling_adult = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = {
			OR = {
				has_building_or_higher = barracks_01
				has_building_or_higher = regimental_grounds_01
				has_building_or_higher = military_camps_01
			}
		}
	}
	immediate = {
		#Save the scope for easy reference
		location.county.holder = {
			if = {
				limit = {
					this != root
				}
				save_scope_as = county_liege
			}	
		}
		#Set up scope for desc and background
		if = {
			limit = {
				NOR = {
					has_character_flag = visiting_army_camp
					has_character_flag = visiting_regiment
				}
				location  = {
					has_building_or_higher = barracks_01
				}
			}
			add_character_flag = {
				flag = visiting_barracks
				days = 5
			}
		}
		else_if = {
			limit = {
				NOR = {
					has_character_flag = visiting_barracks
					has_character_flag = visiting_army_camp
				}
				location = {
					has_building_or_higher = regimental_grounds_01
				}
			}
			add_character_flag = {
				flag = visiting_regiment
				days = 5
			}
		}
		else = {
			add_character_flag = {
				flag = visiting_army_camp
				days = 5
			}
		}
		#Let's try to find a suitable person in pool first
		if = {
			limit = {
				any_pool_character = {
					province = root.location
					is_available_healthy_adult = yes
					martial >= medium_skill_rating
					prowess >= medium_skill_rating
					2003_lowborn_pool_person_trigger = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = {
					is_available_healthy_adult = yes
					martial >= medium_skill_rating
					prowess >= medium_skill_rating
					2003_lowborn_pool_person_trigger = yes
				}
				save_scope_as = local_captain
			}
		}
		#Otherwise create someone
		else_if = {
			limit = { exists = scope:county_liege }
			create_character = {
				template = new_warrior_character
				culture = scope:county_liege.culture
				faith = scope:county_liege.faith
				gender_female_chance = scope:county_liege.root_soldier_female_chance
				location = root.location
				save_scope_as = local_captain
			}
		}
		else = {
			create_character = {
				template = new_warrior_character
				culture = root.location.culture
				faith = root.location.faith
				gender_female_chance = root_soldier_female_chance
				location = root.location
				save_scope_as = local_captain
			}
		}
		scope:local_captain = {
			add_character_flag = wear_armor
		}
	}
	#Sparr with the troops
	option = { 
		name = travel_events.2003.a
		#I don't want to move/I don't want to get hurt
		stress_impact = {
			craven = minor_stress_impact_gain
			lazy = minor_stress_impact_gain
		}
		duel = {
			skill = prowess
			value = medium_skill_rating
			#You improve your martial
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 10
				desc = travel_events.2003.a_sparring_tt
				send_interface_toast = {
					left_icon = root
					title = travel_events.2001.c_success.tt
					add_martial_skill = 1
					add_prestige = medium_prestige_gain
				}
			}
			#You become wounded
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 10
				desc = travel_events.2003.a_wounded_tt
				send_interface_toast = {
					left_icon = root
					title = travel_events.2001.c_failure.tt
					add_prestige = minor_prestige_loss
					increase_wounds_effect = { REASON = duel }
				}
			}
		}
		#Your caravan guard captain appreciates your effort regardless
		if = {
			limit = { exists = root.current_travel_plan.travel_leader }
			reverse_add_opinion = {
				modifier = impressed_opinion
				target = root.current_travel_plan.travel_leader
				opinion = 10
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				prowess > learning
				factor = 2
			}
			modifier = {
				has_trait = brave
				has_trait = arrogant
				add = 50
			}
			modifier = {
				OR = {
					has_trait = paranoid
					has_trait = craven
				}
				add = -50
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_honor = 1
				ai_energy = -1	
			}
		}
	}
	#Study the local armors and equipment
	option = { 
		name = travel_events.2003.b
		#But the local liege might think you're spying!
		if = {
			limit = { exists = scope:county_liege }
			duel = {
				skill = learning
				target = scope:county_liege
				#You improve your martial
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					min = 10
					desc = travel_events.2003.b_learn_tt
					send_interface_toast = {
						left_icon = root
						title = travel_events.2003.b_success_tt
						add_martial_skill = 1
					}
				}
				#The liege might think you're spying
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					opinion_modifier = {
						who = scope:county_liege
						opinion_target = root
						multiplier = -1.5
					}
					min = 10
					desc = travel_events.2003.b_spy_tt
					send_interface_toast = {
						left_icon = root
						right_icon = scope:county_liege
						title = travel_events.2003.b_failure_tt
						reverse_add_opinion = {
							modifier = spy_suspicion_opinion
							target = scope:county_liege
							opinion = -10
						}
					}
				}
			}
		}
		#We can't really spy on ourselves
		else = {
			duel = {
				skill = learning
				value = medium_skill_rating
				#You improve your martial
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					desc = travel_events.2003.b_learn_tt
					send_interface_toast = {
						left_icon = root
						title = travel_events.2003.c_success_tt
						add_martial_skill = 1
					}
				}
				#Papercut!
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					desc = travel_events.2003.b_cut_tt
					send_interface_toast = {
						left_icon = root
						title = travel_events.2001.c_failure.tt
						increase_wounds_effect = { REASON = equipment }
					}
				}
			}
		}
		#Bah, who has time for this!
		stress_impact = {
			impatient = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				learning > prowess
				factor = 2
			}
			modifier = {
				factor = 0
				NOR = {
					has_trait = calm
					has_trait = content
					has_trait = humble
					has_trait = forgiving
				}
			}
			modifier = {
				ai_energy <= low_positive_ai_value
				add = -25
			}
			ai_value_modifier = {
				ai_rationality = 2	
			}
		}
	}
	#Intrigue: Convince the captain to join your entourage
	option = {
		name = travel_events.2003.c
		trigger = { 
			exists = scope:county_liege
			intrigue >= medium_skill_rating 
		}
		root.current_travel_plan = {
			add_companion = scope:local_captain
		}
		remove_short_term_gold = medium_gold_value
		scope:local_captain = {
			add_character_flag = {
				flag = recruited
				days = 5
			}
		}
		duel = {
			skill = intrigue
			target = scope:county_liege
			#The liege doesn't find out
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 10
				desc = travel_events.2003.c_secret_tt
				send_interface_toast = {
					left_icon = root
					right_icon = scope:local_captain
					title = travel_events.2001.c_success.tt
					reverse_add_opinion = {
						modifier = recruited_me_opinion
						target = scope:local_captain
						opinion = 20
					}
				}
			}
			#The liege finds out
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				opinion_modifier = {
					who = scope:county_liege
					opinion_target = root
					multiplier = 1.5
				}
				min = 10
				desc = travel_events.2003.c_found_out_tt
				send_interface_toast = {
					left_icon = root
					right_icon = scope:county_liege
					title = travel_events.2001.b_failure.tt
					reverse_add_opinion = {
						modifier = poached_military_opinion
						target = scope:county_liege
						opinion = -10
					}
				}
			}
		}
		#New person? _In my entourage?_
		stress_impact = {
			paranoid = medium_stress_impact_gain
			craven = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				intrigue > prowess
				intrigue > learning
				intrigue > medium_skill_rating
				add = 100
			}
			modifier = {
				has_trait = paranoid
				add = -75
			}
			modifier = {
				has_trait = craven
				add = -25
			}
			ai_value_modifier = {
				ai_sociability = 2
			}
			modifier = {
				factor = 0
				gold <= major_gold_value
			}
		}
	}
	#Opt out
	option = {
		name = travel_events.2003.d
		stress_impact = {
			brave = medium_stress_impact_gain
			arrogant = minor_stress_impact_gain
			lazy = minor_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				has_trait = paranoid
				add = 50
			}
			modifier = {
				has_trait = lazy
				add = 25
			}
			modifier = {
				has_trait = brave
				add = -75
			}
			ai_value_modifier = {
				ai_energy = 1	
			}
		}
	}
	after = {
		#Kill 'm if they didn't join us
		scope:local_captain = {
			remove_character_flag = wear_armor
			if = {
				limit = {
					NOT = { has_character_flag = recruited }
				}
				silent_disappearance_effect = yes	
			}
		}
	}
}

#Visit (your own) crappy pasture - Try to address or ignore the issues
travel_events.2004 = { 
	type = character_event
	title = travel_events.2004.t
	desc = travel_events.2004.desc
	theme = travel
	left_portrait = {
		character = root
		animation = disbelief
	}
	right_portrait = {
		character = scope:local_farmer
		triggered_animation = {
			trigger = {
				scope:local_farmer = {
					culture = root.culture
					faith = root.faith
				}
			}
			animation = personality_compassionate
		}
		animation = personality_cynical
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling_adult = yes
		is_landed = yes
		location = {
			has_building_or_higher = pastures_01
			county.holder = root
		}
		NOT = { has_character_flag = had_travel_pasture_event_recently }
	}
	immediate = {
		#Let's try to find a suitable person in pool first
		mp_delay_travel_plan = { DAYS = 90 }
		if = {
			limit = {
				any_pool_character = {
					province = root.location
					is_available_healthy_adult = yes
					stewardship >= medium_skill_rating
					2003_lowborn_pool_person_trigger = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = {
					is_available_healthy_adult = yes
					stewardship >= medium_skill_rating
					2003_lowborn_pool_person_trigger = yes
				}
				save_scope_as = local_farmer
			}
		}
		#Otherwise create someone
		else = {
			create_character = {
				template = generic_peasant_character
				culture = root.location.county.culture
				faith = root.location.county.faith
				location = root.location
				save_scope_as = local_farmer
			}
		}
		#Cooldown between pasture events
		add_character_flag = {
			flag = had_travel_pasture_event_recently
			years = 5
		}
		location.county = {
			add_county_modifier = {
				modifier = travel_mismanaged_pasture_modifier
				years = 15
			}
		}
	}
	#Advice local farmer on improvements
	option = { 
		name = travel_events.2004.a
		current_travel_plan = {
			delay_travel_plan = { days = 7 }
		}
		random_list = {
			50 = {
				desc = travel_events.2004.a_critique_success_tt
				modifier = {
					scope:local_farmer.faith = root.faith
					factor = 2
				}
				modifier = {
					scope:local_farmer.culture = root.culture
					factor = 2
				}
				modifier = {
					has_trait = organizer
					add = 25
				}
				modifier = {
					has_trait = administrator
					add = 25
				}
				modifier = {
					has_trait = diplomat
					add = 25
				}
				send_interface_toast = {
					left_icon = root
					right_icon = location.county
					title = travel_events.2004.a_success_tt
					location.county = {
						remove_county_modifier = travel_mismanaged_pasture_modifier
						add_county_modifier = {
							modifier = travel_improved_pasture_modifier
							years = 15
						}
					}
				}
			}
			50 = {
				desc = travel_events.2004.a_critique_reject_tt
				send_interface_toast = {
					left_icon = root
					right_icon = location.county
					title = travel_events.2004.a_failure_tt
					location.county = {
						remove_county_modifier = travel_mismanaged_pasture_modifier
						add_county_modifier = {
							modifier = travel_slightly_better_pasture_modifier
							years = 15
						}
					}
				}
			}
		}
		stress_impact = {
			shy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 150
			modifier = {
				has_trait = diligent
				add = 50
			}
			modifier = {
				ai_sociability >= medium_positive_ai_value
				add = 25
			}
			ai_value_modifier = {
				ai_sociability = 2
				ai_greed = 1
				ai_honor = 1
				ai_energy = -1
			}
		}
	}
	#Force the local farmer to give you supplies - horses, more specifically
	option = { 
		name = travel_events.2004.b
		trigger = {
			OR = {
				has_trait = impatient
				has_trait = arrogant
				has_trait = diligent
			}
		}
		current_travel_plan = {
			add_travel_plan_modifier = {
				modifier = travel_steeds_acquired_modifier
				months = 3
			}
		}		
		stress_impact = {
			compassionate = medium_stress_impact_gain
			honest = minor_stress_impact_gain
			just = minor_stress_impact_gain
		}
		ai_chance = {
			base = 150
			modifier = {
				OR = {
					has_trait = arrogant
					has_trait = callous
					has_trait = arbitrary
				}
				add = 50
			}
			ai_value_modifier = {
				ai_boldness = 1
				ai_greed = 1
				ai_energy = -1
				ai_compassion = -1
				ai_honor = -2
			}
		}
	}
	#I have better things to do!
	option = {
		name = travel_events.2004.c
		current_travel_plan = {
			add_travel_plan_modifier = {
				modifier = travel_ignored_pasture_issue_modifier
				months = 3
			}
		}	
		stress_impact = {
			impatient = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			lazy = minor_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = shy
					has_trait = lazy
				}
				add = 50
			}
		}
	}
	#Clean up
	after = {
		scope:local_farmer = {
			silent_disappearance_effect = yes
		}
		mp_resume_travel_plan = yes
	}
}

#Visit another ruler's pasture - Give advice or sabotage the pasture
travel_events.2005 = {
	type = character_event
	title = travel_events.2005.t
	desc = travel_events.2005.desc
	theme = travel
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				has_trait = deceitful
			}
			animation = scheme
		}
		animation = personality_bold
	}
	right_portrait = {
		character = scope:local_farmer
		animation = personality_honorable
	}
	#Show the external liege
	lower_right_portrait = {
		character = scope:county_liege
	}
	cooldown = { years = 20 }
	trigger = {
		is_available_travelling_adult = yes
		is_playable_character = yes
		is_landed = yes
		stewardship >= 12
		location = { 
			has_building_or_higher = pastures_01
			county.holder != root
		}
		location.county.holder = {
			is_ai = yes
			NOT = { has_relation_friend = root }
		}
		NOT = { has_character_flag = had_travel_pasture_event_recently }
	}
	immediate = {
		#Save the scope for easy reference
		location.county.holder = {
			save_scope_as = county_liege
		}
		#Let's try to find a suitable person in pool first
		if = {
			limit = {
				any_pool_character = {
					province = root.location
					is_available_healthy_adult = yes
					stewardship >= medium_skill_rating
					2003_lowborn_pool_person_trigger = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = {
					is_available_healthy_adult = yes
					stewardship >= medium_skill_rating
					2003_lowborn_pool_person_trigger = yes
				}
				save_scope_as = local_farmer
			}
		}
		#Otherwise create someone
		else = {
			create_character = {
				template = generic_peasant_character
				culture = scope:county_liege.culture
				faith = scope:county_liege.faith
				location = root.location
				save_scope_as = local_farmer
			}
			scope:local_farmer = {
				add_character_flag = created_farmer
			}
		}
		#Cooldown between pasture events
		add_character_flag = {
			flag = had_travel_pasture_event_recently
			years = 5
		}
	}
	#Improve your own pastures back home!
	option = { 
		name = travel_events.2005.a
		skill = stewardship
		trigger = {
			stewardship >= 16
		}
		show_as_unavailable = { always = yes }
		root.capital_county = {
			add_county_modifier = {
				modifier = travel_improved_pasture_modifier
				years = 15
			}
		}
		stress_impact = {
			lazy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
		}
	}
	#Friendly: improve their pastures for friendship!
	option = { 
		name = travel_events.2005.b
		
		location.county = {
			add_county_modifier = {
				modifier = travel_improved_pasture_modifier
				years = 15
			}
		}
		if = {
			limit = {
				scope:county_liege.highest_held_title_tier <= {
					value = {
						value = root.highest_held_title_tier
						add = 1
					}
				}
			}
			progress_towards_friend_effect = {
				REASON = friend_improved_my_pastures
				CHARACTER = scope:county_liege
				OPINION = 30
			}
		}
		else = {
			reverse_add_opinion = {
				target = scope:county_liege
				modifier = helpful_opinion
				opinion = 30
			}
		}
		stress_impact = {
			lazy = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_relation_rival = scope:county_liege
					opinion = {
						target = scope:county_liege
						value <= low_negative_opinion
					}
				}	
				factor = 2
			}
			ai_value_modifier = {
				ai_vengefulness = -1
				ai_honor = 1
				ai_compassion = 2
			}
		}
	}
	#Opt out
	option = {
		name = travel_events.2005.c
		stress_impact = {
			base = miniscule_stress_impact_loss
			lazy = minor_stress_impact_loss
			diligent = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				ai_greed >= medium_positive_ai_value
				add = -25
			}
			modifier = {
				ai_energy <= low_negative_ai_value
				add = 50
			}
			ai_value_modifier = {
				ai_compassion = 1	
			}
		}
	}
	#Clean up
	after = {
		scope:local_farmer = {
			if = {
				limit = {
					root = { is_ai = yes }
					has_character_flag = created_farmer
				}
				silent_disappearance_effect = yes
			}	
		}
	}
}

#Visit a camel farm - Get defiled by a camel
travel_events.2006 = { 
	type = character_event
	title = travel_events.2006.t
	desc = travel_events.2006.desc
	theme = travel
	left_portrait = {
		character = root
		animation = shock
	}
	right_portrait = {
		character = scope:camel_owner
		animation = disbelief
	}
	#If we're not the liege of the camel farm, show the liege
	lower_right_portrait = {
		trigger = { exists = scope:county_liege }
		character = scope:county_liege
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = { 
			has_building_or_higher = camel_farms_01
		}
	}
	immediate = {
		#Save the scope for easy reference
		location.county.holder = {
			if = {
				limit = {
					this != root
				}
				save_scope_as = county_liege
			}	
		}
		#Let's try to find a suitable person in pool first
		if = {
			limit = {
				any_pool_character = {
					province = root.location
					is_available_healthy_adult = yes
					2003_lowborn_pool_person_trigger = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = {
					is_available_healthy_adult = yes
					2003_lowborn_pool_person_trigger = yes
				}
				save_scope_as = camel_owner
			}
		}
		#Otherwise create someone
		else = {
			create_character = {
				template = generic_peasant_character
				culture = root.location.county.culture
				faith = root.location.county.faith
				location = root.location
				save_scope_as = camel_owner
			}
			scope:camel_owner = {
				add_character_flag = created_camel_owner
			}
		}
	}
	#Whip the camel and its owner
	option = {
		name = travel_events.2006.a
		add_prestige = minor_prestige_gain
		add_dread = medium_dread_gain
		if = {
			limit = {
				exists = scope:county_liege
			}
			reverse_add_opinion = {
				modifier = punished_my_camel_farm_opinion
				target = scope:county_liege
				opinion = -20
			}
		}
		stress_impact = {
			irritable = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			arrogant = medium_stress_impact_gain
			forgiving = medium_stress_impact_loss
			compassionate = minor_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				exists = scope:county_liege
				OR = {
					has_relation_friend = scope:county_liege
					opinion = {
						target = scope:county_liege
						value >= medium_positive_opinion
					}
				}	
				factor = 0.5
			}
			modifier = {
				has_trait = arrogant
				add = 100
			}
			modifier = {
				has_trait = sadistic
				add = 50
			}
			ai_value_modifier = {
				ai_vengefulness = 2
				ai_boldness = 1
				ai_compassion = -1
			}
		}
	}
	#Decapitate the camel and turn the head into a trophy
	option = { 
		name = travel_events.2006.b
		custom_tooltip = travel_events.2006.b_tt
		add_dread = major_dread_gain
		add_tyranny = medium_tyranny_gain
		save_scope_as = owner
		if = {
			limit = { 
				has_dlc_feature = court_artifacts
				has_royal_court = yes
			}
			set_artifact_rarity_common = yes
			set_variable = {
				name = animal_type
				value = flag:horse
				days = 1
			}
			create_artifact = {
				name = travel_events.2006_camel_head
				description = travel_events.2006_camel_head_desc
				type = animal_skull
				visuals = animal_trophy
				modifier = artifact_monthly_prestige_2_modifier
				modifier = artifact_dread_gain_mult_1_modifier
				modifier = artifact_tyranny_gain_mult_1_modifier
				wealth = scope:wealth  # This comes from set_artifact_rarity_common
				quality = scope:quality # This comes from set_artifact_rarity_common
				save_scope_as = newly_created_artifact
			}
			scope:newly_created_artifact = {
				flag_as_trash_artifact = yes
			}
		}
		else = {
			create_artifact = {
				name = travel_events.2006_camel_head
				description = travel_events.2006_camel_head_desc
				type = miscellaneous
				visuals = pocket_pouch
				modifier = artifact_monthly_prestige_2_modifier
				modifier = artifact_dread_gain_mult_1_modifier
				modifier = artifact_tyranny_gain_mult_1_modifier
				save_scope_as = newly_created_artifact
			}
			scope:newly_created_artifact = {
				flag_as_trash_artifact = yes
			}
		}
		if = {
			limit = { exists = scope:county_liege }
			reverse_add_opinion = {
				modifier = slaughtered_my_camel_opinion
				target = scope:county_liege
				opinion = -30
			}
		}
		stress_impact = {
			compassionate = medium_stress_impact_gain
			forgiving = major_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				exists = scope:county_liege
				OR = {
					has_relation_rival = scope:county_liege
					opinion = {
						target = scope:county_liege
						value <= low_negative_opinion
					}
				}	
				factor = 2
			}
			modifier = {
				has_trait = sadistic
				add = 150
			}
			ai_value_modifier = {
				ai_vengefulness = 3
				ai_boldness = 1
				ai_compassion = -1
				ai_energy = -2
			}
		}
	}
	#The camel wasn't at fault here
	option = {
		name = travel_events.2006.c
		add_prestige = minor_prestige_loss
		stress_impact = {
			irritable = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			arrogant = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				exists = scope:county_liege
				OR = {
					has_relation_friend = scope:county_liege
					opinion = {
						target = scope:county_liege
						value >= medium_positive_opinion
					}
				}	
				add = 50
			}
			modifier = {
				OR = {
					has_trait = irritable
					has_trait = wrathful
					has_trait = arrogant
				}
				add = -50
			}
			ai_value_modifier = {
				ai_compassion = 3
				ai_vengefulness = -3	
			}
		}
	}
	#Clean up
	after = {
		scope:camel_owner = {
			if = {
				limit = { has_character_flag = created_camel_owner }
				silent_disappearance_effect = yes
			}
		}
	}
}

#Visit an elephant pen - Train with the elephants
travel_events.2007 = { 
	type = character_event
	title = travel_events.2007.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:elephant_memory
				}
				desc = travel_events.2007.desc_memory
			}
			triggered_desc = {
				desc = travel_events.2007.desc_default
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:elephant_memory
					scope:elephant_memory = {
						has_memory_category = rival
					}
				}
				desc = travel_events.2007.desc_memory_rival
			}
			triggered_desc = {
				trigger = {
					exists = scope:elephant_memory
					scope:elephant_memory = {
						has_memory_category = nemesis
					}
				}
				desc = travel_events.2007.desc_memory_nemesis
			}
		}
		triggered_desc = {
			trigger = { exists = scope:elephant_memory }
			desc = travel_events.2007.desc_memory_segway
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:elephant_memory
					scope:elephant_memory = {
						exists = var:elephant_location
					}
					location = scope:elephant_memory.var:elephant_location 
				}
				desc = travel_events.2007.desc_memory_here
			}
			triggered_desc = {
				trigger = {
					exists = scope:elephant_memory
					scope:elephant_memory = {
						exists = var:elephant_location
					}
					location != scope:elephant_memory.var:elephant_location
				}
				desc = travel_events.2007.desc_memory_not_here
			}
		}
		desc = travel_events.2007.desc_outro
	}
	theme = travel
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				exists = scope:elephant_memory
			}
			animation = personality_cynical
		}
		animation = personality_bold
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling_adult = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = { 
			has_building_or_higher = elephant_pens_01
		}
		NOT = { has_character_flag = had_travel_elephant_pen_event_recently }
	}
   immediate = {
   		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small }
		#I have been previously traumatized by elephants
		mp_delay_travel_plan = { DAYS = 90 }
		if = {
			limit = {
				any_memory = {
					has_memory_category = negative
					has_memory_category = elephant
					OR = {
						has_memory_category = rival
						has_memory_category = nemesis
					}
				}
			}
			random_memory = {
				limit = {
					has_memory_category = negative
					has_memory_category = elephant
					OR = {
						has_memory_category = rival
						has_memory_category = nemesis
					}
				}
				random_memory_participant = {
					save_scope_as = crushing_person
				}
				save_scope_as = elephant_memory
			}
		}
		#Cooldown between elephant pen events
		add_character_flag = {
			flag = had_travel_elephant_pen_event_recently
			years = 5
		}
	}
	#Train with the elephants
	option = {
		name = travel_events.2007.a
		random_list = {
			#Super training
			30 = {
				desc = travel_events.2007.a_efficient_training_tt
				send_interface_toast = {
					left_icon = root
					title = travel_events.2007.a_success_tt
					current_travel_plan = {
						delay_travel_plan = { days = 14 }
					}
					add_prowess_skill = 2
				}
			}
			#'s alright
			40 = {
				desc = travel_events.2007.a_alright_training_tt
				send_interface_toast = {
					left_icon = root
					title = travel_events.2007.a_soft_success_tt
					current_travel_plan = {
						delay_travel_plan = { days = 7 }
					}
					add_prowess_skill = 1
				}
			}
			#Eh...
			30 = {
				desc = travel_events.2007.a_failed_training_tt
				send_interface_toast = {
					type = event_toast_text_and_effect_bad
					left_icon = root
					title = travel_events.2007.a_failure_tt
					desc = travel_events.2007.a_failed_training_tt
					current_travel_plan = {
						delay_travel_plan = { days = 3 }
					}
				}
			}
		}
		stress_impact = {
			impatient = medium_stress_impact_gain
			lazy = medium_stress_impact_gain
			athletic = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = impatient
					has_trait = lazy
				}
				add = -50
			}
			modifier = {
				OR = {
					has_trait = brave
					has_trait = athletic
				}
				add = 50
			}
			ai_value_modifier = {
				ai_energy = 2
				ai_boldness = 2
			}
		}
	}
	#Not worth it
	option = {
		name = travel_events.2007.b
		stress_impact = {
			lazy = minor_stress_impact_loss
			athletic = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = impatient
					has_trait = lazy
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = brave
					has_trait = athletic
				}
				add = -50
			}
		}
	}
    after = {
		mp_resume_travel_plan = yes
    }
}

scripted_effect elephant_trauma_effect = {
	if = {
		limit = { has_relation_nemesis = root }
		create_character_memory = {
			type = almost_crushed_by_elephant_nemesis_memory
			participants = {
				nemesis = root
			}
		}
		add_opinion = {
			modifier = almost_crushed_me_opinion
			target = root
			opinion = -40
		}
	}
	else = {
		create_character_memory = {
			type = almost_crushed_by_elephant_rival_memory
			participants = {
				rival = root
			}
		}
		worsen_relationship_effect = {
			TARGET = root
			REASON = rival_almost_crushed_by_elephant
		}
	}
}

#Visit an elephant pen, your rival is on site - Attempt to crush your rival?
travel_events.2008 = { 
	type = character_event
	title = travel_events.2008.t
	desc = travel_events.2008.desc
	theme = travel
	left_portrait = {
		character = root
		animation = scheme
	}
	right_portrait = {
		character = scope:elephant_rival
		animation = fear
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_playable_character = yes
		any_relation = {
			type = rival
			type = nemesis
			save_temporary_scope_as = relation_check
		}
		scope:relation_check = {
			is_available_at_peace_ai_adult = yes
		}
		is_location_valid_for_travel_event_on_land = yes
		location = { 
			has_building_or_higher = elephant_pens_01
			county.holder = scope:relation_check
		}
		NOT = { has_character_flag = had_travel_elephant_pen_event_recently }
	}
   immediate = {
   		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small }
		mp_delay_travel_plan = { DAYS = 90 }
		#Save the scope for easy reference
		location.county.holder = {
			save_scope_as = elephant_rival
		}
		#Cooldown between elephant pen events
		add_character_flag = {
			flag = had_travel_elephant_pen_event_recently
			years = 5
		}
	}
	#Get the elephant to sit on your rival
	option = {
		name = travel_events.2008.a
		random_list = {
			#Death
			40 = {
				desc = travel_events.2008.a_crushed_tt
				send_interface_toast = {
					left_icon = root
					right_icon = scope:elephant_rival
					title = travel_events.2008.a_success_tt
					scope:elephant_rival = {
						death = {
							death_reason = death_crushed_by_elephant
						}
					}
				}
			}
			#Wounded
			50 = {
				desc = travel_events.2008.a_wounded_tt
				send_interface_toast = {
					left_icon = root
					right_icon = scope:elephant_rival
					title = travel_events.2008.a_soft_success_tt
					scope:elephant_rival = {
						increase_wounds_effect = { REASON = crushed_by_elephant }
						elephant_trauma_effect = yes
					}
				}
			}
			#Escaped
			10 = {
				desc = travel_events.2008.a_scotfree_tt
				send_interface_toast = {
					left_icon = root
					right_icon = scope:elephant_rival
					title = travel_events.2008.a_failure_tt
					scope:elephant_rival = {
						elephant_trauma_effect = yes
					}
				}
			}
		}
		if = {
			limit = { exists = scope:new_memory }
			scope:new_memory = {
				set_variable = {
					name = elephant_location
					value = root.location
				}
				if = {
					limit = { exists = var:elephant_location }
					#To prevent 'unused except in loc' errors :catto:
				}
			}
		}
		stress_impact = {
			irritable = medium_stress_impact_loss
			wrathful = medium_stress_impact_loss
			sadistic = medium_stress_impact_loss
			arrogant = minor_stress_impact_loss
			forgiving = medium_stress_impact_gain
			compassionate = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				opinion = {
					target = scope:elephant_rival
					value >= medium_negative_opinion
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
				}
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = vengeful
					has_trait = wrathful
				}
				factor = 1.5
			}
			ai_value_modifier = {
				ai_vengefulness = 3
				ai_boldness = 1
				ai_honor = -1
				ai_compassion = -2
			}
		}
	}
	#Let's not
	option = {
		name = travel_events.2008.b
		improve_relationship_effect = {
			TARGET = scope:elephant_rival
			REASON = friend_saved_me_from_elephant
		}
		add_prestige = medium_prestige_loss
		stress_impact = {
			irritable = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			arrogant = medium_stress_impact_gain
			forgiving = medium_stress_impact_loss
			compassionate = minor_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				opinion = {
					target = scope:elephant_rival
					value >= low_negative_opinion
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
				}
				factor = 1.5
			}
			modifier = {
				OR = {
					has_trait = vengeful
					has_trait = wrathful
				}
				factor = 0.5
			}
			ai_value_modifier = {
				ai_compassion = 3
				ai_honor = 1
				ai_vengefulness = -2
			}
		}
	}
    after = {
		mp_resume_travel_plan = yes
    }
}

scripted_effect remove_and_notify_player_effect = {
	send_interface_toast = {
		type = event_toast_effect_neutral
		left_icon = root
		right_icon = scope:fallen_child
		title = travel_events.2010.b_tt
		scope:fallen_child = {
			remove_trait = $REMOVE_TRAIT$
			if = {
				limit = {
					var:add_trait_type_variable = flag:craven
				}
				add_trait = craven
			}
			if = {
				limit = {
					var:add_trait_type_variable = flag:paranoid
				}
				add_trait = paranoid
			}
			if = {
				limit = {
					var:add_trait_type_variable = flag:shy
				}
				add_trait = shy
			}
		}
	}
}

scripted_effect remove_trait_add_craven_effect = {
	if = {
		limit = {
			has_trait = brave
		}
		remove_trait = brave
		add_trait_force_tooltip = craven
	}
	else = {
		random_list = {
			1 = {
				trigger = { has_trait = lustful }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = lustful }
				}
			}
			1 = {
				trigger = { has_trait = chaste }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = chaste }
				}
			}
			1 = {
				trigger = { has_trait = gluttonous }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = gluttonous }
				}
			}
			1 = {
				trigger = { has_trait = temperate }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = temperate }
				}
			}
			1 = {
				trigger = { has_trait = greedy }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = greedy }
				}
			}
			1 = {
				trigger = { has_trait = generous }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = generous }
				}
			}
			1 = {
				trigger = { has_trait = lazy }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = lazy }
				}
			}
			1 = {
				trigger = { has_trait = diligent }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = diligent }
				}
			}
			1 = {
				trigger = { has_trait = calm }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = calm }
				}
			}
			1 = {
				trigger = { has_trait = patient }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = patient }
				}
			}
			1 = {
				trigger = { has_trait = humble }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = humble }
				}
			}
			1 = {
				trigger = { has_trait = honest }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = honest }
				}
			}
			1 = {
				trigger = { has_trait = gregarious }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = gregarious }
				}
			}
			1 = {
				trigger = { has_trait = ambitious }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = ambitious }
				}
			}
			1 = {
				trigger = { has_trait = content }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = content }
				}
			}
			1 = {
				trigger = { has_trait = arbitrary }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = arbitrary }
				}
			}
			1 = {
				trigger = { has_trait = just }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = just }
				}
			}
			1 = {
				trigger = { has_trait = zealous }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = zealous }
				}
			}
			1 = {
				trigger = { has_trait = trusting }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = trusting }
				}
			}
			1 = {
				trigger = { has_trait = compassionate }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = compassionate }
				}
			}
			1 = {
				trigger = { has_trait = stubborn }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = stubborn }
				}
			}
			1 = {
				trigger = { has_trait = fickle }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = fickle }
				}
			}
			1 = {
				trigger = { has_trait = forgiving }
				root = {
					remove_and_notify_player_effect = { REMOVE_TRAIT = forgiving }
				}
			}
		}	
	}
}

scripted_effect check_traits_effect = {
	if = {
		limit = {
			number_of_personality_traits = childhood_personality_trait_gain_limit
		}
		remove_trait_add_craven_effect = yes
	}
	else = {
		random_list = {
			1 = {
				add_trait = craven
			}
			1 = {
				add_trait = paranoid
			}
			1 = {
				add_trait = shy
			}
		}
	}
}

#Visit an orchard - Kid falls out of tree
travel_events.2010 = { 
	type = character_event
	title = travel_events.2010.t
	desc = {
		first_valid = {
			#Summer time in temperate places
			triggered_desc = {
				trigger = {
					temperate_seasons_trigger = { LOCATION = location }
					middle_of_year_season_trigger = yes
				}
				desc = travel_events.2010.temperate_summer
			}
			#Winter in temperate places
			triggered_desc = {
				trigger = {
					temperate_seasons_trigger = { LOCATION = location }
					end_of_year_season_trigger = yes
				}
				desc = travel_events.2010.temperate_winter
			}
			#Summer time in tropical places
			triggered_desc = {
				trigger = {
					tropical_seasons_trigger = { LOCATION = location }
					middle_of_year_season_trigger = yes
				}
				desc = travel_events.2010.tropical_summer
			}
			#Winter time in tropical places
			triggered_desc = {
				trigger = {
					tropical_seasons_trigger = { LOCATION = location }
					end_of_year_season_trigger = yes
				}
				desc = travel_events.2010.tropical_winter
			}
			#Fallback
			triggered_desc = {
				desc = travel_events.2010.fallback
			}
		}
		desc = travel_events.2010.desc
		first_valid = {
			triggered_desc = {
				trigger = { 
					OR = {
						has_character_flag = orchard_root_child
						has_character_flag = orchard_entourage_child
					}
				}
				desc = travel_events.2010.entourage
			}
			triggered_desc = {
				desc = travel_events.2010.peasant
			}
		}
		desc = travel_events.2010.outro
	}
	theme = travel
	left_portrait = {
		character = root
		animation = shock
	}
	right_portrait = {
		character = scope:fallen_child
		animation = pain
	}
	#Show the court physician (if present and treatable)
	lower_left_portrait = {
		trigger = { 
			exists = scope:court_physician
			OR = {
				has_character_flag = orchard_root_child
				has_character_flag = orchard_entourage_child
			}
		}
		character = scope:court_physician
	}
	#Show the external liege
	lower_right_portrait = {
		trigger = { exists = scope:county_liege }
		character = scope:county_liege
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling_adult = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = { 
			has_building_or_higher = orchards_01
			county = {
				NOT = { has_variable = recently_burned_orchard }
			}
		}
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_very_small }
		#Save the scope for easy reference
		location.county.holder = {
			save_scope_as = county_liege
		}
		#Check if we have our court physician with us
		if = {
			limit = {
				any_court_position_holder = {
					type = court_physician_court_position
					is_physically_able = yes
					is_travel_entourage_character = yes
				}
			}
			save_court_physician_as_effect = { SCOPE_NAME = court_physician }
		}
		#Check if we have our own child in the entourage first
		if = {
			limit = {
				current_travel_plan = {
					any_entourage_character = {
						is_child_of = root
						is_available_healthy_ai_child = yes
						age > 4
					}
				}
			}
			current_travel_plan = {
				random_entourage_character = {
					limit = {
						is_child_of = root
						is_available_healthy_ai_child = yes
						age > 4
					}
					save_scope_as = fallen_child
				}
			}
			add_character_flag = {
				flag = orchard_root_child
				days = 5
			}

		}
		#Else a random entourage child
		else_if = {
			limit = {
				current_travel_plan = {
					any_entourage_character = {
						NOT = { is_child_of = root }
						is_available_healthy_ai_child = yes
						age > 4
					}
				}
			}
			current_travel_plan = {
				random_entourage_character = {
					limit = {
						NOT = { is_child_of = root }
						is_available_healthy_ai_child = yes
						age > 4
					}
					save_scope_as = fallen_child
				}
			}
			add_character_flag = {
				flag = orchard_entourage_child
				days = 5
			}
		}
		#Otherwise grab one from the pool
		else_if = {
			limit = {
				any_pool_character = {
					province = root.location
					is_available_healthy_ai_child = yes
					age > 4
					2003_lowborn_pool_person_trigger = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = {
					is_available_healthy_ai_child = yes
					age > 4
					2003_lowborn_pool_person_trigger = yes
				}
				save_scope_as = fallen_child
			}
		}
		#Or else create one
		else = {
			create_character = {
				template = peasant_child_character
				culture = location.county.culture
				faith = location.county.faith
				age = { 5 15 }
				location = root.location
				save_scope_as = fallen_child
			}
			scope:fallen_child = {
				add_character_flag = created_child
			}
		}
		#Set up which potential trait to get for cleaner effect tooltip
		if = {
			limit = {
				OR = {
					has_character_flag = orchard_root_child
					has_character_flag = orchard_entourage_child
				}
			}
			scope:fallen_child = {
				random_list = {
					1 = {
						set_variable = {
							name = add_trait_type_variable
							value = flag:craven
							days = 1
						}
					}
					1 = {
						set_variable = {
							name = add_trait_type_variable
							value = flag:shy
							days = 1
						}
					}
					1 = {
						set_variable = {
							name = add_trait_type_variable
							value = flag:paranoid
							days = 1
						}
					}
				}
			}
		}
		location.county = { save_scope_as = location_county }
	}
	#Punish the orchard for having slippery trees
	option = {
		name = travel_events.2010.a
		flavor = travel_events.2010.a_flavor
		trigger = {
			OR = {
				# It's mine, I do what I want
				scope:county_liege = root
				# I hate the owner
				has_relation_rival = scope:county_liege
			}
		}
		#No treatment; will wounds heal or not
		if = {
			limit = {
				OR = {
					has_character_flag = orchard_root_child
					has_character_flag = orchard_entourage_child
				}
			}
			custom_tooltip = travel_events.2010.a_tt
		}
		add_character_flag = {
			flag = orchard_no_treatment
			days = 5
		}
		add_dread = medium_dread_gain
		#The province owner won't appreciate us burning the orchard
		if = {
			limit = {
				exists = scope:county_liege
				scope:county_liege != root
			}
			scope:county_liege = {
				send_interface_message = {
					type = event_domain_bad
					title = travel_events.2010.a_tt_2
					left_icon = root
					add_opinion = {
						modifier = burned_my_orchard_opinion
						target = root
						opinion = -30
					}
					scope:location_county = {
						set_variable = {
							name = recently_burned_orchard
							years = 20
						}
						add_county_modifier = {
							modifier = travel_burned_orchard_modifier
							years = 10
						}
					}
				}
			}
		}
		stress_impact = {
			wrathful = minor_stress_impact_loss
			vengeful = minor_stress_impact_loss
			calm = medium_stress_impact_gain
			forgiving = medium_stress_impact_gain
			compassionate = minor_stress_impact_gain
		}
		ai_chance = {
			base = 10
			#Why else would we burn our own orchard to the ground
			modifier = {
				scope:county_liege = root
				OR = {
					has_trait = lunatic
					has_trait = possessed
				}
				add = 50
			}
			#Do we have a 'work' connection?
			modifier = {
				exists = scope:county_liege
				scope:county_liege != root
				scope:county_liege = {
					OR = {
						is_vassal_of = root
						is_liege_or_above_of = root 
					}
				}
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
					has_trait = calm
				}
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = vengeful
					has_trait = wrathful
				}
				factor = 1.5
			}
			ai_value_modifier = {
				ai_vengefulness = 2
				ai_boldness = 2
				ai_energy = 1
				ai_compassion = -1
				ai_honor = -2
				ai_rationality = -2
			}
		}
	}
	#Scold the child
	option = {
		name = travel_events.2010.b
		trigger = {
			OR = {
				has_character_flag = orchard_root_child
				has_character_flag = orchard_entourage_child
			}
		}
		#No treatment; will wounds heal or not
		if = {
			limit = {
				OR = {
					has_character_flag = orchard_root_child
					has_character_flag = orchard_entourage_child
				}
			}
			custom_tooltip = travel_events.2010.a_tt
		}
		add_character_flag = {
			flag = orchard_no_treatment
			days = 5
		}
		add_dread = minor_dread_gain
		#Is the child a vengeful or already spooked person?
		if = {
			limit = {
				scope:fallen_child = {
					OR = {
						has_trait = vengeful
						has_trait = wrathful
						has_trait = cynical
						has_trait = callous
						has_trait = sadistic
						has_trait = arrogant
						has_trait = deceitful
						has_trait = shy
						#Can't get craven if you're craven; and paranoid is just the evolution of craven
						has_trait = craven
						has_trait = paranoid
					}
				}
			}
			scope:fallen_child = {
				progress_towards_rival_effect = {
					CHARACTER = root
					OPINION = 0
					REASON = rival_scolded_me
				}
				add_opinion = {
					modifier = was_scolded_opinion
					target = root
					opinion = -30
				}
			}
		}
		#Else change the personality of the child according to the trauma
		else = {
			scope:fallen_child = { check_traits_effect = yes }
		}
		#If it's not our child, the parents of the child will be upset
		if = {
			limit = { has_character_flag = orchard_entourage_child }
			if = {
				limit = {
					scope:fallen_child.mother = { is_alive = yes }
				}
				reverse_add_opinion = {
					modifier = scolded_my_child_opinion
					target = scope:fallen_child.mother
					opinion = -30
				}
				progress_towards_rival_effect = {
					CHARACTER = scope:fallen_child.mother
					OPINION = 0
					REASON = rival_scolded_my_child
				}
			}
			if = {
				limit = {
					scope:fallen_child.father = { is_alive = yes }
				}
				reverse_add_opinion = {
					modifier = scolded_my_child_opinion
					target = scope:fallen_child.father
					opinion = -30
				}
				progress_towards_rival_effect = {
					CHARACTER = scope:fallen_child.father
					OPINION = 0
					REASON = rival_scolded_my_child
				}
			}
		}
		stress_impact = {
			forgiving = minor_stress_impact_gain
			compassionate = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			#Do we like the child or the parents?
			modifier = {
				OR = {
					opinion = {
						target = scope:fallen_child
						value >= low_positive_opinion
					}
					has_relation_friend = scope:fallen_child
					has_relation_friend = scope:fallen_child.mother
					has_relation_friend = scope:fallen_child.father
				}
				factor = 0
			}
			#Do we dislike the child / the parents of the child?
			modifier = {
				OR = {
					opinion = {
						target = scope:fallen_child
						value <= low_negative_opinion
					}
					opinion = {
						target = scope:fallen_child.mother
						value <= medium_negative_opinion
					}
					opinion = {
						target = scope:fallen_child.father
						value <= medium_negative_opinion
					}
				}
				add = 50
			}
			modifier = {
				OR = {
					has_relation_rival = scope:fallen_child
					has_relation_rival = scope:fallen_child.mother
					has_relation_rival = scope:fallen_child.father
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
				}
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = sadistic
					has_trait = callous
				}
				factor = 1.5
			}
			ai_value_modifier = {
				ai_compassion = -3
			}
		}
	}
	#Offer treatment to the child / Soothe the child
	option = {
		name = {
			text = {
				first_valid = {
					#Offer treatment
					triggered_desc = {
						trigger = { 
							exists = scope:court_physician
							OR = {
								has_character_flag = orchard_root_child
								has_character_flag = orchard_entourage_child
							}
						}
						desc = travel_events.2010.c_physician
					}
					#Soothe the child
					triggered_desc = {
						desc = travel_events.2010.c
					}
				}
			}
		}
		if = {
			limit = { 
				exists = scope:court_physician
				OR = {
					has_character_flag = orchard_root_child
					has_character_flag = orchard_entourage_child
				}
			}
			custom_tooltip = travel_events.2010.c_physician_tt
			remove_short_term_gold = medium_gold_value
			if = {
				limit = {
					has_character_flag = orchard_entourage_child
				}
				reverse_add_opinion = {
					modifier = treated_me_opinion
					target = scope:fallen_child
					opinion = 20
				}
				improve_relationship_effect = {
					TARGET = scope:fallen_child
					REASON = friend_treated_wounds
				}
				if = {
					limit = {
						scope:fallen_child.mother = { is_alive = yes }
					}
					reverse_add_opinion = {
						modifier = treated_my_child_opinion
						target = scope:fallen_child.mother
						opinion = 30
					}
					progress_towards_friend_effect = {
						CHARACTER = scope:fallen_child.mother
						OPINION = 0
						REASON = friend_treated_childs_wounds
					}
				}
				if = {
					limit = {
						scope:fallen_child.father = { is_alive = yes }
					}
					reverse_add_opinion = {
						modifier = treated_my_child_opinion
						target = scope:fallen_child.father
						opinion = 30
					}
					progress_towards_friend_effect = {
						CHARACTER = scope:fallen_child.father
						OPINION = 0
						REASON = friend_treated_childs_wounds
					}
				}
			}
			add_character_modifier = {
				modifier = travel_soothed_child_modifier
				years = 5
			}
		}
		else = {
			#No treatment; will wounds heal or not
			if = {
				limit = {
					OR = {
						has_character_flag = orchard_root_child
						has_character_flag = orchard_entourage_child
					}
				}
				custom_tooltip = travel_events.2010.a_tt
			}
			add_character_flag = {
				flag = orchard_no_treatment
				days = 5
			}
			scope:fallen_child = {
				add_character_modifier = {
					modifier = travel_soothed_modifier
					years = 5
				}
			}
			add_character_modifier = {
				modifier = travel_soothed_child_modifier
				years = 5
			}
		}
		#We should be able to treat our own kids without losing dread; others however...
		if = {
			limit = {
				scope:fallen_child = { 
					NOT = { is_child_of = root }
				}
			}
			add_dread = minor_dread_loss
		}
		stress_impact = {
			callous = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			forgiving = minor_stress_impact_loss
			generous = minor_stress_impact_loss
			compassionate = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			#If we have a court physician
			#Don't want our own kids being hurt
			modifier = {
				exists = scope:court_physician
				NOT = { has_trait = callous }
				scope:fallen_child = { is_child_of = root }
				short_term_gold >= medium_gold_value
				factor = 2
			}
			##Can we afford treatment?
			modifier = {
				exists = scope:court_physician
				short_term_gold <= medium_gold_value
				ai_greed <= low_negative_ai_value
				factor = 0.5
			}
			##Do we like the child or the parents?
			modifier = {
				exists = scope:court_physician
				exists = scope:fallen_child.mother
				exists = scope:fallen_child.father
				short_term_gold >= medium_gold_value
				OR = {
					has_relation_friend = scope:fallen_child
					has_relation_friend = scope:fallen_child.mother
					has_relation_friend = scope:fallen_child.father
				}
				factor = 2
			}
			#If we do NOT have a court physician
			##Don't want our own kids being hurt
			modifier = {
				NOT = { has_trait = callous }
				scope:fallen_child = { is_child_of = root }
				factor = 2
			}
			##Do we like the child?
			modifier = {
				opinion = {
					target = scope:fallen_child
					value >= low_positive_opinion
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
				}
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = sadistic
					has_trait = callous
				}
				factor = 0.5
			}
			ai_value_modifier = {
				ai_compassion = 3
				ai_sociability = 1
				ai_rationality = 1
				ai_greed = -3
			}
			modifier = {
				factor = 0
				gold <= major_gold_value
			}
		}   
	}
	#Do nothing
	option = {
		name = travel_events.2010.d
		#No treatment; will wounds heal or not
		if = {
			limit = {
				OR = {
					has_character_flag = orchard_root_child
					has_character_flag = orchard_entourage_child
				}
			}
			custom_tooltip = travel_events.2010.a_tt
		}
		add_character_flag = {
			flag = orchard_no_treatment
			days = 5
		}
		stress_impact = {
			forgiving = minor_stress_impact_gain
			compassionate = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				has_trait = callous
				add = 100
			}
			modifier = {
				has_trait = sadistic
				add = 100
			}
			modifier = {
				has_trait = arbitrary
				add = 25
			}
			modifier = {
				has_trait = arrogant
				add = 25
			}
			modifier = {
				has_trait = compassionate
				add = -100
			}
			modifier = {
				has_trait = vengeful
				add = -50
			}
			modifier = {
				has_trait = wrathful
				add = -50
			}
			ai_value_modifier = {
				ai_rationality = 2
				ai_vengefulness = -1
				ai_compassion = -3
			}
		}   
	}
	#Clean up any created children
	after = {
		scope:fallen_child = {
			if = {
				limit = { has_character_flag = created_child }
				silent_disappearance_effect = yes
			}
			if = {
				limit = { exists = var:add_trait_type_variable }
				remove_variable = add_trait_type_variable
			}
		}
		#Will the wounds heal or get worse
		if = {
			limit = {
				has_character_flag = orchard_no_treatment
				OR = {
					has_character_flag = orchard_root_child
					has_character_flag = orchard_entourage_child
				}
			}
			trigger_event = {
				id = travel_events.2011
				days = 3
			}
		}
	}
}

#Hidden follow-up; do the wounds heal?
travel_events.2011 = { 
	type = character_event
	hidden = yes
	immediate = {
		random_list = {
			5 = {
				send_interface_toast = {
					type = event_toast_text_good
					left_icon = root
					right_icon = scope:fallen_child
					title = travel_events.2011.tt_healed
					desc = travel_events.2011.tt_healed_desc
				}
			}
			5 = {
				send_interface_toast = {
					type = event_toast_text_and_effect_bad
					left_icon = root
					right_icon = scope:fallen_child
					title = travel_events.2011.tt_worsened
					desc = travel_events.2011.tt_worsened_desc
					scope:fallen_child = {
						increase_wounds_effect = { REASON = fall }
					}
				}
			}
		}
	}
}

#Visit a plantation - Fire!
travel_events.2012 = { 
	type = character_event
	title = travel_events.2012.t
	desc = travel_events.2012.desc
	theme = travel
	left_portrait = {
		character = root
		animation = fear
	}
	lower_left_portrait = {
		trigger = { exists = scope:guard_type_character }
		character = scope:guard_type_character
	}
	#Show the external liege
	lower_right_portrait = {
		trigger = { exists = scope:county_liege }
		character = scope:county_liege
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_playable_character = yes
		location = { 
			has_building_or_higher = plantations_01
		}
		exists = location.county.holder
		is_location_valid_for_travel_event_on_land = yes
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small }
		#Save the scope for easy reference
		location.county.holder = {
			if = {
				limit = {
					this != root
				}
				save_scope_as = county_liege
			}	
		}
		current_travel_plan = {
			if = {
				limit = { 
					any_entourage_character = { is_guard_type_character_trigger = yes }
				}
				random_entourage_character = {
					limit = { is_guard_type_character_trigger = yes }
					weight = {
						base = 1
						modifier = {
							NOT = { 
								is_of_major_or_minor_interest_trigger = { CHARACTER = root }
							}
							add = 10
						}
						modifier = {
							OR = {
								has_trait = brave
								prowess >= medium_skill_rating
							}
							add = 10
						}
					}
					save_scope_as = guard_type_character
				}
			}
		}
	}
	#Make your guard person go
	option = {
		name = travel_events.2012.a
		trigger = {
			exists = scope:guard_type_character
		}
		scope:guard_type_character = {
			duel = {
				skill = prowess
				value = medium_skill_rating
				#The captain dowses the fire!
				45 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					desc = travel_events.2012.a_unscathed_desc
					root = {
						send_interface_toast = {
							type = event_toast_text_and_effect_good
							left_icon = root
							title = travel_events.2012.a_unscathed
							desc = travel_events.2012.a_unscathed_desc
							scope:guard_type_character = {
								add_character_modifier = {
									modifier = travel_local_hero_modifier
									years = 10
								}
							}		
						}
					}
				}
				#The captain dowses the fire but get scarred
				45 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					desc = travel_events.2012.a_scarred_desc
					root = {
						send_interface_toast = {
							type = event_toast_effect_neutral
							left_icon = root
							title = travel_events.2012.a_scarred
							scope:guard_type_character = {
								if = {
									limit = { 
										NOT = { has_trait = disfigured }
									}
									add_trait = disfigured
								}
								else = {
									increase_wounds_effect = { REASON = fire }
								}
								add_opinion = {
									modifier = sent_me_into_fire_opinion
									target = root
									opinion = -20
								}
								add_character_modifier = {
									modifier = travel_local_hero_modifier
									years = 10
								}
							}
						}
					}
				}
				10 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					desc = travel_events.2012.a_death_desc
					root = {
						send_interface_toast = {
							type = event_toast_effect_bad
							left_icon = root
							title = travel_events.2012.a_death
							scope:guard_type_character = {
								death = {
									death_reason = death_fire
								}
							}
						}
					}
				}
			}
		}
		#Opinion with province owner
		if = {
			limit = { exists = scope:county_liege }
			scope:county_liege = {
				add_opinion = {
					modifier = helped_during_fire_opinion
					target = root
					opinion = 20
				}
			}
		}
		#Otherwise county modifier
		else = {
			location.county = {
				add_county_modifier = {
					modifier = travel_rescued_workers_modifier
					years = 15
				}
			}
		}
		stress_impact = {
			brave = medium_stress_impact_gain
			compassionate = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			#Do we like the guard leader?
			modifier = {
				exists = scope:guard_type_character
				OR = {
					opinion = {
						target = scope:guard_type_character
						value <= low_negative_opinion
					}
					has_relation_potential_rival = scope:guard_type_character
					has_relation_rival = scope:guard_type_character
				}
				add = 50
			}
			modifier = {
				has_relation_best_friend = scope:guard_type_character
				add = -50
			}
			modifier = {
				has_trait = brave
				has_trait = arrogant
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = craven
					has_trait = paranoid
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_honor = 2
				ai_rationality = 2
				ai_boldness = -1
				ai_compassion = -1
			}
		}
	}
	#Put yourself in the flames
	option = {
		name = travel_events.2012.b
		duel = {
			skill = prowess
			value = medium_skill_rating
			#You save the workers!
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = travel_events.2012.b_unscathed_desc
				send_interface_toast = {
					type = event_toast_text_and_effect_good
					left_icon = root
					title = travel_events.2012.b_unscathed
					desc = travel_events.2012.b_unscathed_desc
					add_character_modifier = {
						modifier = travel_local_hero_modifier
						years = 10
					}
				}
				create_character_memory = {
					type = was_hero_in_the_fire_memory
				}
			}
			#You save the workers but get scarred
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = travel_events.2012.b_scarred_desc
				send_interface_toast = {
					type = event_toast_effect_bad
					left_icon = root
					title = travel_events.2012.b_scarred
					add_character_modifier = {
						modifier = travel_local_hero_modifier
						years = 10
					}
					if = {
						limit = { 
							NOT = { has_trait = disfigured }
						}
						add_trait = disfigured
						create_character_memory = {
							type = was_disfigured_in_the_fire_memory
						}
					}
					else = {
						increase_wounds_effect = { REASON = fire }
						create_character_memory = {
							type = was_wounded_in_the_fire_memory
						}
					}
				}	
			}
		}
		if = {
			limit = { exists = scope:new_memory }
			scope:new_memory = {
				set_variable = {
					name = fire_location
					value = root.location
				}
				if = {
					limit = { exists = var:fire_location }
					#To prevent 'unused except in loc' errors :catto:
				}
			}
		}
		#Opinion with province owner
		if = {
			limit = { exists = scope:county_liege }
			scope:county_liege = {
				add_opinion = {
					modifier = helped_during_fire_opinion
					target = root
					opinion = 40
				}
				progress_towards_friend_effect = {
					CHARACTER = root
					OPINION = 0
					REASON = friend_saved_workers
				}
			}
		}
		#Otherwise county modifier
		else = {
			location.county = {
				add_county_modifier = {
					modifier = travel_rescued_workers_modifier
					years = 15
				}
			}
		}
		#Local hero!
		if = {
			limit = {
				current_travel_plan = {
					any_entourage_character = { count >= 4 }
				}
			}
			#To avoid bloating the tooltip if we have a bunch of entourage members
			custom_tooltip = travel_events.2012.b_tt #Unop: Fix wrong text used, entourage will be happy about this
			hidden_effect = {
				current_travel_plan = {
					every_entourage_character = {
						limit = {
							NOR = {
								has_relation_nemesis = root
								has_trait = callous
								has_trait = greedy
							}
						}
						add_opinion = {
							modifier = local_hero_liege_opinion
							target = root
							opinion = 40
						}
					}
				}
			}
		}
		else = {
			current_travel_plan = {
				every_entourage_character = {
					limit = {
						NOR = {
							has_relation_nemesis = root
							has_trait = callous
							has_trait = greedy
						}
					}
					add_opinion = {
						modifier = local_hero_liege_opinion
						target = root
						opinion = 40
					}
				}
			}
		}
		stress_impact = {
			brave = medium_stress_impact_loss
			craven = major_stress_impact_gain
			paranoid = massive_stress_impact_gain
		}
		ai_chance = {
			base = 100
			#Do we like the guard leader?
			modifier = {
				trigger_if = {
					limit = { exists = scope:guard_type_character }
					OR = {
						opinion = {
							target = scope:guard_type_character
							value <= low_negative_opinion
						}
						has_relation_potential_rival = scope:guard_type_character
						has_relation_rival = scope:guard_type_character
					}
				}
				trigger_else = { always = no }
				add = -50
			}
			modifier = {
				trigger_if = {
					limit = { exists = scope:guard_type_character }
					has_relation_best_friend = scope:guard_type_character
				}
				trigger_else = { always = no }
				add = 50
			}
			modifier = {
				has_trait = brave
				has_trait = arrogant
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = craven
					has_trait = paranoid
				}
				factor = 0
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_honor = 2
				ai_energy = 1
				ai_rationality = 1
			}
		}
	}
	#Pillage the wreckage
	option = {
		name = travel_events.2012.c
		#If someone else owns the plantation
		if = {
			limit = { exists = scope:county_liege }
			duel = {
				skill = intrigue
				target = scope:county_liege
				#You pillage in secret
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					desc = travel_events.2012.c_secret_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_good
						left_icon = root
						title = travel_events.2012.c_secret
						desc = travel_events.2012.c_secret_desc
						add_gold = major_gold_value
						add_piety = medium_piety_loss
					}
				}
				#You get found out
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					desc = travel_events.2012.c_revealed_desc
					send_interface_toast = {
						type = event_toast_effect_bad
						left_icon = root
						right_icon = scope:county_liege
						title = travel_events.2012.c_revealed
						add_gold = major_gold_value
						add_piety = medium_piety_loss
						scope:county_liege = {
							add_opinion = {
								modifier = pillaged_my_plantation_opinion
								target = root
								opinion = -40
							}
							progress_towards_rival_effect = {
								CHARACTER = root
								OPINION = 0
								REASON = rival_pillaged_my_plantation
							}
						}
					}
				}
			}
		}
		#If we own the plantation
		else = {
			add_gold = major_gold_value
			add_piety = medium_piety_loss
			location.county = {
				add_county_modifier = {
					modifier = travel_pillaged_plantation_modifier
					years = 15
				}
			}	
		}
		#Shame on you
		if = {
			limit = {
				current_travel_plan = {
					any_entourage_character = { count >= 4 }
				}
			}
			#To avoid bloating the tooltip if we have a bunch of entourage members
			custom_tooltip = travel_events.2012.c_tt
			hidden_effect = {
				current_travel_plan = {
					every_entourage_character = {
						limit = {
							NOR = {
								has_relation_best_friend = root
								has_trait = callous
								has_trait = greedy
							}
						}
						add_opinion = {
							modifier = dishonorable_liege_opinion
							target = root
							opinion = -20
						}
					}
				}
			}
		}
		else = {
			current_travel_plan = {
				every_entourage_character = {
					limit = {
						NOR = {
							has_relation_best_friend = root
							has_trait = callous
							has_trait = greedy
						}
					}
					add_opinion = {
						modifier = dishonorable_liege_opinion
						target = root
						opinion = -20
					}
				}
			}
		}
		stress_impact = {
			honest = major_stress_impact_gain
			just = major_stress_impact_gain
			compassionate = medium_stress_impact_gain
			zealous = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			#Do we like the province owner?
			modifier = {
				exists = scope:county_liege
				OR = {
					opinion = {
						target = scope:county_liege
						value >= medium_positive_opinion
					}
					has_relation_friend = scope:county_liege
				}
				factor = 0.5
			}
			modifier = {
				exists = scope:county_liege
				OR = {
					opinion = {
						target = scope:county_liege
						value <= medium_negative_opinion
					}
					has_relation_rival = scope:county_liege
				}
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = greedy
					has_trait = arbitrary
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = honest
					has_trait = just
					has_trait = compassionate
				}
				add = -50
			}
			modifier = {
				has_trait = zealous
				add = -50
			}
			ai_value_modifier = {
				ai_greed = 3
				ai_boldness = 2
				ai_energy = 1
				ai_zeal = -2
				ai_honor = -3
			}
		}
	}
	#We were never here...
	option = {
		name = travel_events.2012.d
		flavor = travel_events.2012.d_flavor
		#Shame on you
		if = {
			limit = {
				current_travel_plan = {
					any_entourage_character = { count >= 4 }
				}
			}
			#To avoid bloating the tooltip if we have a bunch of entourage members
			custom_tooltip = travel_events.2012.d_tt
			hidden_effect = {
				current_travel_plan = {
					every_entourage_character = {
						limit = {
							NOR = {
								has_relation_best_friend = root
								has_trait = callous
							}
						}
						add_opinion = {
							modifier = fireshy_liege_opinion
							target = root
							opinion = -10
						}
					}
				}
			}
		}
		else = {
			current_travel_plan = {
				every_entourage_character = {
					limit = {
						NOR = {
							has_relation_best_friend = root
							has_trait = callous
						}
					}
					add_opinion = {
						modifier = fireshy_liege_opinion
						target = root
						opinion = -10
					}
				}
			}
		}
		location.county = {
			add_county_modifier = {
				modifier = travel_burning_plantation_modifier
				years = 15
			}
		}
		stress_impact = {
			honest = major_stress_impact_gain
			just = major_stress_impact_gain
			compassionate = medium_stress_impact_gain
			zealous = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			#Do we like the province owner?
			modifier = {
				exists = scope:county_liege
				OR = {
					opinion = {
						target = scope:county_liege
						value >= medium_positive_opinion
					}
					has_relation_friend = scope:county_liege
				}
				factor = 0.5
			}
			modifier = {
				exists = scope:county_liege
				OR = {
					opinion = {
						target = scope:county_liege
						value <= medium_negative_opinion
					}
					has_relation_rival = scope:county_liege
				}
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = craven
					has_trait = paranoid
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = callous
					has_trait = fickle
				}
				add = 50
			}
			ai_value_modifier = {
				ai_boldness = -1
				ai_energy = -2
				ai_zeal = -2
				ai_sociability = -2
				ai_honor = -3
			}
		}
	}
}

scripted_effect check_traits_apply_appropriate_effect = {
	if = {
		limit = { exists = $CHARACTER_SCOPE$ }
		$CHARACTER_SCOPE$ = {
			#We already have rough_terrain_expert
			if = {
				limit = { has_trait = rough_terrain_expert }
				#If we train ourselves
				if = {
					limit = { $CHARACTER_SCOPE$ = root }
					random_list = {
						#Become, umm.. reckless
						80 = {
							desc = travel_events.2013.a_reckless
							send_interface_toast = {
								type = event_toast_effect_good
								left_icon = root
								title = travel_events.2013.a_success.tt
								remove_short_term_gold = tiny_gold_value
								add_trait = reckless
							}
						}
						#Training fails
						20 = {
							desc = travel_events.2013.a_failed
							send_interface_toast = {
								type = event_toast_text_and_effect_bad
								left_icon = root
								title = travel_events.2013.a_failure.tt
								desc = travel_events.2013.a_failed
								remove_short_term_gold = tiny_gold_value
							}
						}
					}
				}
				#If we train the other person
				else_if = {
					limit = { 
						exists = scope:entourage_heir
						$CHARACTER_SCOPE$ = scope:entourage_heir 
					}
					random_list = {
						#Become, umm.. reckless
						80 = {
							desc = travel_events.2013.b_reckless
							root = {
								send_interface_toast = {
									type = event_toast_effect_good
									left_icon = root
									right_icon = $CHARACTER_SCOPE$
									title = travel_events.2013.a_success.tt
									remove_short_term_gold = tiny_gold_value
									$CHARACTER_SCOPE$ = { add_trait = reckless }
								}
							}
						}
						#Training fails
						20 = {
							desc = travel_events.2013.a_failed
							root = {
								send_interface_toast = {
									type = event_toast_text_and_effect_bad
									left_icon = root
									right_icon = $CHARACTER_SCOPE$
									title = travel_events.2013.a_failure.tt
									desc = travel_events.2013.a_failed
									remove_short_term_gold = tiny_gold_value
								}
							}
						}
					}
				}
				else = {
					random_list = {
						#Become, umm.. reckless
						80 = {
							desc = travel_events.2013.c_reckless
							root = {
								send_interface_toast = {
									type = event_toast_effect_good
									left_icon = root
									right_icon = $CHARACTER_SCOPE$
									title = travel_events.2013.a_success.tt
									remove_short_term_gold = tiny_gold_value
									$CHARACTER_SCOPE$ = { add_trait = reckless }
								}
							}
						}
						#Training fails
						20 = {
							desc = travel_events.2013.a_failed
							root = {
								send_interface_toast = {
									type = event_toast_text_and_effect_bad
									left_icon = root
									right_icon = $CHARACTER_SCOPE$
									title = travel_events.2013.a_failure.tt
									desc = travel_events.2013.a_failed
									remove_short_term_gold = tiny_gold_value
								}
							}
						}
					}
				}	
			}
			#We already have reckless
			else_if = {
				limit = { has_trait = reckless }
				#If we train ourselves
				if = {
					limit = { $CHARACTER_SCOPE$ = root }
					random_list = {
						#Get the trait
						80 = {
							desc = travel_events.2013.a_rough_terrain
							send_interface_toast = {
								type = event_toast_effect_good
								left_icon = root
								title = travel_events.2013.a_success.tt
								remove_short_term_gold = tiny_gold_value
								add_trait = rough_terrain_expert
							}
						}
						#Training fails
						20 = {
							desc = travel_events.2013.a_failed
							send_interface_toast = {
								type = event_toast_text_and_effect_bad
								left_icon = root
								title = travel_events.2013.a_failure.tt
								desc = travel_events.2013.a_failed
								remove_short_term_gold = tiny_gold_value
							}
						}
					}
				}
				#If we train the other person
				else_if = {
					limit = { 
						exists = scope:entourage_heir
						$CHARACTER_SCOPE$ = scope:entourage_heir 
					}
					random_list = {
						#Get the trait
						80 = {
							desc = travel_events.2013.b_rough_terrain
							root = {
								send_interface_toast = {
									type = event_toast_effect_good
									left_icon = root
									right_icon = $CHARACTER_SCOPE$
									title = travel_events.2013.a_success.tt
									remove_short_term_gold = tiny_gold_value
									$CHARACTER_SCOPE$ = { add_trait = rough_terrain_expert }
								}
							}
						}
						#Training fails
						20 = {
							desc = travel_events.2013.a_failed
							root = {
								send_interface_toast = {
									type = event_toast_text_and_effect_bad
									left_icon = root
									right_icon = $CHARACTER_SCOPE$
									title = travel_events.2013.a_failure.tt
									desc = travel_events.2013.a_failed
									remove_short_term_gold = tiny_gold_value
								}
							}
						}
					}
				}
				else = {
					random_list = {
						#Get the trait
						80 = {
							desc = travel_events.2013.c_rough_terrain
							root = {
								send_interface_toast = {
									type = event_toast_effect_good
									left_icon = root
									right_icon = $CHARACTER_SCOPE$
									title = travel_events.2013.a_success.tt
									remove_short_term_gold = tiny_gold_value
									$CHARACTER_SCOPE$ = { add_trait = rough_terrain_expert }
								}
							}
						}
						#Training fails
						20 = {
							desc = travel_events.2013.a_failed
							root = {
								send_interface_toast = {
									type = event_toast_text_and_effect_bad
									left_icon = root
									right_icon = $CHARACTER_SCOPE$
									title = travel_events.2013.a_failure.tt
									desc = travel_events.2013.a_failed
									remove_short_term_gold = tiny_gold_value
								}
							}
						}
					}
				}
			}
			#We have none of the above
			else = {
				#If we train ourselves
				if = {
					limit = { $CHARACTER_SCOPE$ = root }
					random_list = {
						#Get the trait
						80 = {
							desc = travel_events.2013.a_rough_terrain
							send_interface_toast = {
								type = event_toast_effect_good
								left_icon = root
								title = travel_events.2013.a_success.tt
								desc = travel_events.2013.a_rough_terrain
								remove_short_term_gold = tiny_gold_value
								add_trait = rough_terrain_expert
							}
						}
						#Become, umm.. reckless
						20 = {
							desc = travel_events.2013.a_reckless
							send_interface_toast = {
								type = event_toast_effect_good
								left_icon = root
								title = travel_events.2013.a_success.tt
								desc = travel_events.2013.a_reckless
								remove_short_term_gold = tiny_gold_value
								add_trait = reckless
							}
						}
					}
				}
				#If we train the other person
				else_if = {
					limit = { 
						exists = scope:entourage_heir
						$CHARACTER_SCOPE$ = scope:entourage_heir 
					}
					random_list = {
						#Get the trait
						80 = {
							desc = travel_events.2013.b_rough_terrain
							root = {
								send_interface_toast = {
									type = event_toast_effect_good
									left_icon = root
									right_icon = $CHARACTER_SCOPE$
									title = travel_events.2013.a_success.tt
									remove_short_term_gold = tiny_gold_value
									$CHARACTER_SCOPE$ = { add_trait = rough_terrain_expert }
								}
							}
						}
						#Become, umm.. reckless
						20 = {
							desc = travel_events.2013.b_reckless
							root = {
								send_interface_toast = {
									type = event_toast_effect_good
									left_icon = root
									right_icon = $CHARACTER_SCOPE$
									title = travel_events.2013.a_success.tt
									remove_short_term_gold = tiny_gold_value
									$CHARACTER_SCOPE$ = { add_trait = reckless }
								}
							}
						}
					}
				}
				else = {
					random_list = {
						#Get the trait
						80 = {
							desc = travel_events.2013.c_rough_terrain
							root = {
								send_interface_toast = {
									type = event_toast_effect_good
									left_icon = root
									right_icon = $CHARACTER_SCOPE$
									title = travel_events.2013.a_success.tt
									remove_short_term_gold = tiny_gold_value
									$CHARACTER_SCOPE$ = { add_trait = rough_terrain_expert }
								}
							}
						}
						#Become, umm.. reckless
						20 = {
							desc = travel_events.2013.c_reckless
							root = {
								send_interface_toast = {
									type = event_toast_effect_good
									left_icon = root
									right_icon = $CHARACTER_SCOPE$
									title = travel_events.2013.a_success.tt
									remove_short_term_gold = tiny_gold_value
									$CHARACTER_SCOPE$ = { add_trait = reckless }
								}
							}
						}
					}
				}
			}
		}
	}
}

#Visit a hillfort - Train to gain military skillz
travel_events.2013 = { 
	type = character_event
	title = travel_events.2013.t
	desc = {
		desc = travel_events.2013.intro
		first_valid = {
			#If we're martially trained
			triggered_desc = {
				trigger = {
					OR = {
						has_trait = strategist
						has_trait = overseer
						has_trait = gallant
					}
				}
				desc = travel_events.2013.martial
			}
			#Default
			triggered_desc = {
				desc = travel_events.2013.default
			}
		}
		desc = travel_events.2013.outro
	}
	theme = travel
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { has_trait = lunatic }
			animation = personality_irrational
		}
		animation = personality_rational
	}
	right_portrait = {
		character = scope:local_captain
		animation = personality_honorable
	}
	#Only display the potential characters to train if we need to
	lower_left_portrait = {
		trigger = { 
			exists = scope:entourage_heir 
			NOT = { 
				root = { has_character_flag = none_of_the_above }
			}
		}
		character = scope:entourage_heir
	}
	#Only display the potential characters to train if we need to
	lower_center_portrait = {
		trigger = { 
			exists = scope:guard_type_character
			NOT = { 
				root = { has_character_flag = none_of_the_above } 
			}
		}
		character = scope:guard_type_character
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling_adult = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = { 
			has_building_or_higher = hill_forts_01
		}
	}
	weight_multiplier = {
		base = 1
		#Higher chance if it's _your_ hillfort
		modifier = {
			location.county.holder = root
			factor = 2
		}
		#Higher chance if you're martially trained
		modifier = {
			OR = {
				has_trait = strategist
				has_trait = overseer
				has_trait = gallant
			}
			factor = 2
		}
	}
	immediate = {
		mp_delay_travel_plan = { DAYS = 90 }
		#Save the scopes for easy reference
		current_travel_plan = {
			random_entourage_character = {
				limit = { 
					is_guard_type_character_trigger = yes
					court_owner = root
				}
				weight = {
					base = 1
					modifier = {
						is_of_major_interest_to_root_trigger = yes
						add = 10
					}
				}
				save_scope_as = guard_type_character
			}
			every_entourage_character = {
				limit = {
					is_heir_of = root
					is_available_travelling = yes
					is_adult = yes
					NOT = { scope:guard_type_character ?= this }
				}
				add_to_list = potential_entourage_heirs
			}
		}
		random_in_list = {
			list = potential_entourage_heirs
			limit = { is_primary_heir_of = root }
			alternative_limit = { always = yes }
			save_scope_as = entourage_heir
		}
		#Let's try to find a suitable person in pool first
		random_pool_character = {
			province = root.location
			limit = {
				is_available_healthy_adult = yes
				martial >= medium_skill_rating
				prowess >= medium_skill_rating
				2003_lowborn_pool_person_trigger = yes
			}
			save_scope_as = local_captain
		}
		#Otherwise create someone
		if = {
			limit = { NOT = { exists = scope:local_captain } }
			create_character = {
				template = new_warrior_character
				culture = root.location.county.culture
				faith = root.location.county.faith
				gender_female_chance = location.county.holder.root_soldier_female_chance
				location = root.location
				save_scope_as = local_captain
			}
			scope:local_captain = { add_character_flag = created_captain }
		}
		#Check if we need the fallback option
		if = {
			limit = {
				has_trait = rough_terrain_expert
				OR = {
					has_trait = reckless
					has_trait = cautious_leader
				}
				trigger_if = {
					limit = { exists = scope:entourage_heir }
					scope:entourage_heir = {
						has_trait = rough_terrain_expert
						OR = {
							has_trait = reckless
							has_trait = cautious_leader
						}
					}
				}
				trigger_if = {
					limit = { exists = scope:guard_type_character }
					scope:guard_type_character = {
						has_trait = rough_terrain_expert
						OR = {
							has_trait = reckless
							has_trait = cautious_leader
						}
					}
				}
			}
			add_character_flag = {
				flag = none_of_the_above
				days = 5
			}
		}
		scope:local_captain = {
			add_character_flag = wear_armor
		}	
	}
	#Stay and train for the rough_terrain_expert trait!
	option = {
		name = travel_events.2013.a
		trigger = {
			NAND = {
				has_trait = rough_terrain_expert
				OR = {
					has_trait = reckless
					has_trait = cautious_leader
				}
			}
		}
		#Run the effect
		check_traits_apply_appropriate_effect = { CHARACTER_SCOPE = root }
		current_travel_plan = {
			delay_travel_plan = { days = 7 }
		}
		stress_impact = {
			impatient = medium_stress_impact_gain
			lazy = medium_stress_impact_gain
			athletic = medium_stress_impact_loss
			greedy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			#Do we dislike the other two?
			modifier = {
				trigger_if = {
					limit = { 
						exists = scope:entourage_heir
						exists = scope:guard_type_character
					}
					OR = {
						opinion = {
							target = scope:entourage_heir
							value <= low_negative_opinion
						}
						has_relation_potential_rival = scope:entourage_heir
						has_relation_rival = scope:entourage_heir
					}
					OR = {
						opinion = {
							target = scope:guard_type_character
							value <= low_negative_opinion
						}
						has_relation_potential_rival = scope:guard_type_character
						has_relation_rival = scope:guard_type_character
					}
				}
				trigger_else = {
					always = no
				}
				add = 100
			}
			#Do we dislike the heir?
			modifier = {
				trigger_if = {
					limit = { 
						exists = scope:entourage_heir 
						NOT = { exists = scope:guard_type_character }
					}
					OR = {
						opinion = {
							target = scope:entourage_heir
							value <= low_negative_opinion
						}
						has_relation_potential_rival = scope:entourage_heir
						has_relation_rival = scope:entourage_heir
					}
				}
				trigger_else = {
					always = no
				}
				add = 100
			}
			#Do we dislike the guard leader?
			modifier = {
				trigger_if = {
					limit = { 
						exists = scope:guard_type_character 
						NOT = { exists = scope:entourage_heir }
					}
					OR = {
						opinion = {
							target = scope:guard_type_character
							value <= low_negative_opinion
						}
						has_relation_potential_rival = scope:guard_type_character
						has_relation_rival = scope:guard_type_character
					}
				}
				trigger_else = {
					always = no
				}
				add = 100
			}
			modifier = {
				OR = {
					has_trait = education_martial_1
					has_trait = education_martial_2
					has_trait = education_martial_3
					has_trait = education_martial_4
					has_trait = education_martial_5
				}
				factor = 1.5
			}
			modifier = {
				OR = {
					has_trait = lazy
					has_trait = arrogant
				}
				factor = 0.5
			}
			ai_value_modifier = {
				ai_energy = 2
				ai_boldness = 2
				ai_zeal = 1
				ai_rationality = 1
			}
			modifier = {
				factor = 0
				gold <= major_gold_value
			}
		}
	}
	#Make your heir train
	option = {
		name = travel_events.2013.b
		trigger = { 
			exists = scope:entourage_heir
			scope:entourage_heir = {
				NOR = {
					has_trait = rough_terrain_expert
					has_trait = reckless
					has_trait = cautious_leader
				}
			}
		}
		#Run the effect
		check_traits_apply_appropriate_effect = { CHARACTER_SCOPE = scope:entourage_heir }
		current_travel_plan = {
			delay_travel_plan = { days = 7 }
		}
		stress_impact = {
			greedy = medium_stress_impact_gain
			impatient = minor_stress_impact_gain
			family_first = minor_stress_impact_loss
			generous = minor_stress_impact_loss
		}
		ai_chance = {
			base = 50
			#Do we like the heir?
			modifier = {
				OR = {
					opinion = {
						target = scope:entourage_heir
						value >= low_positive_opinion
					}
					has_relation_potential_friend = scope:entourage_heir
					has_relation_friend = scope:entourage_heir
				}
				add = 50
			}
			modifier = {
				scope:entourage_heir = { is_child_of = root }
				add = 50
			}
			modifier = {
				scope:entourage_heir = { is_child_of = root }
				has_trait = family_first
				factor = 2
			}
			modifier = {
				scope:entourage_heir = {
					OR = {
						has_trait = education_martial_1
						has_trait = education_martial_2
						has_trait = education_martial_3
						has_trait = education_martial_4
						has_trait = education_martial_5
					}
				}
				add = 50
			}
			ai_value_modifier = {
				ai_sociability = 2
				ai_rationality = 2
				ai_compassion = 1
				ai_boldness = -1
				ai_energy = -2
			}
			modifier = {
				factor = 0
				gold <= major_gold_value
			}
		}
	}
	#Make your guard_type_character train
	option = {
		name = travel_events.2013.c
		trigger = { 
			exists = scope:guard_type_character
			trigger_if = {
				limit = { exists = scope:entourage_heir }
				scope:guard_type_character != scope:entourage_heir
			}
			scope:guard_type_character = {
				NOR = {
					has_trait = rough_terrain_expert
					has_trait = reckless
					has_trait = cautious_leader
				}
			}
		}
		#Run the effect
		check_traits_apply_appropriate_effect = { CHARACTER_SCOPE = scope:guard_type_character }
		current_travel_plan = {
			delay_travel_plan = { days = 7 }
		}
		stress_impact = {
			greedy = medium_stress_impact_gain
			impatient = minor_stress_impact_gain
			generous = minor_stress_impact_loss
		}
		ai_chance = {
			base = 50
			#Do we like the guard leader?
			modifier = {
				OR = {
					opinion = {
						target = scope:guard_type_character
						value >= low_positive_opinion
					}
					has_relation_potential_friend = scope:guard_type_character
					has_relation_friend = scope:guard_type_character
					has_relation_best_friend = scope:guard_type_character
				}
				add = 50
			}
			modifier = {
				scope:guard_type_character = {
					has_court_position = bodyguard_court_position
				}
				factor = 2
			}
			modifier = {
				scope:guard_type_character = {
					has_court_position = akolouthos_court_position
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_sociability = 2
				ai_rationality = 2
				ai_compassion = 1
				ai_boldness = -1
				ai_energy = -2
			}
			modifier = {
				factor = 0
				gold <= major_gold_value
			}
		}
	}
	#Fallback option if everyone is buff with traits
	option = {
		name = travel_events.2013.d
		trigger = { has_character_flag = none_of_the_above }
		#Taking in the views
		add_character_modifier = {
			modifier = travel_taking_in_the_views_modifier
			years = 5
		}
		current_travel_plan = {
			delay_travel_plan = { days = 3 }
		}
		stress_impact = {
			impatient = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				has_trait = impatient
				add = -50
			}
			ai_value_modifier = {
				ai_energy = 2
				ai_boldness = 2
				ai_zeal = 1
				ai_rationality = 1
			}
		}
	}
	#Nah
	option = {
		name = travel_events.2013.e
		stress_impact = {
			brave = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				has_trait = brave
				factor = 0.5
			}
			modifier = {
				has_trait = impatient
				factor = 2
			}
			ai_value_modifier = {
				ai_boldness = -1
				ai_energy = -2
			}
		}
	}
	after = {
		mp_resume_travel_plan = yes
		scope:local_captain = {
			if = {
				limit = {
					has_character_flag = created_captain
					root = { is_ai = yes }
				}
				remove_character_flag = wear_armor
				silent_disappearance_effect = yes
			}
		}
	}
}

#Visit a logging camp - Burn off some stress chopping wood
travel_events.2014 = { 
	type = character_event
	title = travel_events.2014.t
	desc = travel_events.2014.desc
	theme = travel
	left_portrait = {
		character = root
		animation = aggressive_axe
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = { 
			has_building_or_higher = logging_camps_01
		}
	}
	weight_multiplier = {
		base = 1
		#Higher chance if we're stressed
		modifier = {
			stress_level >= 1 
			factor = 2
		}
	}
	immediate = {
		random_list = {
			50 = {
				trigger = {
					NOT = { has_trait = maimed }
				}
				add_character_flag = 2014_maimed
			}
			50 = {
				trigger = {
					NOT = { has_trait = one_legged }
				}
				add_character_flag = 2014_one_legged
			}
		}
	}
	#Take the swing!
	option = {
		name = travel_events.2014.a
		if = {
			limit = {
				is_adult = yes
			}
			duel = {
				skill = prowess
				value = medium_skill_rating
				#You let off a lot of steam!
				25 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = 10
					}
					desc = travel_events.2014.a_great_stress_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_good
						left_icon = root
						title = travel_events.2014.a_stress_tt
						desc = travel_events.2014.a_great_stress_desc
						stress_impact = {
							base = massive_stress_impact_loss
						}
					}
				}
				#You chop alright
				70 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					desc = travel_events.2014.a_stress_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_good
						left_icon = root
						title = travel_events.2014.a_stress_tt
						desc = travel_events.2014.a_stress_desc
						add_character_modifier = {
							modifier = travel_sore_muscles_modifier
							years = 2
						}
						stress_impact = {
							base = medium_stress_impact_loss
						}
					}
				}
				#You hurt yourself
				##Maimed
				2 = {
					trigger = { has_character_flag = 2014_maimed }
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = 5
					}
					desc = travel_events.2014.a_injured_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_bad
						left_icon = root
						title = travel_events.2014.a_injured_tt
						desc = travel_events.2014.a_injured_desc
						apply_maimed_trait_and_modifier_effect = yes
					}
				}
				##One-legged
				2 = {
					trigger = { has_character_flag = 2014_one_legged }
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = 5
					}
					desc = travel_events.2014.a_injured_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_bad
						left_icon = root
						title = travel_events.2014.a_injured_tt
						desc = travel_events.2014.a_injured_desc
						add_trait = one_legged
					}
				}
				##Wounded
				5 = {
					trigger = { 
						NOR = {
							has_character_flag = 2014_maimed
							has_character_flag = 2014_one_legged
						}
					}
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = 5
					}
					desc = travel_events.2014.a_injured_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_bad
						left_icon = root
						title = travel_events.2014.a_injured_tt
						desc = travel_events.2014.a_injured_desc
						increase_wounds_effect = { REASON = axe }
					}
				}
			}
		}
		#Children would have a higher chance of hurting themselves
		else = {
			duel = {
				skill = prowess
				value = medium_skill_rating
				#You let off a lot of steam!
				20 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					desc = travel_events.2014.a_great_stress_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_good
						left_icon = root
						title = travel_events.2014.a_stress_tt
						desc = travel_events.2014.a_great_stress_desc
						stress_impact = {
							base = massive_stress_impact_loss
						}
					}
				}
				#You chop alright
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					desc = travel_events.2014.a_stress_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_good
						left_icon = root
						title = travel_events.2014.a_stress_tt
						desc = travel_events.2014.a_stress_desc
						add_character_modifier = {
							modifier = travel_sore_muscles_modifier
							years = 5
						}
						stress_impact = {
							base = medium_stress_impact_loss
						}
					}
				}
				#You hurt yourself
				##Maimed
				30 = {
					trigger = { has_character_flag = 2014_maimed }
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = 5
					}
					desc = travel_events.2014.a_injured_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_bad
						left_icon = root
						title = travel_events.2014.a_injured_tt
						desc = travel_events.2014.a_injured_desc
						apply_maimed_trait_and_modifier_effect = yes
					}
				}
				##One-legged
				30 = {
					trigger = { has_character_flag = 2014_one_legged }
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = 5
					}
					desc = travel_events.2014.a_injured_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_bad
						left_icon = root
						title = travel_events.2014.a_injured_tt
						desc = travel_events.2014.a_injured_desc
						add_trait = one_legged
					}
				}
				##Wounded
				30 = {
					trigger = { 
						NOR = {
							has_character_flag = 2014_maimed
							has_character_flag = 2014_one_legged
						}
					}
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = 5
					}
					desc = travel_events.2014.a_injured_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_bad
						left_icon = root
						title = travel_events.2014.a_injured_tt
						desc = travel_events.2014.a_injured_desc
						increase_wounds_effect = { REASON = axe }
					}
				}
			}
		}
		stress_impact = {
			craven = medium_stress_impact_gain
			lazy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				stress_level >= 1
				add = 50
			}
			modifier = {
				stress_level >= 2
				add = 100
			}
			modifier = {
				stress_level >= 3
				add = 150
			}
			modifier = {
				prowess >= high_skill_rating
				add = 50
			}
			modifier = {
				is_adult = no
				factor = 0.5
			}
			modifier = {
				has_trait = brave
				has_trait = arrogant
				factor = 2
			}
			ai_value_modifier = {
				ai_energy = 2
				ai_boldness = 2
			}
		}
	}
	#Nah
	option = {
		name = travel_events.2014.b
		stress_impact = {
			athletic = minor_stress_impact_gain
			brave = minor_stress_impact_gain
			arrogant = minor_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				has_trait = craven
				add = -50
			}
			modifier = {
				stress_level < 1
				factor = 0.5
			}
			ai_value_modifier = {
				ai_energy = -2
				ai_boldness = -3
			}
		}
	}
	after = {
		remove_character_flag = 2014_maimed
		remove_character_flag = 2014_one_legged
	}
}

#Visit a peat quarry - Try not to fall asleep
travel_events.2015 = { 
	type = character_event
	title = travel_events.2015.t
	desc = travel_events.2015.desc
	theme = travel
	left_portrait = {
		character = root
		animation = boredom
	}
	right_portrait = {
		character = scope:quarry_guide
		animation = ecstasy
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = { 
			has_building_or_higher = peat_quarries_01
		}
	}
	immediate = {
		#Save the scope for easy reference
		location.county.holder = {
			if = {
				limit = {
					this != root
					is_available_adult = yes
				}
				save_scope_as = quarry_guide
			}	
		}
		if = {
			limit = { 
				NOT = { exists = scope:quarry_guide }
			}
			if = {
				limit = {
					any_pool_character = {
						province = root.location
						is_available_healthy_adult = yes
					}
				}
				random_pool_character = {
					province = root.location
					limit = {
						is_available_healthy_adult = yes
					}
					save_scope_as = quarry_guide
				}
			}
			#Otherwise create someone
			else = {
				create_character = {
					template = generic_peasant_character
					culture = location.county.holder.culture
					faith = location.county.holder.faith
					location = root.location
					save_scope_as = quarry_guide
				}
				scope:quarry_guide = {
					add_character_flag = created_guide
				}
			}
		}
	}
	#I was NOT sleeping!
	option = {
		name = travel_events.2015.a
		#Diplomacy check against the province owner
		if = {
			limit = {
				location.county.holder != root
			}
			duel = {
				skill = diplomacy
				target = scope:quarry_guide
				#You convince them
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					modifier = {
						is_adult = no
						add = 25
					}
					desc = travel_events.2015.a_convinced_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_good
						left_icon = root
						right_icon = scope:quarry_guide
						title = travel_events.2015.a_convinced_tt
						desc = travel_events.2015.a_convinced_desc
						reverse_add_opinion = {
							modifier = grateful_opinion
							target = scope:quarry_guide
							opinion = 30
						}
					}
				}
				#You insulted them
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					desc = travel_events.2015.a_insulted_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_bad
						left_icon = root
						right_icon = scope:quarry_guide
						title = travel_events.2015.a_insulted_tt
						desc = travel_events.2015.a_insulted_desc
						reverse_add_opinion = {
							modifier = insulted_opinion
							target = scope:quarry_guide
							opinion = -30
						}
					}
				}
			}
		}
		#No province owner
		else = {
			duel = {
				skill = diplomacy
				value = medium_skill_rating
				#You convince them
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					modifier = {
						is_adult = no
						add = 25
					}
					desc = travel_events.2015.a_convinced_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_good
						left_icon = root
						right_icon = location.county
						title = travel_events.2015.a_convinced_tt
						desc = travel_events.2015.a_convinced_desc
						location.county = {
							add_county_modifier = {
								modifier = travel_appreciated_quarry_modifier
								years = 10
							}
						}
					}
				}
				#You insulted them
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					desc = travel_events.2015.a_insulted_desc
					send_interface_toast = {
						type = event_toast_text_and_effect_bad
						left_icon = root
						right_icon = location.county
						title = travel_events.2015.a_insulted_tt
						desc = travel_events.2015.a_insulted_desc
						location.county = {
							add_county_modifier = {
								modifier = travel_insulted_quarry_modifier
								years = 10
							}
						}
					}
				}
			}
		}
		stress_impact = {
			honest = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				trigger_if = {
					limit = {
						location.county.holder != root
					}
					diplomacy >= scope:quarry_guide.diplomacy
				}
				trigger_else = {
					diplomacy >= high_skill_rating
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = brave
					has_trait = arrogant
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_greed = 3
				ai_boldness = 2
			}
		}
	}
	#Bribery!
	option = {
		name = travel_events.2015.b
		flavor = travel_events.2015.b_flavor
		if = {
			limit = {
				location.county.holder != root
			}
			pay_short_term_gold = {
				target = scope:quarry_guide
				gold = medium_gold_value
			}
		}
		else = {
			remove_short_term_gold = medium_gold_value
		}
		stress_impact = {
			greedy = medium_stress_impact_gain
			brave = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				has_trait = greedy
			}
			modifier = {
				has_trait = craven
				add = 50
			}
			ai_value_modifier = {
				ai_rationality = 1
				ai_greed = -3
			}
			modifier = {
				factor = 0
				gold <= major_gold_value
			}
		}
	}
	after = {
		scope:quarry_guide = {
			if = {
				limit = { has_character_flag = created_guide }
				silent_disappearance_effect = yes
			}
		}
	}
}

#Visit a hill farm - Bull rush!
travel_events.2016 = { 
	type = character_event
	title = travel_events.2016.t
	desc = travel_events.2016.desc
	theme = travel_danger
	left_portrait = {
		character = root
		animation = disbelief
	}
	right_portrait = {
		character = scope:entourage_member
		animation = fear
	}
	lower_left_portrait = {
		trigger = { exists = scope:guard_type_character }
		character = scope:guard_type_character
	}
	cooldown = { years = 10 }
	trigger = {
		OR = {
			is_available_travelling_adult = yes
			#Check for an appropriate guard_leader if you're a child
			AND = {
				is_available_travelling = yes
				current_travel_plan = {
					any_entourage_character = { is_guard_type_character_trigger = yes }
				}
			}
		}
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = { 
			has_building_or_higher = hill_farms_01
		}
		current_travel_plan = {
			any_entourage_character = {
				count > 1
				age > 10
			}
		}
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium }
		#Dummy bull loc
		dummy_male = {
			save_scope_as = bull_loc
		}
		#Save the scopes for easy reference
		current_travel_plan = {
			if = {
				limit = {
					any_entourage_character = { is_guard_type_character_trigger = yes }
				}
				random_entourage_character = {
					limit = { is_guard_type_character_trigger = yes }
					weight = {
						base = 1
						modifier = {
							NOT = { 
								is_of_major_or_minor_interest_trigger = { CHARACTER = root }
							}
							add = 10
						}
						modifier = {
							OR = {
								has_trait = brave
								prowess >= medium_skill_rating
							}
							add = 10
						}
					}
					save_scope_as = guard_type_character
				}
				random_entourage_character = {
					#Adults first
					limit = {
						this != scope:guard_type_character
						is_adult = yes
					}
					#Then kids
					alternative_limit = {
						this != scope:guard_type_character
						is_adult = no
						age > 10
					}
					save_scope_as = entourage_member
				}
			}
			else = {
				random_entourage_character = {
					#Adults first
					limit = { is_adult = yes }
					#Then kids
					alternative_limit = { 
						is_adult = no
						age > 10
					}
					save_scope_as = entourage_member
				}
			}
		}
	}
	#Get in the fray!
	option = {
		name = travel_events.2016.a
		trigger = { is_adult = yes }
		duel = {
			skills = { prowess learning }
			value = medium_skill_rating
			#One bull; captured
			60 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				modifier = {
					has_trait = athletic
					add = 10
				}
				desc = travel_events.2016.a_captured.desc
				send_interface_toast = {
					type = event_toast_effect_good
					left_icon = root
					title = travel_events.2016.a_captured.tt
					add_character_modifier = {
						modifier = travel_bull_fighter_modifier
						years = 10
					}
					stress_impact = {
						base = medium_stress_impact_loss
					}
				}
			}
			#Captured bull but wounded
			40 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = travel_events.2016.a_wounded.desc
				send_interface_toast = {
					type = event_toast_effect_bad
					left_icon = root
					title = travel_events.2016.a_wounded.tt
					if = {
						limit = { has_trait = maimed }
						increase_wounds_effect = { REASON = bull_charge }
					}
					else = {
						apply_maimed_trait_and_modifier_effect = yes
					}
					stress_impact = {
						base = medium_stress_impact_gain
					}
				}
			}
		}
		scope:entourage_member = {
			add_opinion = {
				modifier = saved_me_from_bull_opinion
				target = root
				opinion = 20
			}
			progress_towards_friend_effect = {
				CHARACTER = root
				OPINION = 0
				REASON = friend_saved_me_from_bull
			}
		}
		create_character_memory = {
			type = saved_someone_from_a_bull_memory
			participants = {
				victim = scope:entourage_member
			}
		}
		if = {
			limit = { exists = scope:new_memory }
			scope:new_memory = {
				set_variable = {
					name = bull_location
					value = root.location
				}
				if = {
					limit = { exists = var:bull_location }
					#To prevent 'unused except in loc' errors :catto:
				}
			}
		}
		stress_impact = {
			brave = medium_stress_impact_loss
			craven = major_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				trigger_if = {
					limit = {
						NOT = { exists = scope:guard_type_character }
					}
					OR = {
						opinion = {
							target = scope:entourage_member
							value >= medium_positive_opinion
						}
						has_relation_friend = scope:entourage_member
						has_relation_lover = scope:entourage_member
						has_relation_soulmate = scope:entourage_member
					}
				}
				trigger_else = {
					always = no
				}
				add = 100
			}
			modifier = {
				trigger_if = {
					limit = { exists = scope:guard_type_character }
					OR = {
						has_relation_best_friend = scope:guard_type_character
						has_relation_soulmate = scope:guard_type_character
					}
				}
				trigger_else = {
					always = no
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = brave
					has_trait = athletic
				}
				add = 50
			}
			modifier = {
				has_trait = craven
				factor = 0.5
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_energy = 2
			}
		}
	}
	#Please take the guard leader instead
	option = {
		name = travel_events.2016.b
		trigger = { exists = scope:guard_type_character }
		scope:guard_type_character = {
			duel = {
				skill = prowess
				value = medium_skill_rating
				#One bull; dead
				60 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					modifier = {
						has_trait = athletic
						add = 10
					}
					desc = travel_events.2016.b_putdown.desc
					root = {
						send_interface_toast = {
							type = event_toast_effect_good
							left_icon = root
							right_icon = scope:guard_type_character
							title = travel_events.2016.b_putdown.tt
							scope:guard_type_character = {
								add_character_modifier = {
									modifier = travel_bull_fighter_modifier
									years = 10
								}
							}
						}
					}
				}
				#Dead bull but wounded
				40 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					desc = travel_events.2016.b_wounded.desc
					root = {
						send_interface_toast = {
							type = event_toast_effect_bad
							left_icon = root
							right_icon = scope:guard_type_character
							title = travel_events.2016.a_wounded.tt
							scope:guard_type_character = {
								if = {
									limit = { has_trait = maimed }
									increase_wounds_effect = { REASON = bull_charge }
								}
								else = {
									apply_maimed_trait_and_modifier_effect = yes
								}
								add_opinion = {
									modifier = bull_rushed_opinion
									target = root
									opinion = -20
								}
							}
						}
					}
				}
			}
		}
		stress_impact = {
			brave = medium_stress_impact_gain
			compassionate = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					opinion = {
						target = scope:guard_type_character
						value <= low_negative_opinion
					}
					has_relation_potential_rival = scope:guard_type_character
					has_relation_rival = scope:guard_type_character
				}
				add = 100
			}
			modifier = {
				has_trait = craven
				factor = 2
			}
			ai_value_modifier = {
				ai_rationality = 3
				ai_boldness = -1
				ai_compassion = -1
			}
		}
	}
	#Let's not risk it
	option = {
		name = travel_events.2016.c
		scope:entourage_member = {
			duel = {
				skill = prowess
				value = medium_skill_rating
				#One bull; avoided
				60 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					desc = travel_events.2016.c_escaped.desc
					root = {
						send_interface_toast = {
							type = event_toast_text_and_effect_neutral
							left_icon = root
							right_icon = scope:entourage_member
							title = travel_events.2016.c_escaped.tt
							desc = travel_events.2016.c_escaped.desc
							scope:entourage_member = {
								add_opinion = {
									modifier = bull_rushed_opinion
									target = root
									opinion = -10
								}
							}
						}
					}
				}
				#Avoided but wounded
				40 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					desc = travel_events.2016.c_wounded.desc
					root = {
						send_interface_toast = {
							type = event_toast_effect_bad
							left_icon = root
							right_icon = scope:entourage_member
							title = travel_events.2016.a_wounded.tt
							scope:entourage_member = {
								if = {
									limit = { has_trait = maimed }
									increase_wounds_effect = { REASON = bull_charge }
								}
								else = {
									apply_maimed_trait_and_modifier_effect = yes
								}
								add_opinion = {
									modifier = bull_rushed_opinion
									target = root
									opinion = -40
								}
								progress_towards_rival_effect = {
									CHARACTER = root
									OPINION = 0
									REASON = rival_left_me_for_the_bull
								}
							}
						}
					}
				}
			}
		}
		#You just let a kid get bull rushed
		if = {
			limit = {
				scope:entourage_member = { is_adult = no }
			}
			add_dread = medium_dread_gain
		}
		stress_impact = {
			brave = major_stress_impact_gain
			compassionate = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			#Do we like the entourage member?
			modifier = {
				OR = {
					opinion = {
						target = scope:entourage_member
						value <= low_negative_opinion
					}
					has_relation_potential_rival = scope:entourage_member
					has_relation_rival = scope:entourage_member
				}
				add = 100
			}
			modifier = {
				trigger_if = {
					limit = { exists = scope:guard_type_character }
					OR = {
						has_relation_best_friend = scope:guard_type_character
						has_relation_soulmate = scope:guard_type_character
					}
				}
				trigger_else = {
					always = no
				}
				add = 50
			}
			modifier = {
				has_trait = brave
				factor = 0.5
			}
			modifier = {
				has_trait = craven
				factor = 2
			}
			ai_value_modifier = {
				ai_boldness = -1
				ai_compassion = -2
				ai_honor = -2
			}
		}
	}
}

scripted_trigger is_far_gone_murder_scheme_trigger = {
	scheme_type = murder
	save_temporary_scope_as = scheme
	scheme_progress > scheme_progress_50 
	is_scheme_exposed = no
	scheme_target_character = root
}

#Visit a 'haunted' mansion (farm estates) - Enter at your own peril
travel_events.2017 = { 
	type = character_event
	title = travel_events.2017.t
	desc = travel_events.2017.desc
	theme = travel
	override_background = { reference = council_chamber }
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { has_trait = brave }
			animation = personality_bold
		}
		animation = worry
	}
	right_portrait = {
		character = scope:estate_character
		animation = personality_content
	}
	#Portraits to denote that you're in a group
	lower_left_portrait = {
		trigger = { exists = scope:entourage_member_one }
		character = scope:entourage_member_one
	}
	lower_center_portrait = {
		trigger = { exists = scope:entourage_member_two }
		character = scope:entourage_member_two
	}
	lower_right_portrait = {
		trigger = { exists = scope:entourage_member_three }
		character = scope:entourage_member_three
	}
	#This should be fairly rare
	cooldown = { years = 40 }
	trigger = {
		is_available_travelling = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = { 
			has_building_or_higher = farm_estates_01
		}
		current_travel_plan = {
			any_entourage_character = {
				count > 2
			}
		}
		NOT = { has_character_flag = had_travel_farm_estate_event_recently }
		faith.religion = {
			is_in_family = rf_abrahamic
		}
	}
	immediate = {
		#Save scope for easy access
		location.county.holder = {
			save_scope_as = county_liege
		}
		#Find a potential far-gone murder scheme owned by the county.holder
		if = {
			limit = {
				scope:county_liege != root
				scope:county_liege = {
					any_scheme = { is_far_gone_murder_scheme_trigger = yes }
				}
			}
			scope:county_liege = {
				random_scheme = {
					limit = { is_far_gone_murder_scheme_trigger = yes }
					save_scope_as = scheme_to_expose
				}
			}
		}
		#Or if we're the county.holder, find a far-gone murder scheme at court
		if = {
			limit = { scope:county_liege = root }
			random_list = {
				1 = {
					trigger = {
						any_vassal_or_below = {
							any_scheme = { is_far_gone_murder_scheme_trigger = yes }
						}
					}
					random_vassal_or_below = {
						limit = {
							any_scheme = { is_far_gone_murder_scheme_trigger = yes }
						}
						random_scheme = {
							limit = { is_far_gone_murder_scheme_trigger = yes }
							save_scope_as = scheme_to_expose
						}
					}
				}
				1 = {
					trigger = {
						any_close_or_extended_family_member = {
							is_in_the_same_court_as = root
							any_scheme = { is_far_gone_murder_scheme_trigger = yes }
						}
					}
					random_close_or_extended_family_member = {
						limit = {
							is_in_the_same_court_as = root
							any_scheme = { is_far_gone_murder_scheme_trigger = yes }
						}
						random_scheme = {
							limit = { is_far_gone_murder_scheme_trigger = yes }
							save_scope_as = scheme_to_expose
						}
					}
				}
			}
		}
		#Find a suitable shady estate owner
		if = {
			limit = {
				any_pool_character = {
					province = root.location
					is_available_healthy_adult = yes
					has_trait = deceitful
					2003_lowborn_pool_person_trigger = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = {
					is_available_healthy_adult = yes
					has_trait = deceitful
					2003_lowborn_pool_person_trigger = yes
				}
				save_scope_as = estate_character
			}	
		}
		#Otherwise create someone
		else = {
			create_character = {
				template = estate_owner_character
				culture = location.county.holder.culture
				faith = location.county.holder.faith
				location = root.location
				save_scope_as = estate_character
			}
			scope:estate_character = { add_character_flag = created_estate_character }	
		}
		#Save scopes for portraits
		current_travel_plan = {
			random_entourage_character = {
				limit = {
					is_available_travelling = yes
					#For the pack resolution; shouldn't have children punching adults
					is_adult = yes
				}
				save_scope_as = entourage_member_one
			}
			random_entourage_character = {
				limit = {
					is_available_travelling = yes
					this != scope:entourage_member_one
				}
				save_scope_as = entourage_member_two
			}
			random_entourage_character = {
				limit = {
					is_available_travelling = yes
					NOR = {
						this = scope:entourage_member_one
						this = scope:entourage_member_two
					}
				}
				save_scope_as = entourage_member_three
			}
		}
		#Cooldown between estate events
		add_character_flag = {
			flag = had_travel_farm_estate_event_recently
			years = 5
		}
	}
	#Enter the 'haunted mansion'
	option = {
		name = travel_events.2017.a
		custom_tooltip = travel_events.2017.a_tt
		trigger_event = travel_events.2018
		stress_impact = {
			craven = minor_stress_impact_gain
			paranoid = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			#Do we feel lucky, punk?
			modifier = {
				OR = {
					has_trait = brave
					has_trait = arrogant
					has_trait = trusting
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_energy = 1
				ai_rationality = 1
			}
		}
	}
	#N-no thank you
	option = {
		name = travel_events.2017.b
		custom_tooltip = travel_events.2017.b_tt
		add_prestige = medium_prestige_loss
		stress_impact = {
			brave = medium_stress_impact_gain
			arrogant = medium_stress_impact_gain
		}
		scope:estate_character = {
			if = {
				limit = { has_character_flag = created_estate_character }
				silent_disappearance_effect = yes
			}
		}
		ai_chance = {
			base = 100
			#They might be scheming against us
			modifier = {
				trigger_if = {
					limit = {
						location.county.holder != root
					}
					has_relation_potential_rival = location.county.holder
					has_relation_rival = location.county.holder
				}
			}
			modifier = {
				OR = {
					has_trait = brave
					has_trait = arrogant
				}
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = craven
					has_trait = paranoid
					has_trait = impatient
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_energy = -1
				ai_rationality = -1
				ai_boldness = -2
			}
		}
	}
}

#Go with the pack or explore on your own?
travel_events.2018 = { 
	type = character_event
	title = travel_events.2018.t
	desc = travel_events.2018.desc
	theme = travel
	override_background = { reference = corridor_night }
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { has_trait = lunatic }
			animation = personality_irrational
		}
		triggered_animation = {
			trigger = { has_trait = brave }
			animation = personality_rational
		}
		animation = personality_coward
	}
	right_portrait = {
		character = scope:estate_character
		animation = personality_dishonorable
	}
	#Portraits for atmosphere
	lower_left_portrait = {
		trigger = { exists = scope:entourage_member_one }
		character = scope:entourage_member_one
	}
	lower_center_portrait = {
		trigger = { exists = scope:entourage_member_two }
		character = scope:entourage_member_two
	}
	lower_right_portrait = {
		trigger = { exists = scope:entourage_member_three }
		character = scope:entourage_member_three
	}

	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small }
	}

	#Go with the pack
	option = {
		name = travel_events.2018.a
		custom_tooltip = travel_events.2018.a_tt
		add_character_flag = went_with_the_pack
		trigger_event = travel_events.2022
		stress_impact = {
			brave = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			craven = minor_stress_impact_loss
			paranoid = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = brave
					has_trait = arrogant
				}
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = craven
					has_trait = paranoid
					has_trait = gregarious
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_sociability = 2
				ai_rationality = 2
				ai_boldness = -1
			}
		}
	}
	#Explore on your own
	option = {
		name = travel_events.2018.b
		custom_tooltip = travel_events.2018.b_tt
		hidden_effect = {
			random_list = {
				#Get spooked
				60 = {
					trigger_event = travel_events.2022
				}
				#Find a shiny bauble
				30 = { 
					add_character_flag = bauble_find
					trigger_event = travel_events.2021
				}
				#Meet a witch
				5 = { 
					modifier = {
						OR = {
							has_trait_rank = {
								trait = wounded
								rank = 1
							}
							has_trait_rank = {
								trait = wounded
								rank = 2
							}
							has_trait_rank = {
								trait = wounded
								rank = 3
							}
							has_trait = infirm
							is_witch_trigger = yes
						}
						add = 25
					}
					add_character_flag = mendicant_encounter
					trigger_event = travel_events.2020
				}
				#Someone tries to murder you
				5 = {
					trigger = {
						exists = scope:scheme_to_expose
					}
					modifier = {
						exists = scope:scheme_to_expose
						scope:scheme_to_expose = {
							save_temporary_scope_as = scheme
							scheme_progress > scheme_progress_66
						}
						add = 25
					}
					#If they're not already an agent, add the estate char as an agent
					scope:estate_character = {
						if = {
							limit = {
								NOT = {
									scope:scheme_to_expose = { 
										scheme_is_character_agent = scope:estate_character
									}
								}
								char_can_fit_into_scheme_trigger = { SCHEME = scope:scheme_to_expose }
							}
							try_to_force_assign_character_to_random_agent_slot_effect = {
								SCHEME = scope:scheme_to_expose
								CHAR = scope:estate_character
								YEARS = 5
							}
						}
					}
					add_character_flag = murder_attempt
					trigger_event = travel_events.2019
				}
			}
		}
		stress_impact = {
			gregarious = minor_stress_impact_gain
			craven = medium_stress_impact_gain
			paranoid = major_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = brave
					has_trait = arrogant
				}
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = craven
					has_trait = paranoid
				}
				factor = 0.5
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_rationality = 1
				ai_sociability = -1
			}
		}
	}
	#NOPE NOPE NOPE
	option = {
		name = travel_events.2018.c
		custom_tooltip = travel_events.2017.b_tt
		add_prestige = medium_prestige_loss
		stress_impact = {
			brave = medium_stress_impact_gain
			arrogant = medium_stress_impact_gain
		}
		scope:estate_character = {
			if = {
				limit = { has_character_flag = created_estate_character }
				silent_disappearance_effect = yes
			}
		}
		ai_chance = {
			base = 100
			#They might be scheming against us
			modifier = {
				trigger_if = {
					limit = {
						location.county.holder != root
					}
					has_relation_potential_rival = location.county.holder
					has_relation_rival = location.county.holder
				}
			}
			modifier = {
				OR = {
					has_trait = brave
					has_trait = arrogant
				}
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = craven
					has_trait = paranoid
					has_trait = impatient
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_energy = -1
				ai_rationality = -1
				ai_boldness = -3
			}
		}
	}
}

#Oh look, someone is trying to murder you
travel_events.2019 = { 
	type = character_event
	title = travel_events.2019.t
	desc = travel_events.2019.desc
	theme = travel
	override_background = { reference = dungeon }
	override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_intrigue" }
	left_portrait = {
		character = root
		animation = fear
	}
	right_portrait = {
		character = scope:murder_character
		animation = aggressive_dagger
		outfit_tags = { western_stealth_hood }
		hide_info = yes
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium }
		play_music_cue = "mx_cue_murder"
		#Create our agent/murderer
		create_character = {
			template = generic_peasant_character
			culture = location.county.holder.culture
			faith = location.county.holder.faith
			location = root.location
			save_scope_as = murder_character
		}
	}
	#Learning Duel: Push cabinet over assassin!
	option = {
		name = travel_events.2019.a
		custom_tooltip = travel_events.2019.a_tt
		duel = {
			skills = { prowess learning }
			target = scope:murder_character
			#Use physics to slam them into the old cupboard
			70 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = travel_events.2019.a_retaliate.desc
				custom_tooltip = travel_events.2019.a_retaliate.effect_tt
				send_interface_toast = {
					type = event_toast_text_and_effect_good
					left_icon = root
					right_icon = scope:murder_character
					title = travel_events.2019.a_retaliate.tt
					desc = travel_events.2019.a_retaliate.desc
					hidden_effect = {
						scope:murder_character = {
							death = {
								death_reason = death_duel
							}
						}
					}
					scope:scheme_to_expose = {
						expose_scheme = yes
						expose_scheme_agent = scope:estate_character
					}
				}
			}
			#You die
			30 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = travel_events.2019.a_death.desc
				death = {
					death_reason = death_murder
				}
			}
		}
		if = {
			limit = { is_alive = yes }
			#Trigger resolution event
			trigger_event = travel_events.2022
		}
		ai_chance = {
			base = 100
			modifier = {
				learning_prowess > diplomacy_intrigue
				learning_prowess > martial_prowess
				factor = 2
			}
		}
	}
	#Intrigue Duel: Take this coin pouch!
	option = {
		name = travel_events.2019.b
		custom_tooltip = travel_events.2019.b_tt
		duel = {
			skills = { intrigue diplomacy }
			target = scope:murder_character
			#Bribe them
			85 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = travel_events.2019.b_paid_off.desc
				custom_tooltip = travel_events.2019.a_paid_off.effect_tt
				send_interface_toast = {
					type = event_toast_text_and_effect_good
					left_icon = root
					right_icon = scope:murder_character
					title = travel_events.2019.b_paid_off.tt
					desc = travel_events.2019.b_paid_off.desc
					remove_short_term_gold = major_gold_value
					scope:scheme_to_expose = {
						expose_scheme = yes
						expose_scheme_agent = scope:estate_character
					}
				}
			}
			#You die
			15 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = travel_events.2019.a_death.desc
				death = {
					death_reason = death_murder
				}
			}
		}
		if = {
			limit = { is_alive = yes }
			#Trigger resolution event
			trigger_event = travel_events.2022
			stress_impact = {
				greedy = major_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				diplomacy_intrigue > learning_prowess
				diplomacy_intrigue > martial_prowess
				factor = 2
			}
			modifier = {
				has_trait = craven
				add = 50
			}
			ai_value_modifier = {
				ai_greed = -2
			}
		}
	}
	#Martial Duel: En guarde!
	option = {
		name = travel_events.2019.c
		custom_tooltip = travel_events.2019.c_tt
		duel = {
			skills = { prowess martial }
			target = scope:murder_character
			#Use physics to slam them into the old cupboard
			70 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = travel_events.2019.c_retaliate.desc
				custom_tooltip = travel_events.2019.a_retaliate.effect_tt
				send_interface_toast = {
					type = event_toast_text_and_effect_good
					left_icon = root
					right_icon = scope:murder_character
					title = travel_events.2019.a_retaliate.tt
					desc = travel_events.2019.c_retaliate.desc
					hidden_effect = {
						scope:murder_character = {
							death = {
								death_reason = death_duel
							}
						}
					}
					scope:scheme_to_expose = {
						expose_scheme = yes
						expose_scheme_agent = scope:estate_character
					}
				}
			}
			#You die
			30 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = travel_events.2019.a_death.desc
				death = {
					death_reason = death_murder
				}
			}
		}
		if = {
			limit = { is_alive = yes }
			#Trigger resolution event
			trigger_event = travel_events.2022
		}
		ai_chance = {
			base = 100
			modifier = {
				martial_prowess > learning_prowess
				martial_prowess > diplomacy_intrigue
				factor = 2
			}
			modifier = {
				has_trait = brave
				add = 50
			}
		}
	}
	after = {
		if = {
			limit = {
				scope:murder_character = {
					is_alive = yes
				}
			}
			scope:murder_character = {
				silent_disappearance_effect = yes
			}
		}
		if = {
			limit = { is_alive = yes }
			create_character_memory = {
				type = haunted_manor_survived_assassination_attempt_memory
			}
			if = {
				limit = { exists = scope:new_memory }
				scope:new_memory = {
					set_variable = {
						name = manor_location
						value = root.location
					}
					if = {
						limit = { exists = var:manor_location }
						#To prevent 'unused except in loc' errors :catto:
					}
				}
			}
		}
	}
}

scripted_effect haunted_mansion_healing_effect = {
	random_list = {
		1 = {
			trigger = { has_trait = wounded }
			if = {
				limit = {
					has_trait = wounded_1
				}
				remove_trait = wounded_1
			}
			else_if = {
				limit = {
					has_trait = wounded_2
				}
				change_trait_rank = {
					trait = wounded
					rank = -1
					max = 1
				}
			}
			else_if = {
				limit = {
					has_trait = wounded_3
				}
				change_trait_rank = {
					trait = wounded
					rank = -1
					max = 1
				}
			}
		}
		1 = {
			trigger = { has_trait = infirm }
			remove_trait = infirm
		}
		1 = {
			trigger = { has_trait = leper }
			remove_trait = leper
		}
		1 = {
			trigger = { has_trait = lovers_pox }
			remove_trait = lovers_pox
		}
		1 = {
			trigger = { has_trait = ill }
			remove_trait = ill
		}
		1 = {
			trigger = { has_trait = pneumonic }
			remove_trait = pneumonic
			contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes }
		}
		1 = {
			trigger = { has_trait = gout_ridden }
			remove_trait = gout_ridden
		}
		1 = {
			trigger = { has_trait = consumption }
			remove_trait = consumption
		}
		1 = {
			trigger = { has_trait = cancer }
			remove_trait = cancer
		}
		1 = {
			trigger = { has_trait = typhus }
			remove_trait = typhus
		}
		1 = {
			trigger = { has_trait = blind }
			remove_trait = blind
		}
		1 = {
			trigger = { has_trait = impotent }
			remove_trait = impotent
		}
		1 = {
			add_character_modifier = {
				modifier = travel_health_boost_modifier
				years = 10
			}
		}
	}
}

scripted_effect inform_player_about_secret_effect = {
	show_as_tooltip = {
		scope:mendicant_character = {
			random_secret = {
				type = secret_witch 
				reveal_to = root
			}
		}	
	}
}

#You found a very weird mendicant character
travel_events.2020 = { 
	type = character_event
	title = travel_events.2020.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					is_witch_trigger = yes
				}
				desc = travel_events.2020.desc_witch
			}
			triggered_desc = {
				desc = travel_events.2020.desc
			}
		}
	}
	theme = travel
	override_background = { reference = physicians_study }
	override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_medicine" }
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { has_trait = brave }
			animation = personality_bold
		}
		animation = disbelief
	}
	right_portrait = {
		character = scope:mendicant_character
		animation = personality_compassionate
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small }
		play_music_cue = "mx_cue_sacredrite"
		#Create our mystic
		create_character = {
			template = mendicant_mystic_character
			gender_female_chance = 75
			age = { 20 80 }
			location = root.location
			culture = root.location.county.culture
			faith = root.location.county.faith
			save_scope_as = mendicant_character
		}
		scope:mendicant_character = {
			hidden_effect = {
				random_list = {
					15 = {
						#First level mystic
					}
					10 = {
						if = {
							limit = { has_trait = lifestyle_mystic }
							add_trait_xp = {
								trait = lifestyle_mystic
								value = 50
							}
						}
					}
					5 = {
						if = {
							limit = { has_trait = lifestyle_mystic }
							add_trait_xp = {
								trait = lifestyle_mystic
								value = 100
							}
						}
					}
				}
				set_sexuality = bisexual
				remove_trait = devoted
				add_trait = whole_of_body
			}
			add_secret = { type = secret_witch }
			random_secret = {
				type = secret_witch
				reveal_to = root
			}
		}
		if = {
			limit = {
				any_secret = { type = secret_witch }
			}
			random_secret = {
				type = secret_witch
				reveal_to = scope:mendicant_character
			}
		}
	}
	#Please heal me, mystic person
	option = {
		name = travel_events.2020.a
		if = {
			limit = {
				faith = {
					NOT = { has_doctrine_parameter = witchcraft_accepted } #Unop: Check doctrine param instead since witchcraft can be virtuous
				}
			}
			add_piety = major_piety_loss
		}
		haunted_mansion_healing_effect = yes
		stress_impact = {
			zealous = major_stress_impact_gain
			craven = medium_stress_impact_gain
			paranoid = major_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = brave
					has_trait = trusting
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = craven
					has_trait = paranoid
				}
				factor = 0.5
			}
			modifier = {
				is_witch_trigger = yes
				factor = 2
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_rationality = 1
			}
		}
	}
	#Join my entourage and court, mystic person?
	option = {
		name = travel_events.2020.b
		if = {
			limit = {
				faith = {
					NOT = { has_doctrine_parameter = witchcraft_accepted } #Unop: Check doctrine param instead since witchcraft can be virtuous
				}
			}
			add_piety = massive_piety_loss
		}
		add_character_flag = recruited_mendicant
		add_courtier = scope:mendicant_character
		current_travel_plan = { add_companion = scope:mendicant_character }
		stress_impact = {
			zealous = major_stress_impact_gain
			craven = major_stress_impact_gain
			paranoid = massive_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = brave
					has_trait = trusting
					has_trait = gregarious
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = craven
					has_trait = paranoid
				}
				factor = 0
			}
			modifier = {
				is_witch_trigger = yes
				factor = 3
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_sociability = 1
			}
		}
	}
	#Let's have hot witch sex
	option = {
		name = travel_events.2020.c
		trigger = {
			is_adult = yes
			NOT = { has_trait = celibate }
			OR = {
				has_trait = lustful
				has_trait = seducer
				is_witch_trigger = yes
			}
			matching_gender_and_sexuality_trigger = { CHARACTER_1 = root CHARACTER_2 = scope:mendicant_character }
			can_set_relation_lover_trigger = { CHARACTER = scope:mendicant_character }
			might_cheat_on_every_partner_trigger = yes
		}
		if = {
			limit = {
				faith = {
					NOT = { has_doctrine_parameter = witchcraft_accepted } #Unop: Check doctrine param instead since witchcraft can be virtuous
				}
			}
			add_piety = massive_piety_loss
		}
		had_sex_with_effect = {
			CHARACTER = scope:mendicant_character
			PREGNANCY_CHANCE = pregnancy_chance
		}
		add_character_modifier = {
			modifier = travel_witch_enthralled_modifier
			years = 10
		}
		add_character_flag = recruited_mendicant
		add_courtier = scope:mendicant_character
		current_travel_plan = { add_companion = scope:mendicant_character }
		if = {
			limit = { 
				accepts_adultery_without_penalty_trigger = yes
				can_set_relation_lover_trigger = { CHARACTER = scope:mendicant_character }
			}
			set_relation_lover = scope:mendicant_character
		}
		else = {
			add_secret = { 
				target = scope:mendicant_character
				type = secret_lover 
			}
		}
		stress_impact = {
			zealous = major_stress_impact_gain
			chaste = major_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = lustful
					has_trait = seducer
				}
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = chaste
					has_trait = zealous
				}
				factor = 0.5
			}
			modifier = {
				has_sexuality = asexual
				factor = 0
			}
			modifier = {
				trigger_if = {
					limit = {
						num_of_relation_soulmate = 1
						has_trait = loyal
					}
				}
				trigger_else = {
					always = no
				}
				factor = 0
			}
			ai_value_modifier = {
				ai_boldness = 3
				ai_energy = 2
				ai_honor = -1
				ai_rationality = -1
			}
		}
	}
	#I'm good, thanks
	option = {
		name = travel_events.2020.d
		if = {
			limit = {
				faith = {
					NOT = { has_doctrine_parameter = witchcraft_accepted } #Unop: Check doctrine param instead since witchcraft can be virtuous
				}
			}
			add_piety = major_piety_gain
		}
		stress_impact = {
			witch = major_stress_impact_gain
			brave = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				is_witch_trigger = yes
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = craven
					has_trait = paranoid
					has_trait = zealous
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_zeal = 3
				ai_rationality = 1
				ai_boldness = -2
			}
		}
	}
	after = {
		inform_player_about_secret_effect = yes
		trigger_event = travel_events.2022
	}
}

#You found a shiny bauble
travel_events.2021 = { 
	type = character_event
	title = travel_events.2021.t
	desc = {
		desc = travel_events.2021.desc_intro
		first_valid = {
			#Bad trinket
			triggered_desc = {
				trigger = {
					scope:new_trinket = { artifact_durability <= 10 }
				}
				desc = travel_events.2021.desc_bad
			}
			#Illustrious trinket
			triggered_desc = {
				trigger = {
					scope:new_trinket = { rarity = illustrious }
				}
				desc = travel_events.2021.desc_illustrious
			}
			#Famed trinket
			triggered_desc = {
				trigger = {
					scope:new_trinket = { rarity = famed }
				}
				desc = travel_events.2021.desc_famed
			}
			#Masterwork trinket
			triggered_desc = {
				trigger = {
					scope:new_trinket = { rarity = masterwork }
				}
				desc = travel_events.2021.desc_masterwork
			}
			#Common trinket
			triggered_desc = {
				trigger = {
					scope:new_trinket = { rarity = common }
				}
				desc = travel_events.2021.desc_common
			}
		}
	}				
	theme = travel
	override_background = { reference = study }
	override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_medicine" }
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				scope:new_trinket = { artifact_durability <= 10 }
			}
			animation = personality_cynical
		}
		animation = happiness
	}
	artifact = {
		target = scope:new_trinket
		position = lower_center_portrait
		trigger = { exists = scope:new_trinket }
	}
	immediate = {
		play_music_cue = "mx_cue_low_key_positive"
		#Generate a random trinket
		hidden_effect = {
			generate_trinket_effect = {
				TRINKET_RECEIVER = root
				TRINKET_GIVER = root
				GRAB_ALL_TRINKETS = yes
				HISTORY_TYPE = stolen_unknown
			}
		}
	}
	option = {
		name = {
			text = {
				first_valid = {
					#Ooo shiny!
					triggered_desc = {
						trigger = {
							scope:new_trinket = { artifact_durability <= 10 }
						}
						desc = travel_events.2021.a_bad
					}
					#Do I have to... ?
					triggered_desc = {
						desc = travel_events.2021.a
					}
				}
			}
		}
		show_as_tooltip = {
			scope:new_trinket = {
				set_owner = root
			}
		}
		stress_impact = {
			greedy = medium_stress_impact_loss
			honest = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			paranoid = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
		}
	}
	#I don't want to steal
	option = {
		name = travel_events.2021.b
		trigger = {
			has_trait = honest
		}
		custom_tooltip = travel_events.2021.b_tt
		stress_impact = {
			honest = medium_stress_impact_loss
			greedy = medium_stress_impact_gain
		}
		hidden_effect = {
			destroy_artifact = scope:new_trinket
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = honest
					has_trait = craven
				}
				NOR = {
					has_trait = deceitful
					has_trait = greedy
				}
				factor = 0
			}
		}
	}
	after = {
		trigger_event = travel_events.2022
	}
}

#Resolution: You were joshed / You found a bauble / You survived the murder attempt / You came back from the mendicant
travel_events.2022 = { 
	type = character_event
	title = travel_events.2022.t
	desc = {
		first_valid = {
			#You followed the pack
			triggered_desc = {
				trigger = { has_character_flag = went_with_the_pack }
				desc = travel_events.2022.desc_pack
			}
			#You were almost murdered
			triggered_desc = {
				trigger = { has_character_flag = murder_attempt }
				desc = travel_events.2022.desc_murder
			}
			#You met and recruited a mendicant
			triggered_desc = {
				trigger = { 
					has_character_flag = mendicant_encounter
					has_character_flag = recruited_mendicant
				}
				desc = travel_events.2022.desc_mendicant_recruit
			}
			#You met a mendicant
			triggered_desc = {
				trigger = { has_character_flag = mendicant_encounter }
				desc = travel_events.2022.desc_mendicant
			}
			#You found a bauble
			triggered_desc = {
				trigger = { has_character_flag = bauble_find }
				desc = travel_events.2022.desc_bauble
			}
			#Default
			triggered_desc = {
				desc = travel_events.2022.desc_joshed
			}
		}
	}
	theme = travel
	override_background = { reference = council_chamber }
	left_portrait = {
		character = root
		#Murder resolution
		triggered_animation = {
			trigger = { has_character_flag = murder_attempt }
			animation = personality_vengeful
		}
		#Mendicant resolution
		triggered_animation = {
			trigger = { has_character_flag = mendicant_encounter }
			animation = personality_compassionate
		}
		#Bauble resolution
		triggered_animation = {
			trigger = { has_character_flag = bauble_find }
			animation = personality_greedy
		}
		#Scare resolution
		triggered_animation = {
			trigger = { has_trait = brave }
			animation = shock
		}
		animation = paranoia
	}
	right_portrait = {
		character = scope:estate_character
		triggered_animation = {
			trigger = { 
				OR = {
					has_character_flag = murder_attempt
					has_character_flag = mendicant_encounter
				}
			}
			animation = disbelief
		}
		triggered_animation = {
			trigger = { has_character_flag = bauble_find }
			animation = shame
		}
		animation = schadenfreude
	}
	#Portraits to denote that you're in a group
	lower_left_portrait = {
		trigger = { exists = scope:entourage_member_one }
		character = scope:entourage_member_one
	}
	lower_center_portrait = {
		trigger = { exists = scope:entourage_member_two }
		character = scope:entourage_member_two
	}
	lower_right_portrait = {
		trigger = { exists = scope:entourage_member_three }
		character = scope:entourage_member_three
	}
	immediate = {
		#Murder resolution
		if = {
			limit = { has_character_flag = murder_attempt }
			play_music_cue = "mx_cue_stress"
			current_travel_plan = {
				if = {
					limit = { 
						any_entourage_character = { is_guard_type_character_trigger = yes }
					}
					random_entourage_character = {
						limit = { is_guard_type_character_trigger = yes }
						weight = {
							base = 1
							modifier = {
								has_court_position = bodyguard_court_position
								add = 100
							}
							modifier = {
								has_court_position = akolouthos_court_position
								add = 100
							}
							modifier = {
								prowess >= medium_skill_rating
								add = 10
							}
						}
						save_scope_as = guard_type_character
					}
					save_scope_value_as = {
						name = martial_prowess_comparison_value
						value = {
							add = root.martial_prowess
							subtract = scope:estate_character.martial_prowess
						}
					}
				}
			}
		}
		#Mendicant resolution
		else_if = {
			limit = { has_character_flag = mendicant_encounter }
			play_music_cue = "mx_cue_positive_effect"
			if = {
				limit = { has_character_flag = recruited_mendicant }
				scope:mendicant_character = {
					save_scope_as = entourage_member_one
				}
			}
		}
		#Bauble resolution
		else_if = {
			limit = { has_character_flag = bauble_find }
			play_music_cue = "mx_cue_low_key_positive"
		}
		#Pack scare / Scare resolution
		else = {
			play_music_cue = "mx_cue_negative"
		}
	}
	#A1: Murder Attempt - Someone tried to murder me! And YOU'RE probably in on it!
	option = {
		name = travel_events.2022.a
		trigger = { has_character_flag = murder_attempt }
		duel = {
			skills = { prowess martial }
			target = scope:estate_character
			#Kill the culprit
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = travel_events.2022.a_slain.desc
				send_interface_toast = {
					type = event_toast_text_and_effect_good
					left_icon = root
					right_icon = scope:estate_character
					title = travel_events.2022.a_slain.tt
					desc = travel_events.2022.a_slain.desc
					scope:estate_character = {
						death = {
							death_reason = death_duel
						}
					}
					add_dread = medium_dread_gain
				}
			}
			#Culprit escapes; you become wounded
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = travel_events.2022.a_escape.desc
				send_interface_toast = {
					type = event_toast_text_and_effect_bad
					left_icon = root
					right_icon = scope:estate_character
					title = travel_events.2022.a_escape.tt
					desc = travel_events.2022.a_escape.desc
					increase_wounds_effect = { REASON = duel }
					add_dread = minor_dread_gain
				}
			}
		}
		#If the province owners scheme was exposed
		if = {
			limit = {
				scope:county_liege != root
				scope:scheme_to_expose = {
					scheme_owner = scope:county_liege
				}
			}
			scope:county_liege = {
				add_opinion = {
					modifier = attacked_my_subject_opinion
					target = root
					opinion = -20
				}
				worsen_relationship_effect = {
					TARGET = root
					REASON = rival_exposed_my_murder_scheme
				}
			}
		}
		stress_impact = {
			craven = medium_stress_impact_gain
			vengeful = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				scope:martial_prowess_comparison_value > 10
				add = 50
			}
			modifier = {
				scope:martial_prowess_comparison_value > 5
				add = 25
			}
			modifier = {
				has_trait = brave
				has_trait = vengeful
				factor = 2
			}
			#3 ranks and you die
			modifier = {
				has_trait_rank = {
					trait = wounded
					rank = 2
				}
				factor = 0
			}
			ai_value_modifier = {
				ai_vengefulness = 3
				ai_boldness = 2
				ai_sociability = -1
				ai_rationality = -1
			}
		}
	}
	#A1: Murder Attempt - Guard! This person is probably involved in a plot to kill me!
	option = {
		name = travel_events.2022.b
		trigger = { 
			has_character_flag = murder_attempt
			exists = scope:guard_type_character 
		}
		scope:guard_type_character = {
			duel = {
				skill = prowess
				target = scope:estate_character
				#Guard leader kills the culprit
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					desc = travel_events.2022.b_slain.desc
					send_interface_toast = {
						type = event_toast_text_and_effect_good
						left_icon = scope:guard_type_character
						right_icon = scope:estate_character
						title = travel_events.2022.a_slain.tt
						desc = travel_events.2022.b_slain.desc
						scope:estate_character = {
							death = {
								death_reason = death_duel
							}
						}
					}
				}
				#Culprit escapes; guard_type_character becomes wounded
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					desc = travel_events.2022.b_escape.desc
					send_interface_toast = {
						type = event_toast_text_and_effect_bad
						left_icon = scope:guard_type_character
						right_icon = scope:estate_character
						title = travel_events.2022.a_escape.tt
						desc = travel_events.2022.b_escape.desc
						scope:guard_type_character = {
							increase_wounds_effect = { REASON = duel }
						}
					}
				}
			}
		}
		#If the province owners scheme was exposed
		if = {
			limit = {
				scope:county_liege != root
				scope:scheme_to_expose = {
					scheme_owner = scope:county_liege
				}
			}
			scope:county_liege = {
				add_opinion = {
					modifier = attacked_my_subject_opinion
					target = root
					opinion = -20
				}
				progress_towards_rival_effect = {
					CHARACTER = root
					OPINION = 0
					REASON = rival_exposed_my_murder_scheme
				}
			}
		}
		stress_impact = {
			compassionate = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				scope:guard_type_character.prowess > scope:estate_character.prowess
				add = 25
			}
			modifier = {
				has_trait = vengeful
				has_trait = craven
				factor = 2
			}
			ai_value_modifier = {
				ai_rationality = 3
				ai_vengefulness = 2
				ai_boldness = 1
			}
		}
	}
	#A2.1: Witch Encountered - You might want to have a search for witches
	option = {
		name = travel_events.2022.c
		trigger = {
			has_character_flag = mendicant_encounter
			NOT = { has_character_flag = recruited_mendicant }
			#Either witchcraft is illegal to us or the province liege
			OR = {
				AND = {
					scope:county_liege != root
					scope:county_liege.faith = {
						NOT = { has_doctrine_parameter = witchcraft_accepted } #Unop: Check doctrine param instead since witchcraft can be virtuous
					}
				}
				AND = {
					faith = {
						NOT = { has_doctrine_parameter = witchcraft_accepted } #Unop: Check doctrine param instead since witchcraft can be virtuous
					}
				}	
			}
		}
		#If we're the province liege and witchcraft is illegal
		if = {
			limit = {
				scope:county_liege = root
				faith = {
					NOT = { has_doctrine_parameter = witchcraft_accepted } #Unop: Check doctrine param instead since witchcraft can be virtuous
				}
			}
			#Get reward
			add_piety = minor_piety_gain
			#Get repercussions(?)
			add_character_flag = ratted_out_witch
		}
		#If witchcraft is illegal with the province liege
		if = {
			limit = { 
				scope:county_liege.faith = {
					NOT = { has_doctrine_parameter = witchcraft_accepted } #Unop: Check doctrine param instead since witchcraft can be virtuous
				}
			}
			#Get reward
			scope:county_liege = {
				add_opinion = {
					modifier = tip_about_witch_opinion
					target = root
					opinion = 20
				}
			}
			#Get repercussions(?)
			add_character_flag = ratted_out_witch
		}
		if = {
			limit = { 
				any_secret = { type = secret_witch } 
			}
			stress_impact = {
				base = major_stress_impact_gain
				compassionate = minor_stress_impact_gain
				zealous = medium_stress_impact_loss
			}
		}
		else = {
			stress_impact = {
				compassionate = minor_stress_impact_gain
				zealous = medium_stress_impact_loss
			}
		}
		ai_chance = {
			base = 100
			#Do we like the province owner?
			modifier = {
				trigger_if = {
					limit = { exists = scope:county_liege }
					OR = {
						opinion = {
							target = scope:county_liege
							value <= low_negative_opinion
						}
						has_relation_potential_rival = scope:county_liege
						has_relation_rival = scope:county_liege
					}
				}
				trigger_else = {
					always = no
				}
				add = -50
			}
			#Ain't snitching on my witch
			modifier = {
				is_witch_trigger = yes
				factor = 0
			}
			#No time to go Frollo up in here
			modifier = {
				OR = {
					AND = {
						matching_gender_and_sexuality_trigger = { CHARACTER_1 = root CHARACTER_2 = scope:mendicant_character }
						can_set_relation_lover_trigger = { CHARACTER = scope:mendicant_character }
					}
					has_relation_lover = scope:mendicant_character
				}
				add = -50
			}
			modifier = {
				OR = {
					has_trait = disloyal
					has_trait = deceitful
				}
				add = 50
			}
			modifier = {
				has_trait = zealous
				factor = 2
			}
			ai_value_modifier = {
				ai_zeal = 3
				ai_boldness = 1
				ai_compassion = -3
			}
		}
	}
	#A2.2: Witch Recruited - Actually, I found this witch
	option = {
		name = travel_events.2022.d
		#Either witchcraft is illegal to us or the province liege
		trigger = {
			has_character_flag = mendicant_encounter
			has_character_flag = recruited_mendicant
			OR = {
				AND = {
					scope:county_liege != root
					scope:county_liege.faith = {
						NOT = { has_doctrine_parameter = witchcraft_accepted } #Unop: Check doctrine param instead since witchcraft can be virtuous
					}
				}
				faith = {
					NOT = { has_doctrine_parameter = witchcraft_accepted } #Unop: Check doctrine param instead since witchcraft can be virtuous
				}
			}
		}
		#If we're the province liege and witchcraft is illegal
		if = {
			limit = {
				scope:county_liege = root
				faith = {
					NOT = { has_doctrine_parameter = witchcraft_accepted } #Unop: Check doctrine param instead since witchcraft can be virtuous
				}
			}
			#Get reward
			add_piety = massive_piety_gain
			#Reveal secret
			scope:mendicant_character = {
				random_secret = {
					type = secret_witch
					save_scope_as = secret_to_expose
				}
			}
			scope:secret_to_expose = {
				expose_secret = root
			}
			#Imprison witch
			rightfully_imprison_character_effect = {
				TARGET = scope:mendicant_character
				IMPRISONER = root
			}
			#Get repercussions(?)
			add_character_flag = ratted_out_witch
		}
		#If witchcraft is illegal with the province liege
		if = {
			limit = { 
				scope:county_liege != root
				scope:county_liege.faith = {
					NOT = { has_doctrine_parameter = witchcraft_accepted } #Unop: Check doctrine param instead since witchcraft can be virtuous
				}
			}
			#Get reward
			if = {
				limit = {
					faith = {
						NOT = { has_doctrine_parameter = witchcraft_accepted } #Unop: Check doctrine param instead since witchcraft can be virtuous
					}
				}
				add_piety = massive_piety_gain
			}
			scope:county_liege = {
				add_opinion = {
					modifier = revealed_witch_to_me_opinion
					target = root
					opinion = 40
				}
				progress_towards_friend_effect = {
					CHARACTER = root
					OPINION = 0
					REASON = friend_revealed_a_witch_to_me
				}
			}
			#Reveal secret
			scope:mendicant_character = {
				random_secret = {
					type = secret_witch
					save_scope_as = secret_to_expose
				}
			}
			scope:secret_to_expose = {
				expose_secret = root
			}
			#Imprison witch
			remove_courtier_or_guest = scope:mendicant_character
			current_travel_plan = {
				remove_character = scope:mendicant_character
			}
			rightfully_imprison_character_effect = {
				TARGET = scope:mendicant_character
				IMPRISONER = scope:county_liege
			}
			#Get repercussions(?)
			add_character_flag = ratted_out_witch
		}
		if = {
			limit = { 
				any_secret = { type = secret_witch }  
			}
			stress_impact = {
				base = massive_stress_impact_gain
				compassionate = major_stress_impact_gain
				zealous = major_stress_impact_loss
				sadistic = medium_stress_impact_loss
			}
		}
		else = {
			stress_impact = {
				compassionate = major_stress_impact_gain
				zealous = major_stress_impact_loss
				sadistic = medium_stress_impact_loss
			}
		}
		ai_chance = {
			base = 100
			#Do we like the province owner?
			modifier = {
				trigger_if = {
					limit = { exists = scope:county_liege }
					OR = {
						opinion = {
							target = scope:county_liege
							value <= low_negative_opinion
						}
						has_relation_potential_rival = scope:county_liege
						has_relation_rival = scope:county_liege
					}
				}
				trigger_else = {
					always = no
				}
				add = -50
			}
			#Ain't snitching on my witch
			modifier = {
				is_witch_trigger = yes
				factor = 0
			}
			#No time to go Frollo up in here
			modifier = {
				OR = {
					AND = {
						matching_gender_and_sexuality_trigger = { CHARACTER_1 = root CHARACTER_2 = scope:mendicant_character }
						can_set_relation_lover_trigger = { CHARACTER = scope:mendicant_character }
					}
					has_relation_lover = scope:mendicant_character
				}
				add = -50
			}
			modifier = {
				OR = {
					has_trait = disloyal
					has_trait = deceitful
				}
				add = 50
			}
			modifier = {
				has_trait = zealous
				factor = 2
			}
			ai_value_modifier = {
				ai_zeal = 3
				ai_boldness = 1
				ai_compassion = -3
			}
		}
	}
	#A1/A2/A3 Murder/Witch/Bauble - Nothing out of the ordinary happened
	option = {
		name = travel_events.2022.e
		trigger = {
			OR = {
				has_character_flag = murder_attempt
				has_character_flag = mendicant_encounter
				has_character_flag = bauble_find
			}
		}
		#Murder attempt averted
		if = {
			limit = { has_character_flag = murder_attempt }
			stress_impact = {
				vengeful = medium_stress_impact_gain
				wrathful = minor_stress_impact_gain
			}
		}
		#Witch not ratted out
		else_if = {
			limit = { has_character_flag = mendicant_encounter }
			stress_impact = {
				zealous = medium_stress_impact_gain
			}
		}
		#Bauble stolen
		else = {
			stress_impact = {
				honest = minor_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			#Do we dislike the province owner?
			modifier = {
				trigger_if = {
					limit = { exists = scope:county_liege }
					OR = {
						opinion = {
							target = scope:county_liege
							value <= low_negative_opinion
						}
						has_relation_potential_rival = scope:county_liege
						has_relation_rival = scope:county_liege
					}
				}
				trigger_else = {
					always = no
				}
				add = 100
			}
			modifier = {
				has_trait = vengeful
				has_character_flag = murder_attempt
				add = -50
			}
			modifier = {
				has_trait = zealous
				has_character_flag = mendicant_encounter
				add = -50
			}
			modifier = {
				has_trait = craven
				add = 50
			}
			ai_value_modifier = {
				ai_compassion = 2
				ai_boldness = -1
				ai_vengefulness = -3
			}
		}
	}
	#A4: Scare -  I whip guide / Other entourage member punches guide
	option = {
		name = {
			text = {
				first_valid = {
					#Allow other entourage member to punish the guide
					triggered_desc = {
						trigger = { has_character_flag = went_with_the_pack }
						desc = travel_events.2022.f_pack
					}
					#You alone got scared, whip him for the insolence
					desc = travel_events.2022.f
				}
			}
		}
		trigger = {
			NOR = {
				has_character_flag = murder_attempt
				has_character_flag = mendicant_encounter
				has_character_flag = bauble_find
			}
		}
		if = {
			limit = { has_character_flag = went_with_the_pack }
			scope:estate_character = {
				increase_wounds_effect = { REASON = fight}
			}
		}
		else = {
			scope:estate_character = {
				increase_wounds_effect = { REASON = whipping }
			}
			add_dread = medium_dread_gain
			if = {
				limit = {
					scope:county_liege != root
				}
				scope:county_liege = {
					add_opinion = {
						modifier = whipped_my_subject_opinion
						target = root
						opinion = -20
					}
				}
			}
		}
		stress_impact = {
			sadistic = medium_stress_impact_loss
			compassionate = major_stress_impact_gain
			forgiving = major_stress_impact_gain
		}	
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
				}
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = vengeful
					has_trait = sadistic
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_vengefulness = 3
				ai_compassion = -3
			}
		}
	}
	#A4: Scare - Play along / Stop other entourage member from punching
	option = {
		name = {
			text = {
				first_valid = {
					#You were all scared; stop another entourage member from punching the guide
					triggered_desc = {
						trigger = { has_character_flag = went_with_the_pack }
						desc = travel_events.2022.g_pack
					}
					#You alone got scared, play along
					triggered_desc = {
						desc = travel_events.2022.g
					}
				}
			}
		}
		trigger = {
			NOR = {
				has_character_flag = murder_attempt
				has_character_flag = mendicant_encounter
				has_character_flag = bauble_find
			}
		}
		if = {
			limit = { has_character_flag = went_with_the_pack }
			add_piety = major_piety_gain
			scope:entourage_member_one = {
				add_opinion = {
					modifier = held_me_back_opinion
					target = root
					opinion = -10
				}
			}
		}
		else = {
			add_prestige = minor_prestige_loss
			add_character_modifier = {
				modifier = travel_approachable_modifier
				years = 5
			}
		}
		stress_impact = {
			arrogant = medium_stress_impact_gain
			vengeful = medium_stress_impact_gain
			wrathful = minor_stress_impact_gain
			irritable = minor_stress_impact_gain
			forgiving = medium_stress_impact_loss
			eccentric = medium_stress_impact_loss
			gregarious = minor_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = vengeful
					has_trait = sadistic
				}
				factor = 0.5
			}
			modifier = {
				faith = {
					OR = {
						trait_is_virtue = forgiving
						trait_is_virtue = compassionate
					}
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_compassion = 3
				ai_vengefulness = -3
			}
		}
	}
	after = {
		hidden_effect = {
			#Clean up characters
			trigger_event = {
				id = travel_events.2023
				days = 2
			}
			if = {
				limit = {
					exists = scope:mendicant_character
					scope:mendicant_character = {
						is_imprisoned = yes
					}
					has_character_flag = ratted_out_witch
				}
				#Witch curse(?) dream
				random_list = {
					50 = {
						#Nothing happens
					}
					50 = {
						trigger_event = {
							id = travel_events.2024
							days = 4
						}
					}
				}
			}
			else_if = {
				limit = {
					exists = scope:mendicant_character
					NOT = { has_character_flag = recruited_mendicant }
					NOT = { has_character_flag = ratted_out_witch }
				}
				scope:mendicant_character = {
					if = {
						limit = {
							root = { is_ai = yes }
						}
						silent_disappearance_effect = yes
					}
				}
			}
		}
		remove_character_flag = went_with_the_pack
		remove_character_flag = murder_attempt
		remove_character_flag = mendicant_encounter
		remove_character_flag = recruited_mendicant
		remove_character_flag = bauble_find
		remove_character_flag = ratted_out_witch
	}
}

#Hidden event to clean up characters and avoid toast shenanigans
travel_events.2023 = { 
	type = character_event
	hidden = yes
	immediate = {
		if = {
			limit = {
				NOT = { exists = scope:scheme_to_expose }
			}
			scope:estate_character = {
				if = {
					limit = { has_character_flag = created_estate_character }
					silent_disappearance_effect = yes
				}
			}
		}
	}
}

#You ratted out the witch; have a curse(?) dream
travel_events.2024 = { 
	type = character_event
	title = travel_events.2024.t
	desc = travel_events.2024.desc
	theme = travel
	override_background = { reference = dungeon }
	left_portrait = {
		character = root
		animation = paranoia
	}
	#They be dead, yo
	right_portrait = {
		character = scope:mendicant_character
		animation = personality_vengeful
	}
	immediate = {
		scope:mendicant_character = {
			death = {
				death_reason = death_drowned
			}
		}
		add_character_flag = is_naked
	}
	#It was just a bad dream!(?)
	option = {
		name = travel_events.2024.a
		stress_impact = {
			craven = minor_stress_impact_gain
			paranoid = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
		}
	}
	after = {
		hidden_effect = {
			random_list = {
				25 = {
					#Nothing happens
				}
				#Ill
				100 = {
					trigger_event = {
						id = health.1001
						days = 2
					}
				}
				#Pneumonic
				20 = {
					trigger = { has_trait = ill }
					trigger_event = {
						id = health.1002
						days = 2
					}
				}
				#Gout-ridden
				20 = {
					trigger_event = {
						id = health.1003
						days = 2
					}
				}
				#Typhus
				20 = {
					trigger_event = {
						id = health.1005
						days = 2
					}
				}
				#Consumption
				10 = {
					trigger_event = {
						id = health.1006
						days = 2
					}
				}
				#Cancer
				5 = {
					trigger_event = {
						id = health.1007
						days = 2
					}
				}
			}
			remove_character_flag = is_naked
		}
	}
}

#Visit a farm estate - Tax or don't tax your hospitable subject
travel_events.2025 = { 
	type = character_event
	title = travel_events.2025.t
	desc = travel_events.2025.desc
	theme = travel
	override_background = { reference = council_chamber }
	left_portrait = {
		character = root
		animation = admiration
	}
	right_portrait = {
		character = scope:estate_owner
		animation = personality_honorable
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_landed = yes
		is_location_valid_for_travel_event_on_land = yes
		location = {
			has_building_or_higher = farm_estates_01
			county.holder = root
		}
		NOT = { has_character_flag = had_travel_farm_estate_event_recently }
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_very_small }
		#Find a suitable shady estate owner
		if = {
			limit = {
				any_pool_character = {
					province = root.location
					is_available_healthy_adult = yes
					has_trait = gregarious
					2003_lowborn_pool_person_trigger = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = {
					is_available_healthy_adult = yes
					has_trait = gregarious
					2003_lowborn_pool_person_trigger = yes
				}
				save_scope_as = estate_owner
			}	
		}
		#Otherwise create someone
		else = {
			create_character = {
				template = estate_owner_character
				culture = location.county.holder.culture
				faith = location.county.holder.faith
				trait = gregarious
				location = root.location
				save_scope_as = estate_owner
			}
			scope:estate_owner = { add_character_flag = created_estate_owner }	
		}
		#Cooldown between estate events
		add_character_flag = {
			flag = had_travel_farm_estate_event_recently
			years = 5
		}
	}
	#Tax their regional beverage
	option = {
		name = travel_events.2025.a
		add_treasury_or_gold = medium_treasury_or_gold_value
		location.county = {
			add_county_modifier = {
				modifier = travel_taxman_modifier
				years = 10
			}
		}
		scope:estate_owner = {
			add_opinion = {
				target = root
				opinion = -20
				modifier = angry_opinion
			}
		}
		if = {
			limit = {
				OR = {
					has_trait = avaricious
					has_trait = architect
					has_trait = administrator
				}
			}
			stress_impact = {
				greedy = minor_stress_impact_loss
				diligent = medium_stress_impact_loss
				gregarious = medium_stress_impact_gain
				generous = medium_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				greedy = minor_stress_impact_loss
				gregarious = medium_stress_impact_gain
				generous = medium_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = gregarious
					has_trait = generous
				}
				factor = 0
			}
			modifier = {
				has_trait = greedy
				factor = 2
			}
			ai_value_modifier = {
				ai_greed = 3
				ai_boldness = 2
				ai_rationality = 1
				ai_honor = -1
				ai_compassion = -1
			}
		}
	}
	#Thank you for the hospitality
	option = {
		name = travel_events.2025.b
		scope:estate_owner = {
			add_opinion = {
				target = root
				opinion = 20
				modifier = friendliness_opinion
			}
		}
		if = {
			limit = {
				OR = {
					has_trait = avaricious
					has_trait = architect
					has_trait = administrator
				}
			}
			stress_impact = {
				greedy = minor_stress_impact_gain
				diligent = medium_stress_impact_gain
				compassionate = minor_stress_impact_loss
				gregarious = minor_stress_impact_loss

			}
		}
		else = {
			stress_impact = {
				greedy = minor_stress_impact_gain
				gregarious = minor_stress_impact_loss
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = generous
				}
				factor = 2
			}
			modifier = {
				has_trait = greedy
				factor = 0.5
			}
			ai_value_modifier = {
				ai_compassion = 3
				ai_honor = 1
				ai_greed = -3
			}
		}
	}
	#Stewardship option: Improve effiency
	option = {
		name = travel_events.2025.c
		location.county = {
			add_county_modifier = {
				modifier = travel_efficiency_improvements_modifier
				years = 10
			}
		}
		trigger = {
			OR = {
				has_trait = avaricious
				has_trait = architect
				has_trait = administrator
			}
		}
		stress_impact = {
			lazy = medium_stress_impact_gain
			shy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 150
			modifier = {
				has_trait = lazy
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = diligent
					has_trait = ambitious
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_rationality = 3
				ai_compassion = 1
				ai_greed = -3
			}
		}
	}
	after = {
		scope:estate_owner = {
			if = {
				limit = { has_character_flag = created_estate_owner }
				silent_disappearance_effect = yes
			}
		}
	}
}

#Visit someone else's farm estate - Pay or don't pay for the hospitality
travel_events.2026 = { 
	type = character_event
	title = travel_events.2026.t
	desc = {
		desc = travel_events.2026.desc_intro
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:estate_owner = {
						OR = {
							faith = { religion_tag = buddhism_religion }
							culture = { has_cultural_tradition = tradition_vegetarianism }
						}
					}
				}
				desc = travel_events.2026.desc_vegetarians
			}
			desc = travel_events.2026.desc_carnivore
		}
		desc = travel_events.2026.desc_outro
	}
	theme = travel
	override_background = { reference = ep2_travel_settlement_farm }
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				OR = {
					has_trait = irritable
					has_trait = wrathful
					has_trait = vengeful
					has_trait = sadistic
					has_trait = callous
				}
			}
			animation = disapproval
		}
		animation = personality_dishonorable
	}
	right_portrait = {
		character = scope:estate_owner
		animation = personality_compassionate
	}
	lower_right_portrait = {
		trigger = { exists = scope:county_liege }
		character = scope:county_liege
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = {
			has_building_or_higher = farm_estates_01
			county.holder != root
		}
		NOT = { has_character_flag = had_travel_farm_estate_event_recently }
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_very_small }
		#Save scope for easy access
		location.county.holder = { save_scope_as = county_liege }
		#Find an estate owner
		if = {
			limit = {
				any_pool_character = {
					province = root.location
					is_available_healthy_adult = yes
					has_trait = gregarious
					has_trait = greedy
					2003_lowborn_pool_person_trigger = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = {
					is_available_healthy_adult = yes
					has_trait = gregarious
					has_trait = greedy
					2003_lowborn_pool_person_trigger = yes
				}
				save_scope_as = estate_owner
			}	
		}
		#Otherwise create someone
		else = {
			create_character = {
				template = estate_owner_character
				culture = location.county.holder.culture
				faith = location.county.holder.faith
				trait = gregarious
				trait = greedy
				location = root.location
				save_scope_as = estate_owner
			}
			scope:estate_owner = { add_character_flag = created_estate_owner }	
		}
		#Cooldown between estate events
		add_character_flag = {
			flag = had_travel_farm_estate_event_recently
			years = 5
		}
	}
	#You should pay _me_
	option = {
		name = travel_events.2026.a
		add_gold = medium_gold_value
		#Big brother frowns on you
		scope:county_liege = {
			progress_towards_rival_effect = {
				CHARACTER = root
				OPINION = 0
				REASON = rival_abused_subjects_hospitality
			}
			add_opinion = {
				modifier = subject_hospitality_abused_opinion
				target = root
				opinion = -20
			}
		}
		stress_impact = {
			generous = major_stress_impact_gain
			gregarious = medium_stress_impact_gain
			arrogant = minor_stress_impact_loss
			greedy = minor_stress_impact_loss
		}
		ai_chance = {
			base = 100
			#Do we dislike the province owner?
			modifier = {
				OR = {
					opinion = {
						target = scope:county_liege
						value <= low_negative_opinion
					}
					has_relation_potential_rival = scope:county_liege
					has_relation_rival = scope:county_liege
				}
				add = 50
			}
			modifier = {
				has_trait = generous
				factor = 0
			}
			modifier = {
				has_trait = gregarious
				factor = 0.5
			}
			modifier = {
				has_trait = greedy
				factor = 2
			}
			ai_value_modifier = {
				ai_greed = 3
				ai_boldness = 2
				ai_honor = -1
				ai_compassion = -1
			}
		}
	}
	#Alright, I'll pay
	option = {
		name = travel_events.2026.b
		pay_short_term_gold = {
			target = scope:county_liege
			gold = medium_gold_value
		}
		scope:county_liege = {
			add_opinion = {
				modifier = subject_compensated_opinion
				target = root
				opinion = 20
			}
		}
		stress_impact = {
			arrogant = medium_stress_impact_gain
			greedy = major_stress_impact_gain
		}
		ai_chance = {
			modifier = {
				has_trait = greedy
				factor = 0.5
			}
			ai_value_modifier = {
				ai_compassion = 2
				ai_honor = 1
				ai_boldness = -1
				ai_greed = -3
			}
			modifier = {
				factor = 0
				gold <= major_gold_value
			}
		}
	}
	#I'm sure we can solve this somehow...
	option = {
		name = travel_events.2026.c
		trigger = {
			OR = {
				has_relation_friend = scope:county_liege
				diplomacy >= 10
			}
			scope:county_liege = {
				can_add_hook = {
					target = root
					type = favor_hook
				}
			}
		}
		scope:county_liege = {
			add_hook = {
				type = favor_hook
				target = root
			}
		}
		stress_impact = {
			paranoid = major_stress_impact_gain
		}
		ai_chance = {
			base = 150
			#Are we on friendly terms?
			modifier = {
				OR = {
					opinion = {
						target = scope:county_liege
						value <= medium_positive_opinion
					}
					has_relation_friend = scope:county_liege
				}
				add = 50
			}
			modifier = {
				has_trait = paranoid
				factor = 0.5
			}
			ai_value_modifier = {
				ai_greed = 3
				ai_sociability = 2
				ai_honor = 1
			}
		}
	}
	#The insolence!
	option = {
		name = travel_events.2026.d
		trigger = {
			OR = {
				has_trait = irritable
				has_trait = wrathful
				has_trait = vengeful
				has_trait = sadistic
				has_trait = callous
			}
		}
		add_dread = major_dread_gain
		rightfully_imprison_character_effect = {
			TARGET = scope:estate_owner
			IMPRISONER = root
		}
		current_travel_plan = {
			add_companion = scope:estate_owner
		}
		#What the h!
		scope:county_liege = {
			worsen_relationship_effect = {
				TARGET = root
				REASON = rival_imprisoned_subject
			}
			add_opinion = {
				modifier = subject_imprisoned_opinion
				target = root
				opinion = -20
			}
		}
		stress_impact = {
			compassionate = major_stress_impact_gain
			forgiving = medium_stress_impact_gain
			calm = medium_stress_impact_gain
		}
		ai_chance = {
			base = 150
			#Are we on friendly terms?
			modifier = {
				OR = {
					opinion = {
						target = scope:county_liege
						value <= medium_negative_opinion
					}
					has_relation_rival = scope:county_liege
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
					has_trait = calm
				}
				factor = 0
			}
			modifier = {
				involved_activity ?= {
					has_activity_type = activity_tour
					has_activity_option = {
						category = special_type
						option = tour_type_intimidation
					}
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_vengefulness = 3
				ai_boldness = 1
				ai_honor = -2
				ai_sociability = -2
			}
		}
	}
	after = {
		scope:estate_owner = {
			if = {
				limit = { 
					has_character_flag = created_estate_owner
					NOT = { is_imprisoned_by = root }
				}
				silent_disappearance_effect = yes
			}
		}
	}
}

#Visit your own quarry - Encounter angry workers
travel_events.2027 = { 
	type = character_event
	title = travel_events.2027.t
	desc = travel_events.2027.desc
	theme = travel
	left_portrait = {
		character = scope:foreman_character
		animation = disapproval
	}
	right_portrait = {
		character = scope:peasant_leader
		animation = personality_vengeful
	}
	#Now, who should we side with...
	lower_center_portrait = {
		character = root
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_landed = yes
		is_location_valid_for_travel_event_on_land = yes
		location = {
			has_building_or_higher = quarries_01
			county.holder = root
		}
		NOT = { has_character_flag = had_travel_quarry_event_recently }
	}
	immediate = {
		#Find a foreman
		if = {
			limit = {
				any_pool_character = {
					province = root.location
					is_available_healthy_adult = yes
					OR = {
						has_trait = sadistic
						has_trait = callous
						has_trait = deceitful
					}
					has_trait = greedy
					2003_lowborn_pool_person_trigger = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = {
					is_available_healthy_adult = yes
					OR = {
						has_trait = sadistic
						has_trait = callous
						has_trait = deceitful
					}
					has_trait = greedy
					2003_lowborn_pool_person_trigger = yes
				}
				save_scope_as = foreman_character
			}	
		}
		#Otherwise create someone
		else = {
			create_character = {
				template = estate_owner_character
				culture = location.county.holder.culture
				faith = location.county.holder.faith
				trait = callous
				trait = greedy
				location = root.location
				save_scope_as = foreman_character
			}
			scope:foreman_character = { add_character_flag = created_foreman_character }	
		}
		#Find a worker
		if = {
			limit = {
				any_pool_character = {
					province = root.location
					is_available_healthy_adult = yes
					stewardship >= medium_skill_rating
					has_trait = honest
					has_trait = brave
					2003_lowborn_pool_person_trigger = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = {
					is_available_healthy_adult = yes
					stewardship >= medium_skill_rating
					has_trait = honest
					has_trait = brave
					2003_lowborn_pool_person_trigger = yes
				}
				save_scope_as = peasant_leader
			}	
		}
		#Otherwise create someone
		else = {
			create_character = {
				template = estate_owner_character
				culture = location.county.holder.culture
				faith = location.county.holder.faith
				trait = honest
				trait = brave
				location = root.location
				save_scope_as = peasant_leader
			}
			scope:peasant_leader = { add_character_flag = created_peasant_leader }	
		}
		#Cooldown between quarry events
		add_character_flag = {
			flag = had_travel_quarry_event_recently
			years = 5
		}
	}
	#Safe and nourished workers are more effective
	option = {
		name = travel_events.2027.a
		remove_short_term_gold = major_gold_value
		location.county = {
			add_county_modifier = {
				modifier = travel_wellfed_workers_modifier
				years = 10
			}
		}
		if = {
			limit = { 
				any_secret = { type = secret_cannibal }
			}
			stress_impact = {
				base = minor_stress_impact_gain
				generous = major_stress_impact_loss
				sadistic = minor_stress_impact_gain
				callous = minor_stress_impact_gain
				arrogant = medium_stress_impact_gain
				greedy = major_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				generous = major_stress_impact_loss
				sadistic = minor_stress_impact_gain
				callous = minor_stress_impact_gain
				arrogant = medium_stress_impact_gain
				greedy = major_stress_impact_gain
				cannibal = minor_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				is_cannibal_trigger = yes
				factor = 0.5
			}
			ai_value_modifier = {
				ai_compassion = 3
				ai_honor = 2
				ai_sociability = 2
				ai_rationality = 1
				ai_boldness = 1
				ai_greed = -3
			}
			modifier = {
				factor = 0
				gold <= massive_gold_value
			}
		}
	}
	#Hunger is a great motivation
	option = {
		name = travel_events.2027.b
		location.county = {
			add_county_modifier = {
				modifier = travel_indifferent_liege_modifier
				years = 10
			}
		}
		if = {
			limit = { 
				any_secret = { type = secret_cannibal } 
			}
			stress_impact = {
				base = minor_stress_impact_gain
				compassionate = medium_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				compassionate = medium_stress_impact_gain
				cannibal = minor_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				is_cannibal_trigger = yes
				factor = 0.5
			}
			ai_value_modifier = {
				ai_greed = 3
				ai_boldness = 1
				ai_sociability = -1
				ai_honor = -2
				ai_compassion = -3
			}
		}
	}
	#Sadist: How dare they want food
	option = {
		name = travel_events.2027.c
		trigger = {
			OR = {
				has_trait = sadistic
				has_trait = callous
			}
		}
		scope:peasant_leader = { 
			increase_wounds_effect = { REASON = whipping } 
		}
		location.county = {
			add_county_modifier = {
				modifier = travel_cruel_liege_modifier
				years = 10
			}
		}
		add_dread = medium_dread_gain
		if = {
			limit = { 
				any_secret = { type = secret_cannibal } 
			}
			stress_impact = {
				base = minor_stress_impact_gain
				compassionate = major_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				compassionate = major_stress_impact_gain
				cannibal = minor_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				is_cannibal_trigger = yes
				factor = 0.5
			}
			modifier = {
				dread > 50
				add = 50
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_energy = 2
				ai_greed = 1
				ai_sociability = -1
				ai_honor = -2
				ai_compassion = -5
			}
		}
	}
	#Cannibal: Eat the rich
	option = {
		name = travel_events.2027.d
		trigger = {
			OR = {
				is_cannibal_trigger = yes
				faith = {
					has_doctrine_parameter = cannibalism_legal
				}
			}
		}
		#Cannibalism legal
		if = {
			limit = {
				NOT = {
					faith = {
						has_doctrine_parameter = cannibalism_legal
					}
				}
			}
			add_piety = major_piety_loss
			stress_impact = {
				zealous = major_stress_impact_gain
				paranoid = major_stress_gain
				compassionate = medium_stress_impact_gain
			}
		}
		#Cannibalism illegal
		else = {
			stress_impact = {
				paranoid = major_stress_gain
				compassionate = medium_stress_impact_gain
			}
		}
		add_character_modifier = {
			modifier = travel_rich_dining_modifier
			years = 10
		}
		location.county = {
			add_county_modifier = {
				modifier = travel_fine_dining_workers_modifier
				years = 10
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				has_trait = zealous
				factor = 0.5
			}
			ai_value_modifier = {
				ai_boldness = 3
				ai_energy = 2
				ai_honor = -2
				ai_zeal = -3
			}
		}
	}
	after = {
		scope:foreman_character = {
			if = {
				limit = { has_character_flag = created_foreman_character }
				silent_disappearance_effect = yes
			}
		}
		scope:peasant_leader = {
			if = {
				limit = { has_character_flag = created_peasant_leader }
				silent_disappearance_effect = yes
			}
		}
	}
}

scripted_effect create_blueprint_artifact_effect = {
	create_artifact = {	
		name = holding_blueprint
		description = holding_blueprint_desc
		type = miscellaneous
		visuals = scroll
		modifier = artifact_learning_1_modifier
		creator = scope:budding_architect
		save_scope_as = new_blueprint
	}
	#City blueprint
	if = {
		limit = {
			root = {
				exists = var:holding_type
				var:holding_type = flag:city
			}
		}
		scope:new_blueprint = {
			add_artifact_modifier = artifact_city_holding_build_speed_add_2_modifier
		}
	}
	#Church blueprint
	if = {
		limit = {
			root = {
				exists = var:holding_type
				var:holding_type = flag:church
			}
		}
		scope:new_blueprint = {
			add_artifact_modifier = artifact_church_holding_build_speed_add_2_modifier
		}
	}
	#Castle blueprint
	if = {
		limit = {
			root = {
				exists = var:holding_type
				var:holding_type = flag:castle
			}
		}
		scope:new_blueprint = {
			add_artifact_modifier = artifact_castle_holding_build_speed_add_2_modifier
		}
	}
	#Tribal blueprint
	if = {
		limit = {
			root = {
				exists = var:holding_type
				var:holding_type = flag:tribal
			}
		}
		scope:new_blueprint = {
			add_artifact_modifier = artifact_tribal_holding_build_speed_add_2_modifier
		}
	}
}

#Visit someone else's quarry - Encounter an architect
travel_events.2028 = { 
	type = character_event
	title = travel_events.2028.t
	desc = travel_events.2028.desc
	theme = travel
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				OR = {
					has_trait = callous
					has_trait = cynical
				}
			}
			animation = personality_cynical
		}
		animation = admiration
	}
	right_portrait = {
		character = scope:budding_architect
		animation = personality_content
	}
	artifact = {
		target = scope:new_blueprint
		position = lower_center_portrait
		trigger = { exists = scope:new_blueprint }
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = {
			has_building_or_higher = quarries_01
			county.holder != root
		}
		NOT = { has_character_flag = had_travel_quarry_event_recently }
	}
	immediate = {
		#Find an architect
		if = {
			limit = {
				any_pool_character = {
					province = root.location
					is_available_healthy_adult = yes
					stewardship >= high_skill_rating
					has_trait = diligent
					has_trait = ambitious
					2003_lowborn_pool_person_trigger = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = {
					is_available_healthy_adult = yes
					stewardship >= high_skill_rating
					has_trait = diligent
					has_trait = ambitious
					2003_lowborn_pool_person_trigger = yes
				}
				save_scope_as = budding_architect
			}
		}
		#Otherwise create someone
		else = {
			create_character = {
				template = estate_owner_character
				culture = location.county.holder.culture
				faith = location.county.holder.faith
				stewardship = {
					min_template_high_skill
					max_template_high_skill
				}
				trait = diligent
				trait = ambitious
				location = root.location
				save_scope_as = budding_architect
			}
			scope:budding_architect = { add_character_flag = created_budding_architect }	
		}
		hidden_effect = {
			#Check what kind of holdings are valid for us
			random_list = {
				1 = {
					trigger = {
						NOT = { government_has_flag = government_is_tribal }
					}
					set_variable = {
						name = holding_type
						value = flag:city
					}
				}
				1 = {
					trigger = {
						NOT = { government_has_flag = government_is_tribal }
					}
					set_variable = {
						name = holding_type
						value = flag:church
					}
				}
				1 = {
					trigger = {
						NOT = { government_has_flag = government_is_tribal }
					}
					set_variable = {
						name = holding_type
						value = flag:castle
					}
				}
				1 = {
					trigger = { government_has_flag = government_is_tribal }
					set_variable = {
						name = holding_type
						value = flag:tribal
					}
				}
			}
			#Set up our architect and artifact
			scope:budding_architect = {
				add_trait = architect
				create_blueprint_artifact_effect = yes
			}	
		}
		#Cooldown between quarry events
		add_character_flag = {
			flag = had_travel_quarry_event_recently
			years = 5
		}
	}
	#I'd like to buy a blueprint
	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { has_trait = architect }
						desc = travel_events.2028.a_architect
					}
					triggered_desc = {
						desc = travel_events.2028.a
					}
				}
			}
		}
		send_interface_toast = {
			type = event_toast_effect_good
			left_icon = scope:new_blueprint
			title = holding_blueprint
			remove_short_term_gold = medium_gold_value
			scope:new_blueprint = {
				set_owner = root
			}
		}
		stress_impact = {
			generous = minor_stress_impact_loss
			greedy = major_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				has_trait = architect
				add = 50
			}
			ai_value_modifier = {
				ai_rationality = 2
				ai_boldness = 1
				ai_greed = -3
			}
			modifier = {
				has_trait = greedy
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = generous
					has_trait = profligate
				}
				factor = 2
			}
			modifier = {
				short_term_gold <= major_gold_value
				factor = 0
			}
		}
	}
	#You should become my court architect!
	option = {
		name = travel_events.2028.b
		trigger = {
			has_royal_court = yes
			can_employ_court_position_type = royal_architect_court_position
		}
		custom_tooltip = travel_events.2028.b.tt
		remove_short_term_gold = medium_gold_value
		add_character_flag = hired_architect
		add_courtier = scope:budding_architect
		court_position_grant_effect = {
			CANDIDATE = scope:budding_architect
			EMPLOYER = root
			POS = royal_architect
		}
		current_travel_plan = {
			add_companion = scope:budding_architect
		}
		scope:budding_architect = {
			add_opinion = {
				modifier = recruited_me_opinion
				target = root
				opinion = 50
			}
			set_variable = {
				name = trainee_salary
				years = 20
			}
		}
		stress_impact = {
			greedy = medium_stress_impact_gain
			paranoid = medium_stress_impact_gain
			architect = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				has_trait = architect
				add = 50
			}
			ai_value_modifier = {
				ai_rationality = 2
				ai_boldness = 2
				ai_greed = -4
			}
			modifier = {
				has_trait = greedy
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = generous
					has_trait = profligate
				}
				factor = 2
			}
			modifier = {
				has_trait = paranoid
				factor = 0
			}
			modifier = {
				factor = 0
				gold <= major_gold_value
			}
		}
	}
	#Too rich for my taste
	option = {
		name = travel_events.2028.c
		stress_impact = {
			diligent = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				has_trait = greedy
				factor = 2
			}
			modifier = {
				short_term_gold < medium_gold_value
				factor = 0
			}
			modifier = {
				OR = {
					has_trait = generous
					has_trait = profligate
				}
				factor = 2
			}
			modifier = {
				has_trait = architect
				add = 50
			}
			modifier = {
				has_trait = paranoid
				add = -50
			}
			ai_value_modifier = {
				ai_greed = 3
				ai_rationality = 1
				ai_boldness = -1
			}
		}
	}
	after = {
		if = {
			limit = {
				NOT = { has_character_flag = hired_architect }
			}
			scope:budding_architect = {
				if = {
					limit = { 
						has_character_flag = created_budding_architect
					}
					silent_disappearance_effect = yes
				}
				if = {
					limit = { is_alive = yes }
					hidden_effect = {
						remove_trait = architect
					}
				}
			}
		}
		remove_variable = holding_type
		remove_character_flag = hired_architect
	}
}

#Visit a cereal field - Encounter a heathen
travel_events.2029 = {
	type = character_event
	title = travel_events.2029.t
	desc = travel_events.2029.desc
	theme = travel
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				has_trait = zealous
			}
			animation = rage
		}
		triggered_animation = {
			trigger = {
				OR = {
					has_trait = paranoid
					has_trait = lunatic
				}	
			}
			animation = paranoia
		}
		animation = disbelief
	}
	right_portrait = {
		character = scope:crop_circler
		animation = personality_irrational
	}
	lower_left_portrait = {
		trigger = { exists = scope:entourage_chaplain }
		character = scope:entourage_chaplain
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = {
			has_building_or_higher = cereal_fields_01
		}
		faith = location.county.faith
		faith.religion != religion:confucianism_religion
		location_has_winter_trigger = no
		NOR = { 
			has_character_flag = had_travel_cereal_field_event_recently
		}
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small }
		#Chaplain won't look kindly on you blaspheming your religion
		if = {
			limit = { 
				current_travel_plan = {
					any_entourage_character = {
						OR = {
							has_council_position = councillor_court_chaplain
							has_court_position = camp_priest_camp_officer
						}
					}
				}
			}
			current_travel_plan = {
				random_entourage_character = {
					limit = {
						OR = {
							has_council_position = councillor_court_chaplain
							has_court_position = camp_priest_camp_officer
						}
					}
					save_scope_as = entourage_chaplain
				}
			} 
		}
		#Find a crop circler
		if = {
			limit = {
				any_pool_character = {
					province = root.location
					is_available_healthy_adult = yes
					has_trait = lunatic
					2003_lowborn_pool_person_trigger = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = {
					is_available_healthy_adult = yes
					has_trait = lunatic
					2003_lowborn_pool_person_trigger = yes
				}
				save_scope_as = crop_circler
			}
		}
		#Otherwise create someone
		else = {
			create_character = {
				template = generic_peasant_character
				culture = location.county.culture
				faith = location.county.faith
				trait = lunatic_1
				location = root.location
				save_scope_as = crop_circler
			}
			scope:crop_circler = { add_character_flag = created_crop_circler }	
		}
		scope:crop_circler = {
			add_secret = {
				type = secret_non_believer
			}
			random_secret = {
				type = secret_non_believer
				reveal_to = root
			}
		}
		#Cooldown between cereal farm events
		add_character_flag = {
			flag = had_travel_cereal_field_event_recently
			years = 5
		}
	}
	#Stop that, you blasphemer
	option = {
		name = travel_events.2029.a
		add_piety = medium_piety_gain
		if = {
			limit = {
				exists = scope:entourage_chaplain
			}
			scope:entourage_chaplain = {
				add_opinion = {
					modifier = stopped_heretic_opinion
					target = root
					opinion = 20
				}
				progress_towards_friend_effect = {
					CHARACTER = root
					OPINION = 0
					REASON = friend_stopped_heresy
				}
			}
		}
		stress_impact = {
			cynical = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			#Do we like the chaplain?
			modifier = {
				trigger_if = {
					limit = { exists = scope:entourage_chaplain }
					OR = {
						opinion = {
							target = scope:entourage_chaplain
							value >= low_positive_opinion
						}
						has_relation_potential_friend = scope:entourage_chaplain
						has_relation_friend = scope:entourage_chaplain
					}
				}
				trigger_else = {
					always = no
				}
				add = 50
			}
			modifier = {
				has_trait = zealous
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = arbitrary
					has_trait = cynical
				}
				factor = 0.5
			}
			ai_value_modifier = {
				ai_zeal = 2
				ai_boldness = 2
				ai_honor = 2
			}
		}
	}
	#How dare you spread heresy
	option = {
		name = travel_events.2029.b
		trigger = { 
			has_trait = zealous
		}
		add_piety = major_piety_gain
		rightfully_imprison_character_effect = {
			TARGET = scope:crop_circler
			IMPRISONER = root
		}
		current_travel_plan = {
			add_companion = scope:crop_circler
		}
		if = {
			limit = {
				exists = scope:entourage_chaplain
			}
			scope:entourage_chaplain = {
				add_opinion = {
					modifier = imprisoned_heretic_opinion
					target = root
					opinion = 20
				}
				improve_relationship_effect = {
					TARGET = root
					REASON = friend_imprisoned_heretic
				}
			}
		}
		stress_impact = {
			compassionate = major_stress_impact_gain
			forgiving = medium_stress_impact_gain
			zealous = medium_stress_impact_loss
			sadistic = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			#Do we like the chaplain?
			modifier = {
				trigger_if = {
					limit = { exists = scope:entourage_chaplain }
					OR = {
						opinion = {
							target = scope:entourage_chaplain
							value >= low_positive_opinion
						}
						has_relation_potential_friend = scope:entourage_chaplain
						has_relation_friend = scope:entourage_chaplain
					}
				}
				trigger_else = {
					always = no
				}
				add = 50
			}
			modifier = {
				has_trait = sadistic
				add = 50
			}
			modifier = {
				has_trait = zealous
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = arbitrary
					has_trait = cynical
				}
				factor = 0.5
			}
			ai_value_modifier = {
				ai_zeal = 3
				ai_boldness = 2
				ai_vengefulness = 2
				ai_compassion = -2
			}
		}
	}
	#Tell me more about this...
	option = {
		name = travel_events.2029.c
		trigger = {
			OR = {
				has_trait = paranoid
				has_trait = lunatic_1
				has_trait = lunatic_genetic
				has_trait = eccentric
			}
			NOR = {
				any_secret = {
					type = secret_non_believer
				}
				has_trait = zealous
			}
		}
		add_piety = medium_piety_loss
		add_secret = {
			type = secret_non_believer
		}
		stress_impact = {
			zealous = massive_stress_impact_gain
		}
		ai_chance = {
			base = 100
			#Do we like the chaplain?
			modifier = {
				trigger_if = {
					limit = { exists = scope:entourage_chaplain }
					OR = {
						opinion = {
							target = scope:entourage_chaplain
							value <= low_positive_opinion
						}
						has_relation_potential_friend = scope:entourage_chaplain
						has_relation_friend = scope:entourage_chaplain
					}
				}
				trigger_else = {
					always = no
				}
				add = -50
			}
			modifier = {
				has_trait = lunatic
				add = 50
			}
			modifier = {
				has_trait = possessed
				add = 50
			}
			ai_value_modifier = {
				ai_boldness = 3
				ai_compassion = 2
				ai_rationality = -2
				ai_zeal = -3
			}
		}
	}
	#Alright, keep doing that, weirdo
	option = {
		name = travel_events.2029.d
		#If our chaplain exists and is an unbeliever
		if = {
			limit = {
				exists = scope:entourage_chaplain
				scope:entourage_chaplain = {
					any_secret = {
						type = secret_non_believer
						NOT = { is_known_by = root }
					}
					OR = {
						opinion = {
							target = root
							value >= medium_positive_opinion
						}
						has_relation_friend = root
					}
				}
			}
			trigger_event = travel_events.2030
		}
		#If the chaplain exists and is not an unbeliever, we're in trouble
		else_if = {
			limit = {
				exists = scope:entourage_chaplain
			}
			scope:entourage_chaplain = {
				add_opinion = {
					modifier = did_not_stop_heresy_opinion
					target = root
					opinion = -20
				}
			}
		}
		stress_impact = {
			base = minor_stress_impact_loss
			zealous = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			#Do we like the chaplain?
			modifier = {
				trigger_if = {
					limit = { exists = scope:entourage_chaplain }
					OR = {
						opinion = {
							target = scope:entourage_chaplain
							value <= low_positive_opinion
						}
						has_relation_potential_friend = scope:entourage_chaplain
						has_relation_friend = scope:entourage_chaplain
					}
				}
				trigger_else = {
					always = no
				}
				add = -50
			}
			modifier = {
				has_trait = zealous
				factor = 0
			}
			ai_value_modifier = {
				ai_compassion = 2
				ai_rationality = 1
				ai_energy = -1
				ai_zeal = -3
			}
		}
	}
	after = {
		scope:crop_circler = {
			if = {
				limit = { 
					has_character_flag = created_crop_circler
					is_imprisoned = no
					root = { is_ai = yes }
				}
				silent_disappearance_effect = yes
			}
		}
	}
}

#Chaplain turns out to be secret non-believer follow-up
travel_events.2030 = { 
	type = character_event
	title = travel_events.2030.t
	desc = travel_events.2030.desc
	theme = travel
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				has_trait = zealous
			}
			animation = disbelief
		}
		triggered_animation = {
			trigger = { has_trait = lunatic }
			animation = personality_irrational
		}
		animation = personality_rational
	}
	right_portrait = {
		character = scope:entourage_chaplain
		animation = personality_irrational
	}
	immediate = {
		scope:entourage_chaplain = {
			random_secret = {
				type = secret_non_believer
				reveal_to = root
				save_scope_as = non_believer_secret
			}
		}
	}
	#That's alright...
	option = {
		name = travel_events.2030.a
		scope:entourage_chaplain = {
			add_opinion = {
				modifier = did_not_tell_my_secret
				target = root
				opinion = 20
			}
			improve_relationship_effect = {
				TARGET = root
				REASON = friend_accepted_secret
			}
		}
		stress_impact = {
			zealous = major_stress_impact_gain
			honest = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			#Do we like the chaplain?
			modifier = {
				OR = {
					opinion = {
						target = scope:entourage_chaplain
						value <= low_positive_opinion
					}
					has_relation_potential_friend = scope:entourage_chaplain
					has_relation_friend = scope:entourage_chaplain
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = deceitful
					has_trait = compassionate
					has_trait = forgiving
					any_secret = { type = secret_non_believer }
				}
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = zealous
					has_trait = honest
				}
				factor = 0.5
			}
			ai_value_modifier = {
				ai_compassion = 2
				ai_honor = 2
				ai_rationality = 2
				ai_boldness = -1
				ai_zeal = -3
			}
		}
	}
	#This is _not_ alright
	option = {
		name = travel_events.2030.b
		scope:non_believer_secret = {
			expose_secret = root
		}
		add_piety = medium_piety_gain
		scope:entourage_chaplain = {
			add_opinion = {
				modifier = exposed_my_secret_opinion
				target = root
				opinion = -20
			}
			progress_towards_rival_effect = {
				CHARACTER = root
				OPINION = 0
				REASON = rival_exposed_secret
			}
		}
		stress_impact = {
			zealous = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			#Do we like the chaplain?
			modifier = {
				OR = {
					opinion = {
						target = scope:entourage_chaplain
						value <= low_positive_opinion
					}
					has_relation_potential_friend = scope:entourage_chaplain
					has_relation_friend = scope:entourage_chaplain
				}
				add = -50
			}
			modifier = {
				OR = {
					has_trait = deceitful
					has_trait = compassionate
					has_trait = forgiving
					any_secret = { type = secret_non_believer }
				}
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = zealous
					has_trait = honest
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_zeal = 3
				ai_boldness = 2
				ai_rationality = 1
				ai_honor = -1
				ai_compassion = -3
			}
		}
	}
}

#Visit another cereal field - Encounter a gardener
travel_events.2031 = { 
	type = character_event
	title = travel_events.2031.t
	desc = travel_events.2031.desc
	theme = travel
	left_portrait = {
		character = root
		animation = personality_compassionate
	}
	right_portrait = {
		character = scope:gardener_character
		animation = personality_zealous
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling_adult = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = {
			has_building_or_higher = cereal_fields_01
		}
		middle_of_year_season_trigger = yes
		NOT = { has_character_flag = had_travel_cereal_field_event_recently }
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_very_small }
		#Find a gardener
		mp_delay_travel_plan = { DAYS = 90 }
		if = {
			limit = {
				any_pool_character = {
					province = root.location
					is_available_healthy_adult = yes
					has_trait = lifestyle_gardener
					2003_lowborn_pool_person_trigger = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = {
					is_available_healthy_adult = yes
					has_trait = lifestyle_gardener
					2003_lowborn_pool_person_trigger = yes
				}
				save_scope_as = gardener_character
			}
		}
		#Otherwise create someone
		else = {
			create_character = {
				template = generic_peasant_character
				culture = location.county.culture
				faith = location.county.faith
				trait = lifestyle_gardener
				location = root.location
				save_scope_as = gardener_character
			}
			scope:gardener_character = { add_character_flag = created_gardener }	
		}
		hidden_effect = {
			scope:gardener_character = {
				give_nickname = nick_the_green
			}
		}
		#Cooldown between cereal farm events
		add_character_flag = {
			flag = had_travel_cereal_field_event_recently
			years = 5
		}
	}
	#Stay a while, and listen
	option = {
		name = travel_events.2031.a
		add_prestige = medium_prestige_loss
		current_travel_plan = {
			delay_travel_plan = { days = 14 }
		}
		random_list = {
			1 = {
				trigger = {
					NOT = { has_trait = lifestyle_gardener }
				}
				modifier = {
					has_trait = lifestyle_herbalist
					add = 2
				}
				add_trait = lifestyle_gardener
			}
			1 = {
				send_interface_toast = {
					type = event_toast_effect_good
					left_icon = root
					title = travel_events.2031.a_down_to_earth.t
					add_character_modifier = {
						modifier = travel_down_to_earth_modifier
						years = 10
					}
				}
			}
		}
		stress_impact = {
			impatient = medium_stress_impact_gain
			arrogant = minor_stress_impact_gain
			cynical = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			#Smells like heresy to me
			modifier = {
				has_trait = zealous
				add = -50
			}
			modifier = {
				OR = {
					has_trait = impatient
					has_trait = arrogant
					has_trait = cynical
				}
				factor = 0.5
			}
			modifier = {
				has_trait = lifestyle_herbalist
				NOT = { has_trait = lifestyle_gardener }
				factor = 2
			}
			modifier = {
				prestige <= minor_prestige_value
				factor = 0
			}
			ai_value_modifier = {
				ai_rationality = 3
				ai_energy = 2 
				ai_sociability = 1
				ai_zeal = -3
			}
		}
	}
	#Ain't got time for this
	option = {
		name = travel_events.2031.b
		if = {
			limit = {
				has_trait = lifestyle_herbalist
				NOT = { has_trait = lifestyle_gardener }
			}
			stress_impact = {
				lifestyle_herbalist = medium_stress_impact_gain
				ambitious = minor_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				ambitious = minor_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				has_trait = zealous
				add = 50
			}
			modifier = {
				OR = {
					has_trait = impatient
					has_trait = arrogant
					has_trait = cynical
				}
				factor = 2
			}
			modifier = {
				has_trait = lifestyle_herbalist
				NOT = { has_trait = lifestyle_gardener }
				factor = 0.5
			}
			ai_value_modifier = {
				ai_zeal = 3
				ai_sociability = -1
				ai_energy = -2
				ai_rationality = -3
			}
		}
	}
	after = {
		mp_resume_travel_plan = yes
		scope:gardener_character = {
			if = {
				limit = { has_character_flag = created_gardener }
				silent_disappearance_effect = yes
			}
		}
	}
}

#Visit a forest fort/ramparts - Encounter a herbalist/physician
travel_events.2032 = { 
	type = character_event
	title = travel_events.2032.t
	desc = travel_events.2032.desc
	theme = travel
	override_background = { reference = wilderness }
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { has_trait = lunatic }
			animation = personality_irrational
		}
		animation = personality_rational
	}
	right_portrait = {
		character = scope:herbalist_character
		animation = personality_irrational
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling_adult = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = {
			has_building_or_higher = ramparts_01
		}
		middle_of_year_season_trigger = yes
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_very_small }
		mp_delay_travel_plan = { DAYS = 90 }
		#Find a herbalist
		if = {
			limit = {
				any_pool_character = {
					province = root.location
					is_available_healthy_adult = yes
					learning >= high_skill_rating
					has_trait = lifestyle_herbalist
					has_trait = lunatic
					has_trait = lifestyle_physician
					2003_lowborn_pool_person_trigger = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = {
					is_available_healthy_adult = yes
					learning >= high_skill_rating
					has_trait = lifestyle_herbalist
					has_trait = lunatic
					has_trait = lifestyle_physician
					2003_lowborn_pool_person_trigger = yes
				}
				save_scope_as = herbalist_character
			}
		}
		#Otherwise create someone
		else = {
			create_character = {
				template = learning_medicine_focus_friend_template
				culture = location.county.culture
				faith = location.county.faith
				learning = {
					min_template_high_skill
					max_template_high_skill
				}
				trait = lifestyle_herbalist
				trait = lunatic_1
				trait = lifestyle_physician
				location = root.location
				save_scope_as = herbalist_character
			}
			scope:herbalist_character = { add_character_flag = created_herbalist }	
		}
	}
	#Herbs? Cool!
	option = {
		name = travel_events.2032.a
		add_prestige = medium_prestige_loss
		current_travel_plan = {
			delay_travel_plan = { days = 14 }
		}
		random_list = {
			1 = {
				trigger = {
					NOT = { has_trait = lifestyle_herbalist }
				}
				modifier = {
					has_trait = lifestyle_gardener
					add = 2
				}
				add_trait = lifestyle_herbalist
			}
			1 = {
				custom_tooltip = travel_events.2032.a_poisonous.tt
				#Let's only go with the last set of herbs
				send_interface_toast = {
					type = event_toast_text_good
					left_icon = root
					title = travel_events.2032.a_poisonous.t
					desc = travel_events.2032.a_poisonous.desc
					if = {
						limit = { exists = var:poisonous_herbs }
						remove_variable = poisonous_herbs
						set_variable = {
							name = poisonous_herbs
							value = location
						}
					}
					else = {
						set_variable = {
							name = poisonous_herbs
							value = location
						}
					}
				}
			}
			1 = {
				send_interface_toast = {
					type = event_toast_effect_good
					left_icon = root
					title = travel_events.2032.a_learning.tt
					add_learning_skill = 1
				}
			}
		}
		stress_impact = {
			impatient = medium_stress_impact_gain
			arrogant = minor_stress_impact_gain
			cynical = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = impatient
					has_trait = arrogant
					has_trait = cynical
					has_trait = paranoid
				}
				factor = 0.5
			}
			modifier = {
				has_trait = lifestyle_gardener
				NOT = { has_trait = lifestyle_herbalist }
				factor = 2
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_rationality = 2
				ai_sociability = 1
				ai_zeal = -2
			}
		}
	}
	#You should become my court physician
	option = {
		name = travel_events.2032.b
		trigger = {
			can_employ_court_position_type = court_physician_court_position
		}
		remove_short_term_gold = minor_gold_value
		add_character_flag = hired_physician
		add_courtier = scope:herbalist_character
		court_position_grant_effect = {
			CANDIDATE = scope:herbalist_character
			EMPLOYER = root
			POS = court_physician
		}
		current_travel_plan = {
			add_companion = scope:herbalist_character
		}
		scope:herbalist_character = {
			add_opinion = {
				modifier = recruited_me_opinion
				target = root
				opinion = 50
			}
		}
		stress_impact = {
			greedy = medium_stress_impact_gain
			paranoid = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					short_term_gold < medium_gold_value
					has_trait = paranoid
				}
				factor = 0
			}
			modifier = {
				has_trait = lunatic
				factor = 2
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_rationality = -1
			}
		}
	}
	#Ain't got time for this
	option = {
		name = travel_events.2032.c
		if = {
			limit = {
				has_trait = lifestyle_gardener
				NOT = { has_trait = lifestyle_herbalist }
			}
			stress_impact = {
				lifestyle_gardener = medium_stress_impact_gain
				ambitious = minor_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				ambitious = minor_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = impatient
					has_trait = arrogant
					has_trait = cynical
				}
				add = 50
			}
			ai_value_modifier = {
				ai_zeal = 3
				ai_sociability = -1
				ai_rationality = -1
			}
		}
	}
	after = {
		mp_resume_travel_plan = yes
		if = {
			limit = {
				NOT = { has_character_flag = hired_physician }
			}
			scope:herbalist_character = {
				if = {
					limit = { 
						has_character_flag = created_herbalist
					}
					silent_disappearance_effect = yes
				}
			}
		}
		remove_character_flag = hired_physician
	}
}

scripted_effect 2033_clean_up_escaped_prisoner_effect = {
	hidden_effect = {
		if = {
			limit = {
				root = { is_alive = yes }
			}
			if = {
				limit = {
					scope:prisoner = {
						is_spouse_of = root
					}
				}
				divorce = scope:prisoner
			}
			if = {
				limit = {
					scope:prisoner = {
						is_concubine_of = root
					}
				}
				remove_concubine = scope:prisoner
			}
			if = {
				limit = {
					is_courtier_of = root
				}
				remove_courtier_or_guest = scope:prisoner
			}
			current_travel_plan = {
				remove_character = scope:prisoner
			}
		}
		scope:prisoner = {
			depose_effect = { DEPOSER = root }
		}
	}
}

scripted_trigger 2033_suitable_prisoner_trigger = {
	is_travelling = yes
	is_imprisoned_by = root
	NOT = { exists = var:2033_escaped_previously }
	#To avoid character view tracking
	NOT = { is_close_or_extended_family_of = root }
	is_ai = yes
}

scripted_trigger 2033_is_sadistically_inclined_trigger = {
	OR = {
		has_trait = sadistic
		has_trait = callous
		has_trait = torturer
		has_trait = arbitrary
	}
}

#Visit some hunting grounds - If you have a prisoner with you; manhunt!
travel_events.2033 = { 
	type = character_event
	title = travel_events.2033.t
	desc = {
		desc = travel_events.2033.desc_intro
		first_valid = {
			#It's our initiative to hunt them
			triggered_desc = {
				trigger = { 
					OR = {
						2033_is_sadistically_inclined_trigger = yes
						is_cannibal_trigger = yes
					}
					scope:prisoner = { is_adult = yes }
				}
				desc = travel_events.2033.desc_manhunt
			}
		}
		first_valid = {
			#We have manhunted before...
			triggered_desc = {
				trigger = {
					exists = var:has_manhunted
					OR = {
						2033_is_sadistically_inclined_trigger = yes
						is_cannibal_trigger = yes
					}
					scope:prisoner = { is_adult = yes }
				}
				desc = travel_events.2033.desc_manhunt_previous
			}
			#First manhunt
			triggered_desc = {
				trigger = { 
					OR = {
						2033_is_sadistically_inclined_trigger = yes
						is_cannibal_trigger = yes
					}
					scope:prisoner = { is_adult = yes }
				}
				desc = travel_events.2033.desc_manhunt_first
			}
			#The prisoner escapes; catch them?
			triggered_desc = {
				desc = travel_events.2033.desc
			}
		}
	}
	theme = travel
	override_background = { reference = wilderness }
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { 
				OR = {
					2033_is_sadistically_inclined_trigger = yes
					is_cannibal_trigger = yes
				}
				scope:prisoner = { is_adult = yes }
			}
			animation = schadenfreude
		}
		animation = stress
	}
	right_portrait = {
		character = scope:prisoner
		override_imprisonment_visuals = yes
		triggered_animation = {
			trigger = {
				OR = {
					2033_is_sadistically_inclined_trigger = yes
					is_cannibal_trigger = yes
				}
				scope:prisoner = { is_adult = yes }
			}
			animation = fear
		}
		animation = paranoia
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location = {
			has_building_or_higher = hunting_grounds_01
		}
		current_travel_plan = {
			any_entourage_character = {
				2033_suitable_prisoner_trigger = yes
			}
		}
		NOT = { has_character_flag = had_travel_hunting_grounds_event_recently } 
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small }
		current_travel_plan = {
			random_entourage_character = {
				limit = {
					2033_suitable_prisoner_trigger = yes
				}
				save_scope_as = prisoner
			}
		}
		#Cooldown between hunting ground events
		add_character_flag = {
			flag = had_travel_hunting_grounds_event_recently
			years = 5
		}
	}
	#Let's hunt!
	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { is_cannibal_trigger = yes }
						desc = travel_events.2033.a_cannibal
					}
					triggered_desc = {
						trigger = { 2033_is_sadistically_inclined_trigger = yes }
						desc = travel_events.2033.a_manhunt
					}
				}
			}
		}
		trigger = {
			OR = {
				is_cannibal_trigger = yes
				2033_is_sadistically_inclined_trigger = yes
			}
			scope:prisoner = { is_adult = yes }
		}
		custom_tooltip = travel_events.2033.a_manhunt_tt
		#We know what you did
		set_variable = {
			name = has_manhunted
		}
		add_dread = major_dread_gain
		add_character_modifier = {
			modifier = travel_manhunted_prisoner_modifier
			years = 10
		}
		duel = {
			skills = { learning prowess }
			target = scope:prisoner
			#Death
			25 = {
				desc = travel_events.2033.a_manhunt.desc
				trigger = {
					scope:prisoner = {
						NOT = { has_relation_rival = root }
					}
					is_cannibal_trigger = no
				}
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				modifier = {
					location_has_winter_trigger = yes
					add = 25
				}
				#To make the portrait look good
				hidden_effect = {
					scope:prisoner = {
						release_from_prison = yes
					}
				}
				send_interface_toast = {
					type = event_toast_effect_neutral
					left_icon = root
					right_icon = scope:prisoner
					title = travel_events.2033.a_manhunt.tt
					scope:prisoner = {
						death = {
							death_reason = death_manhunted
							killer = root
						}
					}
				}
			}
			#Death and create a skull cup
			25 = {
				desc = travel_events.2033.a_caught_trophy.desc
				trigger = {
					scope:prisoner = { has_relation_rival = root }
					is_cannibal_trigger = no
				}
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				modifier = {
					location_has_winter_trigger = yes
					add = 25
				}
				hidden_effect_new_object = {
					create_artifact = {
						name = manhunt_skull_cup
						description = manhunt_skull_cup_desc
						type = miscellaneous
						visuals = skull_goblet
						modifier = artifact_tyranny_gain_mult_1_modifier
						modifier = artifact_dread_gain_mult_2_modifier
						save_scope_as = new_skull_cup
					}
					scope:new_skull_cup = {
						set_variable = {
							name = skull_origin
							value = scope:prisoner
						}
						#To circumvent variable-not-used errors :angery:
						if = {
							limit = { exists = var:skull_origin }
							set_artifact_description = manhunt_skull_cup_desc
						}
						#This should never happen
        				else = {
        					set_artifact_description = manhunt_skull_cup_desc_fallback
        				}
					}
				}
				send_interface_toast = {
					type = event_toast_effect_neutral
					left_icon = root
					right_icon = scope:new_skull_cup
					title = travel_events.2033.a_manhunt.tt
					scope:prisoner = {
						death = {
							death_reason = death_manhunted
							killer = root
						}
					}
					show_as_tooltip = {
						scope:new_skull_cup = { set_owner = root }
					}
				}
			}
			#Caught and eaten
			25 = {
				desc = travel_events.2033.a_caught_eaten.desc
				trigger = {
					is_cannibal_trigger = yes
				}
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				modifier = {
					location_has_winter_trigger = yes
					add = 25
				}
				#To make the portrait look good
				hidden_effect = {
					scope:prisoner = {
						release_from_prison = yes
					}
				}
				send_interface_toast = {
					type = event_toast_text_and_effect_neutral
					left_icon = root
					right_icon = scope:prisoner
					title = travel_events.2033.a_caught_eaten.tt
					desc = travel_events.2033.a_caught_eaten.desc
					scope:prisoner = {
						death = {
							death_reason = death_manhunted_eaten
							killer = root
						}
					}
					add_character_modifier = {
						modifier = travel_well_fed_modifier
						years = 10
					}
				}
			}
			#Escapes
			50 = {
				desc = travel_events.2033.a_escaped.desc
				modifier = {
					scope:prisoner = {
						has_trait = athletic
						health >= fine_health
					}
					add = 25
				}
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				send_interface_toast = {
					type = event_toast_effect_neutral
					left_icon = root
					right_icon = scope:prisoner
					title = travel_events.2033.a_escaped.tt
					scope:prisoner = {
						release_from_prison = yes
						set_variable = {
							name = escaped_prisoner
							value = flag:vengeful
							#Manhunted prisoners never forget
						}
						set_variable = {
							name = short_time_escape
							years = 5
						}
						set_variable = {
							name = 2033_escaped_previously
						}
					}
					add_prestige = medium_prestige_loss
					2033_clean_up_escaped_prisoner_effect = yes
				}
			}
			#Kills you and escapes
			25 = {
				desc = travel_events.2033.a_killed.desc
				scope:prisoner = {
					release_from_prison = yes
				}
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				death = {
					death_reason = death_attacked
					killer = scope:prisoner
				}
				2033_clean_up_escaped_prisoner_effect = yes
			}
		}
		if = {
			limit = {
				scope:prisoner = {
					health < fine_health
				}
				faith = {
					OR = {
						trait_is_virtue = forgiving
						trait_is_virtue = compassionate
					}
					NOT = { has_doctrine = tenet_human_sacrifice }
				}
			}
			add_piety = medium_piety_loss
		}
		stress_impact = {
			sadistic = medium_stress_impact_loss
			compassionate = massive_stress_impact_gain
			forgiving = major_stress_impact_gain
			just = medium_stress_impact_gain
			paranoid = major_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
				}
				factor = 0.5
			}
			modifier = {
				has_trait = sadistic
				factor = 2
			}
			modifier = {
				has_relation_rival = scope:prisoner
				factor = 2
			}
			ai_value_modifier = {
				ai_boldness = 3
				ai_vengefulness = 2
				ai_rationality = -2
				ai_honor = -2
				ai_compassion = -10
			}
		}
	}
	#Let's catch them?
	option = {
		name = travel_events.2033.b
		duel = {
			skills = { learning prowess }
			target = scope:prisoner
			#Caught
			50 = {
				desc = travel_events.2033.b_caught.desc
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				send_interface_toast = {
					type = event_toast_text_good
					left_icon = root
					right_icon = scope:prisoner
					title = travel_events.2033.b_caught.tt
					desc = travel_events.2033.b_caught.desc
					custom_tooltip = travel_events.2033.b_caught.effect
				}
			}
			#Escapes
			50 = { 
				desc = travel_events.2033.a_escaped.desc
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				modifier = {
					scope:prisoner = {
						has_trait = athletic
					}
					add = 25
				}
				modifier = {
					scope:prisoner = {
						is_adult = no
					}
					add = 25
				}
				send_interface_toast = {
					type = event_toast_effect_bad
					left_icon = root
					right_icon = scope:prisoner
					title = travel_events.2033.a_escaped.tt
					scope:prisoner = {
						release_from_prison = yes
						set_variable = {
							name = escaped_prisoner
							value = flag:peaceful
							years = 30 #Prescribation time
						}
						set_variable = {
							name = 2033_escaped_previously
						}
					}
					add_prestige = minor_prestige_loss
					2033_clean_up_escaped_prisoner_effect = yes
					stress_impact = {
						paranoid = major_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_vengefulness = 3
				ai_honor = 2
				ai_rationality = 2
				ai_compassion = -1
			}
		}
	}
	#Let 'em go
	option = {
		name = travel_events.2033.c
		scope:prisoner = {
			release_from_prison = yes
			set_variable = {
				name = escaped_prisoner
				value = flag:peaceful
				years = 30 #Prescribation time
			}
			set_variable = {
				name = 2033_escaped_previously
			}
		}
		2033_clean_up_escaped_prisoner_effect = yes
		stress_impact = {
			sadistic = medium_stress_impact_gain
			callous = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			forgiving = major_stress_impact_loss
			compassionate = medium_stress_impact_loss
			paranoid = massive_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
				}
				factor = 2
			}
			modifier = {
				has_trait = lazy
				add = 50
			}
			ai_value_modifier = {
				ai_compassion = 3
				ai_energy = -1
				ai_vengefulness = -3
			}
		}
	}
}

#Your escaped manhunted prisoner seeks revenge
travel_events.2034 = { 
	type = character_event
	title = travel_events.2034.t
	desc = {
		desc = travel_events.2034.desc_intro
		first_valid = {
			#_Fairly_ recent escapee
			triggered_desc = {
				trigger = {
					scope:vengeful_prisoner = {
						exists = var:short_time_escape
					}
				}
				desc = travel_events.2034.desc
			}
			#You don't remember me, _do you_?
			triggered_desc = {
				trigger = {
					scope:vengeful_prisoner = {
						NOT = { exists = var:short_time_escape }
					}
				}
				desc = travel_events.2034.desc_long_time
			}
		}
	}
	theme = travel
	override_background = { reference = army_camp }
	left_portrait = {
		character = root
		animation = fear
	}
	right_portrait = {
		character = scope:vengeful_prisoner
		animation = aggressive_dagger
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		any_pool_character = {
			province = root.location
			exists = var:escaped_prisoner
			var:escaped_prisoner = flag:vengeful
			is_adult = yes
		}
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium }
		play_music_cue = "mx_cue_murder"
		random_pool_character = {
			province = root.location
			limit = {
				has_variable = escaped_prisoner
				var:escaped_prisoner = flag:vengeful
				is_adult = yes
			}
			save_scope_as = vengeful_prisoner
		}
		current_travel_plan = {
			if = {
				limit = {
					any_entourage_character = {
						has_court_position = bodyguard_court_position
					}
				}
				random_entourage_character = {
					limit = { has_court_position = bodyguard_court_position }
					save_scope_as = bodyguard
				}
			}
		}
	}
	#Ayy!
	option = {
		name = travel_events.2034.a
		duel = {
			skill = prowess
			target = scope:vengeful_prisoner
			#Prisoner overpowered!
			80 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = travel_events.2034.a_overpowered_desc
				custom_tooltip = travel_events.2034.a_overpowered_effect
				trigger_event = travel_events.2035
			}
			#You die
			20 = {
				desc = travel_events.2034.a_death_desc
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				death = {
					death_reason = death_revenge
					killer = scope:vengeful_prisoner
				}
			}
		}
		stress_impact = {
			craven = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				exists = scope:bodyguard
				factor = 0
			}
		}
	}
	#Bodyguard!
	option = {
		name = travel_events.2034.b
		trigger = { exists = scope:bodyguard }
		scope:bodyguard = {
			duel = {
				skill = prowess
				target = scope:vengeful_prisoner
				#Prisoner overpowered!
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					desc = travel_events.2034.b_overpowered_desc
					custom_tooltip = travel_events.2034.a_overpowered_effect
					trigger_event = travel_events.2035
				}
				#Prisoner killed
				50 = {
					desc = travel_events.2034.b_death_desc
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					send_interface_toast = {
						type = event_toast_effect_neutral
						left_icon = scope:bodyguard
						right_icon = scope:vengeful_prisoner
						title = travel_events.2034.b_death_tt
						scope:vengeful_prisoner = {
							death = {
								death_reason = death_fight_killer
								killer = scope:bodyguard
							}
						}
					}
				}
			}
		}
		stress_impact = {
			brave = medium_stress_impact_gain

		}
		ai_chance = {
			base = 200
		}
	}
	after = {
		scope:vengeful_prisoner = {
			if = {
				limit = { is_alive = yes }
				remove_variable = escaped_prisoner
			}
		}
	}
}

#You restrained them; now decide their fate
travel_events.2035 = { 
	type = character_event
	title = travel_events.2035.t
	desc = travel_events.2035.desc
	theme = travel
	override_background = { reference = army_camp }
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				OR = {
					has_trait = forgiving
					has_trait = compassionate
				}
			}
			animation = worry
		}
		animation = personality_vengeful
	}
	right_portrait = {
		character = scope:vengeful_prisoner
		animation = prisonhouse
	}
	#Execute them
	option = {
		name = travel_events.2035.a
		scope:vengeful_prisoner = { 
			remove_variable = escaped_prisoner
			death = {
				death_reason = death_execution
				killer = root
			}
		}
		stress_impact = {
			vengeful = major_stress_impact_loss
			paranoid = major_stress_impact_loss
			forgiving = massive_stress_impact_gain
			compassionate = massive_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				has_trait = forgiving
				has_trait = compassionate
				has_trait = trusting
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = vengeful
					has_trait = irritable
					has_trait = wrathful
					has_trait = sadistic
					has_trait = callous
					has_trait = cynical
				}
				factor = 2
			}
			modifier = {
				has_trait = paranoid
				add = 50
			}
			ai_value_modifier = {
				ai_vengefulness = 4
				ai_boldness = 3
				ai_energy = 1
				ai_compassion = -3
			}
		}
	}
	#Imprison them
	option = {
		name = travel_events.2035.b
		rightfully_imprison_character_effect = {
			TARGET = scope:vengeful_prisoner
			IMPRISONER = root
		}
		current_travel_plan = {
			add_companion = scope:vengeful_prisoner
		}
		progress_towards_rival_effect = {
			CHARACTER = scope:vengeful_prisoner
			OPINION = 0
			REASON = rival_reimprisoned_manhunt
		}
		scope:vengeful_prisoner = { remove_variable = escaped_prisoner }
		stress_impact = {
			paranoid = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = cynical
					has_trait = just
				}	
				factor = 2
			}
			ai_value_modifier = {
				ai_vengefulness = 3
				ai_boldness = 2
				ai_energy = 1
				ai_compassion = -2
			}
		}
	}
	#Let them go
	option = {
		name = travel_events.2035.c
		scope:vengeful_prisoner = {
			remove_variable = escaped_prisoner
			set_variable = {
				name = escaped_prisoner
				value = flag:reformed
				years = 30 #Prescribation time
			}
		}
		create_character_memory = {
			type = forgave_and_released_prisoner_memory
			participants = {
				prisoner = scope:vengeful_prisoner
			}
		}
		if = {
			limit = {
				has_relation_rival = scope:vengeful_prisoner
			}
			improve_relationship_effect = {
				TARGET = root
				REASON = friend_let_me_escape
			}
		}
		stress_impact = {
			forgiving = massive_stress_impact_loss #The penultimate forgiveness moment
			compassionate = major_stress_impact_loss
			vengeful = massive_stress_impact_gain #The penultimate vengefulness moment
			paranoid = massive_stress_impact_gain
			wrathful = major_stress_impact_gain
			sadistic = medium_stress_impact_gain
			callous = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = forgiving
					has_trait = compassionate
					has_trait = trusting
				}
				add = 50
			}
			modifier = {
				faith = {
					OR = {
						trait_is_virtue = forgiving
						trait_is_virtue = compassionate
					}
				}
				OR = {
					has_trait = forgiving
					has_trait = compassionate
				}
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = vengeful
					has_trait = irritable
					has_trait = wrathful
					has_trait = sadistic
					has_trait = callous
					has_trait = arrogant
					has_trait = cynical
				}
				factor = 0.5
			}
			modifier = {
				has_trait = paranoid
				factor = 0
			}
			ai_value_modifier = {
				ai_compassion = 2
				ai_boldness = 2
				ai_zeal = 2
				ai_sociability = 1
				ai_vengefulness = -4
			}
		}
	}
}

#Your escaped/reformed prisoner is... pretty peaceful actually
travel_events.2036 = { 
	type = character_event
	title = travel_events.2036.t
	desc = {
		desc = travel_events.2036.desc_intro
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:peaceful_prisoner = {
						exists = var:escaped_prisoner
						var:escaped_prisoner = flag:reformed
					}
				}
				desc = travel_events.2036.desc_reformed
			}
			triggered_desc = {
				trigger = {
					scope:peaceful_prisoner = {
						exists = var:escaped_prisoner
						var:escaped_prisoner = flag:peaceful
					}
				}
				desc = travel_events.2036.desc
			}
		}
	}
	theme = travel
	override_background = {
		trigger = {
			scope:peaceful_prisoner = {
				exists = var:escaped_prisoner
				var:escaped_prisoner = flag:peaceful
			}
		}
		reference = ep2_travel_settlement_hills
	}
	override_background = { 
		trigger = {
			scope:peaceful_prisoner = {
				exists = var:escaped_prisoner
				var:escaped_prisoner = flag:reformed
			}
		}
		reference = temple 
	} 
	left_portrait = {
		character = root
		animation = disbelief
	}
	right_portrait = {
		character = scope:peaceful_prisoner
		triggered_animation = {
			trigger = {
				scope:peaceful_prisoner = {
					exists = var:escaped_prisoner
					var:escaped_prisoner = flag:reformed
				}
			}
			animation = personality_zealous
		}
		animation = love
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		any_pool_character = {
			province = root.location
			has_variable = escaped_prisoner
			OR = {
				var:escaped_prisoner = flag:peaceful
				var:escaped_prisoner = flag:reformed
			}
			is_adult = yes
		}
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small }
		play_music_cue = "mx_cue_low_key_positive"
		random_pool_character = {
			province = root.location
			limit = {
				has_variable = escaped_prisoner
				OR = {
					var:escaped_prisoner = flag:peaceful
					var:escaped_prisoner = flag:reformed
				}
				is_adult = yes
			}
			save_scope_as = peaceful_prisoner
		}
	}
	#That's nice
	option = {
		name = {
			text = {
				first_valid = {
					#Even criminals can change, I guess
					triggered_desc = {
						trigger = { 
							scope:peaceful_prisoner = {
								exists = var:escaped_prisoner
								var:escaped_prisoner = flag:peaceful
							}
							has_any_shunned_or_criminal_trait_in_faith_trigger = {
								CHARACTER = scope:peaceful_prisoner
								FAITH = faith
							}
						}
						desc = travel_events.2036.a_criminal
					}
					#That's nice
					triggered_desc = {
						trigger = { 
							scope:peaceful_prisoner = {
								exists = var:escaped_prisoner
								var:escaped_prisoner = flag:peaceful
							}
						}
						desc = travel_events.2036.a
					}
					#As long as she/he doesn't try to kill me (again)
					triggered_desc = {
						trigger = { 
							scope:peaceful_prisoner = {
								exists = var:escaped_prisoner
								var:escaped_prisoner = flag:reformed
							}
						}
						desc = travel_events.2036.a_reformed
					}
				}
			}
		}
		if = {
			limit = {
				faith = {
					OR = {
						trait_is_virtue = forgiving
						trait_is_virtue = compassionate
					}
				}
			}
			add_piety = medium_piety_gain
		}
		if = {
			limit = {
				scope:peaceful_prisoner = {
					exists = var:escaped_prisoner
					var:escaped_prisoner = flag:reformed
				}
			}
			stress_impact = {
				compassionate = medium_stress_impact_loss
				forgiving = medium_stress_impact_loss
				sadistic = medium_stress_impact_gain
				callous = minor_stress_impact_gain
				arrogant = minor_stress_impact_gain
				vengeful = minor_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				compassionate = medium_stress_impact_loss
				just = minor_stress_impact_gain
				sadistic = medium_stress_impact_gain
				callous = minor_stress_impact_gain
				arrogant = minor_stress_impact_gain
				vengeful = medium_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = cynical
					has_trait = callous
				}
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
					has_trait = trusting
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_compassion = 3
				ai_boldness = 2
				ai_honor = 2
				ai_rationality = 1
				ai_vengefulness = -3
			}
		}
	}
	#Once a prisoner; always a prisoner
	option = {
		name = {
			text = {
				first_valid = {
					#Once a criminal, always a criminal
					triggered_desc = {
						trigger = { 
							scope:peaceful_prisoner = {
								exists = var:escaped_prisoner
								var:escaped_prisoner = flag:peaceful
							}
							has_any_shunned_or_criminal_trait_in_faith_trigger = {
								CHARACTER = scope:peaceful_prisoner
								FAITH = faith
							}
						}
						desc = travel_events.2036.b_criminal
					}
					#Better bring 'em in'
					triggered_desc = {
						trigger = { 
							scope:peaceful_prisoner = {
								exists = var:escaped_prisoner
								var:escaped_prisoner = flag:peaceful
							}
						}
						desc = travel_events.2036.b
					}
					#I don't feel safe with her/him out here
					triggered_desc = {
						trigger = { 
							scope:peaceful_prisoner = {
								exists = var:escaped_prisoner
								var:escaped_prisoner = flag:reformed
							}
						}
						desc = travel_events.2036.b_reformed
					}
				}
			}
		}
		rightfully_imprison_character_effect = {
			TARGET = scope:peaceful_prisoner
			IMPRISONER = root
		}
		current_travel_plan = {
			add_companion = scope:peaceful_prisoner
		}
		if = {
			limit = {
				scope:peaceful_prisoner = {
					exists = var:escaped_prisoner
					var:escaped_prisoner = flag:reformed
				}
			}
			stress_impact = {
				forgiving = major_stress_impact_gain
				compassionate = major_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				forgiving = major_stress_impact_gain
				compassionate = major_stress_impact_gain
				vengeful = medium_stress_impact_loss
				just = minor_stress_impact_loss
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = cynical
					has_trait = callous
				}
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
					has_trait = trusting
				}
				factor = 0.5
			}
			ai_value_modifier = {
				ai_vengefulness = 3
				ai_boldness = 1
				ai_honor = -2
				ai_compassion = -3
			}
		}
	}
	after = {
		scope:peaceful_prisoner = { remove_variable = escaped_prisoner }
	}
}

#Visit some hunting grounds - Sadistic province owner is manhunting
travel_events.2037 = { 
	type = character_event
	title = travel_events.2037.t
	desc = {
		desc = travel_events.2037.desc
		first_valid = {
			triggered_desc = {
				trigger = { is_adult = yes }
				desc = travel_events.2037.desc_adult
			}
			triggered_desc = {
				desc = travel_events.2037.desc_child
			}
		}
		desc = travel_events.2037.desc_segway
		first_valid = {
			triggered_desc = {
				trigger = { is_adult = yes }
				desc = travel_events.2037.desc_outro_segway_adult
			}
			triggered_desc = {
				desc = travel_events.2037.desc_outro_child
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = var:has_manhunted
					is_adult = yes
				}
				desc = travel_events.2037.desc_outro_manhunter
			}
			triggered_desc = {
				trigger = { is_adult = yes }
				desc = travel_events.2037.desc_outro
			}
		}
	}
	theme = travel
	override_background = { reference = wilderness }
	left_portrait = {
		character = scope:2037_county_liege
		animation = personality_dishonorable
	}
	right_portrait = {
		character = scope:2037_manhunt_prisoner
		override_imprisonment_visuals = yes
		animation = prisonhouse
	}
	lower_left_portrait = {
		trigger = { exists = scope:entourage_character }
		character = scope:entourage_character
	}
	lower_center_portrait = {
		character = root
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_location_valid_for_travel_event_on_land = yes
		trigger_if = {
			limit = { is_adult = no }
			current_travel_plan = {
				any_entourage_character = {
					count > 1
					is_adult = yes
					NOT = { has_relation_rival = root }
				}
			}
		}
		age > 12
		is_playable_character = yes
		location = {
			has_building_or_higher = hunting_grounds_01
			county.holder != root
			county.holder ?= {
				OR = {
					2033_is_sadistically_inclined_trigger = yes
					is_cannibal_trigger = yes	
				}
				NOT = { has_relation_nemesis = root }
				is_available_ai_adult = yes
				save_temporary_scope_as = imprisoner_check
				any_prisoner = {
					is_imprisoned_by = scope:imprisoner_check
					is_adult = yes
					is_ai = yes
				}
			}
		}
		NOT = { has_character_flag = had_travel_hunting_grounds_event_recently }
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small }
		#Save the scope for easy reference
		location.county.holder = {
			if = {
				limit = {
					this != root
				}
				save_scope_as = 2037_county_liege
			}	
		}
		scope:2037_county_liege = {
			random_prisoner = {
				limit = {
					is_imprisoned_by = scope:2037_county_liege
					is_adult = yes
					is_ai = yes
				}
				save_scope_as = 2037_manhunt_prisoner
			}
		}
		#Only children needs an adult present
    	if = {
    		limit = {
    			is_adult = no
    		}
    		current_travel_plan = {
    			random_entourage_character = {
    				limit = { 
    					is_adult = yes
    					NOT = { has_relation_rival = root }
    				}
    				save_scope_as = entourage_character
    			}
    		}
    	}
		#Cooldown between hunting ground events
		add_character_flag = {
			flag = had_travel_hunting_grounds_event_recently
			years = 5
		}
	}
	#Manhunt?
	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { is_adult = no }
						desc = travel_events.2037.a_child
					}
					#I have done this before!
					triggered_desc = {
						trigger = { exists = var:has_manhunted }
						desc = travel_events.2037.a_manhunted
					}
					#I guess I could try it
					triggered_desc = {
						desc = travel_events.2037.a
					}
				}
			}
		}
		duel = {
			skills = { prowess learning }
			target = scope:2037_county_liege
			#You get the kill
			50 = {
				desc = travel_events.2037.a_your_kill.desc
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				send_interface_toast = {
					type = event_toast_effect_neutral
					left_icon = root
					right_icon = scope:new_skull_cup
					title = travel_events.2033.a_manhunt.tt
					create_artifact = {
						name = manhunt_skull_cup
						description = manhunt_skull_cup_desc
						type = miscellaneous
						visuals = skull_goblet
						modifier = artifact_tyranny_gain_mult_1_modifier
						modifier = artifact_dread_gain_mult_2_modifier
						save_scope_as = new_skull_cup
					}
					scope:new_skull_cup = {
						set_variable = {
							name = skull_origin
							value = scope:2037_manhunt_prisoner
						}
						#To circumvent variable-not-used errors :angery:
						if = {
							limit = { exists = var:skull_origin }
							set_artifact_description = manhunt_skull_cup_desc
						}
						#This should never happen
        				else = {
        					set_artifact_description = manhunt_skull_cup_desc_fallback
        				}
					}
					scope:2037_manhunt_prisoner = {
						death = {
							death_reason = death_manhunted
							killer = root
						}
					}
				}
			}
			#The province owner gets the kill
			50 = {
				desc = travel_events.2037.a_their_kill.desc
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				#To make the portrait look good
				hidden_effect = {
					scope:2037_manhunt_prisoner = {
						release_from_prison = yes
					}
				}
				send_interface_toast = {
					type = event_toast_effect_neutral
					left_icon = scope:2037_county_liege
					right_icon = scope:2037_manhunt_prisoner
					title = travel_events.2037.a_their_kill.tt
					scope:2037_manhunt_prisoner = {
						death = {
							death_reason = death_manhunted
							killer = scope:2037_county_liege
						}
					}
				}
			}
		}
		#We know what you did
		set_variable = {
			name = has_manhunted
		}
		if = {
			limit = {
				NOT = { 
					has_character_modifier = travel_manhunted_prisoner_modifier 
				}
			}
			add_character_modifier = {
				modifier = travel_manhunted_prisoner_modifier
				years = 10
			 }
		}
		if = {
			limit = {
				faith = {
					NOT = { has_doctrine = tenet_human_sacrifice }
				}
				
			}
			add_piety = medium_piety_loss
		}
		scope:2037_county_liege = {
			progress_towards_friend_effect = {
				CHARACTER = root
				OPINION = 0
				REASON = friend_manhunted_together
			}
			add_opinion = {
				modifier = manhunted_with_me_opinion
				target = root
				opinion = 40
			}
		}
		stress_impact = {
			forgiving = massive_stress_impact_gain
			compassionate = massive_stress_impact_gain
			just = minor_stress_impact_gain
			sadistic = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					opinion = {
						target = scope:2037_county_liege
						value >= medium_positive_opinion
					}
					has_relation_friend = scope:2037_county_liege
				}
				add = 50
			}
			modifier = {
				has_relation_rival = scope:2037_manhunt_prisoner
				factor = 2
			}
			modifier = {
				has_trait = sadistic
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = forgiving
					has_trait = compassionate
				}
				factor = 0.5
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_energy = 1
				ai_compassion = -3
			}
		}
	}
	#Erm, _I'll_ take the prisoner instead
	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { is_adult = no }
						desc = travel_events.2037.b_child
					}
					triggered_desc = {
						desc = travel_events.2037.b
					}
				}
			}
		}
		pay_short_term_gold = {
			target = scope:2037_county_liege
			gold = major_gold_value
		}
		if = {
			limit = {
				scope:2037_manhunt_prisoner = {
					is_courtier_of = scope:2037_county_liege	
				}
			}
			scope:2037_county_liege = {
				remove_courtier_or_guest = scope:2037_manhunt_prisoner
			}
		}
		scope:2037_manhunt_prisoner = {
			if = {
				limit = { highest_held_title_tier > tier_barony }
				every_held_title = {
					title_tier > barony
					add_to_list = titles_to_claim
				}
				release_from_prison = yes
				depose_effect = { DEPOSER = scope:2037_county_liege }
				every_in_list = {
					list = titles_to_claim
					save_scope_as = claimed_title
					scope:2037_manhunt_prisoner = { add_pressed_claim = scope:claimed_title }
				}
			}
			#Don't care about barony claims
			else_if = {
				limit = { is_ruler = yes }
				depose_effect = { DEPOSER = scope:2037_county_liege }
				release_from_prison = yes
			}
			else = {
				release_from_prison = yes
			}
			add_opinion = {
				modifier = feast_saved_my_life_opinion
				target = root
				opinion = 100
			}
			#Potential murderer for murders at court
    		set_variable = 2037_rescued_manhunted_prisoner
		}
		add_courtier = scope:2037_manhunt_prisoner
		add_hook = {
			type = loyalty_hook
			target = scope:2037_manhunt_prisoner
		}
		current_travel_plan = {
			add_companion = scope:2037_manhunt_prisoner
		}
		if = {
			limit = {
				faith = {
					NOT = { has_doctrine = tenet_human_sacrifice }
					OR = {
						trait_is_virtue = forgiving
						trait_is_virtue = compassionate
					}
				}
			}
			add_piety = massive_piety_gain
		}
		else_if = {
			limit = {
				faith = {
					NOT = { has_doctrine = tenet_human_sacrifice }
				}
			}
			add_piety = major_piety_gain
		}
		hidden_effect = {
       		random_list = {
       			50 = {
       				modifier = {
       					OR = {
       						any_secret = {
       							OR = {
       								secret_type = secret_murder
       								secret_type = secret_murder_attempt
       							}
       						}
       						has_trait = murderer
       					}
       					add = 50
       				}
		    		#Create a victim to kill
			    	create_character = {
						template = generic_peasant_character
						culture = scope:2037_county_liege.location.county.culture
						faith = scope:2037_county_liege.location.county.faith
						location = scope:2037_county_liege.location
						after_creation = { set_to_lowborn = yes }
						save_scope_as = 2040_previous_victim
					}
					scope:2040_previous_victim = {
						death = {
							death_reason = death_murder
							killer = scope:2037_manhunt_prisoner
						}
					}
					#Set up secret
					scope:2037_manhunt_prisoner = {
						add_secret = {
							type = secret_murder
							target = scope:2040_previous_victim
						}
					}
       				#Turns out the prisoner is a psycho
       				trigger_event = {
       					id = travel_events.2040
       					days = { 5 15 }
       				}	
       			}
       			50 = {
       				#Nothing happens
       			}
       		}
       	}
		stress_impact = {
			greedy = major_stress_impact_gain
			callous = medium_stress_impact_gain
			just = minor_stress_impact_loss
			compassionate = medium_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					opinion = {
						target = scope:2037_county_liege
						value >= medium_positive_opinion
					}
					has_relation_friend = scope:2037_county_liege
				}
				has_trait = compassionate
				add = 50
			}
			modifier = {
				has_relation_friend = scope:2037_manhunt_prisoner
				factor = 2
			}
			modifier = {
				has_trait = sadistic
				factor = 0.5
			}
			modifier = {
				OR = {
					has_trait = forgiving
					has_trait = compassionate
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_compassion = 3
				ai_honor = 2
				ai_rationality = 1
				ai_greed = -3
			}
			modifier = {
				factor = 0
				gold <= major_gold_value
			}
		}
	}
	#Are you insane?
	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { is_adult = no }
						desc = travel_events.2037.c_child
					}
					triggered_desc = {
						desc = travel_events.2037.c
					}
				}
			}
		}
		scope:2037_manhunt_prisoner = {
			death = {
				death_reason = death_manhunted
				killer = scope:2037_county_liege
			}
		}
		scope:2037_county_liege = {
			progress_towards_rival_effect = {
				CHARACTER = root
				OPINION = 0
				REASON = rival_refused_manhunt
			}
			add_opinion = {
				modifier = insult_opinion
				target = root
				opinion = -40
			}
		}
		stress_impact = {
			compassionate = major_stress_impact_gain
			gregarious = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					opinion = {
						target = scope:2037_county_liege
						value <= low_negative_opinion
					}
					has_relation_potential_rival = scope:2037_county_liege
					has_relation_rival = scope:2037_county_liege
				}
				add = 50
			}
			modifier = {
				has_trait = brave
				has_trait = arrogant
				factor = 2
			}
			modifier = {
				has_trait = shy
				add = -50
			}
			ai_value_modifier = {
				ai_greed = 2
				ai_rationality = 2
				ai_boldness = -1
				ai_compassion = -1
			}
		}
	}
}

scripted_trigger are_on_friendly_terms_trigger = {
	NOT = { has_relation_rival = root }
	opinion = {
		target = root
		value >= low_positive_opinion
	}
}

#Visit some hunting grounds - Friendly competition with an entourage member
travel_events.2038 = { 
	type = character_event
	title = travel_events.2038.t
	desc = travel_events.2038.desc
	theme = travel
	override_background = { reference = wilderness }
	left_portrait = {
		character = root
		animation = personality_bold
	}
	right_portrait = {
		character = scope:entourage_character
		animation = hunting_longbow_rest_arrow_default
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling = yes
		is_location_valid_for_travel_event_on_land = yes
		age > 14
		is_playable_character = yes
		location = {
			has_building_or_higher = hunting_grounds_01
		}
		current_travel_plan = {
			any_entourage_character = {
				OR = {
					AND = {
						is_adult = yes
						is_primary_heir_of = root
						short_term_gold >= root.medium_gold_value			
					}
					AND = {
						is_adult = yes
						is_heir_of = root
						short_term_gold >= root.medium_gold_value
					}
					AND = {
						is_adult = no
						is_child_of = root
						age > 10
					}
					AND = {
						is_adult = yes
						short_term_gold >= root.medium_gold_value
					}
					AND = {
						is_adult = no
						age > 10
					}
				}
				is_available_travelling = yes
				are_on_friendly_terms_trigger = yes
				this != root
			}
		}
		NOR = {
			has_character_flag = had_travel_hunting_grounds_event_recently
			culture_has_east_asian_heritage_pillar_trigger = yes
		}
	}
	immediate = {
		current_travel_plan = {
			random_entourage_character = {
				limit = {
					is_available_travelling_adult = yes
					is_primary_heir_of = root
					short_term_gold >= root.medium_gold_value
					are_on_friendly_terms_trigger = yes
				}
				alternative_limit = {
					is_available_travelling_adult = yes
					is_adult = yes
					is_heir_of = root
					short_term_gold >= root.medium_gold_value
					are_on_friendly_terms_trigger = yes
				}
				alternative_limit = {
					is_available_travelling = yes
					is_child_of = root
					age > 10
					are_on_friendly_terms_trigger = yes
				}
				alternative_limit = {
					is_available_travelling_adult = yes
					short_term_gold >= root.medium_gold_value
					are_on_friendly_terms_trigger = yes
				}
				alternative_limit = {
					is_available_travelling = yes
					age > 10
					are_on_friendly_terms_trigger = yes
				}
				save_scope_as = entourage_character
			}
		}
		#Cooldown between hunting ground events
		add_character_flag = {
			flag = had_travel_hunting_grounds_event_recently
			years = 5
		}
	}
	#Friendly wager?
	option = {
		name = travel_events.2038.a
		duel = {
			skill = prowess
			target = scope:entourage_character
			#You get the kill
			50 = {
				desc = travel_events.2038.a_your_kill.desc
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = 10
				}
				modifier = {
					has_trait = lifestyle_hunter
					add = 25
				}
				show_as_tooltip = {
					scope:entourage_character = {
						if = {
							limit = { is_adult = yes }
							pay_short_term_gold = {
								target = root
								gold = root.medium_gold_value
							}
						}
					}
					#Don't need a bunch of rabbit paws
					if = {
						limit = {
							any_character_artifact = {
								has_variable = rabbits_paw
							}
							NOT = { has_trait = lifestyle_hunter }
						}
						add_trait = lifestyle_hunter
					}
					else_if = {
						limit = {
							any_character_artifact = {
								has_variable = rabbits_paw
							}
							has_trait = lifestyle_hunter
						}
						add_trait_xp = {
							trait = lifestyle_hunter
							track = hunter
							value = 10
						}
					}
					else = {
						create_artifact = {
							name = lucky_rabbits_paw
							description = lucky_rabbits_paw_desc
							type = miscellaneous
							visuals = pocket_pouch
							modifier = artifact_prowess_2_modifier
							modifier = artifact_monthly_prestige_4_modifier
							save_scope_as = new_rabbits_paw
						}
					}
					stress_impact = {
						greedy = medium_stress_impact_loss
						arrogant = minor_stress_impact_loss
					}
				}
				#Set up scopes for follow-up event
				save_scope_as = winning_character
				scope:entourage_character = { save_scope_as = losing_character }
			}
			#Your friend gets the kill
			50 = {
				desc = travel_events.2038.a_their_kill.desc
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				show_as_tooltip = {
					pay_short_term_gold = {
						target = scope:entourage_character
						gold = medium_gold_value
					}
					stress_impact = {
						greedy = major_stress_impact_gain
						arrogant = minor_stress_impact_gain
						callous = minor_stress_impact_gain
					}
				}
				#Set up scopes for follow-up event
				save_scope_as = losing_character
				scope:entourage_character = { save_scope_as = winning_character }
			}
		}
		show_as_tooltip = {
			scope:entourage_character = {
				progress_towards_friend_effect = {
					CHARACTER = root
					OPINION = 0
					REASON = friend_friendly_hunt
				}
				add_opinion = {
					modifier = hunted_with_me_opinion
					target = root
					opinion = 20
				}
			}
		}
		#Trigger follow-up event
		trigger_event = travel_events.2039
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					opinion = {
						target = scope:entourage_character
						value <= medium_positive_opinion
					}
					has_relation_potential_friend = scope:entourage_character
					has_relation_friend = scope:entourage_character
				}
				add = 50
			}
			modifier = {
				scope:entourage_character = {
					is_child_of = root
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = brave
					has_trait = arrogant
				}
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = craven
					has_trait = greedy
				}
				factor = 0.5
			}
			ai_value_modifier = {
				ai_boldness = 3
				ai_sociability = 2
				ai_energy = 2
			}
			modifier = {
				factor = 0
				gold <= major_gold_value
			}
		}
	}
	#Let the child win
	option = {
		name = travel_events.2038.b
		trigger = {
			scope:entourage_character = {
				is_adult = no
				NOT = {
					any_character_artifact = {
						has_variable = rabbits_paw
					}
				}
			}
		}
		show_as_tooltip = {
			scope:entourage_character = {
				create_artifact = {
					name = lucky_rabbits_paw
					description = lucky_rabbits_paw_desc
					type = miscellaneous
					visuals = pocket_pouch
					modifier = artifact_prowess_2_modifier
					modifier = artifact_monthly_prestige_4_modifier
					save_scope_as = new_rabbits_paw
				}
				scope:new_rabbits_paw = {
					set_variable = rabbits_paw
					set_owner = scope:entourage_character
				}
				improve_relationship_effect = {
					TARGET = root
					REASON = friend_let_child_win
				}
				add_opinion = {
					modifier = hunted_with_me_opinion
					target = root
					opinion = 20
				}
			}
			stress_impact = {
				arrogant = medium_stress_impact_gain
				sadistic = medium_stress_impact_gain
				cynical = minor_stress_impact_gain
			}
		}
		#Save scope for follow-up event
		scope:entourage_character = { save_scope_as = winning_character }
		save_scope_as = losing_character
		add_character_flag = 2038_let_child_win
		#Trigger follow-up event
		trigger_event = travel_events.2039
		ai_chance = {
			base = 150
			modifier = {
				OR = {
					opinion = {
						target = scope:entourage_character
						value <= medium_positive_opinion
					}
					has_relation_potential_friend = scope:entourage_character
					has_relation_friend = scope:entourage_character
				}
				add = 50
			}
			modifier = {
				scope:entourage_character = {
					is_child_of = root
				}
				has_trait = family_first
				add = 50
			}
			modifier = {
				OR = {
					has_trait = arrogant
					has_trait = sadistic
					has_trait = cynical 
				}
				factor = 0.5
			}
			modifier = {
				has_trait = generous
				factor = 2
			}
			ai_value_modifier = {
				ai_compassion = 3
				ai_sociability = 2
				ai_vengefulness = -3
			}
		}
	}
	#Too rich for my blood
	option = {
		name = travel_events.2038.c
		stress_impact = {
			arrogant = minor_stress_impact_gain
			brave = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				OR = {
					has_trait = arrogant
					has_trait = sadistic
					has_trait = cynical
					has_trait = craven
					has_trait = greedy
				}
				factor = 2
			}
			ai_value_modifier = {
				ai_energy = -2
				ai_sociability = -2
				ai_boldness = -3
				ai_compassion = -3
			}
		}
	}
}

#Visit some hunting grounds - Followup/outcome of friendly competition
travel_events.2039 = { 
	type = character_event
	title = travel_events.2039.t
	desc = {
		first_valid = {
			#You let the child win
			triggered_desc = {
				trigger = { has_character_flag = 2038_let_child_win }
				desc = travel_events.2039.desc_child_won
			}
			#You win
			triggered_desc = {
				trigger = { 
					NOT = { has_character_flag = 2038_let_child_win }
					scope:winning_character = root
				}
				desc = travel_events.2039.desc_won
			}
			#You lose
			triggered_desc = {
				trigger = { 
					NOR = { 
						has_character_flag = 2038_let_child_win
						scope:winning_character = root
					}
				}
				desc = travel_events.2039.desc_lost
			}
		}
	}
	theme = travel
	override_background = { reference = wilderness }
	left_portrait = {
		character = scope:winning_character
		animation = hunting_carcass_start
	}
	right_portrait = {
		character = scope:losing_character
		triggered_animation = {
			trigger = {
				scope:losing_character = root
				OR = {
					has_trait = cynical
					has_trait = callous
					has_trait = arrogant
				}
			}
			animation = personality_callous
		}
		animation = admiration
	}
	immediate = {
		#If we let the child win
		if = {
			limit = { has_character_flag = 2038_let_child_win }
			scope:entourage_character = {
				create_artifact = {
					name = lucky_rabbits_paw
					description = lucky_rabbits_paw_desc
					type = miscellaneous
					visuals = pocket_pouch
					modifier = artifact_prowess_2_modifier
					modifier = artifact_monthly_prestige_4_modifier
					save_scope_as = new_rabbits_paw
				}
				scope:new_rabbits_paw = {
					set_variable = rabbits_paw
					set_owner = scope:entourage_character
				}
				improve_relationship_effect = {
					TARGET = root
					REASON = friend_let_child_win
				}
				add_opinion = {
					modifier = hunted_with_me_opinion
					target = root
					opinion = 20
				}
			}
			stress_impact = {
				arrogant = medium_stress_impact_gain
				sadistic = medium_stress_impact_gain
				cynical = minor_stress_impact_gain
			}
		}
		#If we won
		else_if = {
			limit = { scope:winning_character = root }
			scope:entourage_character = {
				if = {
					limit = { is_adult = yes }
					pay_short_term_gold = {
						target = root
						gold = root.medium_gold_value
					}
				}
			}
			#Don't need a bunch of rabbit paws
			if = {
				limit = {
					any_character_artifact = {
						has_variable = rabbits_paw
					}
					NOT = { has_trait = lifestyle_hunter }
				}
				add_trait = lifestyle_hunter
			}
			else_if = {
				limit = {
					any_character_artifact = {
						has_variable = rabbits_paw
					}
					has_trait = lifestyle_hunter
				}
				add_trait_xp = {
					trait = lifestyle_hunter
					track = hunter
					value = 10
				}
			}
			else = {
				send_interface_toast = {
					type = event_toast_effect_good
					left_icon = root
					right_icon = scope:new_rabbits_paw
					title = travel_events.2039.a_trinket.t
					create_artifact = {
						name = lucky_rabbits_paw
						description = lucky_rabbits_paw_desc
						type = miscellaneous
						visuals = pocket_pouch
						modifier = artifact_prowess_2_modifier
						modifier = artifact_monthly_prestige_4_modifier
						save_scope_as = new_rabbits_paw
					}
				}
				scope:new_rabbits_paw = {
					set_variable = rabbits_paw
				}
			}
			stress_impact = {
				greedy = medium_stress_impact_loss
				arrogant = minor_stress_impact_loss
			}
		}
		#Otherwise the other person won
		else = {
			pay_short_term_gold = {
				target = scope:entourage_character
				gold = medium_gold_value
			}
			stress_impact = {
				greedy = major_stress_impact_gain
				arrogant = minor_stress_impact_gain
				callous = minor_stress_impact_gain
			}
		}
		if = {
			limit = {
				NOT = { has_character_flag = 2038_let_child_win }
			}
			scope:entourage_character = {
				progress_towards_friend_effect = {
					CHARACTER = root
					OPINION = 0
					REASON = friend_friendly_hunt
				}
				add_opinion = {
					modifier = hunted_with_me_opinion
					target = root
					opinion = 20
				}
			}
		}
	}
	#That's nice
	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = {
							scope:losing_character = root
							OR = {
								has_trait = cynical
								has_trait = callous
								has_trait = arrogant
							}
						}
						desc = travel_events.2039.a_cynical
					}
					triggered_desc = {
						trigger = { scope:losing_character = root }
						desc = travel_events.2039.a
					}
					triggered_desc = {
						trigger = { scope:winning_character = root }
						desc = travel_events.2039.a_win
					}
				}
			}
		}
		ai_chance = {
			base = 100
		}
	}
	after = {
		if = {
			limit = { has_character_flag = 2038_let_child_win }
			remove_character_flag = 2038_let_child_win
		}
	}
}

#The rescued manhunt prisoner from travel_events.2037 turns out to be a psycho
travel_events.2040 = { 
    type = character_event
    title = travel_events.2040.t
    desc = {
    	desc = travel_events.2040.intro
    	first_valid = {
    		triggered_desc = {
    			trigger = { is_adult = no }
    			desc = travel_events.2040.desc_child
    		}
    		triggered_desc = {
    			desc = travel_events.2040.desc
    		}
    	}
    	desc = travel_events.2040.outro
    }
    theme = travel
    override_background = { reference = bp1_bonfire }
    left_portrait = {
        character = root
        triggered_animation = {
        	trigger = {
        		NOR = {
        			has_trait = callous
        			has_trait = sadistic
        		}
        	}
        	animation = fear
        }
        animation = personality_rational
    }
    right_portrait = {
    	character = scope:2037_manhunt_prisoner
    	animation = spymaster
    }
    immediate = {
    	hidden_effect = {
    		scope:2037_manhunt_prisoner = {
    			#Make them insane
    			random_list = {
    				50 = {
    					modifier = {
    						root = {
    							has_trait = lunatic
    						}
    						add = 50
    					}
    					add_trait = lunatic_1
    				}
    				50 = {
    					modifier = {
    						root = {
    							has_trait = possessed
    						}
    						add = 50
    					}
    					add_trait = possessed_1
    				}
    			}
    			#Beef them up
    			if = {
    				limit = { 
    					prowess < 25
    					prowess > 20
    				}
    				add_prowess_skill = 5
    			}
    			else_if = {
    				limit = { 
    					prowess < 20
    					prowess > 15
    				}
    				add_prowess_skill = 10
    			}
    			else_if = {
    				limit = { 
    					prowess < 15
    					prowess > 10
    				}
    				add_prowess_skill = 15
    			}
    			else_if = {
    				limit = { 
    					prowess < 10
    					prowess > 5
    				}
    				add_prowess_skill = 20
    			}
    			else_if = {
    				limit = { prowess < 5 }
    				add_prowess_skill = 25
    			}
    			force_character_skill_recalculation = yes
    			#Pinpoint the murder secret
    			random_secret = {
    				type = secret_murder
    				limit = {
    					secret_target = scope:2040_previous_victim
    				}
    				save_scope_as = 2040_secret_to_learn
    			}
    		}
    	}
    	scope:2040_secret_to_learn = { reveal_to = root }
    }
    #Woo! Free insane bodyguard!
    option = {
    	name = {
    		text = {
    			first_valid = {
    				triggered_desc = {
    					trigger = { is_adult = no }
    					desc = travel_events.2040.a_child
    				}
    				triggered_desc = {
    					desc = travel_events.2040.a
    				}
    			}
    		}
    	}
    	trigger = {
    		OR = {
    			#If we're all stocked up on bodyguards
    			AND = {
    				employs_court_position = bodyguard_court_position
    				scope:2037_manhunt_prisoner = { can_be_employed_as = bodyguard_court_position }
    			}
    			#Or not
    			can_appoint_char_to_court_position = {
    				CHAR = scope:2037_manhunt_prisoner
    				COURT_POS = bodyguard_court_position
    			}
    		}
    	}
    	flavor = {
    		first_valid = {
    			triggered_desc = {
    				trigger = { is_adult = no }
    				desc = travel_events.2040.a.flavor_child
    			}
    			triggered_desc = {
    				desc = travel_events.2040.a.flavor
    			}
    		}
    	}
    	custom_tooltip = travel_events.2040.a.tt
    	scope:2037_manhunt_prisoner = {
    		add_trait = loyal
    		add_opinion = {
    			modifier = recruited_me_opinion
    			target = root
    			opinion = 50
    		}
    		set_variable = insane_bodyguard
    	}
    	add_piety = major_piety_loss
    	#If we already have max bodyguards, replace the one with shoddiest prowess for this beefcake
    	court_position_grant_effect = {
			CANDIDATE = scope:2037_manhunt_prisoner
			EMPLOYER = root
			POS = bodyguard
		}
    	if = {
    		limit = {
    			NOR = { 
    				has_trait = callous
    				has_trait = sadistic
    			}
    		}
    		stress_impact = {
    			base = medium_stress_impact_gain
    			just = major_stress_impact_gain
    			paranoid = major_stress_impact_gain
    			craven = medium_stress_impact_gain
    		}
    	}
    	else = {
    		stress_impact = {
    			just = major_stress_impact_gain
    			paranoid = major_stress_impact_gain
    			craven = medium_stress_impact_gain
    		}
    	}
    	ai_chance = {
	    	base = 100
	    	modifier = {
	    		stress_level >= 1 
	    		factor = 0.5
	    	}
	    	modifier = {
	    		has_trait = just
	    		factor = 0
	    	}
	    	modifier = {
	    		OR = {
	    			has_trait = calm
	    			has_trait = trusting
	    			has_trait = deceitful
	    		}
	    		add = 100
	    	}
	    	ai_value_modifier = {
	    		ai_rationality = 2
	    		ai_greed = 2
	    	}
    	}
    }
    #...erm, back to prison with you o_o
    option = {
    	name = {
    		text = {
    			first_valid = {
    				triggered_desc = {
    					trigger = { is_adult = no }
    					desc = travel_events.2040.b_child
    				}
    				triggered_desc = {
    					desc = travel_events.2040.b
    				}
    			}
    		}
    	}
    	flavor = {
    		first_valid = {
    			triggered_desc = {
    				trigger = { is_adult = no }
    				desc = travel_events.2040.b.flavor_child
    			}
    			triggered_desc = {
    				desc = travel_events.2040.b.flavor
    			}
    		}
    	}
    	rightfully_imprison_character_effect = {
    		TARGET = scope:2037_manhunt_prisoner
    		IMPRISONER = root
    	}
    	scope:2040_secret_to_learn = { expose_secret = root }
    	worsen_relationship_effect = {
    		TARGET = scope:2037_manhunt_prisoner
    		REASON = rival_imprisoned
    	}
    	stress_impact = {
    		just = minor_stress_impact_loss
    	}
    	ai_chance = {
	    	base = 100
	    	modifier = {
	    		has_trait = just
	    		add = 100
	    	}
	    	modifier = {
	    		OR = {
	    			has_trait = craven
	    			has_trait = paranoid
	    			has_trait = lazy
	    		}
	    		factor = 2
	    	}
	    	ai_value_modifier = {
	    		ai_energy = 1
	    		ai_boldness = 1
	    	}
    	}
    }
    #I shall slay you for glory!
    option = {
    	name = travel_events.2040.c
    	trigger = { is_adult = yes }
    	duel = {
    		skill = prowess
    		target = scope:2037_manhunt_prisoner
    		#You slay them successfully
    		50 = {
    			compare_modifier = {
    				value = scope:duel_value
    				multiplier = 3.5
    				min = -49
    			}
    			desc = travel_events.2040.c_slay.desc
    			send_interface_toast = {
    				type = event_toast_effect_good
    				left_icon = root
    				right_icon = scope:2037_manhunt_prisoner
    				title = travel_events.2040.c_slay.t
    				give_nickname = nick_the_justicar
					if = {
						limit = { 
							has_dlc_feature = tours_and_tournaments
							has_trait = tourney_participant
							has_trait_xp = {
								trait = tourney_participant
								track = foot
								value < 100
							} 
						}
						add_trait_xp = {
							trait = tourney_participant
							track = foot
							value = tournament_hastiludes_xp_gain_major_value
						}
						dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain }
					}
    				else_if = {
    					limit = {
    						has_lifestyle = martial_lifestyle
    						has_focus_or_focus_trait_trigger = { FOCUS = martial_chivalry_focus }
    					}
    					add_martial_lifestyle_perk_points = 1
    				}
    				else_if = {
    					limit = { has_lifestyle = martial_lifestyle }
    					add_martial_lifestyle_xp = major_lifestyle_xp
    				}
    				else = { 
    					dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain }
    				}
    				scope:2037_manhunt_prisoner = {
		    			death = {
							death_reason = death_fight_killer
							killer = root
						}
    				}
    			}
    		}
    		#Slay them but become wounded
    		30 = {
    			compare_modifier = {
    				value = scope:duel_value
    				multiplier = -3.5
    				min = -49
    			}
    			desc = travel_events.2040.c_wounded.desc
    			send_interface_toast = {
    				type = event_toast_effect_bad
    				left_icon = root
    				right_icon = scope:2037_manhunt_prisoner
    				title = travel_events.2040.c_wounded.t
    				give_nickname = nick_the_justicar
    				if = {
    					limit = { 
    						has_dlc_feature = tours_and_tournaments
    						has_trait = tourney_participant
    						has_trait_xp = {
    							trait = tourney_participant
    							track = foot
    							value < 100
    						} 
    					}
    					add_trait_xp = {
    						trait = tourney_participant
    						track = foot
    						value = tournament_hastiludes_xp_gain_medium_value
    					}
    				}
    				else_if = {
    					limit = { has_lifestyle = martial_lifestyle }
    					add_martial_lifestyle_xp = medium_lifestyle_xp
    				}
    				else = { add_prestige = minor_prestige_gain }
    				increase_wounds_effect = { REASON = fight }
    				scope:2037_manhunt_prisoner = {
		    			death = {
							death_reason = death_fight_killer
							killer = root
						}
    				}
    			}
    		}
    		#You get bonked on the head and incapable
    		7 = {
    			compare_modifier = {
    				value = scope:duel_value
    				multiplier = -3.5
    				min = -49
    			}
    			desc = travel_events.2040.c_incapable.desc
    			send_interface_toast = {
    				type = event_toast_effect_bad
    				left_icon = root
    				right_icon = scope:2037_manhunt_prisoner
    				title = travel_events.2040.c_incapable.t
    				add_trait = incapable
    			}
    			hidden_effect = {
    				scope:2037_manhunt_prisoner = {
    					move_to_pool_at = root.location
    				}
    			}
    		}
    		#You die
    		3 = {
    			compare_modifier = {
    				value = scope:duel_value
    				multiplier = -3.5
    				min = -49
    			}
    			desc = travel_events.2040.c_death.desc
    			hidden_effect = {
    				scope:2037_manhunt_prisoner = {
    					move_to_pool_at = root.location
    				}
    			}
    			death = {
					death_reason = death_fight_killer
					killer = scope:2037_manhunt_prisoner
				}
    		}
    	}
    	stress_impact = {
    		just = massive_stress_impact_loss
    		brave = major_stress_impact_loss
    		craven = major_stress_impact_gain
    	}
    	ai_chance = {
	    	base = 25
	    	modifier = {
	    		has_trait = just
	    		has_trait = brave
	    		prowess > extremely_high_skill_rating
	    		NOT = { 
	    			has_trait_rank = {
						trait = wounded
						rank = 2
					}
				}
				factor = 1.5
	    	}
	    	ai_value_modifier = {
	    		ai_boldness = 2
	    		ai_energy = 1
	    	}
    	}
    }
}

############################
## Travel Ruler Events
## 2100-2199
## Filippa Gannholm Kirsten
############################
# travel_events.2100-5 - Someone is trying to assassinate the local ruler!
# travel_events.2106-12 - You get attacked while passing through a capital province; will the County Holder help you?

scripted_trigger 2100_is_far_gone_murder_scheme_trigger = {
	scheme_type = murder
	save_temporary_scope_as = scheme
	scheme_progress > scheme_progress_33
	is_scheme_exposed = no
	NOT = { scheme_owner = root } #That would be annoying
}

scripted_trigger is_appropriate_assassin_trigger = {
	is_available_ai_adult = yes
	location = root.location
}

#Visiting Ruler: Someone is trying to assassinate the local ruler/travelling ruler!
travel_events.2100 = { 
	type = character_event
	title = travel_events.2100.t
	desc = {
		desc = travel_events.2100.desc_intro
		#What terrain are we in
		first_valid = {
			triggered_desc = {
				trigger = {
					location = {
						OR = {
							terrain = forest
							terrain = taiga
						}
					}
				}
				desc = travel_events.2100.desc_intro_trees
			}
			triggered_desc = {
				trigger = {
					location = {
						OR = {
							terrain = hills
							terrain = mountains
						}
					}
				}
				desc = travel_events.2100.desc_intro_hills
			}
			triggered_desc = {
				desc = travel_events.2100.desc_intro_flats
			}
		}
		#Sort out if we have a relation to the person
		triggered_desc = {
			trigger = {
				OR = {
					has_relation_rival = scope:murder_target
					has_relation_friend = scope:murder_target
					has_relation_lover = scope:murder_target
					scope:murder_target = { is_close_family_of = root }
				}
			}
			desc = travel_events.2100.desc_relation_in
		}
		#Rival/Friend?
		first_valid = {
			triggered_desc = {
				trigger = {
					has_relation_rival = scope:murder_target

				}
				desc = travel_events.2100.desc_negative_segway
			}
			triggered_desc = {
				trigger = {
					OR = {
						has_relation_friend = scope:murder_target
						has_relation_lover = scope:murder_target
						scope:murder_target = { is_close_family_of = root }
					}
				}
				desc = travel_events.2100.desc_positive_segway
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						has_relation_rival = scope:murder_target
						has_relation_friend = scope:murder_target
						has_relation_lover = scope:murder_target
						scope:murder_target = { is_close_family_of = root }
					}
				}
				desc = travel_events.2100.desc_relation_out
			}
			#Otherwise no relation
			triggered_desc = {
				#County Liege?
				trigger = {
					location.province_owner = scope:murder_target 
				}
				desc = travel_events.2100.desc_no_relation_liege
			}
			triggered_desc = {
				#Or just a traveller?
				desc = travel_events.2100.desc_no_relation_traveller
			}
		}
		#Continue describing our terrain
		first_valid = {
			triggered_desc = {
				trigger = {
					location = {
						terrain = forest
					}
				}
				desc = travel_events.2100.desc_trees
			}
			triggered_desc = {
				trigger = {
					location = {
						OR = {
							terrain = hills
							terrain = mountains
						}
					}
				}
				desc = travel_events.2100.desc_hills
			}
			triggered_desc = {
				desc = travel_events.2100.desc_flats
			}
		}
		#Concluding words
		desc = travel_events.2100.desc_outro
		#Rival/Friend?
		first_valid = {
			triggered_desc = {
				trigger = {
					has_relation_nemesis = scope:murder_target
				}
				desc = travel_events.2100.desc_outro_negative
			}
			triggered_desc = {
				trigger = {
					OR = {
						has_relation_friend = scope:murder_target
						has_relation_lover = scope:murder_target
						scope:murder_target = { is_close_family_of = root }
					}
				}
				desc = travel_events.2100.desc_outro_positive
			}
			#Otherwise no relation
			triggered_desc = {
				desc = travel_events.2100.desc_outro_default
			}
		}
	}
	theme = travel
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { has_relation_rival = scope:murder_target }
			animation = personality_cynical
		}
		animation = worry
	}
	right_portrait = {
		character = scope:our_would_be_assassin
		animation = scheme
		outfit_tags = { western_stealth_hood }
		hide_info = yes
	}
	lower_right_portrait = {
		character = scope:murder_target
	}
	cooldown = { years = 20 }
	trigger = {
		is_available_travelling_adult = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		location.province_owner ?= {
			is_available_at_peace_adult = yes
			this != root
			any_targeting_scheme = {
				2100_is_far_gone_murder_scheme_trigger = yes
			}
			NOR = { 
				exists = var:had_travel_event_2100_recently
				exists = var:had_travel_event_2107_recently 
			}
		}
		exists = current_travel_plan.travel_leader
		NOR = { 
			exists = var:had_travel_event_2100_recently
			exists = var:had_travel_event_2107_recently 
		}
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium }
		#Let's save our root scope for bilateral shenanigans
		save_scope_as = visiting_ruler
		#Saving for loc reasons
		set_variable = {
			name = assassination_location
			value = root.location
			days = 30
		}
		if = {
			limit = { exists = var:assassination_location }
			#To stop unused errors
		}
		location.province_owner = { save_scope_as = murder_target }
		mp_delay_travel_plan = { DAYS = 90 }
		current_travel_plan.travel_leader = { save_scope_as = caravan_leader }
		scope:murder_target = {
			random_targeting_scheme = {
				limit = {
					2100_is_far_gone_murder_scheme_trigger = yes
				}
				save_scope_as = murder_scheme
			}
			set_variable = {
				name = had_travel_event_2100_recently
				value = root
				years = 20
			}
		}
		#Find our would-be assassin
		scope:murder_scheme = {
			if = {
				limit = {
					any_scheme_agent_character = {
						is_appropriate_assassin_trigger = yes
					}
				}
				random_scheme_agent_character = {
					limit = {
						is_appropriate_assassin_trigger = yes
					}
					save_scope_as = our_would_be_assassin
				}
			}
			else = {
				create_character = {
					template = generic_peasant_character
					culture = root.location.county.culture
					faith = root.location.county.faith
					location = root.location
					after_creation = {
						set_to_lowborn = yes
					}
					save_scope_as = our_would_be_assassin
				}
			}
		}
		try_to_force_assign_character_to_random_agent_slot_effect = {
			SCHEME = scope:murder_scheme
			CHAR = scope:our_would_be_assassin
			YEARS = 5
		}
	}
	#Good riddance
	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { has_relation_nemesis = scope:murder_target }
						desc = travel_events.2100.a_nemesis
					}
					triggered_desc = {
						trigger = { has_relation_rival = scope:murder_target }
						desc = travel_events.2100.a_rival
					}
					triggered_desc = {
						desc = travel_events.2100.a
					}
				}
			}
		}
		duel = {
			skills = { stewardship intrigue }
			value = medium_skill_rating
			#Your entourage remains hidden
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				compare_modifier = {
					value = scope:caravan_leader.intrigue
				}
				compare_modifier = {
					value = scope:caravan_leader.stewardship
				}
				desc = travel_events.2100.a_stealthy_entourage.desc
				send_interface_toast = {
					type = event_toast_text_and_effect_good
					left_icon = root
					right_icon = scope:murder_target
					title = travel_events.2100.a_stealthy_entourage.tt
					desc = travel_events.2100.a_stealthy_entourage.desc
					custom_tooltip = travel_events.2100.a_stealthy_outcome.tt
				}
			}
			#The target ruler notices your presence
			30 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = travel_events.2100.a_nonstealthy_entourage.desc
				send_interface_toast = {
					type = event_toast_text_and_effect_bad
					left_icon = root
					right_icon = scope:murder_target
					title = travel_events.2100.a_nonstealthy_entourage.tt
					desc = travel_events.2100.a_nonstealthy_entourage.desc
					custom_tooltip = travel_events.2100.a_nonstealthy_outcome.tt
					set_variable = {
						name = attempted_to_foil_assassination
						value = no
						years = 10
					}
					scope:murder_target = {
						if = {
							limit = {
								OR = {
									has_relation_friend = root
									has_relation_lover = root
									is_close_family_of = root
								}
							}
							create_character_memory = {
								type = friend_ignored_assassination_memory
								participants = {
									friend = root
								}
							}
						}
						else_if = {
							limit = { has_relation_nemesis = root }
							create_character_memory = {
								type = nemesis_ignored_assassination_memory
								participants = {
									nemesis = root
								}
							}
						}
						else_if = {
							limit = { has_relation_rival = root }
							create_character_memory = {
								type = rival_ignored_assassination_memory
								participants = {
									rival = root
								}
							}
						}
						else = {
							create_character_memory = {
								type = stood_idly_by_assassination_memory
								participants = {
									bystander = root
								}
							}
						}
						if = {
							limit = { exists = scope:new_memory }
							scope:new_memory = {
								set_variable = {
									name = assassination_location
									value = root.location
								}
								if = {
									limit = { exists = var:assassination_location }
									#To prevent 'unused except in loc' errors :catto:
								}
							}
						}	
					}
				}
			}
		}
		scope:murder_target = {
			#Target Ruler: You are being assassinated
			trigger_event = travel_events.2101
		}
		if = {
			limit = {
				OR = {
					has_relation_friend = scope:murder_target
					has_relation_lover = scope:murder_target
					scope:murder_target = { is_close_family_of = root }
				}
			}
			stress_impact = {
				just = medium_stress_impact_gain
				gregarious = medium_stress_impact_gain
				honest = major_stress_impact_gain
				compassionate = massive_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				just = minor_stress_impact_gain
				gregarious = minor_stress_impact_gain
				honest = medium_stress_impact_gain
				compassionate = major_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				has_relation_nemesis = scope:murder_target
				factor = 3
			}
			modifier = {
				has_relation_rival = scope:murder_target
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = sadistic
					has_trait = cynical
					has_trait = craven
					has_trait = paranoid
				}
				add = 50
			}
			modifier = {
				has_trait = lazy
				add = 10
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_honor = -2
				ai_compassion = -3
			}
		}
	}
	#Save them!
	option = {
		name = travel_events.2100.b
		custom_tooltip = travel_events.2100.b_outcome_tt
		if = {
			limit = { exists = current_travel_plan }
			current_travel_plan = {
				delay_travel_plan = { days = 7 }
			}
		}
		set_variable = {
			name = attempted_to_foil_assassination
			value = yes
			years = 10
		}
		#Visiting Ruler: You heroically thwart the assassination of Target Ruler
		trigger_event = travel_events.2104
		scope:murder_target = {
			create_character_memory = {
				type = saved_from_assassination_memory
				participants = {
					rescuer = root
				}
			}
			if = {
				limit = { exists = scope:new_memory }
				scope:new_memory = {
					set_variable = {
						name = assassination_location
						value = root.location
					}
					if = {
						limit = { exists = var:assassination_location }
						#To prevent 'unused except in loc' errors :catto:
					}
				}
			}
			#Target Ruler: Visiting Ruler thwarted your assassination
			trigger_event = {
				id = travel_events.2105
				days = 1
			}
		}
		if = {
			limit = {
				has_relation_rival = scope:murder_target
			}
			stress_impact = {
				callous = medium_stress_impact_gain
				sadistic = massive_stress_impact_gain
				wrathful = medium_stress_impact_gain
				vengeful = massive_stress_impact_gain
				craven = medium_stress_impact_gain
				paranoid = massive_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				callous = minor_stress_impact_gain
				sadistic = major_stress_impact_gain
				craven = minor_stress_impact_gain
				paranoid = major_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				has_relation_best_friend = scope:visiting_ruler
				factor = 3
			}
			modifier = {
				OR = {
					has_relation_friend = scope:visiting_ruler
					has_relation_lover = scope:visiting_ruler
				}
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = gregarious
					has_trait = honest
					has_trait = just
				}
				add = 50
			}
			modifier = {
				has_trait = brave
				add = 25
			}
			ai_value_modifier = {
				ai_compassion = 3
				ai_zeal = 2
				ai_honor = 2
				ai_sociability = -2
			}
		}
	}
    after = {
		mp_resume_travel_plan = yes
    }
}

#Target Ruler: You are being assassinated
travel_events.2101 = { 
	type = character_event
	title = travel_events.2101.t
	desc = travel_events.2101.desc
	theme = travel
	left_portrait = {
		character = root
		animation = disbelief
	}
	right_portrait = {
		character = scope:our_would_be_assassin
		animation = aggressive_sword
		outfit_tags = { western_stealth_hood }
		hide_info = yes
	}
	lower_left_portrait = {
		trigger = { exists = scope:bodyguard }
		character = scope:bodyguard
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium }
		if = {
			limit = { is_travelling = yes }
			current_travel_plan = {
				if = {
					limit = {
						any_entourage_character = {
							has_court_position = bodyguard_court_position
						}
					}
					random_entourage_character = {
						limit = { has_court_position = bodyguard_court_position }
						save_scope_as = bodyguard
					}
				}
				else_if = {
					limit = {
						any_entourage_character = {
							has_court_position = akolouthos_court_position
						}
					}
					random_entourage_character = {
						limit = { has_court_position = akolouthos_court_position }
						save_scope_as = bodyguard
					}
				}
			}
		}
		else_if = {
			limit = {
				employs_court_position = bodyguard_court_position
			}
			random_court_position_holder = {
				limit = { 
					has_court_position = bodyguard_court_position
				}
				save_scope_as = bodyguard
			}
		}
		else = {
			random_court_position_holder = {
				limit = { 
					has_court_position = akolouthos_court_position
				}
				save_scope_as = bodyguard
			}
		}
	}
	#Ayyy!
	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:bodyguard }
						desc = travel_events.2101.a_guards
					}
					triggered_desc = {
						desc = travel_events.2101.a
					}
				}
			}
		}
		#If we have a bodyguard, send them in
		if = {
			limit = {
				exists = scope:bodyguard
			}
			scope:bodyguard = {
				duel = {
					skill = prowess 
					target = scope:our_would_be_assassin
					#Bodyguard slays the assassin
					70 = {
						compare_modifier = {
							value = scope:duel_value
							multiplier = 3.5
							min = -49
						}
						desc = travel_events.2101.a_bodyguard_kill.desc
						root = {
							send_interface_toast = {
								type = event_toast_effect_good
								left_icon = scope:bodyguard
								right_icon = scope:our_would_be_assassin
								title = travel_events.2101.a_assassin_death.tt
								scope:our_would_be_assassin = {
									death = {
										death_reason = death_fight_killer
										killer = scope:bodyguard
									}
								}
							}
						}
					}
					#Bodyguard slays the assassin but becomes wounded
					30 = {
						compare_modifier = {
							value = scope:duel_value
							multiplier = -3.5
							min = -49
						}
						desc = travel_events.2101.a_bodyguard_wounded.desc
						root = {
							send_interface_toast = {
								type = event_toast_effect_bad
								left_icon = scope:bodyguard
								right_icon = scope:our_would_be_assassin
								title = travel_events.2101.a_bodyguard_wounded.tt
								scope:bodyguard = {
									increase_wounds_effect = { REASON = fight }
								}
								scope:our_would_be_assassin = {
									death = {
										death_reason = death_fight_killer
										killer = scope:bodyguard
									}
								}
							}
						}
					}
				}
			}
			add_character_modifier = {
				modifier = travel_heightened_senses_modifier
				years = 10
			}
			scope:visiting_ruler = {
				send_interface_toast = {
					type = event_toast_text_bad
					left_icon = scope:murder_target
					title = travel_events.2101.a_ruler_survived.tt
					desc = travel_events.2101.a_ruler_survived.desc
				}
			}
		}
		else = {
			duel = {
				skill = prowess 
				target = scope:our_would_be_assassin
				#You retaliate
				70 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 3.5
						min = -49
					}
					desc = travel_events.2101.a_assassin_death.desc
					send_interface_toast = {
						type = event_toast_effect_good
						left_icon = root
						right_icon = scope:our_would_be_assassin
						title = travel_events.2101.a_assassin_death.tt
						add_prowess_skill = 1
						add_character_modifier = {
							modifier = travel_heightened_senses_modifier
							years = 10
						}
						scope:our_would_be_assassin = {
							death = {
								death_reason = death_fight_killer
								killer = root
							}
						}
					}
					scope:visiting_ruler = {
						send_interface_toast = {
							type = event_toast_text_bad
							left_icon = scope:murder_target
							title = travel_events.2101.a_ruler_survived.tt
							desc = travel_events.2101.a_ruler_survived.desc
						}
					}
				}
				#You... die
				30 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -3.5
						min = -49
					}
					desc = travel_events.2101.a_death.desc
					death = {
						death_reason = death_murder
					}
					scope:visiting_ruler = {
						send_interface_toast = {
							type = event_toast_text_bad
							left_icon = scope:murder_target
							title = travel_events.2101.a_ruler_assassinated.tt
							desc = travel_events.2101.a_ruler_assassinated.desc
						}
					}
				}
			}
		}
		stress_impact = {
			base = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
		}
	}
	after = {
		if = {
			limit = { is_alive = yes }
			if = {
				limit = {
					scope:visiting_ruler = {
						exists = var:attempted_to_foil_assassination
						var:attempted_to_foil_assassination = no
					}
				}
				#Target Ruler: Wait a minute, didn't I see Visiting Ruler??
				trigger_event = travel_events.2102
			}
			else = {
				scope:murder_scheme = {
					expose_scheme = yes
					expose_scheme_agent = scope:our_would_be_assassin
				}
			}
		}
	}
}

#Target Ruler: Wait a minute, didn't I see Visiting Ruler??
travel_events.2102 = { 
	type = character_event
	title = travel_events.2102.t
	desc = {
		desc = travel_events.2102.desc
		first_valid = {
			triggered_desc = {
				trigger = {
					has_relation_rival = scope:visiting_ruler
				}
				desc = travel_events.2102.desc_negative
			}
			triggered_desc = {
				trigger = {
					OR = {
						has_relation_friend = scope:visiting_ruler
						has_relation_lover = scope:visiting_ruler
						scope:visiting_ruler = { is_close_family_of = root }
					}
				}
				desc = travel_events.2102.desc_positive
			}
			triggered_desc = {
				desc = travel_events.2102.desc_default
			}
		}
	}
	theme = travel
	left_portrait = {
		character = root
		animation = anger
	}
	right_portrait = {
		character = scope:visiting_ruler
		animation = schadenfreude
	}
	immediate = {
		scope:murder_scheme = {
			expose_scheme = yes
			expose_scheme_agent = scope:our_would_be_assassin
		}
	}
	#That SoB
	option = {
		name = travel_events.2102.a
		#Show what's going to happen, but don't upgrade relation until all bilateral events have been resolved
		show_as_tooltip = {
			if = {
				limit = {
					has_relation_nemesis = scope:visiting_ruler
				}
				add_opinion = {
					modifier = ignored_my_assassination_opinion
					target = scope:visiting_ruler
					opinion = -30
				}
			}
			else = {
				worsen_relationship_effect = {
					TARGET = scope:visiting_ruler
					REASON = rival_did_not_thwart_murder
				}
			}
		}
		scope:visiting_ruler = {
			#Visiting Ruler: Letter event - Target Ruler knows you what you did (or rather -didn't- do)
			trigger_event = {
				id = travel_events.2103
				days = 5
			}
		}
		ai_chance = {
			base = 100
		}
	}
}

#Visiting Ruler: Letter event - Target Ruler knows you what you did (or rather -didn't- do)
travel_events.2103 = {
	type = letter_event
	opening = travel_events.2103.t
	desc = {
		desc = travel_events.2103.desc_intro
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:murder_target = {
						has_relation_rival = root
					}
				}
				desc = travel_events.2103.desc_negative
			}
			triggered_desc = {
				trigger = {
					scope:murder_target = {
						OR = {
							has_relation_friend = root
							has_relation_lover = root
							is_close_family_of = root
						}
					}
				}
				desc = travel_events.2103.desc_positive
			}
			triggered_desc = {
				desc = travel_events.2103.desc_default
			}
		}
	}
	sender = scope:murder_target
	#They survived, now, didnt they?
	option = {
		name = travel_events.2103.a
		scope:murder_target = {
			if = {
				limit = {
					has_relation_nemesis = scope:visiting_ruler
				}
				add_opinion = {
					modifier = ignored_my_assassination_opinion
					target = scope:visiting_ruler
					opinion = -30
				}
			}
			else = {
				worsen_relationship_effect = {
					TARGET = scope:visiting_ruler
					REASON = rival_did_not_thwart_murder
				}
			}
		}
		ai_chance = {
			base = 100
		}
	}
}

#Visiting Ruler: You heroically thwart the assassination of Target Ruler
travel_events.2104 = { 
	type = character_event
	title = travel_events.2104.t
	desc = travel_events.2104.desc
	theme = travel
	left_portrait = {
		character = root
		animation = aggressive_sword
	}
	right_portrait = {
		character = scope:murder_target
		animation = disbelief
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_high }
	}
	#Excellent!
	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = {
							NOR = {
								has_trait = humble
								has_trait = shy
							}
						}
						desc = travel_events.2104.a
					}
					#Anyone would have done the same
					triggered_desc = {
						desc = travel_events.2104.a_shy
					}
				}
			}
		}
		add_martial_skill = 1
		add_character_modifier = {
			modifier = travel_chivalrous_deeds_modifier
			years = 10
		}
		if = {
			limit = { has_focus = martial_chivalry_focus }
			add_martial_lifestyle_xp = medium_lifestyle_experience
		}
		#Show what's going to happen, but don't upgrade relation until all bilateral events have been resolved
		show_as_tooltip = {
			scope:murder_target = {
				if = {
					limit = {
						has_relation_best_friend = scope:visiting_ruler
					}
					add_opinion = {
						modifier = feast_saved_my_life_opinion
						target = scope:visiting_ruler
						opinion = 30
					}
				}
				else = {
					improve_relationship_effect = {
						TARGET = scope:visiting_ruler
						REASON = friend_thwarted_murder
					}
				}
			}
		}
		if = {
			limit = {
				has_government = landless_adventurer_government
				scope:murder_target = {
					is_ai = yes
				}
			}
			add_contact = scope:murder_target
		}
		ai_chance = {
			base = 100
		}
	}
}

#Target Ruler: Visiting Ruler thwarted your assassination
travel_events.2105 = { 
	type = character_event
	title = travel_events.2105.t
	desc = {
		desc = travel_events.2105.desc_intro
		first_valid = {
			triggered_desc = {
				trigger = {
					has_relation_rival = scope:visiting_ruler
				}
				desc = travel_events.2105.desc_negative
			}
			triggered_desc = {
				trigger = {
					has_relation_friend = scope:visiting_ruler
				}
				desc = travel_events.2105.desc_positive
			}
			triggered_desc = {
				desc = travel_events.2105.desc_default
			}
		}
	}
	theme = travel
	left_portrait = {
		character = root
		animation = disbelief
	}
	right_portrait = {
		character = scope:visiting_ruler
		animation = marshal
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small }
	}
	#Thank you
	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { 
							OR = {
								has_trait = callous
								has_trait = sadistic
								has_trait = cynical
								has_trait = arrogant
							}
						}
						desc = travel_events.2105.a_cynical
					}
					triggered_desc = {
						desc = travel_events.2105.a
					}
				}
			}
		}
		custom_tooltip = travel_events.2105.a.tt
		add_character_modifier = {
			modifier = travel_heightened_senses_modifier
			years = 10
		}
		ai_chance = {
			base = 100
		}
	}
	after = {
		if = {
			limit = {
				has_relation_best_friend = scope:visiting_ruler
			}
			add_opinion = {
				modifier = feast_saved_my_life_opinion
				target = scope:visiting_ruler
				opinion = 50
			}
		}
		else = {
			improve_relationship_effect = {
				TARGET = scope:visiting_ruler
				REASON = friend_thwarted_murder
			}
		}
	}
}

#You get attacked while passing through a capital province; will the County Holder help you?
#Our Travelling Ruler is travelling; let's grab a County Holder to notice our travel
travel_events.2106 = { 
	type = character_event
	hidden = yes
	cooldown = { years = 20 }
	trigger = {
		is_available_travelling_adult = yes
		is_playable_character = yes
		is_location_valid_for_travel_event_on_land = yes
		exists = location.province_owner
		location.province_owner != root
		location.province_owner = {
			location = root.location
			is_available_at_peace_adult = yes
			NOR = { 
				exists = var:had_travel_event_2100_recently
				exists = var:had_travel_event_2107_recently 
			}
		}
		current_travel_plan = {
			any_entourage_character = {
				is_knight_of = root
				is_available_travelling_ai_adult = yes
			}
		}
	}
	weight_multiplier = {
		base = 1
	}
	immediate = {
		#Setting up scopes
		root = { save_scope_as = travelling_ruler }
		location.province_owner = { save_scope_as = province_liege }
		location = { save_scope_as = holding_location }
		#Cooldown for the province owner
		scope:province_liege = {
			set_variable = {
				name = had_travel_event_2107_recently
				value = root
				years = 20
			}
			trigger_event = travel_events.2107
		}
	}
}

scripted_effect rescuer_battle_effect = {
	random_list = {
		1 = {
			trigger = { exists = scope:first_potential_hurt_knight }
			desc = travel_events.2109.a_first_hurt.desc
			send_interface_toast = {
				type = event_toast_effect_bad
				left_icon = root
				right_icon = scope:first_potential_hurt_knight
				title = travel_events.2109.a_hurt.tt
				scope:first_potential_hurt_knight = {
					increase_wounds_effect = { REASON = battle }
				}
			}
		}
		1 = {
			trigger = { exists = scope:second_potential_hurt_knight }
			desc = travel_events.2109.a_second_hurt.desc
			send_interface_toast = {
				type = event_toast_effect_bad
				left_icon = root
				right_icon = scope:second_potential_hurt_knight
				title = travel_events.2109.a_hurt.tt
				scope:second_potential_hurt_knight = {
					increase_wounds_effect = { REASON = battle }
				}
			}
		}
		1 = {
			trigger = { exists = scope:third_potential_hurt_knight }
			desc = travel_events.2109.a_third_hurt.desc
			send_interface_toast = {
				type = event_toast_effect_bad
				left_icon = root
				right_icon = scope:third_potential_hurt_knight
				title = travel_events.2109.a_hurt.tt
				scope:third_potential_hurt_knight = {
					increase_wounds_effect = { REASON = battle }
				}
			}
		}
		1 = {
			desc = travel_events.2109.a_none_hurt.desc
			send_interface_toast = {
				type = event_toast_text_good
				left_icon = root
				title = travel_events.2109.a_none_hurt.tt
				desc = travel_events.2109.a_none_hurt.desc
				#No-one gets hurt
			}	
		}
	}
	scope:holding_location = {
		add_province_modifier = {
			modifier = travel_sacrificed_levies_modifier
			years = 10
		}
	}
	scope:holding_location.county = {
		add_county_modifier = {
			modifier = travel_safe_roads_modifier
			years = 10
		}
	}
}

#County Holder: You notice a Travelling Ruler coming under attack
travel_events.2107 = { 
	type = character_event
	title = travel_events.2107.t
	desc = {
		#Intro/Region
		first_valid = {
			#Farmlands/Plains/Steppe
			triggered_desc = {
				trigger = {
					scope:holding_location = {
						OR = {
							terrain = farmlands
							terrain = plains
							terrain = steppe
						}
					}
				}
				desc = travel_events.2107.desc_intro_plains
			}
			#Desert/Drylands
			triggered_desc = {
				trigger = {
					scope:holding_location = {
						OR = {
							terrain = desert
							terrain = drylands
						}
					}
				}
				desc = travel_events.2107.desc_intro_desert
			}
			#Floodplains/Wetlands
			triggered_desc = {
				trigger = {
					scope:holding_location = {
						OR = {
							terrain = floodplains
							terrain = wetlands
						}
					}
				}
				desc = travel_events.2107.desc_intro_wetlands
			}
			#Forest
			triggered_desc = {
				trigger = {
					scope:holding_location = {
						OR = {
							terrain = forest
							terrain = taiga
						}
					}
				}
				desc = travel_events.2107.desc_intro_forest
			}
			#Mountains
			triggered_desc = {
				trigger = {
					scope:holding_location = {
						terrain = mountains
					}
				}
				desc = travel_events.2107.desc_intro_mountains
			}
			#Hills
			triggered_desc = {
				trigger = {
					scope:holding_location = {
						terrain = hills
					}
				}
				desc = travel_events.2107.desc_intro_hills
			}
			#Jungle
			triggered_desc = {
				trigger = {
					scope:holding_location = {
						terrain = jungle
					}
				}
				desc = travel_events.2107.desc_intro_jungle
			}
			#Fallback
			triggered_desc = {
				desc = travel_events.2107.desc_intro
			}
		}
		desc = travel_events.2107.desc_segway
		#Outro/Relation
		first_valid = {
			#Nemesis/Rival
			triggered_desc = {
				trigger = {
					has_relation_rival = scope:travelling_ruler
				}
				desc = travel_events.2107.desc_outro_negative
			}	
			#Best Friend/Friend/Lover
			triggered_desc = {
				trigger = {
					OR = {
						has_relation_friend = scope:travelling_ruler
						has_relation_lover = scope:travelling_ruler
						has_relation_soulmate = scope:travelling_ruler
					}
				}
				desc = travel_events.2107.desc_outro_positive
			}
			#Extended Family
			triggered_desc = {
				trigger = {
					is_close_or_extended_family_of = scope:travelling_ruler
				}
				desc = travel_events.2107.desc_outro_family
			}
			#No Relation
			triggered_desc = {
				desc = travel_events.2107.desc_outro
			}
		}
	}
	theme = travel
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				has_relation_rival = scope:travelling_ruler
			}
			animation = personality_cynical
		}
		animation = worry
	}
	right_portrait = {
		character = scope:travelling_ruler
		animation = fear
	}
	immediate = {
		if = {
			limit = {
				any_knight = { }
			}
			every_knight = {
				add_to_list = potential_hurt_knights_list
			}
			ordered_in_list = {
				list = potential_hurt_knights_list
				order_by = prowess
				save_scope_as = first_potential_hurt_knight
			}
			if = {
				limit = {
					list_size = {
						name = potential_hurt_knights_list
						value > 1
					}
				}
				ordered_in_list = {
					list = potential_hurt_knights_list
					order_by = prowess
					limit = { 
						this != scope:first_potential_hurt_knight
					}
					save_scope_as = second_potential_hurt_knight
				}
			}
			if = {
				limit = {
					list_size = {
						name = potential_hurt_knights_list
						value > 2
					}
				}
				ordered_in_list = {
					list = potential_hurt_knights_list
					order_by = prowess
					limit = { 
						NOR = { 
							this = scope:first_potential_hurt_knight
							this = scope:second_potential_hurt_knight 
						}
					}
					save_scope_as = third_potential_hurt_knight
				}
			}
		}
	}
	#Help them
	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { 
							faith = { religion_tag = christianity_religion }
						}
						desc = travel_events.2107.a_christian
					}
					triggered_desc = {
						desc = travel_events.2107.a
					}
				}
			}
		}
		custom_tooltip = travel_events.2107.a_outcome_tt
		show_as_tooltip = {
			rescuer_battle_effect = yes
		}
		scope:travelling_ruler = {
			#Travelling Ruler: You get saved by County Holder
			trigger_event = travel_events.2108
		}
		#Stress stress stress
		if = {
			limit = {
				has_relation_rival = scope:travelling_ruler
			}
			stress_impact = {
				callous = medium_stress_impact_gain
				sadistic = massive_stress_impact_gain
				wrathful = medium_stress_impact_gain
				vengeful = massive_stress_impact_gain
				craven = medium_stress_impact_gain
				paranoid = massive_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				callous = minor_stress_impact_gain
				sadistic = major_stress_impact_gain
				craven = minor_stress_impact_gain
				paranoid = major_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				has_relation_best_friend = scope:travelling_ruler
				factor = 3
			}
			modifier = {
				OR = {
					has_relation_friend = scope:travelling_ruler
					has_relation_lover = scope:travelling_ruler
				}
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = gregarious
					has_trait = honest
					has_trait = just
				}
				add = 50
			}
			modifier = {
				has_trait = brave
				add = 25
			}
			ai_value_modifier = {
				ai_compassion = 3
				ai_zeal = 2
				ai_honor = 2
				ai_sociability = -2
			}
		}
	}
	#Don't help them
	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { 
							has_relation_rival = scope:travelling_ruler
						}
						desc = travel_events.2107.b_negative
					}
					triggered_desc = {
						desc = travel_events.2107.b
					}
				}
			}
		}
		custom_tooltip = travel_events.2107.b_outcome_tt
		scope:travelling_ruler = {
			#Travelling Ruler: You get ruthlessly attacked
			trigger_event = travel_events.2110
		}
		#Stress stress stress
		if = {
			limit = {
				OR = {
					has_relation_friend = scope:travelling_ruler
					has_relation_lover = scope:travelling_ruler
					has_relation_soulmate = scope:travelling_ruler
					scope:travelling_ruler = { is_close_or_extended_family_of = root }
				}
			}
			stress_impact = {
				just = medium_stress_impact_gain
				gregarious = medium_stress_impact_gain
				honest = major_stress_impact_gain
				compassionate = massive_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				just = minor_stress_impact_gain
				gregarious = minor_stress_impact_gain
				honest = medium_stress_impact_gain
				compassionate = major_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				has_relation_nemesis = scope:travelling_ruler
				factor = 3
			}
			modifier = {
				has_relation_rival = scope:travelling_ruler
				factor = 2
			}
			modifier = {
				OR = {
					has_trait = sadistic
					has_trait = cynical
					has_trait = craven
					has_trait = paranoid
				}
				add = 50
			}
			modifier = {
				has_trait = lazy
				add = 10
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_honor = -2
				ai_compassion = -3
			}
		}
	}
}

#Travelling Ruler: You are saved by County Holder
travel_events.2108 = { 
	type = character_event
	title = travel_events.2108.t
	desc = {
		desc = travel_events.2108.desc_intro
		first_valid = {
			#Bad relation
			triggered_desc = {
				trigger = {
					has_relation_rival = scope:province_liege
				}
				desc = travel_events.2108.desc_negative
			}
			#Good relation
			triggered_desc = {
				trigger = {
					OR = {
						has_relation_friend = scope:province_liege
						has_relation_lover = scope:province_liege
						has_relation_soulmate = scope:province_liege
						is_close_family_of = scope:province_liege
					}
				}
				desc = travel_events.2108.desc_positive
			}
			#No relation
			triggered_desc = {
				desc = travel_events.2108.desc
			}
		}
		desc = travel_events.2108.desc_segway
		first_valid = {
			#Bad relation
			triggered_desc = {
				trigger = {
					has_relation_rival = scope:province_liege
				}
				desc = travel_events.2108.desc_outro_negative
			}
			#Good relation
			triggered_desc = {
				trigger = {
					OR = {
						has_relation_friend = scope:province_liege
						has_relation_lover = scope:province_liege
						has_relation_soulmate = scope:province_liege
						is_close_family_of = scope:province_liege
					}
				}
				desc = travel_events.2108.desc_outro_positive
			}
			#No relation
			triggered_desc = {
				desc = travel_events.2108.desc_outro
			}
		}
	}
	theme = travel_danger
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				has_relation_rival = scope:province_liege
			}
			animation = disbelief
		}
		triggered_animation = {
			trigger = {
				OR = {
					has_relation_friend = scope:province_liege
					has_relation_lover = scope:province_liege
					has_relation_soulmate = scope:province_liege
					is_close_family_of = scope:province_liege
				}
			}
			animation = ecstasy
		}
		animation = admiration
	}
	right_portrait = {
		character = scope:province_liege
		animation = marshal
	}

	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small }
	}

	#Yay
	option = {
		name = {
			text = {
				first_valid = {
					#That's... nice
					triggered_desc = {
						trigger = { 
							has_relation_rival = scope:province_liege
						}
						desc = travel_events.2108.a_negative
					}
					#Yay
					triggered_desc = {
						desc = travel_events.2108.a
					}
				}
			}
		}
		custom_tooltip = travel_events.2108.a.tt
		ai_chance = {
			base = 100
		}
	}
	after = {
		#Show what's going to happen, but don't upgrade relation until all bilateral events have been resolved
		show_as_tooltip = {
			if = {
				limit = {
					has_relation_best_friend = scope:province_liege
				}
				add_opinion = {
					modifier = feast_saved_my_life_opinion
					target = scope:province_liege
					opinion = 50
				}
			}
			else = {
				improve_relationship_effect = {
					TARGET = scope:province_liege
					REASON = friend_defended_against_assault
				}
			}
		}
		create_character_memory = {
			type = saved_from_assault_memory
			participants = { 
				rescuer = scope:province_liege
			}
		}
		if = {
			limit = { exists = scope:new_memory }
			scope:new_memory = {
				set_variable = {
					name = attack_location
					value = scope:holding_location
				}
				if = {
					limit = { exists = var:attack_location }
					#To prevent 'unused except in loc' errors :catto:
				}
			}
		}
		scope:province_liege = {
			#County Holder: You save Travelling Ruler
			trigger_event = {
				id = travel_events.2109
				days = 1
			}
		}
	}
}

#County Holder: You save Travelling Ruler
travel_events.2109 = { 
	type = character_event
	title = travel_events.2109.t
	desc = {
		desc = travel_events.2109.desc_intro
		first_valid = {
			#Bad relation
			triggered_desc = {
				trigger = {
					has_relation_rival = scope:travelling_ruler
				}
				desc = travel_events.2109.desc_negative
			}
			#Good relation
			triggered_desc = {
				trigger = {
					OR = {
						has_relation_friend = scope:travelling_ruler
						has_relation_lover = scope:travelling_ruler
						has_relation_soulmate = scope:travelling_ruler
						is_close_family_of = scope:travelling_ruler
					}
				}
				desc = travel_events.2109.desc_positive
			}
			#No relation
			triggered_desc = {
				desc = travel_events.2109.desc
			}
		}
		desc = travel_events.2109.desc_segway
		first_valid = {
			#Bad relation
			triggered_desc = {
				trigger = {
					has_relation_rival = scope:travelling_ruler
				}
				desc = travel_events.2109.desc_outro_negative
			}
			#Good relation
			triggered_desc = {
				trigger = {
					OR = {
						has_relation_friend = scope:travelling_ruler
						has_relation_lover = scope:travelling_ruler
						has_relation_soulmate = scope:travelling_ruler
						is_close_family_of = scope:travelling_ruler
					}
				}
				desc = travel_events.2109.desc_outro_positive
			}
			#No relation
			triggered_desc = {
				desc = travel_events.2109.desc_outro
			}
		}
	}
	theme = travel
	left_portrait = {
		character = root
		animation = marshal
	}
	right_portrait = {
		character = scope:travelling_ruler
		triggered_animation = {
			trigger = {
				has_relation_rival = scope:province_liege
			}
			animation = pain
		}
		triggered_animation = {
			trigger = {
				OR = {
					has_relation_friend = scope:province_liege
					has_relation_lover = scope:province_liege
					has_relation_soulmate = scope:province_liege
					is_close_family_of = scope:province_liege
				}
			}
			animation = ecstasy
		}
		animation = admiration
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_high }
		rescuer_battle_effect = yes
	}
	#Hero woop woop
	option = {
		name = {
			text = {
				first_valid = {
					#Sure
					triggered_desc = {
						trigger = { 
							has_relation_rival = scope:travelling_ruler
						}
						desc = travel_events.2109.a_negative
					}
					#Happy that you're safe
					triggered_desc = {
						trigger = { 
							OR = {
								has_relation_friend = scope:travelling_ruler
								has_relation_lover = scope:travelling_ruler
								has_relation_soulmate = scope:travelling_ruler
								is_close_family_of = scope:travelling_ruler
							}
						}
						desc = travel_events.2109.a_positive
					}
					#Yay
					triggered_desc = {
						desc = travel_events.2109.a
					}
				}
			}
		}
		add_martial_skill = 1
		ai_chance = {
			base = 100
		}
	}
	after = {
		#Set relationship effect
		scope:travelling_ruler = {
			if = {
				limit = {
					has_relation_best_friend = scope:province_liege
				}
				add_opinion = {
					modifier = feast_saved_my_life_opinion
					target = scope:province_liege
					opinion = 50
				}
			}
			else = {
				improve_relationship_effect = {
					TARGET = scope:province_liege
					REASON = friend_defended_against_assault
				}
			}
		}
	}
}

scripted_effect garner_combat_trait_effect = {
	random_list = {
		1 = {
			trigger = {
				NOT = { has_trait = unyielding_defender }
			}
			set_variable = {
				name = trait_type
				value = flag:unyielding_defender
			}
		}
		1 = {
			trigger = {
				NOT = { has_trait = flexible_leader }
			}
			set_variable = {
				name = trait_type
				value = flag:flexible_leader
			}
		}
		1 = {
			trigger = {
				NOT = { has_trait = organizer }
			}
			set_variable = {
				name = trait_type
				value = flag:organizer
			}
		}
		1 = {
			#None of the above
			trigger = {
				has_trait = unyielding_defender
				has_trait = flexible_leader
				has_trait = organizer
			}
			set_variable = {
				name = trait_type
				value = flag:martial
			}
		}
	}
}

scripted_effect garner_wound_trait_effect = {
	random_list = {
		1 = {
			trigger = {
				NOT = { has_trait = maimed }
			}
			set_variable = {
				name = wound_type
				value = flag:maimed
			}
		}
		1 = {
			trigger = {
				NOT = { has_trait = one_legged }
			}
			set_variable = {
				name = wound_type
				value = flag:one_legged
			}
		}
		1 = {
			trigger = {
				NOT = { has_trait = one_eyed }
			}
			set_variable = {
				name = wound_type
				value = flag:one_eyed
			}
		}
		1 = {
			trigger = {
				NOT = { has_trait = disfigured }
			}
			set_variable = {
				name = wound_type
				value = flag:disfigured
			}
		}
	}
}

scripted_effect set_trait_effect = {
	if = {
		limit = {
			exists = var:trait_type
			var:trait_type = flag:unyielding_defender
		}
		add_trait = unyielding_defender
	}
	if = {
		limit = {
			exists = var:trait_type
			var:trait_type = flag:flexible_leader
		}
		add_trait = flexible_leader
	}
	if = {
		limit = {
			exists = var:trait_type
			var:trait_type = flag:organizer
		}
		add_trait = organizer
	}
	if = {
		limit = {
			exists = var:trait_type
			var:trait_type = flag:martial
		}
		add_martial_skill = 1
	}
}

#Travelling Ruler: You get ruthlessly attacked
travel_events.2110 = { 
	type = character_event
	title = travel_events.2110.t
	desc = {
		desc = travel_events.2110.desc
		first_valid = {
			triggered_desc = {
				trigger = {
					has_relation_rival = scope:province_liege
				}
				desc = travel_events.2110.desc_negative
			}
			triggered_desc = {
				trigger = {
					OR = {
						has_relation_friend = scope:province_liege
						has_relation_lover = scope:province_liege
						has_relation_soulmate = scope:province_liege
						is_close_family_of = scope:province_liege
					}
				}
				desc = travel_events.2110.desc_positive
			}
			triggered_desc = {
				desc = travel_events.2110.desc_neutral
			}
		}
		desc = travel_events.2110.desc_outro
	}  
	theme = travel_danger
	left_portrait = {
		character = root
		animation = worry
	}
	right_portrait = {
		character = scope:knight_to_sacrifice
		animation = marshal
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium }
		mp_delay_travel_plan = { DAYS = 90 }
		current_travel_plan = {
			if = {
				limit = { 
					any_entourage_character = { 
						is_knight_of = root 
						is_available_travelling_ai_adult = yes
					}
				}
				random_entourage_character = {
					limit = {
						is_knight_of = root 
						is_available_travelling_ai_adult = yes
					}
					save_scope_as = knight_to_sacrifice
				}
			}
		}
		garner_wound_trait_effect = yes
		garner_combat_trait_effect = yes
	}
	#Meet them head on
	option = {
		name = travel_events.2110.a
		#Put at the top to avoid errors if death		
		stress_impact = {
			brave = medium_stress_impact_loss
			craven = major_stress_impact_gain
			paranoid = massive_stress_impact_gain
		}
		duel = {
			skill = prowess
			value = medium_skill_rating
			#You survive, _unscathed_
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				desc = travel_events.2110.a_unscathed.desc
				send_interface_toast = {
					type = event_toast_effect_good
					left_icon = root
					title = travel_events.2110.a_unscathed.tt
					set_trait_effect = yes
				}
				scope:province_liege = {
					set_variable = {
						name = travelling_ruler_status
						value = flag:unscathed
						days = 10
					}
				}
			}
			#You become injured
			30 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = travel_events.2110.a_injured.desc
				send_interface_toast = {
					type = event_toast_effect_neutral
					left_icon = root
					title = travel_events.2110.a_injured.tt
					increase_wounds_effect = { REASON = battle }
					set_trait_effect = yes
				}
				scope:province_liege = {
					set_variable = {
						name = travelling_ruler_status
						value = flag:survived
						days = 10
					}
				}
			}
			#You become maimed
			30 = {
				trigger = {
					exists = var:wound_type
					var:wound_type = flag:maimed
				}
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = travel_events.2110.a_severely_injured.desc
				send_interface_toast = {
					type = event_toast_effect_neutral
					left_icon = root
					title = travel_events.2110.a_severely_injured.tt
					apply_maimed_trait_and_modifier_effect = yes
					set_trait_effect = yes
				}
				scope:province_liege = {
					set_variable = {
						name = travelling_ruler_status
						value = flag:survived
						days = 10
					}
				}
			}
			#You become one-legged
			30 = {
				trigger = {
					exists = var:wound_type
					var:wound_type = flag:one_legged
				}
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = travel_events.2110.a_severely_injured.desc
				send_interface_toast = {
					type = event_toast_effect_neutral
					left_icon = root
					title = travel_events.2110.a_severely_injured.tt
					add_trait = one_legged
					set_trait_effect = yes
				}
				scope:province_liege = {
					set_variable = {
						name = travelling_ruler_status
						value = flag:survived
						days = 10
					}
				}
			}
			#You become one-eyed
			30 = {
				trigger = {
					exists = var:wound_type
					var:wound_type = flag:one_eyed
				}
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = travel_events.2110.a_severely_injured.desc
				send_interface_toast = {
					type = event_toast_effect_neutral
					left_icon = root
					title = travel_events.2110.a_severely_injured.tt
					add_trait = one_eyed
					set_trait_effect = yes
				}
				scope:province_liege = {
					set_variable = {
						name = travelling_ruler_status
						value = flag:survived
						days = 10
					}
				}
			}
			#You become disfigured
			30 = {
				trigger = {
					exists = var:wound_type
					var:wound_type = flag:disfigured
				}
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				desc = travel_events.2110.a_severely_injured.desc
				send_interface_toast = {
					type = event_toast_effect_neutral
					left_icon = root
					title = travel_events.2110.a_severely_injured.tt
					add_trait = disfigured
					set_trait_effect = yes
				}
				scope:province_liege = {
					set_variable = {
						name = travelling_ruler_status
						value = flag:survived
						days = 10
					}
				}
			}
			#You die
			30 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = 10
				}
				desc = travel_events.2110.a_death
				death = {
					death_reason = death_battle
				}
				scope:province_liege = {
					set_variable = {
						name = travelling_ruler_status
						value = flag:died
						days = 10
					}
				}
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				has_relation_best_friend = scope:knight_to_sacrifice
				factor = 3
			}
			modifier = {
				OR = {
					has_relation_friend = scope:knight_to_sacrifice
					has_relation_lover = scope:knight_to_sacrifice
				}
				factor = 2
			}
			modifier = {
				OR = {
					prowess < medium_skill_rating
					has_trait_rank = {
						trait = wounded
						rank = 2
					}
				}
				factor = 0
			}
			modifier = {
				has_trait = compassionate
				add = 50
			}
			modifier = {
				has_trait = brave
				add = 25
			}
			ai_value_modifier = {
				ai_compassion = 3
				ai_boldness = 2
				ai_honor = 2
				ai_energy = -2
			}
		}
	}
	#Order someone to stay behind
	option = {
		name = travel_events.2110.b
		trigger = { exists = scope:knight_to_sacrifice }
		custom_tooltip = travel_events.2110.b_tt
		scope:knight_to_sacrifice = {
			death = {
				death_reason = death_battle
			}
		}
		create_character_memory = {
			type = knight_sacrificed_memory
			participants = { 
				knight = scope:knight_to_sacrifice
			}
		}
		if = {
			limit = { exists = scope:new_memory }
			scope:new_memory = {
				set_variable = {
					name = sacrifice_location
					value = scope:holding_location
				}
				if = {
					limit = { exists = var:sacrifice_location }
					#To prevent 'unused except in loc' errors :catto:
				}
			}
		}
		scope:province_liege = {
			set_variable = {
				name = travelling_ruler_status
				value = flag:sacrifice
				days = 10
			}
		}
		if = {
			limit = {
				OR = {
					has_relation_friend = scope:knight_to_sacrifice
					has_relation_lover = scope:knight_to_sacrifice
					has_relation_soulmate = scope:knight_to_sacrifice
				}
				NOT = { has_trait = callous }
			}
			stress_impact = {
				base = massive_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				compassionate = massive_stress_impact_gain
				gregarious = major_stress_impact_gain
				brave = major_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				has_relation_nemesis = scope:knight_to_sacrifice
				factor = 3
			}
			modifier = {
				has_relation_rival = scope:knight_to_sacrifice

				factor = 2
			}
			modifier = {
				has_trait = craven
				add = 50
			}
			modifier = {
				has_trait = cynical
				add = 25
			}
			ai_value_modifier = {
				ai_boldness = -2
				ai_honor = -2
				ai_compassion = -3
			}
		}
	}
	after = {
        mp_resume_travel_plan = yes
 		if = {
			limit = { exists = var:wound_type }
			remove_variable = wound_type
		}
		if = {
			limit = { exists = var:trait_type }
			remove_variable = trait_type
		}
		#Show what's going to happen, but don't upgrade relation until all bilateral events have been resolved
		show_as_tooltip = {
			if = {
				limit = {
					has_relation_nemesis = scope:province_liege
				}
				add_opinion = {
					modifier = ignored_assault_on_me_opinion
					target = scope:province_liege
					opinion = -30
				}
			}
			else = {
				worsen_relationship_effect = {
					TARGET = scope:province_liege
					REASON = rival_did_not_help_assault
				}
			}
		}
		create_character_memory = {
			type = ignored_assault_memory
			participants = { 
				bystander = scope:province_liege
			}
		}
		if = {
			limit = { exists = scope:new_memory }
			scope:new_memory = {
				set_variable = {
					name = attack_location
					value = scope:holding_location
				}
				if = {
					limit = { exists = var:attack_location }
					#To prevent 'unused except in loc' errors :catto:
				}
			}
		}
		scope:province_liege = {
			#County Holder: You observe the attack on Travelling Ruler
			trigger_event = {
				id = travel_events.2111
				days = 1
			}
		}
	}
}

#County Holder: You observe the attack on Travelling Ruler
travel_events.2111 = { 
	type = character_event
	title = travel_events.2111.t
	desc = {
		first_valid = {
			#They... sacrificed one knight?
			triggered_desc = {
				trigger = {
					exists = var:travelling_ruler_status
					var:travelling_ruler_status = flag:sacrifice
				}
				desc = travel_events.2111.desc_sacrifice
			}
			#Ruler survived?? Unscathed??
			triggered_desc = {
				trigger = {
					exists = var:travelling_ruler_status
					var:travelling_ruler_status = flag:unscathed
				}
				desc = travel_events.2111.desc_unscathed
			}
			#Ruler survived but wounded
			triggered_desc = {
				trigger = {
					exists = var:travelling_ruler_status
					var:travelling_ruler_status = flag:survived
				}
				desc = travel_events.2111.desc_survived
			}
			#Ruler died. Ha.
			triggered_desc = {
				trigger = {
					exists = var:travelling_ruler_status
					var:travelling_ruler_status = flag:died
				}
				desc = travel_events.2111.desc_died
			}
		}
		first_valid = {
			#Rival dead, ha.
			triggered_desc = {
				trigger = {
					exists = var:travelling_ruler_status
					var:travelling_ruler_status = flag:died
					has_relation_rival = scope:travelling_ruler
				}
				desc = travel_events.2111.desc_negative_outro
			}
			#Close relation dead. Hm.
			triggered_desc = {
				trigger = {
					exists = var:travelling_ruler_status
					var:travelling_ruler_status = flag:died
					OR = {
						has_relation_friend = scope:travelling_ruler
						has_relation_soulmate = scope:travelling_ruler
						has_relation_lover = scope:travelling_ruler
						is_close_family_of = scope:travelling_ruler
					}
				}
				desc = travel_events.2111.desc_positive_outro
			}
			#Random traveler dead. Oh well.
			triggered_desc = {
				trigger = {
					exists = var:travelling_ruler_status
					var:travelling_ruler_status = flag:died
				}
				desc = travel_events.2111.desc_outro
			}
		}
	}
	theme = travel
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
					has_relation_friend = scope:travelling_ruler
					has_relation_soulmate = scope:travelling_ruler
					has_relation_lover = scope:travelling_ruler
					is_close_family_of = scope:travelling_ruler
				}
			}
			animation = stress
		}
		triggered_animation = {
			trigger = {
				OR = {
					has_trait = sadistic
					has_trait = callous
					has_trait = vengeful
					has_relation_rival = scope:travelling_ruler
				}
			}
			animation = personality_rational
		}
		animation = personality_content
	}
	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small }
		random_list = {
			1 = {
				dummy_female = {
					save_scope_as = rider
				}
			}
			1 = {
				dummy_male = {
					save_scope_as = rider
				}
			}
		}
	}
	#That's interesting
	option = {
		name = {
			text = {
				first_valid = {
					#What have I done
					triggered_desc = {
						trigger = {
							AND = {
								OR = {
									has_trait = compassionate
									has_trait = forgiving
								}
								OR = {
									has_relation_friend = scope:travelling_ruler
									has_relation_soulmate = scope:travelling_ruler
									has_relation_lover = scope:travelling_ruler
									is_close_family_of = scope:travelling_ruler
								}
							}
							
						}
						desc = travel_events.2111.a_compassionate
					}
					#Entertaining!
					triggered_desc = {
						trigger = {
							AND = {
								OR = {
									has_trait = sadistic
									has_trait = callous
									has_trait = vengeful
								}
								has_relation_rival = scope:travelling_ruler
							}
						}
						desc = travel_events.2111.a_sadist
					}
					#Rando died? Huh.
					triggered_desc = {
						trigger = {
							exists = var:travelling_ruler_status
							var:travelling_ruler_status = flag:died
						}
						desc = travel_events.2111.a_dead
					}
					#Interesting tactic
					triggered_desc = {
						desc = travel_events.2111.a
					}
				}
			}
		}
		trigger = {
			exists = var:travelling_ruler_status
			NOT = { var:travelling_ruler_status = flag:unscathed }
		}
		#One can always learn something from observing a battle
		add_martial_skill = 1
		ai_chance = {
			base = 100
		}
	}
	#Impressive display
	option = {
		name = travel_events.2111.a
		trigger = {
			exists = var:travelling_ruler_status
			var:travelling_ruler_status = flag:unscathed
		}
		#One can always learn something from observing a battle
		add_martial_skill = 1
		ai_chance = {
			base = 100
		}
	}
	after = {
		#Add worsen_relationship_effect
		scope:travelling_ruler = {
			if = {
				limit = { is_alive = yes }
				if = {
					limit = { has_relation_nemesis = root }
					add_opinion = {
						modifier = ignored_assault_on_me_opinion
						target = root
						opinion = -30
					}
				}
				else = {
					worsen_relationship_effect = {
						TARGET = root
						REASON = rival_did_not_help_assault
					}
				}
			}
		}
		if = {
			limit = { exists = var:travelling_ruler_status }
			remove_variable = travelling_ruler_status
		}
	}
}
