﻿#Generic travel events

namespace = travel_events_cities

############################
## Travel Events for Big Cities
## 1000-3999
## by Henrik Lohmander
############################
# travel_events_cities.1010 - Baghdad - Mostly Learning Focus
# travel_events_cities.1020 - Rome - Mostly Diplomacy
# travel_events_cities.1030 - Constantinople - Mostly Stewardship

#####################################################################################

#These events are triggered from the Grand City Point of Interest Type.

#Loc can be reused in parts of these events therefore we will be consistent with scope naming:
#scope:city_province This is the city we are visiting
#scope:city_sight This is where the specific site inside the city is saved, as a flag.
#sightseeing_companion This is a companion relevant for the event, often the criteria depends on the chosen site. Companions are not required but influence options.

#Events save the memory memory_big_city_visited which is also used to block the events from firing again in the same location

#Scripted trigger is checked for all city events
scripted_trigger city_event_check = {
	current_travel_plan.travel_plan_owner = root
	is_playable_character = yes #Landed, house head in an administrative realm, or an adventurer camp owner.
	is_location_valid_for_travel_event_on_land = yes #Should not be needed...
	location.county.holder != root #If I own it then it does not make sense to visit it.
	trigger_if = {
		limit = { 
			has_domicile = yes
			current_travel_plan = { is_travel_with_domicile = no } # Unop: Pdx forgot that if you are traveling with your domicile, its location will be updated each time 
		}
		location != domicile.domicile_location
	} #If I live here then it does not make sense to visit it.
	NOR = {
		location = current_travel_plan.final_destination_province
		location = current_travel_plan.departure_location
	}
	NOT = {
		any_memory = { #Did I come here before?
			memory_type = memory_big_city_visited
			has_variable = city_location
			var:city_location = root.location
		}
	}
	trigger_if = {
		limit = {
			exists = involved_activity
		}
		location != involved_activity.activity_location
	}
}

############################
## Arrival in Baghdad
############################
# Non-exhaustive list.
# These are things a visitor might reflect on in Baghdad but not necessarily the biggest sights.
#1: The Suq al Warraqin - Book District
#2: The Royal Enclosure - Palace District
#3: The Cemetaries - one of multiple Cemetaries of old Baghdad

travel_events_cities.1010 = {
	type = character_event
	title = {
		first_valid = {
			triggered_desc = {
				trigger = { scope:city_sight = flag:book_markets }
				desc = travel_city_baghdad_suq_al_warraqin_title
			}
			triggered_desc = {
				trigger = { scope:city_sight = flag:palaces }
				desc = travel_city_baghdad_royal_enclosure_title
			}
			triggered_desc = {
				trigger = { scope:city_sight = flag:cemeteries }
				desc = travel_city_baghdad_cemeteries_title
			}
		}
	}
	desc = {
		desc = travel_city_baghdad_intro #Entering Baghdad
		first_valid = { #What part of the city do we focus on
			triggered_desc = {
				trigger = { scope:city_sight = flag:book_markets }
				desc = travel_city_baghdad_suq_al_warraqin
			}
			triggered_desc = {
				trigger = { scope:city_sight = flag:palaces }
				desc = travel_city_baghdad_royal_enclosure
			}
			triggered_desc = {
				trigger = { scope:city_sight = flag:cemeteries }
				desc = travel_city_baghdad_cemeteries
			}
		}
		triggered_desc = { #Do I have a relevant companion?
			trigger = {
				exists = scope:sightseeing_companion
			}
			desc = { #What part of the city do we focus on
				first_valid = {
					triggered_desc = {
						trigger = { scope:city_sight = flag:book_markets }
						desc = travel_city_companion_impressed
					}
					triggered_desc = {
						trigger = { scope:city_sight = flag:palaces }
						desc = travel_city_companion_idea
					}
					triggered_desc = {
						trigger = { scope:city_sight = flag:cemeteries }
						desc = travel_city_baghdad_companion_reflection
					}
				}
			}
		}
	}
	theme = travel
	override_background = { reference = ep2_holy_site_mena } #Close enough to Baghdad
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:sightseeing_companion
		triggered_animation = {
			trigger = {
				scope:city_sight = flag:book_markets
			}
			animation = admiration
		}
		triggered_animation = {
			trigger = {
				scope:city_sight = flag:palaces
			}
			animation = scheme
		}
		triggered_animation = {
			trigger = {
				scope:city_sight = flag:cemeteries
			}
			animation = personality_compassionate
		}
	}

	trigger = {
		location = province:4828 #Baghdad
		city_event_check = yes
	}

	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_high }
		play_music_cue = mx_cue_travel_arrival
		location = {
			save_scope_as = city_province
		}
		random_list = {
			33 = { #Book Markets - Suq al-Warraqin
				modifier = { #Chances of ending up noticing a bookmarket are reduced if you aren't interested in books.
					learning < decent_skill_rating
					add = -15
				}
				save_scope_value_as = {
					name = city_sight
					value = flag:book_markets
				}
				current_travel_plan ?= { #Do we have a companion who could help?
					random_entourage_character = {
						limit = {
							this != root
							is_available_travelling_adult = yes
							OR = {
								current_travel_plan.travel_leader ?= this
								learning > high_skill_rating
							}
							learning > decent_skill_rating #At least this much
						}
						save_scope_as = sightseeing_companion
					}
				}
			}
			33 = { #Royal Palace District
				#Block if not anyones capital. The palace district would look very different in that case
				trigger = {
					scope:city_province = scope:city_province.province_owner.capital_province
					highest_held_title_tier <= tier_empire #This version reads oddly if you are an Emperor
				}
				save_scope_value_as = {
					name = city_sight
					value = flag:palaces
				}
				current_travel_plan ?= { #Do we have a companion who could help?
					random_entourage_character = {
						limit = {
							this != root
							is_available_travelling_adult = yes
							OR = {
								current_travel_plan.travel_leader ?= this
								diplomacy > high_skill_rating
							}
							diplomacy > 10 #At least this much
						}
						save_scope_as = sightseeing_companion
					}
				}
			}
			33 = { #Cemeteries
				save_scope_value_as = {
					name = city_sight
					value = flag:cemeteries
				}
				random_list = { #What can I learn from the past
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:construction
						}
					} #City Construction
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:rulership
						}
					} #How to rule
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:fortifications
						}
					} #Fortification Design
				}
				current_travel_plan ?= { #Do we have a companion who could help?
					random_entourage_character = {
						limit = {
							this != root
							is_available_travelling_adult = yes
							OR = {
								culture = {
									has_cultural_pillar = heritage_arabic
								}
								current_travel_plan.travel_leader ?= this
								learning > very_high_skill_rating
							}
							learning > 8 #At least this much
						}
						save_scope_as = sightseeing_companion
					}
				}
			}
		}
	}

	#Bookmarket - Options
	option = { # Bookmarket Option A
		name = travel_city_option_souvenir
		trigger = { scope:city_sight = flag:book_markets }
	
		current_travel_plan = {
			delay_travel_plan = {
				days = 7
			}
		}

		remove_short_term_gold = medium_gold_value

		if = {
			limit = {
				exists = scope:sightseeing_companion #Two people search better than one
				learning >= scope:sightseeing_companion.learning
			}
			custom_tooltip = book_souvenir_companion_tooltip
		}
		else = {
			custom_tooltip = book_souvenir_tooltip
		}

		hidden_effect = { #A book needs an author of local culture and religion.
			if = {
				limit = {
					exists = scope:sightseeing_companion #Two people search better than one
					learning >= scope:sightseeing_companion.learning
				}
				create_character = {
					template = scholar_character
					dynasty = none
					location = root.location
					culture = root.location.culture
					faith = root.location.faith
					save_scope_as = book_seller
				}
			}
			else = {
				create_character = {
					template = scholar_character
					dynasty = none
					location = root.location
					culture = root.location.culture
					faith = root.location.faith
					random_traits_list = {
						count = 1
						education_learning_2 = {}
						education_learning_3 = {}
					}
					learning = {
						min_template_decent_skill
						max_template_decent_skill
					}
					save_scope_as = book_seller
				}
			}
			hidden_effect_new_object = {
				create_artifact_book_effect = {
					OWNER = root
					CREATOR = scope:book_seller
					SET_SUBJECT = flag:learning
					SET_TOPIC = flag:no
				}
				scope:newly_created_artifact = {
					save_scope_as = souvenir
					if = {
						limit = {
							NOT = {
								root = { has_royal_court = yes }
							}
						}
						reforge_artifact = {
							type = miscellaneous
						}
					}
					set_artifact_description = book_artifact_loc
				}
			}
			if = {
				limit = {
					exists = scope:sightseeing_companion
				}
				send_interface_toast = {
					title = souvenir_bought_companion
					left_icon = scope:sightseeing_companion
					right_icon = scope:souvenir
				}
			}
			else = {
				send_interface_toast = {
					title = souvenir_bought
					left_icon = root
					right_icon = scope:souvenir
				}
			}
			hidden_effect = {
				scope:book_seller = {
					silent_disappearance_effect = yes
				}
			}
		}

		stress_impact = {
			arrogant = minor_stress_impact_gain
			greedy = medium_stress_impact_gain
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 0
				OR = {
					has_trait = arrogant
					has_trait = greedy
				}
			}
		}
	}

	option = { # Bookmarket Option B
		name = travel_city_option_learning
		trigger = {
			scope:city_sight = flag:book_markets
		}

		#Duel:
		#Win: Increase learning
		#Better win: Open Minded Perk OR you get Clerical Justification (depending on your personality)

		current_travel_plan = {
			delay_travel_plan = {
				days = 14 # 2 Weeks
			}
		}

		if = {
			limit = {
				exists = scope:sightseeing_companion #Two people search better than one
			}
			custom_tooltip = duel_companion_tooltip
		}

		duel = {
			skill = learning
			value = {
				value = 0
				if = {
					limit = {
						exists = scope:sightseeing_companion  #You engage together in these conversations and share notes afterwards - This companion has at least 12 Learning to have been saved
					}
					add = high_skill_rating
				}
				else = {
					add = very_high_skill_rating
				}
			}
			# Success: Great Success - You get a Perk
			15 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_great_success
				send_interface_toast = {
					title = travel_city_duel_teaching_great_success
					left_icon = root
					if = { #Special case
						limit = {
							NOT = { has_perk = open_minded_perk }
							OR = {
								has_trait = compassionate
								has_trait = just
								has_trait = content
								has_trait = temperate
								has_trait = patient
								has_trait = generous
							}
							NOT = { has_trait = zealous }
						}
						add_perk = open_minded_perk
					}
					else_if = { #General case
						limit = {
							NOR = {
								has_perk = open_minded_perk
								has_perk = clerical_justifications_perk
							}
						}
						add_perk = clerical_justifications_perk
					}
					else_if = { #Fallback
						limit = {
							has_focus_learning = yes
						}
						add_learning_lifestyle_xp = massive_lifestyle_experience
					}
					else = { #Final fallback
						add_learning_skill = 3
					}
				}
			}
			# Success: Success - You get Learning
			35 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_success
				send_interface_toast = {
					title = travel_city_duel_teaching_success
					left_icon = root
					add_learning_skill = 2
				}
			}
			35 = { # Failure: Piety
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_fail
				send_interface_toast = {
					title = travel_city_duel_teaching_fail
					left_icon = root
					add_piety = medium_piety_gain
				}
			}
			15 = { # Failure: You look stupid
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_great_fail
				send_interface_toast = {
					title = travel_city_duel_teaching_great_fail
					left_icon = root
					add_piety = minor_piety_loss
					add_prestige = minor_prestige_loss
				}
			}
		}

		stress_impact = {
			lazy = minor_stress_impact_gain
			shy = medium_stress_impact_gain
			craven = medium_stress_impact_gain
			reclusive = major_stress_impact_gain
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 2
				has_focus_learning = yes
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = lazy
					has_trait = shy
					has_trait = craven
					has_trait = reclusive
				}
			}
		}
	}

	#Royal District - Options
	option = { # Royal District Option A
		name = travel_city_option_study_locals
		trigger = { scope:city_sight = flag:palaces }

		current_travel_plan = {
			delay_travel_plan = {
				days = 14 # 2 Weeks
			}
		}

		if = {
			limit = {
				exists = scope:sightseeing_companion 
			}
			custom_tooltip = duel_companion_tooltip
		}

		duel = {
			skill = diplomacy
			value = {
				value = 0
				if = {
					limit = {
						exists = scope:sightseeing_companion #You engage together in these conversations and share notes afterwards - This companion has at least 15 diplomacy to have been saved
					}
					add = high_skill_rating
				}
				else = {
					add = very_high_skill_rating
				}
				if = {
					limit = {
						scope:city_province = { #Arabic has a special status in Baghdad but we still need to account for if it somehow changed
							culture = {
								has_cultural_pillar = language_arabic
							}
						}
						knows_language_of_culture = scope:city_province.culture
					}
					add = -5
				}
			}
			# Success: Great Success - You get a Perk
			15 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_great_success
				send_interface_toast = {
					title = travel_city_duel_teaching_great_success
					left_icon = root
					if = {
						limit = {
							NOT = { has_perk = inspiring_rule_perk }
						}
						add_perk = inspiring_rule_perk
					}
					else_if = { #Fallback
						limit = {
							has_focus_diplomacy = yes
						}
						add_diplomacy_lifestyle_xp = massive_lifestyle_experience
					}
					else = { #Final fallback
						add_diplomacy_skill = 2
					}
				}
			}
			# Success: Success - You get Diplomacy
			35 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_success
				send_interface_toast = {
					title = travel_city_duel_teaching_success
					left_icon = root
					add_diplomacy_skill = 1
				}
			}
			20 = { # Failure: Modifier
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_fail
				send_interface_toast = {
					title = travel_city_duel_teaching_fail
					left_icon = root
					add_prestige = minor_prestige_gain
				}
			}
			30 = { # Failure: You look stupid
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_great_fail
				send_interface_toast = {
					title = travel_city_duel_teaching_great_fail
					left_icon = root
					add_prestige = medium_prestige_loss
					stress_impact = {
						base = miniscule_stress_impact_gain
					}
				}
			}
		}

		stress_impact = {
			lazy = minor_stress_impact_gain
			shy = medium_stress_impact_gain
			craven = medium_stress_impact_gain
			reclusive = major_stress_impact_gain
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 2
				has_focus_diplomacy = yes
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = lazy
					has_trait = shy
					has_trait = craven
					has_trait = reclusive
				}
			}
		}
	}
	option = { # Royal District Option B
		name = travel_city_option_party_hard
		trigger = {
			scope:city_sight = flag:palaces
		}

		current_travel_plan = {
			delay_travel_plan = {
				days = 14 # 2 Weeks
			}
		}

		remove_short_term_gold = medium_gold_value

		random_list = {
			30 = {
				trigger = {
					has_royal_court = yes
				}
				set_favorite_treat_effect = yes
				send_interface_toast = {
					title = travel_city_new_dessert
					left_icon = root
					add_character_modifier = {
						modifier = travel_brought_home_new_dessert
						years = 15
					}
				}
			}
			30 = {
				trigger = {
					has_royal_court = no
				}
				set_favorite_treat_effect = yes
				send_interface_toast = {
					title = travel_city_new_dessert
					left_icon = root
					add_character_modifier = {
						modifier = travel_brought_home_new_dessert_no_court
						years = 15
					}
				}
			}
			30 = { 
				send_interface_toast = {
					title = travel_city_new_techniques
					left_icon = root
					add_character_modifier = {
						modifier = travel_brought_home_new_techniques
						years = 15
					}
				}
			}
			40 = {
				send_interface_toast = {
					title = travel_city_well_rested
					left_icon = root
					add_character_modifier = {
						modifier = well_rested_modifier
						years = 10
					}
				}
			}
		}

		if = {
			limit = {
				has_trait = lifestyle_reveler
			}
			add_trait_xp = {
				trait = lifestyle_reveler
				value = 5
			}
		}

		hidden_effect = {
			change_current_weight = 25
		}

		#I am on a way to an activity so quite possibly I am trying to relieve stress - also nice out from danger related stress

		stress_impact = { 
			base = major_stress_impact_loss #Finally an opportunity to enjoy life
			gregarious = miniscule_stress_impact_loss
			gluttonous = minor_stress_impact_loss
			greedy = minor_stress_impact_gain
			temperate = medium_stress_impact_gain
		}

		ai_chance = {
			base = 25
			modifier = {
				factor = 0.5
				stress = 0
			}
			modifier = {
				factor = 2
				stress >= higher_than_baseline_stress
			}
			modifier = {
				factor = 1.5
				has_trait = lifestyle_reveler
			}
			#Will always be a net stress loss option, so no blocking traits
		}
	}

	#Cemeteries - Options
	option = { # Cemeteries Option A
		name = travel_city_option_reflection_on_existance
		trigger = { scope:city_sight = flag:cemeteries }

		#Reflect on your own existance - gain perk or long lasting skill modifier in return for a notable stress bump

		current_travel_plan = {
			delay_travel_plan = {
				days = 7 # 1 Week
			}
		}

		custom_tooltip = travel_city_option_reflection_on_existance_tooltip

		random_list = {
			15 = {
				modifier = {
					learning < decent_skill_rating
					NOT = {
						exists = scope:sightseeing_companion #Guaranteed to be better than decent
					}
					add = -10
				}
				if = {
					limit = { exists = scope:sightseeing_companion }
					send_interface_toast = {
						title = travel_city_contemplated_life_and_death_companion
						left_icon = root
						if = {
							limit = { 
								NOT = { has_perk = restraint_perk } 
							}
							add_perk = restraint_perk
							add_learning_skill = 1
						}
						else = { #Fallback
							add_learning_skill = 2
						}
					}
					if = {
						limit = {
							can_set_relation_friend_trigger = { CHARACTER = scope:sightseeing_companion }
						}
						set_relation_friend = { reason = contemplated_life_and_death_together target = scope:sightseeing_companion }
					}
					else_if = {
						limit = {
							can_set_relation_best_friend_trigger = { CHARACTER = scope:sightseeing_companion }
						}
						set_relation_best_friend = { reason = contemplated_life_and_death_together target = scope:sightseeing_companion }
					}
					hidden_effect = {
						scope:sightseeing_companion = {
							add_learning_skill = 1
						}
					}
				}
				else = {
					send_interface_toast = {
						title = travel_city_contemplated_life_and_death
						left_icon = root
						if = {
							limit = { 
								NOT = { has_perk = restraint_perk } 
							}
							add_perk = restraint_perk
							add_learning_skill = 1
						}
						else = { #Fallback
							add_learning_skill = 2
						}
					}
				}
			}
			40 = {
				trigger = {
					NOT = {
						has_character_modifier = contemplated_life
					}
				}
				if = {
					limit = { exists = scope:sightseeing_companion }
					send_interface_toast = {
						title = travel_city_contemplated_life_and_death_companion
						left_icon = root
						add_character_modifier = {
							modifier = contemplated_life
							years = 15
						}
						if = {
							limit = {
								can_set_relation_friend_trigger = { CHARACTER = scope:sightseeing_companion }
							}
							set_relation_friend = { reason = contemplated_life_and_death_together target = scope:sightseeing_companion }
						}
						else_if = {
							limit = {
								can_set_relation_best_friend_trigger = { CHARACTER = scope:sightseeing_companion }
							}
							set_relation_best_friend = { reason = contemplated_life_and_death_together target = scope:sightseeing_companion }
						}
						hidden_effect = {
							scope:sightseeing_companion = {
								add_character_modifier = {
									modifier = contemplated_life
									years = 15
								}
							}
						}
					}
				}
				else = {
					send_interface_toast = {
						title = travel_city_contemplated_life_and_death
						left_icon = root
						add_character_modifier = {
							modifier = contemplated_life
							years = 15
						}
					}
				}
			}

			40 = {
				trigger = {
					NOT = {
						has_character_modifier = contemplated_life
					}
				}
				if = {
					limit = { exists = scope:sightseeing_companion }
					send_interface_toast = {
						title = travel_city_contemplated_life_and_death_companion
						left_icon = root
						add_character_modifier = {
							modifier = travel_city_existential_dread
							years = 15
						}
						if = {
							limit = {
								can_set_relation_friend_trigger = { CHARACTER = scope:sightseeing_companion }
							}
							set_relation_friend = { reason = contemplated_life_and_death_together target = scope:sightseeing_companion }
						}
						else_if = {
							limit = {
								can_set_relation_best_friend_trigger = { CHARACTER = scope:sightseeing_companion }
							}
							set_relation_best_friend = { reason = contemplated_life_and_death_together target = scope:sightseeing_companion }
						}
						hidden_effect = {
							scope:sightseeing_companion = {
								add_character_modifier = {
									modifier = travel_city_existential_dread
									years = 15
								}
							}
						}
					}
				}
				else = {
					send_interface_toast = {
						title = travel_city_contemplated_life_and_death
						left_icon = root
						add_character_modifier = {
							modifier = travel_city_existential_dread
							years = 15
						}
					}
				}
			}
		}
		stress_impact = { #Existential introversion can be scary
			base = medium_stress_impact_gain
			content = minor_stress_impact_loss #Mitigation
			humble = minor_stress_impact_loss #Mitigation
			craven = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			ambitious = minor_stress_impact_gain
		}

		ai_chance = {
			base = 15
			modifier = {
				factor = 0.5
				NOR = {
					has_trait = content
					has_trait = humble
				}
			}
			modifier = {
				factor = 0 
				OR = {
					has_trait = craven
					has_trait = arrogant
					has_trait = ambitious
				}
			}
		}
	}
	option = { # Cemeteries Option B
		name = travel_city_option_learn_local_history
		trigger = {
			scope:city_sight = flag:cemeteries
			exists = scope:sightseeing_companion #Requires a learned guide
		}

		current_travel_plan = {
			delay_travel_plan = {
				days = 14 # 2 Weeks
			}
		}

		#What you can learn is determined in the immediate of the event as it would depend on what aspect of Baghdad history your guide has red up on

		scope:sightseeing_companion = {
			duel = {
				skill = learning
				value = high_skill_rating
				# Success.
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 0.49
					}
					desc = travel_city_duel_teaching_great_success
					if = {
						limit = {
							 scope:city_ancient_insight = flag:construction
						}
						root = {
							send_interface_toast = {
								title = travel_city_duel_teaching_great_success
								left_icon = root
								add_character_modifier = {
									modifier = travel_city_history_city_planning
									years = 15
								}
							}
						}
					}
					else_if = {
						limit = {
							scope:city_ancient_insight = flag:rulership
						}
						root = {
							send_interface_toast = {
								title = travel_city_duel_teaching_great_success
								left_icon = root
								add_character_modifier = {
									modifier = travel_city_history_rulership
									years = 15
								}
							}
						}
					}
					else_if = {
						limit = {
							scope:city_ancient_insight = flag:fortifications
						}
						root = {
							send_interface_toast = {
								title = travel_city_duel_teaching_great_success
								left_icon = root
								add_character_modifier = {
									modifier = travel_city_history_fortifications
									years = 15
								}
							}
						}
					}
				}
				# Failure - I fail to learn
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -0.49
					}
					desc = travel_city_duel_history_fail
					root = {
						send_interface_toast = {
							title = travel_city_duel_history_fail
							left_icon = root
							add_prestige = minor_prestige_loss
							stress_impact = {
								base = miniscule_stress_impact_gain
							}
						}
					}
				}
			}
		}

		stress_impact = {
			arrogant = minor_stress_impact_gain #Unwilling to learn from the past
			lazy = medium_stress_impact_gain #Unwilling to learn period
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 0
				OR = {
					has_trait = arrogant
					has_trait = lazy
				}
			}
		}
	}

	option = { # General Opt Out
		name = travel_city_option_opt_out

		custom_tooltip = travel_city_option_opt_out_tooltip

		#This one just opts out
		#No travel time loss

		stress_impact = { #Minor stress loss for focusing on the project underway
			lifestyle_traveler = minor_stress_impact_loss
		}
		
		ai_chance = {
			base = 25
		}
	}

	after = {
		create_character_memory = {
			type = memory_big_city_visited
		}
		scope:new_memory = {
			save_scope_as = city_memory
		}
		scope:city_memory = {
			set_variable = {
				name = city_location
				value = scope:city_province
			}
		}
	}
}


############################
## Arrival in Rome
############################
# Non-exhaustive list.
# These are things a visitor might reflect on in Rome but not necessarily the most famous sights.
#1: Fortified Monuments
#2: "Caesar's Needle" (really the Obelisk brought to Rome by Cornelius Gallus in 30 BCE)
#3: Pilgrim Hostels and Shrines

travel_events_cities.1020 = {
	type = character_event
	title = {
		first_valid = {
			triggered_desc = {
				trigger = { scope:city_sight = flag:fortified_monuments }
				desc = travel_city_rome_fortified_monuments_title
			}
			triggered_desc = {
				trigger = { scope:city_sight = flag:caesars_needle }
				desc = travel_city_rome_caesars_needle_title
			}
			triggered_desc = {
				trigger = { scope:city_sight = flag:pilgrims_and_shrines }
				desc = travel_city_rome_pilgrims_and_shrines_title
			}
		}
	}
	desc = {
		desc = travel_city_rome_intro #Entering Rome
		first_valid = { #What part of the city do we focus on
			triggered_desc = {
				trigger = { scope:city_sight = flag:fortified_monuments }
				desc = travel_city_rome_fortified_monuments
			}
			triggered_desc = {
				trigger = { scope:city_sight = flag:caesars_needle }
				desc = travel_city_rome_caesars_needle
			}
			triggered_desc = {
				trigger = { scope:city_sight = flag:pilgrims_and_shrines }
				desc = travel_city_rome_pilgrims_and_shrines
			}
		}
		triggered_desc = { #Do I have a relevant companion?
			trigger = {
				exists = scope:sightseeing_companion
			}
			desc = { #What part of the city do we focus on
				first_valid = {
					triggered_desc = {
						trigger = { scope:city_sight = flag:fortified_monuments }
						desc = travel_city_companion_idea
					}
					triggered_desc = {
						trigger = { scope:city_sight = flag:caesars_needle }
						desc = travel_city_rome_companion_reflection
					}
					triggered_desc = {
						trigger = { scope:city_sight = flag:pilgrims_and_shrines }
						desc = travel_city_companion_idea
					}
				}
			}
		}
		triggered_desc = { #Do I have a relevant companion?
			trigger = {
				NOT = { exists = scope:sightseeing_companion }
				scope:city_sight = flag:caesars_needle
			}
			desc = travel_city_rome_alone_reflection
		}
	}
	theme = travel
	override_background = { reference = temple_generic } #Close enough to Roman ruins

	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:sightseeing_companion
		triggered_animation = {
			trigger = {
				scope:city_sight = flag:fortified_monuments
			}
			animation = scheme
		}
		triggered_animation = {
			trigger = {
				scope:city_sight = flag:caesars_needle
			}
			animation = admiration
		}
		triggered_animation = {
			trigger = {
				scope:city_sight = flag:pilgrims_and_shrines
			}
			animation = personality_compassionate
		}
	}

	trigger = {
		location = province:2575 #Rome
		city_event_check = yes
	}

	immediate = {
		wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_high }
		play_music_cue = mx_cue_travel_arrival
		location = {
			save_scope_as = city_province
		}
		random_list = {
			33 = { #Fortified Monuments
				save_scope_value_as = {
					name = city_sight
					value = flag:fortified_monuments
				}
				random_list = { #What can I learn from the past
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:construction
						}
					} #City Construction
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:spolia
						}
					} #How to rule
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:fortifications
						}
					} #
				}
				current_travel_plan ?= { #Do we have a companion who could help?
					random_entourage_character = {
						limit = {
							this != root
							is_available_travelling_adult = yes
							OR = {
								culture = {
									has_cultural_pillar = heritage_latin
								}
								current_travel_plan.travel_leader ?= this
								diplomacy > high_skill_rating
							}
							diplomacy > 10 #At least this much
						}
						save_scope_as = sightseeing_companion
					}
				}
			}
			33 = { #Caesar's Needle
				save_scope_value_as = {
					name = city_sight
					value = flag:caesars_needle
				}
				random_list = { #What can I learn from the past
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:construction
						}
					} #City Construction
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:rulership
						}
					} #How to rule
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:fortifications
						}
					} #
				}
				current_travel_plan ?= { #Do we have a companion who could help?
					random_entourage_character = {
						limit = {
							this != root
							is_available_travelling_adult = yes
							OR = {
								culture = {
									has_cultural_pillar = heritage_latin
								}
								current_travel_plan.travel_leader ?= this
								learning > very_high_skill_rating
							}
							learning > 8 #At least this much
						}
						save_scope_as = sightseeing_companion
					}
				}
			}
			33 = { #Shrines & Pilgrims
				trigger = {
					trigger_if = {
						limit = {
							exists = involved_activity
						}
						involved_activity = { 
							activity_location ?= {
								this != scope:city_province
							}
						}
					}
				}
				save_scope_value_as = {
					name = city_sight
					value = flag:pilgrims_and_shrines
				}
				current_travel_plan ?= { #Do we have a companion who could help?
					random_entourage_character = {
						limit = {
							this != root
							is_available_travelling_adult = yes
							OR = {
								culture = {
									has_cultural_pillar = heritage_latin
								}
								current_travel_plan.travel_leader ?= this
								learning > very_high_skill_rating
							}
							learning > 8 #At least this much
						}
						save_scope_as = sightseeing_companion
					}
				}
			}
		}
	}

	#Fortified Monuments - Options
	option = { # Fortified Monuments Option A
		name = travel_city_option_study_locals
		trigger = { scope:city_sight = flag:fortified_monuments }

		current_travel_plan = {
			delay_travel_plan = {
				days = 14 # 2 Weeks
			}
		}

		if = {
			limit = {
				exists = scope:sightseeing_companion 
			}
			custom_tooltip = duel_companion_tooltip
		}

		duel = {
			skill = diplomacy
			value = {
				value = 0
				if = {
					limit = {
						exists = scope:sightseeing_companion #You engage together in these conversations and share notes afterwards - This companion has at least 15 diplomacy to have been saved
					}
					add = high_skill_rating
				}
				else = {
					add = very_high_skill_rating
				}
				if = {
					limit = {
						scope:city_province = {
							culture = {
								has_cultural_pillar = language_latin
							}
						}
						knows_language_of_culture = scope:city_province.culture
					}
					add = -5
				}
			}
			# Success: Great Success - You get a Perk
			15 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_great_success
				send_interface_toast = {
					title = travel_city_duel_teaching_great_success
					left_icon = root
					if = {
						limit = {
							NOT = { has_perk = flexible_truces_perk }
						}
						add_perk = flexible_truces_perk
					}
					else_if = { #Fallback
						limit = {
							has_focus_diplomacy = yes
						}
						add_diplomacy_lifestyle_xp = massive_lifestyle_experience
					}
					else = { #Final fallback
						add_diplomacy_skill = 2
					}
				}
			}
			# Success: Success - You get Diplomacy
			35 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_success
				send_interface_toast = {
					title = travel_city_duel_teaching_success
					left_icon = root
					add_diplomacy_skill = 1
				}
			}
			20 = { # Failure: Modifier
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_fail
				send_interface_toast = {
					title = travel_city_duel_teaching_fail
					left_icon = root
					add_prestige = minor_prestige_gain
				}
			}
			30 = { # Failure: You look stupid
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_great_fail
				send_interface_toast = {
					title = travel_city_duel_teaching_great_fail
					left_icon = root
					add_prestige = medium_prestige_loss
					stress_impact = {
						base = miniscule_stress_impact_gain
					}
				}
			}
		}

		stress_impact = {
			lazy = minor_stress_impact_gain
			shy = medium_stress_impact_gain
			craven = medium_stress_impact_gain
			reclusive = major_stress_impact_gain
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 2
				has_focus_diplomacy = yes
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = lazy
					has_trait = shy
					has_trait = craven
					has_trait = reclusive
				}
			}
		}
	}
	option = { # Fortified Monuments Option B
		name = travel_city_option_study_fortifications
		trigger = {
			scope:city_sight = flag:fortified_monuments
		}

		current_travel_plan = {
			delay_travel_plan = {
				days = 7 # 1 Week
			}
		}

		duel = {
			skill = martial
			value = high_skill_rating
			# Success.
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 0.49
				}
				min = 5
				desc = travel_city_duel_teaching_great_success
				if = {
					limit = {
						 scope:city_ancient_insight = flag:construction
					}
					send_interface_toast = {
						title = travel_city_duel_teaching_great_success
						left_icon = root
						add_character_modifier = {
							modifier = travel_city_history_city_planning
							years = 15
						}
					}
				}
				else_if = {
					limit = {
						scope:city_ancient_insight = flag:spolia
					}
					send_interface_toast = {
						title = travel_city_duel_teaching_great_success
						left_icon = root
						add_character_modifier = {
							modifier = travel_city_history_spoilage
							years = 15
						}
					}
				}
				else_if = {
					limit = {
						scope:city_ancient_insight = flag:fortifications
					}
					send_interface_toast = {
						title = travel_city_duel_teaching_great_success
						left_icon = root
						add_character_modifier = {
							modifier = travel_city_history_fortifications
							years = 15
						}
					}
				}
			}
			# Failure - I fail to learn
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -0.49
				}
				min = 5
				desc = travel_city_duel_teaching_fail_no_companion
				send_interface_toast = {
					title = travel_city_duel_teaching_fail_no_companion
					left_icon = root
					add_prestige = minor_prestige_loss
					stress_impact = {
						base = miniscule_stress_impact_gain
					}
				}
			}
		}

		stress_impact = {
			arrogant = minor_stress_impact_gain #Unwilling to learn from the past
			lazy = medium_stress_impact_gain #Unwilling to learn period
		}
		#ai_chance = {  #Unop: Disabled this entry as it's seems to be a copy/paste leftovers and another ai_chance is just below
		#	base = 25
		#	modifier = {
		#		factor = 0
		#		OR = {
		#			has_trait = arrogant
		#			has_trait = lazy
		#		}
		#	}
		#}

		ai_chance = {
			base = 25
			modifier = {
				factor = 0.5
				stress = 0
			}
			modifier = {
				factor = 2
				stress >= higher_than_baseline_stress
			}
			modifier = {
				factor = 1.5
				has_trait = lifestyle_reveler
			}
			#Will always be a net stress loss option, so no blocking traits
		}
	}

	#Caesar's Needle - Options
	option = { # Caesar's Needle Option A
		name = travel_city_option_reflection_on_existance
		trigger = { scope:city_sight = flag:caesars_needle }

		#Reflect on your own existance - gain perk or long lasting skill modifier in return for a notable stress bump

		current_travel_plan = {
			delay_travel_plan = {
				days = 7 # 1 Week
			}
		}

		custom_tooltip = travel_city_option_reflection_on_existance_tooltip

		random_list = {
			15 = {
				modifier = {
					learning < decent_skill_rating
					NOT = {
						exists = scope:sightseeing_companion #Guaranteed to be better than decent
					}
					add = -10
				}
				if = {
					limit = { exists = scope:sightseeing_companion }
					send_interface_toast = {
						title = travel_city_contemplated_life_and_death_companion
						left_icon = root
						if = {
							limit = { 
								NOT = { has_perk = writing_history_perk } 
							}
							add_perk = writing_history_perk
							add_diplomacy_skill = 1
						}
						else = { #Fallback
							add_diplomacy_skill = 2
						}
					}
					if = {
						limit = {
							can_set_relation_friend_trigger = { CHARACTER = scope:sightseeing_companion }
						}
						set_relation_friend = { reason = contemplated_life_and_death_together target = scope:sightseeing_companion }
					}
					else_if = {
						limit = {
							can_set_relation_best_friend_trigger = { CHARACTER = scope:sightseeing_companion }
						}
						set_relation_best_friend = { reason = contemplated_life_and_death_together target = scope:sightseeing_companion }
					}
					hidden_effect = {
						scope:sightseeing_companion = {
							add_diplomacy_skill = 1
						}
					}
				}
				else = {
					send_interface_toast = {
						title = travel_city_contemplated_life_and_death
						left_icon = root
						if = {
							limit = { 
								NOT = { has_perk = writing_history_perk } 
							}
							add_perk = writing_history_perk
							add_diplomacy_skill = 1
						}
						else = { #Fallback
							add_diplomacy_skill = 2
						}
					}
				}
			}
			40 = {
				trigger = {
					NOT = {
						has_character_modifier = contemplated_life
					}
				}
				if = {
					limit = { exists = scope:sightseeing_companion }
					send_interface_toast = {
						title = travel_city_contemplated_life_and_death_companion
						left_icon = root
						add_character_modifier = {
							modifier = contemplated_life
							years = 15
						}
						if = {
							limit = {
								can_set_relation_friend_trigger = { CHARACTER = scope:sightseeing_companion }
							}
							set_relation_friend = { reason = contemplated_life_and_death_together target = scope:sightseeing_companion }
						}
						else_if = {
							limit = {
								can_set_relation_best_friend_trigger = { CHARACTER = scope:sightseeing_companion }
							}
							set_relation_best_friend = { reason = contemplated_life_and_death_together target = scope:sightseeing_companion }
						}
						hidden_effect = {
							scope:sightseeing_companion = {
								add_character_modifier = {
									modifier = contemplated_life
									years = 15
								}
							}
						}
					}
				}
				else = {
					send_interface_toast = {
						title = travel_city_contemplated_life_and_death
						left_icon = root
						add_character_modifier = {
							modifier = contemplated_life
							years = 15
						}
					}
				}
			}
			40 = {
				trigger = {
					NOT = {
						has_character_modifier = contemplated_life
					}
				}
				if = {
					limit = { exists = scope:sightseeing_companion }
					send_interface_toast = {
						title = travel_city_contemplated_life_and_death_companion
						left_icon = root
						add_character_modifier = {
							modifier = travel_city_existential_dread
							years = 15
						}
						if = {
							limit = {
								can_set_relation_friend_trigger = { CHARACTER = scope:sightseeing_companion }
							}
							set_relation_friend = { reason = contemplated_life_and_death_together target = scope:sightseeing_companion }
						}
						else_if = {
							limit = {
								can_set_relation_best_friend_trigger = { CHARACTER = scope:sightseeing_companion }
							}
							set_relation_best_friend = { reason = contemplated_life_and_death_together target = scope:sightseeing_companion }
						}
						hidden_effect = {
							scope:sightseeing_companion = {
								add_character_modifier = {
									modifier = travel_city_existential_dread
									years = 15
								}
							}
						}
					}
				}
				else = {
					send_interface_toast = {
						title = travel_city_contemplated_life_and_death
						left_icon = root
						add_character_modifier = {
							modifier = travel_city_existential_dread
							years = 15
						}
					}
				}
			}
		}
		stress_impact = { #Existential introversion can be scary
			base = major_stress_impact_gain
			content = minor_stress_impact_loss #Mitigation
			humble = minor_stress_impact_loss #Mitigation
			craven = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			ambitious = minor_stress_impact_gain
		}

		ai_chance = {
			base = 15
			modifier = {
				factor = 0.5
				NOR = {
					has_trait = content
					has_trait = humble
				}
			}
			modifier = {
				factor = 0 
				OR = {
					has_trait = craven
					has_trait = arrogant
					has_trait = ambitious
				}
			}
		}
	}

	option = { # Caesar's Needle Option B
		name = travel_city_option_learn_local_history
		trigger = {
			scope:city_sight = flag:caesars_needle
			exists = scope:sightseeing_companion #Requires a learned guide
		}

		current_travel_plan = {
			delay_travel_plan = {
				days = 14 # 2 Weeks
			}
		}

		#What you can learn is determined in the immediate of the event as it would depend on what aspect of Roman history your guide has red up on

		scope:sightseeing_companion = {
			duel = {
				skill = learning
				value = high_skill_rating
				# Success.
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 0.49
					}
					min = 10
					desc = travel_city_duel_teaching_great_success
					if = {
						limit = {
							 scope:city_ancient_insight = flag:construction
						}
						root = {
							send_interface_toast = {
								title = travel_city_duel_teaching_great_success
								left_icon = root
								add_character_modifier = {
									modifier = travel_city_history_city_planning
									years = 15
								}
							}
						}
					}
					else_if = {
						limit = {
							scope:city_ancient_insight = flag:rulership
						}
						root = {
							send_interface_toast = {
								title = travel_city_duel_teaching_great_success
								left_icon = root
								add_character_modifier = {
									modifier = travel_city_history_rulership
									years = 15
								}
							}
						}
					}
					else_if = {
						limit = {
							scope:city_ancient_insight = flag:fortifications
						}
						root = {
							send_interface_toast = {
								title = travel_city_duel_teaching_great_success
								left_icon = root
								add_character_modifier = {
									modifier = travel_city_history_fortifications
									years = 15
								}
							}
						}
					}
				}
				# Failure - I fail to learn
				50 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = -0.49
					}
					min = 10
					desc = travel_city_duel_history_fail
					root = {
						send_interface_toast = {
							title = travel_city_duel_history_fail
							left_icon = root
							add_prestige = minor_prestige_loss
							stress_impact = {
								base = miniscule_stress_impact_gain
							}
						}
					}
				}
			}
		}

		stress_impact = {
			arrogant = minor_stress_impact_gain #Unwilling to learn from the past
			lazy = medium_stress_impact_gain #Unwilling to learn period
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 0
				OR = {
					has_trait = arrogant
					has_trait = lazy
				}
			}
		}
	}

	#Pilgrims and Shrines - Options

	option = { # Pilgrims and Shrines Option A
		name = travel_city_option_souvenir
		trigger = { scope:city_sight = flag:pilgrims_and_shrines }
	
		current_travel_plan = {
			delay_travel_plan = {
				days = 7
			}
		}

		remove_short_term_gold = medium_gold_value

		if = {
			limit = {
				exists = scope:sightseeing_companion #Two people search better than one
				learning >= scope:sightseeing_companion.learning
			}
			custom_tooltip = souvenir_companion_tooltip
		}
		else = {
			custom_tooltip = souvenir_tooltip
		}

		hidden_effect = { 
			if = {
				limit = {
					NOT = { religion = religion:christianity_religion }
				}
				if = {
					limit = {
						exists = scope:sightseeing_companion #Two people search better than one
						learning >= scope:sightseeing_companion.learning
					}
					#A book needs an author of local culture and religion.
					create_character = {
						template = scholar_character
						dynasty = none
						location = root.location
						culture = root.location.culture
						faith = root.location.faith
						save_scope_as = book_seller
					}
				}
				else = {
					create_character = {
						template = scholar_character
						dynasty = none
						location = root.location
						culture = root.location.culture
						faith = root.location.faith
						random_traits_list = {
							count = 1
							education_learning_2 = {}
							education_learning_3 = {}
						}
						learning = {
							min_template_decent_skill
							max_template_decent_skill
						}
						save_scope_as = book_seller
					}
				}
				hidden_effect_new_object = {
					create_artifact_book_effect = {
						OWNER = root
						CREATOR = scope:book_seller
						SET_SUBJECT = flag:learning
						SET_TOPIC = flag:no
					}
					scope:newly_created_artifact = {
						save_scope_as = souvenir
						if = {
							limit = {
								NOT = {
									root = { has_royal_court = yes }
								}
							}
							reforge_artifact = {
								type = miscellaneous
							}
						}
						set_artifact_description = book_artifact_loc
					}
				}
				if = {
					limit = {
						exists = scope:sightseeing_companion
					}
					send_interface_toast = {
						title = souvenir_bought_companion
						left_icon = scope:sightseeing_companion
						right_icon = scope:souvenir
					}
				}
				else = {
					send_interface_toast = {
						title = souvenir_bought_companion
						left_icon = root
						right_icon = scope:souvenir
					}
				}
				hidden_effect = {
					scope:book_seller = {
						silent_disappearance_effect = yes
					}
				}
			}
			else = { #If Christian you get a relic
				hidden_effect_new_object = {
					create_artifact_pedestal_christian_relic_effect_hist = { OWNER = this }
					scope:epic = {
						save_scope_as = souvenir
					}
					send_interface_toast = {
						title = souvenir_bought
						left_icon = root
						right_icon = scope:souvenir
					}
				}
			}
		}

		stress_impact = {
			arrogant = minor_stress_impact_gain
			greedy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 0
				OR = {
					has_trait = arrogant
					has_trait = greedy
				}
			}
		}
	}

	option = { # Pilgrims and Shrines Option B - Not Christian
		name = travel_city_option_learning
		trigger = {
			scope:city_sight = flag:pilgrims_and_shrines
			NOT = { religion = religion:christianity_religion }
		}

		current_travel_plan = {
			delay_travel_plan = {
				days = 14 # 2 Weeks
			}
		}

		duel = {
			skill = diplomacy
			value = {
				value = 0
				if = {
					limit = {
						exists = scope:sightseeing_companion
					}
					add = high_skill_rating
				}
				else = {
					add = very_high_skill_rating
				}
			} #We get a boost here if we brought a learned companion.

			# Success: Great Success - You get a Perk
			15 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_great_success
				send_interface_toast = {
					title = travel_city_duel_teaching_great_success
					left_icon = root
					if = {
						limit = {
							NOT = { has_perk = embassies_perk }
						}
						add_perk = embassies_perk
					}
					else_if = { #Fallback
						limit = {
							has_focus_diplomacy = yes
						}
						add_diplomacy_lifestyle_xp = massive_lifestyle_experience
					}
					else = { #Final fallback
						add_diplomacy_skill = 3
					}
				}
			}
			# Success: Success - You get Diplomacy
			35 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_success
				send_interface_toast = {
					title = travel_city_duel_teaching_success
					left_icon = root
					add_diplomacy_skill = 2
				}
			}
			35 = { # Failure: Prestige
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_fail
				send_interface_toast = {
					title = travel_city_duel_teaching_fail
					left_icon = root
					add_piety = medium_prestige_gain
				}
			}
			15 = { # Failure: You look stupid
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_great_fail
				send_interface_toast = {
					title = travel_city_duel_teaching_great_fail
					left_icon = root
					add_prestige = minor_prestige_loss
				}
			}
		}

		stress_impact = {
			lazy = minor_stress_impact_gain
			shy = medium_stress_impact_gain
			craven = medium_stress_impact_gain
			reclusive = major_stress_impact_gain
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 2
				has_focus_diplomacy = yes
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = lazy
					has_trait = shy
					has_trait = craven
					has_trait = reclusive
				}
			}
		}
	}

	option = { # Pilgrims and Shrines Option B
		name = travel_city_option_learning
		trigger = {
			scope:city_sight = flag:pilgrims_and_shrines
			religion = religion:christianity_religion
		}
		name = travel_city_contemplated_religion_tooltip

		current_travel_plan = {
			delay_travel_plan = {
				days = 14 # 2 Weeks
			}
		}

		if = { #If I am a pilgrim on my way through Rome I am actually helped by this.
			limit = {
				has_pious_pilgrimage_type_trigger = yes
			}
			pious_type_option_effect = yes
		}
		add_piety = medium_piety_gain

		random_list = {
			10 = { #I contemplate my life & Death
				send_interface_toast = {
					title = travel_city_contemplated_life_and_death
					left_icon = root
					add_character_modifier = {
						modifier = contemplated_life
						years = 15
					}
				}
			}
			40 = { #I associate with the Mystic side of my faith
				send_interface_toast = {
					title = travel_city_religious_mystic
					left_icon = root
					if = {
						limit = {
							NOT = { has_trait = lifestyle_mystic }
						}
						add_trait = lifestyle_mystic
					}
					add_trait_xp = {
						trait = lifestyle_mystic
						value = {
							integer_range = {
								min = medium_lifestyle_random_xp_low
								max = medium_lifestyle_random_xp_high
							}
						}
					}
				}
			}
			50 = { #I find this whole experience reinvigorating
				send_interface_toast = {
					title = travel_city_well_rested
					left_icon = root
					add_character_modifier = {
						modifier = well_rested_modifier
						years = 10
					}
				}
			}
		}

		#I am on a way to an activity so quite possibly I am trying to relieve stress - also nice out from danger related stress

		stress_impact = { 
			base = major_stress_impact_loss
			gregarious = miniscule_stress_impact_loss
			temperate = medium_stress_impact_gain
		}

		ai_chance = {
			base = 25
			modifier = {
				factor = 0.5
				stress = 0
			}
			modifier = {
				factor = 2
				stress >= higher_than_baseline_stress
			}
			modifier = {
				factor = 1.5
				has_trait = lifestyle_reveler
			}
			#Will always be a net stress loss option, so no blocking traits
		}
	}

	option = { # General Opt Out
		name = travel_city_option_opt_out

		custom_tooltip = travel_city_option_opt_out_tooltip

		#This one just opts out
		#No travel time loss

		stress_impact = { #Minor stress loss for focusing on the project underway
			lifestyle_traveler = minor_stress_impact_loss
		}
		
		ai_chance = {
			base = 25
		}
	}

	after = {
		create_character_memory = {
			type = memory_big_city_visited
		}
		scope:new_memory = {
			save_scope_as = city_memory
		}
		scope:city_memory = {
			set_variable = {
				name = city_location
				value = scope:city_province
			}
		}
	}
}


############################
## Arrival in Constantinople
############################
# Non-exhaustive list.
# These are things a visitor might reflect on in Constantinople but not necessarily the most famous sights.
#1: Augustaion
#2: Aqueduct of Valens
#3: Goldsmiths and Moneychangers

travel_events_cities.1030 = {
	type = character_event
	title = {
		first_valid = {
			triggered_desc = {
				trigger = { scope:city_sight = flag:augustaion }
				desc = travel_city_constantinople_augustaion_title
			}
			triggered_desc = {
				trigger = { scope:city_sight = flag:aqueduct_valens }
				desc = travel_city_constantinople_aqueducts_title
			}
			triggered_desc = {
				trigger = { scope:city_sight = flag:goldsmiths_moneychangers }
				desc = travel_city_constantinople_goldsmiths_moneychangers_title
			}
		}
	}
	desc = {
		first_valid = { #Entering Constantinople - Loc depends on if you come overland, over sea, or through Calchedon.
			triggered_desc = {
				trigger = {
					scope:last_visited_location = province:5565 #Chalcedon
				}
				desc = travel_city_constantinople_intro_chalcedon
			}
			triggered_desc = {
				trigger = {
					scope:last_visited_location = {
						is_sea_province = yes
					}
				}
				desc = travel_city_constantinople_intro_sea
			}
			triggered_desc = {
				trigger = {
					OR = {
						NOT = { exists = scope:last_visited_location }
						scope:last_visited_location ?= {
							is_sea_province = no
						}
					}
				}
				desc = travel_city_constantinople_intro
			}
		}
		first_valid = { #What part of the city do we focus on
			triggered_desc = {
				trigger = { scope:city_sight = flag:augustaion }
				desc = travel_city_constantinople_augustaion
			}
			triggered_desc = {
				trigger = { scope:city_sight = flag:aqueduct_valens }
				desc = travel_city_constantinople_aqueduct_valens
			}
			triggered_desc = {
				trigger = { scope:city_sight = flag:goldsmiths_moneychangers }
				desc = travel_city_constantinople_goldsmiths_moneychangers
			}
		}
		triggered_desc = { #Do I have a relevant companion?
			trigger = {
				exists = scope:sightseeing_companion
			}
			desc = { #What part of the city do we focus on
				first_valid = {
					triggered_desc = {
						trigger = { scope:city_sight = flag:augustaion }
						desc = travel_city_companion_center_of_the_world_reflection
					}
					triggered_desc = {
						trigger = { scope:city_sight = flag:aqueduct_valens }
						desc = travel_city_rome_companion_reflection
					}
					triggered_desc = {
						trigger = { scope:city_sight = flag:goldsmiths_moneychangers }
						desc = travel_city_companion_idea
					}
				}
			}
		}
		triggered_desc = { #Do I have a relevant companion?
			trigger = {
				NOT = { exists = scope:sightseeing_companion }
				scope:city_sight = flag:augustaion
			}
			desc = travel_city_center_of_the_world_reflection
		}
	}
	theme = travel

	override_background = {
		trigger = {
			scope:city_sight = flag:goldsmiths_moneychangers
		}
		reference = ep3_medi_market
	} #Market

	override_background = {
		reference = ep3_constantinople
	} #Constantinople city scape



	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:sightseeing_companion
		triggered_animation = {
			trigger = {
				scope:city_sight = flag:augustaion
			}
			animation = admiration
		}
		triggered_animation = {
			trigger = {
				scope:city_sight = flag:aqueduct_valens
			}
			animation = admiration
		}
		triggered_animation = {
			trigger = {
				scope:city_sight = flag:goldsmiths_moneychangers
			}
			animation = personality_compassionate
		}
	}

	trigger = {
		location = province:496 #Constantinople
		city_event_check = yes
		NOT = {
			has_title = title:e_byzantium #This just does not work for a byzantine emperor, even if they moved their capital out of the city
		}
	}

	immediate = {
		play_music_cue = mx_cue_travel_arrival
		location = {
			save_scope_as = city_province
		}
		current_travel_plan = {
			ordered_visited_location = {
				limit = { this != root.location } #We want the second last
				position = end
				save_scope_as = last_visited_location
			}
			if = { #You can start in the province next to your goal
				limit = {
					NOT = { exists = scope:last_visited_location }
				}
				departure_location = {
					save_scope_as = last_visited_location
				}
			}
		}
		random_list = {
			33 = { #Augustaion
				save_scope_value_as = {
					name = city_sight
					value = flag:augustaion
				}
				current_travel_plan ?= { #Do we have a learned companion who could help?
					random_entourage_character = {
						limit = {
							this != root
							is_available_travelling_adult = yes
							OR = {
								AND = {
									root = {
										NOT = {
											culture = {
												has_cultural_pillar = heritage_byzantine
											}
										}
									}
									culture = {
										has_cultural_pillar = heritage_byzantine
									}
								}
								current_travel_plan.travel_leader ?= this
								learning > high_skill_rating
							}
							learning > 10 #At least this much
						}
						save_scope_as = sightseeing_companion
					}
				}
				random_list = { #What can I learn from the past
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:construction
						}
					} #City Construction
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:rulership
						}
					} #How to rule
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:fortifications
						}
					} #
				}
			}
			33 = { #Aqueducts & Cisterns
				save_scope_value_as = {
					name = city_sight
					value = flag:aqueduct_valens
				}
				random_list = { #What can I learn from the past
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:construction
						}
					} #City Construction
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:cisterns
						}
					} #How to rule
					33 = {
						save_scope_value_as = {
							name = city_ancient_insight
							value = flag:underground_tunels
						}
					} #
				}
				current_travel_plan ?= { #Do we have a companion who could help?
					random_entourage_character = {
						limit = {
							this != root
							is_available_travelling_adult = yes
							OR = {
								culture = {
									has_cultural_pillar = heritage_byzantine
								}
								current_travel_plan.travel_leader ?= this
								stewardship > very_high_skill_rating
							}
							stewardship > 8 #At least this much
						}
						save_scope_as = sightseeing_companion
					}
				}
			}
			33 = { #Goldsmiths and Moneychangers
				save_scope_value_as = {
					name = city_sight
					value = flag:goldsmiths_moneychangers
				}
				current_travel_plan ?= { #Do we have a companion who could help?
					random_entourage_character = {
						limit = {
							this != root
							is_available_travelling_adult = yes
							OR = {
								culture = {
									has_cultural_pillar = heritage_byzantine
								}
								current_travel_plan.travel_leader ?= this
								stewardship > very_high_skill_rating
							}
							stewardship > 8 #At least this much
						}
						save_scope_as = sightseeing_companion
					}
				}
			}
		}
	}

	#Aqueducts & Cisterns - Options
	option = { # Aqueducts & Cisterns Option A
		name = travel_city_option_learn_local_history
		trigger = {
			scope:city_sight = flag:aqueduct_valens
			exists = scope:sightseeing_companion #Requires a learned guide
		}

		current_travel_plan = {
			delay_travel_plan = {
				days = 14 # 2 Weeks
			}
		}

		if = {
			limit = {
				exists = scope:sightseeing_companion 
			}
			custom_tooltip = duel_companion_tooltip
		}

		duel = {
			skill = stewardship
			value = {
				value = 0
				if = {
					limit = {
						exists = scope:sightseeing_companion #You engage together in these conversations and share notes afterwards - This companion has at least 15 diplomacy to have been saved
					}
					add = high_skill_rating
				}
				else = {
					add = very_high_skill_rating
				}
				if = {
					limit = {
						scope:city_province = {
							culture = {
								has_cultural_pillar = language_greek
							}
						}
						knows_language_of_culture = scope:city_province.culture
					}
					add = -5
				}
			}
			# Success: Great Success - You get a Perk
			15 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_great_success
				send_interface_toast = {
					title = travel_city_duel_teaching_great_success
					left_icon = root
					if = {
						limit = {
							NOT = { has_perk = centralization_perk }
						}
						add_perk = centralization_perk
					}
					else_if = { #Fallback
						limit = {
							has_focus_stewardship = yes
						}
						add_stewardship_lifestyle_xp = massive_lifestyle_experience
					}
					else = { #Final fallback
						add_stewardship_skill = 2
					}
				}
			}
			# Success: Success - You get Stewardship
			35 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_success
				send_interface_toast = {
					title = travel_city_duel_teaching_success
					left_icon = root
					add_stewardship_skill = 1
				}
			}
			20 = { # Failure: Modifier
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_history_fail
				send_interface_toast = {
					title = travel_city_duel_history_fail
					left_icon = root
					add_character_modifier = {
						modifier = travel_city_roman_rulership
						years = 15
					}
				}
			}
			30 = { # Failure: You look stupid
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_fail_no_companion
				send_interface_toast = {
					title = travel_city_duel_teaching_fail_no_companion
					left_icon = root
					add_prestige = medium_prestige_loss
					stress_impact = {
						base = miniscule_stress_impact_gain
					}
				}
			}
		}


		stress_impact = {
			arrogant = minor_stress_impact_gain #Unwilling to learn from the past
			lazy = medium_stress_impact_gain #Unwilling to learn period
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 0
				OR = {
					has_trait = arrogant
					has_trait = lazy
				}
			}
		}
	}

	option = { # Aqueducts & Cisterns Option B
		name = travel_city_option_study_aqueducts
		trigger = {
			scope:city_sight = flag:aqueduct_valens
		}

		current_travel_plan = {
			delay_travel_plan = {
				days = 7 # 1 Week
			}
		}

		if = {
			limit = {
				 scope:city_ancient_insight = flag:construction
			}
			send_interface_toast = {
				title = travel_city_duel_teaching_great_success
				left_icon = root
				add_character_modifier = {
					modifier = travel_city_history_city_planning
					years = 15
				}
			}
		}
		else_if = {
			limit = {
				scope:city_ancient_insight = flag:underground_tunels
			}
			send_interface_toast = {
				title = travel_city_duel_teaching_great_success
				left_icon = root
				add_character_modifier = {
					modifier = travel_city_history_irrigation
					years = 15
				}
			}
		}
		else_if = {
			limit = {
				scope:city_ancient_insight = flag:cisterns
			}
			send_interface_toast = {
				title = travel_city_duel_teaching_great_success
				left_icon = root
				add_character_modifier = {
					modifier = travel_city_history_underground_tunnels
					years = 15
				}
			}
		}

		stress_impact = {
			arrogant = minor_stress_impact_gain #Unwilling to learn from the past
			lazy = medium_stress_impact_gain #Unwilling to learn period
		}

		ai_chance = {
			base = 25
			modifier = {
				factor = 0.5
				stress = 0
			}
			modifier = {
				factor = 2
				stress >= higher_than_baseline_stress
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = arrogant
					has_trait = lazy
				}
			}
			#Will always be a net stress loss option, so no blocking traits
		}
	}

	#Augustaion - Options
	option = { # Augustaion Option A
		name = travel_city_option_souvenir
		trigger = { scope:city_sight = flag:augustaion }

		current_travel_plan = {
			delay_travel_plan = {
				days = 7
			}
		}

		remove_short_term_gold = major_gold_value

		if = {
			limit = {
				exists = scope:sightseeing_companion #Two people search better than one
				stewardship >= scope:sightseeing_companion.stewardship
			}
			custom_tooltip = souvenir_companion_tooltip
		}
		else = {
			custom_tooltip = souvenir_tooltip
		}

		hidden_effect = { #An artifacts needs a maker of local culture and religion.
			save_scope_value_as = {
				name = quality
				value = {
					value = 30
					if = {
						limit = {
							exists = scope:sightseeing_companion
						}
						add = 20
					}
				}
			}
			save_scope_value_as = {
				name = wealth
				value = {
					value = 30
					add = root.stewardship
					if = {
						limit = {
							exists = scope:sightseeing_companion
						}
						add = scope:sightseeing_companion.stewardship
					}
				}
			}
			if = { #Skill mostly relevant for books
				limit = {
					exists = scope:sightseeing_companion #Two people search better than one
					stewardship >= scope:sightseeing_companion.stewardship
				}
				create_character = {
					template = scholar_character
					dynasty = none
					location = root.location
					culture = root.location.culture
					faith = root.location.faith
					save_scope_as = book_seller
				}
			}
			else = {
				create_character = {
					template = scholar_character
					dynasty = none
					location = root.location
					culture = root.location.culture
					faith = root.location.faith
					random_traits_list = {
						count = 1
						education_learning_2 = {}
						education_learning_3 = {}
					}
					learning = {
						min_template_decent_skill
						max_template_decent_skill
					}
					save_scope_as = book_seller
				}
			}
			random_list = {
				33 = {
					hidden_effect_new_object = {
						create_artifact_book_effect = {
							OWNER = root
							CREATOR = scope:book_seller
							SET_SUBJECT = flag:learning
							SET_TOPIC = flag:no
						}
						scope:newly_created_artifact = {
							save_scope_as = souvenir
							if = {
								limit = {
									NOT = {
										root = { has_royal_court = yes }
									}
								}
								reforge_artifact = {
									type = miscellaneous
								}
							}
							set_artifact_description = book_artifact_loc
						}
					}
				}
				33 = {
					hidden_effect_new_object = {
						create_artifact_regalia_effect = {
							OWNER = root
							SMITH = scope:book_seller
						}
						scope:newly_created_artifact = {
							save_scope_as = souvenir
							set_artifact_description = regalia_artifact_loc
						}
					}
				}
				33 = {
					hidden_effect_new_object = {
						create_artifact_crown_effect = {
							OWNER = root
							SMITH = scope:book_seller
						}
						scope:newly_created_artifact = {
							save_scope_as = souvenir
							set_artifact_description = crown_artifact_loc
						}
					}
				}
			}
			if = {
				limit = {
					exists = scope:sightseeing_companion
				}
				send_interface_toast = {
					title = souvenir_bought_companion
					left_icon = scope:sightseeing_companion
					right_icon = scope:souvenir
				}
			}
			else = {
				send_interface_toast = {
					title = souvenir_bought
					left_icon = root
					right_icon = scope:souvenir
				}
			}
			hidden_effect_new_object = {
				scope:book_seller = {
					silent_disappearance_effect = yes
				}
			}
		}

		stress_impact = {
			arrogant = minor_stress_impact_gain
			greedy = medium_stress_impact_gain
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 0
				OR = {
					has_trait = arrogant
					has_trait = greedy
				}
			}
		}
	}

	option = { # Augustaion Option B
		name = travel_city_option_study_locals
		trigger = {
			scope:city_sight = flag:augustaion
		}

		current_travel_plan = {
			delay_travel_plan = {
				days = 14 # 2 Weeks
			}
		}

		if = {
			limit = {
				exists = scope:sightseeing_companion 
			}
			custom_tooltip = duel_companion_tooltip
		}

		duel = {
			skill = diplomacy
			value = {
				value = 0
				if = {
					limit = {
						exists = scope:sightseeing_companion #You engage together in these conversations and share notes afterwards - This companion has at least 15 diplomacy to have been saved
					}
					add = high_skill_rating
				}
				else = {
					add = very_high_skill_rating
				}
				if = {
					limit = {
						scope:city_province = {
							culture = {
								has_cultural_pillar = language_greek
							}
						}
						knows_language_of_culture = scope:city_province.culture
					}
					add = -5
				}
			}
			# Success: Great Success - You get a Perk
			15 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_great_success
				send_interface_toast = {
					title = travel_city_duel_teaching_great_success
					left_icon = root
					if = {
						limit = {
							NOT = { has_perk = dignitas_perk }
						}
						add_perk = dignitas_perk
					}
					else_if = { #Fallback
						limit = {
							has_focus_diplomacy = yes
						}
						add_diplomacy_lifestyle_xp = massive_lifestyle_experience
					}
					else = { #Final fallback
						add_diplomacy_skill = 2
					}
				}
			}
			# Success: Success - You get Diplomacy
			35 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_success
				send_interface_toast = {
					title = travel_city_duel_teaching_success
					left_icon = root
					add_diplomacy_skill = 1
				}
			}
			20 = { # Failure: Modifier
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_fail
				send_interface_toast = {
					title = travel_city_duel_teaching_fail
					left_icon = root
					add_prestige = minor_prestige_gain
				}
			}
			30 = { # Failure: You look stupid
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_great_fail
				send_interface_toast = {
					title = travel_city_duel_teaching_great_fail
					left_icon = root
					add_prestige = medium_prestige_loss
					stress_impact = {
						base = miniscule_stress_impact_gain
					}
				}
			}
		}


		stress_impact = {
			arrogant = minor_stress_impact_gain #Unwilling to learn from the past
			lazy = medium_stress_impact_gain #Unwilling to learn period
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 0
				OR = {
					has_trait = arrogant
					has_trait = lazy
				}
			}
		}
	}

	#Goldsmiths & Moneychangers - Options
	option = { # Goldsmiths & Moneychangers Option A
		name = travel_city_option_study_locals
		trigger = { scope:city_sight = flag:goldsmiths_moneychangers }

		current_travel_plan = {
			delay_travel_plan = {
				days = 14 # 2 Weeks
			}
		}

		if = {
			limit = {
				exists = scope:sightseeing_companion 
			}
			custom_tooltip = duel_companion_tooltip
		}

		duel = {
			skill = stewardship
			value = {
				value = 0
				if = {
					limit = {
						exists = scope:sightseeing_companion #You engage together in these conversations and share notes afterwards - This companion has at least 15 Stewardship to have been saved
					}
					add = high_skill_rating
				}
				else = {
					add = very_high_skill_rating
				}
				if = {
					limit = {
						knows_language_of_culture = scope:city_province.culture
					}
					add = -5
				}
			}
			# Success: Great Success - You get a Perk
			15 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_great_success
				send_interface_toast = {
					title = travel_city_duel_teaching_great_success
					left_icon = root
					if = {
						limit = {
							NOT = { has_perk = detailed_ledgers_perk }
						}
						add_perk = detailed_ledgers_perk
					}
					else_if = { #Fallback
						limit = {
							has_focus_stewardship = yes
						}
						add_stewardship_lifestyle_xp = massive_lifestyle_experience
					}
					else = { #Final fallback
						add_stewardship_skill = 2
					}
				}
			}
			# Success: Success - You get Diplomacy
			35 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_success
				send_interface_toast = {
					title = travel_city_duel_teaching_success
					left_icon = root
					add_stewardship_skill = 1
				}
			}
			20 = { # Failure: Modifier
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_fail
				send_interface_toast = {
					title = travel_city_duel_teaching_fail
					left_icon = root
					add_prestige = minor_prestige_gain
				}
			}
			30 = { # Failure: You look stupid
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 5
				desc = travel_city_duel_teaching_great_fail
				send_interface_toast = {
					title = travel_city_duel_teaching_great_fail
					left_icon = root
					add_prestige = medium_prestige_loss
					stress_impact = {
						base = miniscule_stress_impact_gain
					}
				}
			}
		}

		stress_impact = {
			lazy = minor_stress_impact_gain
			shy = medium_stress_impact_gain
			craven = medium_stress_impact_gain
			reclusive = major_stress_impact_gain
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 2
				has_focus_diplomacy = yes
			}
			modifier = {
				factor = 0
				OR = {
					has_trait = lazy
					has_trait = shy
					has_trait = craven
					has_trait = reclusive
				}
			}
		}
	}
	option = { # Goldsmiths & Moneychangers Option B
		name = travel_city_option_earn_money
		trigger = {
			scope:city_sight = flag:goldsmiths_moneychangers
		}

		current_travel_plan = {
			delay_travel_plan = {
				days = 14 # 2 Weeks
			}
		}

		random_list = {
			25 = {
				send_interface_toast = {
					title = travel_city_major_windfall
					left_icon = root
					add_stewardship_lifestyle_xp = medium_lifestyle_experience
				}
			}
			35 = { 
				send_interface_toast = {
					title = travel_city_option_earn_money
					left_icon = root
					add_short_term_gold = major_gold_value
				}
			}
			40 = {
				send_interface_toast = {
					title = travel_city_resupplied
					left_icon = root
					add_character_modifier = {
						modifier = travel_city_well_supplied
						years = 10
					}
				}
			}
		}

		stress_impact = {
			lazy = minor_stress_impact_gain
			shy = medium_stress_impact_gain
			craven = medium_stress_impact_gain
			reclusive = major_stress_impact_gain
			diligent = medium_stress_impact_loss
		}

		ai_chance = {
			base = 25
			modifier = {
				factor = 0.5
				stress = 0
			}
			modifier = {
				factor = 2
				stress >= higher_than_baseline_stress
			}
			modifier = {
				factor = 1.5
				has_trait = lifestyle_reveler
			}
			#Will always be a net stress loss option, so no blocking traits
		}
	}

	option = { # General Opt Out
		name = travel_city_option_opt_out

		custom_tooltip = travel_city_option_opt_out_tooltip

		#This one just opts out
		#No travel time loss

		stress_impact = { #Minor stress loss for focusing on the project underway
			lifestyle_traveler = minor_stress_impact_loss
		}
		
		ai_chance = {
			base = 25
		}
	}

	after = {
		create_character_memory = {
			type = memory_big_city_visited
		}
		scope:new_memory = {
			save_scope_as = city_memory
			set_variable = {
				name = city_location
				value = scope:city_province
			}
		}
	}
}
