estate_nobles =
{
	icon = 2
	
	color = { 200 0 50 }
	
	# Is estate kept in control of province on conquest?
	keep_on_conquest = no
	
	# They want to control at least this % of the country's non-overseas development, if # of home provinecs is above set amount
	min_territory = 10
	min_provinces_to_want_territory = 5
	wanted_territory_modifier = {
		desc = EST_VAL_FEUDAL_MONARCHY
		trigger = {
			government = feudal_monarchy
		}	
		value = 5		
	}
	wanted_territory_modifier = {
		desc = EST_VAL_NOBLE_REPUBLIC
		trigger = {
			government = noble_republic
		}	
		value = 30	
	}	
	
	# If true, country will get estate
	trigger = {	
		NOT = { government = merchant_republic }
		NOT = { government = veche_republic }
		NOT = { government = native_council }
		NOT = { government = trading_city }
		NOT = { government = siberian_native_council }
		NOT = { government = revolutionary_republic }
		NOT = { government = revolutionary_empire }
		NOT = { government = peasants_republic }
		NOT = { government = parliamentary_republic }
		NOT = { government = presidental_republic }
		NOT = { government = parliamentary_monarchy }
		NOT = { government = communist_dictatorship }
		NOT = { government = socialist_republic }
		NOT = { government = fascist_dictatorship }
		NOT = { government = military_junta }
		NOT = { government = imperial_roman_republic }
		NOT = { government = plutocratic_republic }
		OR = {
			NOT = { government = celestial_empire }
			has_dlc = "Mandate of Heaven"
		}
		is_nomad = no
		is_colonial_nation = no
		OR = {
			NOT = { has_dlc = "Common Sense" }
			AND = {
				NOT = { government = english_monarchy }
				NOT = { government = constitutional_monarchy }
				NOT = { government = constitutional_republic }		
			}
		}
	}
	
	# If true, province can be granted to estate
	province_trigger = {
		always = yes
	}	
	
	# Min autonomy in estate provinces
	min_autonomy = 25
	
	# Estate cancels out the following multiplicative local autonomy effects:
	autonomy_does_not_affect = local_manpower_modifier
	autonomy_does_not_affect = land_forcelimit

	country_modifier_happy = {
		manpower_recovery_speed = 0.2 
		land_maintenance_modifier = -0.1
	}
	country_modifier_neutral = {
		manpower_recovery_speed = 0.2 
	}	
	country_modifier_angry = {
		manpower_recovery_speed = -0.1
		land_maintenance_modifier = 0.1
	}
	
	# These do not scale, but only applied in provinces owned by the estate
	province_modifier_happy = {
		local_defensiveness = 0.15
		local_manpower_modifier = 0.2
	}
	province_modifier_neutral = {
		local_manpower_modifier = 0.2
	}	
	province_modifier_angry = {
		local_unrest = 5
	}		
	
	# Influence modifiers
	base_influence = 20
	influence_modifier = {
		desc = EST_VAL_EASTERN_TECH
		trigger = {
			technology_group = eastern
		}	
		influence = 5
	}		
	influence_modifier = {
		desc = EST_VAL_MONARCHY
		trigger = {
			government = monarchy
			NOT = { government = feudal_monarchy }
		}		
		influence = 5
	}
	influence_modifier = {
		desc = EST_VAL_BLACK_ARMY
		trigger = {
			has_country_modifier = hun_black_army
		}		
		influence = -10
	}
	influence_modifier = {
		desc = EST_VAL_CELESTIAL_EMPIRE
		trigger = {
			government = celestial_empire
		}		
		influence = -10
	}
	
	# Influence modifiers from Events:
	influence_modifier = {
		desc = EST_HUN_MAGNATES
		trigger = {
			has_ruler_modifier = hun_power_to_magnates
		}
		influence = 10
	}
	influence_modifier = {
		desc = EST_VAL_OTHER_ESTATE_IN_POWER
		trigger = {
			OR = {
				has_disaster = estate_church_disaster
				has_disaster = estate_burghers_disaster
			}
		}	
		influence = -40
	}
	
	
	# Loyalty modifiers
	loyalty_modifier = {
		desc = EST_VAL_OTHER_ESTATE_IN_POWER_LOY
		trigger = {
			OR = {
				has_disaster = estate_church_disaster
				has_disaster = estate_burghers_disaster
			}
		}
		loyalty = -20
	}
	
	loyalty_modifier = {
		desc = EST_VAL_NOBLE_CONSORT
		trigger = {
			has_dlc = "Rights of Man"
			has_consort = yes
			is_origin_of_consort = ROOT
		}
		loyalty = 5
	}
	
	loyalty_modifier = {
		desc = EST_VAL_JUNKERS
		trigger = {
			government = prussian_monarchy
		}
		loyalty = 10
	}
	
	loyalty_modifier = {
		desc = EST_VAL_VERY_LEGITIMATE
		trigger = {
			government = monarchy
			legitimacy = 95
		}
		loyalty = 10
	}
	loyalty_modifier = {
		desc = EST_VAL_LEGITIMATE
		trigger = {
			government = monarchy
			legitimacy = 70
			NOT = { legitimacy = 95 }
		}
		loyalty = 5
	}
	loyalty_modifier = {
		desc = EST_VAL_NOT_LEGITIMATE
		trigger = {
			government = monarchy
			NOT = { legitimacy = 50 }
			legitimacy = 25
		}
		loyalty = -5
	}
	loyalty_modifier = {
		desc = EST_VAL_ILLEGITIMATE
		trigger = {
			government = monarchy
			NOT = { legitimacy = 25 }
		}
		loyalty = -10
	}
	loyalty_modifier = {
		desc = EST_VAL_FULL_ARISTOCRATIC
		trigger = {
			full_idea_group = aristocracy_ideas
		}
		loyalty = 10
	}
	
	#Alternative naming of estates
	custom_name = {
		desc = estate_beys
		trigger = {
			technology_group = ottoman
		}
	}
	custom_name = {
		desc = estate_boyars
		trigger = {
			OR = {
				culture_group = east_slavic
				primary_culture = bulgarian
				primary_culture = romanian
			}
		}
	}
	custom_name = {
		desc = estate_szlachta
		trigger = {
			OR = {
				primary_culture = polish
				primary_culture = lithuanian
			}
		}
	}
	custom_name = {
		desc = estate_nayaks
		trigger = {
			tag = VIJ
		}
	}
	custom_name = {
		desc = estate_samantas
		trigger = {
			tag = ORI
		}
	}
	custom_name = {
		desc = estate_kshatriyas
		trigger = {
			religion = hinduism
		}
	}
	custom_name = {
		desc = estate_qinwang
		trigger = {
			government = celestial_empire
		}
	}
	custom_name = {
		desc = estate_mansabdars
		trigger = {
			tag = MUG
		}
	}
	custom_name = {
		desc = estate_tetecuhtin
		trigger = {
			religion = nahuatl
		}
	}
	custom_name = {
		desc = estate_andriana
		trigger = {
			tag = MIR
		}
	}
	custom_name = {
		desc = estate_amirs
		trigger = {
			religion_group = muslim
			NOT = { technology_group = ottoman } #Should possibly be more restricted
		}
	}
	custom_name = {
		desc = estate_planters
		trigger = {
			tag = USA
		}
	}
	custom_name = {
		desc = estate_bushi
		trigger = {
			culture_group = japanese_g
		}
	}

	# Does the AI want to give any extra territory beyond the minimum?
	ai_territory_modifier = {
		trigger = {
			has_idea_group = aristocracy_ideas
			num_of_cities = 10
		}	
		value = 5		
	}
	ai_territory_modifier = {
		trigger = {
			has_idea_group = influence_ideas
			num_of_cities = 10
		}	
		value = 5		
	}		
	
	# For province assignment
	ai_grant_province = {
		factor = 1	
		modifier = {
			factor = 0.5
			development = 20
		}
		modifier = {
			factor = 2
			NOT = { development = 10 }
		}				
		modifier = {
			factor = 0.1
			has_estate = estate_cossacks
			has_terrain = steppe
		}
		modifier = {
			factor = 0.75
			has_owner_culture = yes
		}
		modifier = {
			factor = 0.75
			province_trade_power = 5
		}			
		modifier = {
			factor = 0.75
			province_trade_power = 10
		}			
	}	
	
	# Special interactions
	interaction = {
		name = "CALL_DIET"
		icon = 1
		
		years_between_use = 20
		
		trigger = {
			always = yes
		}
		
		effect = {
			add_prestige = -5
			add_estate_loyalty = {
				estate = estate_nobles
				loyalty = 15
			}
			add_estate_influence_modifier = {
				estate = estate_nobles
				desc = EST_VAL_DIET_HELD
				influence = 10
				duration = 7300
			}
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				estate_influence = {
					estate = estate_nobles
					influence = 60
				}				
			}
			modifier = {
				factor = 0
				estate_loyalty = {
					estate = estate_nobles
					loyalty = 30
				}				
			}			
		}
	}
	interaction = {
		name = "GRANT_GENERALSHIP"
		icon = 5
		
		years_between_use = 10
		
		potential = {
			NOT = { has_disaster = estate_church_disaster }
			NOT = { has_disaster = estate_burghers_disaster }
		}
		
		trigger = {
			estate_loyalty = {
				estate = estate_nobles
				loyalty = 30
			}	
			estate_influence = {
				estate = estate_nobles
				influence = 40
			}			
		}
		
		effect = {
			create_general = 40		
			add_estate_influence_modifier = {
				estate = estate_nobles
				desc = EST_VAL_GRANTED_GENERALSHIP
				influence = 20
				duration = 3650
			}
		}
		
		ai_will_do = {
			factor = 0
		}
	}
	interaction = {
		name = "RECRUIT_CONQUISTADOR_ESTATES"
		icon = 19
		
		years_between_use = 15
		
		potential = {
			has_idea = quest_for_the_new_world
			NOT = { has_disaster = estate_church_disaster }
			NOT = { has_disaster = estate_burghers_disaster }
		}
		
		trigger = {
			estate_loyalty = {
				estate = estate_nobles
				loyalty = 30
			}	
			estate_influence = {
				estate = estate_nobles
				influence = 40
			}
		}
		
		effect = {
			create_conquistador = 40		
			add_estate_influence_modifier = {
				estate = estate_nobles
				desc = EST_VAL_RECRUITED_CONQUISTADOR
				influence = 15
				duration = 5475
			}
		}
		
		ai_will_do = {
			factor = 0
		}
	}
	interaction = {
		name = "DEMAND_SUPPORT_NOBLES"
		icon = 4
		
		years_between_use = 20
		
		potential = {
			NOT = { has_disaster = estate_church_disaster }
			NOT = { has_disaster = estate_burghers_disaster }
		}
		
		trigger = {		
			estate_loyalty = {
				estate = estate_nobles
				loyalty = 30
			}	
			estate_influence = {
				estate = estate_nobles
				influence = 25
			}			
		}
		
		effect = {
			if = {
				limit = {
					NOT = {
						estate_influence = {
							estate = estate_nobles
							influence = 50
						}	
					}
				}
				add_mil_power = 50
			}
			if = {
				limit = {
					estate_influence = {
						estate = estate_nobles
						influence = 50
					}
					NOT = {
						estate_influence = {
							estate = estate_nobles
							influence = 75
						}	
					}
				}
				add_mil_power = 100
			}
			if = {
				limit = {
					estate_influence = {
						estate = estate_nobles
						influence = 75
					}
					NOT = {
						estate_influence = {
							estate = estate_nobles
							influence = 100
						}	
					}
				}
				add_mil_power = 150
			}
			if = {
				limit = {
					estate_influence = {
						estate = estate_nobles
						influence = 100
					}
				}
				add_mil_power = 200
			}				
			add_estate_loyalty = {
				estate = estate_nobles
				loyalty = -20
			}
		}
		
		ai_will_do = {
			factor = 0
		}
	}
	interaction = {
		name = "RECRUIT_MINISTER"
		icon = 10
		
		years_between_use = 30
		
		potential = {
			NOT = { has_disaster = estate_church_disaster }
			NOT = { has_disaster = estate_burghers_disaster }
		}
		
		trigger = {
			estate_influence = {
				estate = estate_nobles
				influence = 40
			}
		}
		
		effect = {
			if = {
				limit = {
					monthly_income = 25
				}
				define_advisor = {
					type = diplomat
					skill = 3
					discount = yes
				}
			}
			if = {
				limit = { NOT = { monthly_income = 25 } }
				define_advisor = {
					type = diplomat
					skill = 2
					discount = yes
				}
			}
			add_estate_influence_modifier = {
				estate = estate_nobles
				desc = EST_VAL_NOBLES_MINISTER
				influence = 15
				duration = 10950
			}
		}
		
		ai_will_do = {
			factor = 0
		}
	}
	interaction = {
		name = "DEMAND_MORE_TROOPS"
		icon = 12
		
		years_between_use = 25
		
		potential = {
			NOT = { has_disaster = estate_church_disaster }
			NOT = { has_disaster = estate_burghers_disaster }
		}
		
		trigger = {
			estate_loyalty = {
				estate = estate_nobles
				loyalty = 30
			}
			estate_influence = {
				estate = estate_nobles
				influence = 40
			}
		}
		
		effect = {
			if = {
				limit = {
					NOT = {
						estate_influence = {
							estate = estate_nobles
							influence = 50
						}	
					}
				}
				add_yearly_manpower = 1
			}
			if = {
				limit = {
					estate_influence = {
						estate = estate_nobles
						influence = 50
					}
					NOT = {
						estate_influence = {
							estate = estate_nobles
							influence = 75
						}	
					}
				}
				add_yearly_manpower = 1.5
			}
			if = {
				limit = {
					estate_influence = {
						estate = estate_nobles
						influence = 75
					}
					NOT = {
						estate_influence = {
							estate = estate_nobles
							influence = 100
						}	
					}
				}
				add_yearly_manpower = 2
			}
			if = {
				limit = {
					estate_influence = {
						estate = estate_nobles
						influence = 100
					}
				}
				add_yearly_manpower = 2.5
			}	
			add_estate_loyalty = {
				estate = estate_nobles
				loyalty = -15
			}
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOT = {
					estate_loyalty = {
						estate = estate_nobles
						loyalty = 50
					}	
				}
			}
			modifier = {
				factor = 0
				manpower_percentage = 0.25				
			}
			modifier = {
				factor = 0
				is_at_war = no
			}			
		}
	}
}