﻿adventurers_scout_for_talent_option = {
	is_shown = {
   		is_landless_adventurer = yes
		NOT = { has_perk = toe_the_line_perk }
	}

	is_valid = {
		NOT = { has_perk = toe_the_line_perk }
		is_landless_adventurer = yes
	}
	
	travel_modifier = {
		travel_speed = -5
	}
	
	on_applied_effect = {
		custom_tooltip = adventurers_scout_for_talent_option.tt
	}
	
	ai_will_do = {
		value = 100
	}
}

adventurers_make_local_deals_option = {
	is_shown = {
   		is_landless_adventurer = yes
	}

	is_valid = {
		has_perk = fearful_troops_perk
		is_landless_adventurer = yes
	}
	
	travel_modifier = {
		travel_safety = -20
	}
	
	on_applied_effect = {
		custom_tooltip = adventurers_make_local_deals_option.tt
	}
	
	ai_will_do = {
		value = 100
	}
}

adventurers_search_for_secrets_option = {
	is_shown = {
   		is_landless_adventurer = yes
	}

	is_valid = {
		has_perk = digging_for_dirt_perk
		is_landless_adventurer = yes
	}
	
	travel_modifier = {
		travel_safety = -10
		travel_speed = 10
	}
	
	on_applied_effect = {
		custom_tooltip = adventurers_search_for_secrets_option.tt
	}
	
	ai_will_do = {
		value = 100
	}
}

adventurers_encourage_relationships_option = {
	is_shown = {
   		is_landless_adventurer = yes
	}

	is_valid = {
		has_perk = chains_of_loyalty_perk
		any_courtier = {
			is_adult = yes
			count >= 3
		}
		is_landless_adventurer = yes
	}
	
	travel_modifier = {
		travel_speed = 5
		travel_safety = -5
	}
	
	on_applied_effect = {
		custom_tooltip = adventurers_encourage_relationships_option.tt
	}
	
	ai_will_do = {
		value = 100
	}
}

adventurers_gather_inspiration_option = {
	is_shown = {
   		is_landless_adventurer = yes
	}

	is_valid = {
		has_perk = popular_figurehead_perk
		is_landless_adventurer = yes
	}
	
	travel_modifier = {
		travel_speed = 5
		travel_safety = -5
	}
	
	on_applied_effect = {
		custom_tooltip = adventurers_gather_inspiration_option.tt
	}
	
	ai_will_do = {
		value = 100
	}
}

adventurers_proselytize_zealously_option = {
	is_shown = {
   		is_landless_adventurer = yes
	}

	is_valid = {
		has_perk = zealous_proselytizer_perk
		is_landless_adventurer = yes
	}
	
	travel_modifier = {
		travel_speed = 5
		travel_safety = -5
	}
	
	on_applied_effect = {
		custom_tooltip = adventurers_proselytize_zealously_option.tt
	}
	
	ai_will_do = {
		value = 100
	}
}

adventurers_forward_scouts_option = {
	is_shown = {
   		is_landless_adventurer = yes
	}

	is_valid = {
		custom_tooltip = {
			text = adventurers_forward_scouts_option.tt.has_right_parameter
			domicile ?= { has_domicile_parameter = camp_unlocks_forward_scouts }
		}
	}
	
	travel_modifier = {
		travel_safety = 20
		travel_speed = -5
	}
	
	on_applied_effect = {
	}
	
	ai_will_do = {
		value = 100
	}
}

purchase_rough_terrain_gear_option = {
	is_shown = {
		is_ruler = yes
		is_landless_adventurer = yes
	}

	is_valid = {
		is_landless_adventurer = yes
	}
	
	cost = {
		gold = {
			add = {
				value = low_travel_option_cost
				desc = purchase_mountaineer_gear_option
			}
		}
	}

	owner_modifier = {
		mountains_travel_danger = mountains_low_danger_reduction
		majorroad_mountains_travel_danger = majorroad_mountains_low_danger_reduction
		minorroad_mountains_travel_danger = minorroad_mountains_low_danger_reduction
		hills_travel_danger = hills_low_danger_reduction
		majorroad_hills_travel_danger = majorroad_hills_low_danger_reduction
		minorroad_hills_travel_danger = minorroad_hills_low_danger_reduction
		wetlands_travel_danger = wetlands_low_danger_reduction
		majorroad_wetlands_travel_danger = majorroad_wetlands_low_danger_reduction
		minorroad_wetlands_travel_danger = minorroad_wetlands_low_danger_reduction
		floodplains_travel_danger = floodplains_low_danger_reduction
		majorroad_floodplains_travel_danger = majorroad_floodplains_low_danger_reduction
		minorroad_floodplains_travel_danger = minorroad_floodplains_low_danger_reduction
	}
	
	on_applied_effect = {
	}
	
	ai_will_do = {
		value = 0
		if = {
			limit = {
				any_future_path_location = {
					count >= 3
					OR = {
						agot_is_mountains_terrain = yes
						agot_is_desert_mountains_terrain = yes
						agot_is_hills_terrain = yes
						agot_is_wetlands_terrain = yes
						agot_is_floodplains_terrain = yes
					}
				}
			}
			add = {
				value = 100
			}
		}
	}
}

purchase_desert_gear_option = {
	is_shown = {
		is_ruler = yes
		is_landless_adventurer = yes
	}

	is_valid = {
		is_landless_adventurer = yes
	}
	
	cost = {
		gold = {
			add = {
				value = low_travel_option_cost
				desc = purchase_desert_gear_option
			}
		}
	}

	owner_modifier = {
		desert_travel_danger = desert_low_danger_reduction
		majorroad_desert_travel_danger = majorroad_desert_low_danger_reduction
		minorroad_desert_travel_danger = minorroad_desert_low_danger_reduction
		steppe_travel_danger = steppe_low_danger_reduction
		majorroad_steppe_travel_danger = majorroad_steppe_low_danger_reduction
		minorroad_steppe_travel_danger = minorroad_steppe_low_danger_reduction
		drylands_travel_danger = drylands_low_danger_reduction
		majorroad_drylands_travel_danger = majorroad_drylands_low_danger_reduction
		minorroad_drylands_travel_danger = minorroad_drylands_low_danger_reduction
		desert_mountains_travel_danger = desert_mountains_low_danger_reduction
		majorroad_desert_mountains_travel_danger = majorroad_desert_mountains_low_danger_reduction
		minorroad_desert_mountains_travel_danger = minorroad_desert_mountains_low_danger_reduction
	}
	
	on_applied_effect = {
	}
	
	ai_will_do = {
		value = 0
		if = {
			limit = {
				any_future_path_location = {
					count >= 3
					OR = {
						agot_is_desert_terrain = yes
						agot_is_steppe_terrain = yes
						agot_is_drylands_terrain = yes
						agot_is_desert_mountains_terrain = yes
					}
				}
			}
			add = {
				value = 100
			}
		}
	}
}

purchase_forest_gear_option = {
	is_shown = {
		is_ruler = yes
		is_landless_adventurer = yes
	}

	is_valid = {
		is_landless_adventurer = yes
	}
	
	cost = {
		gold = {
			add = {
				value = low_travel_option_cost
				desc = purchase_rough_terrain_gear_option
			}
		}
	}

	owner_modifier = {
		forest_travel_danger = forest_low_danger_reduction
		majorroad_forest_travel_danger = majorroad_forest_low_danger_reduction
		minorroad_forest_travel_danger = minorroad_forest_low_danger_reduction
		taiga_travel_danger = taiga_low_danger_reduction
		majorroad_taiga_travel_danger = majorroad_taiga_low_danger_reduction
		minorroad_taiga_travel_danger = minorroad_taiga_low_danger_reduction
		jungle_travel_danger = jungle_low_danger_reduction
		majorroad_jungle_travel_danger = majorroad_jungle_low_danger_reduction
		minorroad_jungle_travel_danger = minorroad_jungle_low_danger_reduction
	}
	
	on_applied_effect = {
	}
	
	ai_will_do = {
		value = 0
		if = {
			limit = {
				any_future_path_location = {
					count >= 3
					OR = {
						agot_is_forest_terrain = yes
						agot_is_taiga_terrain = yes
						agot_is_jungle_terrain = yes
					}
				}
			}
			add = {
				value = 100
			}
		}
	}
}

experienced_captains_option = {
	is_shown = {
   		is_ruler = yes
	}

	is_valid = {
	}
	
	cost = {
		gold = {
			add = {
				value = medium_travel_option_cost
				if = {
					limit = {
						government_has_flag = government_is_nomadic
					}
					multiply = 0.5
				}
				desc = experienced_captains_option
			}
		}
		herd = {
			if = {
				limit = {
					government_has_flag = government_is_nomadic
				}
				add = {
					value = medium_travel_option_cost
					desc = experienced_captains_option
				}
			}
		}
	}

	owner_modifier = {
		coastal_sea_travel_danger = medium_sea_danger_reduction
		sea_travel_danger = medium_sea_danger_reduction #Still a bit more dangerous since sea travel is more dangerous than coastal sea
	}
	
	on_applied_effect = {
		hidden_effect = {
			if = { # No reason to character bloat for every AI
				limit = {
					OR = {
						is_ai = no
						highest_held_title_tier >= tier_kingdom
					}
				}
				# Try to find a pool character with the Forder trait
				if = {
					limit = {
						exists = root.capital_province
						any_pool_character = {
							province = root.capital_province
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
							has_trait = forder
						}
					}
					random_pool_character = {
						province = root.capital_province
						limit = {
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
							has_trait = forder
						}
						save_scope_as = new_guide
					}
				}
				# If we don't have one, we pull a random pool character and add the trait
				else_if = {
					limit = {
						exists = root.capital_province
						any_pool_character = {
							province = root.capital_province
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
						}
					}
					random_pool_character = {
						province = root.capital_province
						limit = {
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
						}
						if = {
							limit = {
								NOT = {
									has_trait = forder
								}
							}
							add_trait = forder
						}
						save_scope_as = new_guide
					}
				}
				# Fallback scenario, we just create a character
				else = {
					create_character = {
						location = root.location
						template = sea_captain
						save_scope_as = new_guide
					}
				}
				if = {
					limit = {
						exists = scope:new_guide
					}
					scope:new_guide = {
						add_gold = root.medium_travel_option_cost
						move_to_pool = yes
						add_character_flag = travel_option_added_character	#to send it back to pool when the travel is done
					}
					send_interface_toast = {
						type = event_toast_effect_good
						title = captain_recruited.t
						left_icon = scope:new_guide
						root.current_travel_plan ?= {
							add_companion = scope:new_guide
						}
					}
				}
			}
		}
		custom_tooltip = captain_recruited.tt
	}
	
	ai_will_do = {
		value = 0
		if = {
			limit = {
				any_future_path_location = {
					count >= 3
					is_sea_province = yes
				}
			}
			add = {
				value = 100
			}
		}
	}
}

hire_experienced_mercenaries_option = {
	is_shown = {
   		is_ruler = yes
	}

	is_valid = {
		custom_tooltip = {
			text = available_mercenary.tt
			any_mercenary_company = {
				is_mercenary_in_hire_range = root
				mercenary_company_leader = {
					is_travelling = no
					is_at_war = no
					is_in_army = no
					NOT = {
						any_courtier = {
							is_in_army = yes
						}
					}
				}
			}
		}
	}
	
	cost = {
		gold = {
			add = {
				value = high_travel_option_cost
				if = {
					limit = {
						government_has_flag = government_is_nomadic
					}
					multiply = 0.5
				}
				desc = hire_experienced_mercenaries_option
			}
		}
		herd = {
			if = {
				limit = {
					government_has_flag = government_is_nomadic
				}
				add = {
					value = high_travel_option_cost
					desc = hire_experienced_mercenaries_option
				}
			}
		}
	}
	
	travel_modifier = {
		travel_speed = 10
		travel_safety = 20
	}
	
	on_applied_effect = {
		hidden_effect = {
			random_mercenary_company = {
				limit = {
					is_mercenary_in_hire_range = root
					mercenary_company_leader = {
						is_travelling = no
						is_at_war = no
						is_in_army = no
						NOT = {
							any_courtier = {
								is_in_army = yes
							}
						}
					}
				}
				mercenary_company_leader = {
					save_scope_as = mercenary_leader
				}
			}
			
			scope:mercenary_leader = {
				add_gold = root.high_travel_option_cost
			}
			
			if = { # No reason to steal too many Mercenaries away for travels; players and AI kings+ only
				limit = {
					OR = {
						is_ai = no
						highest_held_title_tier >= tier_kingdom
					}
				}
				send_interface_toast = {
					type = event_toast_effect_good
					title = mercenary_leader.t
					left_icon = scope:mercenary_leader
					root.current_travel_plan ?= {
						add_companion = scope:mercenary_leader
					}
				}
			}
		}
		custom_tooltip = mercenary_leader_recruited.tt
	}
	
	ai_will_do = {
		value = 0
		if = {
			limit = {
				any_future_path_location = {
					count >= 50
				}
			}
			add = {
				value = 100
			}
		}
		if = {
			limit = {
				travel_plan_owner.gold <= travel_plan_owner.minor_gold_value
			}
			add = {
				value = -500
			}
		}
	}
}

hire_jungle_expert_option = {
	is_shown = {
		is_ruler = yes
		is_landless_adventurer = no
	}

	is_valid = {
	}
	
	cost = {
		gold = {
			add = {
				value = low_travel_option_cost
				if = {
					limit = {
						government_has_flag = government_is_nomadic
					}
					multiply = 0.5
				}
				desc = hire_jungle_expert_option
			}
		}
		herd = {
			if = {
				limit = {
					government_has_flag = government_is_nomadic
				}
				add = {
					value = low_travel_option_cost
					desc = hire_jungle_expert_option
				}
			}
		}
	}

	owner_modifier = {
		jungle_travel_danger = jungle_medium_danger_reduction
		majorroad_jungle_travel_danger = majorroad_jungle_medium_danger_reduction
		minorroad_jungle_travel_danger = minorroad_jungle_medium_danger_reduction
	}
	
	on_applied_effect = {
		hidden_effect = {
			if = { # No reason to steal too many Mercenaries away for travels; players and AI kings+ only
				limit = {
					OR = {
						is_ai = no
						highest_held_title_tier >= tier_kingdom
					}
				}
				# Try to find a pool character the Jungle Stalker trait
				if = {
					limit = {
						exists = root.capital_province
						any_pool_character = {
							province = root.capital_province
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
							has_trait = jungle_stalker
						}
					}
					random_pool_character = {
						province = root.capital_province
						limit = {
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
							has_trait = jungle_stalker
						}
						save_scope_as = new_guide
					}
				}
				# Otherwise, just give the trait to a pool character
				else_if = {
					limit = {
						exists = root.capital_province
						any_pool_character = {
							province = root.capital_province
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
						}
					}
					random_pool_character = {
						province = root.capital_province
						limit = {
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
						}
						if = {
							limit = {
								NOT = {
									has_trait = jungle_stalker
								}
							}
							add_trait = jungle_stalker
						}
						save_scope_as = new_guide
					}
				}
				# else create a character
				else = {
					create_character = {
						location = root.location
						template = jungle_guide
						save_scope_as = new_guide
					}
				}
				if = {
					limit = {
						exists = scope:new_guide
					}
					scope:new_guide = {
						add_gold = root.low_travel_option_cost
						move_to_pool = yes
						add_character_flag = travel_option_added_character	#to send it back to pool when the travel is done
					}
					send_interface_toast = {
						type = event_toast_effect_good
						title = jungle_stalker_recruited.t
						left_icon = scope:new_guide
						root.current_travel_plan ?= {
							add_companion = scope:new_guide
						}
					}
				}
			}
		}
		custom_tooltip = jungle_stalker_recruited.tt
	}
	
	ai_will_do = {
		value = 0
		if = {
			limit = {
				any_future_path_location = {
					count >= 3
					agot_is_jungle_terrain = yes
				}
			}
			add = {
				value = 100
			}
		}
	}
}

hire_mountaineer_option = {
	is_shown = {
		is_ruler = yes
		is_landless_adventurer = no
	}

	is_valid = {
	}
	
	cost = {
		gold = {
			add = {
				value = low_travel_option_cost
				if = {
					limit = {
						government_has_flag = government_is_nomadic
					}
					multiply = 0.5
				}
				desc = hire_mountaineer_option
			}
		}
		herd = {
			if = {
				limit = {
					government_has_flag = government_is_nomadic
				}
				add = {
					value = low_travel_option_cost
					desc = hire_mountaineer_option
				}
			}
		}
	}

	owner_modifier = {
		mountains_travel_danger = mountains_medium_danger_reduction
		majorroad_mountains_travel_danger = majorroad_mountains_medium_danger_reduction
		minorroad_mountains_travel_danger = minorroad_mountains_medium_danger_reduction
		desert_mountains_travel_danger = desert_mountains_medium_danger_reduction
		majorroad_desert_mountains_travel_danger = majorroad_desert_mountains_medium_danger_reduction
		minorroad_desert_mountains_travel_danger = minorroad_desert_mountains_medium_danger_reduction
		hills_travel_danger = hills_medium_danger_reduction
		majorroad_hills_travel_danger = majorroad_hills_medium_danger_reduction
		minorroad_hills_travel_danger = minorroad_hills_medium_danger_reduction
	}
	
	on_applied_effect = {
		hidden_effect = {
			if = { # No reason to steal too many Mercenaries away for travels; players and AI kings+ only
				limit = {
					OR = {
						is_ai = no
						highest_held_title_tier >= tier_kingdom
					}
				}
				if = {
					limit = {
						exists = root.capital_province
						any_pool_character = {
							province = root.capital_province
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
							has_trait = rough_terrain_expert
						}
					}
					random_pool_character = {
						province = root.capital_province
						limit = {
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
							has_trait = rough_terrain_expert
						}
						save_scope_as = new_guide
					}
				}
				else_if = {
					limit = {
						exists = root.capital_province
						any_pool_character = {
							province = root.capital_province
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
						}
					}
					random_pool_character = {
						province = root.capital_province
						limit = {
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
						}
						if = {
							limit = {
								NOT = {
									has_trait = rough_terrain_expert
								}
							}
							add_trait = rough_terrain_expert
						}
						save_scope_as = new_guide
					}
				}
				else = {
					create_character = {
						location = root.location
						template = mountaineer_guide
						save_scope_as = new_guide
					}
				}
				if = {
					limit = {
						exists = scope:new_guide
					}
					scope:new_guide = {
						add_gold = root.low_travel_option_cost
						move_to_pool = yes
						add_character_flag = travel_option_added_character	#to send it back to pool when the travel is done
					}
					send_interface_toast = {
						type = event_toast_effect_good
						title = mountaineer_recruited.t
						left_icon = scope:new_guide
						root.current_travel_plan ?= {
							add_companion = scope:new_guide
						}
					}
				}
			}
		}
		custom_tooltip = mountaineer_recruited.tt
	}
	
	ai_will_do = {
		value = 0
		if = {
			limit = {
				any_future_path_location = {
					count >= 3
					OR = {
						agot_is_mountains_terrain = yes
						agot_is_desert_mountains_terrain = yes
						agot_is_hills_terrain = yes
					}
				}
			}
			add = {
				value = 100
			}
		}
	}
}

hire_forder_option = {
	is_shown = {
		is_ruler = yes
		is_landless_adventurer = no
	}

	is_valid = {
		is_playable_character = yes
	}
	
	cost = {
		gold = {
			add = {
				value = low_travel_option_cost
				if = {
					limit = {
						government_has_flag = government_is_nomadic
					}
					multiply = 0.5
				}
				desc = hire_forder_option
			}
		}
		herd = {
			if = {
				limit = {
					government_has_flag = government_is_nomadic
				}
				add = {
					value = low_travel_option_cost
					desc = hire_forder_option
				}
			}
		}
	}

	owner_modifier = {
		wetlands_travel_danger = wetlands_medium_danger_reduction
		majorroad_wetlands_travel_danger = majorroad_wetlands_medium_danger_reduction
		minorroad_wetlands_travel_danger = minorroad_wetlands_medium_danger_reduction
		floodplains_travel_danger = floodplains_medium_danger_reduction
		majorroad_floodplains_travel_danger = majorroad_floodplains_medium_danger_reduction
		minorroad_floodplains_travel_danger = minorroad_floodplains_medium_danger_reduction
	}
	
	on_applied_effect = {
		hidden_effect = {
			if = { # No reason to steal too many Mercenaries away for travels; players and AI kings+ only
				limit = {
					OR = {
						is_ai = no
						highest_held_title_tier >= tier_kingdom
					}
				}
				if = {
					limit = {
						exists = root.capital_province
						any_pool_character = {
							province = root.capital_province
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
							has_trait = forder
						}
					}
					random_pool_character = {
						province = root.capital_province
						limit = {
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
							has_trait = forder
						}
						save_scope_as = new_guide
					}
				}
				else_if = {
					limit = {
						exists = root.capital_province
						any_pool_character = {
							province = root.capital_province
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
						}
					}
					random_pool_character = {
						province = root.capital_province
						limit = {
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
						}
						if = {
							limit = {
								NOT = {
									has_trait = forder
								}
							}
							add_trait = forder
						}
						save_scope_as = new_guide
					}
				}
				else = {
					create_character = {
						location = root.location
						template = forder_guide
						save_scope_as = new_guide
					}
				}
				if = {
					limit = {
						exists = scope:new_guide
					}
					scope:new_guide = {
						add_gold = root.low_travel_option_cost
						move_to_pool = yes
						add_character_flag = travel_option_added_character	#to send it back to pool when the travel is done
					}
					send_interface_toast = {
						type = event_toast_effect_good
						title = forder_recruited.t
						left_icon = scope:new_guide
						root.current_travel_plan ?= {
							add_companion = scope:new_guide
						}
					}
				}
			}
		}
		custom_tooltip = forder_recruited.tt
	}
	
	ai_will_do = {
		value = 0
		if = {
			limit = {
				any_future_path_location = {
					count >= 3
					OR = {
						agot_is_wetlands_terrain = yes
						agot_is_floodplains_terrain = yes
					}
				}
			}
			add = {
				value = 100
			}
		}
	}
}

hire_desert_warrior_option = {
	is_shown = {
		is_ruler = yes
		is_landless_adventurer = no
	}

	is_valid = {
	}
	
	cost = {
		gold = {
			add = {
				value = low_travel_option_cost
				if = {
					limit = {
						government_has_flag = government_is_nomadic
					}
					multiply = 0.5
				}
				desc = hire_desert_warrior_option
			}
		}
		herd = {
			if = {
				limit = {
					government_has_flag = government_is_nomadic
				}
				add = {
					value = low_travel_option_cost
					desc = hire_desert_warrior_option
				}
			}
		}
	}

	owner_modifier = {
		desert_travel_danger = desert_medium_danger_reduction
		majorroad_desert_travel_danger = majorroad_desert_medium_danger_reduction
		minorroad_desert_travel_danger = minorroad_desert_medium_danger_reduction
		steppe_travel_danger = steppe_medium_danger_reduction
		majorroad_steppe_travel_danger = majorroad_steppe_medium_danger_reduction
		minorroad_steppe_travel_danger = minorroad_steppe_medium_danger_reduction
		drylands_travel_danger = drylands_medium_danger_reduction
		majorroad_drylands_travel_danger = majorroad_drylands_medium_danger_reduction
		minorroad_drylands_travel_danger = minorroad_drylands_medium_danger_reduction
	}
	
	on_applied_effect = {
		hidden_effect = {
			if = { # No reason to steal too many Mercenaries away for travels; players and AI kings+ only
				limit = {
					OR = {
						is_ai = no
						highest_held_title_tier >= tier_kingdom
					}
				}
				if = {
					limit = {
						exists = root.capital_province
						any_pool_character = {
							province = root.capital_province
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
							has_trait = desert_warrior
						}
					}
					random_pool_character = {
						province = root.capital_province
						limit = {
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
							has_trait = desert_warrior
						}
						save_scope_as = new_guide
					}
				}
				else_if = {
					limit = {
						exists = root.capital_province
						any_pool_character = {
							province = root.capital_province
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
						}
					}
					random_pool_character = {
						province = root.capital_province
						limit = {
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
						}
						if = {
							limit = {
								NOT = {
									has_trait = desert_warrior
								}
							}
							add_trait = desert_warrior
						}
						save_scope_as = new_guide
					}
				}
				else = {
					create_character = {
						location = root.location
						template = desert_warrior_guide
						save_scope_as = new_guide
					}
				}
				if = {
					limit = {
						exists = scope:new_guide
					}
					scope:new_guide = {
						add_gold = root.low_travel_option_cost
						move_to_pool = yes
						add_character_flag = travel_option_added_character	#to send it back to pool when the travel is done
					}
					send_interface_toast = {
						type = event_toast_effect_good
						title = desert_warrior_recruited.t
						left_icon = scope:new_guide
						root.current_travel_plan ?= {
							add_companion = scope:new_guide
						}
					}
				}
			}
		}
		custom_tooltip = desert_warrior_recruited.tt
	}
	
	ai_will_do = {
		value = 0
		if = {
			limit = {
				any_future_path_location = {
					count >= 3
					OR = {
						agot_is_desert_terrain = yes
						agot_is_steppe_terrain = yes
						agot_is_drylands_terrain = yes
					}
				}
			}
			add = {
				value = 100
			}
		}
	}
}

hire_rough_terrain_expert_option = {
	is_shown = {
		is_ruler = yes
		is_landless_adventurer = no
	}

	is_valid = {
	}
	
	cost = {
		gold = {
			add = {
				value = low_travel_option_cost
				if = {
					limit = {
						government_has_flag = government_is_nomadic
					}
					multiply = 0.5
				}
				desc = hire_rough_terrain_expert_option
			}
		}
		herd = {
			if = {
				limit = {
					government_has_flag = government_is_nomadic
				}
				add = {
					value = low_travel_option_cost
					desc = hire_rough_terrain_expert_option
				}
			}
		}
	}

	owner_modifier = {
		forest_travel_danger = forest_medium_danger_reduction
		majorroad_forest_travel_danger = majorroad_forest_medium_danger_reduction
		minorroad_forest_travel_danger = minorroad_forest_medium_danger_reduction
		taiga_travel_danger = taiga_medium_danger_reduction
		majorroad_taiga_travel_danger = majorroad_taiga_medium_danger_reduction
		minorroad_taiga_travel_danger = minorroad_taiga_medium_danger_reduction
	}
	
	on_applied_effect = {
		hidden_effect = {
			if = { # No reason to steal too many Mercenaries away for travels; players and AI kings+ only
				limit = {
					OR = {
						is_ai = no
						highest_held_title_tier >= tier_kingdom
					}
				}
				if = {
					limit = {
						exists = root.capital_province
						any_pool_character = {
							province = root.capital_province
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
							has_trait = forest_fighter
						}
					}
					random_pool_character = {
						province = root.capital_province
						limit = {
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
							has_trait = forest_fighter
						}
						save_scope_as = new_guide
					}
				}
				else_if = {
					limit = {
						exists = root.capital_province
						any_pool_character = {
							province = root.capital_province
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
						}
					}
					random_pool_character = {
						province = root.capital_province
						limit = {
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
						}
						if = {
							limit = {
								NOT = {
									has_trait = forest_fighter
								}
							}
							add_trait = forest_fighter
						}
						save_scope_as = new_guide
					}
				}
				else = {
					create_character = {
						location = root.location
						template = rough_terrain_guide
						save_scope_as = new_guide
					}
				}
				if = {
					limit = {
						exists = scope:new_guide
					}
					scope:new_guide = {
						add_gold = root.low_travel_option_cost
						move_to_pool = yes
						add_character_flag = travel_option_added_character	#to send it back to pool when the travel is done
					}
					send_interface_toast = {
						type = event_toast_effect_good
						title = rough_terrain_expert_recruited.t
						left_icon = scope:new_guide
						root.current_travel_plan ?= {
							add_companion = scope:new_guide
						}
					}
				}
			}
		}
		custom_tooltip = rough_terrain_expert_recruited.tt
	}
	
	ai_will_do = {
		value = 0
		if = {
			limit = {
				any_future_path_location = {
					count >= 3
					OR = {
						agot_is_forest_terrain = yes
						agot_is_taiga_terrain = yes
					}
				}
			}
			add = {
				value = 100
			}
		}
	}
}

court_physician_option = {
	is_shown = {
		is_ruler = yes
	}

	is_valid = {
		custom_tooltip = {
			text = court_physician_option_tt
			exists = court_position:court_physician_court_position
			court_position:court_physician_court_position = {
				is_ai = yes
				is_available = yes
			}
		}
	}
	cost = {
		gold = {
			add = {
				value = low_travel_option_cost
				if = {
					limit = {
						government_has_flag = government_is_nomadic
					}
					multiply = 0.5
				}
				desc = court_physician_option
			}
		}
		herd = {
			if = {
				limit = {
					government_has_flag = government_is_nomadic
				}
				add = {
					value = low_travel_option_cost
					desc = court_physician_option
				}
			}
		}
	}

	on_applied_effect = {
		# The Court Physician always gets auto-added
	}

	owner_modifier = {
		epidemic_travel_danger = epidemic_medium_danger_reduction
	}
	owner_modifier_description = court_physician_option_suffix

	ai_will_do = {
		value = 50
	}
}

cultural_ambassador_option = {
	is_shown = {
		is_ruler = yes
	}

	is_valid = {
	}
	
	cost = {
		gold = {
			add = {
				value = low_travel_option_cost
				if = {
					limit = {
						government_has_flag = government_is_nomadic
					}
					multiply = 0.5
				}
				desc = cultural_ambassador_option
			}
		}
		herd = {
			if = {
				limit = {
					government_has_flag = government_is_nomadic
				}
				add = {
					value = low_travel_option_cost
					desc = cultural_ambassador_option
				}
			}
		}
	}
	
	on_applied_effect = {
		hidden_effect = {
			if = { # No reason to steal too many Mercenaries away for travels; players and AI kings+ only
				limit = {
					OR = {
						is_ai = no
						highest_held_title_tier >= tier_kingdom
					}
				}
				if = {
					limit = {
						exists = root.capital_province
						any_pool_character = {
							province = root.capital_province
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
							diplomacy > 8
						}
					}
					random_pool_character = {
						province = root.capital_province
						limit = {
							is_available_ai_adult = yes
							has_no_particular_noble_roots_trigger = yes
							age >= 30
							age <= 55
							is_married = no
							diplomacy > 10
						}
						save_scope_as = new_guide
					}
				}
				else = {
					create_character = {
						location = root.location
						template = cultural_ambassador
						save_scope_as = new_guide
					}
				}
				if = {
					limit = {
						exists = scope:new_guide
					}
					scope:new_guide = {
						add_gold = root.medium_travel_option_cost
						move_to_pool = yes
						add_character_flag = travel_option_added_character	#to send it back to pool when the travel is done
					}
					send_interface_toast = {
						type = event_toast_effect_good
						title = cultural_ambassador_recruited.t
						left_icon = scope:new_guide
						root.current_travel_plan ?= {
							add_companion = scope:new_guide
						}
					}
					root.current_travel_plan ?= {
						set_variable = {
							name = cultural_ambassador_scope
							value = scope:new_guide
						}
					}
				}
			}
		}
		custom_tooltip = cultural_ambassador_recruited.tt
	}
	
	ai_will_do = {
		value = 0
		if = {
			limit = {
				any_future_path_location = {
					count >= 3
					exists = county
					NOT = { culture = root.travel_plan_owner.culture }
				}
			}
			add = {
				value = 50
			}
		}
		if = {
			limit = {
				travel_plan_owner.gold <= travel_plan_owner.minor_gold_value
			}
			add = {
				value = -500
			}
		}
		if = {
			limit = {
				travel_plan_owner = {
					is_landless_adventurer = yes
				}
			}
			add = {
				value = -500
			}
		}
	}
}

hire_allied_mercenaries_option = {
	is_shown = {
		has_bp3_dlc_trigger = yes
	}

	is_valid = {
		has_perk = mercenary_contacts_perk
	}
	
	travel_modifier = {
		travel_speed = 5
		travel_safety = 5
	}
	
	ai_will_do = {
		value = 100
	}
}

appeasement_option = {
	is_shown = {
		has_bp3_dlc_trigger = yes
	}

	is_valid = {
		has_perk = local_hero_perk
	}

	owner_modifier = {
		monthly_tyranny = -0.8
		monthly_dread = -0.4
	}

	ai_will_do = {
		value = 50
	}
}

leisurely_option = {
	is_shown = {
		has_bp3_dlc_trigger = yes
	}

	is_valid = {
		has_perk = local_hero_perk
	}

	owner_modifier = {
		stress_gain_mult = -0.5
	}

	travel_modifier = {
		travel_speed = -20
	}

	on_travel_end_effect = {
		custom_tooltip = leisurely_option_tt
	}

	ai_will_do = {
		value = 50
	}
}

tutor_child_option = {
	is_shown = {
		has_bp3_dlc_trigger = yes
	}

	is_valid = {
		has_perk = know_your_land_know_your_people_perk
		trigger_if = {
			limit = {
				exists = player_heir
			}
			player_heir = {
				age < 15
				save_temporary_scope_as = heir_for_tooltip
				custom_tooltip = {
					text = heir_can_join_tt
					location = root.location
					is_available_allow_travelling = yes
				}
			}
		}
		trigger_else = {
			custom_tooltip = {
				text = no_heir_tt
				always = no
			}
		}
	}

	owner_modifier = {
		child_opinion = 5
	}

	travel_modifier = {
		travel_speed = -5
	}

	on_applied_effect = {
		hidden_effect = {
			if = {
				limit = {
					exists = player_heir
					player_heir = {
						age < 15
						location = root.location
					}
				}
				player_heir = { save_scope_as = tutored_heir }
				root.current_travel_plan ?= {
					add_companion = scope:tutored_heir
				}
			}
		}
		if = {
			limit = {
				exists = scope:tutored_heir
			}
			custom_tooltip = child_brought_along_specific.tt
		}
		else = {
			custom_tooltip = child_brought_along.tt
		}
	}
	
	ai_will_do = {
		value = 1
	}

	on_travel_end_effect = {
		custom_tooltip = tutor_child_option_tt
	}
}

fancy_mounts_option = {
	is_shown = {
		is_ruler = yes
		is_landless_adventurer = no
	}

	is_valid = {
		any_directly_owned_province = {
			OR = {
				has_building_or_higher = stables_04
				has_building_or_higher = camel_farms_04
			}
		}
	}

	travel_modifier = {
		travel_speed = 20
	}

	ai_will_do = {
		value = 100
	}
}

military_recruits_option = {
	is_shown = {
		primary_title.tier >= tier_duchy
		is_landless_adventurer = no
	}

	is_valid = {
		any_directly_owned_province = {
			has_building_or_higher = military_academy_01
		}
	}

	travel_modifier = {
		travel_safety = 10
	}

	on_applied_effect = {
		ordered_knight = {
			limit = {
				is_available_ai_adult = yes 
				age < 50
			}
			order_by = {
				value = 0
				subtract = prowess
			}
			max = 3
			check_range_bounds = no
			save_temporary_scope_as = knight_to_add
			root = {
				send_interface_message = {
					type = event_marshal_good
					title = military_recruits_option.t
					desc = military_recruits_option.desc
					left_icon = scope:knight_to_add
					current_travel_plan ?= {
						add_to_variable_list = {
							name = knights_to_train 
							target = scope:knight_to_add
						}
						add_companion = scope:knight_to_add
					}
				}
			}
		}
		# trigger hidden recursive event
		trigger_event = {
			id = travel_events.0060
			days = { 5 10 }
		}
	}

	ai_will_do = {
		value = 100
	}
}

superior_armaments_option = {
	is_shown = {
		primary_title.tier >= tier_duchy
		is_landless_adventurer = no
	}

	is_valid = {
		any_directly_owned_province = {
			has_building_or_higher = blacksmiths_01
		}
	}

	travel_modifier = {
		travel_safety = 10
	}

	owner_modifier = {
		artifact_decay_reduction_mult = -0.2
	}

	ai_will_do = {
		value = 90
	}
}

anxious_option = {
	is_shown = {
		is_ruler = yes
	}

	is_valid = {
		# Putting these here so the player knows why this option is available to them
		OR = {
			has_trait = impatient 
			has_trait = craven
			has_trait = reckless
		}
	}

	travel_modifier = {
		travel_speed = 20
		travel_safety = -10
	}

	ai_will_do = {
		value = 50
	}
}

circumspect_option = {
	is_shown = {
		is_ruler = yes
	}

	is_valid = {
		# Putting these here so the player knows why this option is available to them
		OR = {
			has_trait = fickle
			has_trait = arbitrary
			has_trait = paranoid
		}
	}

	travel_modifier = {
		travel_speed = -10
	}

	owner_modifier = {
		enemy_hostile_scheme_phase_duration_add = massive_scheme_phase_duration_malus_value
		enemy_hostile_scheme_success_chance_add = -50
	}

	ai_will_do = {
		value = 50
	}
}

estate_mounts_option = {
	is_shown = {
		domicile ?= {
			has_domicile_parameter = estate_unlock_mount_travel_option
		}
	}

	is_valid = {
	}

	travel_modifier = {
		travel_speed = 10
	}
	
	owner_modifier = {
		travel_companion_opinion = 10
		monthly_prestige = 1
	}

	ai_will_do = {
		value = 100
	}
}
