estate_nobles = {
	icon = 2

	# If true, country will get estate
	trigger = {
		#NOT = { has_government_attribute = is_merchant_republic }
		#NOT = { has_reform = veche_republic }
		#NOT = { has_reform = trading_city }
		NOT = { has_government_attribute = disables_estate_nobles }
		NOT = { has_disabled_estate = { estate = estate_nobles } }
		OR = {
			has_government_attribute = enables_estate_nobles
			has_enabled_estate = { estate = estate_nobles }
			has_unlocked_estate = { estate = estate_nobles }
			AND = {
				NOT = { has_government_attribute = is_pirate_republic_reform }
				NOT = { government = native }
				NOT = { has_reform = siberian_tribe }
				NOT = { is_revolutionary_republic_trigger = yes }
				NOT = { has_reform = revolutionary_empire_reform }
				NOT = { has_reform = peasants_republic }
				NOT = { has_reform = american_republic }
				NOT = { has_reform = federal_republic }
				NOT = { has_reform = roman_empire_reform }
				NOT = { has_reform = multi_party_system }
				NOT = { has_reform = single_party_system }
				NOT = { has_reform = military_government }
				NOT = { has_reform = communist_government }
				NOT = { has_reform = fascist_government }
				is_nomad = no
				is_colonial_nation = no
				if = {
					limit = {
						NOT = { religion_group = muslim }
						NOT = { religion = sikhism }
						NOT = { religion = buddhism }
						NOT = { religion = vajrayana }
						NOT = { religion = mahayana }
					}
					NOT = { has_estate = estate_maratha }
					NOT = { has_estate = estate_rajput }
				}
			}
		}
		#OR = {
		#	NOT = { has_reform = celestial_empire }
		#	has_dlc = "Mandate of Heaven"
		#}
	}

	country_modifier_happy = {
		manpower_recovery_speed = 0.2 
		land_maintenance_modifier = -0.1
		monthly_support_heir_gain = 0.1
		rr_royalists_influence = 0.2
		
		monthly_mandala_domination_gov_mech = 0.05		#added MMETR
	}
	country_modifier_neutral = {
		manpower_recovery_speed = 0.2 
		rr_royalists_influence = 0.1
	}	
	country_modifier_angry = {
		manpower_recovery_speed = -0.1
		land_maintenance_modifier = 0.1
		monthly_support_heir_gain = -0.2
		global_unrest = 2
		rr_royalists_influence = -0.1
		
		monthly_mandala_domination_gov_mech = -0.05		#added MMETR
	}
	land_ownership_modifier = {
		nobles_loyalty_modifier = 0.2
	}

	province_independence_weight = {
		factor = 1
		modifier = {
			factor = 1.5
			culture_group = owner
			religion_group = owner
		}
		modifier = {
			factor = 1.5
			base_manpower = 5
		}
		modifier = {
			factor = 0.75
			development = 20
		}
		modifier = {
			factor = 0.5
			NOT = { is_state_core = owner }
		}
	}

	# Influence modifiers
	base_influence = 10
	influence_modifier = {
		desc = EST_VAL_EASTERN_TECH
		trigger = {
			technology_group = eastern
		}	
		influence = 5
	}
	
	# 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 = {
			has_any_estate_disaster_active = yes
			has_not_own_estate_disaster_active = { estate = estate_nobles }
		}	
		influence = -40
	}
	
	loyalty_modifier = {
		desc = EST_VAL_OTHER_ESTATE_IN_POWER_LOY
		trigger = {
			has_any_estate_disaster_active = yes
			has_not_own_estate_disaster_active = { estate = estate_nobles }
		}
		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
	}
	
	# Great Peasants' War Modifiers
	
	influence_modifier = {
		desc = EST_VAL_GREAT_PEASANTS_WAR_NOBLES_WIN_MINOR_INFLUENCE
		trigger = {
			has_global_flag = gpw_nobles_win_minor
			is_part_of_hre = yes
		}
		influence = 5
	}
	
	loyalty_modifier = {
		desc = EST_VAL_GREAT_PEASANTS_WAR_NOBLES_WIN_MINOR_LOYALTY
		trigger = {
			has_global_flag = gpw_nobles_win_minor
			is_part_of_hre = yes
		}
		loyalty = 5
	}
	
	influence_modifier = {
		desc = EST_VAL_GREAT_PEASANTS_WAR_NOBLES_WIN_MAJOR_INFLUENCE
		trigger = {
			has_global_flag = gpw_nobles_win_major
			is_part_of_hre = yes
		}
		influence = 10
	}
	
	loyalty_modifier = {
		desc = EST_VAL_GREAT_PEASANTS_WAR_NOBLES_WIN_MAJOR_LOYALTY
		trigger = {
			has_global_flag = gpw_nobles_win_major
			is_part_of_hre = yes
		}
		loyalty = 10
	}
	
	influence_modifier = {
		desc = EST_VAL_GREAT_PEASANTS_WAR_NOBLES_LOSE_MINOR_INFLUENCE
		trigger = {
			has_global_flag = gpw_peasants_win_minor
			is_part_of_hre = yes
		}
		influence = -5
	}
	
	loyalty_modifier = {
		desc = EST_VAL_GREAT_PEASANTS_WAR_NOBLES_LOSE_MINOR_LOYALTY
		trigger = {
			has_global_flag = gpw_peasants_win_minor
			is_part_of_hre = yes
		}
		loyalty = -5
	}
	
	influence_modifier = {
		desc = EST_VAL_GREAT_PEASANTS_WAR_NOBLES_LOSE_MAJOR_INFLUENCE
		trigger = {
			has_global_flag = gpw_peasants_win_major
			is_part_of_hre = yes
		}
		influence = -10
	}
	
	loyalty_modifier = {
		desc = EST_VAL_GREAT_PEASANTS_WAR_NOBLES_LOSE_MAJOR_LOYALTY
		trigger = {
			has_global_flag = gpw_peasants_win_major
			is_part_of_hre = yes
		}
		loyalty = -10
	}
	
	#Alternative naming of estates
	custom_name = {
		desc = estate_mamluks
		trigger = {
			tag = MAM
		}
	}
	custom_name = {
		desc = estate_imperial_nobility
		trigger = {
			has_reform = revolutionary_empire_reform
		}
	}
	custom_name = {
		desc = estate_oyo_mesi
		trigger = {
			tag = OYO
		}
	}
	custom_name = {
		desc = estate_eugeneis
		trigger = {
			tag = BYZ
			culture_group = byzantine
		}
	}
	custom_name = {
		desc = estate_nakomse
		trigger = {
			primary_culture = mossi
			religion = shamanism
		}
	}
	custom_name = {
		desc = estate_chieftains
		trigger = {
			has_reform = tribal_confederacy
		}
	}
	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_timawa
		trigger = {
			tag = MAS
		}
	}
	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_barbarians_tribal_leaders
		trigger = {
			has_reform = barbarian_reform
		}
	}
	custom_name = {
		desc = estate_qinwang
		trigger = {
			has_reform = celestial_empire
		}
	}
	custom_name = {
		desc = estate_mansabdars
		trigger = {
			OR = {
				tag = MUG
				has_government_attribute = enable_mansabdar_privileges
			}
		}
	}
	custom_name = {
		desc = estate_pakoyoq
		trigger = {
			primary_culture = inca
		}
	}
	custom_name = {
		desc = estate_almahen
		trigger = {
			is_mayan_society_trigger = yes
		}
	}
	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
		}
	}
	custom_name = {
		desc = estate_yangban_administrators
		trigger = {
			tag = KOR
			religion = confucianism
		}
	}
	custom_name = {
		desc = estate_junkers
		trigger = {
			OR = {
				has_reform = prussian_republic_reform
				has_reform = prussian_monarchy_base
				has_reform = prussian_monarchy
				tag = GER
			}
		}
	}
	custom_name = {
		desc = estate_alii
		trigger = {
			OR = {
				capital_scope = {
					area = northern_polynesia_area
				}
				tag = SAM
			}
			primary_culture = polynesian
			religion = animism
		}
	}
	custom_name = {
		desc = estate_rangatira
		trigger = {
			primary_culture = maori
			religion = animism
		}
	}
	custom_name = {
		desc = estate_eiki
		trigger = {
			tag = TOG
			primary_culture = polynesian
			religion = animism
		}
	}
	custom_name = {
		desc = estate_ratu
		trigger = {
			OR = {
				tag = LAI
				tag = VIL
				tag = VNL
			}
			religion = animism
		}
	}
	custom_name = {
		desc = estate_warriors
		trigger = {
			OR = {
				government = native
				has_reform = siberian_tribe
				has_reform = native_basic_reform
			}
		}
	}
	custom_name = {
		desc = estate_mani
		trigger = {
			tag = KON
		}
	}
	
	color = { 200 0 50 }
	
	privileges = {
		barbarian_always_war
		free_raids_barbarians
		estate_nobles_land_rights
		estate_nobles_nobility_primacy
		estate_nobles_officer_corp
		estate_nobles_levies
		estate_nobles_advisors
		estate_nobles_right_of_counsel
		estate_nobles_french_strong_duchies
		estate_nobles_supremacy_over_crown
		estate_nobles_junker_primacy
		estate_nobles_strong_duchies
		estate_nobles_golden_liberty
		estate_nobles_veto_heir_apparent
		estate_nobles_nieszawa_privileges
		estate_nobles_pacta_conventa
		estate_nobles_monopoly_of_metals
		estate_nobles_monopoly_of_livestock
		estate_nobles_monopoly_of_gems
		estate_nobles_statutory_rights
		estate_nobles_command_of_the_military
		estate_nobles_better_integration
		estate_nobles_cawa_peace_keepers
		estate_nobles_cawa_offensive_fighters
		estate_nobles_neighbor_raids
		estate_nobles_decentralized_tribe
		estate_nobles_tribe_unification
		estate_nobles_tribe_centralization
		estate_nobles_grant_power_to_the_bashorun
		estate_nobles_danish_nobility
		estate_nobles_nobles_instead_of_royal_court
		estate_nobles_leidang_conscription
		estate_nobles_carolean_march
		estate_nobles_carolean_charge
		estate_nobles_religious_conscription
		estate_nobles_leidang_mass_conscription
		estate_nobles_leidang_elite_conscription
		estate_nobles_sponsor_hussars
		estate_nobles_mansabdari_cav_maintenance
		estate_nobles_mansabdari_military_service
		estate_nobles_mansabdari_royal_rule
		estate_nobles_mestnichestvo
		estate_nobles_early_serfdom
		estate_nobles_legalized_serfdom
		estate_nobles_total_serfdom
		estate_nobles_restricted_serfdom
		estate_nobles_devastating_serfdom
		estate_nobles_increased_peasant_freedom
		estate_nobles_peasant_liberation
		estate_nobles_rynda
		estate_nobles_landed_army
		estate_nobles_factionalist_nobility
		estate_nobles_consolidated_noble_contracts
		estate_nobles_english_villeinage
		estate_nobles_english_copyhold_tenure
		estate_nobles_development_of_castles
		estate_nobles_statesman_servitude
		estate_nobles_royal_court_tasks
		estate_nobles_diet_right
		estate_nobles_force_conscription
		estate_nobles_noble_officer_right
		estate_nobles_expedition_rights
		estate_nobles_highland_fortifications
		estate_nobles_emirs_of_baghdad
		estate_nobles_deteriorating_army
		estate_nobles_defensive_policy
		estate_nobles_tofangchi_regiment
		estate_nobles_tupchi_artillery_corps
		estate_nobles_qurchi_service
		estate_nobles_mamlukian_administration
		estate_nobles_enlist_the_mamluks
		estate_nobles_vegvar_system
		estate_nobles_ITA_military_governors
		estate_nobles_GER_diploma_andreanum
		estate_nobles_orangist_privileges
		estate_nobles_MAY_arm_nobles_with_obsidian_blades
		estate_nobles_MAY_spread_dynastic_influence
		estate_nobles_AZT_triple_alliance
		estate_nobles_AZT_warrior_culture
		estate_nobles_reformatio_sigismundi
		estate_nobles_basqaq_autonomy
		estate_nobles_habsburg_disunity
		estate_nobles_hab_habsburg_connections
		estate_nobles_imperial_war_leader
		estate_nobles_melting_pot_of_cultures
		estate_nobles_hab_von_raab_restructions
		estate_nobles_TIM_soyurghal_grants
		estate_nobles_TIM_chagatai_warriors
		estate_nobles_TIM_appease_the_elites
		estate_nobles_MUG_development_of_the_subah
		estate_nobles_four_class_system
		estate_nobles_hungarian_nobility_privileges
		estate_nobles_austrian_nobility_privileges
		
		#New added MMETR
		estate_queens_once_slaves_francia
	}

	agendas = {
		estate_nobles_develop_x
		estate_nobles_build_army_building_in_y
		estate_nobles_build_fort_building_in_y
		estate_nobles_build_university_in_y
		estate_nobles_build_manufactory_in_y
		estate_nobles_get_allies
		estate_nobles_befriend_rival_of_rival
		estate_nobles_restore_legitimacy
		estate_nobles_relations_with_X
		estate_nobles_break_coalition
		estate_nobles_condottieri_rivals
		estate_nobles_support_independence
		estate_nobles_retake_core
		estate_nobles_crush_revolts
		estate_nobles_regain_liberty
		estate_nobles_convert_province_culture
		estate_nobles_protect_our_culture
		estate_nobles_vassalise_vulnerable_country
		estate_nobles_expand_into_x
		estate_nobles_complete_conquest_of_x
		estate_nobles_annex_subject
		estate_nobles_build_an_army
		estate_nobles_bigger_army_than_rival
		estate_nobles_build_up_manpower_reserves
		estate_nobles_recover_abysmal_prestige
		estate_nobles_improve_prestige
		estate_nobles_hire_advisor
		estate_nobles_fire_advisor
		estate_nobles_mam_three_privileges 
		estate_nobles_mam_recruit_mamluks 
		estate_nobles_mam_develop_military_infrastructure 
		estate_nobles_mam_increase_army_tradition 
		estate_nobles_mam_increase_army_professionalism 
		estate_nobles_mam_focus_on_military_matters
	}
	
	influence_from_dev_modifier = 1.0
}