# Tribal
# local_hostile_attrition = 3.5
# local_autonomy = -0.025
# local_ship_repair = 0.50
# local_gold_depletion_chance_modifier = -1.0
# local_build_time = -0.50
# province_trade_power_modifier = 0.10
# local_production_efficiency = 0.10
# local_development_cost_modifier = -0.15
# local_culture_conversion_time = -0.25

es_encourage_resettlement_programs = {
	potential = { government = tribal }
	allow = { always = yes }
	modifier = { local_culture_conversion_time = -0.25 }
	color = { 119 195 89 }
	
	#ROOT - Country, FROM - Province, if all provinces in a state, that are owned by the country, meet this requirement, the alert will appear.
	notify_trigger = {
		FROM = {
			has_owner_culture = yes
		}
	}
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			all_province_in_state = {
				culture = ROOT
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				NOT = { culture = ROOT }
			}
		}
	}
}

es_aid_developing_villages = {
	potential = { government = tribal }
	allow = { always = yes }
	modifier = { local_development_cost_modifier = -0.15 }
	color = { 224 141 56 }
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			all_province_in_state = {
				development = 10
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				NOT = { development = 10 }
			}
		}
	}
}

es_support_local_craftsmen = {
	potential = { government = tribal }
	allow = { always = yes }
	modifier = { local_production_efficiency = 0.10 }
	color = { 127 184 236 }
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			all_province_in_state = {
				NOT = { base_production = 3 }
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				base_production = 5
			}
		}
	}
}

es_expand_marketplaces = {
	potential = { government = tribal }
	allow = { always = yes }
	modifier = { province_trade_power_modifier = 0.10 }
	color = { 103 157 118 }
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			any_province_in_state = {
				NOT = { province_has_center_of_trade_of_level = 2 }
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				province_has_center_of_trade_of_level = 3
			}
		}
	}
}

es_use_local_materials = {
	potential = { government = tribal }
	allow = { always = yes }
	modifier = { local_build_time = -0.50 }
	color = { 241 199 120 }
	
	#ROOT - Country, FROM - Province, if all provinces in a state, that are owned by the country, meet this requirement, the alert will appear.
	notify_trigger = {
		FROM = {
			NOT = { num_free_building_slots = 1 }
		}
	}
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			all_province_in_state = {
				NOT = { num_free_building_slots = 1 }
			}
		}
		modifier = {
			factor = 0
			owner = {
				is_at_war = yes
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				construction_progress = 0.1
			}
		}
	}
}

es_limit_extraction_of_gold = {
	potential = { government = tribal }
	allow = { always = yes }
	modifier = { local_gold_depletion_chance_modifier = -1.0 }
	color = { 202 178 32 }
	
	#ROOT - Country, FROM - Province, if all provinces in a state, that are owned by the country, meet this requirement, the alert will appear.
	notify_trigger = {
		FROM = {
			NOT = { trade_goods = gold }
		}
	}
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			all_province_in_state = {
				NOT = { trade_goods = gold }
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				trade_goods = gold
				base_production = 5
			}
		}
	}
}

es_inhabit_coastline = {
	potential = { government = tribal }
	allow = { always = yes }
	modifier = { local_ship_repair = 0.50 }
	color = { 8 157 151 }
	
	#ROOT - Country, FROM - Province, if all provinces in a state, that are owned by the country, meet this requirement, the alert will appear.
	notify_trigger = {
		FROM = {
			NOT = { has_port = yes }
		}
	}
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			all_province_in_state = {
				NOT = { has_port = yes }
			}
		}
		modifier = {
			factor = 5
			owner = {
				navy_size_percentage = 0.95
			}
		}
	}
}

es_curtail_local_cheifs = {
	potential = { government = tribal }
	allow = { always = yes }
	modifier = { local_autonomy = -0.025 }
	color = { 204 224 184 }
	
	#ROOT - Country, FROM - Province, if all provinces in a state, that are owned by the country, meet this requirement, the alert will appear.
	notify_trigger = {
		FROM = {
			NOT = { local_autonomy = 25 }
		}
	}
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			all_province_in_state = {
				NOT = { local_autonomy = 35 }
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				local_autonomy = 75
			}
		}
	}
}

es_organize_guarilla_resistance = {
	potential = { government = tribal }
	allow = { always = yes }
	modifier = { local_hostile_attrition = 3.5 }
	color = { 163 97 18 }
	
	#ROOT - Country, FROM - Province, if all provinces in a state, that are owned by the country, meet this requirement, the alert will appear.
	notify_trigger = {
		NOT = { is_at_war = yes }
	}
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			owner = {
				NOT = { is_at_war = yes }
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				NOT = { controlled_by = ROOT }
			}
		}
	}
}