﻿
###MODIFIER LIST
#
#


# child_personality_main_event_weight_modifier
# child_personality_option_weight_modifier
# child_personality_prison_weight_modifier



child_personality_main_event_weight_modifier = {
	modifier = {
		add = {
			value = 0
			
			if = {
				limit = {
					NOT = { has_trait = $TRAIT$ }
				}
				
				if = {
					limit = {
						any_relation = {
							type = guardian
							
							has_trait = $TRAIT$
						}
					}
					
					add = 4
				}
				
				if = {
					limit = {
						any_parent = {
							has_trait = $TRAIT$
						}
					}
					
					add = 2
				}
				
				if = {
					limit = {
						any_relation = {
							type = friend
							
							has_trait = $TRAIT$
						}
					}
					
					add = 2
				}
				
				if = {
					limit = {
						any_sibling = {
							has_trait = $TRAIT$
						}
					}
					
					add = 2
				}
				
				if = {
					limit = {
						faith = {
							trait_is_virtue = $TRAIT$
						}
					}
					
					if = {
						limit = {
							NOT = { has_trait = cynical }
						}
						
						add = 1
					}
					
					if = {
						limit = {
							has_trait = zealous
						}
						
						add = 2
					}
					
					if = {
						limit = {
							has_trait = devoted
						}
						
						add = 1
					}
				}
			
				if = {
					limit = {
						culture = { has_cultural_parameter = compassionate_trait_more_common }
						
						trait:$TRAIT$ = trait:compassionate
						
						NOR = {
							has_trait = callous
							has_trait = sadistic
						}
					}
					
					add = 7
				}
				if = {
					limit = {
						culture = { has_cultural_parameter = humble_trait_more_common }
						
						trait:$TRAIT$ = trait:humble
						
						NOT = { has_trait = arrogant }
					}
					
					add = 7
				}
				if = {
					limit = {
						culture = { has_cultural_parameter = honest_trait_more_common }
						
						trait:$TRAIT$ = trait:honest
						
						NOT = { has_trait = deceitful }
					}
					
					add = 7
				}
				if = {
					limit = {
						culture = { has_cultural_parameter = patient_trait_more_common }
						
						trait:$TRAIT$ = trait:patient
						
						NOT = { has_trait = impatient }
					}
					
					add = 7
				}
				if = {
					limit = {
						culture = { has_cultural_parameter = generous_trait_more_common }
						
						trait:$TRAIT$ = trait:generous
						
						NOT = { has_trait = greedy }
					}
					
					add = 7
				}
				if = {
					limit = {
						culture = { has_cultural_parameter = vengeful_trait_more_common }
						
						trait:$TRAIT$ = trait:vengeful
						
						NOT = { has_trait = forgiving }
					}
					
					add = 7
				}
				if = {
					limit = {
						culture = { has_cultural_parameter = stubborn_trait_more_common }
						
						trait:$TRAIT$ = trait:stubborn
						
						NOT = { has_trait = fickle }
					}
					
					add = 7
				}
				if = {
					limit = {
						culture = { has_cultural_parameter = just_trait_more_common }
						
						trait:$TRAIT$ = trait:just
						
						NOT = { has_trait = arbitrary }
					}
					
					add = 7
				}
				if = {
					limit = {
						culture = { has_cultural_parameter = temperate_trait_more_common }
						
						trait:$TRAIT$ = trait:temperate
						
						NOT = { has_trait = gluttonous }
					}
					
					add = 7
				}
				if = {
					limit = {
						culture = { has_cultural_parameter = zealous_trait_more_common }
						
						trait:$TRAIT$ = trait:zealous
						
						NOT = { has_trait = cynical }
					}
					
					add = 7
				}
				if = {
					limit = {
						culture = { has_cultural_parameter = calm_trait_more_common }
						
						trait:$TRAIT$ = trait:calm
						
						NOT = { has_trait = wrathful }
					}
					
					add = 7
				}
				if = {
					limit = {
						culture = { has_cultural_parameter = content_trait_more_common }
						
						trait:$TRAIT$ = trait:content
						
						NOT = { has_trait = ambitious }
					}
					
					add = 7
				}
				if = {
					limit = {
						culture = { has_cultural_parameter = diligent_trait_more_common }
						
						trait:$TRAIT$ = trait:diligent
						
						NOT = { has_trait = lazy }
					}
					
					add = 7
				}
				if = {
					limit = {
						culture = { has_cultural_parameter = ambitious_trait_more_common }
						
						trait:$TRAIT$ = trait:ambitious
						
						NOT = { has_trait = content }
					}
					
					add = 7
				}
			}
		}
	}
}

child_personality_option_weight_modifier = {
	modifier = {
		add = {
			value = 0
			
			if = {
				limit = {
					any_relation = {
						type = guardian
						
						has_trait = $TRAIT$
					}
				}
				
				add = 6
			}
			
			if = {
				limit = {
					any_parent = {
						has_trait = $TRAIT$
					}
				}
				
				add = 4
			}
			
			if = {
				limit = {
					any_relation = {
						type = friend
						
						has_trait = $TRAIT$
					}
				}
				
				add = 4
			}
			
			if = {
				limit = {
					any_sibling = {
						has_trait = $TRAIT$
					}
				}
				
				add = 4
			}
			
			if = {
				limit = {
					OR = {
						AND = {
							has_trait = curious
							
							OR = {
								flag:$TRAIT$ = flag:fickle
								flag:$TRAIT$ = flag:arbitrary
								flag:$TRAIT$ = flag:cynical
								flag:$TRAIT$ = flag:diligent
								flag:$TRAIT$ = flag:ambitious
								flag:$TRAIT$ = flag:greedy
								flag:$TRAIT$ = flag:shy
								flag:$TRAIT$ = flag:eccentric
							}
						}
						AND = {
							has_trait = rowdy
							
							OR = {
								flag:$TRAIT$ = flag:brave
								flag:$TRAIT$ = flag:wrathful
								flag:$TRAIT$ = flag:impatient
								flag:$TRAIT$ = flag:gluttonous
								flag:$TRAIT$ = flag:sadistic
								flag:$TRAIT$ = flag:honest
								flag:$TRAIT$ = flag:trusting
							}
						}
						AND = {
							has_trait = bossy
							
							OR = {
								flag:$TRAIT$ = flag:zealous
								flag:$TRAIT$ = flag:stubborn
								flag:$TRAIT$ = flag:vengeful
								flag:$TRAIT$ = flag:deceitful
								flag:$TRAIT$ = flag:arrogant
								flag:$TRAIT$ = flag:paranoid
								flag:$TRAIT$ = flag:callous
							}
						}
						AND = {
							has_trait = charming
							
							OR = {
								flag:$TRAIT$ = flag:forgiving
								flag:$TRAIT$ = flag:generous
								flag:$TRAIT$ = flag:gregarious
								flag:$TRAIT$ = flag:compassionate
								flag:$TRAIT$ = flag:craven
								flag:$TRAIT$ = flag:lustful
								flag:$TRAIT$ = flag:lazy
							}
						}
						AND = {
							has_trait = pensive
							
							OR = {
								flag:$TRAIT$ = flag:calm
								flag:$TRAIT$ = flag:chaste
								flag:$TRAIT$ = flag:content
								flag:$TRAIT$ = flag:humble
								flag:$TRAIT$ = flag:just
								flag:$TRAIT$ = flag:patient
								flag:$TRAIT$ = flag:temperate
								flag:$TRAIT$ = flag:eccentric
							}
						}
					}
				}
				
				add = 8
			}
			
			if = {
				limit = {
					OR = {
						AND = {
							OR = {
								has_focus = education_diplomacy
								has_focus = education_learning
							}
							
							OR = {
								flag:$TRAIT$ = flag:fickle
								flag:$TRAIT$ = flag:arbitrary
								flag:$TRAIT$ = flag:cynical
								flag:$TRAIT$ = flag:diligent
								flag:$TRAIT$ = flag:ambitious
								flag:$TRAIT$ = flag:greedy
								flag:$TRAIT$ = flag:shy
								flag:$TRAIT$ = flag:eccentric
							}
						}
						AND = {
							OR = {
								has_focus = education_martial
								has_focus = education_intrigue
							}
							
							OR = {
								flag:$TRAIT$ = flag:brave
								flag:$TRAIT$ = flag:wrathful
								flag:$TRAIT$ = flag:impatient
								flag:$TRAIT$ = flag:gluttonous
								flag:$TRAIT$ = flag:sadistic
								flag:$TRAIT$ = flag:honest
								flag:$TRAIT$ = flag:trusting
							}
						}
						AND = {
							OR = {
								has_focus = education_martial
								has_focus = education_stewardship
							}
							
							OR = {
								flag:$TRAIT$ = flag:zealous
								flag:$TRAIT$ = flag:stubborn
								flag:$TRAIT$ = flag:vengeful
								flag:$TRAIT$ = flag:deceitful
								flag:$TRAIT$ = flag:arrogant
								flag:$TRAIT$ = flag:paranoid
								flag:$TRAIT$ = flag:callous
							}
						}
						AND = {
							OR = {
								has_focus = education_diplomacy
								has_focus = education_intrigue
							}
							
							OR = {
								flag:$TRAIT$ = flag:forgiving
								flag:$TRAIT$ = flag:generous
								flag:$TRAIT$ = flag:gregarious
								flag:$TRAIT$ = flag:compassionate
								flag:$TRAIT$ = flag:craven
								flag:$TRAIT$ = flag:lustful
								flag:$TRAIT$ = flag:lazy
							}
						}
						AND = {
							OR = {
								has_focus = education_stewardship
								has_focus = education_learning
							}
							
							OR = {
								flag:$TRAIT$ = flag:calm
								flag:$TRAIT$ = flag:chaste
								flag:$TRAIT$ = flag:content
								flag:$TRAIT$ = flag:humble
								flag:$TRAIT$ = flag:just
								flag:$TRAIT$ = flag:patient
								flag:$TRAIT$ = flag:temperate
								flag:$TRAIT$ = flag:eccentric
							}
						}
					}
				}
				
				add = 6
			}
			
			if = {
				limit = {
					OR = {
						AND = {
							culture = { has_cultural_parameter = compassionate_trait_more_common }
							
							flag:$TRAIT$ = flag:compassionate
						}
						AND = {
							culture = { has_cultural_parameter = humble_trait_more_common }
							
							flag:$TRAIT$ = flag:humble
						}
						AND = {
							culture = { has_cultural_parameter = honest_trait_more_common }
							
							flag:$TRAIT$ = flag:honest
						}
						AND = {
							culture = { has_cultural_parameter = patient_trait_more_common }
							
							flag:$TRAIT$ = flag:patient
						}
						AND = {
							culture = { has_cultural_parameter = generous_trait_more_common }
							
							flag:$TRAIT$ = flag:generous
						}
						AND = {
							culture = { has_cultural_parameter = vengeful_trait_more_common }
							
							flag:$TRAIT$ = flag:vengeful
						}
						AND = {
							culture = { has_cultural_parameter = stubborn_trait_more_common }
							
							flag:$TRAIT$ = flag:stubborn
						}
						AND = {
							culture = { has_cultural_parameter = just_trait_more_common }
							
							flag:$TRAIT$ = flag:just
						}
						AND = {
							culture = { has_cultural_parameter = temperate_trait_more_common }
							
							flag:$TRAIT$ = flag:temperate
						}
						AND = {
							culture = { has_cultural_parameter = zealous_trait_more_common }
							
							flag:$TRAIT$ = flag:zealous
						}
						AND = {
							culture = { has_cultural_parameter = calm_trait_more_common }
							
							flag:$TRAIT$ = flag:calm
						}
						AND = {
							culture = { has_cultural_parameter = content_trait_more_common }
							
							flag:$TRAIT$ = flag:content
						}
						AND = {
							culture = { has_cultural_parameter = diligent_trait_more_common }
							
							flag:$TRAIT$ = flag:diligent
						}
						AND = {
							culture = { has_cultural_parameter = ambitious_trait_more_common }
							
							flag:$TRAIT$ = flag:ambitious
						}
					}
				}
				
				add = 50
			}
			
			if = {
				limit = {
					faith = { trait_is_virtue = $TRAIT$ }
				}
				
				if = {
					limit = {
						NOT = { has_trait = cynical }
					}
					
					add = 4
				}
				
				if = {
					limit = {
						has_trait = zealous
					}
					
					add = 12
				}
				
				if = {
					limit = {
						has_trait = devoted
					}
					
					add = 6
				}
			}
			else_if = {
				limit = {
					faith = { trait_is_sin = $TRAIT$ }
				}
				
				if = {
					limit = {
						NOT = { has_trait = cynical }
					}
					
					add = -5
				}
				
				if = {
					limit = {
						has_trait = zealous
					}
					
					add = -10
				}
				
				if = {
					limit = {
						has_trait = devoted
					}
					
					add = -5
				}
			}
			
			if = {
				limit = {
					flag:$TRAIT$ = flag:sadistic
					has_character_flag = marked_for_sadistic_in_yearly_4021
				}
				
				add = 500
			}
			
			min = 0.0
		}
	}
	modifier = {
		factor = 0.25
		
		flag:$TRAIT$ = flag:sadistic
		NOT = { has_character_flag = marked_for_sadistic_in_yearly_4021 }
	}
}

child_personality_prison_weight_modifier = {
	modifier = {
		add = {
			value = 0
			
			if = {
				limit = {
					OR = {
						AND = {
							has_trait = curious
							
							OR = {
								flag:$TRAIT$ = flag:fickle
								flag:$TRAIT$ = flag:arbitrary
								flag:$TRAIT$ = flag:cynical
								flag:$TRAIT$ = flag:diligent
								flag:$TRAIT$ = flag:ambitious
								flag:$TRAIT$ = flag:greedy
								flag:$TRAIT$ = flag:shy
								flag:$TRAIT$ = flag:eccentric
							}
						}
						AND = {
							has_trait = rowdy
							
							OR = {
								flag:$TRAIT$ = flag:brave
								flag:$TRAIT$ = flag:wrathful
								flag:$TRAIT$ = flag:impatient
								flag:$TRAIT$ = flag:gluttonous
								flag:$TRAIT$ = flag:sadistic
								flag:$TRAIT$ = flag:honest
								flag:$TRAIT$ = flag:trusting
							}
						}
						AND = {
							has_trait = bossy
							
							OR = {
								flag:$TRAIT$ = flag:zealous
								flag:$TRAIT$ = flag:stubborn
								flag:$TRAIT$ = flag:vengeful
								flag:$TRAIT$ = flag:deceitful
								flag:$TRAIT$ = flag:arrogant
								flag:$TRAIT$ = flag:paranoid
								flag:$TRAIT$ = flag:callous
							}
						}
						AND = {
							has_trait = charming
							
							OR = {
								flag:$TRAIT$ = flag:forgiving
								flag:$TRAIT$ = flag:generous
								flag:$TRAIT$ = flag:gregarious
								flag:$TRAIT$ = flag:compassionate
								flag:$TRAIT$ = flag:craven
								flag:$TRAIT$ = flag:lustful
								flag:$TRAIT$ = flag:lazy
							}
						}
						AND = {
							has_trait = pensive
							
							OR = {
								flag:$TRAIT$ = flag:calm
								flag:$TRAIT$ = flag:chaste
								flag:$TRAIT$ = flag:content
								flag:$TRAIT$ = flag:humble
								flag:$TRAIT$ = flag:just
								flag:$TRAIT$ = flag:patient
								flag:$TRAIT$ = flag:temperate
								flag:$TRAIT$ = flag:eccentric
							}
						}
					}
				}
				
				add = 12
			}
			
			if = {
				limit = {
					OR = {
						flag:$TRAIT$ = flag:arbitrary
						flag:$TRAIT$ = flag:cynical
						flag:$TRAIT$ = flag:greedy
						flag:$TRAIT$ = flag:wrathful
						flag:$TRAIT$ = flag:sadistic
						flag:$TRAIT$ = flag:vengeful
						flag:$TRAIT$ = flag:deceitful
						flag:$TRAIT$ = flag:paranoid
						flag:$TRAIT$ = flag:callous
						flag:$TRAIT$ = flag:craven
						flag:$TRAIT$ = flag:lustful
						flag:$TRAIT$ = flag:humble
					}
				}
				
				add = 6
			}
			else_if = {
				limit = {
					OR = {
						flag:$TRAIT$ = flag:fickle
						flag:$TRAIT$ = flag:shy
						flag:$TRAIT$ = flag:eccentric
						flag:$TRAIT$ = flag:impatient
						flag:$TRAIT$ = flag:gluttonous
						flag:$TRAIT$ = flag:zealous
						flag:$TRAIT$ = flag:stubborn
						flag:$TRAIT$ = flag:arrogant
						flag:$TRAIT$ = flag:lazy
						flag:$TRAIT$ = flag:calm
						flag:$TRAIT$ = flag:content
						flag:$TRAIT$ = flag:patient
					}
				}
				
				add = 2
			}
			
			if = {
				limit = {
					faith = { trait_is_virtue = $TRAIT$ }
				}
				
				if = {
					limit = {
						NOT = { has_trait = cynical }
					}
					
					add = 2
				}
				
				if = {
					limit = {
						has_trait = zealous
					}
					
					add = 4
				}
				
				if = {
					limit = {
						has_trait = devoted
					}
					
					add = 2
				}
			}
			else_if = {
				limit = {
					faith = { trait_is_sin = $TRAIT$ }
				}
				
				if = {
					limit = {
						NOT = { has_trait = cynical }
					}
					
					add = -1
				}
				
				if = {
					limit = {
						has_trait = zealous
					}
					
					add = -2
				}
				
				if = {
					limit = {
						has_trait = devoted
					}
					
					add = -1
				}
			}
			
			if = {
				limit = {
					flag:$TRAIT$ = flag:sadistic
					has_character_flag = marked_for_sadistic_in_yearly_4021
				}
				
				add = 500
			}
			
			min = 0.0
		}
	}
}