estate_nomadic_tribes_land_rights = {
	icon = privilege_grant_autonomy
	land_share = 5
	max_absolutism = -5
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 1 } }
	loyalty = 0.05
	influence = 0.05
	can_select = {
	}
	on_granted = {
	}
	penalties = {
	}
	benefits = {
		governing_capacity = 100
	}
	conditional_modifier = {
		trigger = { has_country_flag = ned_land_rights_buff_flag }
		modifier = {
			governing_capacity = 50
		}
	}
	ai_will_do = {
		factor = 5
		modifier = {
			factor = 1.4
			num_of_territories = 5
		}
		modifier = {
			factor = 1.5
			num_of_territories = 10
		}
		modifier = {
			factor = 1.5
			num_of_territories = 15
		}
		modifier = {
			factor = 0
			OR = {
				NOT = { crown_land_share = 25 }
				estate_influence = {
					estate = estate_nomadic_tribes
					influence = 75
				}
			}
			NOT = { has_estate_privilege = estate_nomadic_tribes_land_rights }
		}
		modifier = {
			factor = 3
			OR = {
				AND = {
					governing_capacity_percentage = 0.9
					NOT = { has_estate_privilege = estate_nomadic_tribes_land_rights }
				}
				#The trigger below should make sure that the AI actually keeps this privilege when enacting it early game
				AND = {
					governing_capacity_percentage = 0.6
					has_estate_privilege = estate_nomadic_tribes_land_rights
				}
			}
		}
		modifier = {
			factor = 0
			NOT = { governing_capacity_percentage = 0.5 }
		}
		modifier = {
			factor = 0.8
			OR = {
				NOT = { crown_land_share = 40 }
				AND = {
					is_absolutism_active = yes
					NOT = { crown_land_share = 60 }
				}
			}
			NOT = { has_estate_privilege = estate_nomadic_tribes_land_rights }
		}
		modifier = {
			factor = 0.8
			OR = {
				NOT = { crown_land_share = 30 }
				AND = {
					is_absolutism_active = yes
					NOT = { crown_land_share = 50 }
				}
			}
			NOT = { has_estate_privilege = estate_nomadic_tribes_land_rights }
		}
		modifier = {
			factor = 0.8
			is_absolutism_active = yes
		}
		modifier = {
			factor = 2
			governing_capacity_percentage = 0.9
		}
		modifier = {
			factor = 3
			governing_capacity_percentage = 1
		}
		modifier = {
			factor = 10
			governing_capacity_percentage = 1.2
		}
		modifier = {
			factor = 8
			NOT = { adm_tech = 12 }
			governing_capacity_percentage = 0.8
		}
		modifier = {
			factor = 5
			NOT = { adm_tech = 12 }
			NOT = { government_rank = 1 }
			governing_capacity_percentage = 0.65
		}
		#Tag specific convincement - after tech 17 (+250 governing capacity) it should not play a role anymore
		modifier = {
			factor = 1.25
			tag = MOS
			NOT = { adm_tech = 17 }
		}
		modifier = {
			factor = 1.25
			tag = RUS
			NOT = { adm_tech = 17 }
		}
		modifier = {
			factor = 1.25
			tag = TUR
			NOT = { adm_tech = 17 }
		}
		modifier = {
			factor = 1.25
			tag = MNG
			NOT = { adm_tech = 17 }
		}
		modifier = {
			factor = 1.25
			tag = FRA
			NOT = { adm_tech = 17 }
		}
		modifier = {
			factor = 1.25
			tag = SPA
			NOT = { adm_tech = 17 }
		}
		modifier = {
			factor = 1.25
			tag = PLC
			NOT = { adm_tech = 17 }
		}
		#Has already a similar privilege active
		modifier = {
			factor = 0.75
			has_estate_privilege = estate_brahmins_land_rights
		}
		modifier = {
			factor = 0.75
			has_estate_privilege = estate_nobles_land_rights
		}
		modifier = {
			factor = 0.75
			has_estate_privilege = estate_church_land_rights
		}
		modifier = {
			factor = 0.75
			has_estate_privilege = estate_maratha_land_rights
		}
		modifier = {
			factor = 0.75
			has_estate_privilege = estate_burghers_land_rights
		}
		modifier = {
			factor = 0.75
			has_estate_privilege = estate_vaisyas_land_rights
		}
		modifier = {
			factor = 0.75
			has_estate_privilege = estate_cossacks_land_rights
		}
		modifier = {
			factor = 0.75
			has_estate_privilege = estate_dhimmi_land_rights
		}
		modifier = {
			factor = 0.75
			has_estate_privilege = estate_jains_land_rights
		}
		modifier = {
			factor = 0.75
			has_estate_privilege = estate_rajput_land_rights
		}
	}
}

estate_nomadic_tribes_share_of_the_spoils = {
	icon = privilege_supply_arms
	max_absolutism = -5
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 1 } }
	loyalty = 0.05
	penalties = {
		available_province_loot = -0.1
	}
	
	conditional_modifier = {
		trigger = {
			has_country_flag = hordes_share_spoils_buff_flag
		}
		modifier = {
			technology_cost = -0.05
		}
	}
	
	benefits = {
	}
	ai_will_do = {
		factor = 0
	}
}

estate_nomadic_tribes_chieftains_autonomy = {
	icon = privilege_grant_autonomy
	max_absolutism = -10
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 2 } }
	loyalty = 0.1
	influence = 0.1
	penalties = {
	}
	benefits = {
	}
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			is_absolutism_active = yes
		}
	}
}

estate_nomadic_tribes_guaranteed_leadgership_in_host = {
	icon = privilege_conscript_cossack_elite
	max_absolutism = -5
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 1 } }
	influence = 0.05
	can_select = {
		if = {
			limit = {
				NOT = { has_country_flag = hordes_no_at_for_guaranteed_leadership_flag }
			}
			army_tradition = 30
		}
	}
	on_granted = {
		if = {
			limit = {
				NOT = { has_country_flag = hordes_no_at_for_guaranteed_leadership_flag }
			}
			add_army_tradition = -5
		}
	}
	penalties = {
	}
	benefits = {
		general_cost = -0.1
		army_tradition_decay = -0.005
	}
	ai_will_do = {
		factor = 30
	}
}

estate_nomadic_tribes_tribal_host = {
	icon = privilege_raise_host
	max_absolutism = -5
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 1 } }
	loyalty = -0.05
	influence = 0.1
	benefits = {
		global_manpower_modifier = 0.2
	}
	ai_will_do = {
		factor = 1000
		modifier = {
			factor = 0.5
			is_absolutism_active = yes
		}
	}
}

estate_nomadic_tribes_primacy_to_the_bannermen = {
	icon = privilege_royal_authority
	max_absolutism = -5
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 1 } }
	influence = 0.1
	is_valid = {
		OR = {
			primary_culture = manchu
			primary_culture = manchu_new
		}
	}
	penalties = {
		amount_of_banners = -0.25
	}
	benefits = {
		land_morale = 0.1
	}
	ai_will_do = {
		factor = 100
		modifier = {
			factor = 10
			OR = {
				tag = MCH
				tag = MJZ
			}
		}
	}
}

estate_nomadic_tribes_autonomy_of_the_tribes = {
	icon = privilege_land_rights
	max_absolutism = -5
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 1 } }
	influence = 0
	loyalty = 0.1
	land_share = 5
	penalties = {
	}
	benefits = {
	}
	mechanics = {
	}
	modifier_by_land_ownership = {
		religious_unity = 0.5
	}
	ai_will_do = {
		factor = 0
	}
}

#Domination generic Estate Privileges
estate_nomadic_tribes_freedom_of_the_steppes = {
	icon = privilege_development_efficiency
	loyalty = 0.05
	influence = 0.05
	max_absolutism = -5
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 1 } }
	is_valid = {
		has_dlc = "Domination"
	}
	on_granted = {
		custom_tooltip = estate_nomadic_tribes_freedom_of_the_steppes_gt
		tooltip = {
			add_province_modifier = {
				name = estate_nomadic_tribes_freedom_of_the_steppes_mod
				duration = -1
			}
		}
	}
	on_revoked = {
		custom_tooltip = estate_nomadic_tribes_freedom_of_the_steppes_rt
	}
	on_granted_province = {
		if = {
			limit = {
				has_terrain = steppe
			}
			add_province_modifier = {
				name = estate_nomadic_tribes_freedom_of_the_steppes_mod
				duration = -1
			}
		}
	}
	on_invalid_province = {
		if = {
			limit = { has_province_modifier = estate_nomadic_tribes_freedom_of_the_steppes_mod }
			remove_province_modifier = estate_nomadic_tribes_freedom_of_the_steppes_mod
		}
	}
	on_revoked_province = {
		if = {
			limit = { has_province_modifier = estate_nomadic_tribes_freedom_of_the_steppes_mod }
			remove_province_modifier = estate_nomadic_tribes_freedom_of_the_steppes_mod
		}
	}

	mechanics = {
		no_estate_crownland_loss_from_developing
	}
	ai_will_do = {
		factor = 0
	}
}
estate_nomadic_tribes_grant_military_leadership = {
	icon = privilege_army_tradition
	loyalty = 0.05
	influence = 0.05
	max_absolutism = -5
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 1 } }
	is_valid = {
		has_dlc = "Domination"
	}
	can_select = {
	}
	on_granted = {
		enable_estate_action = {
			estate_action = RECRUIT_MINISTER_NOMADIC_TRIBES
		}
	}
	on_revoked = {
		disable_estate_action = {
			estate_action = RECRUIT_MINISTER_NOMADIC_TRIBES
		}
	}
	on_invalid = {
		disable_estate_action = {
			estate_action = RECRUIT_MINISTER_NOMADIC_TRIBES
		}
	}
	ai_will_do = {
		factor = 5
	}
}
estate_nomadic_tribes_military_service = {
	icon = privilege_military
	loyalty = 0.0
	influence = 0.05
	max_absolutism = -5
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 1 } }
	is_valid = {
		has_dlc = "Domination"
	}
	can_select = {
	}
	on_granted = {
		enable_estate_action = {
			estate_action = CONTRIBUTE_WARRIORS_NOMADIC_TRIBES
		}
		enable_estate_action = {
			estate_action = RAISE_HOST_NOMADIC_TRIBES
		}
	}
	on_revoked = {
		disable_estate_action = {
			estate_action = CONTRIBUTE_WARRIORS_NOMADIC_TRIBES
		}
		disable_estate_action = {
			estate_action = RAISE_HOST_NOMADIC_TRIBES
		}
	}
	on_invalid = {
		disable_estate_action = {
			estate_action = CONTRIBUTE_WARRIORS_NOMADIC_TRIBES
		}
		disable_estate_action = {
			estate_action = RAISE_HOST_NOMADIC_TRIBES
		}
	}
	ai_will_do = {
		factor = 1000
	}
}
estate_nomadic_tribes_ensure_tribal_loyalty = {
	icon = privilege_discipline
	loyalty = 0.0
	influence = 0.1
	max_absolutism = -5
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 1 } }
	is_valid = {
		has_dlc = "Domination"
	}
	loyalty_scaled_conditional_modifier = {
		trigger = {
			always = yes
		}
		modifier = {
			stability_cost_modifier = -0.25
		}
	}
	can_select = {
	}
	on_granted = {
		enable_estate_action = {
			estate_action = REDISTRIBUTE_HORDE_AUTHORITY_TRIBES
		}
	}
	on_invalid = {
		disable_estate_action = {
			estate_action = REDISTRIBUTE_HORDE_AUTHORITY_TRIBES
		}
	}
	on_revoked = {
		disable_estate_action = {
			estate_action = REDISTRIBUTE_HORDE_AUTHORITY_TRIBES
		}
	}
	ai_will_do = {
		factor = 10
	}
}
estate_nomadic_tribes_secured_succession = {
	icon = privilege_legitimacy
	loyalty = 0.0
	influence = 0.1
	max_absolutism = -5
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 1 } }
	is_valid = {
		has_dlc = "Domination"
	}
	can_select = {
	}
	on_granted = {
		if = {
			limit = {
				NOT = { has_country_flag = hordes_any_child_can_be_khans_flag }
			}
			custom_tooltip = estate_nomadic_tribes_ensure_tribal_loyalty_gt
		}
		else = {
			custom_tooltip = estate_nomadic_tribes_ensure_tribal_loyalty2_gt
		}
		enable_estate_action = {
			estate_action = SUPPORT_TRIBES_NOMADIC_TRIBES
		}
	}
	on_invalid = {
		custom_tooltip = estate_nomadic_tribes_ensure_tribal_loyalty_rt
		disable_estate_action = {
			estate_action = SUPPORT_TRIBES_NOMADIC_TRIBES
		}
	}
	on_revoked = {
		custom_tooltip = estate_nomadic_tribes_ensure_tribal_loyalty_rt
		disable_estate_action = {
			estate_action = SUPPORT_TRIBES_NOMADIC_TRIBES
		}
	}
	ai_will_do = {
		factor = 1000
	}
}
estate_nomadic_tribes_basqaq_autonomy = {
	icon = privilege_basqaqs
	max_absolutism = -10
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 2 } }
	loyalty = 0.05
	influence = 0.1
	is_valid = {
		has_country_flag = hordes_basqaqs_unlocked_flag
	}
	can_select = {
		NOT = { has_estate_privilege = estate_nobles_basqaq_autonomy }
	}
	penalties = {
		governing_capacity_modifier = -0.1
	}
	
	benefits = {
		monarch_power_tribute = 1
		manpower_recovery_speed = 0.10
	}
	ai_will_do = {
		factor = 0
	}
}

estate_nomadic_tribes_religious_tolerance = {
	icon = privilege_nomadic_tolerance
	max_absolutism = -10
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 2 } }
	loyalty = 0.05
	influence = 0.1
	is_valid = {
		has_country_flag = hordes_religious_tolerance_tribal_privilege_flag
	}
	can_select = {
		NOT = { has_estate_privilege = estate_church_religious_tolerance }
	}
	loyalty_scaled_conditional_modifier = {
		trigger = { always = yes }
		modifier = {
			tolerance_heathen = 1
			tolerance_heretic = 1
		}
	}
	ai_will_do = {
		factor = 0
	}
}

estate_nomadic_tribes_nomadic_caravans = {
	icon = privilege_caravans
	max_absolutism = -5
	conditional_modifier = { trigger = { has_absolutism_reduction_for_estate_privileges = yes } modifier = { max_absolutism = 1 } }
	loyalty = 0.05
	influence = 0.1
	
	is_valid = {
		has_country_flag = hordes_nomadic_caravans_flag
	}
	
	loyalty_scaled_conditional_modifier = {
		trigger = { 
			OR = {
				legitimacy = 90
				meritocracy = 90
				horde_unity = 90
				devotion = 90
				republican_tradition = 90
			}
		}
		modifier = {
			caravan_power = 0.2
			trade_efficiency = 0.05
		}
	}
	ai_will_do = {
		factor = 0
	}
}

estate_nomadic_tribes_tribal_absolutism = {
	icon = privilege_supply_arms
	max_absolutism = 5
	loyalty = -0.1
	influence = -0.05
	
	is_valid = {
		has_country_flag = hordes_tribal_absolutism_flag
	}
	
	on_granted = {
		custom_tooltip = HORDES_TRIBAL_ABSOLUTISM_TT
	}
	
	conditional_modifier = {
		trigger = {
			OR = {
				current_age = age_of_absolutism
				current_age = age_of_revolutions
			}
			has_global_modifier_value = {
				which = max_absolutism
				value = 60
			}
			NOT = {
				has_global_modifier_value = {
					which = max_absolutism
					value = 70
				}
			}
		}
		modifier = {
			available_province_loot = 0.05
		}
	}
	conditional_modifier = {
		trigger = {
			OR = {
				current_age = age_of_absolutism
				current_age = age_of_revolutions
			}
			has_global_modifier_value = {
				which = max_absolutism
				value = 70
			}
			NOT = {
				has_global_modifier_value = {
					which = max_absolutism
					value = 80
				}
			}
		}
		modifier = {
			available_province_loot = 0.1
		}
	}
	conditional_modifier = {
		trigger = {
			OR = {
				current_age = age_of_absolutism
				current_age = age_of_revolutions
			}
			has_global_modifier_value = {
				which = max_absolutism
				value = 80
			}
			NOT = {
				has_global_modifier_value = {
					which = max_absolutism
					value = 90
				}
			}
		}
		modifier = {
			available_province_loot = 0.15
		}
	}
	conditional_modifier = {
		trigger = {
			OR = {
				current_age = age_of_absolutism
				current_age = age_of_revolutions
			}
			has_global_modifier_value = {
				which = max_absolutism
				value = 90
			}
			NOT = {
				has_global_modifier_value = {
					which = max_absolutism
					value = 100
				}
			}
		}
		modifier = {
			available_province_loot = 0.2
		}
	}
	
	ai_will_do = {
		factor = 0
	}
}