﻿######################################################################
#############Hiraeth - Dynasty Legacy Overhaul by idm#################
######################################################################

### BLOOD DYNASTY LEGACIES

glory_legacy_1 = { ### Desirable Match
	legacy = blood_legacy_track

	character_modifier = {
		intrigue = 1
		learning = 1
		ai_boldness = 20
		# marriage bonus
	}
	effect = { 
		custom_description_no_bullet = { ## Custom Effect
			text = hth_blood_legacy_1_effect
		}
		custom_description_no_bullet = { ## AI
			text = hth_blood_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_blood_legacy_1_req_effect
		}
	}
	can_be_picked = { 
		hth_blood_1_legacy_trigger = yes
	}
	ai_chance = {
		value = 11
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
	}
}
hth_blood_legacy_2 = { ### Heredity
	legacy = blood_legacy_track

	character_modifier = {
		ai_boldness = 20
		inbreeding_chance = -0.25
		negative_inactive_inheritance_chance = 0.25
		positive_inactive_inheritance_chance = 0.25
	}
	can_be_picked = { 
		hth_blood_2_legacy_trigger = yes
	}
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_blood_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_blood_legacy_2_req_effect
		}
	}
}
blood_legacy_4 = { # Architected Ancestry
	legacy = blood_legacy_track
	character_modifier = {
		monthly_intrigue_lifestyle_xp_gain_mult = 0.10
		monthly_learning_lifestyle_xp_gain_mult = 0.10
		ai_boldness = 20
	}
	can_be_picked = { 
		hth_blood_3_legacy_trigger = yes
	}
	effect = {
		custom_description_no_bullet = { # Effect is applied in the on action 'on_birth_child'
			text = blood_legacy_4_effect
		}
		custom_description_no_bullet = { ## AI
			text = hth_blood_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_blood_legacy_3_req_effect
		}
	}
	traits = {
		beauty_good_1 = 100
		intellect_good_1 = 100
		physique_good_1 = 100
		fecund = 50
		albino = 50
		giant = 10
		dwarf = 1
		scaly = 1
	}
}
hth_blood_legacy_4 = { ### Convergent Blood
	legacy = blood_legacy_track
	
	character_modifier = {
		ai_boldness = 20
		inbreeding_chance = -0.25
		positive_random_genetic_chance = 0.25
		negative_random_genetic_chance = 0.25
	}
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_blood_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_blood_legacy_4_req_effect
		}
	}
	can_be_picked = { 
		hth_blood_4_legacy_trigger = yes
	}
}
hth_blood_legacy_5 = { ### Lineage of the Dynasty
	legacy = blood_legacy_track

	character_modifier = {
		intrigue = 1
		learning = 1
		genetic_trait_strengthen_chance = 1.0
		ai_boldness = 20
	}
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_blood_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_blood_legacy_5_req_effect
		}
	}
	can_be_picked = { 
		hth_blood_5_legacy_trigger = yes
	}
}

### WARFARE DYNASTY LEGACIES

hth_warfare_legacy_1 = { ### Dreams of Conquest
	legacy = warfare_legacy_track
	
	character_modifier = {
		martial = 2
		led_by_owner_extra_advantage_add = 5
		ai_war_chance = 0.10
	}
	effect = { 
		custom_description_no_bullet = { ## AI 
			text = hth_warfare_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_warfare_legacy_1_req_effect
		}
	}
	can_be_picked = { 
		hth_warfare_1_legacy_trigger = yes
	}
	ai_chance = {
		value = 11
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
	}
}
hth_warfare_legacy_2 = { ### Call of the Sheep
	legacy = warfare_legacy_track

	character_modifier = {
		glory_hound_levy_contribution_mult = 0.25
		men_at_arms_cap = 1
		men_at_arms_recruitment_cost = -0.1
		ai_war_chance = 0.10
	}
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_warfare_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_warfare_legacy_2_req_effect
		}
	}
	can_be_picked = { 
		hth_warfare_2_legacy_trigger = yes
	}
}
hth_warfare_legacy_3 = { ### Dynasty of Swords
	legacy = warfare_legacy_track
	
	character_modifier = {
		monthly_martial_lifestyle_xp_gain_mult = 0.20
		ai_war_chance = 0.10
	}
	can_be_picked = { 
		hth_warfare_3_legacy_trigger = yes
	}
	effect = { 
		custom_description_no_bullet = { ## Custom Effect
			text = hth_warfare_legacy_3_effect
		}
		custom_description_no_bullet = { ## AI
			text = hth_warfare_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement 
			text = hth_warfare_legacy_3_req_effect
		}
	}
}
hth_warfare_legacy_4 = { ### Death Lullaby
	legacy = warfare_legacy_track
	
	character_modifier = {
		attacker_advantage = 5
		counter_efficiency = 0.25
		movement_speed = 0.10
		ai_war_chance = 0.10
	}
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_warfare_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_warfare_legacy_4_req_effect
		}
	}
	can_be_picked = { 
		hth_warfare_4_legacy_trigger = yes
	}
}
hth_warfare_legacy_5 = { ### Bannerlord
	legacy = warfare_legacy_track

	character_modifier = {
		knight_effectiveness_per_martial = 0.03
		martial = 2
		ai_war_chance = 0.10
	}
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_warfare_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement 
			text = hth_warfare_legacy_5_req_effect
		}
	}
	can_be_picked = { 
		hth_warfare_5_legacy_trigger = yes
	}
}

### LAW DYNASTY LEGACIES

hth_law_legacy_1 = { ### By Right
	legacy = law_legacy_track
	
	character_modifier = {
		stewardship = 2
		legitimacy_gain_mult = 0.1
		monthly_influence_mult = 0.1
		ai_greed = 20
	}
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_law_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_law_legacy_1_req_effect
		}
	}
	can_be_picked = { 
		hth_law_1_legacy_trigger = yes
	}
	ai_chance = {
		value = 11
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
	}
}
hth_law_legacy_2 = { ### Privileges of the Great House
	legacy = law_legacy_track
	
	character_modifier = {
		ai_greed = 20
		monthly_income = 0.5
		title_creation_cost_mult = -0.25
		#monthly_county_control_growth_add = 0.2
		mercenary_hire_cost_mult = -0.1
	}
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_law_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_law_legacy_2_req_effect
		}
	}
	can_be_picked = { 
		hth_law_2_legacy_trigger = yes
	}
}
ce1_legitimacy_legacy_3 = { ### Insignia of the Dynasty
	legacy = law_legacy_track
	
	character_modifier = {
		monthly_stewardship_lifestyle_xp_gain_mult = 0.2
		ai_greed = 20
	}
	effect = { 
		custom_description_no_bullet = { ## Custom Effect
			#text = #hth_law_legacy_3_effect
			text = ce1_legitimacy_legacy_3_effect
		}
		custom_description_no_bullet = { ## AI
			text = hth_law_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_law_legacy_3_req_effect
		}
	}
	can_be_picked = { 
		hth_law_3_legacy_trigger = yes
	}
}
hth_law_legacy_4 = { ### Medley of Decree
	legacy = law_legacy_track

	character_modifier = {
		ai_greed = 20
		monthly_income = 0.5
		powerful_vassal_opinion = 5
		max_political_schemes_add = 1
		vassal_limit = 10
	}
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_law_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_law_legacy_4_req_effect
		}
	}
	can_be_picked = { 
		hth_law_4_legacy_trigger = yes
	}
}
ep3_administrative_legacy_5 = { ### Pride of Lions
	legacy = law_legacy_track

	character_modifier = {
		ai_greed = 20
		stewardship = 2
		#legitimacy_loss_mult = -0.5
		monthly_legitimacy_add = 1
	}
	effect = { 
		custom_description_no_bullet = { 
			text = ep3_administrative_legacy_track_effect_claimant_factions
		}
		custom_description_no_bullet = { ## Unique Decision
			text = ep3_administrative_legacy_track_effect_mass_arrests_decision 
		}
		custom_description_no_bullet = { ## AI
			text = hth_law_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ##Legacy Requirement
			text = hth_law_legacy_5_req_effect
		}
	}
	can_be_picked = { 
		hth_law_5_legacy_trigger = yes
	}
}

### GUILE DYNASTY LEGACIES

hth_guile_legacy_1 = { ### House of Rats
	legacy = guile_legacy_track
	
	character_modifier = {
		intrigue = 2
		owned_scheme_secrecy_add = 5
		ai_vengefulness = 20
	}
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_guile_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_guile_legacy_1_req_effect
		}
	}
	can_be_picked = { 
		hth_guile_1_legacy_trigger = yes
	}
	ai_chance = {
		value = 11
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
	}
}
hth_guile_legacy_2 = { ### Danse Macabre
	legacy = guile_legacy_track
	
	character_modifier = {
		owned_hostile_scheme_success_chance_add = 25
		intrigue_scheme_phase_duration = medium_scheme_phase_duration_bonus_value
		#gallowsbait_xp_gain_mult = 0.25
		ai_vengefulness = 20
	}
	effect = { 
		custom_description_no_bullet = { ## Ruffians
			text = hth_unlock_ruffians_unlock_desc
		}
		custom_description_no_bullet = { ## AI 
			text = hth_guile_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_guile_legacy_2_req_effect
		}
	}
	can_be_picked = { 
		hth_guile_2_legacy_trigger = yes
	}
}
hth_guile_legacy_3 = { ### Shadows and Conspiracies
	legacy = guile_legacy_track
	
	character_modifier = {
		monthly_intrigue_lifestyle_xp_gain_mult = 0.2
		ai_vengefulness = 20
	}
	effect = {
		custom_description_no_bullet = { ## Unique Decision
			text = hth_guile_legacy_3_effect
		}
		custom_description_no_bullet = { ## AI 
			text = hth_guile_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_guile_legacy_3_req_effect
		}
	}
	can_be_picked = { 
		hth_guile_3_legacy_trigger = yes
	}
}
hth_guile_legacy_4 = { ### The Fox Changes his Fur
	legacy = guile_legacy_track
	
	character_modifier = {
		enemy_hostile_scheme_success_chance_add = -25
		intrigue_scheme_phase_duration = medium_scheme_phase_duration_bonus_value
		max_seduce_schemes_add = 1
		ai_vengefulness = 20
	}
	effect = {
		custom_description_no_bullet = { ## AI
			text = hth_guile_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_guile_legacy_4_req_effect
		}
	}
	can_be_picked = { 
		hth_guile_4_legacy_trigger = yes
	}
}
hth_guile_legacy_5 = { ### Not his Habits
	legacy = guile_legacy_track
	character_modifier = {
		ai_vengefulness = 20
		max_hostile_schemes_add = 1
		intrigue = 2
	}
	effect = {
		custom_description_no_bullet = { ## AI
			text = hth_guile_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_guile_legacy_5_req_effect
		}
	}
	can_be_picked = { 
		hth_guile_5_legacy_trigger = yes
	}
}

### ERUDITION DYNASTY LEGACIES

hth_erudition_legacy_1 = { ### Tribe of Wisdom
	legacy = erudition_legacy_track
	
	character_modifier = {
		learning = 2
		ai_rationality = 20
		# +40 invite to court acceptance
	}
	effect = { 
		custom_description_no_bullet = { ## Custom Effect
			text = hth_erudition_legacy_1_effect
		}
		custom_description_no_bullet = { ## AI
			text = hth_erudition_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_erudition_legacy_1_req_effect
		}
	}
	can_be_picked = { 
		hth_erudition_1_legacy_trigger = yes
	}
	ai_chance = {
		value = 11
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
	}
}
hth_erudition_legacy_2 = { ### Learned in Many Ways
	legacy = erudition_legacy_track
	
	character_modifier = {
		ai_rationality = 20
		cultural_head_fascination_mult = 0.3
		diplomatic_range_mult = 0.25
		holding_build_gold_cost = -0.10
		domicile_build_gold_cost = -0.10
	}
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_erudition_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_erudition_legacy_2_req_effect
		}
	}
	can_be_picked = { 
		hth_erudition_2_legacy_trigger = yes
	}
}
ep3_administrative_legacy_4 = { ### Treasured Knowledge
	legacy = erudition_legacy_track
	
	character_modifier = {
		monthly_learning_lifestyle_xp_gain_mult = 0.2
		ai_rationality = 20
	}
	effect = { 
		custom_description_no_bullet = { ## Unique Decision
			text = hth_erudition_legacy_3_effect
		}
		custom_description_no_bullet = { ## Custom Effect 
			text = ep3_administrative_legacy_4_effect_cabinet_of_curiosities
		}
		custom_description_no_bullet = { ## AI
			text = hth_erudition_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_erudition_legacy_3_req_effect
		}
	}
	can_be_picked = { 
		hth_erudition_3_legacy_trigger = yes
	}
}
hth_erudition_legacy_4 = { ### Ordained by a Higher Power
	legacy = erudition_legacy_track
	
	character_modifier = {
		ai_zeal = 20
		monthly_piety = 1
		cultural_head_fascination_mult = 0.3
		build_gold_cost = -0.10
		domicile_build_gold_cost = -0.10
	}
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_erudition_legacy_1_ai_effect_alt
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_erudition_legacy_4_req_effect
		}
	}
	can_be_picked = { 
		hth_erudition_4_legacy_trigger = yes
	}
}
ce1_legitimacy_legacy_5 = { ### Knights of the Mind
	legacy = erudition_legacy_track
	
	character_modifier = {
		ai_rationality = 20
		learning = 2
		#development_growth_factor = 0.25
	}
	traits = {
		education_intrigue_5 = 100
		education_diplomacy_5 = 100
		education_stewardship_5 = 100
		education_martial_5 = 100
		education_learning_5 = 100
	}
	effect = { 
		custom_description_no_bullet = { ## Custom Effect
			text = ce1_heroic_legacy_5_effect
		}
		custom_description_no_bullet = { ## AI
			text = hth_erudition_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_erudition_legacy_5_req_effect
		}
	}
	can_be_picked = { 
		hth_erudition_5_legacy_trigger = yes
	}
}

### GLORY DYNASTY LEGACIES

law_legacy_1 = { ### Sport of Kings
	legacy = glory_legacy_track

	character_modifier = {
		diplomacy = 2
		## feast and hunt cost
		ai_sociability = 20
	}
	effect = { 
		custom_description_no_bullet = { ## Custom Effect
			text = hth_glory_legacy_1_effect
		}
		custom_description_no_bullet = { ## AI
			text = hth_glory_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_glory_legacy_1_req_effect
		}
	}
	can_be_picked = { 
		hth_glory_1_legacy_trigger = yes
	}
	ai_chance = {
		value = 11
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
	}
}
hth_glory_legacy_2 = { ### Affairs of the Court
	legacy = glory_legacy_track

	character_modifier = {
		ai_sociability = 20
		owned_personal_scheme_success_chance_add = 25
		owned_political_scheme_success_chance_add = 25
		court_grandeur_baseline_add = 5
		monthly_court_grandeur_change_mult = 1
	}
	can_be_picked = { 
		hth_glory_2_legacy_trigger = yes
	}
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_glory_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_glory_legacy_2_req_effect
		}
	}
}
ep3_administrative_legacy_3 = { ### Known Progeny 
	legacy = glory_legacy_track

	character_modifier = {
		ai_sociability = 20
		monthly_diplomacy_lifestyle_xp_gain_mult = 0.2
	}
	can_be_picked = { 
		hth_glory_3_legacy_trigger = yes
	}
	effect = { 
		custom_description_no_bullet = { ## Custom Effect
			text = hth_glory_legacy_3_effect
		}
		custom_description_no_bullet = { ## Custom Effect 
			text = ep3_administrative_legacy_3_effect_reception_hall
		}
		custom_description_no_bullet = { ## AI
			text = hth_glory_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_glory_legacy_3_req_effect
		}
	}
}
hth_glory_legacy_4 = { ### Regal Distinction
	legacy = glory_legacy_track

	character_modifier = {
		ai_sociability = 20
		max_personal_schemes_add = 1
		prestige_level_impact_mult = 1.0
		court_grandeur_baseline_add = 5
	}
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_glory_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_glory_legacy_4_req_effect
		}
	}
	can_be_picked = { 
		hth_glory_4_legacy_trigger = yes
	}
}
hth_glory_legacy_5 = { ### Legacy of the Dynasty
	legacy = glory_legacy_track

	character_modifier = {
		monthly_prestige = 1
		ai_sociability = 20
		diplomacy = 2
	}
	
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_glory_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_glory_legacy_5_req_effect
		}
	}
	can_be_picked = { 
		hth_glory_5_legacy_trigger = yes
	}
}

### KINDRED DYNASTY LEGACIES

hth_kin_legacy_1 = { ### Familia Ante Omnia
	legacy = kin_legacy_track
	
	character_modifier = {
		name = hth_kin_legacy_1_name
		martial = 1
		diplomacy = 1
		close_relative_opinion = 10
		ai_honor = 20
	}
	
	effect = { 
		custom_description_no_bullet = { ## AI
			text = hth_kin_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_kin_legacy_1_req_effect
		}
	}
	can_be_picked = { 
		hth_kindred_1_legacy_trigger = yes
	}
	ai_chance = {
		value = 11
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
	}
}
warfare_legacy_5 = { ### Household Guard
	legacy = kin_legacy_track
	
	character_modifier = {
		ai_honor = 20
		knight_limit = 3
		active_accolades = 1
		prowess = 4
	}
	can_be_picked = { 
		hth_kindred_2_legacy_trigger = yes
	}
	effect = { 
		custom_description_no_bullet = { ## House Guard
			text = warfare_legacy_5_unlock_effect
		}
		custom_description_no_bullet = { ## House Guard Info
			text = warfare_legacy_5_effect
		}
		custom_description_no_bullet = { ## AI
			text = hth_kin_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_kin_legacy_2_req_effect
		}
	}
}
hth_kin_legacy_3 = { ### The Oldwalls
	legacy = kin_legacy_track
	
	character_modifier = {
		monthly_diplomacy_lifestyle_xp_gain_mult = 0.10
		monthly_martial_lifestyle_xp_gain_mult = 0.10
		ai_honor = 20
	}
	effect = { 
		custom_description_no_bullet = { ## Unique Decision
			text = hth_kin_legacy_3_effect
		}
		custom_description_no_bullet = { ## AI
			text = hth_kin_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_kin_legacy_3_req_effect
		}
	}
	can_be_picked = { 
		hth_kindred_3_legacy_trigger = yes
	}
}
kin_legacy_4 = { ### Until the Day we Die 
	legacy = kin_legacy_track
	
	character_modifier = {
		ai_honor = 20
		dynasty_opinion = 10
		#short_reign_duration_mult = -0.5
		controlled_province_advantage = 5
	}
	can_be_picked = { 
		hth_kindred_4_legacy_trigger = yes
	}
	effect = { 
		custom_description_no_bullet = { ## Custom Effect
			text = kin_legacy_4_legacy_effect
		}
		custom_description_no_bullet = { ## House Paragon
			text = kin_accolade_effect
		}
		custom_description_no_bullet = { ## AI
			text = hth_kin_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_kin_legacy_4_req_effect
		}
	}
}
hth_kin_legacy_5 = { ### No Place Like Home
	legacy = kin_legacy_track
	character_modifier = {
		martial = 1
		diplomacy = 1
		domain_limit = 2
		ai_honor = 20
	}
	effect = { 
		#set_absolute_country_control = yes
		custom_description_no_bullet = { ## AI
			text = hth_kin_legacy_1_ai_effect
		}
		custom_description_no_bullet = { ## Legacy Requirement
			text = hth_kin_legacy_5_req_effect
		}
	}
	can_be_picked = { 
		hth_kindred_5_legacy_trigger = yes
	}
}