code:
namespace = ie_sway_ongoing

# "A bold proposition"
# Code by Siudhne, writing by Inerrant Erotica
# 0001-0009
ie_sway_ongoing.0001 = {
	type = character_event
	title = ie_sway_ongoing.0001.t
	desc = ie_sway_ongoing.0001.desc
	theme = seduce_scheme
	override_background = { event_background = feast }
	left_portrait = scope:target
	right_portrait = scope:guest

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

	trigger = {
		is_available_healthy_adult = yes
		has_trait = brave
		scope:target = { is_available_healthy_adult = yes } # Actually not needed since children can currently neither sway nor get swayed, but could reasonably be changed by PDX later
		is_attracted_to_gender_of = scope:target
		NOR = {
			has_character_flag = had_event_ie_sway_ongoing_0001
			scope:target = { has_character_flag = had_event_ie_sway_ongoing_0001 }
		}
		OR = {
			has_relation_lover = scope:target
			is_consort_of = scope:target
		}

		# The way the event it written assumes that open displays of sexuality are shunned in the society
		trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = deviant GENDER_CHARACTER = scope:owner }
		trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = deviant GENDER_CHARACTER = scope:target }
	}

	immediate = {
		add_character_flag = {
			flag = had_event_ie_sway_ongoing_0001
			years = 20
		}
		# Find the other character for a potential sex scene
		if = {
			limit = { is_ai = no }
			scope:owner = { save_scope_as = possibly_player } # Not actually a player in case of ai-ai interactions
			scope:target = { save_scope_as = non_player }
		}
		else = {
			scope:owner = { save_scope_as = non_player }
			scope:target = { save_scope_as = possibly_player } # Not actually a player in case of ai-ai interactions
		}
		# Find a guest/witness
		random_courtier = {
			limit = {
				NOT = { this = scope:owner }
				NOT = { this = scope:target }
				is_ai = yes
				is_adult = yes
				is_available = yes
			}
			weight = {
				base = 1
				modifier = { # Prioritize spouses as "guests" if not swaying spouse anyway
					add = 5
					OR = {
						is_spouse_of = scope:target
						is_spouse_of = scope:owner
					}
				}
			}
			save_scope_as = guest
		}
	}

	# Continue explicitely
	option = {
		name = {
			trigger = { is_spouse_of = scope:target }
			text = ie_sway_ongoing.0001.a
		}
		name = {
			trigger = { NOT = { is_spouse_of = scope:target } }
			text = ie_sway_ongoing.0001.a2
		}

		if = {
			limit = {
				is_spouse_of = scope:target
			}
			custom_tooltip = ie_sway_ongoing.0001.a.tt
		}
		else = {
			custom_tooltip = ie_sway_ongoing.0001.a2.tt
		}

		scope:target = { trigger_event = ie_sway_ongoing.0002 }
	}

	# Abort
	option = {
		name = ie_sway_ongoing.0001.b

		stress_impact = {
			base = miniscule_stress_impact_gain
			deviant = miniscule_stress_impact_gain
			seducer = miniscule_stress_impact_gain
			lustful = minor_stress_impact_gain
			chaste = miniscule_stress_impact_loss
			celibate = miniscule_stress_impact_loss
		}

		# We want players to have some nice dialogue, consequences be damned!
		ai_chance = { base = 0 }
	}
}

# Target receives proposal
ie_sway_ongoing.0002 = {
	type = character_event
	title = ie_sway_ongoing.0001.t
	desc = ie_sway_ongoing.0002.desc
	theme = seduce_scheme
	override_background = { event_background = feast }
	left_portrait = scope:owner
	right_portrait = scope:guest

	immediate = {
		add_character_flag = {
			flag = had_event_ie_sway_ongoing_0001
			years = 20
		}
	}

	# Accept
	option = {
		trigger = {
			scope:target = {
				is_attracted_to_gender_of = scope:owner
				NOR = {
					has_trait = chaste
					has_trait = celibate
				}
			}
		}

		name = ie_sway_ongoing.0002.a
		custom_tooltip = ie_sway_ongoing.0002.a.tt
		save_scope_value_as = {
			name = temp_accept
			value = yes
		}
		ai_chance = {
			base = 100

			ai_value_modifier = {
				ai_boldness = 1
				ai_sociability = 1
			}

			# If lustful is ok in our society the other guests probably won't mind *that* much if we get caught
			modifier = {
				add = {
					value = ai_zeal
					multiply = 1
					min = 0
				}
				faith = {
					OR = {
						trait_is_virtue = lustful
						trait_is_sin = chaste
					}
				}
			}
			# If lustful is shunned in our society we sure as heck don't want to get caught
			modifier = {
				add = {
					value = ai_zeal
					multiply = -1
					max = 0
				}
				faith = {
					OR = {
						trait_is_virtue = chaste
						trait_is_sin = lustful
					}
				}
			}

			modifier = {
				add = 30
				has_trait = lustful
			}
		}

		scope:owner = {
			trigger_event = {
				id = ie_sway_ongoing.0003
				days = { 1 3 }
			}
		}
	}
	# Soft-rebuke but still sex
	option = {
		trigger = {
			scope:target = {
				is_attracted_to_gender_of = scope:owner
				NOR = {
					has_trait = celibate
				}
			}
		}

		name = ie_sway_ongoing.0002.b
		custom_tooltip = ie_sway_ongoing.0002.b.tt

		ai_chance = {
			base = 25
			modifier = {
				add = 25
				OR = {
					has_trait = chaste
					has_trait = celibate
				}
			}
		}
		scope:owner = {
			send_interface_toast = {
				title = ie_sway_ongoing.0002.soft_rebuke
				stress_impact = {
					base = miniscule_stress_impact_gain
					vengeful = miniscule_stress_impact_gain
				}
			}

			scope:possibly_player = {
				trigger_event = {
					id = ie_sway_ongoing.0007
					days = { 1 3 }
				}
			}
		}
	}
	# Hard-rebuke
	option = {
		name = ie_sway_ongoing.0002.c
		custom_tooltip = ie_sway_ongoing.0002.c.tt

		ai_chance = {
			base = 0
			modifier = {
				add = 75
				OR = {
					has_trait = chaste
					has_trait = celibate
				}
			}
		}
		scope:owner = {
			send_interface_toast = {
				title = ie_sway_ongoing.0002.hard_rebuke
				stress_impact = {
					base = minor_stress_impact_gain
					vengeful = minor_stress_impact_gain
				}
			}
		}
	}
}

# Narrate response for owner
ie_sway_ongoing.0003 = {
	type = character_event
	title = ie_sway_ongoing.0001.t
	desc = ie_sway_ongoing.0003.desc
	theme = seduce_scheme
	override_background = { event_background = feast }
	left_portrait = scope:target
	right_portrait = scope:guest

	option = {
		name = ie_sway_ongoing.0003.a
		custom_tooltip = ie_sway_ongoing.0003.a.tt

		trigger = {
			NOR = {
				scope:target = { has_trait = lustful }
				scope:target = { has_trait = brave }
			}
		}

		# Same duel for target
		duel = {
			skill = intrigue
			target = scope:guest
			30 = {
				compare_modifier = {
					value = scope:duel_value
				}
				custom_tooltip = ie_sway_ongoing.0003.a_success
			}
			20 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -1
				}

				sway_ongoing_0001_failure_effect = { OTHER = scope:target }
			}
		}
	}

	option = {
		name = ie_sway_ongoing.0003.a
		custom_tooltip = ie_sway_ongoing.0003.a.tt
		custom_tooltip = ie_sway_ongoing.0003.b.tt

		trigger = {
			OR = {
				scope:target = { has_trait = lustful }
				scope:target = { has_trait = brave }
			}
		}

		sway_ongoing_0001_failure_effect = { OTHER = scope:target }
	}

	after = {
		scope:target = { trigger_event = ie_sway_ongoing.0004 }
	}
}

# Narrate event for target
ie_sway_ongoing.0004 = {
	type = character_event
	title = ie_sway_ongoing.0001.t
	desc = ie_sway_ongoing.0004.desc
	theme = seduce_scheme
	override_background = { event_background = feast }
	left_portrait = scope:owner
	right_portrait = scope:guest

	option = {
		name = ie_sway_ongoing.0004.a
		custom_tooltip = ie_sway_ongoing.0004.a.tt

		trigger = {
			NOR = {
				scope:target = { has_trait = lustful }
				scope:target = { has_trait = brave }
			}
		}

		# Same duel for owner
		duel = {
			skill = intrigue
			target = scope:guest
			30 = {
				compare_modifier = {
					value = scope:duel_value
				}
				custom_tooltip = ie_sway_ongoing.0003.a_success
			}
			20 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -1
				}

				sway_ongoing_0001_failure_effect = { OTHER = scope:owner }
			}
		}

		scope:owner = {
			trigger_event = {
				id = ie_sway_ongoing.0005
				days = { 1 3 }
			}
		}
	}

	option = {
		name = ie_sway_ongoing.0004.b
		custom_tooltip = ie_sway_ongoing.0004.b.tt

		if = {
			limit = {
				OR = {
					scope:target = { has_trait = lustful }
					scope:target = { has_trait = brave }
				}
			}
			custom_tooltip = ie_sway_ongoing.0004.b.tt2
		}

		sway_ongoing_0001_failure_effect = { OTHER = scope:owner }
		add_stress = minor_stress_impact_loss

		scope:owner = {
			trigger_event = {
				id = ie_sway_ongoing.0008
				days = { 1 3 }
			}
		}
	}
}

# Narrate end owner
ie_sway_ongoing.0005 = {
	type = character_event
	title = ie_sway_ongoing.0001.t
	desc = ie_sway_ongoing.0005.desc
	theme = seduce_scheme
	override_background = { event_background = feast }
	left_portrait = scope:target
	right_portrait = scope:guest

	option = {
		name = ie_sway_ongoing.0005.a

		add_character_modifier = {
			modifier = stimulated_modifier
			months = 6
		}

		scope:scheme = {
			add_scheme_progress = scheme_progress_gain
		}

		scope:target = { trigger_event = ie_sway_ongoing.0006 }
	}
}

# Narrate end target. Gameplay effects in initiator event.
ie_sway_ongoing.0006 = {
	type = character_event
	title = ie_sway_ongoing.0001.t
	desc = ie_sway_ongoing.0006.desc
	theme = seduce_scheme
	override_background = { event_background = feast }
	left_portrait = scope:owner
	right_portrait = scope:guest
	option = {
		name = ie_sway_ongoing.0005.a

		add_character_modifier = {
			modifier = stimulated_modifier
			months = 6
		}

		# Starts a sex scene for the player even if he is owner and not target
		carn_sex_scene_request_consensual = yes
		carn_sex_scene_effect = {
			PLAYER = scope:possibly_player
			TARGET = scope:non_player
			STRESS_EFFECTS = yes
			DRAMA = yes
		}
	}
}

# Soft-rebuke: Sex a few days later
# This event is the same for owner and target, just different descriptions for both
ie_sway_ongoing.0007 = {
	type = character_event
	title = ie_sway_ongoing.0001.t

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:owner = scope:possibly_player
				}
				desc = ie_sway_ongoing.0007.desc_owner
			}
			triggered_desc = {
				trigger = {
					scope:target = scope:possibly_player
				}
				desc = ie_sway_ongoing.0007.desc_target
			}
		}
	}
	theme = seduce_scheme
	override_background = { event_background = sitting_room }
	left_portrait = scope:target
	right_portrait = scope:owner

	option = {
		name = {
			trigger = { scope:owner = scope:possibly_player }
			text = ie_sway_ongoing.0007.a_owner
		}
		name = {
			trigger = { scope:target = scope:possibly_player }
			text = ie_sway_ongoing.0007.a_target
		}

		# Carnalitas framework sex scene
		carn_sex_scene_request_consensual = yes
		carn_sex_scene_effect = {
			PLAYER = scope:possibly_player
			TARGET = scope:non_player
			STRESS_EFFECTS = yes
			DRAMA = yes
		}
	}
}

# Special end owner
ie_sway_ongoing.0008 = {
	type = character_event
	title = ie_sway_ongoing.0001.t
	desc = ie_sway_ongoing.0008.desc
	theme = seduce_scheme
	override_background = { event_background = feast }
	left_portrait = scope:target
	right_portrait = scope:guest

	option = {
		name = ie_sway_ongoing.0008.a
		custom_tooltip = ie_sway_ongoing.0008.a.tt

		add_character_modifier = {
			modifier = stimulated_modifier
			years = 1
		}

		scope:scheme = {
			add_scheme_progress = scheme_progress_gain
		}

		scope:target = { trigger_event = ie_sway_ongoing.0009 }
	}
}

# Narrate end target. Gameplay effects in initiator event.
ie_sway_ongoing.0009 = {
	type = character_event
	title = ie_sway_ongoing.0001.t
	desc = ie_sway_ongoing.0009.desc
	theme = seduce_scheme
	override_background = { event_background = feast }
	left_portrait = scope:owner
	right_portrait = scope:guest
	option = {
		name = ie_sway_ongoing.0008.a
		custom_tooltip = ie_sway_ongoing.0008.a.tt

		add_character_modifier = {
			modifier = stimulated_modifier
			years = 1
		}

		# Starts a sex scene for the player even if he is owner and not target
		carn_sex_scene_request_consensual = yes
		carn_sex_scene_effect = {
			PLAYER = scope:possibly_player
			TARGET = scope:non_player
			STRESS_EFFECTS = yes
			DRAMA = yes
		}
	}
}

# # "Night and Day"
# Dummy event to determine who should receive which event
# This event can trigger if either the target or the owner is shy, and must determine which character to show what accordingly.
# Code by Siudhne, writing by Inerrant Erotica
# 0010 - 0012
ie_sway_ongoing.0010 = {
	type = character_event
	hidden = yes

	trigger = {
		OR = {
			has_trait = shy
			scope:target = { has_trait = shy }
		}
		is_available_healthy_adult = yes
		scope:target = { is_available_healthy_adult = yes }
		NOR = {
			has_character_flag = had_event_ie_sway_ongoing_0010
			scope:target = { has_character_flag = had_event_ie_sway_ongoing_0010 }
		}
		OR = {
			has_relation_lover = scope:target
			is_consort_of = scope:target
		}
	}

	# Shy person gets first event, other person the second.
	immediate = {
		if = {
			limit = {
				scope:target = { has_trait = shy }
			}
			save_scope_as = other_character
			scope:target = {
				save_scope_as = shy_character
				trigger_event = ie_sway_ongoing.0011
			}
		}
		else = {
			save_scope_as = shy_character
			scope:target = { save_scope_as = other_character }
			trigger_event = ie_sway_ongoing.0011
		}
	}
}

# "Night and Day"
# Starting point at ie_sway_ongoing.0010
ie_sway_ongoing.0011 = {
	type = character_event
	title = ie_sway_ongoing.0010.t
	desc = ie_sway_ongoing.0011.desc
	theme = seduce_scheme
	override_background = { event_background = bedchamber }
	left_portrait = {
		character = scope:shy_character
		animation = shame
	}
	right_portrait = {
		character = scope:other_character
		animation = flirtation
	}

	immediate = {
		add_character_flag = {
			flag = had_event_ie_sway_ongoing_0010
			years = 20
		}
		scope:other_character = {
			add_character_flag = {
				flag = had_event_ie_sway_ongoing_0010
				years = 20
			}
		}
		# Find the player character for a potential sex scene
		if = {
			limit = { is_ai = no }
			scope:other_character = { save_scope_as = possibly_player } # Not actually a player in case of ai-ai interactions
			scope:shy_character   = { save_scope_as = non_player }
		}
		else = {
			scope:shy_character   = { save_scope_as = non_player }
			scope:other_character = { save_scope_as = possibly_player } # Not actually a player in case of ai-ai interactions
		}
	}

	# Prefer light's off
	option = {
		name = ie_sway_ongoing.0011.a
		custom_tooltip = ie_sway_ongoing.0011.a.tt

		add_character_modifier = {
			modifier = shy_in_bed_modifier
			years = 1
		}

		scope:other_character = { trigger_event = ie_sway_ongoing.0012 }
	}

	# Endure the light
	option = {
		name = ie_sway_ongoing.0011.b
		custom_tooltip = ie_sway_ongoing.0011.b.tt

		stress_impact = { base = minor_stress_impact_gain }

		# We cheat a bit here - only if the *player* chooses this option does it result in a sex scene. The ai never picks this.
		# Otherwise the player would get a sex scene out of nowhere.
		if = {
			limit = { is_ai = no }
			carn_sex_scene_request_consensual = yes
			carn_sex_scene_effect = {
				PLAYER = scope:possibly_player
				TARGET = scope:non_player
				STRESS_EFFECTS = yes
				DRAMA = yes
			}
		}
		if = {
			limit = { this = scope:owner }
			scope:scheme = { add_scheme_progress = scheme_progress_gain }
		}
		ai_chance = { base = 0 }
	}
}

# "Night and Day"- for the other person
ie_sway_ongoing.0012 = {
	type = character_event
	title = ie_sway_ongoing.0010.t
	desc = ie_sway_ongoing.0012.desc
	theme = seduce_scheme
	override_background = { event_background = bedchamber }
	left_portrait = {
		character = scope:shy_character
		animation = shame
	}

	option = {
		name = ie_sway_ongoing.0012.a
		custom_tooltip = ie_sway_ongoing.0012.a.tt

		scope:shy_character = {
			send_interface_toast = {
				title = ie_sway_ongoing.0012.a2

				# Move closer to forming a friendship.
				progress_towards_friend_effect = {
					CHARACTER = scope:other_character
					OPINION = no
				}

				carn_sex_scene_request_consensual = yes
				carn_sex_scene_effect = {
					PLAYER = scope:possibly_player
					TARGET = scope:non_player
					STRESS_EFFECTS = yes
					DRAMA = yes
				}
			}
		}

		if = {
			limit = { this = scope:owner }
			scope:scheme = { add_scheme_progress = scheme_progress_gain }
		}

		ai_chance = {
			base = 100

			ai_value_modifier = {
				ai_compassion = 2
			}
		}
	}
	option = {
		name = ie_sway_ongoing.0012.b
		custom_tooltip = ie_sway_ongoing.0012.b.tt

		scope:shy_character = {
			send_interface_toast = {
				title = ie_sway_ongoing.0012.b2

				stress_impact = { base = minor_stress_impact_gain }

				scope:other_character = {
					stress_impact = {
						callous = medium_stress_impact_loss
						sadistic = medium_stress_impact_loss
						compassionate = minor_stress_impact_gain
					}
				}

				carn_sex_scene_request_consensual = yes
				carn_sex_scene_effect = {
					PLAYER = scope:possibly_player
					TARGET = scope:non_player
					STRESS_EFFECTS = yes
					DRAMA = yes
				}
			}
		}

		ai_chance = {
			base = 100

			ai_value_modifier = {
				ai_compassion = -1
			}
			modifier = {
				add = 100
				has_trait = stubborn
			}
		}
	}
	option = {
		name = ie_sway_ongoing.0012.c
		custom_tooltip = ie_sway_ongoing.0012.c.tt

		scope:shy_character = {
			send_interface_toast = {
				title = ie_sway_ongoing.0012.c2

				add_opinion = {
					target = scope:other_character
					modifier = disappointed_opinion
					opinion = -10
				}
				reverse_add_opinion = {
					target = scope:shy_character
					modifier = disappointed_opinion
					opinion = -10
				}
			}
		}

		ai_chance = {
			base = 100

			ai_value_modifier = {
				ai_rationality = -2
			}
		}
	}
}

# "Dead Fish"
# POV: You are lazy.
ie_sway_ongoing.0013 = {
	type = character_event
	title = ie_sway_ongoing.0013.t
	desc = ie_sway_ongoing.0013.desc
	theme = sway_scheme
	override_background = {
		event_background = bedchamber
	}
	left_portrait = scope:target

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

	trigger = {
		is_ai = no
		is_available_healthy_adult = yes
		has_trait = lazy
		scope:target = { is_available_healthy_adult = yes } # Actually not needed since children can currently neither sway nor get swayed, but could reasonably be changed by PDX later
		is_attracted_to_gender_of = scope:target
		NOR = {
			has_character_flag = had_event_ie_sway_ongoing_0013
			scope:target = { has_character_flag = had_event_ie_sway_ongoing_0013 }
		}
		is_spouse_of = scope:target
	}

	immediate = {
		add_character_flag = {
			flag = had_event_ie_sway_ongoing_0013
			years = 20
		}
		scope:target = {
			add_character_flag = {
				flag = had_event_ie_sway_ongoing_0013
				years = 20
			}
		}
	}

	option = {
		name = ie_sway_ongoing.0013.a

		show_as_tooltip = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:owner
				CHARACTER_2 = scope:target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = yes
				DRAMA = yes
			}
		}

		carn_sex_scene_request_consensual = yes
		carn_sex_scene_effect = {
			PLAYER = scope:owner
			TARGET = scope:target
			STRESS_EFFECTS = yes
			DRAMA = yes
		}
	}

	option = {
		name = ie_sway_ongoing.0013.b

		add_character_modifier = {
			modifier = slept_in_modifier
			years = 2
		}
		scope:target = {
			add_character_modifier = {
				modifier = early_bird_modifier
				years = 2
			}
		}
	}
}

# "Dead Fish"
# POV: Your spouse is lazy.
ie_sway_ongoing.0014 = {
	type = character_event
	title = ie_sway_ongoing.0013.t
	desc = ie_sway_ongoing.0014.desc
	theme = sway_scheme
	override_background = {
		event_background = bedchamber
	}
	left_portrait = scope:target

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

	trigger = {
		is_ai = no
		is_available_healthy_adult = yes
		scope:target = { is_available_healthy_adult = yes } # Actually not needed since children can currently neither sway nor get swayed, but could reasonably be changed by PDX later
		scope:target = { has_trait = lazy }
		is_attracted_to_gender_of = scope:target
		NOR = {
			has_character_flag = had_event_ie_sway_ongoing_0014
			scope:target = { has_character_flag = had_event_ie_sway_ongoing_0014 }
		}
		is_spouse_of = scope:target
	}

	immediate = {
		add_character_flag = {
			flag = had_event_ie_sway_ongoing_0014
			years = 20
		}
		scope:target = {
			add_character_flag = {
				flag = had_event_ie_sway_ongoing_0014
				years = 20
			}
		}
	}

	option = {
		name = ie_sway_ongoing.0014.a

		show_as_tooltip = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:owner
				CHARACTER_2 = scope:target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = yes
				DRAMA = yes
			}
		}

		carn_sex_scene_request_consensual = yes
		carn_sex_scene_effect = {
			PLAYER = scope:owner
			TARGET = scope:target
			STRESS_EFFECTS = yes
			DRAMA = yes
		}
	}

	option = {
		name = ie_sway_ongoing.0014.b

		add_character_modifier = {
			modifier = early_bird_modifier
			years = 2
		}
	}
}


code:
namespace = carn_sex_scene

#################################################################################
# 0001. PDX sex scene implementation
#
# This is an example of how to define a sex scene event for Carnalitas.
# The localization is from the vanilla CK3 event "seduce_outcome.2309"
#
# scope:carn_sex_player ------ The PLAYER (the one receiving the event)
# scope:carn_sex_target ------ The TARGET (the one the player is having sex with)
#
# Remember to add your sex scene to the carn_sex_scene on_action, or it won't appear!
#################################################################################

carn_sex_scene.0001 = {
	type = character_event
	title = carn_sex_scene.0001.t
	desc = {
		desc = carn_sex_scene.0001.desc_opening
		desc = carn_sex_scene.0001.desc_ending
	}

	theme = seduction
	override_background = { event_background = bedchamber }
	left_portrait = {
		character = scope:carn_sex_target
		animation = flirtation_left
	}

	trigger = {

		##########################################################################
		# Use triggers to list flags for your sex scene. See scripted_triggers/carn_sex_scene_triggers.txt for a list of triggers.
		##########################################################################

		carn_sex_scene_is_consensual = yes

		##########################################################################
		# Once you are done listing flags, make sure you include this trigger
		##########################################################################

		carn_sex_scene_matches_requested_flags_trigger = yes

		##########################################################################
		# Finally, you should check anything else that is relevant for the event.
		# For example, if your event is from the perspective of a male character penetrating a female target, you should make sure that scope:carn_sex_player is male and scope:carn_sex_target is female.
		##########################################################################
	}

	immediate = {

		##########################################################################
		# Copy and paste the flags for your event in the immediate block as well.
		# This will let carn_on_sex events firing from this event know what flags it had.
		##########################################################################

		carn_sex_scene_is_consensual = yes

		##########################################################################
		# Don't forget to include carn_had_sex_with_effect
		# pregnancy_chance can be changed to any value between 0 and 100
		# DO NOT CHANGE THE OTHER VARIABLES
		##########################################################################

		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
		}

		##########################################################################
		# carn_had_sex_with_effect will trigger the on_action "carn_on_sex," where you can add events to fire.
		# To check the flags of the sex scene, you can use triggers such as "carn_sex_scene_was_vaginal = yes"
		##########################################################################
	}

	option = {
		name = carn_sex_scene.0001.a
	}
}

license: unknown


code:
namespace = ie_carnal_court_sex_scene

#################################################################################
# 0001. PDX sex scene implementation
#
# This is an example of how to define a royal court sex scene event.
# I didn't feel like writing localization so it's just the carnalitas example localization
#
# scope:carn_sex_player ------ The PLAYER (the one receiving the event)
# scope:carn_sex_target ------ The TARGET (the one the player is having sex with)
#################################################################################

ie_carnal_court_sex_scene.0001 = {
	type = court_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = court

		##########################################################################
		# type = court_event is necessary, I don't think theme = court is, pretty sure any theme works
		# button_position_character defines which character has the icon over their head you can click on
		# roles define where the character's appear in the scene
		# you have to use the group here
		# groups are defined in gfx\court_scene\
		# new groups need to be added in the character_groups folder but there's no information that you need to add there
		# new roles are defined in character_roles which is where you define what group each role is in
		# where each role appears is then lastly defined in scene_settings
		# it is defined differently in each culture's setting, there are 3 for each
		##########################################################################

		##########################################################################
		# I have created a few different groups to make each animation work
		# the floor locator that you can see in blender determines vertically where each animation appears
		# the location of the floor locator in the first keyframe specifically
		# Needed a couple of groups because the differing foot location in the events
		# sex_bed_group is on the "bed"
		# sex_bed_high_group is a little above the "bed"
		# sex_bed_extremely_high_group is more aboce the "bed" (notice the female foot location to explain why)
		# sex_standing_group is just in front of the "bed"
		# sex_standing_held_group is for the woman riding the guy in sex_standing
		# warning that I think that there may be height adjustment issues, especially with standing scenes
		##########################################################################

	court_scene = {
		button_position_character = none
		court_event_force_open = yes
		roles = {
			scope:carn_sex_player = {
				group = sex_bed_group_1
				animation = sex
			}
			scope:carn_sex_target = {
				group = sex_bed_high_group_1
				animation = sex
			}
		}
	}
	trigger = {
		scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
		scope:carn_sex_player = { is_male = yes }
		scope:carn_sex_player.age >= 18
		scope:carn_sex_target.age >= 18
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
		}
	}

	option = {
		name = ie_consensual_sex_scene_missionary.0001.a
		carnal_court_leave_court_effect = yes
		##########################################################################
		# Once you select an option to dismiss the event, this expression removes the flag so that your court returns to normal
		##########################################################################
	}
}

ie_carnal_court_sex_scene.0002 = {
	type = court_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = court

	court_scene = {
		button_position_character = none
		court_event_force_open = yes
		roles = {
			scope:carn_sex_player = {
				group = sex_standing_group_1
				animation = sex_standing
			}
			scope:carn_sex_target = {
				group = sex_standing_held_group
				animation = sex_standing
			}
		}
	}
	trigger = {
		scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
		scope:carn_sex_player = { is_male = yes }
		scope:carn_sex_player.age >= 18
		scope:carn_sex_target.age >= 18
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
		}
	}
	option = {
		name = ie_consensual_sex_scene_missionary.0001.a
		carnal_court_leave_court_effect = yes
	}
}

ie_carnal_court_sex_scene.0003 = {
	type = court_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = court

	court_scene = {
		button_position_character = none
		court_event_force_open = yes
		roles = {
			scope:carn_sex_player = {
				group = sex_standing_held_group
				animation = sex_standing
			}
			scope:carn_sex_target = {
				group = sex_standing_group_1
				animation = sex_standing
			}
		}
	}
	trigger = {
		scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
		scope:carn_sex_player = { is_female = yes }
		scope:carn_sex_player.age >= 18
		scope:carn_sex_target.age >= 18
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
		}
	}
	option = {
		name = ie_consensual_sex_scene_missionary.0001.a
		carnal_court_leave_court_effect = yes
	}
}

ie_carnal_court_sex_scene.0004 = {
	type = court_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = court

	court_scene = {
		button_position_character = none
		court_event_force_open = yes
		roles = {
			scope:carn_sex_player = {
				group = sex_bed_high_group_1
				animation = sex_cowgirl
			}
			scope:carn_sex_target = {
				group = sex_bed_high_group_2
				animation = sex_cowgirl
			}
		}
	}
	trigger = {
		scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
		scope:carn_sex_player.age >= 18
		scope:carn_sex_target.age >= 18
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
		}
	}
	option = {
		name = ie_consensual_sex_scene_missionary.0001.a
		carnal_court_leave_court_effect = yes
	}
}

ie_carnal_court_sex_scene.0005 = {
	type = court_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = court

	court_scene = {
		button_position_character = none
		court_event_force_open = yes
		roles = {
			scope:carn_sex_player = {
				group = sex_bed_group_1
				animation = sex_reverse_cowgirl
			}
			scope:carn_sex_target = {
				group = sex_bed_group_2
				animation = sex_reverse_cowgirl
			}
		}
	}
	trigger = {
		scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
		scope:carn_sex_player.age >= 18
		scope:carn_sex_target.age >= 18
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
		}
	}
	option = {
		name = ie_consensual_sex_scene_missionary.0001.a
		carnal_court_leave_court_effect = yes
	}
}

ie_carnal_court_sex_scene.0006 = {
	type = court_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = court

	court_scene = {
		button_position_character = none
		court_event_force_open = yes
		roles = {
			scope:carn_sex_player = {
				group = sex_bed_high_group_1
				animation = sex_doggy
			}
			scope:carn_sex_target = {
				group = sex_bed_high_group_2
				animation = sex_doggy
			}
		}
	}
	trigger = {
		scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
		scope:carn_sex_player.age >= 18
		scope:carn_sex_target.age >= 18
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
		}
	}
	option = {
		name = ie_consensual_sex_scene_missionary.0001.a
		carnal_court_leave_court_effect = yes
	}
}

ie_carnal_court_sex_scene.0007 = {
	type = court_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = court

	court_scene = {
		button_position_character = none
		court_event_force_open = yes
		roles = {
			scope:carn_sex_player = {
				group = sex_bed_extreme_high_group_1
				animation = sex_missionary
			}
			scope:carn_sex_target = {
				group = sex_bed_extreme_high_group_2
				animation = sex_missionary
			}
		}
	}
	trigger = {
		scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
		scope:carn_sex_player.age >= 18
		scope:carn_sex_target.age >= 18
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
		}
	}
	option = {
		name = ie_consensual_sex_scene_missionary.0001.a
		carnal_court_leave_court_effect = yes
	}
}

ie_carnal_court_sex_scene.0008 = {
	type = court_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = court

	court_scene = {
		button_position_character = none
		court_event_force_open = yes
		roles = {
			scope:carn_sex_player = {
				group = sex_standing_group_1
				animation = sex_standing_doggy
			}
			scope:carn_sex_target = {
				group = sex_standing_group_2
				animation = sex_standing_doggy
			}
		}
	}
	trigger = {
		scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
		scope:carn_sex_player.age >= 18
		scope:carn_sex_target.age >= 18
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
		}
	}
	option = {
		name = ie_consensual_sex_scene_missionary.0001.a
		carnal_court_leave_court_effect = yes
	}
}

ie_carnal_court_sex_scene.0009 = {
	type = court_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = court

	court_scene = {
		button_position_character = none
		court_event_force_open = yes
		roles = {
			scope:carn_sex_player = {
				group = sex_bed_group_1
				animation = sex_fellatio
			}
			scope:carn_sex_target = {
				group = sex_bed_group_2
				animation = sex_fellatio
			}
		}
	}
	trigger = {
		scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
		scope:carn_sex_player.age >= 18
		scope:carn_sex_target.age >= 18
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
		}
	}
	option = {
		name = ie_consensual_sex_scene_missionary.0001.a
		carnal_court_leave_court_effect = yes
	}
}

ie_carnal_court_sex_scene.0010 = {
	type = court_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = court

	court_scene = {
		button_position_character = none
		court_event_force_open = yes
		roles = {
			scope:carn_sex_player = {
				group = sex_bed_group_1
				animation = sex_fellatio
			}
			scope:carn_sex_target = {
				group = sex_bed_group_2
				animation = sex_fellatio_hom
			}
		}
	}
	trigger = {
		scope:carn_sex_player = { is_male = yes }
		scope:carn_sex_target = { is_male = yes }
		scope:carn_sex_player.age >= 18
		scope:carn_sex_target.age >= 18
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
		}
	}
	option = {
		name = ie_consensual_sex_scene_missionary.0001.a
		carnal_court_leave_court_effect = yes
	}
}

ie_carnal_court_sex_scene.0011 = {
	type = court_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = court

	court_scene = {
		button_position_character = none
		court_event_force_open = yes
		roles = {
			scope:carn_sex_player = {
				group = sex_bed_high_group_1
				animation = sex_doggy
			}
			scope:carn_sex_target = {
				group = sex_bed_high_group_2
				animation = hom_sex
			}
		}
	}
	trigger = {
		scope:carn_sex_player = { is_male = yes }
		scope:carn_sex_target = { is_male = yes }
		scope:carn_sex_player.age >= 18
		scope:carn_sex_target.age >= 18
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
		}
	}
	option = {
		name = ie_consensual_sex_scene_missionary.0001.a
		carnal_court_leave_court_effect = yes
	}
}

ie_carnal_court_sex_scene.0012 = {
	type = court_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = court

	court_scene = {
		button_position_character = none
		court_event_force_open = yes
		roles = {
			scope:carn_sex_player = {
				group = sex_bed_group_1
				animation = hom_sex
			}
			scope:carn_sex_target = {
				group = sex_bed_group_2
				animation = hom_sex_2
			}
		}
	}
	trigger = {
		scope:carn_sex_player = { is_female = yes }
		scope:carn_sex_target = { is_female = yes }
		scope:carn_sex_player.age >= 18
		scope:carn_sex_target.age >= 18
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
		}
	}
	option = {
		name = ie_consensual_sex_scene_missionary.0001.a
		carnal_court_leave_court_effect = yes
	}
}

ie_carnal_court_sex_scene.0013 = {
	type = court_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = court

	court_scene = {
		button_position_character = none
		court_event_force_open = yes
		roles = {
			scope:carn_sex_player = {
				group = sex_bed_high_group_1
				animation = sex
			}
			scope:carn_sex_target = {
				group = sex_bed_group_1
				animation = sex
			}
		}
	}
	trigger = {
		scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
		scope:carn_sex_player = { is_female = yes }
		scope:carn_sex_player.age >= 18
		scope:carn_sex_target.age >= 18
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
		}

	}

	option = {
		name = ie_consensual_sex_scene_missionary.0001.a
		carnal_court_leave_court_effect = yes
	}
}


code:
# namespace = ie_consensual_sex_scene_missionary
namespace = ie_consensual_sex_scene

# Hidden event to decide whether carnal court or regular windows should be used
ie_consensual_sex_scene.0001 = {
	type = character_event

	trigger = {
		carn_sex_scene_is_consensual = yes
		carn_sex_scene_matches_requested_flags_trigger = yes
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		carnal_court_enter_court_effect = yes # Try carnal court function. Sets sex_animation_event, if it exists.
		if = {
			# Use carnal court animations? (requires CBO and available court - new CBO versions should always provide court)
			limit = {
				has_character_flag = sex_animation_event # Does carnal_court_enter_court_effect exist or is carnal court not installed?
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
			}
			trigger_event = { on_action = ie_carnal_court_sex_scenes_on_actions }
		}
		else_if  = {
			# Use animation-in-window (requires CBO, triggers in case no court is provided)
			limit = {
				has_character_flag = sex_animation_event # Does carnal_court_enter_court_effect exist or is carnal court not installed?
			}
			# No carnal court, use old window-style events
			trigger_event = ie_consensual_sex_scene.0004
		}
		else = {
			# Vanilla standing event
			trigger_event = ie_consensual_sex_scene.0002
		}
	}

	hidden = yes
}

# Missionary sex scene with vanilla animations
ie_consensual_sex_scene.0002 = {
	type = character_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = seduce_scheme

	left_portrait = {
		character = scope:carn_sex_player
		animation = flirtation
	}
	right_portrait = {
		character = scope:carn_sex_target
		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { is_male = no }
				scope:carn_sex_target = { is_male = yes }
			}
			animation = flirtation_left # Yes, I'm using _left for the right portrait
		}
		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { is_male = yes }
				scope:carn_sex_target = { is_male = yes }
			}
			animation = ecstasy
		}
		animation = flirtation
	}

	trigger = {
		carn_sex_scene_is_consensual = yes
		carn_sex_scene_matches_requested_flags_trigger = yes
	}

	immediate = {
		carn_sex_scene_is_consensual = yes
		scope:carn_sex_player = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = yes
				DRAMA = yes
			}
			carn_undress_character_effect = yes
		}

		scope:carn_sex_target = {
			carn_undress_character_effect = yes
		}
	}

	option = {
		trigger = {
			debug_only = yes
		}
		trigger_event = ie_consensual_sex_scene.0002
		name = ie_consensual_sex_scene_missionary.0001.debug
	}

	option = {
		hidden_effect = {
			scope:carn_sex_player = {
				carn_dress_character_effect = yes
			}
			scope:carn_sex_target = {
				carn_dress_character_effect = yes
			}
		}
		name = ie_consensual_sex_scene_missionary.0001.a
	}
}

# Consensual kissing (foreplay only), vanilla animations
ie_consensual_sex_scene.0003 = {
	type = character_event
	title = ie_consensual_kissing_scene.0001.t

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:giver = root
				}
				desc = ie_consensual_kissing_scene.0001.text_giving
			}
			desc = ie_consensual_kissing_scene.0001.text_receiving
		}
	}

	theme = romance_scheme
	left_portrait = {
		character = scope:portrait
		animation = flirtation
	}

	trigger = {
		carn_sex_scene_is_consensual = yes

		carn_sex_scene_matches_requested_flags_trigger = yes
	}

	immediate = {
		if = {
			limit = {
				scope:carn_sex_player = {
					has_trait_introverted_trigger = yes
				}
			}
			scope:carn_sex_target = { save_scope_as = giver }
			scope:carn_sex_player = { save_scope_as = receiver }
		}
		else = {
			scope:carn_sex_player = { save_scope_as = giver }
			scope:carn_sex_target = { save_scope_as = receiver }
		}

		if = {
			limit = { scope:carn_sex_player = root }
			scope:carn_sex_target = { save_scope_as = portrait }
		}
		else = {
			scope:carn_sex_player = { save_scope_as = portrait }
		}
	}

	# Debug option
	option = {
		name = ie_consensual_kissing_scene.0001.debug
		trigger = {
			debug_only = yes
		}
		trigger_event = ie_consensual_kissing_scene.0001
	}

	option = {
		name = ie_consensual_kissing_scene.0001.a

		scope:carn_sex_player = {
			trigger_event = ie_consensual_sex_scene.0002
		}

		ai_chance = {
			base = 0
		}
	}

	option = {
		name = ie_consensual_kissing_scene.0001.b

		random_list = {
			10 = {
				reverse_add_opinion = {
					target = scope:carn_sex_target
					modifier = romance_opinion
					opinion = 15
				}
			}
			20 = {
				reverse_add_opinion = {
					target = scope:carn_sex_target
					modifier = romance_opinion
					opinion = 5
				}
			}
		}

		ai_chance = {
			base = 100
		}
	}
}

ie_consensual_sex_scene.0004 = {
	type = character_event
	title = ie_consensual_sex_scene_missionary.0001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:carn_sex_player = {
						is_giving_partner_trigger = {
							PARTNER = scope:carn_sex_target
						}
					}
				}
				desc = ie_consensual_sex_scene_missionary.0001.text_giving
			}
			desc = ie_consensual_sex_scene_missionary.0001.text_receiving
		}
	}

	theme = seduce_scheme
	override_background = { event_background = bedchamber }

	left_portrait = {
		character = scope:carn_sex_player

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
				scope:carn_sex_player = { has_character_flag = sex }
				scope:carn_sex_target = { has_character_flag = sex }
			}
			animation = sex
		}

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
				scope:carn_sex_player = { has_character_flag = sex_standing }
				scope:carn_sex_target = { has_character_flag = sex_standing }
			}
			animation = sex_standing
		}

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
				scope:carn_sex_player = { has_character_flag = sex_cowgirl }
				scope:carn_sex_target = { has_character_flag = sex_cowgirl }
			}
			animation = sex_cowgirl
		}

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
				scope:carn_sex_player = { has_character_flag = sex_reverse_cowgirl }
				scope:carn_sex_target = { has_character_flag = sex_reverse_cowgirl }
			}
			animation = sex_reverse_cowgirl
		}

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
				scope:carn_sex_player = { has_character_flag = sex_doggy }
				scope:carn_sex_target = { has_character_flag = sex_doggy }
			}
			animation = sex_doggy
		}

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
				scope:carn_sex_player = { has_character_flag = sex_missionary }
				scope:carn_sex_target = { has_character_flag = sex_missionary }
			}
			animation = sex_missionary
		}

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
				scope:carn_sex_player = { has_character_flag = sex_standing_doggy }
				scope:carn_sex_target = { has_character_flag = sex_standing_doggy }
			}
			animation = sex_standing_doggy
		}

		##########################################################################
		# Second triggered animation plays if the characters are both male
		# Sex_doggy is also the primary sex animation for gay men who are penetrating
		# The only difference is that the male being penetrated has to use hom_sex
		##########################################################################

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { is_male = yes }
				scope:carn_sex_target = { is_male = yes }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
			}
			animation = sex_doggy
		}

		##########################################################################
		# Third triggered animation plays if the characters are both female
		# For Female Characters hom_sex and hom_sex_2 is a scissoring animation (which is really hard to animate)
		# In any lesbian sex animation you need to have one character using hom_sex and the other using hom_sex_2
		# Otherwise both will simply overlap each other
		##########################################################################

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { is_female = yes }
				scope:carn_sex_target = { is_female = yes }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
			}
			animation = hom_sex_2
		}

		##########################################################################
		# Final triggered animation is a fallback animation if one or both character is under 18
		# This is necessary since by default the game defines 16 as adult for gameplay
		##########################################################################

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { is_adult = yes }
				scope:carn_sex_target = { is_adult = yes }
			}
			animation = flirtation
		}
		outfit_tags = { complete_nudity }
	}

	right_portrait = {
		character = scope:carn_sex_target

		##########################################################################
		# First triggered animation, if opposite sex couple it plays the corresponding animation for the opposite gender
		##########################################################################

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
				scope:carn_sex_player = { has_character_flag = sex }
				scope:carn_sex_target = { has_character_flag = sex }
			}
			animation = sex
		}

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
				scope:carn_sex_player = { has_character_flag = sex_standing }
				scope:carn_sex_target = { has_character_flag = sex_standing }
			}
			animation = sex_standing
		}

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
				scope:carn_sex_player = { has_character_flag = sex_cowgirl }
				scope:carn_sex_target = { has_character_flag = sex_cowgirl }
			}
			animation = sex_cowgirl
		}

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
				scope:carn_sex_player = { has_character_flag = sex_reverse_cowgirl }
				scope:carn_sex_target = { has_character_flag = sex_reverse_cowgirl }
			}
			animation = sex_reverse_cowgirl
		}

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
				scope:carn_sex_player = { has_character_flag = sex_doggy }
				scope:carn_sex_target = { has_character_flag = sex_doggy }
			}
			animation = sex_doggy
		}

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
				scope:carn_sex_player = { has_character_flag = sex_missionary }
				scope:carn_sex_target = { has_character_flag = sex_missionary }
			}
			animation = sex_missionary
		}

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_opposite_of = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
				scope:carn_sex_player = { has_character_flag = sex_standing_doggy }
				scope:carn_sex_target = { has_character_flag = sex_standing_doggy }
			}
			animation = sex_standing_doggy
		}

		##########################################################################
		# Second triggered animation, if same sex couple it plays the corresponding animation
		# If it is a same sex male couple the correspoonding same sex animation to sex_doggy is hom_sex
		# If it is a same sex female couple the correspoonding same sex animation to hom_sex_2 is also hom_sex
		# Therefore only one triggered animation is required for both in this case
		##########################################################################

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { sex_same_as = scope:carn_sex_target }
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
			}
			animation = hom_sex
		}

		##########################################################################
		# Fallback Animation
		##########################################################################

		triggered_animation = {
			trigger = {
				scope:carn_sex_player = { is_adult = yes }
				scope:carn_sex_target = { is_adult = yes }
			}
			animation = flirtation_left
		}
		outfit_tags = { complete_nudity }
	}

	trigger = {
		scope:carn_sex_player = { is_adult = yes }
		scope:carn_sex_target = { is_adult = yes }

		carn_sex_scene_is_consensual = yes

		carn_sex_scene_matches_requested_flags_trigger = yes
	}

	immediate = {

		randomize_sex_animation_effect = yes

		if = {
			limit = {
				scope:carn_sex_player.age >= 18
				scope:carn_sex_target.age >= 18
			}
			set_global_variable = {
				name = sex_animation_event
				value = yes
			}
		}

		carn_sex_scene_is_consensual = yes

		scope:carn_sex_player  = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:carn_sex_player
				CHARACTER_2 = scope:carn_sex_target
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = scope:carn_sex_stress_effects
				DRAMA = scope:carn_sex_drama
			}
			carn_undress_character_effect = yes
		}

		scope:carn_sex_target = {
			carn_undress_character_effect = yes
		}

	}

	option = {
		trigger = {
			debug_only = yes
		}
		trigger_event = ie_consensual_sex_scene.0004
		name = ie_consensual_sex_scene_missionary.0001.debug
	}

	option = {
		hidden_effect = {
			scope:carn_sex_player = {
				carn_dress_character_effect = yes
			}
			scope:carn_sex_target = {
				carn_dress_character_effect = yes
			}
		}

		remove_global_variable = sex_animation_event
		remove_random_sex_animation_character_flags_effect = yes
		remove_character_flag = sex_animation_event
		scope:carn_sex_target = {
			remove_character_flag = sex_animation_event
		}

		name = ie_consensual_sex_scene_missionary.0001.a
	}
}


code:
namespace = carn_sex_scene

# Intimate Encounters: Block the generic carnalitas sex scene from triggering
# Also blocks CBO generic animated sex scene, if loaded below CBO
carn_sex_scene.0001 = {
	type = character_event
	title = carn_sex_scene.0001.t
	desc = {
		desc = carn_sex_scene.0001.desc_opening
		desc = carn_sex_scene.0001.desc_ending
	}

	theme = seduction
	override_background = { event_background = bedchamber }
	left_portrait = {
		character = scope:carn_sex_target
		animation = flirtation_left
	}

	trigger = {
		always = no
	}
	option = {
		name = carn_sex_scene.0001.a
	}
}


code:
namespace = ie_pet_animal

# "A Girl's Best Friend"
ie_pet_animal.0001 = {
	type = character_event
	title = ie_pet_animal.0001.t
	desc = ie_pet_animal.0001.desc
	theme = pet
	override_background = { event_background = bedchamber }

	trigger = {
		exists = scope:story
		NOT = { has_character_flag = refused_ie_pet_animal_0001 }
		NOT = { has_character_flag = had_event_ie_pet_animal_0001 }
		has_game_rule = carn_content_bestiality_enabled
		is_available_healthy_adult = yes
		is_female = yes
		scope:story = { var:dog_gender = flag:male }
		OR = {
			has_trait = lustful
			has_trait = fecund
			has_trait = deviant
		}
		any_spouse = {
			is_available_healthy_ai_adult = yes
			count = 0
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = 2
			carn_has_fetish_trigger = { FETISH = bestiality }
		}
	}

	immediate = {
		add_character_flag = {
			flag = had_event_ie_pet_animal_0001
			years = 5
		}
	}

	option = {
		name = ie_pet_animal.0001.a
		custom_tooltip = ie_pet_animal.0001.a.tt

		trigger_event = {
			id = ie_pet_animal.0002
			days = { 1 3 }
		}
	}

	option = {
		name = ie_pet_animal.0001.b
		custom_tooltip = ie_pet_animal.0001.b.tt

		add_character_flag = {
			flag = refused_ie_pet_animal_0001
		}
		add_stress = minor_stress_impact_loss
	}
}

# "A Girl's Best Friend" (cont.)
ie_pet_animal.0002 = {
	type = character_event
	title = ie_pet_animal.0001.t
	desc = ie_pet_animal.0002.desc
	theme = pet
	override_background = { event_background = bedchamber }

	immediate = {
		# A fake character called "Dog" (I couldn't insert the dogs real name)
		create_character = {
			name = Dog
			location = root.capital_province
			template = beautiful_peasant_character
			dynasty = none
			gender = male
			save_scope_as = dog
		}
		hidden_effect = {
			scope:dog = {
				set_sexuality = bisexual
				add_trait = ie_masked
			} # For Carnalitas Arousal Framework, to suppress name/portrait of our fake character
		}
	}

	option = {
		name = ie_pet_animal.0002.a
		custom_tooltip = ie_pet_animal.0002.a.tt

		carn_add_fetish_effect = { FETISH = bestiality }

		hidden_effect = {
			send_interface_toast = {
				type = event_toast_effect_good
				title = ie_pet_animal.0001.t
				custom_tooltip = ie_pet_animal.0002.a.toast.desc
			}

			# Should request a Carnalitas bestiality scene here instead, once possible.

			carn_had_sex_with_effect = {
				CHARACTER_1 = scope:story.story_owner
				CHARACTER_2 = scope:dog
				C1_PREGNANCY_CHANCE = 0
				C2_PREGNANCY_CHANCE = 0
				STRESS_EFFECTS = yes
				DRAMA = no
			}
		}
	}

	option = {
		name = ie_pet_animal.0002.b
		custom_tooltip = ie_pet_animal.0002.b.tt

		add_stress = minor_stress_impact_gain
	}
}


code:
#######################
# 1000 - Late Night Visitor
# 1010 - Dreaming Big

namespace = ie_yearly

#######################
# A seducer visits you during the night
# by Ernie Collins
# 1000-1007
#######################

scripted_trigger yearly_1000_late_night_visitor_trigger = {
	is_available_ai_adult = yes
	OR = {
		sexually_liberal_trigger = yes
		has_trait = beauty_good
	}
	OR = {
		NOT = { is_close_or_extended_family_of = root }
		accepts_incest_with_trigger = { CHARACTER = root }
	}
	save_temporary_scope_as = late_night_visitor_candidate
	matching_gender_and_sexuality_trigger = { CHARACTER_1 = root CHARACTER_2 = scope:late_night_visitor_candidate }
}

scripted_effect ie_yearly_1000_determine_late_night_visitor_effect = {
	every_relation = {
		type = lover
		add_to_temporary_list = possible_late_night_visitors
	}
	every_close_or_extended_family_member = {
		limit = {
			yearly_1000_late_night_visitor_trigger = yes
		}
		add_to_temporary_list = possible_late_night_visitors
	}
	every_courtier_or_guest = {
		limit = { yearly_1000_late_night_visitor_trigger = yes }
		add_to_temporary_list = possible_late_night_visitors
	}

	random_in_list = {
		list = possible_late_night_visitors
		weight = {
			base = 100
			modifier = {
				 sexually_liberal_trigger = yes
				 factor = 3
			}
			modifier = { # This is on top of the above
				 has_trait = lustful
				 factor = 2
			}
			modifier = { # Leaving this in from the original event I based this one on
				opinion = {
					target = root
					value <= 0
				}
				factor = 0.1
			}
			modifier = {
				opinion = {
					target = root
					value >= 50
				}
				factor = 1.5
			}
		}
		save_scope_as = late_night_visitor
	}
}

ie_yearly.1000 = {
	type = character_event
	title = ie_yearly.1000.t
	desc = ie_yearly.1000.desc

	theme = seduction
	override_background = {
		event_background = corridor_night
	}
	left_portrait = {
		character = scope:late_night_visitor
		animation = flirtation
	}

	trigger = {
		is_ai = no
		is_available_healthy_adult = yes
		carn_gender_can_impregnate_trigger = yes
		NOT = { has_character_flag = had_event_ie_yearly_1000 }
		OR = {
			any_relation = {
				type = lover
				yearly_1000_late_night_visitor_trigger = yes
			}
			any_close_or_extended_family_member = {
				yearly_1000_late_night_visitor_trigger = yes
			}
			any_courtier_or_guest = {
				yearly_1000_late_night_visitor_trigger = yes
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			OR = {
				has_trait = lustful
				has_trait = chaste
			}
			factor = 2.0
		}
		modifier = {
			has_trait = sadistic
			factor = 0.5
		}
		modifier = {
			attraction >= low_positive_attraction
			factor = 1.2
		}
		modifier = {
			attraction >= medium_positive_attraction
			factor = 1.2
		}
		modifier = {
			attraction >= high_positive_attraction
			factor = 1.2
		}
		modifier = {
			attraction <= low_negative_attraction
			factor = 0.8
		}
		modifier = {
			attraction <= medium_negative_attraction
			factor = 0.7
		}
		modifier = {
			attraction <= high_negative_attraction
			factor = 0.4
		}

		compare_modifier = { #Less likely to happen the older you are
			trigger = {
				age >= 35
			}
			value = age
			multiplier = -0.75
		}
	}

	immediate = {
		add_character_flag = {
			flag = had_event_ie_yearly_1000
			days = 3650
		}

		ie_yearly_1000_determine_late_night_visitor_effect = yes

		scope:late_night_visitor = { carn_undress_character_effect = yes }
	}

	# Invite them in
	option = {
		name = ie_yearly.1000.a
		custom_tooltip = ie_yearly.1000.a.tt

		stress_impact = {
			chaste = medium_stress_impact_gain
			craven = minor_stress_impact_gain
			zealous = minor_stress_impact_gain
		}

		hidden_effect = {
			trigger_event = {
				id = ie_yearly.1001
				days = { 1 3 }
			}
		}

		ai_chance = {
			base = 100
			modifier = {
				add = 100
				sexually_liberal_trigger = yes
			}
			ai_greed_target_modifier = { VALUE = 50 }
			ai_boldness_target_modifier = { VALUE = 50 }
		}
	}

	# (Try to) be polite
	option = {
		name = ie_yearly.1000.b
		custom_tooltip = ie_yearly.1000.b.tt

		hidden_effect = {
			trigger_event = {
				id = ie_yearly.1003
				days = { 1 3 }
			}
		}

		ai_chance = {
			base = 100

			modifier = {
				add = 100
				has_trait_introverted_trigger = yes
			}
			ai_boldness_target_modifier = { VALUE = -50 }
			ai_honor_target_modifier = { VALUE = 50 }
			ai_compassion_target_modifier = { VALUE = 50 }
		}
	}

	# Refuse
	option = {
		name = ie_yearly.1000.c
		custom_tooltip = ie_yearly.1000.c.tt

		send_interface_toast = {
			title = ie_yearly.1000.c.message
			left_icon = scope:late_night_visitor

			add_piety = medium_piety_gain

			reverse_add_opinion = {
				target = scope:late_night_visitor
				modifier = rejected_opinion
			}

			if = {
				limit = { sexually_liberal_trigger = yes }
				stress_impact = {
					base = medium_stress_impact_gain
					lustful = minor_stress_impact_gain
				}
			}

			scope:late_night_visitor = {
				give_deviant_secret_or_trait_effect = yes

				random_secret = { #Find the secret
					limit = {
						secret_type = secret_deviant
						NOT = { is_known_by = root }
					}
					reveal_to_without_events_effect = { CHARACTER = root }
				}
			}
		}

		ai_chance = {
			base = 100

			modifier = {
				add = 100
				OR = {
					has_trait = celibate
					has_trait = zealous
					has_trait = chaste
				}
			}
			ai_boldness_target_modifier = { VALUE = -50 }
			ai_zeal_target_modifier = { VALUE = 50 }
		}
	}

	# Lustful and/or deviant
	option = {
		name = ie_yearly.1000.d
		custom_tooltip = ie_yearly.1000.d.tt

		trigger = {
			OR = {
				is_deviant_trigger = yes
				has_trait = lustful
			}
		}

		trait = deviant
		trait = lustful

		hidden_effect = {
			trigger_event = {
				id = ie_yearly.1004
				days = { 1 3 }
			}
		}

		ai_chance = {
			base = 100
			modifier = {
				add = 200
				sexually_liberal_trigger = yes
			}
			ai_boldness_target_modifier = { VALUE = 50 }
			ai_zeal_target_modifier = { VALUE = -50 }
		}
	}

	after = {
		scope:late_night_visitor = { carn_dress_character_effect = yes }
	}
}

ie_yearly.1001 = {
	type = character_event
	title = ie_yearly.1000.t
	desc = ie_yearly.1001.desc

	theme = seduction
	override_background = {
		event_background = bedchamber
	}
	left_portrait = {
		character = scope:late_night_visitor
		animation = personality_bold
	}

	immediate = {
		scope:late_night_visitor = { carn_undress_character_effect = yes }
	}

	option = {
		name = ie_yearly.1001.a

		hidden_effect = {
			trigger_event = {
				id = ie_yearly.1002
				days = { 1 3 }
			}
		}
	}

	after = {
		scope:late_night_visitor = { carn_dress_character_effect = yes }
	}
}

# This is a maintenance necessary to fix characters being dressed during the sex scene
ie_yearly.1002 = {
	hidden = yes

	immediate = {
		hidden_effect = {
			carn_sex_scene_request_consensual = yes
			carn_sex_scene_request_vaginal = yes

			carn_sex_scene_effect = {
				PLAYER = root
				TARGET = scope:late_night_visitor
				STRESS_EFFECTS = yes
				DRAMA = yes
			}
		}
	}
}

ie_yearly.1003 = {
	type = character_event
	title = ie_yearly.1000.t
	desc = ie_yearly.1003.desc

	theme = seduction
	override_background = {
		event_background = bedchamber
	}
	left_portrait = {
		character = scope:late_night_visitor
		animation = disbelief
	}

	option = {
		name = ie_yearly.1003.a

		hidden_effect = {
			trigger_event = {
				id = ie_yearly.1002
				days = { 1 3 }
			}
		}
	}
}

scripted_effect ie_yearly_1004_reveal_incest_or_deviant_secret_to_neighbor = {
	if = {
		limit = {
			is_close_or_extended_family_of = scope:late_night_visitor
		}

		give_incest_secret_or_nothing_with_target_effect = { CHARACTER = scope:late_night_visitor }

		random_secret = { #Find the secret
			limit = {
				secret_type = secret_incest
				NOT = { is_known_by = scope:neighbor }
			}
			reveal_to_without_events_effect = { CHARACTER = scope:neighbor }
		}

		scope:late_night_visitor = {
			give_incest_secret_or_nothing_with_target_effect = { CHARACTER = root }

			random_secret = { #Find the secret
				limit = {
					secret_type = secret_incest
					NOT = { is_known_by = scope:neighbor }
				}
				reveal_to_without_events_effect = { CHARACTER = scope:neighbor }
			}
		}
	}
	else = {
		give_deviant_secret_or_trait_effect = yes

		random_secret = { #Find the secret
			limit = {
				secret_type = secret_deviant
				NOT = { is_known_by = scope:neighbor }
			}
			reveal_to_without_events_effect = { CHARACTER = scope:neighbor }
		}

		scope:late_night_visitor = {
			give_deviant_secret_or_trait_effect = yes

			random_secret = { #Find the secret
				limit = {
					secret_type = secret_deviant
					NOT = { is_known_by = scope:neighbor }
				}
				reveal_to_without_events_effect = { CHARACTER = scope:neighbor }
			}
		}
	}
}

scripted_effect ie_yearly_1004_determine_neighbor_effect = {
	every_courtier_or_guest = {
		add_to_temporary_list = possible_neighbors
	}

	random_in_list = {
		list = possible_neighbors
		limit = {
			is_available_healthy_ai_adult = yes
			carn_gender_can_impregnate_trigger = yes
			NOR = {
				scope:late_night_visitor = this
				root = this # Just in case
			}
		}

		weight = {
			base = 100
			modifier = {
				is_powerful_vassal_of = root
				factor = 3
			}
			modifier = {
				is_vassal_of = root
				factor = 1.5
			}
			modifier = {
				 sexually_liberal_trigger = yes
				 factor = 1.5
			}
			modifier = { # To spice things up
				is_close_or_extended_family_of = root
				factor = 1.25
			}
		}
		save_scope_as = neighbor
	}
}

scripted_effect ie_yearly_1004_duel_fail_effect = {
	add_prestige = medium_prestige_loss

	increase_wounds_no_death_effect = { REASON = fight }

	reverse_add_opinion = {
		target = scope:late_night_visitor
		modifier = scared_opinion
		opinion = -20
	}

	reverse_add_opinion = {
		target = scope:neighbor
		modifier = attempted_murder_me_crime
	}

	add_secret = {
		type = secret_murder_attempt
		target = scope:neighbor
		save_scope_as = murder_attempt_secret
	}

	scope:murder_attempt_secret = {
		reveal_to_without_events_effect = { CHARACTER = scope:neighbor }
		reveal_to_without_events_effect = { CHARACTER = scope:late_night_visitor }
	}
}

ie_yearly.1004 = {
	type = character_event
	title = ie_yearly.1000.t
	desc = ie_yearly.1004.desc

	theme = seduction
	override_background = {
		event_background = corridor_night
	}
	left_portrait = {
		character = scope:late_night_visitor
		animation = flirtation
	}

	immediate = {
		scope:late_night_visitor = { carn_undress_character_effect = yes }

		ie_yearly_1004_determine_neighbor_effect = yes
	}

	option = {
		name = ie_yearly.1004.a
		custom_tooltip = ie_yearly.1004.a.tt

		hidden_effect = {
			trigger_event = {
				id = ie_yearly.1005
				days = { 1 3 }
			}
		}

		ai_chance = {
			base = 100

			modifier = {
				add = 200
				sexually_liberal_trigger = yes
			}

			ai_boldness_target_modifier = { VALUE = 50 }
			ai_zeal_target_modifier = { VALUE = -50 }
		}
	}

	option = {
		name = ie_yearly.1004.b
		custom_tooltip = ie_yearly.1004.b.tt

		send_interface_toast = {
			title = ie_yearly.1004.b.message
			left_icon = scope:late_night_visitor
			right_icon = scope:neighbor

			reverse_add_opinion = {
				target = scope:late_night_visitor
				modifier = abandoned_me_opinion
			}

			stress_impact = {
				base = medium_stress_impact_gain
				shy = minor_stress_impact_gain
				chaste = minor_stress_impact_gain
				celibate = minor_stress_impact_gain
				craven = minor_stress_impact_gain
			}

			ie_yearly_1004_reveal_incest_or_deviant_secret_to_neighbor = yes
		}

		ai_chance = {
			base = 100

			modifier = {
				add = 200
				has_trait_introverted_trigger = yes
			}

			ai_boldness_target_modifier = { VALUE = -100 }
			ai_honor_target_modifier = { VALUE = -100 }
			ai_zeal_target_modifier = { VALUE = 50 }
		}
	}

	option = {
		name = ie_yearly.1004.c

		duel = {
			skill = prowess
			target = scope:neighbor
			30 = {
				desc = "murder"
				compare_modifier = {
					value = scope:duel_value
					multiplier = 0.5
				}

				show_as_tooltip = {
					unknown_murder_effect = {
						VICTIM = scope:neighbor
						MURDERER = root
						REASON = death_mysterious
					}
				}

				trigger_event = {
					days = { 2 7 } # Keep player in suspense for a bit
					id = ie_yearly.1006
				}
			}
			20 = {
				desc = "no murder"
				compare_modifier = {
					value = scope:duel_value
					multiplier = -0.5
				}

				show_as_tooltip = {
					ie_yearly_1004_duel_fail_effect = yes
				}

				trigger_event = {
					days = { 2 7 } # Keep player in suspense for a bit
					id = ie_yearly.1007
				}
			}
		}

		ai_chance = {
			base = 50

			modifier = {
				add = 100
				has_trait_malicious_trigger = yes
			}

			ai_boldness_target_modifier = { VALUE = 50 }
			ai_honor_target_modifier = { VALUE = -200 }
			ai_rationality_target_modifier = { VALUE = -200 }
			ai_zeal_target_modifier = { VALUE = -200 }
		}
	}

	after = {
		scope:late_night_visitor = { carn_dress_character_effect = yes }
	}
}

ie_yearly.1005 = {
	type = character_event
	title = ie_yearly.1000.t
	desc = ie_yearly.1005.desc

	theme = seduction
	override_background = {
		event_background = bedchamber
	}
	left_portrait = {
		character = scope:late_night_visitor
		animation = flirtation
	}
	right_portrait = {
		character = scope:neighbor
		animation = happiness
	}

	immediate = {
		scope:late_night_visitor = { carn_undress_character_effect = yes }
		scope:neighbor = { carn_undress_character_effect = yes }
	}

	option = {
		name = ie_yearly.1005.a
	}

	after = {
		scope:late_night_visitor = { carn_dress_character_effect = yes }
		scope:neighbor = { carn_dress_character_effect = yes }
	}
}

ie_yearly.1006 = {
	type = character_event
	title = ie_yearly.1000.t
	desc = ie_yearly.1006.desc

	theme = seduction
	override_background = {
		event_background = bedchamber
	}
	left_portrait = {
		character = scope:late_night_visitor
		animation = fear
	}

	immediate = {
		scope:late_night_visitor = { carn_undress_character_effect = yes }

		unknown_murder_effect = {
			VICTIM = scope:neighbor
			MURDERER = root
			REASON = death_mysterious
		}

		random_secret = { #Find the secret
			limit = {
				secret_type = secret_murder
				secret_target = scope:neighbor
				NOT = { is_known_by = scope:late_night_visitor }
			}
			reveal_to_without_events_effect = { CHARACTER = scope:late_night_visitor }
		}

		reverse_add_opinion = {
			target = scope:late_night_visitor
			modifier = scared_opinion
			opinion = -50
		}
	}

	option = {
		name = ie_yearly.1006.a
	}

	after = {
		scope:late_night_visitor = { carn_dress_character_effect = yes }
	}
}

ie_yearly.1007 = {
	hidden = yes

	immediate = {
		send_interface_toast = {
			title = ie_yearly.1004.c.message
			left_icon = scope:late_night_visitor
			right_icon = scope:neighbor

			ie_yearly_1004_duel_fail_effect = yes
		}
	}
}

#######################
# You dream about something... big
# by Inerrant Erotica
# 1010-1020
#######################

scripted_effect ie_yearly_1000_refuse_dream_effect = {
	stress_impact = {
		lustful = medium_stress_impact_gain
		rakish = medium_stress_impact_gain
	}

	stress_impact = {
		chaste = medium_stress_impact_loss
		celibate = medium_stress_impact_loss
		zealous = minor_stress_impact_loss
	}

	add_piety = medium_piety_gain
}

# Dream Starts
ie_yearly.1010 = {
	type = character_event
	title = ie_yearly.1010.t
	desc = ie_yearly.1010.desc

	theme = mental_health
	override_background = {
		event_background = wilderness
	}
	left_portrait = {
		character = root
		remove_default_outfit = yes
		outfit_tags = { beggar_rags }
	}

	trigger = {
		is_ai = no # Otherwise we'd get too many giants
		is_available_adult_or_is_commanding = yes
		is_female = yes
		is_attracted_to_men = yes

		OR = {
			has_trait = deviant
			has_trait = dwarf
			has_trait = flagellant
			has_trait = fornicator
			has_trait = hashishiyah
			has_trait = lifestyle_herbalist
			has_trait = lunatic
			has_trait = lustful
			has_trait = mystic_1
			has_trait = mystic_2
			has_trait = mystic_3
			has_trait = possessed
			has_trait = rakish
			has_trait = reckless
			has_trait = scholar
			has_trait = seducer
			has_trait = witch
			has_trait = zealous
		}

		NOT = { has_character_flag = had_event_ie_yearly_1010 }
	}

	weight_multiplier = {
		compare_modifier = { #Less likely to happen the older you are
			trigger = {
				age >= 35
			}
			value = age
			multiplier = -0.75
		}
	}

	immediate = {
		add_character_flag = {
			flag = had_event_ie_yearly_1010
			days = 3650
		}
	}

	option = {
		name = ie_yearly.1010.a
		flavor = ie_yearly.1010.a.f
		custom_tooltip = ie_yearly.1010.a.tt
		trigger_event = ie_yearly.1011
	}

	option = {
		name = ie_yearly.1010.b
		custom_tooltip = ie_yearly.1010.b.tt
	}
}

# The Lair
ie_yearly.1011 = {
	type = character_event
	title = ie_yearly.1011.t
	desc = ie_yearly.1011.desc

	theme = mental_health
	override_background = {
		event_background = ie_cave
	}
	left_portrait = {
		character = root
		animation = fear
		remove_default_outfit = yes
		outfit_tags = { beggar_rags }
	}

	option = {
		name = ie_yearly.1011.a
		custom_tooltip = ie_yearly.1011.a.tt
		trigger_event = ie_yearly.1012
	}

	option = {
		name = ie_yearly.1011.b
		flavor = ie_yearly.1011.b.f
		custom_tooltip = ie_yearly.1010.b.tt
		ie_yearly_1000_refuse_dream_effect = yes
	}
}

# The Reveal
ie_yearly.1012 = {
	type = character_event
	title = ie_yearly.1012.t
	desc = ie_yearly.1012.desc

	theme = seduction
	override_background = {
		event_background = ie_cave
	}
	left_portrait = {
		character = root
		animation = disbelief
		remove_default_outfit = yes
		outfit_tags = { beggar_rags }
	}

	immediate = {
		hidden_effect = {
			# Generate our giant
			create_character = {
				location = root.location
				template = ie_ugly_giant_template
				gender_female_chance = 0 # Always male
				dynasty = none
				save_scope_as = giant
			}
			random_list = {
				50 = {
					trigger = { is_female = yes }
					scope:giant = { set_sexuality = heterosexual }
				}
				50 = {
					# Future-proofing for when event supports mlm
					trigger = { is_male = yes }
					scope:giant = { set_sexuality = homosexual }
				}
				50 = { scope:giant = { set_sexuality = bisexual } }
			}
		}
	}

	option = {
		name = ie_yearly.1012.a
		flavor = ie_yearly.1012.a.f
		custom_tooltip = ie_yearly.1012.a.tt
		trigger_event = ie_yearly.1013
	}

	option = {
		name = ie_yearly.1012.b
		custom_tooltip = ie_yearly.1012.b.tt
		ie_yearly_1000_refuse_dream_effect = yes
	}
}

# The Choice
ie_yearly.1013 = {
	type = character_event
	title = ie_yearly.1013.t
	desc = ie_yearly.1013.desc

	theme = seduction
	override_background = {
		event_background = ie_cave
	}
	left_portrait = {
		character = root
		animation = shame
		remove_default_outfit = yes
		outfit_tags = { beggar_rags }
	}

	option = {
		name = ie_yearly.1013.a
		flavor = ie_yearly.1013.a.f
		custom_tooltip = ie_yearly.1013.a.tt
		trigger_event = ie_yearly.1014
	}

	option = {
		name = ie_yearly.1013.b
		flavor = ie_yearly.1013.b.f
		custom_tooltip = ie_yearly.1013.b.tt
		trigger_event = ie_yearly.1015
	}

	option = {
		trigger = {
			has_game_rule = carn_content_painful_enabled
		}
		name = ie_yearly.1013.c
		flavor = ie_yearly.1013.c.f
		custom_tooltip = ie_yearly.1013.c.tt
		trigger_event = ie_yearly.1017
	}
}

# Fellatio
ie_yearly.1014 = {
	type = character_event
	title = ie_yearly.1014.t
	desc = ie_yearly.1014.desc

	theme = seduction
	override_background = {
		event_background = ie_cave
	}
	left_portrait = {
		character = root
		animation = beg
		remove_default_outfit = yes
		outfit_tags = { beggar_rags }
	}

	option = {
		name = ie_yearly.1014.a
		flavor = ie_yearly.1014.a.f
		custom_tooltip = ie_yearly.1014.a.tt
		trigger_event = ie_yearly.1019
	}
}

# Dry Humping
ie_yearly.1015 = {
	type = character_event
	title = ie_yearly.1015.t
	desc = ie_yearly.1015.desc

	theme = seduction
	override_background = {
		event_background = ie_cave
	}
	left_portrait = {
		character = root
		animation = personality_cynical
		remove_default_outfit = yes
	}

	immediate = {
		carn_undress_character_effect = yes
	}

	option = {
		name = ie_yearly.1015.a
	}

	after = {
		carn_dress_character_effect = yes
		trigger_event = ie_yearly.1016
	}
}

# Dry Humping Continued
ie_yearly.1016 = {
	type = character_event
	title = ie_yearly.1015.t
	desc = ie_yearly.1016.desc

	theme = seduction
	override_background = {
		event_background = ie_cave
	}
	left_portrait = {
		character = root
		animation = disgust
		remove_default_outfit = yes
	}

	immediate = {
		carn_undress_character_effect = yes
	}

	option = {
		name = ie_yearly.1016.a
		flavor = ie_yearly.1016.a.f
		custom_tooltip = ie_yearly.1016.a.tt
	}

	after = {
		carn_dress_character_effect = yes
		trigger_event = ie_yearly.1019
	}
}

# Vaginal
ie_yearly.1017 = {
	type = character_event
	title = ie_yearly.1017.t
	desc = ie_yearly.1017.desc

	theme = seduction
	override_background = {
		event_background = ie_cave
	}
	left_portrait = {
		character = root
		animation = personality_zealous
		remove_default_outfit = yes
	}

	immediate = {
		carn_undress_character_effect = yes
	}

	option = {
		name = ie_yearly.1017.a
		add_stress = major_stress_gain
	}

	after = {
		carn_dress_character_effect = yes
		trigger_event = ie_yearly.1018
	}
}

# Vaginal Continued
ie_yearly.1018 = {
	type = character_event
	title = ie_yearly.1017.t
	desc = ie_yearly.1018.desc

	theme = seduction
	override_background = {
		event_background = ie_cave
	}
	left_portrait = {
		character = root
		animation = shock
		remove_default_outfit = yes
	}

	immediate = {
		carn_undress_character_effect = yes

		hidden_effect = {
			carn_had_sex_with_effect = {
				CHARACTER_1 = root
				CHARACTER_2 = scope:giant
				C1_PREGNANCY_CHANCE = pregnancy_chance
				C2_PREGNANCY_CHANCE = pregnancy_chance
				STRESS_EFFECTS = yes
				DRAMA = yes
			}
		}
	}

	option = {
		name = ie_yearly.1018.a
		flavor = ie_yearly.1018.a.f
		custom_tooltip = ie_yearly.1018.a.tt
		add_stress = monumental_stress_loss
	}

	after = {
		carn_dress_character_effect = yes
		trigger_event = ie_yearly.1019
	}
}

# Awakening
ie_yearly.1019 = {
	type = character_event
	title = ie_yearly.1019.t
	desc = ie_yearly.1019.desc

	theme = seduction
	override_background = {
		event_background = bedchamber
	}
	left_portrait = {
		character = root
		animation = ecstasy
	}

	option = {
		name = ie_yearly.1019.a
		add_stress = minor_stress_loss
		trigger_event = ie_yearly.1020
	}
}

# Awakening continued
ie_yearly.1020 = {
	type = character_event
	title = ie_yearly.1019.t
	desc = ie_yearly.1020.desc

	theme = seduction
	override_background = {
		event_background = throne_room
	}
	left_portrait = {
		character = root
		animation = worry
	}
	right_portrait = {
		character = scope:giant
		animation = happiness
	}

	immediate = {
		hidden_effect = {
			add_visiting_courtier = scope:giant
		}
	}

	option = {
		name = ie_yearly.1020.a
		add_courtier = scope:giant
		stress_impact = {
			deviant = minor_stress_impact_loss
			lustful = minor_stress_impact_loss
			rakish = minor_stress_impact_loss
			seducer = minor_stress_impact_loss
		}
		stress_impact = {
			chaste = minor_stress_impact_gain
			celibate = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			zealous = minor_stress_impact_gain
		}
	}

	option = {
		name = ie_yearly.1020.b
		custom_tooltip = ie_yearly.1020.b.tt
		stress_impact = {
			deviant = minor_stress_impact_gain
			lustful = minor_stress_impact_gain
			rakish = minor_stress_impact_gain
			seducer = minor_stress_impact_gain
		}
		stress_impact = {
			chaste = minor_stress_impact_loss
			celibate = minor_stress_impact_loss
			craven = minor_stress_impact_loss
			zealous = minor_stress_impact_loss
		}
	}
}


code:
visual_traits_ie_masked = {
	usage = game

	ie_masked = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = special_headgear_face_mask
				template = face_mask
				value = 0.5
			}
			accessory = {
				mode = modify
				gene = beards
				template = no_beard
				value = 0.5
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_cheek_forward
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_cheek_height
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_cheek_width
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_ear_angle
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_ear_inner_shape
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_ear_bend
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_ear_outward
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_ear_size
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_eye_corner_depth
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_eye_fold_shape
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_eye_size
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_eye_upper_lid_size
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_forehead_brow_curve
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_forehead_brow_forward
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_forehead_brow_forward
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_forehead_brow_inner_height
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_forehead_brow_outer_height
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_forehead_brow_width
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_jaw_def
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_mouth_lower_lip_def
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_mouth_lower_lip_full
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_mouth_lower_lip_pad
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_mouth_lower_lip_width
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_mouth_philtrum_def
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_mouth_philtrum_shape
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_mouth_philtrum_width
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_mouth_upper_lip_def
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_mouth_upper_lip_full
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_mouth_upper_lip_profile
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_mouth_upper_lip_width
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_forward
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_height
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_length
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_nostril_height
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_nostril_width
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_profile
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_ridge_angle
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_ridge_width
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_size
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_tip_angle
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_tip_forward
				value = 0.0
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_tip_width
				value = 0.0
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 100
				has_trait = ie_masked
			}
		}
	}
}


code:
l_english:

 genitals_vagina_name: "[ROOT.Char.Custom('GetVaginaName')]"
 genitals_penis_name: "[ROOT.Char.Custom('GetPenisName')]"

 genitals_vagina_name_vagina: "vagina"
 genitals_vagina_name_pussy: "pussy"
 genitals_vagina_name_cunt: "cunt"
 genitals_vagina_name_slit: "slit"
 genitals_vagina_name_sex: "sex"
 genitals_vagina_name_depths: "depths"
 genitals_vagina_name_sheathe: "sheathe"
 genitals_vagina_name_womanhood: "womanhood"
 genitals_vagina_name_nethers: "nethers"

 penetrated_orifice_anus_name: "[ROOT.Char.Custom('GetAnusName')]"

 penetrated_orifice_anus_name_anus: "anus"
 penetrated_orifice_anus_name_ass: "ass"
 penetrated_orifice_anus_name_asshole: "asshole"
 penetrated_orifice_anus_name_rectum: "rectum"
 penetrated_orifice_anus_name_rear: "rear"
 penetrated_orifice_anus_name_rear_entrance: "rear entrance"

 penetrated_orifice_mouth: "mouth"

 vagina_adjective_wet: "wet"
 vagina_adjective_dripping: "dripping"
 vagina_adjective_dripping_wet: "dripping wet"
 vagina_adjective_drenched: "drenched"
 vagina_adjective_soaking: "soaking"
 vagina_adjective_soaking_wet: "soaking wet"
 vagina_adjective_sopping_wet: "sopping wet"
 vagina_adjective_moist: "moist"
 vagina_adjective_soaked: "soaked"

 penis_adjective_erect: "erect"
 penis_adjective_hard: "hard"
 penis_adjective_stiff: "stiff"
 penis_adjective_rock_hard: "rock hard"
 penis_adjective_rigid: "rigid"
 penis_adjective_throbbing: "throbbing"
 penis_adjective_turgid: "turgid"
 penis_adjective_firm: "firm"

 genitals_penis_name_penis: "penis"
 genitals_penis_name_cock: "cock"
 genitals_penis_name_dick: "dick"
 genitals_penis_name_member: "member"
 genitals_penis_name_length: "length"
 genitals_penis_name_shaft: "shaft"
 genitals_penis_name_manhood: "manhood"

 penetrating_appendage_fingers: "fingers"

 genitals_vulgar_vagina: "[ROOT.Char.Custom('GetVaginaAdjective')] [ROOT.Char.Custom('GetVaginaName')]"
 genitals_vulgar_penis: "[ROOT.Char.Custom('GetPenisAdjective')] [ROOT.Char.Custom('GetPenisName')]"
 genitals_vulgar_random: "[ROOT.Char.Custom('GetGenitalsVulgarRandom')]"

 genitals_action_rub: "rub"
 genitals_action_rubs: "rubs"
 genitals_action_rubbing: "rubbing"
 genitals_action_stroke: "stroke"
 genitals_action_strokes: "strokes"
 genitals_action_stroking: "stroking"

 semen_name: "[ROOT.Char.Custom('GetSemenName')]"

 semen_name_semen: "semen"
 semen_name_sperm: "sperm"
 semen_name_cum: "cum"
 semen_name_seed: "seed"
 semen_name_manly_essence: "manly essence"
 semen_name_seed: "seed"
 semen_name_milk: "milk"
 semen_name_ejaculate: "ejaculate"
 semen_name_spunk: "spunk"

 orgasm_verb: "[ROOT.Char.Custom('GetOrgasmVerb')]"

 orgasm_verb_orgasm: "orgasm"
 orgasm_verb_cum: "cum"
 orgasm_verb_climax: "climax"
 orgasm_verb_come: "come"

 orgasm_verb_third_person: "[ROOT.Char.Custom('GetOrgasmVerbThirdPerson')]"

 orgasm_verb_orgasms: "orgasms"
 orgasm_verb_cums: "cums"
 orgasm_verb_climaxes: "climaxes"
 orgasm_verb_comes: "comes"

 ie_hips: "hips"
 ie_arm: "arm"