## Female councillor events, reserved numbers 77760-77795

### RANDOM NEW FEMALE COUNCILLOR CANDIDATE ###

# Creates the councillor
character_event = {
	id = 77777

	is_triggered_only = yes # on_yearly_pulse, random_events
	hide_window = yes

	only_playable = yes
	only_capable = yes
	min_age = 16
	prisoner = no

	trigger = {
		OR = {
			job_chancellor = {
				diplomacy < 12
			}

			job_marshal = {
				martial < 12
			}

			job_treasurer = {
				stewardship < 12
			}

			job_spymaster = {
				intrigue < 12
			}
		}

		is_inaccessible_trigger = no
		has_gender_equal_game_rule_trigger = no

		NOR = {
			has_law = council_privileges_1
			has_religion_feature = religion_matriarchal
			has_religion_feature = religion_patriarchal
			has_religion_feature = religion_equal
			has_religion_feature = religion_feature_bon
		}
	}

	immediate = {
		random_list = {
			# Nope
			60 = {}

			# Chancellor
			25 = {
				trigger = {
					job_chancellor = {
						diplomacy < 12
					}
				}

				mult_modifier = {
					factor = 5

					has_dlc = "Conclave"

					NOR = {
						has_law = status_of_women_2
						has_law = status_of_women_3
						has_law = status_of_women_4
					}
				}

				create_character = {
					female = yes
					age = 35
					dynasty = random
					religion = ROOT
					culture = ROOT
					add_trait = charismatic_negotiator
					random_traits = yes

					attributes = {
						martial = 2
						diplomacy = 10
						stewardship = 2
						intrigue = 2
						learning = 2
					}
				}

				new_character = {
					save_event_target_as = female_councillor

					remove_trait = slow
					remove_trait = imbecile
					remove_trait = dull
					remove_trait = shy
					remove_trait = deceitful
					remove_trait = content
					remove_lifestyle_trait_effect = yes

					if = {
						limit = { has_dharmic_religion_trigger = yes }

						remove_trait = brahmin
						remove_trait = vaishya
						add_trait = kshatriya
					}

					# Adds some more traits
					random_list = {
						20 = { add_trait = attractive }
						20 = { add_trait = poet }
						20 = { add_trait = socializer }
						20 = { add_trait = game_master }
						20 = { add_trait = hedonist }
					}

				}

				character_event = { id = 77779 }
			}

			# Marshal
			10 = {
				trigger = {
					job_marshal = {
						martial < 12
					}
				}

				mult_modifier = {
					factor = 5

					has_dlc = "Conclave"

					NOR = {
						has_law = status_of_women_3
						has_law = status_of_women_4
					}
				}

				create_character = {
					female = yes
					age = 37
					dynasty = random
					religion = ROOT
					culture = ROOT
					add_trait = skilled_tactician
					add_trait = brave
					random_traits = yes

					attributes = {
						martial = 10
						diplomacy = 2
						stewardship = 2
						intrigue = 2
						learning = 2
					}
				}

				new_character = {
					save_event_target_as = female_councillor

					remove_trait = slow
					remove_trait = imbecile
					remove_trait = dull
					remove_trait = craven
					remove_trait = frail
					remove_trait = weak
					remove_trait = content
					remove_lifestyle_trait_effect = yes

					if = {
						limit = { has_dharmic_religion_trigger = yes }

						remove_trait = brahmin
						remove_trait = vaishya
						add_trait = kshatriya
					}

					# Adds some more traits
					random_list = {
						# Brawny Tomboy
						25 = {
							add_trait = brawny
							add_trait = uncouth
							add_trait = aggressive_leader
						}

						# Duelist
						25 = {
							add_trait = duelist
							add_trait = inspiring_leader
						}

						# Hunter
						25 = {
							add_trait = hunter
							add_trait = flanker
						}

						# Strategist
						25 = {
							add_trait = strategist
							add_trait = unyielding_leader
						}
					}

				}

				character_event = { id = 77780 }
			}

			# Steward
			10 = {
				trigger = {
					job_treasurer = {
						stewardship < 12
					}
				}

				mult_modifier = {
					factor = 5

					has_dlc = "Conclave"

					NOR = {
						has_law = status_of_women_2
						has_law = status_of_women_3
						has_law = status_of_women_4
					}
				}

				create_character = {
					female = yes
					age = 38
					dynasty = random
					religion = ROOT
					culture = ROOT
					add_trait = fortune_builder
					random_traits = yes

					attributes = {
						martial = 2
						diplomacy = 2
						stewardship = 10
						intrigue = 2
						learning = 2
					}
				}

				new_character = {
					save_event_target_as = female_councillor

					remove_trait = slow
					remove_trait = imbecile
					remove_trait = dull
					remove_trait = arbitrary
					remove_trait = content
					remove_lifestyle_trait_effect = yes

					if = {
						limit = { has_dharmic_religion_trigger = yes }

						remove_trait = brahmin
						remove_trait = kshatriya
						add_trait = vaishya
					}

					# Adds some more traits
					random_list = {
						25 = { add_trait = administrator }
						25 = { add_trait = architect }
						25 = { add_trait = gardener }
						25 = { add_trait = shrewd }
					}

				}

				character_event = { id = 77781 }
			}

			# Spymaster
			10 = {
				trigger = {
					job_spymaster = {
						intrigue < 12
					}
				}

				mult_modifier = {
					factor = 5

					has_dlc = "Conclave"

					NOR = {
						has_law = status_of_women_1
						has_law = status_of_women_2
						has_law = status_of_women_3
						has_law = status_of_women_4
					}
				}

				create_character = {
					female = yes
					age = 42
					dynasty = random
					religion = ROOT
					culture = ROOT
					add_trait = intricate_webweaver
					random_traits = yes

					attributes = {
						martial = 2
						diplomacy = 2
						stewardship = 2
						intrigue = 10
						learning = 2
					}
				}

				new_character = {
					save_event_target_as = female_councillor

					remove_trait = slow
					remove_trait = imbecile
					remove_trait = dull
					remove_trait = trusting
					remove_trait = honest
					remove_trait = content
					remove_lifestyle_trait_effect = yes

					if = {
						limit = { has_dharmic_religion_trigger = yes }

						remove_trait = brahmin
						remove_trait = kshatriya
						add_trait = vaishya
					}

					# Adds some more traits
					random_list = {
						# Schemer
						33 = { add_trait = master_schemer }

						# Impaler
						33 = { add_trait = impaler }

						# Seductress
						33 = {
							remove_trait = chaste
							add_trait = master_seductress
							add_trait = lustful
							add_trait = attractive
						}

						# Deceitful, paranoid & ugly
						33 = {
							add_trait = ugly
							add_trait = shrewd
						}
					}

				}

				character_event = { id = 77782 }
			}
		}
	}
}

# Female chancellor appears
character_event = {
	id = 77779
	desc = EVTDESC_77779
	picture = GFX_evt_courtiers_talking
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes

	option = {
		name = EVTOPTA_77779

		reverse_opinion = {
			name = opinion_fired_from_council
			who = job_chancellor
			years = 5
		}

		event_target:female_councillor = {
			show_scope_change = no

			give_job_title = job_chancellor
		}

		if = {
			limit = { has_dlc = "Conclave" }

			add_favor = event_target:female_councillor

			trigger_switch = {
				on_trigger = has_law

				status_of_women_1 = { female_councilor_effect_1 = yes }
				status_of_women_0 = { female_councilor_effect_2 = yes }
			}
		}

		else = {
			female_councilor_effect_3 = yes
		}

		# Gets her married
		hidden_effect = {
			if = {
				limit = {
					any_courtier = {
						is_female = no
						is_adult = yes
						prisoner = no
						is_unimportant_trigger = yes
						NOT = { character = ROOT }
					}
				}

				random_courtier = {
					limit = {
						is_female = no
						is_adult = yes
						prisoner = no
						is_unimportant_trigger = yes
						NOT = { character = ROOT }
					}

					add_spouse_matrilineal = event_target:female_councillor
				}
			}
			else = {
				create_random_diplomat = {
					random_traits = yes
					dynasty = none
					female = no
					age = 37
				}

				new_character = {
					add_spouse_matrilineal = event_target:female_councillor
				}
			}
		}

	#	ai_chance = {
	#		factor = 2
	#
	#		mult_modifier = {
	#			factor = 5
	#			trait = cynical
	#		}
	#
	#		mult_modifier = {
	#			factor = 5
	#			trait = trusting
	#		}
	#	}
	}

	option = {
		name = EVTOPTB_77779

		hidden_effect = {
			event_target:female_councillor = {
				death = { death_reason = death_missing }
			}
		}

		ai_chance = { factor = 98 }
	}
}

# Female marshal appears
character_event = {
	id = 77780
	desc = EVTDESC_77780
	picture = GFX_evt_melee
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_77780

		reverse_opinion = {
			name = opinion_fired_from_council
			who = job_marshal
			years = 5
		}

		event_target:female_councillor = {
			show_scope_change = no

			give_job_title = job_marshal
		}

		if = {
			limit = { has_dlc = "Conclave" }

			add_favor = event_target:female_councillor

			trigger_switch = {
				on_trigger = has_law

				status_of_women_2 = { female_councilor_effect_1 = yes }
				status_of_women_1 = { female_councilor_effect_2 = yes }
				status_of_women_0 = { female_councilor_effect_3 = yes }
			}
		}
		else = {
			female_councilor_effect_3 = yes
		}

		# Gets her married
		hidden_effect = {
			if = {
				limit = {
					any_courtier = {
						is_female = no
						is_adult = yes
						prisoner = no
						is_unimportant_trigger = yes
						NOT = { character = ROOT }
					}
				}

				random_courtier = {
					limit = {
						is_female = no
						is_adult = yes
						prisoner = no
						is_unimportant_trigger = yes
						NOT = { character = ROOT }
					}

					add_spouse_matrilineal = event_target:female_councillor
				}
			}
			else = {
				create_random_soldier = {
					random_traits = yes
					dynasty = none
					female = no
					age = 37
				}

				new_character = {
					add_spouse_matrilineal = event_target:female_councillor
				}
			}
		}

	#	ai_chance = {
	#		factor = 2
	#
	#		mult_modifier = {
	#			factor = 5
	#			trait = cynical
	#		}
	#
	#		mult_modifier = {
	#			factor = 5
	#			trait = trusting
	#		}
	#	}
	}

	option = {
		name = EVTOPTB_77780

		hidden_effect = {
			event_target:female_councillor = {
				death = { death_reason = death_missing }
			}
		}

		ai_chance = {
			factor = 98
		}
	}
}

# Female steward appears
character_event = {
	id = 77781
	desc = EVTDESC_77781
	picture = GFX_evt_merchant_caravan
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes
	hide_new = yes

	option = {
		name = EVTOPTA_77781

		reverse_opinion = {
			name = opinion_fired_from_council
			who = job_treasurer
			years = 5
		}

		event_target:female_councillor = {
			show_scope_change = no

			give_job_title = job_treasurer
		}

		if = {
			limit = { has_dlc = "Conclave" }

			add_favor = event_target:female_councillor

			trigger_switch = {
				on_trigger = has_law

				status_of_women_1 = { female_councilor_effect_1 = yes }
				status_of_women_0 = { female_councilor_effect_2 = yes }
			}
		}
		else = {
			female_councilor_effect_3 = yes
		}

		# Gets her married
		hidden_effect = {
			if = {
				limit = {
					any_courtier = {
						is_female = no
						is_adult = yes
						prisoner = no
						is_unimportant_trigger = yes
						NOT = { character = ROOT }
					}
				}

				random_courtier = {
					limit = {
						is_female = no
						is_adult = yes
						prisoner = no
						is_unimportant_trigger = yes
						NOT = { character = ROOT }
					}

					add_spouse_matrilineal = event_target:female_councillor
				}
			}
			else = {
				create_random_steward = {
					random_traits = yes
					dynasty = none
					female = no
					age = 42
				}

				new_character = {
					add_spouse_matrilineal = event_target:female_councillor
				}
			}
		}

	#	ai_chance = {
	#		factor = 2
	#
	#		mult_modifier = {
	#			factor = 5
	#			trait = cynical
	#		}
	#
	#		mult_modifier = {
	#			factor = 5
	#			trait = trusting
	#		}
	#	}
	}

	option = {
		name = EVTOPTB_77781

		hidden_effect = {
			event_target:female_councillor = {
				death = { death_reason = death_missing }
			}
		}

		ai_chance = { factor = 98 }
	}
}

# Female spymaster appears
character_event = {
	id = 77782
	desc = EVTDESC_77782
	picture = GFX_evt_eavesdropping
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = {
		name = EVTOPTA_77782

		reverse_opinion = {
			name = opinion_fired_from_council
			who = job_spymaster
			years = 5
		}

		event_target:female_councillor = {
			show_scope_change = no

			give_job_title = job_spymaster
		}

		if = {
			limit = { has_dlc = "Conclave" }
			add_favor = event_target:female_councillor
		}

		# Gets her married
		hidden_effect = {
			if = {
				limit = {
					any_courtier = {
						is_female = no
						is_adult = yes
						prisoner = no
						is_unimportant_trigger = yes
						NOT = { character = ROOT }
					}
				}

				random_courtier = {
					limit = {
						is_female = no
						is_adult = yes
						prisoner = no
						is_unimportant_trigger = yes
						NOT = { character = ROOT }
					}

					add_spouse_matrilineal = event_target:female_councillor
				}
			}
			else = {
				create_random_intriguer = {
					random_traits = yes
					dynasty = none
					female = no
					age = 29
				}

				new_character = {
					add_spouse_matrilineal = event_target:female_councillor
				}
			}
		}

	#	ai_chance = {
	#		factor = 2
	#
	#		mult_modifier = {
	#			factor = 5
	#			trait = cynical
	#		}
	#
	#		mult_modifier = {
	#			factor = 5
	#			trait = trusting
	#		}
	#	}
	}

	option = {
		name = EVTOPTB_77782

		hidden_effect = {
			event_target:female_councillor = {
				death = { death_reason = death_missing }
			}
		}

		ai_chance = { factor = 98 }
	}
}

### FEMALE RELATIVE COUNCILLOR CANDIDATE ###

# Finds a talented female relative
character_event = {
	id = 77790

	hide_window = yes
	is_triggered_only = yes # on_yearly_pulse, random_events

	only_playable = yes
	only_capable = yes
	min_age = 16
	prisoner = no

	trigger = {
		gender_equality_trigger = no

		NOR = {
			has_law = status_of_women_3
			has_law = council_privileges_1

			has_religion_feature = religion_matriarchal
			has_religion_feature = religion_patriarchal
		}

		any_courtier_or_vassal = {
			is_close_relative = ROOT
			is_female = yes
			is_adult = yes
			is_councillor = no
			ai = yes

			OR = {
				# Diplomacy woman who can't be councillor
				AND = {
					diplomacy >= 15
					NOT = { can_hold_title = job_chancellor }
				}

				# Martial woman who can't be councillor
				AND = {
					martial >= 15
					NOT = { can_hold_title = job_marshal }
				}

				# Stewardship woman who can't be councillor
				AND = {
					stewardship >= 15
					NOT = { can_hold_title = job_treasurer }
				}

				# Spymaster woman who can't be councillor
				AND = {
					intrigue >= 15

					NOR = {
						is_married = ROOT
						is_mother = ROOT
						can_hold_title = job_spymaster
					}
				}
			}

			NOR = {
				trait = content

				has_opinion_modifier = {
					name = opinion_refused_council
					who = ROOT
				}
			}
		}
	}

	immediate = {
		any_courtier_or_vassal = {
			limit = {
				is_close_relative = ROOT
				is_female = yes
				is_adult = yes
				is_councillor = no
				ai = yes

				OR = {
					# Diplomacy woman who can't be councillor
					AND = {
						diplomacy >= 15
						NOT = { can_hold_title = job_chancellor }
					}

					# Martial woman who can't be councillor
					AND = {
						martial >= 15
						NOT = { can_hold_title = job_marshal }
					}

					# Stewardship woman who can't be councillor
					AND = {
						stewardship >= 15
						NOT = { can_hold_title = job_treasurer }
					}

					# Spymaster woman who can't be councillor
					AND = {
						intrigue >= 15

						NOR = {
							is_married = ROOT
							is_mother = ROOT
							can_hold_title = job_spymaster
						}
					}
				}

				NOR = {
					trait = content

					has_opinion_modifier = {
						name = opinion_refused_council
						who = ROOT
					}
				}
			}

			score_value = {
				value = 10
				interesting_courtier_selection_score = yes
			}

			# Which position will she ask for?

			random_list = {
				# Chancellor
				25 = {
					trigger = {
						diplomacy >= 15
						NOT = { can_hold_title = job_chancellor }

					}

					save_event_target_as = female_councillor

					ROOT = {
						character_event = { id = 77792 }
					}
				}

				# Marshal
				25 = {
					trigger = {
						martial >= 15
						NOT = { can_hold_title = job_marshal }
					}

					save_event_target_as = female_councillor

					ROOT = {
						character_event = { id = 77793 }
					}
				}

				# Steward
				25 = {
					trigger = {
						stewardship >= 15
						NOT = { can_hold_title = job_treasurer }
					}

					save_event_target_as = female_councillor

					ROOT = {
						character_event = { id = 77794 }
					}
				}

				# Spymaster
				25 = {
					trigger = {
						intrigue >= 15

						NOR = {
							is_married = ROOT
							is_mother = ROOT
							can_hold_title = job_spymaster
						}
					}

					save_event_target_as = female_councillor

					ROOT = {
						character_event = { id = 77795 }
					}
				}
			}
		}
	}
}

# Female relative asks to be chancellor
character_event = {
	id = 77792
	desc = EVTDESC_77792
	picture = GFX_evt_wise_woman
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes

	option = {
		name = EVTOPTA_77795

		reverse_opinion = {
			name = opinion_fired_from_council
			who = job_chancellor
			years = 5
		}

		event_target:female_councillor = {
			show_scope_change = no

			give_job_title = job_chancellor
		}

		if = {
			limit = { has_dlc = "Conclave" }

			trigger_switch = {
				on_trigger = has_law

				status_of_women_1 = { female_councilor_effect_1 = yes }
				status_of_women_0 = { female_councilor_effect_2 = yes }
			}
		}
		else = {
			female_councilor_effect_3 = yes
		}

		ai_chance = {
			factor = 25

			mult_modifier = {
				factor = 0.75
				trait = cynical
			}

			mult_modifier = {
				factor = 2
				trait = trusting
			}
		}
	}

	option = {
		name = EVTOPTB_77795

		reverse_opinion = {
			name = opinion_refused_council
			who = event_target:female_councillor
			years = 5
		}

		ai_chance = {
			factor = 75

			mult_modifier = {
				factor = 2
				job_chancellor = { is_landed = yes }
			}
		}
	}
}

# Female relative asks to be marshal
character_event = {
	id = 77793
	desc = EVTDESC_77793
	picture = GFX_evt_wise_woman
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_77795

		reverse_opinion = {
			name = opinion_fired_from_council
			who = job_marshal
			years = 5
		}

		event_target:female_councillor = {
			show_scope_change = no

			give_job_title = job_marshal
		}

		if = {
			limit = { has_dlc = "Conclave" }

			trigger_switch = {
				on_trigger = has_law

				status_of_women_2 = { female_councilor_effect_1 = yes }
				status_of_women_1 = { female_councilor_effect_2 = yes }
				status_of_women_0 = { female_councilor_effect_3 = yes }
			}
		}
		else = {
			female_councilor_effect_3 = yes
		}

		ai_chance = {
			factor = 25

			mult_modifier = {
				factor = 0.75
				trait = cynical
			}

			mult_modifier = {
				factor = 2
				trait = trusting
			}
		}
	}

	option = {
		name = EVTOPTB_77795

		reverse_opinion = {
			name = opinion_refused_council
			who = event_target:female_councillor
			years = 5
		}

		ai_chance = {
			factor = 75

			mult_modifier = {
				factor = 2
				job_marshal = { is_landed = yes }
			}
		}
	}
}

# Female relative asks to be treasurer
character_event = {
	id = 77794
	border = GFX_event_normal_frame_economy
	desc = EVTDESC_77794
	picture = GFX_evt_wise_woman

	is_triggered_only = yes


	option = {
		name = EVTOPTA_77795

		reverse_opinion = {
			name = opinion_fired_from_council
			who = job_treasurer
			years = 5
		}

		event_target:female_councillor = {
			show_scope_change = no

			give_job_title = job_treasurer
		}

		if = {
			limit = { has_dlc = "Conclave" }

			trigger_switch = {
				on_trigger = has_law

				status_of_women_1 = { female_councilor_effect_1 = yes }
				status_of_women_0 = { female_councilor_effect_2 = yes }
			}
		}
		else = {
			female_councilor_effect_3 = yes
		}

		ai_chance = {
			factor = 25

			mult_modifier = {
				factor = 0.75
				trait = cynical
			}

			mult_modifier = {
				factor = 2
				trait = trusting
			}
		}
	}

	option = {
		name = EVTOPTB_77795

		reverse_opinion = {
			name = opinion_refused_council
			who = event_target:female_councillor
			years = 5
		}

		ai_chance = {
			factor = 75

			mult_modifier = {
				factor = 2
				job_treasurer = { is_landed = yes }
			}
		}
	}
}

# Female relative asks to be spymaster
character_event = {
	id = 77795
	border = GFX_event_normal_frame_intrigue
	desc = EVTDESC_77795
	picture = GFX_evt_wise_woman

	is_triggered_only = yes

	option = {
		name = EVTOPTA_77795

		reverse_opinion = {
			name = opinion_fired_from_council
			who = job_spymaster
			years = 5
		}

		event_target:female_councillor = {
			show_scope_change = no

			give_job_title = job_spymaster

			opinion = {
				name = opinion_given_council_position_2
				who = ROOT
				years = 5
			}
		}

		ai_chance = {
			factor = 25

			mult_modifier = {
				factor = 0.75
				trait = cynical
			}

			mult_modifier = {
				factor = 2
				trait = trusting
			}
		}
	}

	option = {
		name = EVTOPTB_77795

		reverse_opinion = {
			name = opinion_refused_council
			who = event_target:female_councillor
			years = 5
		}

		ai_chance = {
			factor = 75

			mult_modifier = {
				factor = 2
				job_spymaster = { is_landed = yes }
			}
		}
	}
}

### FEMALE LANDED VASSAL WANTS TO BECOME COUNCILLOR ###
character_event = {
	id = 77760

	hide_window = yes
	is_triggered_only = yes # on_yearly_pulse, random_events

	only_playable = yes
	only_capable = yes
	min_age = 16
	prisoner = no

	trigger = {
		gender_equality_trigger = no

		NOR = {
			has_law = status_of_women_3
			has_law = council_privileges_1

			has_religion_feature = religion_matriarchal
			has_religion_feature = religion_patriarchal
		}

		any_vassal = {
			is_female = yes
			is_adult = yes
			is_landed = yes
			is_councillor = no
			prisoner = no
			in_revolt = no

			OR = {
				# Diplomacy woman who can't be councillor
				AND = {
					trigger_if = {
						limit = { diplomacy < 13 }

						has_education_diplomacy_trigger = yes

						OR = {
							trait = ambitious
							trait = proud
						}
					}

					NOT = { can_hold_title = job_chancellor }
				}

				# Martial woman who can't be councillor
				AND = {
					trigger_if = {
						limit = { martial < 13 }

						has_education_martial_trigger = yes

						OR = {
							trait = ambitious
							trait = proud
						}
					}

					NOT = { can_hold_title = job_marshal }
				}

				# Stewardship woman who can't be councillor
				AND = {
					trigger_if = {
						limit = { stewardship < 13 }

						has_education_stewardship_trigger = yes

						OR = {
							trait = ambitious
							trait = proud
						}
					}

					NOT = { can_hold_title = job_treasurer }
				}

				# Spymaster woman who can't be councillor
				AND = {
					trigger_if = {
						limit = { intrigue < 13 }

						has_education_intrigue_trigger = yes

						OR = {
							trait = ambitious
							trait = proud
						}
					}

					NOR = {
						is_married = ROOT
						is_mother = ROOT
						can_hold_title = job_spymaster
					}
				}
			}

			NOR = {
				has_opinion_modifier = {
					name = opinion_refused_council
					who = ROOT
				}

				trait = content
			}

		}
	}

	immediate = {
		any_vassal = {
			limit = {
				is_female = yes
				is_adult = yes
				is_landed = yes
				is_councillor = no
				prisoner = no
				in_revolt = no

				OR = {
					# Diplomacy woman who can't be councillor
					AND = {
						trigger_if = {
							limit = { diplomacy < 13 }

							has_education_diplomacy_trigger = yes

							OR = {
								trait = ambitious
								trait = proud
							}
						}

						NOT = { can_hold_title = job_chancellor }
					}

					# Martial woman who can't be councillor
					AND = {
						trigger_if = {
							limit = { martial < 13 }

							has_education_martial_trigger = yes

							OR = {
								trait = ambitious
								trait = proud
							}
						}

						NOT = { can_hold_title = job_marshal }
					}

					# Stewardship woman who can't be councillor
					AND = {
						trigger_if = {
							limit = { stewardship < 13 }

							has_education_stewardship_trigger = yes

							OR = {
								trait = ambitious
								trait = proud
							}
						}

						NOT = { can_hold_title = job_treasurer }
					}

					# Spymaster woman who can't be councillor
					AND = {
						trigger_if = {
							limit = { intrigue < 13 }

							has_education_intrigue_trigger = yes

							OR = {
								trait = ambitious
								trait = proud
							}
						}

						NOR = {
							is_married = ROOT
							is_mother = ROOT
							can_hold_title = job_spymaster
						}
					}
				}

				NOR = {
					trait = content

					has_opinion_modifier = {
						who = ROOT
						name = opinion_refused_council
					}
				}
			}

			score_value = {
				value = 10
				interesting_courtier_selection_score = yes
			}

			save_event_target_as = female_councillor
			character_event = { id = 77761 }
		}
	}
}

# Female vassal decides to ask for council position
character_event = {
	id = 77761
	desc = EVTDESC_77761
	picture = GFX_evt_wise_woman

	is_triggered_only = yes

	# Chancellor
	option = {
		name = EVTOPTA_77761

		trigger = {
			trigger_if = {
				limit = { diplomacy < 13 }

				has_education_diplomacy_trigger = yes

				OR = {
					trait = ambitious
					trait = proud
				}
			}

			NOT = { can_hold_title = job_chancellor }
		}

		FROM = {
			show_scope_change = no

			character_event = {
				id = 77762
				tooltip = EVTOPTA_77761_TOOLTIP
			}
		}
	}

	# Marshal
	option = {
		name = EVTOPTB_77761

		trigger = {
			trigger_if = {
				limit = { martial < 13 }

				has_education_martial_trigger = yes

				OR = {
					trait = ambitious
					trait = proud
				}
			}

			NOT = { can_hold_title = job_marshal }
		}

		FROM = {
			show_scope_change = no

			character_event = {
				id = 77763
				tooltip = EVTOPTB_77761_TOOLTIP
			}
		}
	}

	# Steward
	option = {
		name = EVTOPTC_77761

		trigger = {
			trigger_if = {
				limit = { stewardship < 13 }

				has_education_stewardship_trigger = yes

				OR = {
					trait = ambitious
					trait = proud
				}
			}

			NOT = { can_hold_title = job_treasurer }
		}

		FROM = {
			show_scope_change = no

			character_event = {
				id = 77764
				tooltip = EVTOPTC_77761_TOOLTIP
			}
		}
	}

	# Spymaster
	option = {
		name = EVTOPTD_77761

		trigger = {
			trigger_if = {
				limit = { intrigue < 13 }

				has_education_intrigue_trigger = yes

				OR = {
					trait = ambitious
					trait = proud
				}
			}

			NOR = {
				can_hold_title = job_spymaster
				is_mother = FROM
				is_married = FROM
			}
		}

		FROM = {
			show_scope_change = no

			character_event = {
				id = 77765
				tooltip = EVTOPTD_77761_TOOLTIP
			}
		}
	}

	# Actually no
	option = {
		name = EVTOPTE_77761

		custom_tooltip = { text = EVTOPTE_77761_TOOLTIP }

		remove_trait_silently_ambitious_effect = yes

		ai_chance = { factor = 0 }
	}
}

# Female vassal asks to be chancellor
character_event = {
	id = 77762
	desc = EVTDESC_77762
	picture = GFX_evt_wise_woman
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes

	option = {
		name = EVTOPTA_77795

		reverse_opinion = {
			name = opinion_fired_from_council
			who = job_chancellor
			years = 5
		}

		FROM = {
			show_scope_change = no

			give_job_title = job_chancellor

			character_event = {
				id = 77766
				days = 15
			}
		}

		if = {
			limit = { has_dlc = "Conclave" }

			trigger_switch = {
				on_trigger = has_law

				status_of_women_1 = { female_councilor_effect_1 = yes }
				status_of_women_0 = { female_councilor_effect_2 = yes }
			}
		}
		else = {
			female_councilor_effect_3 = yes
		}

		ai_chance = {
			factor = 25

			mult_modifier = {
				factor = 0.75
				trait = cynical
			}

			mult_modifier = {
				factor = 2
				trait = trusting
			}
		}
	}

	option = {
		name = EVTOPTB_77795

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_refused_council_position
				who = ROOT
				years = 15
			}

			character_event = {
				id = 77767
				days = 15
			}
		}

		ai_chance = {
			factor = 75

			mult_modifier = {
				factor = 2
				job_chancellor = { is_landed = yes }
			}
		}
	}
}

# Female vassal asks to be marshal
character_event = {
	id = 77763
	desc = EVTDESC_77763
	picture = GFX_evt_wise_woman
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_77795

		reverse_opinion = {
			name = opinion_fired_from_council
			who = job_marshal
			years = 5
		}

		FROM = {
			show_scope_change = no

			give_job_title = job_marshal

			character_event = {
				id = 77766
				days = 15
			}
		}

		if = {
			limit = { has_dlc = "Conclave" }

			trigger_switch = {
				on_trigger = has_law

				status_of_women_2 = { female_councilor_effect_1 = yes }
				status_of_women_1 = { female_councilor_effect_2 = yes }
				status_of_women_0 = { female_councilor_effect_3 = yes }
			}
		}
		else = {
			female_councilor_effect_3 = yes
		}

		ai_chance = {
			factor = 25

			mult_modifier = {
				factor = 0.75
				trait = cynical
			}

			mult_modifier = {
				factor = 2
				trait = trusting
			}
		}
	}

	option = {
		name = EVTOPTB_77795

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_refused_council_position
				who = ROOT
				years = 15
			}

			character_event = {
				id = 77767
				days = 15
			}
		}

		ai_chance = {
			factor = 75

			mult_modifier = {
				factor = 2
				job_marshal = { is_landed = yes }
			}
		}
	}
}

# Female vassal asks to be treasurer
character_event = {
	id = 77764
	desc = EVTDESC_77764
	picture = GFX_evt_wise_woman
	border = GFX_event_normal_frame_economy

	is_triggered_only = yes

	option = {
		name = EVTOPTA_77795

		reverse_opinion = {
			name = opinion_fired_from_council
			who = job_treasurer
			years = 5
		}

		FROM = {
			show_scope_change = no

			give_job_title = job_treasurer

			character_event = {
				id = 77766
				days = 15
			}
		}

		if = {
			limit = { has_dlc = "Conclave" }

			trigger_switch = {
				on_trigger = has_law

				status_of_women_1 = { female_councilor_effect_1 = yes }
				status_of_women_0 = { female_councilor_effect_2 = yes }
			}
		}
		else = {
			female_councilor_effect_3 = yes
		}

		ai_chance = {
			factor = 25

			mult_modifier = {
				factor = 0.75
				trait = cynical
			}

			mult_modifier = {
				factor = 2
				trait = trusting
			}
		}
	}

	option = {
		name = EVTOPTB_77795

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_refused_council_position
				years = 15
				who = ROOT
			}

			character_event = {
				id = 77767
				days = 15
			}
		}

		ai_chance = {
			factor = 75

			mult_modifier = {
				factor = 2
				job_treasurer = { is_landed = yes }
			}
		}
	}
}

# Female vassal asks to be spymaster
character_event = {
	id = 77765
	desc = EVTDESC_77765
	picture = GFX_evt_wise_woman
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	option = {
		name = EVTOPTA_77795

		reverse_opinion = {
			name = opinion_fired_from_council
			who = job_spymaster
			years = 5
		}

		FROM = {
			show_scope_change = no

			give_job_title = job_spymaster

			opinion = {
				name = opinion_given_council_position_1
				who = ROOT
				years = 5
			}

			character_event = {
				id = 77766
				days = 15
			}
		}

		ai_chance = {
			factor = 25

			mult_modifier = {
				factor = 0.75
				trait = cynical
			}

			mult_modifier = {
				factor = 2
				trait = trusting
			}
		}
	}

	option = {
		name = EVTOPTB_77795

		FROM = {
			show_scope_change = no

			opinion = {
				name = opinion_refused_council_position
				who = ROOT
				years = 15
			}

			character_event = {
				id = 77767
				days = 15
			}
		}

		ai_chance = {
			factor = 75

			mult_modifier = {
				factor = 2
				job_spymaster = { is_landed = yes }
			}
		}
	}
}

# Yes council
character_event = {
	id = 77766
	desc = EVTDESC_77766
	picture = GFX_evt_council
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA_77766
	}
}

# No council
character_event = {
	id = 77767
	desc = EVTDESC_77767
	picture = GFX_evt_council
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes

	ai = no

	option = {
		name = EVTOPTA_77767

		tooltip = {
			opinion = {
				name = opinion_refused_council_position
				who = FROM
				years = 15
			}
		}
	}
}