﻿@ep2_wedding_ewan_0052_dolt_pay_out_value = root.massive_gold_value
@ep2_wedding_ewan_0061_high_skill_value = extremely_high_skill_rating
@ep2_wedding_ewan_0061_old_value = 80
@ep2_wedding_ewan_0061_very_old = 90

namespace = COR_ceremony_ewan

##################################################
# #Banquet Phase
# 0001 - 0010	Quite the Spectacle - Connect with various types of characters over the entertainment.
# 0011 - 0020	Food Fit for a... - Connect with various types of characters over the food.
# 0021 - 0030	Shimmering, Shining - Connect with various types of characters over the venue & its decorations.
# 0031 - 0040	A Sociable Supper - Meet one of your neighbouring rulers and form a fast friendship.
# 0041 - 0050	Speech! Speech! - Make a speech to the happy couple, adjusting the meaning to your intent.
# 0051 - 0060	And Another Thing - Someone is pitching questionable ideas at you, and you can go along with them or not, but they keep coming at you.
# 0061 - 0070	To My Beloved GetRelation - Embarrassing older relation speech.
# 0071 - 0080	Oath in Moment - Your liege offers you a favour for your support.
##################################################










##################################################
# MISC SCRIPTED TRIGGERS & EFFECTS

# Filter out characters who aren't appropriate to be giving their unasked opinions on the activity's setup options.
scripted_trigger COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = {
	# Filter out players immediately.
	is_ai = yes
	# Now let's make sure it's no one who wouldn't be having this conversation or who we might want to reserve for something else.
	NOR = {
		this = root
		this = scope:activity.activity_host
		this = scope:activity.special_guest:COR_coronator
		this ?= root.intent_target
		has_any_bad_relationship_with_character_trigger = { CHARACTER = root }
	}
}

# Standard stress loss for hosts agreeing with criticisms.
scripted_effect ep2_wedding_ewan_0000_host_takes_criticism_stress_gain_effect = {
	# Host reacts a bit differently to feedback.
	if = {
		limit = { this = scope:activity.activity_host }
		stress_impact = {
			gregarious = miniscule_stress_impact_loss
			humble = minor_stress_impact_loss
			arrogant = miniscule_stress_impact_gain
		}
	}
	else = {
		stress_impact = { gregarious = miniscule_stress_impact_loss }
	}
}

scripted_effect ep2_wedding_ewan_0000_opinion_swap_effect = {
	# Progress heavily towards friendship.
	progress_towards_friend_effect = {
		CHARACTER = $FAVOURED_CHAR$
		REASON = friend_dinner
		OPINION = 15
	}
	reverse_add_opinion = {
		target = $REJECTED_CHAR$
		modifier = respect_opinion
		opinion = -15
	}
}

scripted_effect ep2_wedding_ewan_0000_host_approves_effect = {
	# If you're the host, gain some prestige for ignoring them.
	if = {
		limit = { this = scope:activity.activity_host }
		add_prestige = minor_prestige_gain
	}
	# Otherwise, gain some opinion with the host.
	else = {
		reverse_add_opinion = {
			target = scope:activity.activity_host
			modifier = friendliness_opinion
			opinion = 5
		}
	}
}

scripted_effect ep2_wedding_ewan_0000_award_lifestyle_xp_per_conversationalist_effect = {
	$TARGET$ = {
		# Diplomacy.
		if = {
			limit = { has_trait = education_diplomacy }
			# T1.
			if = {
				limit = { has_trait = education_diplomacy_1 }
				root = { add_diplomacy_lifestyle_xp = minor_lifestyle_xp }
			}
			# T2.
			else_if = {
				limit = { has_trait = education_diplomacy_2 }
				root = { add_diplomacy_lifestyle_xp = medium_lifestyle_xp }
			}
			# T3.
			else_if = {
				limit = { has_trait = education_diplomacy_3 }
				root = { add_diplomacy_lifestyle_xp = major_lifestyle_xp }
			}
			# T4.
			else_if = {
				limit = { 
					OR = {
						has_trait = education_diplomacy_4
						has_trait = education_diplomacy_5
					}
				}
				root = { add_diplomacy_lifestyle_xp = massive_lifestyle_xp }
			}
		}
		# Martial.
		if = {
			limit = { has_trait = education_martial }
			# T1.
			if = {
				limit = { has_trait = education_martial_1 }
				root = { add_martial_lifestyle_xp = minor_lifestyle_xp }
			}
			# T2.
			else_if = {
				limit = { has_trait = education_martial_2 }
				root = { add_martial_lifestyle_xp = medium_lifestyle_xp }
			}
			# T3.
			else_if = {
				limit = { has_trait = education_martial_3 }
				root = { add_martial_lifestyle_xp = major_lifestyle_xp }
			}
			# T4.
			else_if = {
				limit = { 
					OR = {
						has_trait = education_martial_4
						has_trait = education_martial_5
					}
				}
				root = { add_martial_lifestyle_xp = massive_lifestyle_xp }
			}
		}
		# Stewardship.
		if = {
			limit = { has_trait = education_stewardship }
			# T1.
			if = {
				limit = { has_trait = education_stewardship_1 }
				root = { add_stewardship_lifestyle_xp = minor_lifestyle_xp }
			}
			# T2.
			else_if = {
				limit = { has_trait = education_stewardship_2 }
				root = { add_stewardship_lifestyle_xp = medium_lifestyle_xp }
			}
			# T3.
			else_if = {
				limit = { has_trait = education_stewardship_3 }
				root = { add_stewardship_lifestyle_xp = major_lifestyle_xp }
			}
			# T4.
			else_if = {
				limit = { 
					OR = {
						has_trait = education_stewardship_4
						has_trait = education_stewardship_5
					}
				}
				root = { add_stewardship_lifestyle_xp = massive_lifestyle_xp }
			}
		}
		# Intrigue.
		if = {
			limit = { has_trait = education_intrigue }
			# T1.
			if = {
				limit = { has_trait = education_intrigue_1 }
				root = { add_intrigue_lifestyle_xp = minor_lifestyle_xp }
			}
			# T2.
			else_if = {
				limit = { has_trait = education_intrigue_2 }
				root = { add_intrigue_lifestyle_xp = medium_lifestyle_xp }
			}
			# T3.
			else_if = {
				limit = { has_trait = education_intrigue_3 }
				root = { add_intrigue_lifestyle_xp = major_lifestyle_xp }
			}
			# T4.
			else_if = {
				limit = { 
					OR = {
						has_trait = education_intrigue_4
						has_trait = education_intrigue_5
					}
				}
				root = { add_intrigue_lifestyle_xp = massive_lifestyle_xp }
			}
		}
		# Learning.
		if = {
			limit = { has_trait = education_learning }
			# T1.
			if = {
				limit = { has_trait = education_learning_1 }
				root = { add_learning_lifestyle_xp = minor_lifestyle_xp }
			}
			# T2.
			else_if = {
				limit = { has_trait = education_learning_2 }
				root = { add_learning_lifestyle_xp = medium_lifestyle_xp }
			}
			# T3.
			else_if = {
				limit = { has_trait = education_learning_3 }
				root = { add_learning_lifestyle_xp = major_lifestyle_xp }
			}
			# T4.
			else_if = {
				limit = { 
					OR = {
						has_trait = education_learning_4
						has_trait = education_learning_5
					}
				}
				root = { add_learning_lifestyle_xp = massive_lifestyle_xp }
			}
		}
	}
}











##################################################
# BANQUET PHASE

##################################################
# Quite the Spectacle
# by Ewan Cowhig Croft
# 0001 - 0010
##################################################

# Character likes T1 entertainment.
scripted_trigger ep2_wedding_ewan_0001_entertainment_t1_likes_trigger = {
	OR = {
		# Thinks too much entertainment is frivolous.
		has_trait = diligent
		# Prefers 1-on-1 conversations to showy jugglers.
		## N-not that I'm sad because I can't juggle.
		### My hands are just stupid.
		has_trait = shy
		# Prefers lagom entertainment.
		has_trait = humble
		has_trait = content
		# Doesn't respect any entertaining profession.
		has_trait = honest
		## Just characters are kill-joys. Change my mind.
		has_trait = just
		# Likes safe entertainment that doesn't give them the jitters.
		has_trait = craven
		# Doesn't trust large bands of strangers.
		has_trait = paranoid
	}
}
# Character hates T1 entertainment.
scripted_trigger ep2_wedding_ewan_0001_entertainment_t1_hates_trigger = {
	OR = {
		# Likes a good joke/acrobat/actor.
		has_trait = lazy
		has_trait = gregarious
		# Prefers big, upscale-everything.
		has_trait = arrogant
		has_trait = ambitious
		# Appreciates the entertainer's art.
		has_trait = deceitful
		has_trait = arbitrary
		# Wants bombastic, dangerous entertainment.
		has_trait = brave
		# Loves large bands of dangerous strangers.
		has_trait = trusting
	}
}
# Character likes T2 entertainment.
scripted_trigger ep2_wedding_ewan_0001_entertainment_t2_likes_trigger = {
	OR = {
		# Accepting of the average.
		has_trait = content
		has_trait = compassionate
		# Likes that money was spent.
		has_trait = generous
		# Likes the atmosphere being high-effort but not _too_ bustling.
		has_trait = calm
		has_trait = patient
		# Likes a middling option.
		has_trait = fickle
		has_trait = cynical
	}
}
# Character hates T2 entertainment.
scripted_trigger ep2_wedding_ewan_0001_entertainment_t2_hates_trigger = {
	OR = {
		# Hates the average.
		has_trait = ambitious
		has_trait = arrogant
		# Would have preferred all the money, to take advantage, or else none, not to waste any.
		has_trait = greedy
		# Want a more bustling atmosphere that goes further than this.
		has_trait = wrathful
		has_trait = impatient
		# Feels that if it was worth doing, it's worth doing to its best.
		has_trait = stubborn
		has_trait = zealous
	}
}
# Character likes T3 entertainment.
scripted_trigger ep2_wedding_ewan_0001_entertainment_t3_likes_trigger = {
	OR = {
		# Loves excellent entertainment.
		has_trait = lazy
		has_trait = gregarious
		# Prefers big, upscale-everything.
		has_trait = arrogant
		has_trait = ambitious
		# Appreciates the entertainer's art.
		has_trait = deceitful
		has_trait = arbitrary
		# Wants bombastic, dangerous entertainment.
		has_trait = brave
		# Loves large bands of dangerous strangers.
		has_trait = trusting
	}
}
# Character hates T3 entertainment.
scripted_trigger ep2_wedding_ewan_0001_entertainment_t3_hates_trigger = {
	OR = {
		# So much entertainment is frivolous.
		has_trait = diligent
		# This is way, way too loud.
		has_trait = shy
		# Wants entertainment to be more lagom.
		has_trait = humble
		has_trait = content
		# Doesn't respect any entertaining profession.
		has_trait = honest
		## Just characters are kill-joys. Change my mind.
		has_trait = just
		# Likes safe entertainment that doesn't give them the jitters.
		has_trait = craven
		# Doesn't trust large bands of strangers.
		has_trait = paranoid
	}
}

#	Connect with various types of characters over the entertainment.
COR_ceremony_ewan.0001 = {
	type = activity_event
	title = ep2_wedding_ewan.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = {
							category = COR_ceremony_option_entertainment
							option = COR_ceremony_entertainment_bad
						}
					}
				}
				desc = {
					desc = ep2_wedding_ewan.0001.desc.intro.bad
					desc = {
						random_valid = {
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = diligent }
								}
								desc = ep2_wedding_ewan.0001.desc.t1.love.diligent
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = shy }
								}
								desc = ep2_wedding_ewan.0001.desc.t1.love.shy
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = humble }
								}
								desc = ep2_wedding_ewan.0001.desc.t1.love.humble
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = content }
								}
								desc = ep2_wedding_ewan.0001.desc.t1.love.content
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = honest }
								}
								desc = ep2_wedding_ewan.0001.desc.t1.love.honest
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = just }
								}
								desc = ep2_wedding_ewan.0001.desc.t1.love.just
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = craven }
								}
								desc = ep2_wedding_ewan.0001.desc.t1.love.craven
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = paranoid }
								}
								desc = ep2_wedding_ewan.0001.desc.t1.love.paranoid
							}
						}
					}
				}
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = {
							category = COR_ceremony_option_entertainment
							option = COR_ceremony_entertainment_normal
						}
					}
				}
				desc = {
					desc = ep2_wedding_ewan.0001.desc.intro.normal
					desc = {
						random_valid = {
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = content }
								}
								desc = ep2_wedding_ewan.0001.desc.t2.love.content
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = compassionate }
								}
								desc = ep2_wedding_ewan.0001.desc.t2.love.compassionate
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = generous }
								}
								desc = ep2_wedding_ewan.0001.desc.t2.love.generous
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = calm }
								}
								desc = ep2_wedding_ewan.0001.desc.t2.love.calm
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = patient }
								}
								desc = ep2_wedding_ewan.0001.desc.t2.love.patient
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = fickle }
								}
								desc = ep2_wedding_ewan.0001.desc.t2.love.fickle
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = cynical }
								}
								desc = ep2_wedding_ewan.0001.desc.t2.love.cynical
							}
						}
					}
				}
			}
			desc = {
				desc = ep2_wedding_ewan.0001.desc.intro.good
				random_valid = {
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = lazy }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.love.lazy
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = gregarious }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.love.gregarious
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = arrogant }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.love.arrogant
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = ambitious }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.love.ambitious
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = deceitful }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.love.deceitful
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = arbitrary }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.love.arbitrary
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = brave }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.love.brave
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = trusting }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.love.trusting
					}
				}
			}
		}
		desc = ep2_wedding_ewan.0001.desc.midtro
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = {
							category = COR_ceremony_option_entertainment
							option = COR_ceremony_entertainment_bad
						}
					}
				}
				desc = {
					random_valid = {
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = lazy }
							}
							desc = ep2_wedding_ewan.0001.desc.t1.hate.lazy
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = gregarious }
							}
							desc = ep2_wedding_ewan.0001.desc.t1.hate.gregarious
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = arrogant }
							}
							desc = ep2_wedding_ewan.0001.desc.t1.hate.arrogant
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = ambitious }
							}
							desc = ep2_wedding_ewan.0001.desc.t1.hate.ambitious
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = deceitful }
							}
							desc = ep2_wedding_ewan.0001.desc.t1.hate.deceitful
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = arbitrary }
							}
							desc = ep2_wedding_ewan.0001.desc.t1.hate.arbitrary
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = brave }
							}
							desc = ep2_wedding_ewan.0001.desc.t1.hate.brave
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = trusting }
							}
							desc = ep2_wedding_ewan.0001.desc.t1.hate.trusting
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = {
									NOR = {
										has_trait = lazy
										has_trait = gregarious
										has_trait = arrogant
										has_trait = ambitious
										has_trait = deceitful
										has_trait = arbitrary
										has_trait = brave
										has_trait = trusting
									}
								}
							}
							desc = ep2_wedding_ewan.0000.desc.hate.fallback
						}
					}
				}
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = {
							category = COR_ceremony_option_entertainment
							option = COR_ceremony_entertainment_normal
						}
					}
				}
				desc = {
					random_valid = {
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = ambitious }
							}
							desc = ep2_wedding_ewan.0001.desc.t2.hate.ambitious
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = arrogant }
							}
							desc = ep2_wedding_ewan.0001.desc.t2.hate.arrogant
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = greedy }
							}
							desc = ep2_wedding_ewan.0001.desc.t2.hate.greedy
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = wrathful }
							}
							desc = ep2_wedding_ewan.0001.desc.t2.hate.wrathful
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = impatient }
							}
							desc = ep2_wedding_ewan.0001.desc.t2.hate.impatient
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = stubborn }
							}
							desc = ep2_wedding_ewan.0001.desc.t2.hate.stubborn
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = zealous }
							}
							desc = ep2_wedding_ewan.0001.desc.t2.hate.zealous
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = {
									NOR = {
										has_trait = ambitious
										has_trait = arrogant
										has_trait = greedy
										has_trait = wrathful
										has_trait = impatient
										has_trait = stubborn
										has_trait = zealous
									}
								}
							}
							desc = ep2_wedding_ewan.0000.desc.hate.fallback
						}
					}
				}
			}
			desc = {
				random_valid = {
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = diligent }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.hate.diligent
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = shy }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.hate.shy
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = humble }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.hate.humble
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = content }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.hate.content
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = honest }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.hate.honest
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = just }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.hate.just
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = craven }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.hate.craven
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = paranoid }
						}
						desc = ep2_wedding_ewan.0001.desc.t3.hate.paranoid
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = {
								NOR = {
									has_trait = diligent
									has_trait = shy
									has_trait = humble
									has_trait = content
									has_trait = honest
									has_trait = just
									has_trait = craven
									has_trait = paranoid
								}
							}
						}
						desc = ep2_wedding_ewan.0000.desc.hate.fallback
					}
				}
			}
		}
	}
	theme = feast_activity
	left_portrait = {
		character = scope:char_1
		animation = throne_room_applaud_1
	}
	center_portrait = {
		character = root
		animation = happiness
	}
	right_portrait = {
		character = scope:char_2
		animation = boredom
	}

	cooldown = { years = 1 }

	trigger = {
		scope:activity = {
			# T1.
			trigger_if = {
				limit = {
					has_activity_option = {
						category = COR_ceremony_option_entertainment
						option = COR_ceremony_entertainment_bad
					}
				}
				# Check for a character who likes the setup.
				any_attending_character = {
					COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
					ep2_wedding_ewan_0001_entertainment_t1_likes_trigger = yes
					# Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup.
					save_temporary_scope_as = char_temp
					scope:activity = {
						any_attending_character = {
							COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
							ep2_wedding_ewan_0001_entertainment_t1_hates_trigger = yes
							NOT = { this = scope:char_temp }
						}
					}
				}
			}
			# T2.
			trigger_else_if = {
				limit = {
					has_activity_option = {
						category = COR_ceremony_option_entertainment
						option = COR_ceremony_entertainment_normal
					}
				}
				# Check for a character who likes the setup.
				any_attending_character = {
					COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
					ep2_wedding_ewan_0001_entertainment_t2_likes_trigger = yes
					# Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup.
					save_temporary_scope_as = char_temp
					scope:activity = {
						any_attending_character = {
							COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
							ep2_wedding_ewan_0001_entertainment_t2_hates_trigger = yes
							NOT = { this = scope:char_temp }
						}
					}
				}
			}
			# T3.
			trigger_else = {
				# Check for a character who likes the setup.
				any_attending_character = {
					COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
					ep2_wedding_ewan_0001_entertainment_t3_likes_trigger = yes
					# Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup.
					save_temporary_scope_as = char_temp
					scope:activity = {
						any_attending_character = {
							COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
							ep2_wedding_ewan_0001_entertainment_t3_hates_trigger = yes
							NOT = { this = scope:char_temp }
						}
					}
				}
			}
		}
	}

	immediate = {
		# Try to grab our actors.
		scope:activity = {
			# T1.
			if = {
				limit = {
					has_activity_option = {
						category = COR_ceremony_option_entertainment
						option = COR_ceremony_entertainment_bad
					}
				}
				# Check for a character who likes the setup.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t1_likes_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t1_hates_trigger = no
					}
					# Failing that, grab anyone valid.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t1_likes_trigger = yes
					}
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_1
				}
				# And for one who dislikes it.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t1_hates_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t1_likes_trigger = no
					}
					# Failing that, grab anyone appropriate.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t1_hates_trigger = yes
					}
					# Failing _that_, grab anyone at all.
					alternative_limit = { COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes }
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_2
				}
			}
			# T2.
			else_if = {
				limit = {
					has_activity_option = {
						category = COR_ceremony_option_entertainment
						option = COR_ceremony_entertainment_normal
					}
				}
				# Check for a character who likes the setup.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t2_likes_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t2_hates_trigger = no
					}
					# Failing that, grab anyone valid.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t2_likes_trigger = yes
					}
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_1
				}
				# And for one who dislikes it.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t2_hates_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t2_likes_trigger = no
					}
					# Failing that, grab anyone appropriate.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t2_hates_trigger = yes
					}
					# Failing _that_, grab anyone at all.
					alternative_limit = { COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes }
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_2
				}
			}
			# T3.
			else = {
				# Check for a character who likes the setup.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t3_likes_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t3_hates_trigger = no
					}
					# Failing that, grab anyone valid.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t3_likes_trigger = yes
					}
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_1
				}
				# And for one who dislikes it.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t3_hates_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t3_likes_trigger = no
					}
					# Failing that, grab anyone appropriate.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0001_entertainment_t3_hates_trigger = yes
					}
					# Failing _that_, grab anyone at all.
					alternative_limit = { COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes }
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_2
				}
			}
		}
		# If relevant, grab our intent target.
		if = {
			limit = { has_activity_intent = murder_attendee_intent }
			intent_target = { save_scope_as = intent_target }
		}
	}

	# Agree with scope:char_1.
	option = {
		name = {
			trigger = {
				NOT = { this = scope:activity.activity_host }
			}
			text = ep2_wedding_ewan.0001.a
		}
		name = {
			trigger = { this = scope:activity.activity_host }
			text = ep2_wedding_ewan.0001.a.host
		}
		flavor = ep2_wedding_ewan.0000.flavour.hobnob.char_1

		# Apply opinion.
		ep2_wedding_ewan_0000_opinion_swap_effect = {
			FAVOURED_CHAR = scope:char_1
			REJECTED_CHAR = scope:char_2
		}
		# Give some lifestyle XP for who you hobnob with.
		ep2_wedding_ewan_0000_award_lifestyle_xp_per_conversationalist_effect = { TARGET = scope:char_1 }

		ep2_wedding_ewan_0000_host_takes_criticism_stress_gain_effect = yes
		ai_chance = {
			base = 1
			ai_value_modifier = { ai_sociability = 1 }
			opinion_modifier = {
				opinion_target = scope:char_1
				multiplier = 0.5
			}
			opinion_modifier = {
				opinion_target = scope:char_2
				multiplier = -0.5
			}
		}
	}
	
	# Agree with scope:char_2.
	option = {
		name = {
			trigger = {
				NOT = { this = scope:activity.activity_host }
			}
			text = ep2_wedding_ewan.0001.b
		}
		name = {
			trigger = { this = scope:activity.activity_host }
			text = ep2_wedding_ewan.0001.b.host
		}
		flavor = ep2_wedding_ewan.0000.flavour.hobnob.char_2

		# Apply opinion.
		ep2_wedding_ewan_0000_opinion_swap_effect = {
			FAVOURED_CHAR = scope:char_2
			REJECTED_CHAR = scope:char_1
		}
		# Give some lifestyle XP for who you hobnob with.
		ep2_wedding_ewan_0000_award_lifestyle_xp_per_conversationalist_effect = { TARGET = scope:char_2 }

		ep2_wedding_ewan_0000_host_takes_criticism_stress_gain_effect = yes
		ai_chance = {
			base = 1
			ai_value_modifier = { ai_sociability = 1 }
			opinion_modifier = {
				opinion_target = scope:char_2
				multiplier = 0.5
			}
			opinion_modifier = {
				opinion_target = scope:char_1
				multiplier = -0.5
			}
		}
	}
	
	# Murder: my eyes are on scope:intent_target.
	option = {
		name = ep2_wedding_ewan.0001.c
		flavor = ep2_wedding_ewan.0001.c.tt
		trigger = { has_activity_intent = murder_attendee_intent }
		custom_tooltip = available_because_intent_tt

		scope:intent_target = {
			# They're unsettled by your staring.
			add_stress = medium_stress_gain
			# Then we add a little concern.
			add_opinion = {
				target = root
				modifier = suspicion_opinion
				opinion = -10
			}
		}

		stress_impact = { vengeful = minor_stress_impact_loss }
		ai_chance = {
			base = 1
			ai_value_modifier = {
				ai_vengefulness = 1
				ai_sociability = -0.5
			}
		}
	}
	
	# Focus on the acts.
	option = {
		name = ep2_wedding_ewan.0001.d

		# Opinion with the activty_host, or else prestige.
		ep2_wedding_ewan_0000_host_approves_effect = yes

		# We give base stress loss for this'un too.
		stress_impact = {
			base = minor_stress_impact_loss
			shy = minor_stress_impact_loss
		}
		ai_chance = {
			base = 1
			ai_value_modifier = {
				ai_energy = -0.5
				ai_sociability = -2
			}
		}
	}
}

##################################################
# Food Fit for a...
# by Ewan Cowhig Croft
# 0011 - 0020
##################################################

# Character likes T1 food.
scripted_trigger ep2_wedding_ewan_0011_food_t1_likes_trigger = {
	OR = {
		# Has more sedate food preferences.
		has_trait = temperate
		# Is ok with an only moderately fancy meal.
		has_trait = humble
		has_trait = content
		# Appreciates something with a few fewer courses than usual
		has_trait = impatient
		# Less food, and less fancy food, means a harder time hiding poisons and other mischiefs.
		has_trait = paranoid
		# Prefers to eat mostly the same food, if possible.
		has_trait = stubborn
	}
}
# Character hates T1 food.
scripted_trigger ep2_wedding_ewan_0011_food_t1_hates_trigger = {
	OR = {
		# Likes plenty of exotic foods.
		has_trait = gluttonous
		# Prefers a large, fancy meal.
		has_trait = arrogant
		has_trait = ambitious
		# Has the patience for incredibly long meals.
		has_trait = patient
		# Doesn't see why they wouldn't have more variety.
		has_trait = trusting
		has_trait = fickle
	}
}
# Character likes T2 food.
scripted_trigger ep2_wedding_ewan_0011_food_t2_likes_trigger = {
	OR = {
		# Accepting of the average.
		has_trait = content
		has_trait = compassionate
		# Likes that money was spent.
		has_trait = generous
		# Likes the atmosphere being high-effort but not _too_ bustling.
		has_trait = calm
		has_trait = patient
		# Likes a middling option.
		has_trait = cynical
	}
}
# Character hates T2 food.
scripted_trigger ep2_wedding_ewan_0011_food_t2_hates_trigger = {
	OR = {
		# Hates the average.
		has_trait = ambitious
		has_trait = arrogant
		# Would have preferred all the money, to take advantage, or else none, not to waste any.
		has_trait = greedy
		# Want a more bustling atmosphere that goes further than this.
		has_trait = wrathful
		has_trait = impatient
		# Feels that if it was worth doing, it's worth doing to its best.
		has_trait = zealous
	}
}
# Character likes T3 food.
scripted_trigger ep2_wedding_ewan_0011_food_t3_likes_trigger = {
	OR = {
		# Likes plenty of exotic foods.
		has_trait = gluttonous
		# Prefers a large, fancy meal.
		has_trait = arrogant
		has_trait = ambitious
		# Has the patience for incredibly long meals.
		has_trait = patient
		# Loves the scope and variety of strange foodstuffs.
		has_trait = trusting
		# Really likes variety and being able to flit.
		has_trait = fickle
	}
}
# Character hates T3 food.
scripted_trigger ep2_wedding_ewan_0011_food_t3_hates_trigger = {
	OR = {
		# Has more sedate food preferences.
		has_trait = temperate
		# Doesn't like showing off this much.
		has_trait = humble
		has_trait = content
		# Can't stand the sheer number of courses.
		has_trait = impatient
		# Less food, and less fancy food, means a harder time hiding poisons and other mischiefs.
		has_trait = paranoid
		# Prefers to eat mostly the same food, if possible.
		has_trait = stubborn
	}
}

#	Connect with various types of characters over the food.
COR_ceremony_ewan.0011 = {
	type = activity_event
	title = ep2_wedding_ewan.0011.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = {
							category = COR_ceremony_option_food
							option = COR_ceremony_food_bad
						}
					}
				}
				desc = {
					desc = ep2_wedding_ewan.0011.desc.intro.bad
					desc = {
						random_valid = {
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = temperate }
								}
								desc = ep2_wedding_ewan.0011.desc.t1.love.temperate
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = humble }
								}
								desc = ep2_wedding_ewan.0011.desc.t1.love.humble
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = content }
								}
								desc = ep2_wedding_ewan.0011.desc.t1.love.content
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = impatient }
								}
								desc = ep2_wedding_ewan.0011.desc.t1.love.impatient
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = paranoid }
								}
								desc = ep2_wedding_ewan.0011.desc.t1.love.paranoid
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = stubborn }
								}
								desc = ep2_wedding_ewan.0011.desc.t1.love.stubborn
							}
						}
					}
				}
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = {
							category = COR_ceremony_option_food
							option = COR_ceremony_food_normal
						}
					}
				}
				desc = {
					desc = COR_ceremony_ewan.0011.desc.intro.normal
					desc = {
						random_valid = {
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = content }
								}
								desc = ep2_wedding_ewan.0011.desc.t2.love.content
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = compassionate }
								}
								desc = ep2_wedding_ewan.0011.desc.t2.love.compassionate
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = generous }
								}
								desc = ep2_wedding_ewan.0011.desc.t2.love.generous
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = calm }
								}
								desc = ep2_wedding_ewan.0011.desc.t2.love.calm
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = patient }
								}
								desc = ep2_wedding_ewan.0011.desc.t2.love.patient
							}
							triggered_desc = {
								trigger = {
									scope:char_1 = { has_trait = cynical }
								}
								desc = ep2_wedding_ewan.0011.desc.t2.love.cynical
							}
						}
					}
				}
			}
			desc = {
				desc = ep2_wedding_ewan.0011.desc.intro.good
				random_valid = {
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = gluttonous }
						}
						desc = ep2_wedding_ewan.0011.desc.t3.love.gluttonous
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = arrogant }
						}
						desc = ep2_wedding_ewan.0011.desc.t3.love.arrogant
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = ambitious }
						}
						desc = ep2_wedding_ewan.0011.desc.t3.love.ambitious
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = patient }
						}
						desc = ep2_wedding_ewan.0011.desc.t3.love.patient
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = trusting }
						}
						desc = ep2_wedding_ewan.0011.desc.t3.love.trusting
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = fickle }
						}
						desc = ep2_wedding_ewan.0011.desc.t3.love.fickle
					}
				}
			}
		}
		desc = ep2_wedding_ewan.0011.desc.midtro
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = {
							category = COR_ceremony_option_food
							option = COR_ceremony_food_bad
						}
					}
				}
				desc = {
					random_valid = {
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = gluttonous }
							}
							desc = ep2_wedding_ewan.0011.desc.t1.hate.gluttonous
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = arrogant }
							}
							desc = ep2_wedding_ewan.0011.desc.t1.hate.arrogant
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = ambitious }
							}
							desc = ep2_wedding_ewan.0011.desc.t1.hate.ambitious
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = patient }
							}
							desc = ep2_wedding_ewan.0011.desc.t1.hate.patient
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = trusting }
							}
							desc = ep2_wedding_ewan.0011.desc.t1.hate.trusting
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = fickle }
							}
							desc = ep2_wedding_ewan.0011.desc.t1.hate.fickle
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = {
									NOR = {
										has_trait = gluttonous
										has_trait = arrogant
										has_trait = ambitious
										has_trait = patient
										has_trait = trusting
										has_trait = fickle
									}
								}
							}
							desc = ep2_wedding_ewan.0000.desc.hate.fallback
						}
					}
				}
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = {
							category = COR_ceremony_option_food
							option = COR_ceremony_food_normal
						}
					}
				}
				desc = {
					random_valid = {
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = ambitious }
							}
							desc = ep2_wedding_ewan.0011.desc.t2.hate.ambitious
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = arrogant }
							}
							desc = ep2_wedding_ewan.0011.desc.t2.hate.arrogant
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = greedy }
							}
							desc = ep2_wedding_ewan.0011.desc.t2.hate.greedy
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = wrathful }
							}
							desc = ep2_wedding_ewan.0011.desc.t2.hate.wrathful
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = impatient }
							}
							desc = ep2_wedding_ewan.0011.desc.t2.hate.impatient
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = zealous }
							}
							desc = ep2_wedding_ewan.0011.desc.t2.hate.zealous
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = {
									NOR = {
										has_trait = ambitious
										has_trait = arrogant
										has_trait = greedy
										has_trait = wrathful
										has_trait = impatient
										has_trait = zealous
									}
								}
							}
							desc = ep2_wedding_ewan.0000.desc.hate.fallback
						}
					}
				}
			}
			desc = {
				random_valid = {
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = temperate }
						}
						desc = ep2_wedding_ewan.0011.desc.t3.hate.temperate
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = humble }
						}
						desc = ep2_wedding_ewan.0011.desc.t3.hate.humble
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = content }
						}
						desc = ep2_wedding_ewan.0011.desc.t3.hate.content
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = impatient }
						}
						desc = ep2_wedding_ewan.0011.desc.t3.hate.impatient
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = paranoid }
						}
						desc = ep2_wedding_ewan.0011.desc.t3.hate.paranoid
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = stubborn }
						}
						desc = ep2_wedding_ewan.0011.desc.t3.hate.stubborn
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = {
								NOR = {
									has_trait = temperate
									has_trait = humble
									has_trait = content
									has_trait = impatient
									has_trait = paranoid
									has_trait = stubborn
								}
							}
						}
						desc = ep2_wedding_ewan.0000.desc.hate.fallback
					}
				}
			}
		}
	}
	theme = feast_activity
	left_portrait = {
		character = scope:char_1
		animation = drink_goblet
	}
	center_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:char_2
		animation = disapproval
	}

	cooldown = { years = 1 }

	trigger = {
		scope:activity = {
			# T1.
			trigger_if = {
				limit = {
					has_activity_option = {
						category = COR_ceremony_option_food
						option = COR_ceremony_food_bad
					}
				}
				# Check for a character who likes the setup.
				any_attending_character = {
					COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
					ep2_wedding_ewan_0011_food_t1_likes_trigger = yes
					# Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup.
					save_temporary_scope_as = char_temp
					scope:activity = {
						any_attending_character = {
							COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
							ep2_wedding_ewan_0011_food_t1_hates_trigger = yes
							NOT = { this = scope:char_temp }
						}
					}
				}
			}
			# T2.
			trigger_else_if = {
				limit = {
					has_activity_option = {
						category = COR_ceremony_option_food
						option = COR_ceremony_food_normal
					}
				}
				# Check for a character who likes the setup.
				any_attending_character = {
					COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
					ep2_wedding_ewan_0011_food_t2_likes_trigger = yes
					# Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup.
					save_temporary_scope_as = char_temp
					scope:activity = {
						any_attending_character = {
							COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
							ep2_wedding_ewan_0011_food_t2_hates_trigger = yes
							NOT = { this = scope:char_temp }
						}
					}
				}
			}
			# T3.
			trigger_else = {
				# Check for a character who likes the setup.
				any_attending_character = {
					COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
					ep2_wedding_ewan_0011_food_t3_likes_trigger = yes
					# Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup.
					save_temporary_scope_as = char_temp
					scope:activity = {
						any_attending_character = {
							COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
							ep2_wedding_ewan_0011_food_t3_hates_trigger = yes
							NOT = { this = scope:char_temp }
						}
					}
				}
			}
		}
	}

	immediate = {
		scope:activity = {
			# Try to grab our actors.
			## T1.
			if = {
				limit = {
					has_activity_option = {
						category = COR_ceremony_option_food
						option = COR_ceremony_food_bad
					}
				}
				# Check for a character who likes the setup.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0011_food_t1_likes_trigger = yes
						ep2_wedding_ewan_0011_food_t1_hates_trigger = no
					}
					# Failing that, grab anyone valid.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0011_food_t1_likes_trigger = yes
					}
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_1
				}
				# And for one who dislikes it.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0011_food_t1_hates_trigger = yes
						ep2_wedding_ewan_0011_food_t1_likes_trigger = no
					}
					# Failing that, grab anyone appropriate.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0011_food_t1_hates_trigger = yes
					}
					# Failing _that_, grab anyone at all.
					alternative_limit = { COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes }
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_2
				}
			}
			## T2.
			else_if = {
				limit = {
					has_activity_option = {
						category = COR_ceremony_option_food
						option = COR_ceremony_food_normal
					}
				}
				# Check for a character who likes the setup.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0011_food_t2_likes_trigger = yes
						ep2_wedding_ewan_0011_food_t2_hates_trigger = no
					}
					# Failing that, grab anyone valid.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0011_food_t2_likes_trigger = yes
					}
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_1
				}
				# And for one who dislikes it.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0011_food_t2_hates_trigger = yes
						ep2_wedding_ewan_0011_food_t2_likes_trigger = no
					}
					# Failing that, grab anyone appropriate.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0011_food_t2_hates_trigger = yes
					}
					# Failing _that_, grab anyone at all.
					alternative_limit = { COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes }
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_2
				}
			}
			## T3.
			else = {
				# Check for a character who likes the setup.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0011_food_t3_likes_trigger = yes
						ep2_wedding_ewan_0011_food_t3_hates_trigger = no
					}
					# Failing that, grab anyone valid.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0011_food_t3_likes_trigger = yes
					}
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_1
				}
				# And for one who dislikes it.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0011_food_t3_hates_trigger = yes
						ep2_wedding_ewan_0011_food_t3_likes_trigger = no
					}
					# Failing that, grab anyone appropriate.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0011_food_t3_hates_trigger = yes
					}
					# Failing _that_, grab anyone at all.
					alternative_limit = { COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes }
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_2
				}
			}
			# Now we try to process a decent activity target.
			if = {
				limit = {
					root = { has_activity_intent = banquet_mischief_intent }
				}
				ordered_attending_character = {
					limit = {
						NOR = {
							this = root
							this = scope:char_1
							this = scope:char_2
							this = scope:activity.special_guest:COR_coronator
							this = scope:host
						}
						# No players.
						is_ai = yes
					}
					order_by = {
						# Nab _something_ like opinion.
						add = calc_rough_root_opinion_value
						# Invert it, as we want characters who hate us ranked first.
						multiply = -1
						# Aaaand multiply by tier to get more interesting characters who hate us.
						if = {
							# Unlanded have a rank of zero, so filter this a bit.
							limit = { is_landed = yes }
							multiply = highest_held_title_tier
						}
					}
					save_scope_as = intent_target
				}
			}
		}
	}

	# Agree with scope:char_1.
	option = {
		name = {
			trigger = {
				NOT = { this = scope:activity.activity_host }
			}
			text = ep2_wedding_ewan.0011.a
		}
		name = {
			trigger = { this = scope:activity.activity_host }
			text = ep2_wedding_ewan.0011.a.host
		}
		flavor = ep2_wedding_ewan.0000.flavour.hobnob.char_1

		# Apply opinion.
		ep2_wedding_ewan_0000_opinion_swap_effect = {
			FAVOURED_CHAR = scope:char_1
			REJECTED_CHAR = scope:char_2
		}
		# Give some lifestyle XP for who you hobnob with.
		ep2_wedding_ewan_0000_award_lifestyle_xp_per_conversationalist_effect = { TARGET = scope:char_1 }

		ep2_wedding_ewan_0000_host_takes_criticism_stress_gain_effect = yes
		ai_chance = {
			base = 1
			ai_value_modifier = { ai_sociability = 1 }
			opinion_modifier = {
				opinion_target = scope:char_1
				multiplier = 0.5
			}
			opinion_modifier = {
				opinion_target = scope:char_2
				multiplier = -0.5
			}
		}
	}
	
	# Agree with scope:char_2.
	option = {
		name = {
			trigger = {
				NOT = { this = scope:activity.activity_host }
			}
			text = ep2_wedding_ewan.0011.b
		}
		name = {
			trigger = { this = scope:activity.activity_host }
			text = ep2_wedding_ewan.0011.b.host
		}
		flavor = ep2_wedding_ewan.0000.flavour.hobnob.char_2

		# Apply opinion.
		ep2_wedding_ewan_0000_opinion_swap_effect = {
			FAVOURED_CHAR = scope:char_2
			REJECTED_CHAR = scope:char_1
		}
		# Give some lifestyle XP for who you hobnob with.
		ep2_wedding_ewan_0000_award_lifestyle_xp_per_conversationalist_effect = { TARGET = scope:char_2 }

		ep2_wedding_ewan_0000_host_takes_criticism_stress_gain_effect = yes
		ai_chance = {
			base = 1
			ai_value_modifier = { ai_sociability = 1 }
			opinion_modifier = {
				opinion_target = scope:char_2
				multiplier = 0.5
			}
			opinion_modifier = {
				opinion_target = scope:char_1
				multiplier = -0.5
			}
		}
	}
	
	# Mischief: spill something on someone.
	option = {
		name = ep2_wedding_ewan.0011.c
		# Check for target directly, rather than just the intent, because there isn't a pre-defined intent target and we may have failed to acquire someone suitable.
		trigger = { exists = scope:intent_target }
		custom_tooltip = available_because_intent_tt

		# You try to trip a server onto someone.
		duel = {
			skill = intrigue
			target = scope:intent_target
			# You're successful.
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 10
				desc = ep2_wedding_ewan.0011.c.tt.success
				send_interface_toast = {
					title = ep2_wedding_ewan.0011.c.tt.success
					left_icon = scope:intent_target
					scope:intent_target = {
						# Lose some prestige.
						add_prestige = minor_prestige_loss
						# Gain some stress.
						add_stress = medium_stress_gain
					}
				}
			}
			# The server rights themselves.
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 10
				desc = ep2_wedding_ewan.0011.c.tt.failure
				send_interface_toast = {
					title = ep2_wedding_ewan.0011.c.tt.failure
					left_icon = scope:intent_target
					# Considered borish.
					add_prestige = miniscule_prestige_loss
					# Plus scope:intent_target notices.
					reverse_add_opinion = {
						target = scope:intent_target
						modifier = suspicion_opinion
						opinion = -10
					}
				}
			}
		}

		# We give base stress loss for this'un too.
		stress_impact = {
			base = medium_stress_impact_loss
			deceitful = minor_stress_impact_loss
			honest = miniscule_stress_impact_gain
		}
		ai_chance = {
			base = 1
			ai_value_modifier = {
				ai_boldness = 0.5
				ai_compassion = -0.25
				ai_rationality = -0.25
			}
		}
	}
	
	# Nod along without paying attention.
	option = {
		name = ep2_wedding_ewan.0011.d

		# Opinion with the activty_host, or else prestige.
		ep2_wedding_ewan_0000_host_approves_effect = yes

		# We give base stress loss for this'un too.
		stress_impact = {
			base = minor_stress_impact_loss
			shy = minor_stress_impact_loss
			eccentric = minor_stress_impact_gain
		}
		ai_chance = {
			base = 1
			ai_value_modifier = {
				ai_energy = -0.5
				ai_sociability = -2
			}
		}
	}
}

##################################################
# Shimmering, Shining
# by Ewan Cowhig Croft
# 0021 - 0030
##################################################

# Character likes T1 decorations.
scripted_trigger ep2_wedding_ewan_0021_decoration_t1_likes_trigger = {
	OR = {
		# Appreciate it for being low-key.
		has_trait = content
		has_trait = lazy
		has_trait = humble
		# Understand that effort still went into it.
		has_trait = forgiving
		has_trait = compassionate
		# Contrarian.
		has_trait = arbitrary
		# Approves of frugality.
		has_trait = greedy
	}
}
# Character hates T1 decorations.
scripted_trigger ep2_wedding_ewan_0021_decoration_t1_hates_trigger = {
	OR = {
		# Hates it for being low-key.
		has_trait = ambitious
		has_trait = diligent
		has_trait = arrogant
		# Thinks they could've done better or not hyped it up so much.
		has_trait = honest
		has_trait = generous
		# Thinks it's just not what they expected.
		has_trait = just
	}
}
# Character likes T2 decorations.
scripted_trigger ep2_wedding_ewan_0021_decoration_t2_likes_trigger = {
	OR = {
		# Accepting of the average.
		has_trait = content
		has_trait = compassionate
		# Likes that money was spent.
		has_trait = generous
		# Likes the atmosphere being high-effort but not _too_ bustling.
		has_trait = calm
		has_trait = patient
		# Likes a middling option.
		has_trait = fickle
		has_trait = cynical
	}
}
# Character hates T2 decorations.
scripted_trigger ep2_wedding_ewan_0021_decoration_t2_hates_trigger = {
	OR = {
		# Hates the average.
		has_trait = ambitious
		has_trait = arrogant
		# Would have preferred all the money, to take advantage, or else none, not to waste any.
		has_trait = greedy
		# Want a more bustling atmosphere that goes further than this.
		has_trait = wrathful
		has_trait = impatient
		# Feels that if it was worth doing, it's worth doing to its best.
		has_trait = stubborn
		has_trait = zealous
	}
}
# Character likes T3 decorations.
scripted_trigger ep2_wedding_ewan_0021_decoration_t3_likes_trigger = {
	OR = {
		# Loves an over-the-top wedding.
		has_trait = ambitious
		has_trait = diligent
		has_trait = arrogant
		# Think it had the appropriate amount of effort put in.
		has_trait = honest
		has_trait = just
		# Happy to see all the money being spent.
		has_trait = greedy
		has_trait = generous
	}
}
# Character hates T3 decorations.
scripted_trigger ep2_wedding_ewan_0021_decoration_t3_hates_trigger = {
	OR = {
		# Think this might all be a bit much.
		has_trait = content
		has_trait = lazy
		has_trait = humble
		# Worry that the marriage is getting lost amidst all of this pomp.
		has_trait = compassionate
		# Contrarian.
		has_trait = arbitrary
	}
}

#	Connect with various types of characters over the venue & its decorations.
COR_ceremony_ewan.0021 = {
	type = activity_event
	title = ep2_wedding_ewan.0021.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = {
							category = COR_ceremony_option_decoration
							option = COR_ceremony_decoration_bad
						}
					}
				}
				desc = {
					desc = ep2_wedding_ewan.0021.desc.intro.bad
					random_valid = {
						triggered_desc = {
							trigger = {
								scope:char_1 = { has_trait = lazy }
							}
							desc = ep2_wedding_ewan.0021.desc.t1.love.lazy
						}
						triggered_desc = {
							trigger = {
								scope:char_1 = { has_trait = humble }
							}
							desc = ep2_wedding_ewan.0021.desc.t1.love.humble
						}
						triggered_desc = {
							trigger = {
								scope:char_1 = { has_trait = forgiving }
							}
							desc = ep2_wedding_ewan.0021.desc.t1.love.forgiving
						}
						triggered_desc = {
							trigger = {
								scope:char_1 = { has_trait = compassionate }
							}
							desc = ep2_wedding_ewan.0021.desc.t1.love.compassionate
						}
						triggered_desc = {
							trigger = {
								scope:char_1 = { has_trait = arbitrary }
							}
							desc = ep2_wedding_ewan.0021.desc.t1.love.arbitrary
						}
						triggered_desc = {
							trigger = {
								scope:char_1 = { has_trait = greedy }
							}
							desc = ep2_wedding_ewan.0021.desc.t1.love.greedy
						}
					}
				}
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = {
							category = COR_ceremony_option_decoration
							option = COR_ceremony_decoration_normal
						}
					}
				}
				desc = {
					desc = ep2_wedding_ewan.0021.desc.intro.normal
					random_valid = {
						triggered_desc = {
							trigger = {
								scope:char_1 = { has_trait = content }
							}
							desc = ep2_wedding_ewan.0021.desc.t2.love.content
						}
						triggered_desc = {
							trigger = {
								scope:char_1 = { has_trait = compassionate }
							}
							desc = ep2_wedding_ewan.0021.desc.t2.love.compassionate
						}
						triggered_desc = {
							trigger = {
								scope:char_1 = { has_trait = generous }
							}
							desc = ep2_wedding_ewan.0021.desc.t2.love.generous
						}
						triggered_desc = {
							trigger = {
								scope:char_1 = { has_trait = calm }
							}
							desc = ep2_wedding_ewan.0021.desc.t2.love.calm
						}
						triggered_desc = {
							trigger = {
								scope:char_1 = { has_trait = patient }
							}
							desc = ep2_wedding_ewan.0021.desc.t2.love.patient
						}
						triggered_desc = {
							trigger = {
								scope:char_1 = { has_trait = fickle }
							}
							desc = ep2_wedding_ewan.0021.desc.t2.love.fickle
						}
						triggered_desc = {
							trigger = {
								scope:char_1 = { has_trait = cynical }
							}
							desc = ep2_wedding_ewan.0021.desc.t2.love.cynical
						}
					}
				}
			}
			desc = {
				desc = ep2_wedding_ewan.0021.desc.intro.good
				random_valid = {
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = ambitious }
						}
						desc = COR_ceremony_ewan.0021.desc.t3.love.ambitious
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = diligent }
						}
						desc = ep2_wedding_ewan.0021.desc.t3.love.diligent
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = arrogant }
						}
						desc = ep2_wedding_ewan.0021.desc.t3.love.arrogant
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = honest }
						}
						desc = ep2_wedding_ewan.0021.desc.t3.love.honest
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = just }
						}
						desc = ep2_wedding_ewan.0021.desc.t3.love.just
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = greedy }
						}
						desc = ep2_wedding_ewan.0021.desc.t3.love.greedy
					}
					triggered_desc = {
						trigger = {
							scope:char_1 = { has_trait = generous }
						}
						desc = ep2_wedding_ewan.0021.desc.t3.love.generous
					}
				}
			}
		}
		desc = ep2_wedding_ewan.0021.desc.midtro
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = {
							category = COR_ceremony_option_decoration
							option = COR_ceremony_decoration_bad
						}
					}
				}
				desc = {
					random_valid = {
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = ambitious }
							}
							desc = ep2_wedding_ewan.0021.desc.t1.hate.ambitious
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = diligent }
							}
							desc = ep2_wedding_ewan.0021.desc.t1.hate.diligent
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = arrogant }
							}
							desc = ep2_wedding_ewan.0021.desc.t1.hate.arrogant
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = honest }
							}
							desc = ep2_wedding_ewan.0021.desc.t1.hate.honest
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = generous }
							}
							desc = ep2_wedding_ewan.0021.desc.t1.hate.generous
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = just }
							}
							desc = ep2_wedding_ewan.0021.desc.t1.hate.just
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = {
									NOR = {
										has_trait = ambitious
										has_trait = diligent
										has_trait = arrogant
										has_trait = honest
										has_trait = generous
										has_trait = just
									}
								}
							}
							desc = ep2_wedding_ewan.0000.desc.hate.fallback
						}
					}
				}
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = {
							category = COR_ceremony_option_decoration
							option = COR_ceremony_decoration_normal
						}
					}
				}
				desc = {
					random_valid = {
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = ambitious }
							}
							desc = ep2_wedding_ewan.0021.desc.t2.hate.ambitious
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = arrogant }
							}
							desc = ep2_wedding_ewan.0021.desc.t2.hate.arrogant
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = greedy }
							}
							desc = ep2_wedding_ewan.0021.desc.t2.hate.greedy
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = wrathful }
							}
							desc = ep2_wedding_ewan.0021.desc.t2.hate.wrathful
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = impatient }
							}
							desc = ep2_wedding_ewan.0021.desc.t2.hate.impatient
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = stubborn }
							}
							desc = ep2_wedding_ewan.0021.desc.t2.hate.stubborn
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = { has_trait = zealous }
							}
							desc = ep2_wedding_ewan.0021.desc.t2.hate.zealous
						}
						triggered_desc = {
							trigger = {
								scope:char_2 = {
									NOR = {
										has_trait = ambitious
										has_trait = arrogant
										has_trait = greedy
										has_trait = wrathful
										has_trait = impatient
										has_trait = stubborn
										has_trait = zealous
									}
								}
							}
							desc = ep2_wedding_ewan.0000.desc.hate.fallback
						}
					}
				}
			}
			desc = {
				random_valid = {
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = content }
						}
						desc = ep2_wedding_ewan.0021.desc.t3.hate.content
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = lazy }
						}
						desc = ep2_wedding_ewan.0021.desc.t3.hate.lazy
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = humble }
						}
						desc = ep2_wedding_ewan.0021.desc.t3.hate.humble
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = compassionate }
						}
						desc = ep2_wedding_ewan.0021.desc.t3.hate.compassionate
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = { has_trait = arbitrary }
						}
						desc = ep2_wedding_ewan.0021.desc.t3.hate.arbitrary
					}
					triggered_desc = {
						trigger = {
							scope:char_2 = {
								NOR = {
									has_trait = content
									has_trait = lazy
									has_trait = humble
									has_trait = compassionate
									has_trait = arbitrary
								}
							}
						}
						desc = ep2_wedding_ewan.0000.desc.hate.fallback
					}
				}
			}
		}
	}
	theme = feast_activity
	left_portrait = {
		character = scope:char_1
		animation = admiration
	}
	center_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:char_2
		animation = disapproval
	}

	cooldown = { years = 1 }

	trigger = {
		scope:activity = {
			# T1.
			trigger_if = {
				limit = {
					has_activity_option = {
						category = COR_ceremony_option_decoration
						option = COR_ceremony_decoration_bad
					}
				}
				# Check for a character who likes the setup.
				any_attending_character = {
					COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
					ep2_wedding_ewan_0021_decoration_t1_likes_trigger = yes
					# Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup.
					save_temporary_scope_as = char_temp
					scope:activity = {
						any_attending_character = {
							COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
							ep2_wedding_ewan_0021_decoration_t1_hates_trigger = yes
							NOT = { this = scope:char_temp }
						}
					}
				}
			}
			# T2.
			trigger_else_if = {
				limit = {
					has_activity_option = {
						category = COR_ceremony_option_decoration
						option = COR_ceremony_decoration_normal
					}
				}
				# Check for a character who likes the setup.
				any_attending_character = {
					COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
					ep2_wedding_ewan_0021_decoration_t2_likes_trigger = yes
					# Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup.
					save_temporary_scope_as = char_temp
					scope:activity = {
						any_attending_character = {
							COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
							ep2_wedding_ewan_0021_decoration_t2_hates_trigger = yes
							NOT = { this = scope:char_temp }
						}
					}
				}
			}
			# T3.
			trigger_else = {
				# Check for a character who likes the setup.
				any_attending_character = {
					COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
					ep2_wedding_ewan_0021_decoration_t3_likes_trigger = yes
					# Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup.
					save_temporary_scope_as = char_temp
					scope:activity = {
						any_attending_character = {
							COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
							ep2_wedding_ewan_0021_decoration_t3_hates_trigger = yes
							NOT = { this = scope:char_temp }
						}
					}
				}
			}
		}
	}

	immediate = {
		# Try to grab our actors.
		scope:activity = {
			# T1.
			if = {
				limit = {
					has_activity_option = {
						category = COR_ceremony_option_decoration
						option = COR_ceremony_decoration_bad
					}
				}
				# Check for a character who likes the setup.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0021_decoration_t1_likes_trigger = yes
						ep2_wedding_ewan_0021_decoration_t1_hates_trigger = no
					}
					# Failing that, grab anyone valid.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0021_decoration_t1_likes_trigger = yes
					}
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_1
				}
				# And for one who dislikes it.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0021_decoration_t1_hates_trigger = yes
						ep2_wedding_ewan_0021_decoration_t1_likes_trigger = no
					}
					# Failing that, grab anyone appropriate.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0021_decoration_t1_hates_trigger = yes
					}
					# Failing _that_, grab anyone at all.
					alternative_limit = { COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes }
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_2
				}
			}
			# T2.
			else_if = {
				limit = {
					has_activity_option = {
						category = COR_ceremony_option_decoration
						option = COR_ceremony_decoration_normal
					}
				}
				# Check for a character who likes the setup.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0021_decoration_t2_likes_trigger = yes
						ep2_wedding_ewan_0021_decoration_t2_hates_trigger = no
					}
					# Failing that, grab anyone valid.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0021_decoration_t2_likes_trigger = yes
					}
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_1
				}
				# And for one who dislikes it.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0021_decoration_t2_hates_trigger = yes
						ep2_wedding_ewan_0021_decoration_t2_likes_trigger = no
					}
					# Failing that, grab anyone appropriate.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0021_decoration_t2_hates_trigger = yes
					}
					# Failing _that_, grab anyone at all.
					alternative_limit = { COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes }
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_2
				}
			}
			# T3.
			else = {
				# Check for a character who likes the setup.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0021_decoration_t3_likes_trigger = yes
						ep2_wedding_ewan_0021_decoration_t3_hates_trigger = no
					}
					# Failing that, grab anyone valid.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0021_decoration_t3_likes_trigger = yes
					}
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_1
				}
				# And for one who dislikes it.
				ordered_attending_character = {
					# Try to grab opposing characters first.
					limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0021_decoration_t3_hates_trigger = yes
						ep2_wedding_ewan_0021_decoration_t3_likes_trigger = no
					}
					# Failing that, grab anyone appropriate.
					alternative_limit = {
						COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes
						ep2_wedding_ewan_0021_decoration_t3_hates_trigger = yes
					}
					# Failing _that_, grab anyone at all.
					alternative_limit = { COR_ceremony_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes }
					# Make sure we're looking at interesting people.
					order_by = highest_held_title_tier
					save_scope_as = char_2
				}
			}
		}
	}

	# Agree with scope:char_1.
	option = {
		name = {
			trigger = {
				NOT = { this = scope:activity.activity_host }
			}
			text = ep2_wedding_ewan.0021.a
		}
		name = {
			trigger = { this = scope:activity.activity_host }
			text = ep2_wedding_ewan.0021.a.host
		}
		flavor = ep2_wedding_ewan.0000.flavour.hobnob.char_1

		# Apply opinion.
		ep2_wedding_ewan_0000_opinion_swap_effect = {
			FAVOURED_CHAR = scope:char_1
			REJECTED_CHAR = scope:char_2
		}
		# Give some lifestyle XP for who you hobnob with.
		ep2_wedding_ewan_0000_award_lifestyle_xp_per_conversationalist_effect = { TARGET = scope:char_1 }

		ep2_wedding_ewan_0000_host_takes_criticism_stress_gain_effect = yes
		ai_chance = {
			base = 1
			ai_value_modifier = { ai_sociability = 1 }
			opinion_modifier = {
				opinion_target = scope:char_1
				multiplier = 0.5
			}
			opinion_modifier = {
				opinion_target = scope:char_2
				multiplier = -0.5
			}
		}
	}
	
	# Agree with scope:char_2.
	option = {
		name = {
			trigger = {
				NOT = { this = scope:activity.activity_host }
			}
			text = ep2_wedding_ewan.0021.b
		}
		name = {
			trigger = { this = scope:activity.activity_host }
			text = ep2_wedding_ewan.0021.b.host
		}
		flavor = ep2_wedding_ewan.0000.flavour.hobnob.char_2

		# Apply opinion.
		ep2_wedding_ewan_0000_opinion_swap_effect = {
			FAVOURED_CHAR = scope:char_2
			REJECTED_CHAR = scope:char_1
		}
		# Give some lifestyle XP for who you hobnob with.
		ep2_wedding_ewan_0000_award_lifestyle_xp_per_conversationalist_effect = { TARGET = scope:char_2 }

		ep2_wedding_ewan_0000_host_takes_criticism_stress_gain_effect = yes
		ai_chance = {
			base = 1
			ai_value_modifier = { ai_sociability = 1 }
			opinion_modifier = {
				opinion_target = scope:char_2
				multiplier = 0.5
			}
			opinion_modifier = {
				opinion_target = scope:char_1
				multiplier = -0.5
			}
		}
	}
	
	# Don't get involved.
	option = {
		name = ep2_wedding_ewan.0021.d

		# Opinion with the activty_host, or else prestige.
		ep2_wedding_ewan_0000_host_approves_effect = yes

		# We give base stress loss for this'un too.
		stress_impact = {
			base = minor_stress_impact_loss
			shy = minor_stress_impact_loss
		}
		ai_chance = {
			base = 1
			ai_value_modifier = {
				ai_energy = -0.5
				ai_sociability = -2
			}
		}
	}
}

##################################################
# A Sociable Supper
# by Ewan Cowhig Croft
# 0031 - 0040
##################################################

scripted_trigger ep2_wedding_ewan_0031_appropriate_ruler_trigger = {
	# Are they an appropriately landed ruler?
	highest_held_title_tier >= {
		# Grab root's tier.
		value = root.highest_held_title_tier
		# Now subtract one so that we allow for direct vassals.
		add = -1
		# Counts & above only.
		min = 2
	}
	# Make sure they don't hate root's guts already?
	opinion = {
		target = root
		value >= high_negative_opinion
	}
	NOR = {
		# No family.
		is_close_family_of = root
		is_consort_of = root
		# No prior relations.
		has_any_good_relationship_with_character_trigger  = { CHARACTER = root }
		has_any_bad_relationship_with_character_trigger  = { CHARACTER = root }
	}
	# No players.
	is_ai = no
}

scripted_effect ep2_wedding_ewan_0031_social_climber_stress_effect = {
	stress_impact = {
		gregarious = minor_stress_impact_loss
		ambitious = minor_stress_impact_loss
		shy = miniscule_stress_impact_gain
		content = miniscule_stress_impact_gain
	}
}

scripted_effect ep2_wedding_ewan_0031_make_friend_effect = {
	# Become friends.
	set_relation_friend = {
		target = $TARGET$
		reason = befriended_at_feast
		province = scope:activity.activity_location
	}
	# Plus some opinion for the sake of it.
	reverse_add_opinion = {
		target = $TARGET$
		modifier = friendliness_opinion
		opinion = 5
	}
}

#	Meet one of your neighbouring rulers and form a fast friendship.
COR_ceremony_ewan.0031 = {
	type = activity_event
	title = ep2_wedding_ewan.0031.t
	desc = {
		desc = ep2_wedding_ewan.0031.desc.intro
		# Our first character.
		first_valid = {
			triggered_desc = {
				trigger = {  scope:conversationalist_neighbour ?= scope:char_1 }
				desc = ep2_wedding_ewan.0031.desc.char_1.conversationalist_neighbour
			}
			triggered_desc = {
				trigger = {  scope:conversationalist_covassal ?= scope:char_1 }
				desc = ep2_wedding_ewan.0031.desc.char_1.conversationalist_covassal
			}
			triggered_desc = {
				trigger = {  scope:conversationalist_vassal ?= scope:char_1 }
				desc = ep2_wedding_ewan.0031.desc.char_1.conversationalist_vassal
			}
			triggered_desc = {
				trigger = {  scope:conversationalist_liege ?= scope:char_1 }
				desc = ep2_wedding_ewan.0031.desc.char_1.conversationalist_liege
			}
			triggered_desc = {
				trigger = {  scope:conversationalist_other_ruler ?= scope:char_1 }
				desc = ep2_wedding_ewan.0031.desc.char_1.conversationalist_other_ruler
			}
			triggered_desc = {
				trigger = {  scope:conversationalist_backup ?= scope:char_1 }
				desc = ep2_wedding_ewan.0031.desc.char_1.conversationalist_backup
			}
		}
		desc = ep2_wedding_ewan.0031.desc.midro
		# Our second character.
		first_valid = {
			triggered_desc = {
				trigger = {  scope:conversationalist_neighbour ?= scope:char_2 }
				desc = ep2_wedding_ewan.0031.desc.char_2.conversationalist_neighbour
			}
			triggered_desc = {
				trigger = {  scope:conversationalist_covassal ?= scope:char_2 }
				desc = ep2_wedding_ewan.0031.desc.char_2.conversationalist_covassal
			}
			triggered_desc = {
				trigger = {  scope:conversationalist_vassal ?= scope:char_2 }
				desc = ep2_wedding_ewan.0031.desc.char_2.conversationalist_vassal
			}
			triggered_desc = {
				trigger = {  scope:conversationalist_liege ?= scope:char_2 }
				desc = ep2_wedding_ewan.0031.desc.char_2.conversationalist_liege
			}
			triggered_desc = {
				trigger = {  scope:conversationalist_other_ruler ?= scope:char_2 }
				desc = ep2_wedding_ewan.0031.desc.char_2.conversationalist_other_ruler
			}
			triggered_desc = {
				trigger = {  scope:conversationalist_backup ?= scope:char_2 }
				desc = ep2_wedding_ewan.0031.desc.char_2.conversationalist_backup
			}
		}
		desc = ep2_wedding_ewan.0031.desc.outro
	}
	theme = feast_activity
	left_portrait = {
		character = scope:char_1
		animation = boredom
	}
	right_portrait = {
		character = scope:char_2
		animation = happiness
	}

	cooldown = { years = 1 }

	trigger = {
		scope:activity = {
			any_attending_character = {
				count >= 2
				ep2_wedding_ewan_0031_appropriate_ruler_trigger = yes
			}
		}
	}

	weight_multiplier = {
		base = 1
		
		# We don't want the AI to spam-befriend people via this event too much, so we weight it down for them.
		modifier = {
			add = -0.75
			is_ai = yes
		}
	}

	immediate = {
		# Let's pick some characters!
		## First, grab everyone we might want to pick through.
		scope:activity = {
			every_attending_character = {
				limit = { ep2_wedding_ewan_0031_appropriate_ruler_trigger = yes }
				add_to_list = potential_conversationalists_list
			}
		}
		## Now, we need to try and filter them out by categories.
		### Neighbouring rulers.
		#### This one is expensive, so we restrict it to players.
		if = {
			limit = { is_ai = no }
			# Right, we're actually going to post-filter by these guys later on too, so we want to grab all of them the first time we iterate rather than do it twice.
			every_in_list = {
				list = potential_conversationalists_list
				limit = {
					OR = {
						any_neighboring_and_across_water_realm_same_rank_owner = { this = root }
						any_neighboring_and_across_water_top_liege_realm_owner = { this = root }
					}
				}
				add_to_list = neighbouring_conversationalists_list
			}
			# Now we can go through and grab the best one.
			ordered_in_list = {
				list = neighbouring_conversationalists_list
				# Order by military strength for the most interesting realpolitik choice.
				order_by = max_military_strength
				# Grab the most suitable for later checks & randomisation.
				save_scope_as = conversationalist_neighbour
				add_to_list = contending_characters_list
			}
		}
		### Fellow vassals or one of your lieges.
		#### No point iterating through the list repeatedly if we aren't independent.
		if = {
			limit = { exists = liege }
			# Fellow vassals.
			ordered_in_list = {
				list = potential_conversationalists_list
				limit = { liege ?= root.liege }
				# Order by military strength for the most interesting realpolitik choice.
				order_by = max_military_strength
				# Grab the most suitable for later checks & randomisation.
				save_scope_as = conversationalist_covassal
				add_to_list = contending_characters_list
			}
			# Lieges.
			ordered_in_list = {
				list = potential_conversationalists_list
				limit = {
					save_temporary_scope_as = char_temp
					root = {
						any_liege_or_above = { this = scope:char_temp }
					}
				}
				# Lieges use a slightly weirder prio-order, since their military strength is less relevant.
				order_by = {
					# We want to befriend the most powerful person we can, as they're the most interesting.
					value = highest_held_title_tier
					# _But_, your direct liege is still the best, as they have much more impact on your general rule.
					if = {
						limit = { this = root.liege }
						add = 10
					}
				}
				# Grab the most suitable for later checks & randomisation.
				save_scope_as = conversationalist_liege
				add_to_list = contending_characters_list
			}
		}
		### Direct vassals.
		ordered_in_list = {
			list = potential_conversationalists_list
			limit = { liege ?= root }
			# Order by military strength for the most interesting realpolitik choice.
			order_by = max_military_strength
			# Grab the most suitable for later checks & randomisation.
			save_scope_as = conversationalist_vassal
			add_to_list = contending_characters_list
		}
		### Distant rulers.
		ordered_in_list = {
			list = potential_conversationalists_list
			limit = {
				NOR = {
					top_liege = root.top_liege
					# If we don't have a neighbouring conversationalists list, then this allows the AI to befriend non-realm rulers, and if we do, then this stops us checking through all that smeg again.
					trigger_if = {
						limit = {
							any_in_list = {
								list = neighbouring_conversationalists_list
								count >= 1
							}
						}
						is_in_list = neighbouring_conversationalists_list
					}
				}
			}
			# Order by military strength for the most interesting realpolitik choice.
			order_by = max_military_strength
			# Grab the most suitable for later checks & randomisation.
			save_scope_as = conversationalist_other_ruler
			add_to_list = contending_characters_list
		}
		## If we didn't have multiple interesting categories, generate a backup.
		if = {
			limit = {
				calc_true_if = {
					amount <= 1
					NOT = { exists = scope:conversationalist_neighbour }
					NOT = { exists = scope:conversationalist_covassal }
					NOT = { exists = scope:conversationalist_vassal }
					NOT = { exists = scope:conversationalist_liege }
					NOT = { exists = scope:conversationalist_other_ruler }
				}
			}
			ordered_in_list = {
				list = potential_conversationalists_list
				limit = {
					NOR = {
						scope:conversationalist_neighbour ?= this
						scope:conversationalist_covassal ?= this
						scope:conversationalist_vassal ?= this
						scope:conversationalist_liege ?= this
						scope:conversationalist_other_ruler ?= this
					}
				}
				# Grab the most suitable for later checks & randomisation.
				save_scope_as = conversationalist_backup
				add_to_list = contending_characters_list
			}
		}
		# Ok, characters are assembled. Grab our favourite candidates.
		## Grab one.
		random_in_list = {
			list = contending_characters_list
			# This character isn't having a great time at the party, so we try to pick the less sociable char first.
			limit = { has_trait = shy }
			alternative_limit = {
				NOT = { has_trait = gregarious }
			}
			alternative_limit = { always = yes }
			save_scope_as = char_1
		}
		## Then another.
		random_in_list = {
			list = contending_characters_list
			limit = {
				NOT = { this = scope:char_1 }
				# No trait checks needed here — there's only one character remaining in the list now.
			}
			save_scope_as = char_2
		}
	}

	# Neighbouring ruler.
	option = {
		name = ep2_wedding_ewan.0031.a
		trigger = {
			OR = {
				scope:conversationalist_neighbour ?= scope:char_1
				scope:conversationalist_neighbour ?= scope:char_2
			}
		}

		# Become friends.
		ep2_wedding_ewan_0031_make_friend_effect = { TARGET = scope:conversationalist_neighbour }

		ep2_wedding_ewan_0031_social_climber_stress_effect = yes
		ai_chance = {
			base = 1
			ai_value_modifier = { ai_sociability = 1 }
			opinion_modifier = { opinion_target = scope:conversationalist_neighbour }
		}
	}
	
	# Fellow vassal.
	option = {
		name = ep2_wedding_ewan.0031.b
		trigger = {
			OR = {
				scope:conversationalist_covassal ?= scope:char_1
				scope:conversationalist_covassal ?= scope:char_2
			}
		}

		# Become friends.
		ep2_wedding_ewan_0031_make_friend_effect = { TARGET = scope:conversationalist_covassal }

		ep2_wedding_ewan_0031_social_climber_stress_effect = yes
		ai_chance = {
			base = 1
			ai_value_modifier = { ai_sociability = 1 }
			opinion_modifier = { opinion_target = scope:conversationalist_covassal }
		}
	}
	
	# Direct vassal.
	option = {
		name = ep2_wedding_ewan.0031.c
		trigger = {
			OR = {
				scope:conversationalist_vassal ?= scope:char_1
				scope:conversationalist_vassal ?= scope:char_2
			}
		}

		# Become friends.
		ep2_wedding_ewan_0031_make_friend_effect = { TARGET = scope:conversationalist_vassal }

		ep2_wedding_ewan_0031_social_climber_stress_effect = yes
		ai_chance = {
			base = 1
			ai_value_modifier = { ai_sociability = 1 }
			opinion_modifier = { opinion_target = scope:conversationalist_vassal }
		}
	}
	
	# Liege.
	option = {
		name = ep2_wedding_ewan.0031.d
		trigger = {
			OR = {
				scope:conversationalist_liege ?= scope:char_1
				scope:conversationalist_liege ?= scope:char_2
			}
		}

		# Become friends.
		ep2_wedding_ewan_0031_make_friend_effect = { TARGET = scope:conversationalist_liege }

		ep2_wedding_ewan_0031_social_climber_stress_effect = yes
		ai_chance = {
			base = 1
			ai_value_modifier = { ai_sociability = 1 }
			opinion_modifier = { opinion_target = scope:conversationalist_liege }
		}
	}
	
	# Distant ruler.
	option = {
		name = ep2_wedding_ewan.0031.e
		trigger = {
			OR = {
				scope:conversationalist_other_ruler ?= scope:char_1
				scope:conversationalist_other_ruler ?= scope:char_2
			}
		}

		# Become friends.
		ep2_wedding_ewan_0031_make_friend_effect = { TARGET = scope:conversationalist_other_ruler }

		ep2_wedding_ewan_0031_social_climber_stress_effect = yes
		ai_chance = {
			base = 1
			ai_value_modifier = { ai_sociability = 1 }
			opinion_modifier = { opinion_target = scope:conversationalist_other_ruler }
		}
	}
	
	# Backup option.
	option = {
		name = ep2_wedding_ewan.0031.f
		trigger = {
			OR = {
				scope:conversationalist_backup ?= scope:char_1
				scope:conversationalist_backup ?= scope:char_2
			}
		}

		# Become friends.
		ep2_wedding_ewan_0031_make_friend_effect = { TARGET = scope:conversationalist_backup }

		ep2_wedding_ewan_0031_social_climber_stress_effect = yes
		ai_chance = {
			base = 1
			ai_value_modifier = { ai_sociability = 1 }
			opinion_modifier = { opinion_target = scope:conversationalist_backup }
		}
	}
	
	# Recreation: this isn't the time for such ladder-climbing.
	option = {
		name = ep2_wedding_ewan.0031.g
		trigger = { has_activity_intent = reduce_stress_intent }
		custom_tooltip = available_because_intent_tt

		# Decent middling prestige.
		add_prestige = medium_prestige_gain

		# We give base stress loss for this'un too.
		stress_impact = {
			base = major_stress_impact_loss
			shy = medium_stress_impact_loss
			lazy = medium_stress_impact_loss
			gregarious = miniscule_stress_impact_gain
			ambitious = miniscule_stress_impact_gain
		}
		ai_chance = {
			base = 1
			ai_value_modifier = {
				ai_sociability = -0.25
				ai_energy = -0.5
				ai_boldness = -1
			}
		}
	}
	
	# Mmm. They're not that interesting.
	option = {
		name = ep2_wedding_ewan.0031.h
		trigger = {
			NOT = { has_activity_intent = reduce_stress_intent }
		}

		# Consolation prestige.
		add_prestige = minor_prestige_gain

		stress_impact = {
			shy = minor_stress_impact_loss
			gregarious = miniscule_stress_impact_gain
		}
		ai_chance = {
			base = 1
			ai_value_modifier = { ai_sociability = -2 }
		}
	}
}

##################################################
# Speech! Speech!
# by Ewan Cowhig Croft
# 0041 - 0050
##################################################

scripted_effect COR_ceremony_ewan_0041_offended_couple_effect = {
	# You hath offended them.
	reverse_add_opinion = {
		target = scope:spouse_1
		modifier = insult_opinion
		opinion = -10
	}
}

scripted_effect ep2_wedding_ewan_0041_duel_with_highest_social_skill_effect = {
	duel = {
		skill = $SKILL$
		value = high_skill_rating
		# I can't BELIEVE that's true!
		50 = {
			compare_modifier = {
				value = scope:duel_value
				multiplier = 3.5
				min = -49
			}
			min = 5
			desc = ep2_wedding_ewan.0041.g.tt.success
			send_interface_toast = {
				title = ep2_wedding_ewan.0041.g.tt.success
				# Your finger is clearly on the pulse.
				add_prestige = medium_prestige_gain
				# Plus gain some XP in the relevant lifestyle.
				add_$SKILL$_lifestyle_xp = major_lifestyle_xp
			}
		}
		# Salacious, but clearly bollocks.
		50 = {
			compare_modifier = {
				value = scope:duel_value
				multiplier = -3.5
				min = -49
			}
			min = 10
			desc = ep2_wedding_ewan.0041.g.tt.failure
			send_interface_toast = {
				title = ep2_wedding_ewan.0041.g.tt.failure
				# No one believes you.
				add_prestige = minor_prestige_loss
			}
		}
	}
}

#	Make a speech to the happy couple, adjusting the meaning to your intent.
COR_ceremony_ewan.0041 = {
	type = activity_event
	title = ep2_wedding_ewan.0041.t
	desc = {
		desc = COR_ceremony_ewan.0041.desc.intro
		first_valid = {
			# Murder.
			triggered_desc = {
				trigger = { has_activity_intent = murder_attendee_intent }
				desc = ep2_wedding_ewan.0041.desc.murder
			}
			# Diplomacy.
			triggered_desc = {
				trigger = { has_activity_intent = diplomatic_intent }
				desc = ep2_wedding_ewan.0041.desc.diplomacy
			}
			# Mischief.
			triggered_desc = {
				trigger = { has_activity_intent = banquet_mischief_intent }
				desc = ep2_wedding_ewan.0041.desc.mischief
			}
			# Recreation.
			desc = ep2_wedding_ewan.0041.desc.recreation
		}
		desc = ep2_wedding_ewan.0041.desc.outro
	}
	theme = feast_activity
	left_portrait = {
		character = root
		animation = admiration
	}
	right_portrait = {
		character = scope:spouse_1
		animation = personality_honorable
	}
	lower_right_portrait = scope:intent_target

	cooldown = { years = 1 }

	widget = {
		gui = "event_window_widget_activity_intent"
		container = "custom_widgets_container"
	}

	trigger = {
		NOR = {
			this = scope:host
			this = scope:activity.special_guest:COR_coronator
		}
	}

	immediate = {
		save_scope_as = root
		# Save the spouses for ease of reference.
		scope:host = { save_scope_as = spouse_1 }
		# And, if we've got one, our intent target.
		intent_target ?= { save_scope_as = intent_target }
	}

	# Praise the happy couple, as expected.
	option = {
		name = COR_ceremony_ewan.0041.a

		# Gain opinion with the happy couple.
		reverse_add_opinion = {
			target = scope:spouse_1
			modifier = kindness_opinion
			opinion = 10
		}

		stress_impact = {
			just = miniscule_stress_impact_loss
			compassionate = minor_stress_impact_loss
		}
		ai_chance = {
			base = 1
			ai_value_modifier = {
				ai_honor = 1
				ai_compassion = 0.5
			}
		}
	}
	
	# Recreation: praise the party.
	option = {
		name = ep2_wedding_ewan.0041.b
		trigger = { has_activity_intent = reduce_stress_intent }
		custom_tooltip = available_because_intent_tt

		add_prestige = minor_prestige_gain
		reverse_add_opinion = {
			target = scope:host
			modifier = pleased_opinion
			opinion = 10
		}

		stress_impact = {
			arbitrary = miniscule_stress_impact_loss
			gregarious = minor_stress_impact_loss
		}
		ai_chance = {
			base = 1
			ai_value_modifier = {
				ai_sociability = 0.75
				ai_honor = -0.5
			}
		}
	}
	
	# Murder: stare at your target to cause them stress.
	option = {
		name = ep2_wedding_ewan.0041.c
		trigger = { has_activity_intent = murder_attendee_intent }
		custom_tooltip = available_because_intent_tt

		scope:intent_target = {
			# They're a bit freaked out.
			add_stress = major_stress_gain
			# And concerned about what you're implying.
			add_opinion = {
				target = root
				modifier = suspicion_opinion
				opinion = -20
			}
		}
		# Annoy the spouses.
		COR_ceremony_ewan_0041_offended_couple_effect = yes

		stress_impact = {
			arbitrary = miniscule_stress_impact_loss
			greedy = miniscule_stress_impact_loss
		}
		ai_chance = {
			base = 1
			ai_value_modifier = {
				ai_vengefulness = 1
				ai_honor = -0.5
			}
		}
	}
	
	
	# Diplomacy: opinion gain with every landed ruler attending.
	option = {
		name = ep2_wedding_ewan.0041.e
		trigger = { has_activity_intent = diplomatic_intent }
		custom_tooltip = available_because_intent_tt

		# Try to give a big, impressive speech.
		duel = {
			skill = diplomacy
			value = extremely_high_skill_rating
			# You gain opinion with every attending landed character, plus some prestige.
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -49
				}
				min = 10
				desc = ep2_wedding_ewan.0041.e.tt.success
				send_interface_toast = {
					title = ep2_wedding_ewan.0041.e.tt.success
					scope:activity = {
						every_attending_character = {
							limit = {
								is_ruler = yes
								NOT = { this = scope:root }
							}
							custom = custom.every_landed_activity_guest
							reverse_add_opinion = {
								target = root
								modifier = respect_opinion
								opinion = 20
							}
						}
					}
					add_prestige = minor_prestige_gain
				}
			}
			# You just gain the prestige.
			50 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -49
				}
				min = 10
				desc = ep2_wedding_ewan.0041.e.tt.failure
				send_interface_toast = {
					title = ep2_wedding_ewan.0041.e.tt.failure
					# Consolation prestige.
					add_prestige = minor_prestige_gain
				}
			}
		}
		# Annoy the spouses.
		COR_ceremony_ewan_0041_offended_couple_effect = yes

		stress_impact = {
			arbitrary = miniscule_stress_impact_loss
			ambitious = miniscule_stress_impact_loss
		}
		ai_chance = {
			base = 1
			ai_value_modifier = {
				ai_boldness = 1
				ai_honor = -0.5
			}
		}
	}
	
	# Mischief: try to start some rumours.
	option = {
		name = ep2_wedding_ewan.0041.g
		trigger = { has_activity_intent = banquet_mischief_intent }
		custom_tooltip = available_because_intent_tt

		# We take your highest of diplomacy or intrigue and let you duel against it.
		if = {
			limit = { diplomacy > intrigue }
			ep2_wedding_ewan_0041_duel_with_highest_social_skill_effect = { SKILL = diplomacy }
		}
		else = {
			ep2_wedding_ewan_0041_duel_with_highest_social_skill_effect = { SKILL = intrigue }
		}
		# Annoy the spouses.
		COR_ceremony_ewan_0041_offended_couple_effect = yes

		stress_impact = {
			arbitrary = miniscule_stress_impact_loss
			deceitful = miniscule_stress_impact_loss
		}
		ai_chance = {
			base = 1
			ai_value_modifier = {
				ai_boldness = 1
				ai_honor = -0.5
			}
		}
	}
	
	# Shy: awkwardly sit back down without saying anything.
	option = {
		name = ep2_wedding_ewan.0041.h
		trigger = { has_trait = shy }
		trait = shy

		# The couple are confused.
		reverse_add_opinion = {
			target = scope:spouse_1
			modifier = confusion_opinion
			opinion = -10
		}

		# SWEET RELIEF.
		stress_impact = { shy = massive_stress_impact_loss }
		ai_chance = {
			base = 1
			ai_value_modifier = {
				ai_boldness = -1
				ai_sociability = -1
			}
		}
	}
	
	# Say something sweet but perfunctory.
	option = {
		name = ep2_wedding_ewan.0041.i
		trigger = {
			NOT = { has_trait = shy }
		}

		# They're pleased, but not _as_pleased.
		reverse_add_opinion = {
			target = scope:spouse_1
			modifier = kindness_opinion
			opinion = 5
		}

		# We most give base stress loss for this'un.
		stress_impact = {
			base = medium_stress_loss
			lazy = miniscule_stress_impact_loss
			compassionate = miniscule_stress_impact_loss
		}
		ai_chance = {
			base = 1
			ai_value_modifier = {
				ai_honor = 0.5
				ai_energy = -1
			}
		}
	}
}