country_decisions = {

	maratha_nation = {
		major = yes
		potential = {
			normal_or_historical_nations = yes
			was_never_end_game_tag_trigger = yes
			NOT = { has_country_flag = formed_maratha_flag }
			OR = {
				ai = no
				is_playing_custom_nation = no
			}
			NOT = { tag = MAR }
			OR = {
				NOT = { exists = MAR }
				ai = no
			}
			primary_culture = marathi
			OR = {
				ai = no
				AND = {
					ai = yes
					num_of_cities = 10
				}
			}
			is_colonial_nation = no
			OR = {
				is_former_colonial_nation = no
				AND = {
					is_former_colonial_nation = yes
					ai = no
				}
			}
			
			#New added in MMETR, prevents appearing too early - historically various groups merged as the caste in 17th century
			is_year = 1400
		}
		provinces_to_highlight = {
			OR = {
				province_id = 516 #Broach
				province_id = 546 #Nagpur
				province_id = 1946 #Satara
				province_id = 2033 #Savanur
				province_id = 2034 #Pune
				province_id = 4429 #Rajapur
				province_id = 2026 #Tanjore
				province_id = 4431 #Kolhapur
			}
			OR = {
				NOT = { owned_by = ROOT }
				NOT = { is_core = ROOT }
			}
		}
		allow = {
			NOT = { exists = MAR }
			is_at_war = no
			adm_tech = 20
			is_free_or_tributary_trigger = yes
			owns_core_province = 546 #Nagpur
			owns_core_province = 1946 #Satar
			owns_core_province = 2033 #Savanur
			owns_core_province = 2034 #Pune
			owns_core_province = 4429 #Rajapur
			owns_core_province = 4431 #Kolhapur
			OR = {
				owns_core_province = 2026 #Tanjore
				owns_core_province = 516 #Broach
			}
		}
		effect = {
			change_tag = MAR
			on_change_tag_effect = yes
			deccan_region = {
				limit = {
					NOT = { owned_by = ROOT }
				}
				add_permanent_claim = MAR
			}
			west_india_region = {
				limit = {
					NOT = { owned_by = ROOT }
				}
				add_permanent_claim = MAR
			}
			add_prestige = 25
			if = {
				limit = {
					NOT = { technology_group = indian }
				}
				change_technology_group = indian
				change_unit_type = indian
			}
			if = {
				limit = { 
					has_custom_ideas = no
					NOT = { has_idea_group = MAR_ideas }
				}
				country_event = { id = ideagroups.1 } #Swap Ideas
			}
			set_country_flag = formed_maratha_flag
		}
		ai_will_do = {
			factor = 1
		}
		ai_importance = 400
	}

}
