﻿# The choice is made based on a weighted random or a maximal weight depending on selection_behavior, but the first weight that evaluates to >= 100 will be automatically chosen when using both options

#my_group = {						#Each group will select one item. If no item has a weight > 0 no item will be selected
#	
#	usage = customization/game/both/none #Sets whether this modifier group can be used only by game logic (e.g. prison bars), only customization (e.g. customazible hair), both or none. Both by default
#	interface_position = 2			#Where in the barbershop should this set appear. Higher positions will be listed after the lower ones (multiple sets can have the same value, but then their relative order is not specified). 0 by default.
#   priority = 2                    # Set priority for the group. The higher the priority, the later the modifier will be applied (and overwrites previous ones). Set to 0 by default. If two groups have the same priority, they will be applied based on file order where these groups are.
#	selection_behavior = weighted_random/max	#Sets whether it's the maximum weight which is selected or a weighted random when selecting a modifier to use. In both cases, the first weight >= 100 will be seleted if there is any. weighted_random by default
#	fallback = ...					# If all weights are zero, this fallback modifier will be chosen
#	item_0 = {						#Each item has a list of dna_modifiers and weight
#
#		usage = customization/game/both	#Sets whether this modifier can be used only by game logic (e.g. prison bars), only customization (e.g. customazible hair) or both. Both by default
#		is_valid_custom = ...			# A trigger that says whether this modifier can currently be used for customization (on top of usage). Evaluated in the character's scope.
#		outfit_tags = { tag1 tag2 ... }	# Outfit tags for this modifier. The modifier is valid if it has an outfit tag matching the highest priority tag specified in the event found in the whole portrait modifier group (if any outfit tag is specified).
#									# Portrait modifiers matching any of the event outfit tags (if specified) will always be valid and have their weight at least equal to 1 even when their weight evaluates to < 1.
#		require_outfit_tags = yes	# If this is set, the modifier will only be valid to consider if the portrait outfit tags from the event contain any of the modifiers' outfit tags and won't be picked if no portrait event tags are specified.
#		ignore_outfit_tags = yes	# If this is set, the modifier doesn't care whether any outfit tags are set or not (good for e.g. the prison bars)
#
#		dna_modifiers = {			#The modifiers that will be applied to the portrait if this item is selected
#			morph = {
#				#mode = add				#add this as an extra gene
#				#mode = replace 		#overwrite this gene in the dna with the specified template and value
#				#mode = modify			#modify this gene in the dna. if the template matches the gene in the dna (or template is left empty), value will be added to the dna-gene's strength
#				#mode = modify_multiply	#Modify this gene in the dna. If the template matches the gene in the dna (or template is left empty), the dna-gene's strength will be multiplied by the value
#				mode = replace
#				
#				gene = face
#				template = fat_face
#				value = 1.0
#			}
#			color = {
#				gene = hair_color
#				#mode = add				#not supported for color genes
#				#mode = replace			#overwrite this gene with palette coordinates specified here
#				#mode = modify			#adds x and y to the dna-gene's values
#				#mode = modify_multiply	#not supported for color genes
#				mode = modify
#				
#				x = 0.1
#				y = -0.1
#			}
#			accessory = {
#				#mode = add				#add this as an extra gene
#				#mode = replace 		#overwrite this gene in the dna with the specified template and value
#				#mode = modify			#modify this gene in the dna. if the template matches the gene in the dna (or template is left empty), value will be added to the dna-gene's strength
#				#mode = modify_multiply	#Modify this gene in the dna. If the template matches the gene in the dna (or template is left empty), the dna-gene's strength will be multiplied by the value
#				mode = add
#				
#				gene = headgear
#				template = cool_people
#				value = 0.75
#			}
#		}
#
#		weight = {					#This is where the weight is calculated
#			base = 1				#The final weigth is calculated like this:
#									# weight = base
#									# for each modifier
#									#	weight *= modifier factor
#									#	weight += modifier add
#			modifier = {
#				add = 10
#				has_culture = viking
#			}
#			modifier = {
#				factor = 0
#				has_trait = dislikes_items
#			}
#		}
#	}
#	item_1 = ...
#	
#	add_accessory_modifiers = {	# Will populate this portrait modifier set with modifiers for all variants of the specified accessory template. Useful for customization when we want to select a specific variant from the template.
#		gene = beards
#		template = all_beards
#	}
#}


#example = {
#	cool_kids = {
#		dna_modifiers = {
#			accessory = {
#				mode = replace
#				
#				gene = headgear
#				template = cool_people
#				value = 0.75
#			}
#		}	
#		weight = {
#			base = 1
#			modifier = {
#				factor = 0
#				is_adult = yes
#			}
#		}
#	}
#}

family_variation_male = {
	usage = game
	priority = 10
	
	family_variation = {
	
		dna_modifiers = {
			
			#Body
			morph = {
				mode = modify_multiply
				gene = gene_height
				range = { 0.6 1.2 }				
			}
			#morph = {
			#	mode = modify
			#	gene = gene_neck_width
			#	range = { 0.6 1.3 }
			#}
			
			#Head
			morph = {
				mode = modify_multiply
				gene = gene_head_width
				range = { 0.7 1.3 }				
			}
			morph = {
				mode = modify_multiply
				gene = gene_head_height
				range = { 0.7 1.3 }		
			}
			
			#Forehead
			morph = {
				mode = modify_multiply
				gene = gene_forehead_roundness
				range = { 0.7 1.3 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_forehead_angle
				range = { 0.7 1.3 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_forehead_brow_height
				range = { 0.7 1.3 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_forehead_width
				range = { 0.7 1.3 }			
			}
			
			#Face
			morph = {
				mode = modify_multiply
				gene = gene_bs_cheek_height
				range = { 0.7 1.3 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_cheek_width
				range = { 0.7 1.3 }			
			}
			
			#Eyes
			morph = {
				mode = modify_multiply
				gene = gene_eye_distance
				range = { 0.7 1.3 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_eye_angle
				range = { 0.7 1.3 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_eye_height
				range = { 0.7 1.3 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_eye_shut
				range = { 0.7 1.3 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_eye_size
				range = { 0.7 1.3 }		
			}
			
			#Eyebrow
			morph = {
				mode = modify_multiply
				gene = gene_eyebrows_shape
				range = { 0.7 1.3 }
			}
			morph = {
				mode = modify_multiply
				gene = gene_eyebrows_fullness
				range = { 0.7 1.3 }
			}
			
			#Jaw
			morph = {
				mode = modify_multiply
				gene = gene_jaw_angle
				range = { 0.7 1.3 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_jaw_height
				range = { 0.7 1.3 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_jaw_width
				range = { 0.7 1.3 }			
			}
			
			#Mouth
			morph = {
				mode = modify_multiply
				gene = gene_mouth_lower_lip_size
				range = { 0.7 1.3 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_mouth_upper_lip_size
				range = { 0.7 1.3 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_mouth_width
				range = { 0.7 1.3 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_mouth_open
				range = { 0.7 1.3 }		
			}
			
			#Nose
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_height
				range = { 0.7 1.3 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_length
				range = { 0.7 1.3 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_nostril_width
				range = { 0.7 1.3 }
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_size
				range = { 0.7 1.3 }
			}			
		}
		weight = {
			base = 0
			modifier = {
				add = 100
				exists = this
				has_character_flag = ansf_family_male
			}
		}
	
	}
}

family_variation_female = {
	usage = game
	priority = 10
	
	family_variation = {
	
		dna_modifiers = {
			
			#Body
			morph = {
				mode = modify_multiply
				gene = gene_height
				range = { 0.6 1.0 }				
			}
			#morph = {
			#	mode = modify
			#	gene = gene_neck_width
			#	range = { 0.6 0.9 }
			#}
			
			#Head
			morph = {
				mode = modify_multiply
				gene = gene_head_width
				range = { 0.7 1.3 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_head_height
				range = { 0.7 1.3 }		
			}
			
			#Forehead
			morph = {
				mode = modify_multiply
				gene = gene_forehead_roundness
				range = { 0.7 1.3 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_forehead_angle
				range = { 0.7 1.3 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_forehead_brow_height
				range = { 0.7 1.3 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_forehead_width
				range = { 0.7 1.3 }			
			}
			
			#Face
			morph = {
				mode = modify_multiply
				gene = gene_bs_cheek_height
				range = { 0.7 1.3 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_cheek_width
				range = { 0.7 1.3 }			
			}
			
			#Eyes
			morph = {
				mode = modify_multiply
				gene = gene_eye_distance
				range = { 0.7 1.3 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_eye_angle
				range = { 0.7 1.3 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_eye_height
				range = { 0.7 1.3 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_eye_shut
				range = { 0.7 1.3 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_eye_size
				range = { 0.7 1.3 }		
			}
			
			#Eyebrow
			morph = {
				mode = modify_multiply
				gene = gene_eyebrows_shape
				range = { 0.7 1.3 }
			}
			morph = {
				mode = modify_multiply
				gene = gene_eyebrows_fullness
				range = { 0.7 1.3 }
			}
			
			#Jaw
			morph = {
				mode = modify_multiply
				gene = gene_jaw_angle
				range = { 0.6 0.9 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_jaw_height
				range = { 0.6 0.9 }		
			}
			#morph = {
			#	mode = modify_multiply
			#	gene = gene_jaw_width
			#	range = { 0.6 0.9 }			
			#}
			
			#Mouth
			morph = {
				mode = modify_multiply
				gene = gene_mouth_lower_lip_size
				range = { 0.9 1.5 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_mouth_upper_lip_size
				range = { 0.9 1.5 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_mouth_width
				range = { 0.7 1.3 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_mouth_open
				range = { 0.7 1.3 }		
			}
			
			#Nose
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_height
				range = { 0.7 1.0 }			
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_length
				range = { 0.7 1.0 }		
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_nostril_width
				range = { 0.7 1.0 }
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_nose_size
				range = { 0.7 1.0 }
			}			
		}
		weight = {
			base = 0
			modifier = {
				add = 100
				exists = this
				has_character_flag = ansf_family_female
			}
		}
	
	}
}