###################################
#
# Events for Feudal Life
#
# Id 4000-4499 is reserved
#
# Fired from on actions
#
###################################
#
# Written by Sara Wendel-�rtqvist

################################################################################
# Events just for lowly counts. (some for dukes)
################################################################################

# Who Owns The Pig?
character_event = {
	id = 4000
	desc = "EVTDESC4000"
	picture = GFX_evt_emissary

	is_triggered_only = yes

	only_playable = yes
	min_age = 20
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4000 }
			had_character_flag = { flag = event_4000 days = 1825 }
		}
		tier = count
		in_command_trigger = no
		NOT = { religion_group = muslim }
		NOT = { religion_group = jewish_group }
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 5
			prestige = 15
		}
		modifier = {
			factor = 3
			trait = just
		}
		modifier = {
			factor = 0.66
			trait = arbitrary
		}
		modifier = {
			factor = 0.8
			trait = content
		}
	}
	
	immediate = {
		set_character_flag = event_4000
	}

	option = {
		name = "EVTOPTA4000"
		trigger = {
			NOT = { trait = just }
		}
		prestige = 5
	}

	option = {
		name = "EVTOPTB4000"
		tooltip_info = just
		trigger = {
			trait = just
		}
		add_character_modifier = {
			name = the_judger
			duration = 180
		}
	}

	option = {
		name = "EVTOPTC4000"
		trigger = {
			NOT = { trait = charitable }
		}
		scaled_wealth = 0.05
	}
}

#Wolf hunting - Luparii
character_event = {
	id = 4085
	desc = "EVTDESC4085"
	picture = GFX_evt_hunt

	is_triggered_only = yes

	min_age = 20
	only_playable = yes
	only_men = yes
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4085 }
			had_character_flag = { flag = event_4085 days = 1825 }
		}
		NOT = {
			religion_group = muslim
			religion_group = jewish_group
		}
		in_command_trigger = no
		tier = count
		NOT = {
			trait = stressed
		}
		NOT = {
			trait = depressed
		}
		NOT = {
			has_character_modifier = mod_bloodlust
		}
		OR = {
			any_vassal = {
				war = no
				prisoner = no
				age = 20
				OR = {
					trait = slothful
					trait = content
					trait = craven
				}
				NOR = {
					trait = diligent
					trait = ambitious
					trait = brave
				}
			}
			any_vassal = {
				war = no
				prisoner = no
				age = 20
				OR = {
					trait = diligent
					trait = ambitious
					trait = brave
				}
			}
		}
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 1.5
			trait = brave
		}
		modifier = {
			factor = 1.5
			trait = ambitious
		}
		modifier = {
			factor = 0.75
			trait = craven
		}
		modifier = {
			factor = 0.8
			trait = content
		}
	}

	immediate = { set_character_flag = event_4085 }

	option = {
		name = "EVTOPTA4085"
		trigger = {
			any_vassal = {
				war = no
				prisoner = no
				age = 20
				OR = {
					trait = slothful
					trait = content
					trait = craven
				}
				NOR = {
					trait = diligent
					trait = ambitious
					trait = brave
				}
			}
		}
		random_vassal = {
			limit = {
				war = no
				prisoner = no
				age = 20
				OR = {
					trait = slothful
					trait = content
					trait = craven
				}
				NOR = {
					trait = diligent
					trait = ambitious
					trait = brave
				}
			}
			opinion = {
				modifier = opinion_relieved
				who = ROOT
				years = 5
			}
		}
	}

	option = {
		name = "EVTOPTB4085"
		trigger = {
			any_vassal = {
				war = no
				prisoner = no
				age = 20
				OR = {
					trait = diligent
					trait = ambitious
					trait = brave
				}
			}
		}
		random_vassal = {
			limit = {
				war = no
				prisoner = no
				age = 20
				OR = {
					trait = diligent
					trait = ambitious
					trait = brave
				}
			}
			opinion = {
				modifier = opinion_delighted
				who = ROOT
				years = 5
			}
		}
	}

	option = {
		name = "EVTOPTC4085"
		trigger = {
			NOR = {
				trait = slothful
				trait = content
				trait = craven
			}
		}
		random_list = {
			60 = { }
			20 = { change_martial = 1 }
			14 = {
				add_trait = wounded
				hidden_tooltip = { character_event = { id = 38280 } }
			}
			4 = {
				add_maimed_trait_effect = yes
				hidden_tooltip = { character_event = { id = 38281 } }
			}
			1 = {
				death = { death_reason = death_accident }
			}
		}
		prestige = 10
		hidden_tooltip = { change_variable = { which = "lifestyle_martial" value = 1 } }
	}

	option = {
		name = "EVTOPTD4085"
		tooltip_info = diligent
		trigger = {
			trait = diligent
		}
		random_courtier = {
			limit = {
				has_job_title = job_marshal
			}
			opinion = {
				modifier = diligent_pos
				who = ROOT
				years = 2
			}
		}
	}
}


#Witch!
character_event = {
	id = 4036
	desc = "EVTDESC4036"
	picture = GFX_evt_scandal

	is_triggered_only = yes

	only_playable = yes
	min_age = 20
	only_men = yes
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4036 }
			had_character_flag = { flag = event_4036 days = 3650 }
		}
		in_command_trigger = no
		tier = count
		any_courtier = {
			is_priest = yes
			piety = 100
		}
		NOT = { trait = kind }
		NOT = { trait = charitable }
		NOT = { trait = cruel }
		NOT = { is_inaccessible_trigger = yes }
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 2
			piety = 100
		}
		modifier = {
			factor = 2
			trait = zealous
		}
		modifier = {
			factor = 0.66
			trait = arbitrary
		}
		modifier = {
			factor = 0.8
			trait = content
		}
	}
	
	immediate = { set_character_flag = event_4036 }

	option = {
		name = "EVTOPTA4036" #Ignore
		trigger = {
			NOR = {
				trait = zealous
				trait = cruel
			}
		}
		random_courtier = {
			limit = {
				is_priest = yes
				piety = 100
			}
			opinion = {
				who = ROOT
				modifier = cynical_neg
				years = 10
			}
		}
		if = {
			limit = {
				NOT = { trait = kind }
			}
			random = {
				chance = 33
				add_trait = kind
				hidden_tooltip = {
					character_event = {
						id = 38268 #Notify Kind
					}
				}
			}
		}
	}

	option = {
		name = "EVTOPTB4036" #Ordeal by water
		if = {
			limit = { religion = jain }
			piety = -20
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}

		piety = 10
		if = {
			limit = { any_vassal = { leads_faction = faction_tradition } }
			custom_tooltip = { text = TRADITIONFACTIONMOODPLUS }
			hidden_tooltip = {
				random_vassal = { limit = { leads_faction = faction_tradition } set_variable = { which = "faction_mood_increase" value = 1 } }
				character_event = { id = PlusFaction.200 days = 1 }
			}
		}
	}

	option = {
		name = "EVTOPTC4036" #Torture
		piety = 25
		
		if = {
			limit = { religion = jain }
			piety = -45
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}

		
		if = {
			limit = {
				NOT = { trait = cruel }
			}
			random = {
				chance = 33
				add_trait = cruel
				hidden_tooltip = {
					character_event = {
						id = 38268 #Notify Kind
					}
				}
			}
		}
		if = {
			limit = { any_vassal = { leads_faction = faction_tradition } }
			custom_tooltip = { text = TRADITIONFACTIONMOODPLUS }
			hidden_tooltip = {
				random_vassal = { limit = { leads_faction = faction_tradition } set_variable = { which = "faction_mood_increase" value = 1 } }
				character_event = { id = PlusFaction.200 days = 1 }
			}
		}
	}
}

#Band O'Brothers
character_event = {
	id = 4010
	desc = "EVTDESC4010"
	picture = GFX_evt_bandits

	is_triggered_only = yes

	only_playable = yes
	min_age = 20
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4010 }
			had_character_flag = { flag = event_4010 days = 1825 }
		}
		in_command_trigger = no
		tier = count

		NOT = {
			has_character_modifier = the_greedy
		}
		any_courtier = {
			has_job_title = job_marshal
		}
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 3
			trait = just
		}
		modifier = {
			factor = 0.8
			trait = content
		}
	}
	
	immediate = { set_character_flag = event_4010 }

	option = {
		name = "EVTOPTA4010" #Ignore
		trigger = {
			OR = {
				trait = slothful
				trait = arbitrary
			}
		}
		prestige = -10
	}

	option = {
		name = "EVTOPTB4010"
		trigger = {
			NOT = { trait = cruel }
		}
		random_courtier = {
			limit = {
				has_job_title = job_marshal
			}
			opinion = {
				modifier = perfect_punishment
				who = ROOT
				years = 5
			}
		}
	}

	option = {
		name = "EVTOPTC4010" #Decapitation
		trigger = {
			NOT = { trait = kind }
			NOT = { trait = charitable }
		}
		if = {
			limit = { religion = jain }
			piety = -20
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}

		prestige = 10
		any_courtier = {
			limit = {
				has_job_title = job_marshal
			}
			opinion = {
				modifier = opinion_cruel
				who = ROOT
				years = 5
			}
		}
	}

	option = {
		name = "EVTOPTD4010"
		tooltip_info = wroth
		trigger = {
			trait = wroth
			NOT = {
				trait = cruel
			}
		}
		if = {
			limit = { religion = jain }
			piety = -20
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}

		add_trait = cruel
	}
}

#Kidnapping : Start
character_event = {
	id = 4045
	desc = "EVTDESC4045"
	picture = GFX_evt_bandits
	border = GFX_event_normal_frame_intrigue
	is_triggered_only = yes

	min_age = 20
	max_age = 60
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4045 }
			had_character_flag = { flag = event_4045 days = 1825 }
		}
		in_command_trigger = no
		OR = {
			tier = count
			tier = duke
		}
		OR = {
			trait = brave
			trait = wroth
		}
		location = {
			any_province_lord = {
				prisoner = no
				treasury = 50
				prestige = 50
				NOT = {
					character = ROOT
				}
				NOT = {
					trait = incapable
				}
				NOT = {
					spouse = {
						character = ROOT
					}
				}
				same_realm = ROOT
				OR = {
					trait = trusting
					is_dumb_trigger = yes
					NOT = {
						trait = paranoid
					}
					NOT = {
						trait = deceitful
					}
				}
			}
		}
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 0.66
			trait = arbitrary
		}
		modifier = {
			factor = 0.01
			trait = slothful
		}
	}
	
	immediate = { set_character_flag = event_4045 }

	option = {
		name = "EVTOPTA4045"
		location = {
			random_province_lord = {
				limit = {
					prisoner = no
					treasury = 50
					prestige = 50
					NOT = {
						character = ROOT
					}
					NOT = {
						trait = incapable
					}
					NOT = {
						spouse = {
							character = ROOT
						}
					}
					same_realm = ROOT
					OR = {
						trait = trusting
						is_dumb_trigger = yes
						NOT = {
							trait = paranoid
						}
						NOT = {
							trait = deceitful
						}
					}
				}
				character_event = {
					id = 4046
					tooltip = "EVTTOOLTIP4046"
				}
			}
		}
	}
}

#Kidnapping: Lord
character_event = {
	id = 4046
	desc = "EVTDESC4046"
	picture = GFX_evt_bandits
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4046"
		FROM = {
			character_event = {
				id = 4047
				days = 4
				tooltip = "EVTTOOLTIP4047"
			}
		}
	}
}

#Kidnapping: Root
character_event = {
	id = 4047
	desc = "EVTDESC4047"
	picture = GFX_evt_bandits
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4047"
		add_trait = content
		FROM = { add_trait = ambitious }
	}

	option = {
		name = "EVTOPTB4047"
		add_trait = just
	}

	option = {
		name = "EVTOPTC4047" #Imprisonment
		FROM = {
			opinion = {
				modifier = perfect_punishment
				who = ROOT
				years = 10
			}
		}
		add_trait = cruel
	}

	option = {
		name = "EVTOPTD4047"
		trigger = {
			FROM = {
				reverse_opinion = { who = ROOT value = -25 }
			}
		}
		FROM = {
			opinion = {
				modifier = opinion_furious
				who = ROOT
				years = 10
			}
		}
		add_trait = arbitrary
	}
}

#I spy a spy!
character_event = {
	id = 4050
	desc = "EVTDESC4050"
	picture = GFX_evt_shadowy_cabal
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	only_playable = yes
	min_age = 20
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4050 }
			had_character_flag = { flag = event_4050 days = 1825 }
		}
		in_command_trigger = no
		OR = {
			tier = duke
			tier = count
		}
		NOR = {
			trait = cruel
			trait = wroth
		}
		job_spymaster = {
			intrigue = 14
		}
		NOT = { personality_traits = 4 }
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 2
			trait = diligent
		}
		modifier = {
			factor = 2
			intrigue = 10
		}
		modifier = {
			factor = 0.66
			trait = arbitrary
		}
		modifier = {
			factor = 0.8
			trait = slothful
		}
	}

	immediate = { set_character_flag = event_4050 }
	option = { #Ignore
		name = "EVTOPTA4050"
		piety = 10
	}

	option = {
		name = "EVTOPTC4050" #Imprisonment
		prestige = 10
	}


	option = {
		name = "EVTOPTB4050" #Behead him!
		if = {
			limit = { religion = jain }
			piety = -20
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}
		add_trait = wroth
	}

	option = {
		name = "EVTOPTE4050" #Eyes removed
		if = {
			limit = { religion = jain }
			piety = -20
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}
		add_trait = cruel
	}
}

#Dragon!
character_event = {
	id = 4055
	desc = "EVTDESC4055"
	picture = GFX_evt_heretic
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	only_playable = yes
	only_men = yes
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4055 }
			had_character_flag = { flag = event_4055 days = 3650 }
		}
		in_command_trigger = no
		tier = count
		any_vassal = {
			war = no
			prisoner = no
			age = 20
			OR = {
				trait = ambitious
				trait = brave
			}
		}
		NOT = { has_character_flag = dragon }
	}

	immediate = {
		set_character_flag = dragon
		set_character_flag = event_4055
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 3
			trait = brave
		}
		modifier = {
			factor = 5
			trait = ambitious
		}
		modifier = {
			factor = 0.66
			trait = craven
		}
		modifier = {
			factor = 0.8
			trait = content
		}
	}

	option = {
		name = "EVTOPTA4055"
		trigger = {
			NOT = { trait = brave }
		}
		treasury = -10
	}

	option = {
		name = "EVTOPTD4055"
		tooltip_info = brave
		trigger = {
			trait = brave
		}
		change_martial = 1
	}

	option = {
		name = "EVTOPTC4055"
		trigger = {
			NOT = { trait = brave }
		}
		if = {
			limit = {
				NOR = {
					trait = stressed
					trait = depressed
				}
			}
			random = {
				chance = 25
				add_trait = stressed
				hidden_tooltip = {
					character_event = {
						id = 38282 #Notify Stressed
					}
				}
			}
		}
	}

	option = {
		name = "EVTOPTB4055"
		tooltip_info = brave
		trigger = {
			trait = brave
		}
		any_vassal = {
			limit = {
				war = no
				prisoner = no
				is_adult = yes
			}
			opinion = {
				modifier = brave_pos
				who = root
				years = 10
			}
		}
	}
}



################################################################################
# Event Chain: Poachers
################################################################################
#Poachers! Start
character_event = {
	id = 4020
	desc = "EVTDESC4020"
	picture = GFX_evt_bandits

	is_triggered_only = yes

	min_age = 20
	capable_only = yes
	prisoner = no
	only_rulers = yes
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4020 }
			had_character_flag = { flag = event_4020 days = 1825 }
		}
		in_command_trigger = no
		tier = count
		NOT = {
			has_character_modifier = in_seclusion
		}
		OR = {
			NOT = {
				martial = 8
			}
			learning = 6
			trait = charitable
		}
		job_spymaster = {
			OR = {
				martial = 15
				intrigue = 10
				learning = 11
			}
		}
		job_marshal = {
			OR = {
				martial = 15
				intrigue = 10
				learning = 11
			}
		}
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 5
			prestige = 150
		}
		modifier = {
			factor = 3
			trait = just
		}
		modifier = {
			factor = 0.66
			trait = arbitrary
		}
		modifier = {
			factor = 0.8
			trait = content
		}
	}
	
	immediate = { set_character_flag = event_4020 }

	option = {
		name = "EVTOPTA4020" #Ignore it
		ai_chance = { factor = 20 }
		piety = 10
	}

	option = {
		name = "EVTOPTB4020" #Ask someone to do something about it!
		ai_chance = { factor = 80 }
			any_courtier = {
				limit = {
				OR = {
					has_job_title = job_spymaster
					has_job_title = job_marshal
				}
				OR = {
					martial = 15
					intrigue = 10
					learning = 11
				}
			}
			character_event = {
				id = 4021
				days = 10
				tooltip = "EVTTOOLTIP4021"
			}
		}
	}
}

#Poachers! Courtier
character_event = {
	id = 4021
	desc = "EVTDESC4021"
	picture = GFX_evt_spymaster

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4021" #Release them
		ai_chance = { factor = 20 }
		piety = 10
	}

	option = {
		name = "EVTOPTB4021" #Hand them over to my liege
		ai_chance = { factor = 80 }
		FROM = {
			character_event = {
				id = 4022
				days = 5
				tooltip = "EVTTOOLTIP4022"
			}
		}
	}
}

#Poachers: Liege
character_event = {
	id = 4022
	desc = "EVTDESC4022"
	picture = GFX_evt_bandits

	is_triggered_only = yes

	option = { #Ignore
		name = "EVTOPTA4022"
		ai_chance = { factor = 50 }
		prestige = 5
	}

	option = {
		name = "EVTOPTB4022" #Hanged with silken rope
		tooltip_info = just
		trigger = {
			trait = just
		}
		prestige = 10
		FROM = {
			set_character_flag = hanged_poachers
			character_event = {
				id = 4023
				days = 2
				tooltip = "EVTTOOLTIP4023"
			}
		}
	}

	option = {
		name = "EVTOPTC4022" #Release them!
		tooltip_info = kind
		trigger = {
			trait = kind
		}
		piety = 10
		prestige = -10
		FROM = {
			opinion = {
				modifier = opinion_merciful
				who = ROOT
				years = 10
			}
		}
	}

	option = {
		name = "EVTOPTD4022" #Kill them
		tooltip_info = wroth
		trigger = {
			trait = wroth
			NOT = {
				trait = just
			}
		}
		if = {
			limit = { religion = jain }
			piety = -20
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}

		prestige = 20
		piety = -10
		FROM = {
			set_character_flag = dead_poachers
			character_event = {
				id = 4023
				days = 2
				tooltip = "EVTTOOLTIP4023"
			}
		}
	}

	option = {
		name = "EVTOPTE4022" #Ears cut off
		tooltip_info = cruel
		trigger = {
			trait = cruel
		}
		if = {
			limit = { religion = jain }
			piety = -20
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}

		prestige = 20
		piety = -10
		FROM = {
			set_character_flag = ears_off
			character_event = {
				id = 4023
				days = 2
				tooltip = "EVTTOOLTIP4023"
			}
		}
	}
}

#Poachers: Marshal/Spymaster protests
character_event = {
	id = 4023
	desc = "EVTDESC4023"
	picture = GFX_evt_spymaster

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4023" #Good
		trigger = {
			has_character_flag = hanged_poachers
		}
		clr_character_flag = hanged_poachers
		FROM = {
			character_event = {
				id = 4024
				tooltip = "EVTTOOLTIP4024"
			}
		}
	}
	option = {
		name = "EVTOPTB4023" #Bad
		trigger = {
			has_character_flag = hanged_poachers
		}
		clr_character_flag = hanged_poachers
		FROM = {
			character_event = {
				id = 4025
				tooltip = "EVTTOOLTIP4025"
			}
		}
	}
	option = {
		name = "EVTOPTC4023" #Good
		trigger = {
			has_character_flag = ears_off
		}
		if = {
			limit = { religion = jain }
			piety = -20
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}

		clr_character_flag = ears_off
		FROM = {
			character_event = {
				id = 4024
				tooltip = "EVTTOOLTIP4024"
			}
		}
	}
	option = {
		name = "EVTOPTD4023" #Bad
		trigger = {
			has_character_flag = ears_off
		}
		clr_character_flag = ears_off
		FROM = {
			character_event = {
				id = 4025
				tooltip = "EVTTOOLTIP4025"
			}
		}
	}
	option = {
		name = "EVTOPTE4023" #Good
		trigger = {
			has_character_flag = dead_poachers
		}
		clr_character_flag = dead_poachers
		FROM = {
			character_event = {
				id = 4024
				tooltip = "EVTTOOLTIP4024"
			}
		}
	}
	option = {
		name = "EVTOPTF4023" #Bad
		trigger = {
			has_character_flag = dead_poachers
		}
		if = {
			limit = { religion = jain }
			piety = -20
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}

		clr_character_flag = dead_poachers
		FROM = {
			character_event = {
				id = 4025
				tooltip = "EVTTOOLTIP4025"
			}
		}
	}
}

#Poachers: Good Punishment
character_event = {
	id = 4024
	desc = "EVTDESC4024"
	picture = GFX_evt_holy_emperor

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4024"
		FROM = {
			opinion = {
				modifier = opinion_merciful
				who = ROOT
				years = 10
			}
		}
	}
}

#Poachers: Bad Punishment
character_event = {
	id = 4025
	desc = "EVTDESC4025"
	picture = GFX_evt_lunatic

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4025"
		FROM = {
			opinion = {
				modifier = opinion_cruel
				who = ROOT
				years = 10
			}
		}
	}
}

################################################################################
# Event Chain: Courtier gets robbed
################################################################################
#I have been robbed!
character_event = {
	id = 4005
	desc = "EVTDESC4005"
	picture = GFX_evt_bandits

	is_triggered_only = yes

	min_age = 20
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4005 }
			had_character_flag = { flag = event_4005 days = 1825 }
		}
		in_command_trigger = no
		treasury = 100
		is_ruler = no
		OR = {
			trait = trusting
			trait = charitable
			is_dumb_trigger = yes
		}
		host = {
			age = 20
			prisoner = no
			NOT = {
				character = ROOT
			}
			NOT = {
				trait = incapable
			}
		}

		any_demesne_province = {
			OR = {
				has_province_modifier = highway_robber_band
				has_province_modifier = thieves_guild
			}
		}
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 2.5
			trait = trusting
		}
		modifier = {
			factor = 1.7
			trait = charitable
		}
	}

	option = {
		name = "EVTOPTA4005"
		treasury = -20
		host = {
			character_event = {
				id = 4006
				days = 7
				tooltip = "EVTTOOLTIP4006"
			}
		}
		hidden_tooltip = { set_character_flag = event_4005 }
	}
}

#Mercy, cried the thief
character_event = {
	id = 4006
	desc = "EVTDESC4006"
	picture = GFX_evt_bandits

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4006"
		ai_chance = { factor = 10 }
		FROM = {
			opinion = {
				modifier = opinion_mocked
				who = ROOT
				years = 10
			}
		}
	}

	option = {
		name = "EVTOPTB4006" #Imprisonment
		tooltip_info = just
		trigger = {
			trait = just
		}
		ai_chance = { factor = 40 }
		FROM = {
			set_character_flag = prisoner_in
			character_event = {
				id = 4007
				days = 7
				tooltip = "EVTTOOLTIP4007"
			}
		}
	}

	option = {
		name = "EVTOPTC4006" #Hanged
		tooltip_info = arbitrary
		trigger = {
			trait = arbitrary
		}
		ai_chance = { factor = 20 }
		if = {
			limit = { religion = jain }
			piety = -20
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}

		FROM = {
			set_character_flag = heads_up
			character_event = {
				id = 4007
				days = 7
				tooltip = "EVTTOOLTIP4007"
			}
		}
	}

	option = {
		name = "EVTOPTD4006" #Hands cut off
		tooltip_info = wroth
		trigger = {
			trait = wroth
		}
		ai_chance = { factor = 30 }
		if = {
			limit = { religion = jain }
			piety = -20
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}

		FROM = {
			set_character_flag = hands_off
			character_event = {
				id = 4007
				days = 7
				tooltip = "EVTTOOLTIP4007"
			}
		}
	}
}

#Punished!
character_event = {
	id = 4007
	desc = "EVTDESC4007"
	picture = GFX_evt_beheading

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4007"
		trigger = {
			has_character_flag = heads_up
		}
		ai_chance = { factor = 40 }
		clr_character_flag = heads_up
		FROM = {
			character_event = {
				id = 4008
				days = 7
				tooltip = "EVTTOOLTIP4008" #Good Punishment
			}
		}
	}
	option = {
		name = "EVTOPTB4007"
		trigger = {
			has_character_flag = heads_up
		}
		ai_chance = { factor = 60 }
		clr_character_flag = heads_up
		FROM = {
			character_event = {
				id = 4009
				days = 7
				tooltip = "EVTTOOLTIP4009" #Bad Punishment
			}
		}
	}
	option = {
		name = "EVTOPTC4007"
		trigger = {
			has_character_flag = hands_off
		}
		ai_chance = { factor = 30 }
		if = {
			limit = { religion = jain }
			piety = -20
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}
		clr_character_flag = hands_off
		FROM = {
			character_event = {
				id = 4008
				days = 7
				tooltip = "EVTTOOLTIP4008" #Good Punishment
			}
		}
	}
	option = {
		name = "EVTOPTD4007"
		trigger = {
			has_character_flag = hands_off
		}
		ai_chance = { factor = 70 }
		if = {
			limit = { religion = jain }
			piety = -20
			custom_tooltip = { text = jain_ahimsa_tooltip }
		}
		clr_character_flag = hands_off
		FROM = {
			character_event = {
				id = 4009
				days = 7
				tooltip = "EVTTOOLTIP4009" #Bad Punishment
			}
		}
	}
	option = {
		name = "EVTOPTE4007"
		trigger = {
			has_character_flag = prisoner_in
		}
		ai_chance = { factor = 70 }
		clr_character_flag = prisoner_in
		FROM = {
			character_event = {
				id = 4008
				days = 7
				tooltip = "EVTTOOLTIP4008" #Good Punishment
			}
		}
	}
	option = {
		name = "EVTOPTF4007"
		trigger = {
			has_character_flag = prisoner_in
		}
		ai_chance = { factor = 30 }
		clr_character_flag = prisoner_in
		FROM = {
			character_event = {
				id = 4009
				days = 7
				tooltip = "EVTTOOLTIP4009" #Bad Punishment
			}
		}
	}
}

#Good Punishment
character_event = {
	id = 4008
	desc = "EVTDESC4008"
	picture = GFX_evt_holy_emperor

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4008"
		FROM = {
			opinion = {
				modifier = opinion_good_punishment
				who = ROOT
				years = 10
			}
		}
	}
}

#Bad Punishment
character_event = {
	id = 4009
	desc = "EVTDESC4009"
	picture = GFX_evt_lunatic
	is_triggered_only = yes

	option = {
		name = "EVTOPTA4009"
		FROM = {
			opinion = {
				modifier = opinion_bad_punishment
				who = ROOT
				years = 10
			}
		}
	}
}

################################################################################
# Event Chain: Unfaithful Husband
################################################################################
#Unfaithful Husband: Start
character_event = {
	id = 4015
	desc = "EVTDESC4015"
	picture = GFX_evt_quarrel

	only_playable = no
	min_age = 20
	capable_only = yes
	prisoner = no
	is_triggered_only = yes
	war = no
	is_married = yes

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4015 }
			had_character_flag = { flag = event_4015 days = 1825 }
		}
		in_command_trigger = no
		is_ruler = no
		host = {
			age = 20
			prisoner = no
			war = no
			in_command_trigger = no
			OR = {
				tier = count
				tier = duke
				tier = king
			}
			NOT = {
				character = ROOT
			}
			NOT = {
				spouse = {
					character = ROOT
				}
			}
			NOT = {
				trait = incapable
			}
			NOT = {
				has_character_modifier = the_judger
			}
		}
		spouse = {
			trait = lustful
			is_abroad_trigger = no
			prisoner = no
			is_alive = yes
			OR = {
				tier = baron
				tier = count
				NOT = {
					tier = duke
				}
			}
			NOR = {
				tier = king
				tier = emperor
			}
			OR = {
				has_opinion_modifier = { who = ROOT modifier = opinion_cuckolded_private }
				has_opinion_modifier = { who = ROOT modifier = opinion_unfaithful_private }
				has_opinion_modifier = { who = ROOT modifier = opinion_cuckolded }
				has_opinion_modifier = { who = ROOT modifier = opinion_unfaithful_wife }
				has_opinion_modifier = { who = ROOT modifier = opinion_unfaithful_husband }
				has_opinion_modifier = { who = ROOT modifier = opinion_unfaithful_husband_crime }
				NOT = { opinion = { who = ROOT value = 30 } }
			}
			NOT = { ROOT = { host = { character = PREVPREV } } }
		}
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 2.5
			trait = lustful
		}
		modifier = {
			factor = 2
			trait = just
		}
		modifier = {
			factor = 0.66
			trait = arbitrary
		}
		modifier = {
			factor = 0.75
			trait = chaste
		}
	}
	
	immediate = { set_character_flag = event_4015 }

	option = {
		name = "EVTOPTA4015"
		host = {
			character_event = {
				id = 4016
				days = 7
				tooltip = "EVTTOOLTIP4016"
			}
		}
	}
	option = {
		name = "EVTOPTB4015"
		prestige = -5
		piety = 10
	}
}

#Unfaithful Husband: Host
character_event = {
	id = 4016
	desc = "EVTDESC4016"
	picture = GFX_evt_quarrel

	is_triggered_only = yes

	immediate = {
		add_character_modifier = {
			name = the_judger
			duration = 730
		}
	}

	option = {
		name = "EVTOPTA4016" #Ignore
		FROM = {
			opinion = {
				modifier = insulted
				who = ROOT
				years = 1
			}
			character_event = {
				id = 4017
				days = 2
				tooltip = "EVTTOOLTIP4017" #The spouse is not punished
			}
		}
		FROM = {
			spouse = {
				opinion = {
					modifier = opinion_grateful
					who = ROOT
					years = 10
				}
			}
		}
	}

	option = {
		name = "EVTOPTB4016" #Throw him into the dungeon!
		tooltip_info = just
		trigger = {
			trait = just
		}
		FROM = {
			opinion = {
				modifier = opinion_grateful
				who = ROOT
				years = 10
			}
			character_event = {
				id = 4018
				days = 2
				tooltip = "EVTTOOLTIP4018" #The spouse is punished
			}
		}
		FROM = {
			spouse = {
				imprison = ROOT
				opinion = {
					modifier = insulted
					who = ROOT
					years = 1
				}
				character_event = {
					id = 4019
					days = 2
					tooltip = "EVTTOOLTIP4019" #The spouse is not happy
				}
			}
		}
	}

	option = {
		name = "EVTOPTC4016" #Infidelty = crime?
		tooltip_info = arbitrary
		trigger = {
			trait = arbitrary
			NOT = {
				trait = dull
			}
		}
		add_trait = dull
	}

	option = {
		name = "EVTOPTD4016" #Locked in the stock
		piety = 10
		FROM = {
			opinion = {
				modifier = opinion_grateful
				who = ROOT
				years = 10
			}
			character_event = {
				id = 4018
				days = 2
				tooltip = "EVTTOOLTIP4018" #The spouse is punished
			}
		}
		FROM = {
			spouse = {
				opinion = {
					modifier = insulted
					who = ROOT
					years = 1
				}
				character_event = {
					id = 4019
					days = 2
					tooltip = "EVTTOOLTIP4019"  #The spouse is not happy
				}
			}
		}
	}
}

#The spouse is not punished
character_event = {
	id = 4017
	desc = "EVTDESC4017"
	picture = GFX_evt_quarrel

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4017"
		prestige = -10
	}
}

#The spouse is punished
character_event = {
	id = 4018
	desc = "EVTDESC4018"
	picture = GFX_evt_quarrel

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4018"
		prestige = 10
	}
}

#The spouse is not happy
character_event = {
	id = 4019
	desc = "EVTDESC4019"
	picture = GFX_evt_quarrel

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4019"
		prestige = -15
		spouse = {
			reverse_opinion = {
				modifier = opinion_betrayed
				who = ROOT
				years = 10
			}
		}
	}
}


################################################################################
#Falconry
character_event = {
	id = 4060
	desc = "EVTDESC4060"
	picture = GFX_evt_falconing

	is_triggered_only = yes

	only_playable = yes
	only_men = yes
	min_age = 20
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4060 }
			had_character_flag = { flag = event_4060 days = 1825 }
		}
		NOT = { has_character_flag = event_4060 }
		in_command_trigger = no
		NOT = { religion = jain }
		OR = {
			trait = falconer
			trait = hunter
		}
		any_vassal = {
			prisoner = no
			age = 20
			OR = {
				trait = falconer
				trait = hunter
			}
		}
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 3
			trait = brave
		}
		modifier = {
			factor = 5
			trait = ambitious
		}
		modifier = {
			factor = 0.75
			trait = craven
		}
		modifier = {
			factor = 0.8
			trait = content
		}
	}
	
	immediate = { set_character_flag = event_4060 }

	option = {
		name = "EVTOPTA4060"
		trigger = {
			NOT = { trait = craven }
		}
		prestige = 5
	}

	option = {
		name = "EVTOPTB4060"
		trigger = {
			NOT = { trait = craven }
		}
		random_vassal = {
			limit = {
				war = no
				prisoner = no
				is_adult = yes
				OR = {
					trait = falconer
					trait = hunter
				}
			}
			opinion = {
				modifier = brave_pos
				who = ROOT
				years = 5
			}
		}
		hidden_tooltip = { change_variable = { which = "lifestyle_diplomacy" value = 1 } }
	}

	option = {
		name = "EVTOPTC4060"
		tooltip_info = craven
		trigger = {
			trait = craven
		}
		random_vassal = {
			limit = {
				OR = {
					trait = falconer
					trait = hunter
				}
				is_adult = yes
			}
			opinion = {
				modifier = opinion_oblivious
				who = ROOT
				years = 10
			}
		}
	}
}

#Deer Park ID 4075 - moved to hunting_events.txt

#Satirical Puppet Show ID 4105 - moved to summer_fair_events.txt

#Banquette: Start
character_event = {
	id = 4110
	desc = "EVTDESC4110"
	picture = GFX_evt_feast

	is_triggered_only = yes

	min_age = 20
	only_playable = yes
	only_men = yes
	capable_only = yes
	prisoner = no
	war = no
	friends = yes

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4110 }
			had_character_flag = { flag = event_4110 days = 1825 }
		}
		in_command_trigger = no
		any_friend = {
			age = 20
			prisoner = no
			NOT = {
				character = ROOT
			}
			NOT = {
				trait = incapable
			}
			reverse_opinion = { who = ROOT value = 25 }
		}
		NOT = { is_inaccessible_trigger = yes }
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 5
			trait = cynical
		}
		modifier = {
			factor = 3
			trait = wroth
		}

		modifier = {
			factor = 0.75
			trait = gregarious
		}
		modifier = {
			factor = 0.75
			trait = charitable
		}
	}

	immediate = {
		set_character_flag = event_4110
		random_friend = {
			limit = {
				age = 20
				prisoner = no
				NOT = {
					character = ROOT
				}
				NOT = {
					trait = incapable
				}
				reverse_opinion = { who = ROOT value = 25 }
			}
			save_event_target_as = invitation_pending
		}
	}

	option = {
		name = "EVTOPTA4110"
		event_target:invitation_pending = {
			character_event = {
				id = 4111
				days = 3
				random = 3
				tooltip = "EVTTOOLTIP4111"
			}
		}
	}

	option = {
		name = "EVTOPTB4110"
		event_target:invitation_pending = {
			random = {
				chance = 70
				character_event = {
					id = 4112
					days = 3
					random = 3
					tooltip = "EVTTOOLTIP4112"
				}
			}
		}
	}
}

#Banquette: Invited
character_event = {
	id = 4111
	desc = "EVTDESC4111"
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4111"
		FROM = {
			opinion = {
				modifier = opinion_disappointed
				who = ROOT
				years = 10
			}
			hidden_tooltip = {
				set_character_flag = guest_declined
				character_event = {
					id = 4114
					days = 3
					random = 3
				}
			}
		}
	}
	option = {
		name = "EVTOPTB4111"
		FROM = {
			opinion = {
				modifier = opinion_satisfied
				who = ROOT
				years = 10
			}
			hidden_tooltip = {
				set_character_flag = guest_accepted
				character_event = {
					id = 4114
					days = 3
					random = 3
				}
			}
		}
	}
	option = {
		name = "EVTOPTC4111"
		FROM = {
			opinion = {
				modifier = opinion_happy
				who = ROOT
				years = 10
			}
			hidden_tooltip = {
				set_character_flag = guest_happy
				character_event = {
					id = 4114
				}
			}
		}
	}
}

#Banquette: Not Invited
character_event = {
	id = 4112
	desc = "EVTDESC4112"
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4112"
		piety = 10
	}

	option = {
		name = "EVTOPTB4112"
		FROM = {
			reverse_opinion = {
				modifier = opinion_disappointed
				who = ROOT
				years = 10
			}
		}
	}

	option = {
		name = "EVTOPTC4112"
		FROM = {
			character_event = {
				id = 4113
				days = 2
				random = 2
				tooltip = "EVTTOOLTIP4113"
			}
		}
	}
}

#Banquette: The Bad End
character_event = {
	id = 4113
	desc = "EVTDESC4113"
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4113" #So?
		FROM = {
			opinion = {
				modifier = opinion_disappointed
				who = ROOT
				years = 10
			}
		}
	}
	option = {
		name = "EVTOPTB4113" #I'm sorry
		FROM = {
			opinion = {
				modifier = opinion_glad
				who = ROOT
				years = 100
			}
		}
	}
}

#Banquette: The Good End?
character_event = {
	id = 4114
	desc = "EVTDESC4114"
	picture = GFX_evt_feast

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4114"
		trigger = {
			has_character_flag = guest_declined
		}
		clr_character_flag = guest_declined
		opinion = {
			modifier = opinion_sad
			who = FROM
			years = 10
		}
	}
	option = {
		name = "EVTOPTB4114"
		trigger = {
			has_character_flag = guest_accepted
		}
		clr_character_flag = guest_accepted
		FROM = {
			opinion = {
				modifier = opinion_glad
				who = ROOT
				years = 10
			}
		}
		opinion = {
			modifier = opinion_glad
			who = FROM
			years = 10
		}
	}
	option = {
		name = "EVTOPCF4114"
		trigger = {
			has_character_flag = guest_happy
		}
		clr_character_flag = guest_happy
		FROM = {
			opinion = {
				modifier = opinion_happy
				who = ROOT
				years = 10
			}
		}
		opinion = {
			modifier = opinion_happy
			who = FROM
			years = 10
		}
	}
}

#Market Day
character_event = {
	id = 4115
	desc = "EVTDESC4115"
	picture = "GFX_evt_market"
	border = "GFX_event_normal_frame_economy"

	is_triggered_only = yes

	min_age = 20
	only_playable = yes
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4115 }
			had_character_flag = { flag = event_4115 days = 1825 }
		}
		in_command_trigger = no
		NOR = {
			tier = king
			tier = emperor
		}
		NOR = {
			trait = shy
			trait = depressed
			trait = stressed
			trait = cynical
		}
		NOT = {
			has_character_modifier = big_spender
		}
		treasury = 10
		any_vassal = {
			OR = {
				trait = greedy
				trait = gregarious
				treasury = 50
			}
		}
		NOT = { is_inaccessible_trigger = yes }
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 2.5
			trait = gregarious
		}

		modifier = {
			factor = 1.5
			trait = charitable
		}
	}
	
	immediate = { set_character_flag = 4115 }

	option = {
		name = "EVTOPTA4115"
		treasury = -15
		prestige = 5
		add_character_modifier = {
			name = big_spender
			duration = 1825
		}
	}

	option = {
		name = "EVTOPTB4115"
		tooltip_info = greedy
		trigger = {
			trait = greedy
			NOT = {
				trait = cynical
			}
		}
		add_trait = cynical
	}

	option = {
		name = "EVTOPTC4115"
		trigger = {
			is_female = yes
			NOR = {
				trait = cynical
				trait = greedy
			}
		}
		add_trait = cynical
	}

	option = {
		name = "EVTOPTD4115"
		trigger = {
			NOR = {
				trait = shy
				trait = gregarious
				trait = greedy
			}
		}
		add_trait = shy
		hidden_tooltip = {
			character_event = {
				id = 38263 #Notify Shy
			}
		}
	}

	option = {
		name = "EVTOPTE4115"
		trigger = {
			trait = stressed
			NOT = { trait = greedy }
		}
		remove_trait = stressed
	}

	option = {
		name = "EVTOPTE4115"
		trigger = {
			NOR = {
				trait = shy
				trait = gregarious
				trait = greedy
				trait = stressed
			}
		}
		add_trait = gregarious
	}

	option = {
		name = "EVTOPTF4115"
		random_vassal = {
			limit = {
				OR = {
					trait = greedy
					trait = gregarious
					treasury = 50
				}
			}
			opinion = {
				modifier = opinion_irritated
				who = ROOT
				years = 10
			}
		}
	}
}

#Jousting
character_event = {
	id = 4120
	desc = "EVTDESC4120"
	picture = GFX_evt_joust

	is_triggered_only = yes

	min_age = 20
	only_playable = yes
	capable_only = yes
	prisoner = no
	only_men = yes
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4120 }
			had_character_flag = { flag = event_4120 days = 1825 }
		}
		in_command_trigger = no
		religion_group = christian
		any_courtier = {
			martial = 15
		}
		NOT = { is_inaccessible_trigger = yes }
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 2.5
			trait = craven
		}
		modifier = {
			factor = 2.5
			trait = humble
		}
	}
	
	immediate = { set_character_flag = event_4120 }

	option = {
		name = "EVTOPTA4120"
		trigger = {
			NOT = { trait = brave }
		}
		prestige = 10
	}


	option = {
		name = "EVTOPTD4120"
		tooltip_info = brave
		trigger = {
			trait = brave
		}
		prestige = 25
	}

	option = {
		name = "EVTOPTC4120"
		tooltip_info = proud
		trigger = {
			trait = proud
			any_courtier = {
				martial = 15
			}
		}
		random_courtier = {
			limit = {
				martial = 15
			}
			opinion = {
				modifier = proud_pos
				who = ROOT
				years = 5
			}
		}
	}

	option = {
		name = "EVTOPTF4120"
		trigger = {
			NOT = {
				trait = charitable
			}
		}
		add_trait = charitable
	}
}

#Tournaments
character_event = {
	id = 4125
	desc = "EVTDESC4125"
	picture = GFX_evt_joust

	is_triggered_only = yes

	min_age = 20
	only_playable = yes
	only_men = yes
	capable_only = yes
	prisoner = no
	war = no
	religion_group = christian

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4125 }
			had_character_flag = { flag = event_4125 days = 1825 }
		}
		in_command_trigger = no
		martial = 15
		intrigue = 10
		OR = {
			tier = duke
			tier = count
		}
		NOT = {
			trait = cynical
		}
		any_vassal = {
			trait = brave
		}
		NOT = { is_inaccessible_trigger = yes }
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 5
			trait = cynical
		}

		modifier = {
			factor = 2.5
			trait = charitable
		}
	}
	
	immediate = { set_character_flag = event_4125 }

	option = {
		name = "EVTOPTA4125"
		add_trait = cynical
	}

	option = {
		name = "EVTOPTB4125"
		tooltip_info = wroth
		trigger = {
			trait = wroth
		}
		scaled_wealth = -0.05
		prestige = 15
	}

	option = {
		name = "EVTOPTD4125"
		tooltip_info = gregarious
		trigger = {
			trait = gregarious
		}
		piety = 10
	}

	option = {
		name = "EVTOPTE4125"
		trigger = {
			NOT = { trait = craven }
		}
		random_vassal = {
			limit = {
				trait = brave
			}
			opinion = {
				modifier = opinion_approves
				who = ROOT
				years = 10
			}
		}
	}
}

#Festivals
character_event = {
	id = 4130
	desc = "EVTDESC4130"
	picture = GFX_evt_jugglers

	is_triggered_only = yes

	min_age = 20
	only_playable = yes
	only_men = yes
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4130 }
			had_character_flag = { flag = event_4130 days = 1825 }
		}
		in_command_trigger = no
		num_of_rivals = 1
		NOR = {
			tier = king
			tier = emperor
		}
		NOT = {
			trait = stressed
		}
		NOR = {
			trait = cynical
			trait = gregarious
		}
		any_vassal = {
			OR = {
				trait = honest
				trait = proud
				trait = greedy
			}
		}
		NOT = { is_inaccessible_trigger = yes }
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 5
			trait = cynical
		}

		modifier = {
			factor = 0.8
			trait = kind
		}
	}
	
	immediate = { set_character_flag = event_4130 }

	option = {
		name = "EVTOPTA4130"
		random_vassal = {
			limit = {
				OR = {
					trait = honest
					trait = proud
					trait = greedy
				}
			}
			opinion = {
				modifier = opinion_approves
				who = ROOT
				years = 10
			}
		}
	}

	option = {
		name = "EVTOPTB4130"
		add_trait = cynical
	}

	option = {
		name = "EVTOPTC4130"
		add_trait = gregarious
	}
}

#Wedding
character_event = {
	id = 4135
	desc = "EVTDESC4135"
	picture = GFX_evt_marriage

	is_triggered_only = yes

	min_age = 20
	only_playable = yes
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4135 }
			had_character_flag = { flag = event_4135 days = 1825 }
		}
		in_command_trigger = no
		NOT = {
			tier = king
		}
		NOT = {
			tier = emperor
		}
		any_vassal = {
			at_location = ROOT
			age = 50
			spouse = {
				is_abroad_trigger = no
				prisoner = no
				is_alive = yes
				NOT = {
					age = 25
				}
			}
		}
		NOR = {
			trait = gluttonous
			is_inaccessible_trigger = yes
		}
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 5
			trait = cynical
		}

		modifier = {
			factor = 3
			trait = wroth
		}

		modifier = {
			factor = 0.8
			trait = kind
		}

		modifier = {
			factor = 0.75
			trait = gregarious
		}
	}
	
	immediate = { set_character_flag = event_4135 }

	option = {
		name = "EVTOPTA4135"
		tooltip_info = chaste
		trigger = {
			trait = chaste
		}
		piety = 10
	}

	option = {
		name = "EVTOPTB4135"
		random_vassal = {
			limit = {
				at_location = ROOT
				age = 50
				spouse = {
					is_abroad_trigger = no
					prisoner = no
					is_alive = yes
					NOT = {
						age = 25
					}
				}
			}
			opinion = {
				modifier = opinion_pitiful
				who = ROOT
				years = 10
			}
		}
	}

	option = {
		name = "EVTOPTC4135"
		add_trait = gluttonous
	}
}

#Funeral Procession ID 4140 - moved to mourning_events.txt

#Bard
character_event = {
	id = 4145
	desc = "EVTDESC4145"
	picture = "GFX_evt_jugglers"

	is_triggered_only = yes

	min_age = 20
	only_playable = yes
	only_men = yes
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4145}
			had_character_flag = { flag = event_4145 days = 1825 }
		}
		in_command_trigger = no
		NOT = { has_character_flag = poet_help }
		NOR = {
			trait = cynical
			trait = shy
		}
		any_vassal = {
			NOT = {
				family = ROOT
			}
			diplomacy = 15
			OR = {
				trait = gregarious
				trait = kind
				trait = charitable
			}
		}
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 5
			trait = paranoid
		}

		modifier = {
			factor = 0.8
			trait = trusting
		}
	}
	
	immediate = { set_character_flag = event_4145 }

	option = {
		name = "EVTOPTA4145"
		add_trait = cynical
	}

	option = {
		name = "EVTOPTC4145"
		add_trait = shy
	}

	option = {
		name = "EVTOPTB4145"
		tooltip_info = wroth
		trigger = {
			trait = wroth
		}
		random_vassal = {
			limit = {
				NOT = {
					family = ROOT
				}
				diplomacy = 15
				OR = {
					trait = gregarious
					trait = kind
					trait = charitable
				}
			}
			set_character_flag = liege_wroth
			character_event = {
				id = 4146
				days = 2
				tooltip = "EVTTOOLTIP4146"
			}
		}
	}

	option = {
		tooltip_info = gregarious
		trigger = {
			trait = gregarious
		}
		name = "EVTOPTD4145"
		random_vassal = {
			limit = {
				NOT = {
					family = ROOT
				}
				diplomacy = 15
				OR = {
					trait = gregarious
					trait = kind
					trait = charitable
				}
			}
			set_character_flag = liege_gregarious
			character_event = {
				id = 4146
				days = 2
				tooltip = "EVTTOOLTIP4146"
			}
		}
	}

	option = {
		name = "EVTOPTE4145"
		tooltip_info = poet
		trigger = {
			trait = poet
		}
		change_diplomacy = 1
		set_character_flag = poet_help
	}
}

#Bard: Courtier reacts to Liege: wroth or gregarious
character_event = {
	id = 4146
	desc = "EVTDESC4146"
	picture = "GFX_evt_jugglers"

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4146"
		trigger = {
			has_character_flag = liege_wroth
		}
		clr_character_flag = liege_wroth
		FROM = {
			character_event = {
				id = 4147
				days = 2
				tooltip = "EVTTOOLTIP4147"
			}
		}
	}
	option = {
		name = "EVTOPTB4146"
		trigger = {
			has_character_flag = liege_gregarious
		}
		clr_character_flag = liege_gregarious
		FROM = {
			character_event = {
				id = 4148
				days = 2
				tooltip = "EVTTOOLTIP4148"
			}
		}
	}
}

#Bard: Wroth - The End
character_event = {
	id = 4147
	desc = "EVTDESC4147"
	picture = "GFX_evt_jugglers"

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4147"
		FROM = {
			opinion = {
				modifier = opinion_cruel
				who = ROOT
				years = 10
			}
		}
		random = {
			chance = 50
			remove_trait = wroth
			#TODO: add "lost wroth" notification.
		}
	}
}

#Bard: Gregarious - The End
character_event = {
	id = 4148
	desc = "EVTDESC4148"
	picture = "GFX_evt_jugglers"

	is_triggered_only = yes

	option = {
		name = "EVTOPTA4148"
		FROM = {
			opinion = {
				modifier = opinion_munificent
				who = ROOT
			}
		}
	}
}

#A Lord Returns to Sing about the Queen of Elfland
character_event = {
	id = 4150
	desc = "EVTDESC4150"
	picture = "GFX_evt_jugglers"

	is_triggered_only = yes

	min_age = 20
	only_playable = yes
	only_men = yes
	capable_only = yes
	prisoner = no
	religion_group = christian
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4150 }
			had_character_flag = { flag = event_4150 days = 1825 }
		}
		in_command_trigger = no
		father_even_if_dead = {
			is_alive = no
		}
		is_dumb_trigger = no
		NOR = {
			trait = kind
			has_character_modifier = the_suspicious
			has_character_modifier = the_kind
		}
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 5
			trait = trusting
		}

		modifier = {
			factor = 0.75
			trait = gregarious
		}
	}
	
	immediate = { set_character_flag = event_4150 }

	option = {
		name = "EVTOPTB4150"
		trigger = {
			NOT = { trait = gregarious }
		}
		prestige = -5
	}

	option = {
		name = "EVTOPTF4150"
		tooltip_info = gregarious
		trigger = {
			trait = gregarious
		}
		prestige = 10
	}

	option = {
		name = "EVTOPTC4150"
		trigger = {
			NOT = { trait = charitable }
		}
		prestige = -10
		add_trait = wroth
	}

	option = {
		name = EVTOPTE4150
		ai_chance = {
			factor = 0
		}
		create_character = {
			random_traits = yes
			dynasty = random
			age = 65
			female = no
			attributes = {
				learning = 8
			}
		}
		new_character = {
			give_nickname = nick_the_clueless
		}
	}
}

#Troubadours - Travelling musician who sang of courtly love
character_event = {
	id = 4155
	desc = "EVTDESC4155"
	picture = "GFX_evt_jugglers"

	is_triggered_only = yes

	min_age = 20
	only_playable = yes
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4155 }
			had_character_flag = { flag = event_4155 days = 1825 }
		}
		in_command_trigger = no
		religion_group = christian
		OR = {
			culture_group = latin
			culture_group = iberian
			culture_group = west_germanic
			culture_group = central_germanic
			culture_group = celtic
			culture = bulgarian
			culture = bolghar
		}
		NOT = { has_character_modifier = in_seclusion }
	}

	immediate = {
		set_character_flag = troubadour
		set_character_flag = event_4155
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 5
			trait = cynical
		}

		modifier = {
			factor = 2.5
			trait = charitable
		}
	}

	option = {
		name = "EVTOPTC4155"
		change_learning = 1
	}

	option = {
		name = "EVTOPTD4155"
		change_intrigue = 1
	}

	option = {
		name = "EVTOPTG4155"
		trigger = {
			OR = {
				culture = bolghar
				culture = bulgarian
			}
		}
		change_martial = 1
	}

	option = {
		name = "EVTOPTF4155"
		trigger = { wealth = 10 }
		wealth = -10
		prestige = 25
		if = {
			limit = { NOT = { trait = charitable } }
			add_trait = charitable
		}
		random_vassal = {
			limit = {
				learning = 10
				NOT = { trait = incapable }
				prisoner = no
			}
			opinion = {
				modifier = charitable_pos
				who = ROOT
				years = 10
			}
		}
	}
}

#Travelling Acrobats ID 4160 - moved to feast_events.txt


#Travelling Dancer - moved to feast_events.txt


#Performing Bear ID 4170 - moved to summer_fair_events.txt

#Bal des Ardents
character_event = {
	id = 4175
	desc = "EVTDESC4175"
	picture = GFX_evt_feast

	is_triggered_only = yes

	min_age = 20
	only_playable = yes
	only_men = yes
	capable_only = yes
	prisoner = no
	war = no

	trigger = {
		OR = {
			NOT = { has_character_flag = event_4175 }
			had_character_flag = { flag = event_4175 days = 1825 }
		}
		in_command_trigger = no
		OR = {
			trait = lunatic
			trait = possessed
			trait = drunkard
			trait = hedonist
		}
		NOT = { is_inaccessible_trigger = yes }
	}

	weight_multiplier = {
		days = 1

		modifier = {
			factor = 2
			trait = lunatic
		}
	}
	
	immediate = { set_character_flag = event_4175 }

	option = {
		name = "EVTOPTA4175"
		trigger = {
			NOR = {
				any_courtier = {
					is_adult = yes
					trait = diligent
					is_female = no
				}
				any_courtier = {
					is_adult = yes
					trait = ambitious
					OR = {
						trait = cruel
						trait = wroth
					}
					is_female = no
				}
			}
		}
		add_trait = wounded
	}

	option = {
		name = "EVTOPTB4175"
		trigger = {
			any_courtier = {
				is_adult = yes
				trait = diligent
				is_female = no
			}
			NOT = {
				any_courtier = {
					is_adult = yes
					trait = ambitious
					OR = {
						trait = cruel
						trait = wroth
					}
					is_female = no
				}
			}
		}
		random = {
			chance = 50
			add_trait = wounded
			hidden_tooltip = { character_event = { id = 38280 } }
		}
		random_courtier = {
			limit = {
				is_adult = yes
				trait = diligent
				is_female = no
			}
			reverse_opinion = {
				modifier = opinion_my_saviour
				who = ROOT
				years = 10
			}
		}
	}

	option = {
		name = "EVTOPTC4175"
		trigger = {
			any_courtier = {
				is_adult = yes
				trait = ambitious
				OR = {
					trait = cruel
					trait = wroth
				}
				is_female = no
			}
		}
		add_maimed_trait_effect = yes
		random_courtier = {
			limit = {
				is_adult = yes
				trait = ambitious
				OR = {
					trait = cruel
					trait = wroth
				}
				is_female = no
			}
			reverse_opinion = {
				modifier = opinion_fool_courtier
				who = ROOT
				years = 10
			}
		}
	}
}
