code:
########
## Random Trait Selection Effects
########

# selects a random good sub trait to be added that target character doesn't have
# call on a scheme
sub_select_random_replacement_trait = {
	# clear the list so it can be recalculated
	if = {
		limit = {
			has_variable_list = sub_replacement_trait_option
		}
		clear_variable_list = sub_replacement_trait_option
	}

	# determine options
	if = {
		limit = {
			scope:target = {
				AND = {
					NOT = { has_trait = calm }
					NOT = { has_character_flag = sub_replaced_trait_wrathful }
				}
			}
		}
		add_to_variable_list = {
			name = sub_replacement_trait_option
			target = flag:calm
		}
	}
	if = {
		limit = {
			scope:target = {
				AND = {
					NOT = { has_trait = compassionate }
					NOT = { has_character_flag = sub_replaced_trait_callous }
					NOT = { has_character_flag = sub_replaced_trait_sadistic }
				}
			}
		}
		add_to_variable_list = {
			name = sub_replacement_trait_option
			target = flag:compassionate
		}
	}
	if = {
		limit = {
			scope:target = {
				AND = {
					NOT = { has_trait = content }
					NOT = { has_character_flag = sub_replaced_trait_ambitious }
				}
			}
		}
		add_to_variable_list = {
			name = sub_replacement_trait_option
			target = flag:content
		}
	}
	if = {
		limit = {
			scope:target = {
				AND = {
					NOT = { has_trait = diligent }
					NOT = { has_character_flag = sub_replaced_trait_lazy }
				}
			}
		}
		add_to_variable_list = {
			name = sub_replacement_trait_option
			target = flag:diligent
		}
	}
	if = {
		limit = {
			scope:target = {
				AND = {
					NOT = { has_trait = forgiving }
					NOT = { has_character_flag = sub_replaced_trait_vengeful }
				}
			}
		}
		add_to_variable_list = {
			name = sub_replacement_trait_option
			target = flag:forgiving
		}
	}
	if = {
		limit = {
			scope:target = {
				AND = {
					NOT = { has_trait = honest }
					NOT = { has_character_flag = sub_replaced_trait_deceitful }
				}
			}
		}
		add_to_variable_list = {
			name = sub_replacement_trait_option
			target = flag:honest
		}
	}
	if = {
		limit = {
			scope:target = {
				AND = {
					NOT = { has_trait = humble }
					NOT = { has_character_flag = sub_replaced_trait_arrogant }
				}
			}
		}
		add_to_variable_list = {
			name = sub_replacement_trait_option
			target = flag:humble
		}
	}
	if = {
		limit = {
			scope:target = {
				AND = {
					NOT = { has_trait = patient }
					NOT = { has_character_flag = sub_replaced_trait_impatient }
				}
			}
		}
		add_to_variable_list = {
			name = sub_replacement_trait_option
			target = flag:patient
		}
	}
	if = {
		limit = {
			scope:target = {
				AND = {
					NOT = { has_trait = temperate }
					NOT = { has_character_flag = sub_replaced_trait_gluttonous }
				}
			}
		}
		add_to_variable_list = {
			name = sub_replacement_trait_option
			target = flag:temperate
		}
	}
	if = {
		limit = {
			scope:target = {
				AND = {
					NOT = { has_trait = trusting }
					NOT = { has_character_flag = sub_replaced_trait_paranoid }
				}
			}
		}
		add_to_variable_list = {
			name = sub_replacement_trait_option
			target = flag:trusting
		}
	}

	# then choose from options
	hidden_effect = {
		random_list = {
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_replacement_trait_option
						target = flag:calm
					}
				}
				scope:target = {
					add_character_flag = sub_replacement_trait_calm
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_replacement_trait_option
						target = flag:compassionate
					}
				}
				scope:target = {
					add_character_flag = sub_replacement_trait_compassionate
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_replacement_trait_option
						target = flag:content
					}
				}
				scope:target = {
					add_character_flag = sub_replacement_trait_content
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_replacement_trait_option
						target = flag:diligent
					}
				}
				scope:target = {
					add_character_flag = sub_replacement_trait_diligent
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_replacement_trait_option
						target = flag:forgiving
					}
				}
				scope:target = {
					add_character_flag = sub_replacement_trait_forgiving
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_replacement_trait_option
						target = flag:honest
					}
				}
				scope:target = {
					add_character_flag = sub_replacement_trait_honest
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_replacement_trait_option
						target = flag:humble
					}
				}
				scope:target = {
					add_character_flag = sub_replacement_trait_humble
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_replacement_trait_option
						target = flag:patient
					}
				}
				scope:target = {
					add_character_flag = sub_replacement_trait_patient
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_replacement_trait_option
						target = flag:temperate
					}
				}
				scope:target = {
					add_character_flag = sub_replacement_trait_temperate
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_replacement_trait_option
						target = flag:trusting
					}
				}
				scope:target = {
					add_character_flag = sub_replacement_trait_trusting
				}
			}
		}
	}
}

# selects a random sub trait to be removed from the worst valid category (bad > questionable > neutral > good)
# call on a scheme
sub_select_random_replaced_trait = {
	sub_select_random_bad_sub_trait = yes
	if = {
		limit = {
			variable_list_size = {
				name = sub_bad_sub_traits
				value <= 1
			}
		}
		sub_select_random_questionable_sub_trait = yes
		if = {
			limit = {
				variable_list_size = {
					name = sub_questionable_sub_traits
					value <= 1
				}
			}
			sub_select_random_neutral_sub_trait = yes
			if = {
				limit = {
					variable_list_size = {
						name = sub_neutral_sub_traits
						value <= 1
					}
				}
				sub_select_random_good_sub_trait = yes
			}
		}
	}
}

# selects a random bad sub trait that target character has
# call on a scheme
sub_select_random_bad_sub_trait = {
	# get the list of options
	sub_list_bad_sub_traits = yes

	# then choose from options and clear the list of options
	hidden_effect = {
		random_list = {
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_bad_sub_traits
						target = flag:ambitious
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_ambitious
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_bad_sub_traits
						target = flag:arrogant
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_arrogant
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_bad_sub_traits
						target = flag:callous
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_callous
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_bad_sub_traits
						target = flag:deceitful
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_deceitful
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_bad_sub_traits
						target = flag:fickle
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_fickle
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_bad_sub_traits
						target = flag:gluttonous
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_gluttonous
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_bad_sub_traits
						target = flag:impatient
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_impatient
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_bad_sub_traits
						target = flag:lazy
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_lazy
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_bad_sub_traits
						target = flag:paranoid
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_paranoid
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_bad_sub_traits
						target = flag:sadistic
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_sadistic
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_bad_sub_traits
						target = flag:stubborn
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_stubborn
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_bad_sub_traits
						target = flag:vengeful
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_vengeful
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_bad_sub_traits
						target = flag:wrathful
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_wrathful
				}
			}
		}
	}
}

# selects a random questionable sub trait that target character has
# call on a scheme
sub_select_random_questionable_sub_trait = {
	# get the list of options
	sub_list_questionable_sub_traits = yes

	# then choose from options and clear the list of options
	hidden_effect = {
		random_list = {
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_questionable_sub_traits
						target = flag:arbitrary
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_arbitrary
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_questionable_sub_traits
						target = flag:chaste
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_chaste
				}
			}
		}
	}
}

# selects a random neutral sub trait that target character has
# call on a scheme
sub_select_random_neutral_sub_trait = {
	# get the list of options
	sub_list_neutral_sub_traits = yes

	# then choose from options and clear the list of options
	hidden_effect = {
		random_list = {
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_neutral_sub_traits
						target = flag:brave
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_brave
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_neutral_sub_traits
						target = flag:craven
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_craven
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_neutral_sub_traits
						target = flag:cynical
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_cynical
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_neutral_sub_traits
						target = flag:generous
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_generous
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_neutral_sub_traits
						target = flag:greedy
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_greedy
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_neutral_sub_traits
						target = flag:gregarious
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_gregarious
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_neutral_sub_traits
						target = flag:just
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_just
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_neutral_sub_traits
						target = flag:lustful
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_lustful
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_neutral_sub_traits
						target = flag:shy
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_shy
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_neutral_sub_traits
						target = flag:zealous
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_zealous
				}
			}
		}
	}
}

# selects a random good sub trait that target character has
# call on a scheme
sub_select_random_good_sub_trait = {
	# get the list of options
	sub_list_good_sub_traits = yes

	# then choose from options and clear the list of options
	hidden_effect = {
		random_list = {
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_good_sub_traits
						target = flag:calm
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_calm
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_good_sub_traits
						target = flag:compassionate
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_compassionate
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_good_sub_traits
						target = flag:content
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_content
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_good_sub_traits
						target = flag:diligent
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_diligent
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_good_sub_traits
						target = flag:forgiving
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_forgiving
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_good_sub_traits
						target = flag:honest
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_honest
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_good_sub_traits
						target = flag:humble
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_humble
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_good_sub_traits
						target = flag:patient
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_patient
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_good_sub_traits
						target = flag:temperate
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_temperate
				}
			}
			10 = {
				trigger = {
					is_target_in_variable_list = {
						name = sub_good_sub_traits
						target = flag:trusting
					}
				}
				scope:target = {
					add_character_flag = sub_replaced_trait_trusting
				}
			}
		}
	}
}

# adds flagged replacement trait and removes removes flagged replaced trait
# call on a character
sub_add_and_remove_selected_sub_traits = {
	# Add trait based on character flag sub_replacement_trait_[trait_name]
	if = {
		limit = { has_character_flag = sub_replacement_trait_calm }
		add_trait = calm
	}
	if = {
		limit = { has_character_flag = sub_replacement_trait_compassionate }
		add_trait = compassionate
	}
	if = {
		limit = { has_character_flag = sub_replacement_trait_content }
		add_trait = content
	}
	if = {
		limit = { has_character_flag = sub_replacement_trait_diligent }
		add_trait = diligent
	}
	if = {
		limit = { has_character_flag = sub_replacement_trait_forgiving }
		add_trait = forgiving
	}
	if = {
		limit = { has_character_flag = sub_replacement_trait_honest }
		add_trait = honest
	}
	if = {
		limit = { has_character_flag = sub_replacement_trait_humble }
		add_trait = humble
	}
	if = {
		limit = { has_character_flag = sub_replacement_trait_patient }
		add_trait = patient
	}
	if = {
		limit = { has_character_flag = sub_replacement_trait_temperate }
		add_trait = temperate
	}
	if = {
		limit = { has_character_flag = sub_replacement_trait_trusting }
		add_trait = trusting
	}

	# Remove trait based on character flag sub_replaced_trait_[trait_name]

	# bad traits
	if = {
		limit = { has_character_flag = sub_replaced_trait_ambitious }
		remove_trait = ambitious
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_arrogant }
		remove_trait = arrogant
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_callous }
		remove_trait = callous
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_deceitful }
		remove_trait = deceitful
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_fickle }
		remove_trait = fickle
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_gluttonous }
		remove_trait = gluttonous
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_impatient }
		remove_trait = impatient
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_lazy }
		remove_trait = lazy
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_paranoid }
		remove_trait = paranoid
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_sadistic }
		remove_trait = sadistic
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_stubborn }
		remove_trait = stubborn
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_vengeful }
		remove_trait = vengeful
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_wrathful }
		remove_trait = wrathful
	}

	# questionable traits
	if = {
		limit = { has_character_flag = sub_replaced_trait_arbitrary }
		remove_trait = arbitrary
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_chaste }
		remove_trait = chaste
	}

	# neutral traits
	if = {
		limit = { has_character_flag = sub_replaced_trait_brave }
		remove_trait = brave
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_craven }
		remove_trait = craven
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_cynical }
		remove_trait = cynical
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_generous }
		remove_trait = generous
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_greedy }
		remove_trait = greedy
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_gregarious }
		remove_trait = gregarious
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_just }
		remove_trait = just
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_lustful }
		remove_trait = lustful
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_shy }
		remove_trait = shy
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_zealous }
		remove_trait = zealous
	}

	# good traits
	if = {
		limit = { has_character_flag = sub_replaced_trait_calm }
		remove_trait = calm
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_compassionate }
		remove_trait = compassionate
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_content }
		remove_trait = content
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_diligent }
		remove_trait = diligent
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_forgiving }
		remove_trait = forgiving
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_honest }
		remove_trait = honest
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_humble }
		remove_trait = humble
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_patient }
		remove_trait = patient
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_temperate }
		remove_trait = temperate
	}
	if = {
		limit = { has_character_flag = sub_replaced_trait_trusting }
		remove_trait = trusting
	}
}

########
## Scheme Effects
########

# (re)calcs modifiers to scheme power/resistance based on opinion
# call on a scheme
sub_set_scheme_opinion_modifier = {
	remove_scheme_modifier = sub_highest_pos_opinion_scheme_power
	remove_scheme_modifier = sub_high_pos_opinion_scheme_power
	remove_scheme_modifier = sub_medium_pos_opinion_scheme_power
	remove_scheme_modifier = sub_low_pos_opinion_scheme_power
	remove_scheme_modifier = sub_highest_neg_opinion_scheme_resistance
	remove_scheme_modifier = sub_high_neg_opinion_scheme_resistance
	remove_scheme_modifier = sub_medium_neg_opinion_scheme_resistance
	remove_scheme_modifier = sub_low_neg_opinion_scheme_resistance

	if = {
		limit = {
			scope:target = {
				opinion = {
					target = scope:owner
					value >= very_high_positive_opinion
				}
			}
		}
		add_scheme_modifier = { type = sub_highest_pos_opinion_scheme_power }
	}
	else_if = {
		limit = {
			scope:target = {
				opinion = {
					target = scope:owner
					value >= high_positive_opinion
				}
			}
		}
		add_scheme_modifier = { type = sub_high_pos_opinion_scheme_power}
	 }
	else_if = {
		limit = {
			scope:target = {
				opinion = {
					target = scope:owner
					value >= medium_positive_opinion
				}
			}
		}
		add_scheme_modifier = { type = sub_medium_pos_opinion_scheme_power}
	}
	else_if = {
		limit = {
			scope:target = {
				opinion = {
					target = scope:owner
					value >= low_positive_opinion
				}
			}
		}
		add_scheme_modifier = { type = sub_low_pos_opinion_scheme_power}
	}

	if = {
		limit = {
			scope:target = {
				opinion = {
					target = scope:owner
					value <= very_high_negative_opinion
				}
			}
		}
		add_scheme_modifier = { type = sub_highest_neg_opinion_scheme_resistance}
	}
	else_if = {
		limit = {
			scope:target = {
				opinion = {
					target = scope:owner
					value <= high_negative_opinion
				}
			}
		}
		add_scheme_modifier = { type = sub_high_neg_opinion_scheme_resistance}
	}
	else_if = {
		limit = {
			scope:target = {
				opinion = {
					target = scope:owner
					value <= medium_negative_opinion
				}
			}
		}
		add_scheme_modifier = { type = sub_medium_neg_opinion_scheme_resistance}
	}
	else_if = {
		limit = {
			scope:target = {
				opinion = {
					target = scope:owner
					value <= low_negative_opinion
				}
			}
		}
		add_scheme_modifier = { type = sub_low_neg_opinion_scheme_resistance}
	}
}

# sets variables and modifiers on scheme counting target's good/bad sub traits
# call on a scheme
sub_count_categorized_personality_traits = {
	# Get lists of target's traits in each category
	sub_list_good_sub_traits = yes
	sub_list_bad_sub_traits = yes
	sub_list_questionable_sub_traits = yes
	sub_list_neutral_sub_traits = yes

	# Set number of good/bad sub traits and corresponding scheme modifiers
	set_variable = {
		name = sub_num_good_sub_traits
		value = 0
	}
	every_in_list = {
		variable = sub_good_sub_traits
		scope:scheme = {
			change_variable = {
				name = sub_num_good_sub_traits
				add = 1
			}
			hidden_effect = {
				add_scheme_modifier = { type = sub_positive_trait_scheme_power }
			}
		}
	}
	set_variable = {
		name = sub_num_good_sub_traits_plus_one
		value = {
			value = scope:scheme.var:sub_num_good_sub_traits
			add = 1
		}
	}
	set_variable = {
		name = sub_num_bad_sub_traits
		value = 0
	}
	every_in_list = {
		variable = sub_bad_sub_traits
		scope:scheme = {
			change_variable = {
				name = sub_num_bad_sub_traits
				add = 1
			}
			hidden_effect = {
				add_scheme_modifier = { type = sub_negative_trait_scheme_resistance }
			}
		}
	}
	set_variable = {
		name = sub_num_bad_sub_traits_plus_one
		value = {
			value = scope:scheme.var:sub_num_bad_sub_traits
			add = 1
		}
	}

	# Set scheme modifier(s) for any prior training
	if = {
		limit = {
			scope:target = {
				OR = {
					has_trait = sub_subservient_1
					has_trait = sub_subservient_2
					has_trait = sub_subservient_3
				}
			}
		}
		scope:scheme = {
			hidden_effect = {
				add_scheme_modifier = { type = sub_training_milestone_scheme_power_1 }
			}
		}
	}
	if = {
		limit = {
			scope:target = {
				OR = {
					has_trait = sub_subservient_2
					has_trait = sub_subservient_3
				}
			}
		}
		scope:scheme = {
			hidden_effect = {
				add_scheme_modifier = { type = sub_training_milestone_scheme_power_2 }
			}
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = sub_subservient_3
			}
		}
		scope:scheme = {
			hidden_effect = {
				add_scheme_modifier = { type = sub_training_milestone_scheme_power_3 }
			}
		}
	}
}

# sets flag on target indicating receptiveness to sub_train_obedience scheme
# call on a scheme
sub_set_train_obedience_receptiveness = {
	# Remove flags that may be left over from previous scheme(s)
	scope:target = {
		remove_character_flag = sub_receptive_training_response
		remove_character_flag = sub_unreceptive_training_response
		remove_character_flag = sub_neutral_training_response
	}

	if = {
		limit = {
			OR = {
				# Was previously trained
				scope:target = { has_trait = sub_subservient }
				# Amenable personality & doesn't dislike scheme owner
				AND = {
					var:sub_num_good_sub_traits > scope:scheme.var:sub_num_bad_sub_traits_plus_one
					scope:target = {
						opinion = {
							target = scope:owner
							value >= neutral_opinion
						}
					}
				}
				# Somewhat amenable personality & likes scheme owner
				AND = {
					var:sub_num_good_sub_traits > scope:scheme.var:sub_num_bad_sub_traits
					scope:target = {
						opinion = {
							target = scope:owner
							value >= medium_positive_opinion
						}
					}
				}
			}
		}
		scope:target = {
			add_character_flag = sub_receptive_training_response
		}
	}
	else_if = {
		limit = {
			OR = {
				# Independent personality & doesn't really like scheme owner
				AND = {
					var:sub_num_bad_sub_traits > scope:scheme.var:sub_num_good_sub_traits_plus_one
					scope:target = {
						opinion = {
							target = scope:owner
							value <= high_positive_opinion
						}
					}
				}
				# Somewhat independent personality & dislikes scheme owner
				AND = {
					var:sub_num_bad_sub_traits > scope:scheme.var:sub_num_good_sub_traits
					scope:target = {
						opinion = {
							target = scope:owner
							value <= neutral_opinion
						}
					}
				}
			}
		}
		scope:target = {
			add_character_flag = sub_unreceptive_training_response
		}
	}
	else = {
		scope:target = {
			add_character_flag = sub_neutral_training_response
		}
	}
}

# permanent effects of scheme success for target
# call on a character
sub_train_obedience_target_success_effect = {

}

# permanent effects of scheme success for owner
# call on a character
sub_train_obedience_target_success_effect = {

}

########
## Make List Effects
########

# make a list of all the good sub traits that target character has
# call on a scheme
sub_list_good_sub_traits = {
	# clear the list so it can be recalculated
	if = {
		limit = {
			has_variable_list = sub_good_sub_traits
		}
		clear_variable_list = sub_good_sub_traits
	}

	# CK3 errors if you check nonexistent lists for size, so throw something random in there to start
	add_to_variable_list = {
		name = sub_good_sub_traits
		target = 0
	}

	# fill the list
	if = {
		limit = {
			scope:target = {
				has_trait = calm
			}
		}
		add_to_variable_list = {
			name = sub_good_sub_traits
			target = flag:calm
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = compassionate
			}
		}
		add_to_variable_list = {
			name = sub_good_sub_traits
			target = flag:compassionate
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = content
			}
		}
		add_to_variable_list = {
			name = sub_good_sub_traits
			target = flag:content
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = diligent
			}
		}
		add_to_variable_list = {
			name = sub_good_sub_traits
			target = flag:diligent
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = forgiving
			}
		}
		add_to_variable_list = {
			name = sub_good_sub_traits
			target = flag:forgiving
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = honest
			}
		}
		add_to_variable_list = {
			name = sub_good_sub_traits
			target = flag:honest
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = humble
			}
		}
		add_to_variable_list = {
			name = sub_good_sub_traits
			target = flag:humble
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = patient
			}
		}
		add_to_variable_list = {
			name = sub_good_sub_traits
			target = flag:patient
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = temperate
			}
		}
		add_to_variable_list = {
			name = sub_good_sub_traits
			target = flag:temperate
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = trusting
			}
		}
		add_to_variable_list = {
			name = sub_good_sub_traits
			target = flag:trusting
		}
	}
}

# make a list of all the bad sub traits that target character has
# call on a scheme
sub_list_bad_sub_traits = {
	# clear the list so it can be recalculated
	if = {
		limit = {
			has_variable_list = sub_bad_sub_traits
		}
		clear_variable_list = sub_bad_sub_traits
	}

	# CK3 errors if you check nonexistent lists for size, so throw something random in there to start
	add_to_variable_list = {
		name = sub_bad_sub_traits
		target = 0
	}

	# fill the list
	if = {
		limit = {
			scope:target = {
				has_trait = ambitious
			}
		}
		add_to_variable_list = {
			name = sub_bad_sub_traits
			target = flag:ambitious
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = arrogant
			}
		}
		add_to_variable_list = {
			name = sub_bad_sub_traits
			target = flag:arrogant
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = callous
			}
		}
		add_to_variable_list = {
			name = sub_bad_sub_traits
			target = flag:callous
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = deceitful
			}
		}
		add_to_variable_list = {
			name = sub_bad_sub_traits
			target = flag:deceitful
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = fickle
			}
		}
		add_to_variable_list = {
			name = sub_bad_sub_traits
			target = flag:fickle
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = gluttonous
			}
		}
		add_to_variable_list = {
			name = sub_bad_sub_traits
			target = flag:gluttonous
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = impatient
			}
		}
		add_to_variable_list = {
			name = sub_bad_sub_traits
			target = flag:impatient
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = lazy
			}
		}
		add_to_variable_list = {
			name = sub_bad_sub_traits
			target = flag:lazy
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = paranoid
			}
		}
		add_to_variable_list = {
			name = sub_bad_sub_traits
			target = flag:paranoid
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = sadistic
			}
		}
		add_to_variable_list = {
			name = sub_bad_sub_traits
			target = flag:sadistic
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = stubborn
			}
		}
		add_to_variable_list = {
			name = sub_bad_sub_traits
			target = flag:stubborn
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = vengeful
			}
		}
		add_to_variable_list = {
			name = sub_bad_sub_traits
			target = flag:vengeful
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = wrathful
			}
		}
		add_to_variable_list = {
			name = sub_bad_sub_traits
			target = flag:wrathful
		}
	}
}

# make a list of all the questionable sub traits that target character has
# call on a scheme
sub_list_questionable_sub_traits = {
	# clear the list so it can be recalculated
	if = {
		limit = {
			has_variable_list = sub_questionable_sub_traits
		}
		clear_variable_list = sub_questionable_sub_traits
	}

	# CK3 errors if you check nonexistent lists for size, so throw something random in there to start
	add_to_variable_list = {
		name = sub_questionable_sub_traits
		target = 0
	}

	# fill the list
	if = {
		limit = {
			scope:target = {
				has_trait = arbitrary
			}
		}
		add_to_variable_list = {
			name = sub_questionable_sub_traits
			target = flag:arbitrary
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = chaste
			}
		}
		add_to_variable_list = {
			name = sub_questionable_sub_traits
			target = flag:chaste
		}
	}
}

# make a list of all the neutral sub traits that target character has
# call on a scheme
sub_list_neutral_sub_traits = {
	# clear the list so it can be recalculated
	if = {
		limit = {
			has_variable_list = sub_neutral_sub_traits
		}
		clear_variable_list = sub_neutral_sub_traits
	}

	# CK3 errors if you check nonexistent lists for size, so throw something random in there to start
	add_to_variable_list = {
		name = sub_neutral_sub_traits
		target = 0
	}

	# fill the list
	if = {
		limit = {
			scope:target = {
				has_trait = brave
			}
		}
		add_to_variable_list = {
			name = sub_neutral_sub_traits
			target = flag:brave
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = craven
			}
		}
		add_to_variable_list = {
			name = sub_neutral_sub_traits
			target = flag:craven
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = cynical
			}
		}
		add_to_variable_list = {
			name = sub_neutral_sub_traits
			target = flag:cynical
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = generous
			}
		}
		add_to_variable_list = {
			name = sub_neutral_sub_traits
			target = flag:generous
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = greedy
			}
		}
		add_to_variable_list = {
			name = sub_neutral_sub_traits
			target = flag:greedy
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = gregarious
			}
		}
		add_to_variable_list = {
			name = sub_neutral_sub_traits
			target = flag:gregarious
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = just
			}
		}
		add_to_variable_list = {
			name = sub_neutral_sub_traits
			target = flag:just
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = lustful
			}
		}
		add_to_variable_list = {
			name = sub_neutral_sub_traits
			target = flag:lustful
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = shy
			}
		}
		add_to_variable_list = {
			name = sub_neutral_sub_traits
			target = flag:shy
		}
	}
	if = {
		limit = {
			scope:target = {
				has_trait = zealous
			}
		}
		add_to_variable_list = {
			name = sub_neutral_sub_traits
			target = flag:zealous
		}
	}
}

########
## Maintenance Effects
########

# clean temporary character flags after they have been used
# call on a scheme
sub_train_obedience_event_aftereffects = {
	scope:target = {
		# replacement traits
		remove_character_flag = sub_replacement_trait_calm
		remove_character_flag = sub_replacement_trait_compassionate
		remove_character_flag = sub_replacement_trait_content
		remove_character_flag = sub_replacement_trait_diligent
		remove_character_flag = sub_replacement_trait_forgiving
		remove_character_flag = sub_replacement_trait_honest
		remove_character_flag = sub_replacement_trait_humble
		remove_character_flag = sub_replacement_trait_patient
		remove_character_flag = sub_replacement_trait_temperate
		remove_character_flag = sub_replacement_trait_trusting

		# bad replaced traits
		remove_character_flag = sub_replaced_trait_ambitious
		remove_character_flag = sub_replaced_trait_arrogant
		remove_character_flag = sub_replaced_trait_callous
		remove_character_flag = sub_replaced_trait_deceitful
		remove_character_flag = sub_replaced_trait_fickle
		remove_character_flag = sub_replaced_trait_gluttonous
		remove_character_flag = sub_replaced_trait_impatient
		remove_character_flag = sub_replaced_trait_lazy
		remove_character_flag = sub_replaced_trait_paranoid
		remove_character_flag = sub_replaced_trait_sadistic
		remove_character_flag = sub_replaced_trait_stubborn
		remove_character_flag = sub_replaced_trait_vengeful
		remove_character_flag = sub_replaced_trait_wrathful

		# questionable replaced traits
		remove_character_flag = sub_replaced_trait_arbitrary
		remove_character_flag = sub_replaced_trait_chaste

		# neutral replaced traits
		remove_character_flag = sub_replaced_trait_brave
		remove_character_flag = sub_replaced_trait_craven
		remove_character_flag = sub_replaced_trait_cynical
		remove_character_flag = sub_replaced_trait_generous
		remove_character_flag = sub_replaced_trait_greedy
		remove_character_flag = sub_replaced_trait_gregarious
		remove_character_flag = sub_replaced_trait_just
		remove_character_flag = sub_replaced_trait_lustful
		remove_character_flag = sub_replaced_trait_shy
		remove_character_flag = sub_replaced_trait_zealous

		# good replaced traits
		remove_character_flag = sub_replaced_trait_calm
		remove_character_flag = sub_replaced_trait_compassionate
		remove_character_flag = sub_replaced_trait_content
		remove_character_flag = sub_replaced_trait_diligent
		remove_character_flag = sub_replaced_trait_honest
		remove_character_flag = sub_replaced_trait_humble
		remove_character_flag = sub_replaced_trait_patient
		remove_character_flag = sub_replaced_trait_temperate
		remove_character_flag = sub_replaced_trait_trusting
	}
}

# To get around a Jomini bug/"feature" where it won't look for variable declarations in effects
# that use those variables, the variables used in this scheme are initially created here. All
# of these values will get overridden later.
# If this effect isn't used, the error log gets cluttered with 'could not find list'-type messages.
# call on a scheme ONCE on_start
sub_train_obedience_set_dummy_variables = {
	add_to_variable_list = {
		name = sub_bad_sub_traits
		target = 0
	}
	add_to_variable_list = {
		name = sub_questionable_sub_traits
		target = 0
	}
	add_to_variable_list = {
		name = sub_neutral_sub_traits
		target = 0
	}
	add_to_variable_list = {
		name = sub_good_sub_traits
		target = 0
	}
	set_variable = {
		name = sub_num_good_sub_traits
		value = 0
	}
	set_variable = {
		name = sub_num_bad_sub_traits
		value = 0
	}
	set_variable = {
		name = sub_num_good_sub_traits_plus_one
		value = 0
	}
	set_variable = {
		name = sub_num_bad_sub_traits_plus_one
		value = 0
	}
}


code:
sub_has_sub_relation_trigger = {
	OR = {
		is_consort_of = $DOMINANT$
		has_relation_lover = $DOMINANT$
		has_relation_soulmate = $DOMINANT$
		has_relation_dominant = $DOMINANT$
		AND = {
			has_game_rule = sub_incestuous_training_enabled
			OR = {
				is_child_of = $DOMINANT$
				is_sibling_of = $DOMINANT$
				is_parent_of = $DOMINANT$
			}
		}
	}
}

sub_has_obedience_modifier_trigger = {
	has_opinion_modifier = {
		target = $DOMINANT$
		modifier = sub_subservient_to_master
	}
}

sub_show_sub_interactions_trigger = {
	AND = {
		is_adult = yes
		sub_has_sub_relation_trigger = { DOMINANT = $DOMINANT$ }
	}
	OR = {
		has_game_rule = sub_valid_subs_all_genders
		AND = {
			has_game_rule = sub_valid_subs_female_only
			is_female = yes
		}
		AND = {
			has_game_rule = sub_valid_subs_male_only
			is_male = yes
		}
	}
}

sub_can_set_relation_dominant_regardless_attraction_trigger = {
	is_adult = yes
	$CHARACTER$ = {
		is_adult = yes
	}
	NOR = {
		has_relation_dominant = $CHARACTER$
		has_relation_submissive = $CHARACTER$
	}
}

sub_can_set_relation_submissive_regardless_attraction_trigger = {
	is_adult = yes
	$CHARACTER$ = {
		is_adult = yes
	}
	NOR = {
		has_relation_dominant = $CHARACTER$
		has_relation_submissive = $CHARACTER$
	}
}

sub_can_set_relation_dominant_with_game_rule_trigger = {
	OR = {
		AND = {
			has_game_rule = sub_gender_attraction_requirement_enabled
			can_set_relation_dominant_trigger = { CHARACTER = $CHARACTER$ }
		}
		AND = {
			has_game_rule = sub_gender_attraction_requirement_disabled
			sub_can_set_relation_dominant_regardless_attraction_trigger = { CHARACTER = $CHARACTER$ }
		}
	}
	$CHARACTER$ = { is_adult = yes }
}

sub_can_set_relation_submissive_with_game_rule_trigger = {
	OR = {
		AND = {
			has_game_rule = sub_gender_attraction_requirement_enabled
			can_set_relation_submissive_trigger = { CHARACTER = $CHARACTER$ }
		}
		AND = {
			has_game_rule = sub_gender_attraction_requirement_disabled
			sub_can_set_relation_submissive_regardless_attraction_trigger = { CHARACTER = $CHARACTER$ }
		}
	}
	$CHARACTER$ = { is_adult = yes }
}

sub_can_be_obedience_trained_trigger = {
	AND = {
		sub_show_sub_interactions_trigger = { DOMINANT = $DOMINANT$ }
		sub_can_set_relation_dominant_with_game_rule_trigger = { CHARACTER = $DOMINANT$ }
		NOT = { has_trait = sub_subservient_4 }
	}
	$DOMINANT$ = { is_adult = yes }
}

sub_can_be_accelerated_obedience_trained_trigger = {
	AND = {
		sub_show_sub_interactions_trigger = { DOMINANT = $DOMINANT$ }
		sub_can_set_relation_dominant_with_game_rule_trigger = { CHARACTER = $DOMINANT$ }
		NOT = { sub_has_obedience_modifier_trigger = { DOMINANT = $DOMINANT$ } }
		has_trait = sub_subservient_4
	}
}

sub_is_interested_in_being_dominant_trigger = {
	is_adult = yes
	OR = {
		# Just desires
		has_trait = lustful
		has_trait = deviant
		has_trait = seducer

		# Arcane magic...
		has_trait = witch

		# I want make pain
		has_trait = sadistic
		has_trait = callous
		has_trait = torturer

		# I want control
		has_trait = paranoid
		has_trait = zealous
		has_trait = arbitrary
		has_trait = schemer
		has_trait = deceitful
		has_trait = overseer

		# This is good for me
		has_trait = cynical
		has_trait = ambitious
		has_trait = arrogant
		has_trait = greedy

		#has_trait = diligent
	}
}

sub_is_interested_in_being_submissive_trigger = {
	is_adult = yes
	OR = {
		# Just desires
		has_trait = lustful
		has_trait = deviant

		# I want pain
		has_trait = flagellant

		# I trust and will follow you
		has_trait = trusting
		has_trait = humble
		has_trait = loyal

		# whatever you do I will not be broken
		has_trait = chaste
		has_trait = celibate

		# already subservient...
		has_trait = sub_subservient
	}
}

# Uses SUBMISSIVE
sub_is_interested_in_being_dominant_of_trigger = {
	sub_is_interested_in_being_dominant_trigger = yes
	$SUBMISSIVE$ = {}
}

# Uses DOMINANT
sub_is_interested_in_being_submissive_of_trigger = {
	sub_is_interested_in_being_submissive_trigger = yes
	$DOMINANT$ = {}
}

# Uses SUBMISSIVE
sub_is_interested_in_obedience_training_as_dominant_of_trigger = {
	sub_is_interested_in_being_dominant_of_trigger = {SUBMISSIVE = $SUBMISSIVE$}
}

# Uses DOMINANT
sub_is_interested_in_obedience_training_as_submissive_of_trigger = {
	sub_is_interested_in_being_submissive_of_trigger = { DOMINANT = $DOMINANT$}
}

repo_name: crusader/kings

license: mit


code:
sub_suggestion_obedience_training = {

	weight = {
		base = 0

		modifier = { #Since the scheme is blocked for kids
			add = -5
			is_adult = no
		}

		modifier = { #Is the suggestion available for spouses?
			add = 1
			OR = {
				any_spouse = {
					sub_can_be_obedience_trained_trigger = { DOMINANT = root }
				}
			}
		}

		modifier = { #Is the suggestion available for other important relations?
			add = 0.5
			OR = {
				any_relation = {
					type = lover
					sub_can_be_obedience_trained_trigger = { DOMINANT = root }
				}
				any_relation = {
					type = soulmate
					sub_can_be_obedience_trained_trigger = { DOMINANT = root }
				}
			}
		}

		modifier = { #More likely if you have no active friendly schemes
			add = 0.5
			NOT = {
				any_scheme = {
					friendly_scheme_trigger = yes
				}
			}
		}

		modifier = { #More likely if you have < 2 submissives
			add = 0.5
			num_of_relation_submissive < 2
		}
	}

	check_create_suggestion = {
		every_consort = {
			limit = {
				sub_can_be_obedience_trained_trigger = { DOMINANT = root }
			}
			try_create_suggestion = {
				suggestion_type = sub_suggestion_obedience_training
				actor = root
				recipient = this
			}
		}
		every_relation = {
			type = lover
			limit = {
				sub_can_be_obedience_trained_trigger = { DOMINANT = root }
			}
			try_create_suggestion = {
				suggestion_type = sub_suggestion_obedience_training
				actor = root
				recipient = this
			}
		}
		every_relation = {
			type = soulmate
			limit = {
				sub_can_be_obedience_trained_trigger = { DOMINANT = root }
			}
			try_create_suggestion = {
				suggestion_type = sub_suggestion_obedience_training
				actor = root
				recipient = this
			}
		}
	}

	effect = {
		open_interaction_window = {
			interaction = sub_train_obedience_interaction
			actor = scope:actor
			recipient = scope:recipient
		}
	}

	score = {
		base = 50

		modifier = { #Score higher if it's your spouse
			add = 100
			scope:recipient = {
				is_spouse_of = scope:actor
			}
		}

		modifier = { #Score higher if it's your soulmate
			add = 50
			scope:recipient = {
				has_relation_soulmate = scope:actor
			}
		}

		modifier = { #Lovers are slightly more important than concubines
			add = 1
			scope:recipient = {
				has_relation_lover = scope:actor
			}
		}
	}

	is_valid = {
		scope:recipient = {
			NOT = {
				any_targeting_scheme = {
					scheme_owner = root
				}
			}
		}
	}
}


code:
###
# Indices notes for other modders
# Reserved 5600 - 5699 for this mod
# 5600-5603: sub_subservient_1-4
# 5604-5607: sub_clothing_rule_1-4, may not all get used
# 5608-5611: sub_chastity_rule_1-4
###

sub_subservient_1 = {
	index = 5600

	group = sub_subservient
	level = 1

	diplomacy = 1
	prowess = -1

	ai_compassion = 10
	ai_vengefulness = -10

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this }
				}
				desc = trait_sub_subservient_1_desc
			}
			desc = trait_sub_subservient_1_character_desc
		}
	}
}

sub_subservient_2 = {
	index = 5601

	group = sub_subservient
	level = 2

	diplomacy = 2
	intrigue = -1
	prowess = -1

	hostile_scheme_power_mult = -0.2

	ai_compassion = 20
	ai_vengefulness = -20

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this }
				}
				desc = trait_sub_subservient_2_desc
			}
			desc = trait_sub_subservient_2_character_desc
		}
	}
}

sub_subservient_3 = {
	index = 5602

	group = sub_subservient
	level = 3

	diplomacy = 3
	learning = 1
	intrigue = -1
	prowess = -2

	fertility = 0.1

	opinion_of_liege = 10

	hostile_scheme_power_mult = -0.5

	ai_compassion = 60
	ai_vengefulness = -60

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this }
				}
				desc = trait_sub_subservient_3_desc
			}
			desc = trait_sub_subservient_3_character_desc
		}
	}
}

sub_subservient_4 = {
	index = 5603

	group = sub_subservient
	level = 4

	diplomacy = 4
	learning = 2
	intrigue = -2
	prowess = -3

	fertility = 0.2

	opinion_of_liege = 20

	hostile_scheme_power_mult = -0.9

	ai_compassion = 100
	ai_vengefulness = -100

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this }
				}
				desc = trait_sub_subservient_4_desc
			}
			desc = trait_sub_subservient_4_character_desc
		}
	}
}

sub_clothing_rule_1 = {
	index = 5604

	group = sub_clothing_rules
	level = 1

	intrigue = 1

	attraction_opinion = 10

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this }
				}
				desc = trait_sub_clothing_rule_1_desc
			}
			desc = trait_sub_clothing_rule_1_character_desc
		}
	}
}

sub_clothing_rule_2 = {
	index = 5605

	group = sub_clothing_rules
	level = 2

	intrigue = 2
	prowess = -2

	attraction_opinion = 20

	monthly_dread = -2

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this }
				}
				desc = trait_sub_clothing_rule_2_desc
			}
			desc = trait_sub_clothing_rule_2_character_desc
		}
	}
}

sub_clothing_rule_3 = {
	index = 5606

	group = sub_clothing_rules
	level = 3

	flag = is_naked

	intrigue = 2
	prowess = -5

	monthly_prestige = -0.2

	attraction_opinion = 50

	monthly_dread = -10
	dread_loss_mult = 5

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this }
				}
				desc = trait_sub_clothing_rule_3_desc
			}
			desc = trait_sub_clothing_rule_3_character_desc
		}
	}
}

sub_clothing_rule_4 = { # placeholder trait
	index = 5607

	group = sub_clothing_rules
	level = 4
}

sub_chastity_rule_1 = {
	index = 5608

	group = sub_chastity_rules
	level = 1

	fertility = 0.1

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this }
				}
				desc = trait_sub_chastity_rule_1_desc
			}
			desc = trait_sub_chastity_rule_1_character_desc
		}
	}

	compatibility = {
		lustful = @pos_compat_medium
		seducer = @pos_compat_medium
		beauty_good_1 = @pos_compat_low
		beauty_good_2 = @pos_compat_medium
		beauty_good_3 = @pos_compat_medium
		physique_good_1 = @pos_compat_low
		physique_good_2 = @pos_compat_low
		physique_good_3 = @pos_compat_low
		whole_of_body = @pos_compat_low
	}
}

sub_chastity_rule_2 = {
	index = 5609

	group = sub_chastity_rules
	level = 2

	fertility = 0.2

	learning = -2

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this }
				}
				desc = trait_sub_chastity_rule_2_desc
			}
			desc = trait_sub_chastity_rule_2_character_desc
		}
	}

	compatibility = {
		lustful = @pos_compat_high
		seducer = @pos_compat_high
		beauty_good_1 = @pos_compat_medium
		beauty_good_2 = @pos_compat_high
		beauty_good_3 = @pos_compat_high
		physique_good_1 = @pos_compat_low
		physique_good_2 = @pos_compat_low
		physique_good_3 = @pos_compat_low
		whole_of_body = @pos_compat_low
		chaste = @neg_compat_low
		celibate = @neg_compat_low
	}
}

sub_chastity_rule_3 = {
	index = 5610

	group = sub_chastity_rules
	level = 3

	learning = -4

	fertility = 0.5

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this }
				}
				desc = trait_sub_chastity_rule_3_desc
			}
			desc = trait_sub_chastity_rule_3_character_desc
		}
	}

	compatibility = {
		lustful = @pos_compat_high
		seducer = @pos_compat_high
		beauty_good_1 = @pos_compat_medium
		beauty_good_2 = @pos_compat_high
		beauty_good_3 = @pos_compat_high
		physique_good_1 = @pos_compat_low
		physique_good_2 = @pos_compat_medium
		physique_good_3 = @pos_compat_medium
		whole_of_body = @pos_compat_medium
		rakish = @pos_compat_low
		chaste = @neg_compat_medium
		celibate = @neg_compat_medium
	}
}

sub_chastity_rule_4 = {
	index = 5611

	group = sub_chastity_rules
	level = 4

	# unclear which of these options is preferable- fertility could still allow for deliberate event pregnancy
	can_have_children = no
	# fertility = -10

	learning = 2

	stress_gain_mult = 0.1

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { exists = this }
				}
				desc = trait_sub_chastity_rule_4_desc
			}
			desc = trait_sub_chastity_rule_4_character_desc
		}
	}

	compatibility = {
		celibate = @pos_compat_high
		sub_chastity_rule_4 = @pos_compat_medium
		chaste = @pos_compat_medium
	}
}


code:
version="1.2.2"
tags={
	"Utilities"
}
name="Submissive Partners"
supported_version="1.9.*"

path: Submissive Partners/descriptor.mod


code:
namespace = sub_pose

sub_pose.0001 = {
	type = character_event
	title = sub_pose.0001.t
	desc = sub_pose.0001.desc.short
	theme = seduction

	right_portrait = {
		character = scope:recipient
    	animation = personality_compassionate
	}

	option = {
		name = sub_pose.0001.b
		trigger_event = sub_pose.0002
	}

	option = {
		name = sub_pose.0001.c
		trigger_event = sub_pose.0003
	}

	option = {
		name = sub_pose.0001.d
		trigger_event = sub_pose.0004
	}

	option = {
		name = sub_pose.0001.e
		trigger_event = sub_pose.0005
	}

	option = {
		name = sub_pose.0001.f
	}

}

sub_pose.0002 = {
	type = character_event
	title = sub_pose.0001.t
	desc = sub_pose.0002.desc.short
	theme = seduction

	right_portrait = {
		character = scope:recipient
    	animation = flirtation
	}

	option = {
		name = sub_pose.0001.a
		trigger_event = sub_pose.0001
	}

	option = {
		name = sub_pose.0001.c
		trigger_event = sub_pose.0003
	}

	option = {
		name = sub_pose.0001.d
		trigger_event = sub_pose.0004
	}

	option = {
		name = sub_pose.0001.e
		trigger_event = sub_pose.0005
	}

	option = {
		name = sub_pose.0001.f
	}
}

sub_pose.0003 = {
	type = character_event
	title = sub_pose.0001.t
	desc = sub_pose.0003.desc.short
	theme = seduction

	right_portrait = {
		character = scope:recipient
    	animation = shame
	}

	option = {
		name = sub_pose.0001.a
		trigger_event = sub_pose.0001
	}

	option = {
		name = sub_pose.0001.b
		trigger_event = sub_pose.0002
	}

	option = {
		name = sub_pose.0001.d
		trigger_event = sub_pose.0004
	}

	option = {
		name = sub_pose.0001.e
		trigger_event = sub_pose.0005
	}

	option = {
		name = sub_pose.0001.f
	}
}

sub_pose.0004 = {
	type = character_event
	title = sub_pose.0001.t
	desc = sub_pose.0004.desc.short
	theme = seduction

	right_portrait = {
		character = scope:recipient
    	animation = personality_content
	}

	option = {
		name = sub_pose.0001.a
		trigger_event = sub_pose.0001
	}

	option = {
		name = sub_pose.0001.b
		trigger_event = sub_pose.0002
	}

	option = {
		name = sub_pose.0001.c
		trigger_event = sub_pose.0003
	}

	option = {
		name = sub_pose.0001.e
		trigger_event = sub_pose.0005
	}

	option = {
		name = sub_pose.0001.f
	}
}

sub_pose.0005 = {
	type = character_event
	title = sub_pose.0001.t
	desc = sub_pose.0005.desc.short
	theme = seduction

	right_portrait = {
		character = scope:recipient
    	animation = prisondungeon
	}

	option = {
		name = sub_pose.0001.a
		trigger_event = sub_pose.0001
	}

	option = {
		name = sub_pose.0001.b
		trigger_event = sub_pose.0002
	}

	option = {
		name = sub_pose.0001.c
		trigger_event = sub_pose.0003
	}

	option = {
		name = sub_pose.0001.d
		trigger_event = sub_pose.0004
	}

	option = {
		name = sub_pose.0001.f
	}
}


code:
namespace = sub_rules

# Set Chastity Rules
sub_rules.0001 = {
	type = character_event
	title = sub_rules.0001.t
	desc = sub_rules.0001.desc.short
	theme = marriage

	right_portrait = {
		character = scope:recipient
		animation = personality_coward
	}

	option = {
		name = sub_rules.0001.a
		scope:recipient = {
			if = {
				limit = { has_trait = sub_chastity_rule_1 }
				remove_trait = sub_chastity_rule_1
			}
			if = {
				limit = { has_trait = sub_chastity_rule_2 }
				remove_trait = sub_chastity_rule_2
			}
			if = {
				limit = { has_trait = sub_chastity_rule_3 }
				remove_trait = sub_chastity_rule_3
			}
			if = {
				limit = { has_trait = sub_chastity_rule_4 }
				remove_trait = sub_chastity_rule_4
			}
		}
	}

	option = {
		name = sub_rules.0001.b

		trigger = {
			scope:recipient = { has_trait = sub_subservient }
		}

		scope:recipient = {
			if = {
				limit = { has_trait = sub_chastity_rule_2 }
				remove_trait = sub_chastity_rule_2
			}
			if = {
				limit = { has_trait = sub_chastity_rule_3 }
				remove_trait = sub_chastity_rule_3
			}
			if = {
				limit = { has_trait = sub_chastity_rule_4 }
				remove_trait = sub_chastity_rule_4
			}
			add_trait = sub_chastity_rule_1
		}
	}

	option = {
		name = sub_rules.0001.c

		trigger = {
			scope:recipient = {
				OR = {
					has_trait = sub_subservient_2
					has_trait = sub_subservient_3
					has_trait = sub_subservient_4
				}
			}
		}

		scope:recipient = {
			if = {
				limit = { has_trait = sub_chastity_rule_1 }
				remove_trait = sub_chastity_rule_1
			}
			if = {
				limit = { has_trait = sub_chastity_rule_3 }
				remove_trait = sub_chastity_rule_3
			}
			if = {
				limit = { has_trait = sub_chastity_rule_4 }
				remove_trait = sub_chastity_rule_4
			}
			add_trait = sub_chastity_rule_2
    	}
	}

	option = {
		name = sub_rules.0001.d

		trigger = {
			scope:recipient = { has_trait = sub_subservient_4 }
		}

		scope:recipient = {
			if = {
				limit = { has_trait = sub_chastity_rule_1 }
				remove_trait = sub_chastity_rule_1
			}
			if = {
				limit = { has_trait = sub_chastity_rule_2 }
				remove_trait = sub_chastity_rule_2
			}
			if = {
				limit = { has_trait = sub_chastity_rule_4 }
				remove_trait = sub_chastity_rule_4
			}
			add_trait = sub_chastity_rule_3
		}
	}

	option = {
		name = sub_rules.0001.e

		trigger = {
			scope:recipient = { has_trait = sub_subservient_4 }
		}

		scope:recipient = {
			if = {
				limit = { has_trait = sub_chastity_rule_1 }
				remove_trait = sub_chastity_rule_1
			}
			if = {
				limit = { has_trait = sub_chastity_rule_2 }
				remove_trait = sub_chastity_rule_2
			}
			if = {
				limit = { has_trait = sub_chastity_rule_3 }
				remove_trait = sub_chastity_rule_3
			}
			add_trait = sub_chastity_rule_4
		}
	}

	option = {
		name = sub_rules.0001.f
	}
}

# Set Clothing Rules
sub_rules.0002 = {
	type = character_event
	title = sub_rules.0002.t
	desc = sub_rules.0002.desc.short
	theme = marriage

	right_portrait = {
		character = scope:recipient
		animation = personality_coward
	}

	option = {
		name = sub_rules.0002.a
		scope:recipient = {
			if = {
				limit = { has_trait = sub_clothing_rule_1 }
				remove_trait = sub_clothing_rule_1
			}
			if = {
				limit = { has_trait = sub_clothing_rule_2 }
				remove_trait = sub_clothing_rule_2
			}
			if = {
				limit = { has_trait = sub_clothing_rule_3 }
				remove_trait = sub_clothing_rule_3
			}
		}
	}

	option = {
		name = sub_rules.0002.b

		trigger = {
			scope:recipient = { has_trait = sub_subservient }
		}

		scope:recipient = {
			if = {
				limit = { has_trait = sub_clothing_rule_2 }
				remove_trait = sub_clothing_rule_2
			}
			if = {
				limit = { has_trait = sub_clothing_rule_3 }
				remove_trait = sub_clothing_rule_3
			}
			add_trait = sub_clothing_rule_1
		}
	}

	option = {
		name = sub_rules.0002.c

		trigger = {
			scope:recipient = {
				OR = {
					has_trait = sub_subservient_2
					has_trait = sub_subservient_3
					has_trait = sub_subservient_4
				}
			}
		}

		scope:recipient = {
			if = {
				limit = { has_trait = sub_clothing_rule_1 }
				remove_trait = sub_clothing_rule_1
			}
			if = {
				limit = { has_trait = sub_clothing_rule_3 }
				remove_trait = sub_clothing_rule_3
			}
			add_trait = sub_clothing_rule_2
    	}
	}

	option = {
		name = sub_rules.0002.d

		trigger = {
			scope:recipient = { has_trait = sub_subservient_4 }
		}

		scope:recipient = {
			if = {
				limit = { has_trait = sub_clothing_rule_1 }
				remove_trait = sub_clothing_rule_1
			}
			if = {
				limit = { has_trait = sub_clothing_rule_2 }
				remove_trait = sub_clothing_rule_2
			}
			add_trait = sub_clothing_rule_3
			add_opinion = {
				modifier = sub_made_me_go_naked
				target = scope:actor
			}
		}
	}

	option = {
		name = sub_rules.0002.e
	}
}


code:
# namespace = sub_training

# sub_training.0001 = {
# 	type = character_event
# 	title = "test title"
# 	desc = "test desc"
# 	theme = seduction

# 	right_portrait = {
# 		character = scope:recipient
#     	animation = personality_compassionate
# 	}

# 	# option = {
# 	# 	name = "start obedience training"

# 	# 	trigger = {
# 	# 		scope:recipient = {
# 	# 			NOT = { has_trait = sub_subservient_4 }
# 	# 		}
# 	# 	}

# 	# 	start_scheme = {
# 	# 		type = sub_train_obedience
# 	# 		target = scope:recipient
#     # 	}
# 	# }

# 	option = {
# 		name = "cancel"
# 	}
# }


code:
# The outcome of a sub_train_obedience scheme

namespace = sub_train_obedience_outcome

## This mod hasn't set up outcome events for either AI or player targets, nor an
## on_action for scheme failure, as it currently assumes only players will be
## initiating the scheme, and that success chance is always 100%

# Following CK3 scheme outcome conventions:
# 0000-0999: Maintenance events
# 1000-1999: Setup events
# 2000-2999: Success events for scheme owner
# 3000-3999: Success events for scheme target
# 4000-4999: Failure events for scheme owner

##"Hard" rejections that block the target for future schemes
# 8100-8999: Early outcome events

# 0001: target died
# 0002: relationship with target changed
# 1000: scheme begins
# 1001-1003: scheme begins reactions
# 1500-1502: milestones 1-3
# 2000: success

######################################################
# MAINTENANCE EVENTS
# 0000-0999
######################################################

# No more valid relation with target
sub_train_obedience_outcome.0001 = {
	type = character_event
	title = sub_train_obedience_outcome.0001.t
	desc = sub_train_obedience_outcome.0001.desc

	theme = seduce_scheme
	right_portrait = scope:target
	#No scheme, no widget

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

# Target died
sub_train_obedience_outcome.0002 = {
	type = character_event
	title = sub_train_obedience_outcome.0002.t
	desc = sub_train_obedience_outcome.0002.desc

	theme = seduce_scheme
	right_portrait = scope:target
	#No scheme, no widget

	option = {
		name = sub_train_obedience_outcome.0002.a
	}
}

######################################################
# SETUP EVENTS
# 1000-1999
######################################################

# Begin training
sub_train_obedience_outcome.1000 = {
	type = character_event
	title = sub_train_obedience_outcome.1000.t
	desc = sub_train_obedience_outcome.1000.desc

	theme = seduce_scheme
	right_portrait = scope:target
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	immediate = {
		scope:scheme = {
			sub_count_categorized_personality_traits = yes
			sub_set_train_obedience_receptiveness = yes
		}
	}

	option = {
		name = sub_train_obedience_outcome.1000.a

		trigger_event = {
				on_action = sub_train_obedience_start_response
			}
	}

	after = {
		hidden_effect = {
			scope:scheme = {
				sub_train_obedience_event_aftereffects = yes
			}
		}
	}
}

# Begin training responses
# Positive response
sub_train_obedience_outcome.1001 = {
	type = character_event
	title = sub_train_obedience_outcome.1001.t
	desc = sub_train_obedience_outcome.1001.desc

	theme = seduce_scheme
	right_portrait = {
		character = scope:target
		animation = admiration
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		AND = {
			exists = scope:scheme
			scope:target = { has_character_flag = sub_receptive_training_response }
		}
	}

	option = {
		name = sub_train_obedience_outcome.1001.a

		scope:owner = {
			add_stress = -20
		}

		scope:target = {
			add_opinion = {
				modifier = sub_positive_training_start
				target = scope:owner
			}
		}
	}
}

# Negative response
sub_train_obedience_outcome.1002 = {
	type = character_event
	title = sub_train_obedience_outcome.1002.t
	desc = sub_train_obedience_outcome.1002.desc

	theme = seduce_scheme
	right_portrait = {
		character = scope:target
		animation = dismissal
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		AND = {
			exists = scope:scheme
			scope:target = { has_character_flag = sub_unreceptive_training_response }
		}
	}

	option = {
		name = sub_train_obedience_outcome.1002.a

		scope:owner = {
			add_stress = 20
		}

		scope:target = {
			add_opinion = {
				modifier = sub_negative_training_start
				target = scope:owner
			}
		}
	}

	option = {
		name = sub_train_obedience_outcome.1002.b

		scope:scheme = {
			end_scheme = yes
		}
	}
}

# Neutral response
sub_train_obedience_outcome.1003 = {
	type = character_event
	title = sub_train_obedience_outcome.1003.t
	desc = sub_train_obedience_outcome.1003.desc

	theme = seduce_scheme
	right_portrait = {
		character = scope:target
		animation = personality_coward
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		AND = {
			exists = scope:scheme
			scope:target = { has_character_flag = sub_neutral_training_response }
		}
	}

	option = {
		name = sub_train_obedience_outcome.1003.a
	}
}

# Milestone 1
sub_train_obedience_outcome.1500 = {
	type = character_event
	title = sub_train_obedience_outcome.1500.t
	# desc = sub_train_obedience_outcome.1500.desc
	desc = {
		desc = sub_train_obedience_outcome.1500.desc
		first_valid = {
			triggered_desc = {
				trigger = { scope:target = { has_character_flag = sub_receptive_training_response } }
				desc = sub_train_obedience_outcome.1500.pos_response.desc
			}
			triggered_desc = {
				trigger = { scope:target = { has_character_flag = sub_unreceptive_training_response } }
				desc = sub_train_obedience_outcome.1500.neg_response.desc
			}
			# should have a neutral flag, but leave as fallback
			desc = sub_train_obedience_outcome.1500.neutral_response.desc
		}
		desc = sub_train_obedience_outcome.1500.trait_swap.desc
	}

	theme = seduce_scheme
	right_portrait = {
		character = scope:target
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	immediate = {
		scope:scheme = {
			sub_select_random_replaced_trait = yes
			sub_select_random_replacement_trait = yes
			add_scheme_modifier = { type = sub_training_milestone_scheme_power_1 }
		}
		scope:target = {
			add_trait = sub_subservient_1
		}
	}

	option = {
		scope:target = {
			sub_add_and_remove_selected_sub_traits = yes
		}

		name = sub_train_obedience_outcome.1500.a
	}

	option = {
		name = sub_train_obedience_outcome.1500.b
	}

	after = {
		hidden_effect = {
			scope:scheme = {
				sub_set_scheme_opinion_modifier = yes
				sub_train_obedience_event_aftereffects = yes
			}
		}
	}
}

# Milestone 2
sub_train_obedience_outcome.1501 = {
	type = character_event
	title = sub_train_obedience_outcome.1501.t
	desc = {
		desc = sub_train_obedience_outcome.1501.desc
		first_valid = {
			triggered_desc = {
				trigger = { scope:target = { has_character_flag = sub_unreceptive_training_response } }
				desc = sub_train_obedience_outcome.1501.neg_response.desc
			}
			desc = sub_train_obedience_outcome.1501.pos_response.desc
		}
		desc = sub_train_obedience_outcome.1501.trait_swap.desc
	}

	theme = seduce_scheme
	right_portrait = {
		character = scope:target
		animation = personality_content
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	immediate = {
		scope:scheme = {
			sub_select_random_replaced_trait = yes
			sub_select_random_replacement_trait = yes
			add_scheme_modifier = { type = sub_training_milestone_scheme_power_2 }
		}
		scope:target = {
			hidden_effect = {
				remove_trait = sub_subservient_1
			}
			add_trait = sub_subservient_2
			add_opinion = {
				modifier = sub_positive_training_start
				target = scope:owner
			}
		}
	}

	option = {
		scope:target = {
			sub_add_and_remove_selected_sub_traits = yes
		}

		name = sub_train_obedience_outcome.1501.a
	}

	option = {
		name = sub_train_obedience_outcome.1501.b
	}

	after = {
		hidden_effect = {
			scope:scheme = {
				sub_set_scheme_opinion_modifier = yes
				sub_train_obedience_event_aftereffects = yes
			}
		}
	}
}

# Milestone 3
sub_train_obedience_outcome.1502 = {
	type = character_event
	title = sub_train_obedience_outcome.1502.t
	desc = {
		desc = sub_train_obedience_outcome.1502.desc
		desc = sub_train_obedience_outcome.1502.trait_swap.desc
	}

	theme = seduce_scheme
	right_portrait = {
		character = scope:target
		animation = ecstasy
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		exists = scope:scheme
	}

	immediate = {
		scope:scheme = {
			sub_select_random_replaced_trait = yes
			sub_select_random_replacement_trait = yes
			add_scheme_modifier = { type = sub_training_milestone_scheme_power_3 }
		}
		scope:target = {
			hidden_effect = {
				remove_trait = sub_subservient_2
			}
			add_trait = sub_subservient_3
			add_opinion = {
				modifier = sub_positive_training_start
				target = scope:owner
			}
		}
	}

	option = {
		scope:target = {
			sub_add_and_remove_selected_sub_traits = yes
		}

		name = sub_train_obedience_outcome.1502.a
	}

	option = {
		name = sub_train_obedience_outcome.1502.b
	}

	after = {
		hidden_effect = {
			scope:scheme = {
				sub_set_scheme_opinion_modifier = yes
				sub_train_obedience_event_aftereffects = yes
			}
		}
	}
}

######################################################
# SUCCESS EVENTS FOR OWNER
# 2000-2999
######################################################

sub_train_obedience_outcome.2000 = {
	type = character_event
	title = sub_train_obedience_outcome.2000.t
	desc = sub_train_obedience_outcome.2000.desc

	theme = seduce_scheme
	right_portrait = {
		character = scope:target
		animation = admiration
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	immediate = {
		play_music_cue = "mx_cue_seduction"
		sub_train_obedience_success_effect = {
			DOMINANT = scope:owner
			SUBMISSIVE = scope:target
		}
		scope:target = {
			add_character_flag = {
				flag = is_naked
				days = 180
			}
		}
	}

	option = {
		name = sub_train_obedience_outcome.2000.a
	}

	after = {
		if = {
			limit = { exists = scope:scheme }
			scope:scheme = {
				end_scheme = yes
			}
		}
		scope:target = {
			remove_character_flag = is_naked
		}
	}
}


code:
namespace = sub_yearly

# Generic stress reduction
sub_yearly.1001 = {
	hidden = yes

	immediate = {
		send_interface_message = {
			type = event_generic_good
			title = sub_yearly_stress_reduction_title
			left_icon = ROOT
			right_icon = scope:lucky_submissive
			custom_tooltip = sub_yearly_stress_reduction_tooltip
			add_stress = {
				value = minor_stress_impact_loss
			}
		}
	}
}


code:
l_english:
 SUB_MASTER: "master"
 SUB_MISTRESS: "mistress"
 SUB_MASTER_POSSESSIVE: "master's"
 SUB_MISTRESS_POSSESSIVE: "mistress'"
 SUB_PENIS: "penis"
 SUB_PUSSY: "pussy"
 SUB_MALE_TORSO: "torso"
 SUB_FEMALE_TORSO: "breasts"


code:
l_english:
 sub_pose.0001.t: "Putting On A Show"
 sub_pose.0001.desc.short: ""What do you desire, [actor.Custom('SubMasterMistress')|U]?""
 sub_pose.0002.desc.short: ""I was hoping you would say that, [actor.Custom('SubMasterMistress')|U]. Perhaps when you're satisfied with my little show, we could move to the bed?""
 sub_pose.0003.desc.short: ""Yes, a little... but you can look all you want, [actor.Custom('SubMasterMistress')|U]. Your pleasure is more important than my modesty.""
 sub_pose.0004.desc.short: ""I will do my best, [actor.Custom('SubMasterMistress')|U], but having you watching me is very... distracting. Does this pose please you?""
 sub_pose.0005.desc.short: ""Oh...! H-how long have you had shackles in here?! And m-more importantly, how long are you going to keep me locked up like this...?""

 sub_pose.0001.a: "Actually the first pose was fine."
 sub_pose.0001.b: "You look stunning."
 sub_pose.0001.c: "Getting embarrassed at all?"
 sub_pose.0001.d: "Just try to look natural."
 sub_pose.0001.e: "Actually, I think you'd look best chained up!"
 sub_pose.0001.f: "That will be all for now."

 sub_rules.0001.t: "Changing Chastity Rules"
 sub_rules.0001.desc.short: "You consider the different rules you could set for [recipient.GetFirstNameNoTooltip]'s orgasms."

 sub_rules.0001.a: "Remove all restrictions on [recipient.GetHerHis] orgasms."
 sub_rules.0001.b: "Occasional orgasm denial will do [recipient.GetHerHim] good."
 sub_rules.0001.c: "Keep [recipient.GetHerHim] denied. Perhaps a few orgasms a year, if [recipient.GetSheHe] behaves."
 sub_rules.0001.d: "Orgasms? Never! In fact, a no-touch rule is what [recipient.GetSheHe] needs."
 sub_rules.0001.e: "Lock [recipient.GetHerHim] in a chastity belt. No orgasms, no touching, and no chance of pregnancy."
 sub_rules.0001.f: "Nevermind."

 sub_rules.0002.t: "Changing Clothing Rules"
 sub_rules.0002.desc.short: "Dressing up [recipient.GetFirstNameNoTooltip] in the privacy of your chambers is enjoyable, of course, but you could also determine what [recipient.GetSheHe]'s allowed to wear the rest of the time..."

 sub_rules.0002.a: "Let [recipient.GetHerHim] wear what [recipient.GetSheHe] likes."
 sub_rules.0002.b: "Have [recipient.GetHerHim] dress provocatively."
 sub_rules.0002.c: "Permit undergarments only."
 sub_rules.0002.d: "Revoke all clothing privileges!"
 sub_rules.0002.e: "Nevermind."


code:
l_english:
 sub_recent_training_modifier: "Dominant Aura"
 sub_training_milestone_scheme_power_1: "Prior Training"
 sub_training_milestone_scheme_power_2: "Prior Training"
 sub_training_milestone_scheme_power_3: "Prior Training"
 sub_positive_trait_scheme_power: "Naturally Submissive"
 sub_negative_trait_scheme_resistance: "Naturally Independent"
 sub_highest_pos_opinion_scheme_power: "Enamored With You"
 sub_high_pos_opinion_scheme_power: "Adores You"
 sub_medium_pos_opinion_scheme_power: "Admires You"
 sub_low_pos_opinion_scheme_power: "Likes You"
 sub_highest_neg_opinion_scheme_resistance: "Loathes You"
 sub_high_neg_opinion_scheme_resistance: "Detests You"
 sub_medium_neg_opinion_scheme_resistance: "Hates You"
 sub_low_neg_opinion_scheme_resistance: "Dislikes You"


code:
l_english:
 sub_subservient_to_master: "Obedient to [GetPlayer.Custom('SubMasterMistress')|U]"
 sub_made_me_go_naked: "What?! But everyone will see!"
 sub_positive_training_start: "Enjoys being trained"
 sub_negative_training_start: "Resents being trained"


code:
l_english:
 game_concept_sub_train_obedience_scheme: "Obedience Training Scheme"
 game_concept_sub_train_obedience_schemes: "Obedience Training Schemes"
 game_concept_sub_train_obedience: "Obedience Training"
 game_concept_sub_train_obedience_action: "Train"
 game_concept_sub_train_obedience_scheme_single: "an Obedience Training Scheme"
 game_concept_sub_train_obedience_scheme_desc: "The $game_concept_sub_train_obedience_scheme$ is a [personal_scheme|E] to train a character in [sub_subservience_concept|E], eventually making them your [submissive|E]. It is not [secret_scheme_single|E] and does not use [agents|E].\n\nYour [martial|E] has a slight effect on [scheme_power|E], but power is mostly based on the [scheme_target|E]'s personality and [opinion|E] of you. While eventual success is assured, low opinion or a willful personality can make it a long process. However, the rewards last a lifetime and are well worth the effort."

 game_concept_sub_subservience_concept: "Subservience"
 game_concept_sub_subservient_concept: "Subservient"
 game_concept_sub_subservience_concept_desc: "$game_concept_sub_subservience_concept$ has many facets, and is taught through the [sub_train_obedience_scheme|E]. Characters who are $game_concept_sub_subservient_concept$ to a Master or Mistress tend to have an extremely high opinion of that character, strive to please them, and are open to following rules set by them.\n\nBeing $game_concept_sub_subservient_concept$ to someone is intimately related to being their [submissive|E], but they are not identical. Completing $game_concept_sub_train_obedience_scheme_single$ will make the trainee $game_concept_sub_subservient_concept$ for life, but the $game_concept_submissive$ [relation|E] depends upon the continued consent of both the $game_concept_submissive$ and the $game_concept_dominant$."


code:
l_english:
 rule_sub_valid_subs: "#X Submissive Partners:#! Valid Sub Genders"
 setting_sub_valid_subs_all_genders: "All Genders"
 setting_sub_valid_subs_all_genders_desc: "Both male and female characters can become $game_concept_submissives$."
 setting_sub_valid_subs_female_only: "#high Female Only#!"
 setting_sub_valid_subs_female_only_desc: "Only female characters can become $game_concept_submissives$."
 setting_sub_valid_subs_male_only: "#high Male Only#!"
 setting_sub_valid_subs_male_only_desc: "Only male characters can become $game_concept_submissives$."

 rule_sub_gender_attraction_requirement: "#X Submissive Partners:#! Gender Attraction Requirement"
 setting_sub_gender_attraction_requirement_enabled: "Enabled"
 setting_sub_gender_attraction_requirement_enabled_desc: "Characters will not enter into a $game_concept_dominant$/$game_concept_submissive$ relationship unless each is attracted to the other's gender."
 setting_sub_gender_attraction_requirement_disabled: "#high Disabled#!"
 setting_sub_gender_attraction_requirement_disabled_desc: "Characters can enter into a $game_concept_dominant$/$game_concept_submissive$ relationship regardless of gender attraction."

 rule_sub_incestuous_training: "#X Submissive Partners:#! Incest Mode"
 setting_sub_incestuous_training_enabled: "Enabled"
 setting_sub_incestuous_training_enabled_desc: "Can always enter into a $game_concept_dominant$/$game_concept_submissive$ relationship with close family members."
 setting_sub_incestuous_training_disabled: "#high Disabled#!"
 setting_sub_incestuous_training_disabled_desc: "No special rules around entering into a $game_concept_dominant$/$game_concept_submissive$ relationship with close family members."


code:
l_english:
 action_can_obedience_train: "Partner can be trained"
 action_can_obedience_train_combined_group_label: "Partners can be trained"
 action_can_obedience_train_combined_group_name: "$action_can_obedience_train_combined_group_label$"
 action_can_obedience_train_desc: "One of your partners, [recipient.GetUIName], can be trained in [sub_subservience_concept|E]."
 action_can_obedience_train_combined_group_description: "You can train partners in [sub_subservience_concept|E]."
 action_can_obedience_train_label: "You can train [recipient.GetShortUINameNoTooltip] in $game_concept_sub_subservience_concept$"
 action_can_obedience_train_combined_label: "[recipient.GetUINameNoTooltip]"
 action_can_obedience_train_click: "#I Click to open Train Interaction#!"

 action_can_accelerated_obedience_train: "Partner can be made obedient"
 action_can_accelerated_obedience_train_combined_group_label: "Partners can be made obedient"
 action_can_accelerated_obedience_train_combined_group_name: "$action_can_accelerated_obedience_train_combined_group_label$"
 action_can_accelerated_obedience_train_desc: "One of your partners, [recipient.GetUIName], can be immediately made [sub_subservient_concept|E] to you."
 action_can_accelerated_obedience_train_combined_group_description: "You can immediately make some of your partners [sub_subservient_concept|E] to you."
 action_can_accelerated_obedience_train_label: "You can make [recipient.GetShortUIName] $game_concept_sub_subservient_concept$"
 action_can_accelerated_obedience_train_combined_label: "[recipient.GetUINameNoTooltip]"
 action_can_accelerated_obedience_train_click: "#I Click to open Interaction#!"


code:
l_english:
 # Interactions
 sub_show_pose_interaction: "Pose For Me"
 sub_show_pose_interaction_desc: "Have [recipient.GetFirstNameNoTooltip] strike some poses."
 sub_clothing_rules_interaction: "Set Clothing Rules"
 sub_clothing_rules_interaction_desc: "Decide what clothing, if any, [recipient.GetShortUINameNoTooltip] should wear in public."
 sub_chastity_rules_interaction: "Set Chastity Rules"
 sub_chastity_rules_interaction_desc: "Decide how often [recipient.GetShortUINameNoTooltip] is allowed orgasms, or lock [recipient.GetHerHim] up in chastity to prevent pregnancy entirely."
 sub_train_obedience_accelerated_interaction: "Instill Obedience"
 sub_train_obedience_accelerated_interaction_desc: "Since [recipient.GetShortUINameNoTooltip] has already been superbly trained, [recipient.GetSheHe] will willingly become [sub_subservient_concept|E] to you."
 sub_remove_submissive_interaction: "Set Aside $game_concept_submissive$"
 sub_remove_submissive_interaction_desc: "While [recipient.GetHerHis] devotion and training will remain, sexually you will no longer consider [recipient.GetShortUINameNoTooltip] your [submissive|E]."
 sub_remove_submissive_interaction_notification: "Set Aside $game_concept_submissive$"
 sub_regain_submissive_interaction: "Take $game_concept_submissive$"
 sub_regain_submissive_interaction_desc: "You once again desire to call [recipient.GetShortUINameNoTooltip] your [submissive|E]."
 sub_regain_submissive_interaction_notification: "Took $game_concept_submissive$"

 START_SUB_TRAINING: "Begin Training"

 # Toasts
 sub_accept_order: ""Of course, [actor.Custom('SubMasterMistress')|U]""
 sub_train_obedience_interaction_toast: "$game_concept_sub_train_obedience$"
 sub_train_obedience_accelerated_interaction_toast: "[recipient.GetFirstNameNoTooltip] professes [recipient.GetHerHis] loyalty"

 # Interface Message
 sub_yearly_stress_reduction_title: "Stress Reduction"
 sub_yearly_stress_reduction_tooltip: "Your partner's comforting presence makes life a little easier"

 # Debugging/Testing
#  sub_make_busty_interaction: "Breast Enhancement"
#  sub_make_busty_interaction_desc: "..."

#  sub_breast_enhancement_order: "I feel funny..."


code:
l_english:
 # Scheme Interaction
 sub_train_obedience_interaction: "$game_concept_sub_train_obedience$ #weak (Scheme)#!"
 sub_train_obedience_interaction_desc: "[sub_train_obedience_action|E] [recipient.GetShortUINameNoTooltip] to be your [submissive|E]*\n\n*preview time to complete innacurate"

 # Notifications
 sub_train_obedience: "$game_concept_sub_train_obedience_scheme$"
 sub_train_obedience_invalid: "I stop trying to [sub_train_obedience_action|E] [target.GetShortUINameNoTooltip] as [target.GetSheHe] can no longer become my [submissive|E]."

 # Scheme Name/Description
 sub_train_obedience_action: "Train"
 sub_train_obedience_desc: "$sub_train_obedience_action$ [SCHEME.GetTarget.GetShortUINameNoTooltip] in [sub_subservience_concept|E], eventually making [SCHEME.GetTarget.GetHerHim] your [submissive|E]."
 sub_train_obedience_desc_general: "$sub_train_obedience_action$ a character in [sub_subservience_concept|E], eventually making them your [submissive|E]."
 SUB_TRAIN_OBEDIENCE_SUCCESS_DESC: "[TARGET_CHARACTER.GetShortUINameNoTooltip] will become your [submissive|E], and be devoted and loyal to you for life"


code:
l_english:
 sub_suggestion_obedience_training_label: "Train Partner"
 sub_suggestion_obedience_training: "Suggestion: Train [recipient.GetShortUIName] in $game_concept_sub_subservience_concept$"
 sub_suggestion_obedience_training_desc: "Your [actor.Custom2('RelationToMeShort', SCOPE.sC('recipient'))] [recipient.GetShortUINameNoTooltip] can be trained to be [sub_subservient_concept|E] to you, offering a variety of benefits both personally and politically."
 sub_suggestion_obedience_training_click: "#I Click to open Train Interaction#!"


code:
l_english:
 trait_sub_subservient: "Subservience"
 trait_sub_subservient_1: "Trainee (Obedience)"
 trait_sub_subservient_1_desc: "This character has a basic idea of the obedience expected of a $game_concept_submissive$, but not much more than that."
 trait_sub_subservient_1_character_desc: "[ROOT.GetCharacter.GetFirstNameNoTooltip] has a basic idea of the obedience expected of a $game_concept_submissive$, but not much more than that."
 trait_sub_subservient_2: "Deferential"
 trait_sub_subservient_2_desc: "This character obeys quickly and naturally, and has even started to find joy in doing so."
 trait_sub_subservient_2_character_desc: "[ROOT.GetCharacter.GetFirstNameNoTooltip] obeys quickly and naturally, and has even started to find joy in doing so."
 trait_sub_subservient_3: "Obedient"
 trait_sub_subservient_3_desc: "This character has learned everything there is to learn about obedience to a $game_concept_dominant$. All that's left to do is make the lessons stick."
 trait_sub_subservient_3_character_desc: "[ROOT.GetCharacter.GetFirstNameNoTooltip] has learned everything there is to learn about obedience to a $game_concept_dominant$. All that's left to do is make the lessons stick."
 trait_sub_subservient_4: "Subservient"
 trait_sub_subservient_4_desc: "This character has embraced their position as a $game_concept_submissive$. Obedience has become second nature to them."
 trait_sub_subservient_4_character_desc: "[ROOT.GetCharacter.GetFirstNameNoTooltip] has embraced [ROOT.GetCharacter.GetHerHis] position as a $game_concept_submissive$. Obedience has become second nature to [ROOT.GetCharacter.GetHerHim]."

 trait_sub_clothing_rules: "Clothing Rules"
 trait_sub_clothing_rule_1: "Revealing Attire"
 trait_sub_clothing_rule_1_desc: "Showing more skin than usual, but not so much as to upset anyone with a more old-fashioned outlook."
 trait_sub_clothing_rule_1_character_desc: "[ROOT.GetCharacter.GetFirstNameNoTooltip] shows more skin than usual, but not so much as to upset anyone with a more old-fashioned outlook."
 trait_sub_clothing_rule_2: "Scandalous Attire"
 trait_sub_clothing_rule_2_desc: "Wears so little that what clothes are there seem more like a formality, rather than offering real coverage."
 trait_sub_clothing_rule_2_character_desc: "[ROOT.GetCharacter.GetFirstNameNoTooltip] wears so little that what clothes are there seem more like a formality, rather than offering real coverage."
 trait_sub_clothing_rule_3: "Forced Nudity"
 trait_sub_clothing_rule_3_desc: "Baring it all, whether they want to or not."
 trait_sub_clothing_rule_3_character_desc: "[ROOT.GetCharacter.GetFirstNameNoTooltip] is baring it all, whether [ROOT.GetCharacter.GetSheHe] wants to or not."
 trait_sub_clothing_rule_4: "Clothing Rule 4"
 trait_sub_clothing_rule_4_desc: "This trait isn't supposed to be used. You didn't... you didn't try to CHEAT, did you?!"

 trait_sub_chastity_rules: "Chastity Rules"
 trait_sub_chastity_rule_1: "Orgasms Restricted"
 trait_sub_chastity_rule_1_desc: "This character is often denied release, and their libido has noticeably grown."
 trait_sub_chastity_rule_1_character_desc: "[ROOT.GetCharacter.GetFirstNameNoTooltip] is often denied release, and [ROOT.GetCharacter.GetHerHis] libido has noticeably grown."
 trait_sub_chastity_rule_2: "Orgasms Forbidden"
 trait_sub_chastity_rule_2_desc: "Only allowed orgasms as a rare treat, this character spends most of their waking hours filled with lust- and most of their sleeping hours, for that matter!"
 trait_sub_chastity_rule_2_character_desc: "Only allowed orgasms as a rare treat, [ROOT.GetCharacter.GetFirstNameNoTooltip] spends most of [ROOT.GetCharacter.GetHerHis] waking hours filled with lust- and most of [ROOT.GetCharacter.GetHerHis] sleeping hours, for that matter!"
 trait_sub_chastity_rule_3: "Touching Forbidden"
 trait_sub_chastity_rule_3_desc: "Forbidden from touching themself in any way, and only allowed orgasms as the rarest of treats, this character constantly rubs their legs together subconsciously and struggles to think about anything other than sex."
 trait_sub_chastity_rule_3_character_desc: "Forbidden from touching [ROOT.GetCharacter.GetHerselfHimself] in any way, and only allowed orgasms as the rarest of treats, [ROOT.GetCharacter.GetFirstNameNoTooltip] constantly rubs [ROOT.GetCharacter.GetHerHis] legs together subconsciously and struggles to think about anything other than sex."
 trait_sub_chastity_rule_4: "Locked In Chastity"
 trait_sub_chastity_rule_4_desc: "This character has been locked in a chastity belt. Only their [GetPlayer.Custom('SubMasterMistressPossessive')|U] mercy can free their genitals from their prison."
 trait_sub_chastity_rule_4_character_desc: "[ROOT.GetCharacter.GetFirstNameNoTooltip] has been locked in a chastity belt. Only [ROOT.GetCharacter.GetHerHis] [GetPlayer.Custom('SubMasterMistressPossessive')|U] mercy can free [ROOT.GetCharacter.GetHerHis] [ROOT.GetCharacter.Custom('SubGenderedGenitals')] from its prison."


code:
l_french:
#Relations
 SUB_MASTER: "maître"
 SUB_MISTRESS: "maîtresse"
 SUB_MASTER_POSSESSIVE: "du maître"
 SUB_MISTRESS_POSSESSIVE: "de la maîtresse"

#Anatomie
 SUB_PENIS: "penis"
 SUB_PUSSY: "vagin"
 SUB_MALE_TORSO: "torse"
 SUB_FEMALE_TORSO: "poitrine"


code:
l_french:
 sub_pose.0001.t: "Se donner en spectacle"
 sub_pose.0001.desc.short: ""Quel est votre souhait, [actor.Custom('SubMasterMistress')|U]?""
 sub_pose.0002.desc.short: ""J'éspérais que vous disiez cela, [actor.Custom('SubMasterMistress')|U]. Lorsque vous serez satisfait de mon spectacle peut etre pourrions-nous aller sous les draps?""
 sub_pose.0003.desc.short: ""Oui, un petit peu... mais vous pouvez regarder de tout votre saoûl, [actor.Custom('SubMasterMistress')|U]. Votre plaisir est plus important que ma modestie.""
 sub_pose.0004.desc.short: ""Je ferais de mon mieux, [actor.Custom('SubMasterMistress')|U], Mais vous avoir ici a me regarder est tres ... perturbant. Est-ce que cette pose vous plait ?""
 sub_pose.0005.desc.short: ""Oh...! D-depuis quand avez vous des menottes ici ?! Plus important, combien de temps allez vous me laisser emprisonnée ainsi...?""

 sub_pose.0001.a: "Actuellement la premiere pose était bien."
 sub_pose.0001.b: "Tu es magnifique."
 sub_pose.0001.c: "Te sens-tu timide?"
 sub_pose.0001.d: "Essayes d'avoir de prendre une pose naturelle."
 sub_pose.0001.e: "En fait, t'enchaîner accentuera ta beauté!"
 sub_pose.0001.f: "Ce sera tout pour le moment."

 sub_rules.0001.t: "Changer les rêgles de chasteté"
 sub_rules.0001.desc.short: "Vous regardez quelles différentes rêgles vous pouvez instaurer pour les orgasmes de [recipient.GetFirstNameNoTooltip]."

 sub_rules.0001.a: "Supprimer toute restriction sur ses orgasmes."
 sub_rules.0001.b: "Seulement un controle occasionel des orgasmes lui fera du bien."
 sub_rules.0001.c: "Garder [recipient.GetHerHim] sur le fil. peut etre quelques orgasmes à l'année, si [recipient.GetSheHe] se comporte bien."
 sub_rules.0001.d: "Des Orgasmes? Jamais! Une interdiciton totale de se toucher est ce dont [recipient.GetSheHe] a besoin."
 sub_rules.0001.e: "Enfermer son intimité. Pas d'orgasmes, pas de masturbation, et aucune chance d'enfanter."
 sub_rules.0001.f: "J'ai changé d'avis."

 sub_rules.0002.t: "Changer les rêgles d'habillement"
 sub_rules.0002.desc.short: "Habiller [recipient.GetFirstNameNoTooltip] selon vos goût en privé est agréable, bien sur, mais vous pouvez aussi déterminer l'amplitude vestimentaire dont-[recipient.GetSheHe] dispose le reste du temps..."
 sub_rules.0002.a: "Laisser [recipient.GetFirstNameNoTooltip] s'habiller selon ses préférences."
 sub_rules.0002.b: "Habiller [recipient.GetFirstNameNoTooltip] avec des habits provocateurs."
 sub_rules.0002.c: "N'authoriser que les sous-vêtements."
 sub_rules.0002.d: "Supprimer son droit de s'habiller entierement!"
 sub_rules.0002.e: "J'ai changé d'avis."


code:
l_french:
 sub_recent_training_modifier: "Aura de domminance"
 sub_training_milestone_scheme_power_1: "Entrainement précédent"
 sub_training_milestone_scheme_power_2: "Entrainement précédent"
 sub_training_milestone_scheme_power_3: "Entrainement précédent"
 sub_positive_trait_scheme_power: "Naturellement soumise"
 sub_negative_trait_scheme_resistance: "Naturellement Independente"
 sub_highest_pos_opinion_scheme_power: "Eprise de vous"
 sub_high_pos_opinion_scheme_power: "Vous adore"
 sub_medium_pos_opinion_scheme_power: "Vous admire"
 sub_low_pos_opinion_scheme_power: "Vous aime"
 sub_highest_neg_opinion_scheme_resistance: "Vous méprise"
 sub_high_neg_opinion_scheme_resistance: "Vous déteste"
 sub_medium_neg_opinion_scheme_resistance: "Vous haït"
 sub_low_neg_opinion_scheme_resistance: "Ne vous aime pas"


code:
l_french:
 sub_subservient_to_master: "Obéissant à [GetPlayer.Custom('SubMasterMistress')|U]"
 sub_made_me_go_naked: "Quoi?! Mais tout le monde verra!"
 sub_positive_training_start: "Apprecie être entrainé[ROOT.Custom('FR_E')]"
 sub_negative_training_start: "Contrarié[ROOT.Custom('FR_E')] dû à l'entrainement"


code:
l_french:
 game_concept_sub_train_obedience_scheme: "Plan d'Entrainement d'Obéissance"
 game_concept_sub_train_obedience_schemes: "Plans d'Entrainement d'Obéissance"
 game_concept_sub_train_obedience: "Entrainement d'Obéissance"
 game_concept_sub_train_obedience_action: "Entrainement"
 game_concept_sub_train_obedience_scheme_single: "un Plan d'Entrainement d'Obéissance"
 game_concept_sub_train_obedience_scheme_desc: "Le $game_concept_sub_train_obedience_scheme$ est un [personal_scheme|E] pour entrainer un personnage dans [sub_subservience_concept|E], eventuellement le faisant devenir votre [submissive|E]. ce n'est pas [secret_scheme_single|E] et n'utilise pas [agents|E].\n\nVotre [martial|E] a un effet léger sur [scheme_power|E], mais la puissance est principalement basée sur la personalité de [scheme_target|E] et son [opinion|E] à votre sujet. Bien que le succes est assuré, une opinion basse ou une personalité obstinée en fera une longue entreprise. Cependant, les résultats persisteront pour toute la vie et son dignes des éfforts fournis."

 game_concept_sub_subservience_concept: "Asservisement"
 game_concept_sub_subservient_concept: "Servile"
 game_concept_sub_subservience_concept_desc: "$game_concept_sub_subservience_concept$ a plusieur facettes, et est enseigné à travers le [sub_train_obedience_scheme|E]. Les personnages qui sont $game_concept_sub_subservient_concept$ à un maître ou une maîtresse tendent a avoir une opinion extremement élevée vis a vis de ce personnage, s'éfforcent de leur plaire, et sont ouvert a suivre les règles dictées par ces personnages.\n\n être $game_concept_sub_subservient_concept$ envers quelqu'un est intimement lié au fait d'être leur [submissive|E], mais n'est pas identique. completer le $game_concept_sub_train_obedience_scheme_single$ fera de l'apprentie une $game_concept_sub_subservient_concept$ pour la vie, mais le $game_concept_submissive$ [relation|E] depend de l'accord continue de la $game_concept_submissive$ et du $game_concept_dominant$."


code:
l_french:
 rule_sub_valid_subs: "#X Partenaires Soumis:#! Sexe valide des Soumis"
 setting_sub_valid_subs_all_genders: "Tout les genres"
 setting_sub_valid_subs_all_genders_desc: "A la fois les hommes et les femmes peuvent devenir $game_concept_submissives$."
 setting_sub_valid_subs_female_only: "#high Femmes uniquement#!"
 setting_sub_valid_subs_female_only_desc: "Uniquement les femmes peuvent devenir $game_concept_submissives$."
 setting_sub_valid_subs_male_only: "#high Hommes uniquement#!"
 setting_sub_valid_subs_male_only_desc: "Uniquement les hommes peuvent devenir $game_concept_submissives$."

 rule_sub_gender_attraction_requirement: "#X Partenaires Soumis:#! Attirance sexuelle requise"
 setting_sub_gender_attraction_requirement_enabled: "Activée"
 setting_sub_gender_attraction_requirement_enabled_desc: "Les personnages n'accepteront pas une relation de type $game_concept_dominant$/$game_concept_submissive$ à moins d'être attiré sexuellement par le sexe de leur partenaire."
 setting_sub_gender_attraction_requirement_disabled: "#high Désactivé#!"
 setting_sub_gender_attraction_requirement_disabled_desc: "Les personnages accepteront une relation $game_concept_dominant$/$game_concept_submissive$ quel que soit leur attirance ."


code:
l_french:
 action_can_obedience_train: "Un partenaire peut etre entrainé"
 action_can_obedience_train_combined_group_label: "Des partenaires peuvent etre entrainés"
 action_can_obedience_train_combined_group_name: "$action_can_obedience_train_combined_group_label$"
 action_can_obedience_train_desc: "Un de vos partenaires, [recipient.GetUIName], peut etre entrainé en tant que [sub_subservience_concept|E]."
 action_can_obedience_train_combined_group_description: "Vous pouvez entrainer des parenaires comme [sub_subservience_concept|E]."
 action_can_obedience_train_label: "Vous pouvez entrainer [recipient.GetShortUINameNoTooltip] comme $game_concept_sub_subservience_concept$"
 action_can_obedience_train_combined_label: "[recipient.GetUINameNoTooltip]"
 action_can_obedience_train_click: "#Cliquer pour ouvrir l'intraction d'entrainement#!"

 action_can_accelerated_obedience_train: "Un partenaire peut devenir obéissant"
 action_can_accelerated_obedience_train_combined_group_label: "Des partenaires peuvent devenir obéissants"
 action_can_accelerated_obedience_train_combined_group_name: "$action_can_accelerated_obedience_train_combined_group_label$"
 action_can_accelerated_obedience_train_desc: "Un de vos partenaires, [recipient.GetUIName], peut immédiatement devenir [sub_subservient_concept|E] a votre égard."
 action_can_accelerated_obedience_train_combined_group_description: "Vous pouvez immédiatement faire que certains de vos partenaires deviennent [sub_subservient_concept|E] ."
 action_can_accelerated_obedience_train_label: "Vous pouvez faire que [recipient.GetShortUIName] devienne $game_concept_sub_subservient_concept$"
 action_can_accelerated_obedience_train_combined_label: "[recipient.GetUINameNoTooltip]"
 action_can_accelerated_obedience_train_click: "#Cliquer pour ouvrir l'intraction d'entrainement#!"


code:
l_french:
 # Interactions
 sub_show_pose_interaction: "Prends la pose pour moi"
 sub_show_pose_interaction_desc: "Faire que [recipient.GetFirstNameNoTooltip] prenne la pose."
 sub_clothing_rules_interaction: "Fixer les règles vestimentaire"
 sub_clothing_rules_interaction_desc: "Décide quel vétements si il y en a, [recipient.GetShortUINameNoTooltip] devrait porter en public."
 sub_chastity_rules_interaction: "Fixer les règles de chasteté"
 sub_chastity_rules_interaction_desc: "Décide a quel fréquence [recipient.GetShortUINameNoTooltip] est authorisé[recipient.Custom('FR_E')] à jouir, ou enfermez [recipient.GetHerHim] dans une ceinture de chasteté pour empecher toute fécondation."
 sub_train_obedience_accelerated_interaction: "Instaurer l'obéissance"
 sub_train_obedience_accelerated_interaction_desc: "Depuis que [recipient.GetShortUINameNoTooltip] a été superbement entrainé[recipient.Custom('FR_E')], [recipient.GetSheHe] deviendra de son plein grés votre [sub_subservient_concept|E]."
 sub_remove_submissive_interaction: "Mettre de coté la $game_concept_submissive$"
 sub_remove_submissive_interaction_desc: "Bien que sa dévotion et son entrainement perdurera, sexuellement vous ne conssidérerez plus [recipient.GetShortUINameNoTooltip] comme votre [submissive|E]."
 sub_remove_submissive_interaction_notification: "Mettre de coté $game_concept_submissive$"
 sub_regain_submissive_interaction: "Prendre comme $game_concept_submissive$"
 sub_regain_submissive_interaction_desc: "Une fois de plus vous avez décidé de prendre [recipient.GetShortUINameNoTooltip] en tant que votre [submissive|E]."
 sub_regain_submissive_interaction_notification: "prendre un[recipient.Custom('FR_E')] $game_concept_submissive$"

 START_SUB_TRAINING: "Début de l'entrainement"

 # Toasts
 sub_accept_order: ""Bien sûr, [actor.Custom('SubMasterMistress')|U]""
 sub_train_obedience_interaction_toast: "$game_concept_sub_train_obedience$"
 sub_train_obedience_accelerated_interaction_toast: "[recipient.GetFirstNameNoTooltip] Atteste de sa loyauté"

 # Debugging/Testing
#  sub_make_busty_interaction: "Elargissement mammaire"
#  sub_make_busty_interaction_desc: "..."

#  sub_breast_enhancement_order: "Je me sens bizarre..."


code:
l_french:
 # Scheme Interaction
 sub_train_obedience_interaction: "$game_concept_sub_train_obedience$ #weak (Scheme)#!"
 sub_train_obedience_interaction_desc: "[sub_train_obedience_action|E] [recipient.GetShortUINameNoTooltip] pour etre votre [submissive|E]*\n\n*Temps prévu imprécis"

 # Notifications
 sub_train_obedience: "$game_concept_sub_train_obedience_scheme$"
 sub_train_obedience_invalid: "J'arrete d'essayer d'[sub_train_obedience_action|E] [target.GetShortUINameNoTooltip] car [target.GetSheHe] ne peut plus devenir m[target.Custom('FR_OnA')] [submissive|E]."

 # Scheme Name/Description
 sub_train_obedience_action: "Entrainer"
 sub_train_obedience_desc: "$sub_train_obedience_action$ [SCHEME.GetTarget.GetShortUINameNoTooltip] dans [sub_subservience_concept|E], en faire eventuellement votre [submissive|E]."
 sub_train_obedience_desc_general: "$sub_train_obedience_action$ un personnage dans [sub_subservience_concept|E], en faire éventuellement votre[submissive|E]."
 SUB_TRAIN_OBEDIENCE_SUCCESS_DESC: "[TARGET_CHARACTER.GetShortUINameNoTooltip] deviendra votre [submissive|E], et vous sera loyal[target.Custom('FR_E')] et dévoué[target.Custom('FR_E')] à vie."