
spouse_skill_rating_1 = {
	add = mediocre_skill_rating
}
spouse_skill_rating_2 = {
	add = medium_skill_rating
}
spouse_skill_rating_3 = {
	add = decent_skill_rating
}
spouse_skill_rating_4 = {
	add = very_high_skill_rating
}

inverted_spouse_skill_rating_1 = {
	subtract = spouse_skill_rating_1
}
inverted_spouse_skill_rating_2 = {
	subtract = spouse_skill_rating_2
}
inverted_spouse_skill_rating_3 = {
	subtract = spouse_skill_rating_3
}
inverted_spouse_skill_rating_4 = {
	subtract = spouse_skill_rating_4
}


spouse_default_task_diplomacy_scale = {
	add = diplomacy
	if = {
		limit = {
			scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
		}
		multiply = 1.25
	}
	if = {
		limit = {
			scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
		}
		multiply = 1.25
	}
	divide = 5
	if = {
		limit = {
			OR = {
				scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
				scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
			}
		}
		ceiling = yes
	}
	else = {
		floor = yes
	}
	min = 1
}

spouse_default_task_martial_scale = {
	add = martial
	if = {
		limit = {
			scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
		}
		multiply = 1.25
	}
	if = {
		limit = {
			scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
		}
		multiply = 1.25
	}
	divide = 5
	if = {
		limit = {
			OR = {
				scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
				scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
			}
		}
		ceiling = yes
	}
	else = {
		floor = yes
	}
	min = 1
}

spouse_default_task_intrigue_scale = {
	add = intrigue
	if = {
		limit = {
			scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
		}
		multiply = 1.25
	}
	if = {
		limit = {
			scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
		}
		multiply = 1.25
	}
	if = {
		limit = {
			scope:councillor = { 
				AND = {
					exists = dynasty
					dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 }
				}
			}
		}
		multiply = 1.25
	}
	divide = 5
	if = {
		limit = {
			OR = {
				scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
				scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
			}
		}
		ceiling = yes
	}
	else = {
		floor = yes
	}
	min = 1
}

spouse_default_task_learning_scale = {
	add = learning
	if = {
		limit = {
			scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
		}
		multiply = 1.25
	}
	if = {
		limit = {
			scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
		}
		multiply = 1.25
	}
	divide = 5
	if = {
		limit = {
			OR = {
				scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
				scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
			}
		}
		ceiling = yes
	}
	else = {
		floor = yes
	}
	min = 1
}

spouse_default_task_stewardship_scale = {
	add = stewardship
	if = {
		limit = {
			scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
		}
		multiply = 1.25
	}
	if = {
		limit = {
			scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
		}
		multiply = 1.25
	}
	divide = 5
	if = {
		limit = {
			OR = {
				scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
				scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
			}
		}
		ceiling = yes
	}
	else = {
		floor = yes
	}
	min = 1
}

spouse_task_court_politics_scale = {
	add = diplomacy
	if = {
		limit = {
			scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
		}
		multiply = 1.25
	}
	if = {
		limit = {
			scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
		}
		multiply = 1.25
	}
	divide = 2
	if = {
		limit = {
			OR = {
				scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
				scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
			}
		}
		ceiling = yes
	}
	else = {
		floor = yes
	}
	min = 1
}

spouse_task_chivalry_scale = {
	add = martial
	if = {
		limit = {
			scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
		}
		multiply = 1.25
	}
	if = {
		limit = {
			scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
		}
		multiply = 1.25
	}
	divide = 2
	if = {
		limit = {
			OR = {
				scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
				scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
			}
		}
		ceiling = yes
	}
	else = {
		floor = yes
	}
	min = 1
}

spouse_task_court_intrigue_scale = {
	add = intrigue
	if = {
		limit = {
			scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
		}
		multiply = 1.25
	}
	if = {
		limit = {
			scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
		}
		multiply = 1.25
	}
	if = {
		limit = {
			scope:councillor = { 
				AND = {
					exists = dynasty
					dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 }
				}
			}
		}
		multiply = 1.25
	}
	divide = 2
	if = {
		limit = {
			OR = {
				scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
				scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
			}
		}
		ceiling = yes
	}
	else = {
		floor = yes
	}
	min = 1
}

spouse_task_manage_domain_scale = {
	add = stewardship
	if = {
		limit = {
			scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
		}
		multiply = 1.25
	}
	if = {
		limit = {
			scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
		}
		multiply = 1.25
	}
	divide = 2
	if = {
		limit = {
			OR = {
				scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
				scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
			}
		}
		ceiling = yes
	}
	else = {
		floor = yes
	}
	min = 1
}

spouse_task_patronage_scale = {
	add = learning
	if = {
		limit = {
			scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
		}
		multiply = 1.25
	}
	if = {
		limit = {
			scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
		}
		multiply = 1.25
	}
	divide = 2
	if = {
		limit = {
			OR = {
				scope:councillor_liege = { has_perk = loyalty_and_respect_perk }
				scope:councillor_liege.culture = { has_cultural_parameter = better_spouses }
			}
		}
		ceiling = yes
	}
	else = {
		floor = yes
	}
	min = 1
}

#Spouse rank up values
councillor_spouse_lifestyle_rank_up_threshold = 4 #Number of half-years the character has to have been performing a task in order to rank up in the relevant skill
councillor_spouse_lifestyle_progress_factor = 0.75 #The factor by which the chance of ranking up each month is multiplied. At 1, one point of progress and one point of skill increase the chance (every six months) by 1%

councillor_spouse_lifestyle_progress_increase = 1 #How much progress is added every time


#FROM EVENTS
opinion_boost_neighboring_ruler_value = {
	add = 20
	if = {
		limit = {
			tier_difference = {
				target = root
				value = -1
			}
		}
		multiply = 2
	}
	else_if = {
		limit = {
			tier_difference = {
				target = root
				value = -2
			}
		}
		multiply = 2.5
	}
}

spouse_martial_event_troop_size = {
	add = martial
	add = prowess
	if = {
		limit = {
			has_trait = strategist
		}
		multiply = 1.5
	}
	if = {
		limit = {
			has_trait = overseer
		}
		multiply = 1.5
	}
	if = {
		limit = {
			has_trait = gallant
		}
		multiply = 1.5
	}

	multiply = 10

	round = yes
}

councillor_spouse_martial_1005_a_value = {
	add = scope:councillor.martial
	divide = 2
}
