﻿### Modified EP3 Traditions ###
tradition_ep3_imperial_tagmata = {
	category = regional

	layers = {
		0 = martial
		1 = mediterranean
		4 = imperial_tagmata.dds 
	}

	is_shown = {
		OR = {
			this = culture:greek
			any_parent_culture_or_above = {
				this = culture:greek
			}
			has_cultural_pillar = heritage_byzantine
		}
		# DLC check.
		has_ep3_dlc_trigger = yes
		NOT = {
			has_cultural_tradition = tradition_roman_legacy
		}
	}
	can_pick = {
	}
	
	parameters = {
		unlock_maa_cataphract = yes
		unlock_maa_akritai = yes
		unlock_maa_ballistrai = yes
		unlock_maa_skoutatoi = yes
		unlock_maa_byzantine_menaulatoi = yes
		unlock_maa_byzantine_toxotai = yes
		unlock_maa_byzantine_akontistai = yes
		unlock_maa_byzantine_hippotoxotai = yes
		unlock_maa_byzantine_klibanophoroi = yes
		frontier_themes_borrow_neighbor_troops = yes
	}
	character_modifier = {
		levy_size = -0.33
		levy_reinforcement_rate = -0.33
		vassal_levy_contribution_mult = -1
		men_at_arms_recruitment_cost = 0.1
		men_at_arms_maintenance = -0.15
		counter_efficiency = 0.1
		knight_effectiveness_mult = -0.25
		men_at_arms_title_limit = 2
		men_at_arms_title_cap = 1
	}

	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOR = {
						culture_pillar:ethos_bureaucratic = { is_in_list = traits }
						culture_pillar:ethos_bellicose = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_or_bureaucratic_desc
				}
			}
			if = {
				limit = {
					NOT = {
						scope:character = {
							any_held_title = {
								tier = tier_county
								count >= 8
								any_county_province = {
									has_building_or_higher = stables_01
								}
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = domain_counties_with_stables_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	
	ai_will_do = {
		value = 400
		if = {
			limit = { # Admin should be more into this
				scope:character = {
					government_allows = administrative
				}
			}
			multiply = 2
		}
		else_if = {
			limit = {
				scope:character ?= {
					ai_has_warlike_personality = yes
				}
			}
			multiply = 4
		}
	}
}

tradition_ep3_roman_ceremonies = {
	category = regional

	layers = {
		0 = diplo
		1 = mediterranean
		4 = roman_ceremonies.dds
	}

	is_shown = {
		OR = {
			this = culture:greek
			any_parent_culture_or_above = {
				this = culture:greek
			}
			has_cultural_pillar = heritage_byzantine
			scope:character = {
				OR = {
					has_title = title:e_byzantium
					has_title = title:h_roman_empire
				}
			}
		}
		# DLC check.
		has_ep3_dlc_trigger = yes
		NOT = {
			has_cultural_tradition = tradition_byzantine_succession
		}
	}
	can_pick = {
	}
	
	parameters = {
		generous_trait_more_common = yes # Distributing charity was often a key aspect of Byzantine ceremonies
		holds_triumphs = yes
		holds_bride_shows = yes
		hosts_chariot_races = yes
		children_can_be_born_in_the_purple = yes
		# We use the co-emperors parameter for most things...
		unlock_co_emperors = yes
		# ... which means the junior emperor parameter is _mostly_ just here for the loc.
		unlock_junior_emperors = yes
		#byzantine_faction_preffered_claimants = yes
	}
	county_modifier = {
		county_opinion_add = -10
	}
	
	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOR = {
						culture_pillar:ethos_bureaucratic = { is_in_list = traits }
						culture_pillar:ethos_courtly = { is_in_list = traits }
						culture_pillar:ethos_egalitarian = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bureaucratic_courtly_or_egalitarian_desc
				}
			}
			if = {
				limit = {
					NOT = {
						any_culture_county = {
							count >= 50
							any_county_province = {
								geographical_region = custom_eastern_roman_empire
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = culture_in_roman_empire_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	
	ai_will_do = {
		value = 200
		if = {
			limit = { # Admin should be more into this
				scope:character = {
					government_allows = administrative
				}
			}
			multiply = 2
		}
	}
}

tradition_ep3_palace_politics = {
	category = realm

	layers = {
		0 = intrigue
		1 = mediterranean
		4 = palace_politics.dds 
	}

	is_shown = {
		OR = {
			this = culture:greek
			any_parent_culture_or_above = {
				this = culture:greek
			}
			has_cultural_pillar = heritage_byzantine
			scope:character = {
				OR = {
					has_title = title:e_byzantium
					has_title = title:h_roman_empire
				}
			}
		}
		# DLC check.
		has_ep3_dlc_trigger = yes
		NOT = {
			has_cultural_tradition = tradition_byzantine_succession
		}
	}
	can_pick = {
		custom_tooltip = {
			text = cannot_have_tradition_court_eunuchs
			NOT = { culture_tradition:tradition_court_eunuchs = { is_in_list = traits } }
		}
		custom_tooltip = {
			text = cannot_have_tradition_merciful_blindings
			NOT = { culture_tradition:tradition_merciful_blindings = { is_in_list = traits } }
		}
	}
	
	parameters = {
		unlock_maa_varangian_guards = yes
		unlock_akolouthos = yes
		reduced_bodyguard_aptitude = yes
		can_blind_prisoners = yes
		can_castrate_prisoners = yes
		eunuch_trait_bonuses = yes
		can_appoint_chief_eunuch = yes
		family_castration = yes
		ambitious_trait_more_common = yes
		physical_disfigurement_blocks_inheritance = yes #Actually only blocks claimants and reduce score in elective. Also includes infertility for tooltip reasons.
		cultrad_unlocks_t2_countermeasures = yes
		palace_politics_trait_bonuses = yes
		palace_politics_trait_maluses = yes
	}
	character_modifier = {
		monthly_court_grandeur_change_mult = 0.2
		political_scheme_phase_duration_add = minor_scheme_phase_duration_bonus_value
		personal_scheme_phase_duration_add = minor_scheme_phase_duration_bonus_value
	}
	
	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOR = {
						culture_pillar:ethos_bureaucratic = { is_in_list = traits }
						culture_pillar:ethos_courtly = { is_in_list = traits }
						culture_pillar:ethos_spiritual = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bureaucratic_courtly_or_spiritual_desc
				}
			}
			if = {
				limit = {
					has_dlc_feature = royal_court
					OR = {
						scope:character = { has_royal_court = no }
						NOT = {
							scope:character = {
								court_grandeur_current_level >= very_high_court_grandeur_level
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = culture_head_court_grandeur_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	
	ai_will_do = {
		value = 200
		if = {
			limit = { # Admin should be more into this
				scope:character = {
					government_allows = administrative
				}
			}
			multiply = 2
		}
	}
}

tradition_ep3_cultivated_sophistication = {
	category = societal

	layers = {
		0 = learning
		1 = mediterranean
		4 = cultivated_sophistication.dds
	}

	is_shown = {
		# DLC check.
		has_ep3_dlc_trigger = yes
	}
	can_pick = {
		custom_tooltip = {
			text = must_have_administrative_government_tt
			scope:character = { government_allows = administrative }
		}
	}
	
	parameters = {
		less_likely_to_culture_convert = yes
		other_cultures_more_likely_to_hybridize = yes
		estate_building_upgrade_development_gain = yes
		allows_noble_family_adoption = yes
	}
	character_modifier = {
		monthly_influence_mult = 0.1
		diplomatic_range_mult = 0.2
		cultural_head_fascination_mult = -0.10
	}
	
	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOR = {
						culture_pillar:ethos_bureaucratic = { is_in_list = traits }
						culture_pillar:ethos_courtly = { is_in_list = traits }
						culture_pillar:ethos_spiritual = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bureaucratic_courtly_or_spiritual_desc
				}
			}
			if = {
				limit = {
					NOT = {
						scope:character = {
							exists = capital_county
							capital_county = {
								tier = tier_county
								development_level >= 30
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = capital_province_development_level_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	
	ai_will_do = {
		value = 200
		if = {
			limit = { # Admin should be more into this
				OR = {
					this = culture:greek
					any_parent_culture_or_above = {
						this = culture:greek
					}
					has_cultural_pillar = heritage_byzantine
				}
			}
			multiply = 2
		}
	}
}

tradition_stratified_society = {
	category = societal

	layers = {
		0 = diplo
		1 = western
		4 = officials.dds
	}

	is_shown = {
		has_tgp_dlc_trigger = yes
		culture_head = {
			government_allows = merit
		}
		has_cultural_pillar = heritage_korean
	}

	parameters = {
		family_shares_merit = yes
		family_skips_exams = yes
		marrying_into_the_ruling_family_gives_influence = yes
		# unlock_maa_gakgung_archers = yes (Removed from this tradition to put into CE's Sanseong tradition)
	}

	county_modifier = {
	}

	character_modifier = {
	}
	
	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOR = {
						culture_pillar:ethos_bellicose = { is_in_list = traits }
						culture_pillar:ethos_stoic = { is_in_list = traits }
						culture_pillar:ethos_spiritual = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_spiritual_communal_or_stoic_desc
				}
			}
		}
	}
	
	ai_will_do = {
		value = 50
	}
}