﻿#######################
# CULTURAL TRADITIONS #
#######################

######################
# MAA Traditions 	 #
######################

tradition_futuwaa = {
	category = regional

	layers = {
		0 = martial
		1 = mena
		4 = soldiers.dds
	}
	
	is_shown = {
		has_cultural_pillar = heritage_iranian
		NOR = { #Replaces Martial Admiration
			has_cultural_tradition = tradition_chanson_de_geste
			has_cultural_tradition = tradition_druzhina
			has_cultural_tradition = tradition_martial_admiration
		}
	}
	can_pick = {
		has_cultural_pillar = heritage_iranian
		NOR = { #Replaces Martial Admiration
			has_cultural_tradition = tradition_chanson_de_geste
			has_cultural_tradition = tradition_druzhina
			has_cultural_tradition = tradition_martial_admiration
		}
	}
	
	parameters = {
		unlock_maa_ayyar = yes
		can_use_sparring_duel = yes
		martial_education_more_valued = yes
		prowess_traits_more_valued = yes
		blademaster_trait_bonuses = yes
		craven_and_content_traits_looked_down_upon = yes
		knights_slightly_more_prone_to_injury = yes
		unlock_voluntary_laampdom = yes
	}
	character_modifier = {
		knight_limit = 2
		negate_prowess_penalty_add = 5
		accolade_glory_gain_mult = 0.2
	}
	
	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_courtly = { is_in_list = traits }
						culture_pillar:ethos_communal = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_courtly_or_communal_desc
				}
			}
			if = {
				limit = {
					NOT = {
						scope:character = {
							any_knight = {
								count >= 6
								prowess >= 12
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = knights_with_prowess_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}

	ai_will_do = { value = 400 }
}

tradition_mubarizuns = {
	category = regional

	layers = {
		0 = martial
		1 = mena
		4 = soldiers.dds
	}
	
	#Can pick this if you have arabic heritage.
	is_shown = { #Replaces Warriors of the Dry
		has_cultural_pillar = heritage_arabic
	}
	can_pick = {
		culture_not_pacifistic_trigger = yes
		trigger_if = {
			limit = {
				OR = {
					NOT = { exists = scope:replacing }
					NOT = { scope:replacing = culture_tradition:tradition_warriors_of_the_dry }
				}
			}
			NOT = { has_cultural_tradition = tradition_warriors_of_the_dry } #To prevent stacking after hybridization
		}
	}
	
	parameters = {
		unlock_maa_mubarizun = yes
		desert_warrior_trait_more_common = yes
		dry_trait_bonuses = yes
		can_recruit_dry_specialist = yes
	}
	character_modifier = {
		drylands_levy_size = 0.1
		desert_levy_size = 0.1
		drylands_supply_limit_mult = 0.25
		desert_supply_limit_mult = 0.25
	}
	
	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_communal = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_stoic_or_communal_desc
				}
			}
			if = {
				limit = {
					NOT = {
						any_culture_county = {
							percent >= 0.3
							any_county_province = {
								OR = {
									terrain = drylands
									terrain = desert
								}
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = dry_percentage_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}

	ai_will_do = {
		value = 400
		if = {
			limit = {
				NOT = {
					scope:character = {
						any_sub_realm_county = {
							culture = scope:character.culture
							any_county_province = {
								OR = {
									terrain = drylands
									terrain = desert
								}
							}
						}
					}
				}
			}
			multiply = 0
		}
	}
}

tradition_desert_ribat = {
	category = regional

	layers = {
		0 = martial
		1 = mena
		4 = city2.dds
	}
	
	is_shown = {
		has_cultural_pillar = heritage_berber
	}
	can_pick = {
		culture_not_pacifistic_trigger = yes
		custom_description = {
			text = culture_in_dryland_desc
			any_culture_county = {
				any_county_province = {
					OR = {
						terrain = drylands
						terrain = desert
					}
				}
			}
		}
	}
	
	parameters = {
		unlock_maa_mulaththamun = yes #Mulaththamun
		desert_warrior_trait_more_common = yes
		dry_trait_bonuses = yes
		can_recruit_dry_specialist = yes
		mystic_trait_more_common = yes
	}
	character_modifier = {
		prowess_per_piety_level = 1
		desert_travel_danger = desert_low_danger_reduction
		drylands_travel_danger = drylands_low_danger_reduction
		desert_mountains_travel_danger = desert_mountains_low_danger_reduction
	}
	
	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_spiritual = { is_in_list = traits }
						culture_pillar:ethos_stoic = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_spiritual_or_stoic_desc
				}
			}
			if = {
				limit = {
					NOT = {
						any_culture_county = {
							percent >= 0.3
							any_county_province = {
								OR = {
									terrain = drylands
									terrain = desert
								}
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = dry_percentage_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}

	ai_will_do = {
		value = 400
		if = {
			limit = {
				NOT = {
					scope:character = {
						any_sub_realm_county = {
							culture = scope:character.culture
							any_county_province = {
								OR = {
									terrain = drylands
									terrain = desert
								}
							}
						}
					}
				}
			}
			multiply = 0
		}
	}
}

tradition_land_of_the_bow = {
	category = regional

	layers = {
		0 = martial
		1 = mena
		4 = bow.dds
	}
	
	is_shown = {
		has_cultural_pillar = heritage_east_african
	}
	can_pick = {
		has_cultural_pillar = heritage_east_african
	}
	
	parameters = {
		unlock_maa_archers_of_the_nile = yes
		hunting_archery_building_bonuses = yes
	}
	county_modifier = {
		floodplains_levy_size = 0.1
	}
	province_modifier = {
		garrison_size = 0.25
	}
	character_modifier = {
		defender_advantage = 5
		archers_damage_add = 4
	}
	
	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_spiritual = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_or_spiritual_desc
				}
			}
			if = {
				limit = {
					NOT = {
						scope:character = {
							number_maa_soldiers_of_base_type = {
								type = archers
								value >= 800
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = culture_head_archers_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}

	ai_will_do = {
		value = 400
		if = {
			limit = {
				NOT = {
					scope:character = {
						any_sub_realm_county = {
							culture = scope:character.culture
							any_county_province = {
								terrain = floodplains
							}
						}
					}
				}
			}
			multiply = 0
		}
	}
}

tradition_druzhina = {
	category = regional

	layers = {
		0 = martial
		1 = western
		4 = shield.dds
	}

	#East Slavic
	#This replaces Martial Admiration
	is_shown = {
		has_cultural_pillar = heritage_east_slavic
		NOR = { #Replaces Martial Admiration
			has_cultural_tradition = tradition_futuwaa
			has_cultural_tradition = tradition_chanson_de_geste
			has_cultural_tradition = tradition_martial_admiration
		}
	}
	can_pick = {
		has_cultural_pillar = heritage_east_slavic
		NOR = { #Replaces Martial Admiration
			has_cultural_tradition = tradition_futuwaa
			has_cultural_tradition = tradition_chanson_de_geste
			has_cultural_tradition = tradition_martial_admiration
		}
	}
	
	parameters = {
		unlock_maa_druzhina = yes
		martial_education_more_valued = yes
		prowess_traits_more_valued = yes
		blademaster_trait_bonuses = yes
		craven_and_content_traits_looked_down_upon = yes
		knights_slightly_more_prone_to_injury = yes
		can_duel_rivals = yes
	}
	character_modifier = {
		knight_limit = 2
		negate_prowess_penalty_add = 5
		accolade_glory_gain_mult = 0.2
		heavy_infantry_toughness_add = 2
	}
	
	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 }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_or_stoic_desc
				}
			}
			if = {
				limit = {
					NOT = {
						scope:character = {
							any_knight = {
								count >= 6
								prowess >= 12
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = knights_with_prowess_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}

	ai_will_do = { value = 400 }
}

tradition_hussar = { #Konni Raids
	category = regional

	layers = {
		0 = martial
		1 = western
		4 = rider.dds
	}

	#This replaces Hit and Run
	is_shown = {
		OR = {
			has_cultural_pillar = heritage_south_slavic
			has_cultural_pillar = heritage_magyar
			has_cultural_pillar = heritage_west_slavic
		}
	}
	can_pick = {
		trigger_if = {
			limit = {
				OR = {
					NOT = { exists = scope:replacing }
					NOT = { scope:replacing = culture_tradition:tradition_hit_and_run }
				}
			}
			NOT = { has_cultural_tradition = tradition_hit_and_run } #To prevent stacking after hybridization
		}
	}
	
	parameters = {
		unlock_maa_hussar = yes
	}
	character_modifier = {
		skirmishers_screen_add = 2
		light_cavalry_damage_add = 6
		light_cavalry_screen_add = 6
		retreat_losses = -0.1
		hard_casualty_modifier = -0.1
	}
	
	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOT = {
						culture_pillar:ethos_stoic = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_stoic_desc
				}
			}
			if = {
				limit = {
					NOT = {
						scope:character = {
							number_maa_soldiers_of_base_type = {
								type = light_cavalry
								value >= 500
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = culture_head_light_cavalry_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	
	ai_will_do = { value = 400 }
}

tradition_horn_mountain_skirmishing = {
	category = regional

	layers = {
		0 = steward
		1 = mena
		4 = desert_mountains.dds
	}

	#In the Horn of Africa this replaces the Mountaineers tradition
	is_shown = {
		OR ={
			has_cultural_pillar = heritage_somalian
			has_cultural_pillar = heritage_east_african
		}
		NOR = {
			has_cultural_tradition = tradition_mountaineers
			has_cultural_tradition = tradition_caucasian_wolves
		}
	}
	can_pick = {
		custom_description = {
			text = culture_in_mountains_desc
			any_culture_county = {
				any_county_province = {
					OR = {
						terrain = mountains
						terrain = desert_mountains
					}
				}
			}
		}
	}
	
	parameters = {
		unlock_maa_horn_warrior = yes
		rough_terrain_expert_trait_more_common = yes
		mountain_trait_bonuses = yes
		can_recruit_mountain_specialist = yes
	}
	province_modifier = {
		mountains_levy_size = 0.1
		desert_mountains_levy_size = 0.1
		mountains_supply_limit_mult = 0.25
		desert_mountains_supply_limit_mult = 0.25
	}
	character_modifier = {
		mountains_travel_danger = mountains_medium_danger_reduction
		desert_mountains_travel_danger = desert_mountains_medium_danger_reduction
	}
	
	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOR = {
						culture_pillar:ethos_spiritual = { is_in_list = traits }
						culture_pillar:ethos_communal = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_spiritual_or_communal_desc
				}
			}
			if = {
				limit = {
					NOT = {
						any_culture_county = {
							percent >= 0.3
							any_county_province = {
								OR = {
									terrain = mountains
									terrain = desert_mountains
								}
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = mountain_percentage_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}

	ai_will_do = {
		value = 400
		if = {
			limit = {
				NOT = {
					scope:character = {
						any_sub_realm_county = {
							culture = scope:character.culture
							any_county_province = {
								OR = {
									terrain = mountains
									terrain = desert_mountains
								}
							}
						}
					}
				}
			}
			multiply = 0
		}
	}
}

tradition_bush_hunting = {
	category = regional

	layers = {
		0 = martial
		1 = mena
		4 = jungle.dds
	}
	
	#Replaces Jungle Warriors
	is_shown = {
		OR = {
			has_cultural_pillar = heritage_akan
			has_cultural_pillar = heritage_yoruba
		}
		NOT = { has_cultural_tradition = tradition_jungle_warriors }
	}
	can_pick = {
	}
	
	parameters = {
		unlock_maa_bush_hunter = yes
		jungle_trait_bonuses = yes
		dry_trait_bonuses = yes
		can_recruit_jungle_specialist = yes
	}
	character_modifier = {
		archers_damage_add = 4
		jungle_supply_limit_mult = 0.25
		jungle_travel_danger = jungle_medium_danger_reduction
	}
	
	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOR = {
						culture_pillar:ethos_communal = { is_in_list = traits }
						culture_pillar:ethos_egalitarian = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_communal_or_egalitarian_desc
				}
			}
			if = {
				limit = {
					NOT = {
						any_culture_county = {
							percent >= 0.3
							any_county_province = {
								terrain = jungle
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = jungle_percentage_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}

	ai_will_do = {
		value = 400
		if = {
			limit = {
				NOT = {
					scope:character = {
						any_sub_realm_county = {
							culture = scope:character.culture
							any_county_province = {
								terrain = jungle
							}
						}
					}
				}
			}
			multiply = 0
		}
	}
}

tradition_mobile_guards = {
	category = regional

	layers = {
		0 = martial
		1 = mena
		4 = forest.dds
	}

	#Replaces Stand and Fight
	is_shown = {
		has_cultural_pillar = heritage_israelite
		NOT = { has_cultural_tradition = tradition_stand_and_fight }
	}
	can_pick = {
	}
	
	parameters = {
		unlock_maa_shomer = yes
	}
	character_modifier = {
		maa_toughness_add = 4
		heavy_infantry_toughness_add = 4
		heavy_infantry_maintenance_mult = 0.1
		heavy_cavalry_toughness_add = 20
		heavy_cavalry_maintenance_mult = 0.1
		pikemen_toughness_add = 6
		pikemen_maintenance_mult = 0.1
		hard_casualty_modifier = 0.25
	}
	
	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOT = {
						culture_pillar:ethos_communal = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_communal_desc
				}
			}
			if = {
				limit = {
					NOT = {
						scope:character = {
							number_maa_soldiers_of_base_type = {
								type = skirmishers
								value >= 800
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = culture_head_skirmishers_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}

	ai_will_do = {
		value = 400
		if = {
			limit = {
				NOR = {
					culture_has_heavy_infantry_maa = yes
					culture_has_heavy_cavalry_maa = yes
					culture_has_pikemen_maa = yes
				}
				OR = {
					culture_has_skirmisher_maa = yes
					culture_has_archer_maa = yes
					culture_has_light_cavalry_maa = yes
					culture_has_archer_cavalry_maa = yes
				}
			}
			multiply = 0.25
		}
	}
}

tradition_khadga_puja = {
	category = regional
	
	layers = {
		0 = martial
		1 = mena
		4 = soldiers2.dds
	}

	is_shown = {
		has_cultural_pillar = heritage_indo_aryan
	}
	can_pick = {
		custom_description = {
			text = culture_not_egalitarian
			NOT = {
				culture_pillar:ethos_egalitarian = { is_in_list = traits }
			}
		}
	}
	
	parameters = {
		martial_education_more_valued = yes
		unlock_maa_khandayat = yes
		blademaster_trait_bonuses = yes
		craven_and_content_traits_looked_down_upon = yes
	}
	province_modifier = {
	}
	character_modifier = {
		knight_effectiveness_mult = 0.1
		accolade_glory_gain_mult = 0.1
	}
	
	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 }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_or_stoic_desc
				}
			}
			if = {
				limit = {
					NOT = {
						scope:character = {
							any_knight = {
								count >= 6
								prowess >= 12
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = knights_with_prowess_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}

	ai_will_do = {
		value = 400
	}
}

tradition_garuda_warriors = {
	category = regional

	layers = {
		0 = martial
		1 = indian
		4 = soldiers2.dds
	}

	is_shown = {
		has_cultural_pillar = heritage_dravidian
	}
	can_pick = {
	}
	
	parameters = {
		unlock_maa_garudas = yes
		unlock_garuda_warrior_title = yes
		martial_education_more_valued = yes
		prowess_traits_more_valued = yes
		craven_and_content_traits_looked_down_upon = yes
		loyal_trait_more_valued = yes
	}
	character_modifier = {
		accolade_glory_gain_mult = 0.1
	}
	
	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 }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_or_stoic_desc
				}
			}
			if = {
				limit = {
					NOT = {
						scope:character = {
							any_knight = {
								count >= 6
								prowess >= 12
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = knights_with_prowess_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}

	ai_will_do = {
		value = 400
	}
}

tradition_burman_royal_army = {
	category = regional

	layers = {
		0 = martial
		1 = indian
		4 = elephant.dds
	}

	is_shown = {
		has_cultural_pillar = heritage_burman
	}
	can_pick = {
		has_cultural_pillar = heritage_burman
	}
	
	parameters = {
		unlock_maa_palace_guards = yes
		jungle_stalker_trait_more_common = yes
		jungle_trait_bonuses = yes
		can_recruit_jungle_specialist = yes
	}
	character_modifier = {
		elephant_cavalry_damage_add = 60
		elephant_cavalry_toughness_add = 20
		jungle_travel_danger = jungle_medium_danger_reduction
		accolade_glory_gain_mult = 0.1
	}
	province_modifier = {
	}
	
	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOT = {
						culture_pillar:ethos_spiritual = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_spiritual_desc
				}
			}
			if = {
				limit = {
					NOT = {
						scope:character = {
							number_maa_soldiers_of_base_type = {
								type = elephant_cavalry
								value >= 5
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = culture_head_has_elephants_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}

	ai_will_do = {
		value = 400
	}
}

tradition_mountain_herding = {
	category = regional

	layers = {
		0 = martial
		1 = mena
		4 = desert_mountains.dds
	}

	#Replaces Mountain Homes
	is_shown = {
		OR ={
			has_cultural_pillar = heritage_arabic
			has_cultural_pillar = heritage_berber
		}
	}
	can_pick = {
		OR ={
			has_cultural_pillar = heritage_arabic
			has_cultural_pillar = heritage_berber
		}
		culture_not_pacifistic_trigger = yes
		custom_description = {
			text = culture_in_mountains_desc
			any_culture_county = {
				any_county_province = {
					OR = {
						terrain = mountains
						terrain = desert_mountains
					}
				}
			}
		}
	}
	
	parameters = {
		unlock_maa_abudrar = yes
		rough_terrain_expert_trait_more_common = yes
		desert_warrior_trait_more_common = yes
		mountain_trait_bonuses = yes
		can_recruit_mountain_specialist = yes
	}
	character_modifier = {
		mountains_travel_danger = mountains_high_danger_reduction
		desert_mountains_travel_danger = desert_mountains_high_danger_reduction
	}
	county_modifier = {
		desert_mountains_development_growth_factor = 0.35
	}
	province_modifier = {
		desert_mountains_construction_gold_cost = -0.1
		desert_mountains_holding_construction_gold_cost = -0.1
	}

	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_communal = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_stoic_or_communal_desc
				}
			}
			if = {
				limit = {
					NOT = {
						any_culture_county = {
							percent >= 0.3
							any_county_province = {
								terrain = desert_mountains
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = mountain_percentage_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	ai_will_do = {
		value = 400
		if = {
			limit = {
				NOT = {
					scope:character = {
						any_sub_realm_county = {
							culture = scope:character.culture
							any_county_province = {
								terrain = desert_mountains
							}
						}
					}
				}
			}
			multiply = 0
		}
	}
}

tradition_forest_wardens = {
	category = regional

	layers = {
		0 = martial
		1 = western
		4 = forest.dds
	}

	#Replaces Forest Folk
	is_shown = {
		OR = {
			has_cultural_pillar = heritage_balto_finnic
			has_cultural_pillar = heritage_volga_finnic
			has_cultural_pillar = heritage_ugro_permian
			has_cultural_pillar = heritage_baltic
		}
		NOT = { has_cultural_tradition = tradition_forest_folk }
	}
	can_pick = {
		OR = {
			has_cultural_pillar = heritage_balto_finnic
			has_cultural_pillar = heritage_volga_finnic
			has_cultural_pillar = heritage_ugro_permian
			has_cultural_pillar = heritage_baltic
		}
		custom_description = {
			text = culture_in_forest_desc
			any_culture_county = {
				any_county_province = {
					OR = {
						terrain = forest
						terrain = taiga
					}
				}
			}
		}
	}
	
	parameters = {
		unlock_maa_metsanvartija = yes
		logging_camps_building_bonuses = yes
		can_recruit_forest_specialist = yes
		forest_fighter_trait_more_common = yes
		forest_hunt_success_chance = yes
		watermills_forestries_unlock = yes
	}
	character_modifier = {
		forest_travel_danger = forest_high_danger_reduction
		taiga_travel_danger = taiga_high_danger_reduction
	}
	county_modifier = {
		forest_development_growth_factor = 0.15
		taiga_development_growth_factor = 0.15
	}
	province_modifier = {
		forest_construction_gold_cost = -0.1
		taiga_construction_gold_cost = -0.1
		forest_holding_construction_gold_cost = -0.1
		taiga_holding_construction_gold_cost = -0.1
	}

	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_communal = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_stoic_or_communal_desc
				}
			}
			if = {
				limit = {
					NOT = {
						any_culture_county = {
							percent >= 0.3
							any_county_province = {
								OR = {
									terrain = forest
									terrain = taiga
								}
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = forest_percentage_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	
	ai_will_do = {
		value = 400
		if = {
			limit = {
				NOT = {
					scope:character = {
						any_sub_realm_county = {
							culture = scope:character.culture
							any_county_province = {
								OR = {
									terrain = forest
									terrain = taiga
								}
							}
						}
					}
				}
			}
			multiply = 0
		}
	}
}

tradition_upland_skirmishing = {
	category = regional

	layers = {
		0 = martial
		1 = western
		4 = forest.dds
	}

	#Replaces Highland Warriors
	is_shown = {
		has_cultural_pillar = heritage_west_african
		NOT = { has_cultural_tradition = tradition_highland_warriors }
	}
	can_pick = {
		has_cultural_pillar = heritage_west_african
		custom_description = {
			text = culture_in_hills_desc
			any_culture_county = {
				any_county_province = {
					terrain = hills
				}
			}
		}
	}
	
	parameters = {
		unlock_maa_guinea_warrior = yes
		hill_farms_building_bonuses = yes

		rough_terrain_expert_trait_more_common = yes
		hill_trait_bonuses = yes
		can_recruit_hill_specialist = yes
	}
	character_modifier = {
		hills_travel_danger = hills_medium_danger_reduction
		forest_travel_danger = forest_medium_danger_reduction
	}
	province_modifier = {
		hills_levy_size = 0.1
		hills_supply_limit_mult = 0.25
	}

	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOR = {
						culture_pillar:ethos_communal = { is_in_list = traits }
						culture_pillar:ethos_egalitarian = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_communal_or_egalitarian_desc
				}
			}
			if = {
				limit = {
					NOT = {
						any_culture_county = {
							percent >= 0.3
							any_county_province = {
								terrain = hills
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = hill_percentage_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	
	ai_will_do = {
		value = 400
		if = {
			limit = {
				NOT = {
					scope:character = {
						any_sub_realm_county = {
							culture = scope:character.culture
							any_county_province = {
								terrain = hills
							}
						}
					}
				}
			}
			multiply = 0
		}
	}
}

tradition_strong_kinship = { #There can be only one!
	category = regional

	layers = {
		0 = martial
		1 = western
		4 = conversation.dds
	}

	is_shown = {
		OR = {
			this = culture:gaelic
			this = culture:scottish
			any_parent_culture_or_above = {
				OR = {
					this = culture:gaelic
					this = culture:scottish
				}
			}
		}
	}
	can_pick = {
		OR = {
			this = culture:gaelic
			this = culture:scottish
			any_parent_culture_or_above = {
				OR = {
					this = culture:gaelic
					this = culture:scottish
				}
			}
		}
	}
	
	parameters = {
		unlock_schiltron_innovation = yes
		bonuses_from_patriarch_matriarch_trait = yes
		cultural_house_personal_scheme_success_chance = yes
		landing_house_members_give_prestige = yes
		penalty_for_revoking_titles_from_house_members = yes
		loyal_trait_more_common = yes
	}
	character_modifier = {
		dynasty_house_opinion = 15
		opinion_of_liege = -10
	}

	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_bureaucratic = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_stoic_or_bureaucratic_desc
				}
			}
			if = {
				limit = {
					exists = scope:character.house
					NOT = {
						scope:character.house = {
							any_house_member = {
								count >= 3
								has_relation_friend = scope:character
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = house_friends_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	
	ai_will_do = {
		value = 400
	}
}

tradition_amharic_highlanders = { #Ethiopian Unique Tradition, replaces hill dwellers, Unlocks MAA innovation & Castration
	category = realm

	layers = {
		0 = steward
		1 = mena
		4 = mountain.dds
	}

	is_shown = {
		NOT = { has_cultural_tradition = tradition_hill_dwellers }
		OR = {
			this = culture:ethiopian
			any_parent_culture_or_above = {
				this = culture:ethiopian
			}
		}
	}
	can_pick = {
		NOT = { has_cultural_tradition = tradition_hill_dwellers }
		OR = {
			this = culture:ethiopian
			any_parent_culture_or_above = {
				this = culture:ethiopian
			}
		}
		custom_description = {
			text = culture_in_hills_desc
			any_culture_county = {
				any_county_province = {
					terrain = hills
				}
			}
		}
	}
	
	parameters = {
		unlock_sarawit_innovation = yes
		can_castrate_prisoners = yes
		hill_farms_building_bonuses = yes
	}
	county_modifier = {
		hills_development_growth_factor = 0.2
	}
	province_modifier = {
		hills_construction_gold_cost = -0.1
		hills_holding_construction_gold_cost = -0.1
	}
	character_modifier = {
		hills_advantage = 5
		hills_travel_danger = hills_high_danger_reduction
		mountains_travel_danger = mountains_low_danger_reduction
		desert_mountains_travel_danger = desert_mountains_low_danger_reduction
	}

	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOT = {
						culture_pillar:ethos_spiritual = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_spiritual_desc
				}
			}
			if = {
				limit = {
					NOT = {
						any_culture_county = {
							percent >= 0.3
							any_county_province = {
								terrain = hills
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = hill_percentage_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	
	ai_will_do = {
		value = 400
		if = {
			limit = {
				NOT = {
					scope:character = {
						any_sub_realm_county = {
							percent >= 0.2
							culture = scope:character.culture
							any_county_province = {
								terrain = hills
							}
						}
					}
				}
			}
			multiply = 0
		}
	}
}


tradition_polders = { #Dutch Unique Tradition, bonuses to buildings along coastline, Unlocks MAA innovation
	category = realm

	layers = {
		0 = steward
		1 = mena
		4 = svamp.dds
	}

	is_shown = {
		OR = {
			this = culture:dutch
			any_parent_culture_or_above = {
				this = culture:dutch
			}
		}
	}
	can_pick = {
		OR = {
			this = culture:dutch
			any_parent_culture_or_above = {
				this = culture:dutch
			}
		}
		custom_description = {
			text = culture_on_coast_desc
			any_culture_county = {
				any_county_province = {
					is_coastal = yes
				}
			}
		}
	}
	
	parameters = {
		unlock_adaptive_militia_innovation = yes
		coastal_agriculture_building_bonuses = yes
		coastal_holding_bonuses = yes
	}
	character_modifier = {
		skirmishers_damage_add = 4
		skirmishers_screen_add = 4
		coastal_sea_travel_danger = low_sea_danger_reduction
		wetlands_travel_danger = wetlands_medium_danger_reduction
		floodplains_travel_danger = floodplains_medium_danger_reduction
	}

	cost = {
		prestige = {
			add = {
				value = tradition_base_cost
				desc = BASE
				format = "BASE_VALUE_FORMAT"
			}
			if = {
				limit = {
					NOR = {
						culture_pillar:ethos_communal = { is_in_list = traits }
						culture_pillar:ethos_bureaucratic = { is_in_list = traits }
						culture_pillar:ethos_stoic = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_communal_bureaucratic_or_stoic_desc
				}
			}
			if = {
				limit = {
					NOT = {
						any_culture_county = {
							percent >= 0.3
							any_county_province = {
								is_coastal = yes
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = coastal_percentage_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	
	ai_will_do = {
		value = 400
		if = {
			limit = {
				NOT = {
					scope:character = {
						any_sub_realm_county = {
							percent >= 0.3
							any_county_province = {
								is_coastal = yes
							}
						}
					}
				}
			}
			multiply = 0
		}
		if = {
			limit = {
				scope:character = {
					any_sub_realm_county = {
						percent >= 0.6
						any_county_province = {
							is_coastal = yes
						}
					}
				}
			}
			multiply = 3
		}
	}
}

tradition_caucasian_wolves = {
	category = regional

	layers = {
		0 = steward
		1 = mena
		4 = mountain.dds
	}
	
	#For Georgians this replaces the Mountaineers tradition
	is_shown = {
		OR = {
			this = culture:georgian
			any_parent_culture_or_above = {
				this = culture:georgian
			}
		}
		NOR = {
			has_cultural_tradition = tradition_mountaineers
			has_cultural_tradition = tradition_horn_mountain_skirmishing
		}
	}
	can_pick = {
		custom_description = {
			text = culture_in_mountains_desc
			any_culture_county = {
				any_county_province = {
					OR = {
						terrain = mountains
						terrain = desert_mountains
					}
				}
			}
		}
	}
	
	parameters = {
		unlock_maa_monaspa = yes
		rough_terrain_expert_trait_more_common = yes
		mountain_trait_bonuses = yes
		can_recruit_mountain_specialist = yes
	}
	province_modifier = {
		mountains_levy_size = 0.1
		desert_mountains_levy_size = 0.1
		mountains_supply_limit_mult = 0.25
		desert_mountains_supply_limit_mult = 0.25
	}
	character_modifier = {
		mountains_travel_danger = mountains_medium_danger_reduction
		desert_mountains_travel_danger = desert_mountains_medium_danger_reduction
	}
	
	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_communal = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_stoic_or_communal_desc
				}
			}
			if = {
				limit = {
					NOT = {
						any_culture_county = {
							percent >= 0.3
							any_county_province = {
								OR = {
									terrain = mountains
									terrain = desert_mountains
								}
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = mountain_percentage_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}

	ai_will_do = {
		value = 1000 
		if = {
			limit = {
				NOT = {
					scope:character = {
						any_sub_realm_county = {
							culture = scope:character.culture
							any_county_province = {
								OR = {
									terrain = mountains
									terrain = desert_mountains
								}
							}
						}
					}
				}
			}
			multiply = 0
		}
	}
}

tradition_hird = {
	category = regional

	layers = {
		0 = martial
		1 = mena
		4 = viking.dds
	}
	
	is_shown = { #Replaces Warrior Culture
		NOR = {
			has_cultural_tradition = tradition_warrior_culture
			has_cultural_tradition = tradition_fp1_coastal_warriors
		}
		OR = {
			AND = {
				has_cultural_pillar = heritage_north_germanic
				has_fp1_dlc_trigger = no
			}
			any_parent_culture_or_above = {
				OR = {
					this = culture:old_saxon
					this = culture:norse #For instance Norman culture
				}
			}
		}
	}
	can_pick = {
		culture_not_pacifistic_trigger = yes
		scope:character = {
			government_has_flag = government_is_tribal
		}
	}
	
	parameters = {
		unlock_maa_huscarls = yes
		strong_traits_more_valued = yes
		strong_traits_more_common = yes
		weak_traits_looked_down_upon = yes
		rowdy_trait_more_common = yes
		pensive_trait_less_common = yes
		cultrad_unlocks_t2_redouble_guards = yes
		unlock_voluntary_laampdom = yes
		more_likely_to_be_laamps = yes
	}
	character_modifier = {
		cultural_head_fascination_mult = -0.05
		knight_limit = 1
		prowess = 2
		ai_boldness = 25
		accolade_glory_gain_mult = 0.1
	}
	
	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_spiritual = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_or_spiritual_desc
				}
			}
			if = {
				limit = {
					trigger_if = {
						limit = {
							scope:character = {
								is_ai = no
							}
						}
						NOT = {
							any_ruler = {
								count >= 3
								culture = prev
								primary_title.tier >= tier_county
								OR = {	
									has_trait = strong
									has_trait = physique_good
								}
							}
						}
					}
					trigger_else = {
						always = no
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = strong_rulers_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}

	ai_will_do = {
		value = 400
		if = {
			limit = {
				NOT = {
					culture_pillar:ethos_bellicose = { is_in_list = traits }
				}
			}
			multiply = 0
		}
	}
}


tradition_chanson_de_geste = {
#Replaces Martial Admiration
	category = regional

	layers = {
		0 = martial
		1 = indian
		4 = knight.dds
	}
	
	is_shown = {
		has_cultural_pillar = heritage_frankish
		NOR = { #Replaces Martial Admiration
			has_cultural_tradition = tradition_futuwaa
			has_cultural_tradition = tradition_druzhina
			has_cultural_tradition = tradition_martial_admiration
		}
	}
	can_pick = {
		has_cultural_pillar = heritage_frankish
		NOR = { #Replaces Martial Admiration
			has_cultural_tradition = tradition_futuwaa
			has_cultural_tradition = tradition_druzhina
			has_cultural_tradition = tradition_martial_admiration
		}
	}

	parameters = {
		unlock_valets_innovation = yes
		poet_trait_gives_bonuses = yes
		poet_trait_more_common = yes
		martial_education_more_valued = yes
		prowess_traits_more_valued = yes
		blademaster_trait_bonuses = yes
		craven_and_content_traits_looked_down_upon = yes
		knights_slightly_more_prone_to_injury = yes
		can_duel_rivals = yes
		can_host_joust_contests = yes
		knight_errant_trait_bonuses = yes
	}
	character_modifier = {
		knight_limit = 2
		negate_prowess_penalty_add = 5 # Wounded knights fight better!
		accolade_glory_gain_mult = 0.2
		owned_legend_spread_mult = 0.05
	}
	
	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_courtly = { is_in_list = traits }
					}
				}
				add = {
					value = tradition_incompatible_ethos_penalty
					desc = not_bellicose_stoic_or_courtly_desc
				}
			}
			if = {
				limit = {
					NOT = {
						scope:character = {
							any_knight = {
								count >= 6
								prowess >= 12
							}
						}
					}
				}
				add = {
					value = tradition_unfulfilled_criteria_penalty
					desc = knights_with_prowess_desc
				}
			}
			
			multiply = tradition_replacement_cost_if_relevant
		}
	}
	
	ai_will_do = { value = 400 }
}
