#######################################################################################
###		Support technologies
#######################################################################################

@PR_engineers = 850
@PR_armored_engineer = 1100
@PR_recon = 100
@PR_military_police = 800
@PR_maintenance = 690
@PR_field_hospital = 800
@PR_logistics = 850
@PR_signal = 100
@PR_train = 1000
@PR_railway_gun = 100

EAI_PR_STRATEGIES_support_technologies = {

	EAI_PR_STRATEGIES_engineers = yes
	EAI_PR_STRATEGIES_recon = yes
	EAI_PR_STRATEGIES_military_police = yes
	EAI_PR_STRATEGIES_maintenance = yes
	EAI_PR_STRATEGIES_field_hospital = yes
	EAI_PR_STRATEGIES_logistics = yes
	EAI_PR_STRATEGIES_signal = yes
	EAI_PR_STRATEGIES_train = yes
	EAI_PR_STRATEGIES_railway_gun = yes
	EAI_PR_STRATEGIES_armored_engineer = yes
}

EAI_PR_STRATEGIES_engineers = {

	if = { 
		limit = { 
			EAI_engineer_tech_focus = yes
		}

		set_temp_variable = { prio_cat = @PR_engineers }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### tech_support
	
		if = { limit = { set_temp_variable = { _prio_tech = token:tech_support } set_temp_variable = { _prio_val = prio_cat }

			OR = {
				date > 1938.1.1
				has_war = yes
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_engineers

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_engineers } set_temp_variable = { _prio_val = prio_cat }

			OR = {
				date > 1938.1.1
				has_war = yes
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_engineers2

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_engineers2 } set_temp_variable = { _prio_val = prio_cat }

			date > 1939.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_engineers3

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_engineers3 } set_temp_variable = { _prio_val = prio_cat }

			date > 1942.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_engineers4

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_engineers4 } set_temp_variable = { _prio_val = prio_cat }

			date > 1945.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_armored_engineer = {

	if = { 
		limit = { 
			EAI_armored_engineer_tech_focus = yes
		}

		set_temp_variable = { prio_cat = @PR_armored_engineer }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### tech_support
	
		if = { limit = { set_temp_variable = { _prio_tech = token:tech_support } set_temp_variable = { _prio_val = prio_cat }

			OR = {
				date > 1938.1.1
				has_war = yes
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_engineers

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_engineers } set_temp_variable = { _prio_val = prio_cat }

			OR = {
				date > 1938.1.1
				has_war = yes
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### sp_armored_engineer_tech

		if = { limit = { set_temp_variable = { _prio_tech = token:sp_armored_engineer_tech } set_temp_variable = { _prio_val = prio_cat }

			OR = {
				date > 1938.1.1
				has_war = yes
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_recon = {

	if = { 
		limit = { 
			EAI_recon_tech_focus = yes
		}

		set_temp_variable = { prio_cat = @PR_recon }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### tech_support
	
		if = { limit = { set_temp_variable = { _prio_tech = token:tech_support } set_temp_variable = { _prio_val = prio_cat }

			date > 1938.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_recon

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_recon } set_temp_variable = { _prio_val = prio_cat }

			date > 1938.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_recon2

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_recon2 } set_temp_variable = { _prio_val = prio_cat }

			date > 1939.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_recon3

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_recon3 } set_temp_variable = { _prio_val = prio_cat }

			date > 1942.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_recon4

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_recon4 } set_temp_variable = { _prio_val = prio_cat }

			date > 1945.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_military_police = {

	if = { 
		limit = { 
			num_occupied_states > 10
		}

		set_temp_variable = { prio_cat = @PR_military_police }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### tech_support
	
		if = { limit = { set_temp_variable = { _prio_tech = token:tech_support } set_temp_variable = { _prio_val = prio_cat }

			date > 1938.1.1
			multiply_temp_variable = { _prio_val = 1.25 }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_military_police

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_military_police } set_temp_variable = { _prio_val = prio_cat }

			date > 1938.1.1
			multiply_temp_variable = { _prio_val = 1.25 }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_military_police2

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_military_police2 } set_temp_variable = { _prio_val = prio_cat }

			date > 1939.1.1
			always = no
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_military_police3

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_military_police3 } set_temp_variable = { _prio_val = prio_cat }

			date > 1942.1.1
			always = no
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_military_police4

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_military_police4 } set_temp_variable = { _prio_val = prio_cat }

			date > 1945.1.1
			always = no
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_maintenance = {

	if = { 
		limit = { 
			OR = {
				EAI_MARM_tech_focus = yes
				EAI_HARM_tech_focus = yes
			}
			is_major = yes
		}

		set_temp_variable = { prio_cat = @PR_maintenance }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### tech_support
	
		if = { limit = { set_temp_variable = { _prio_tech = token:tech_support } set_temp_variable = { _prio_val = prio_cat }

			date > 1938.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_maintenance_company

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_maintenance_company } set_temp_variable = { _prio_val = prio_cat }

			date > 1938.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_maintenance_company2

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_maintenance_company2 } set_temp_variable = { _prio_val = prio_cat }

			date > 1939.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_maintenance_company3

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_maintenance_company3 } set_temp_variable = { _prio_val = prio_cat }

			date > 1942.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_maintenance_company4

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_maintenance_company4 } set_temp_variable = { _prio_val = prio_cat }

			date > 1945.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_field_hospital = {

	if = { 
		limit = { 
			EAI_hospital_tech_focus = yes
		}

		set_temp_variable = { prio_cat = @PR_field_hospital }

		############################
		# Strategies
		############################

		if = { 
			limit = { 
				EAI_MODE_challenging = yes
				EAI_STRATEGY_mass_infantry = yes
				date > 1940.1.1
				check_variable = { EAI_FOCUS/LAND/infantry_width = global.EAI_40W_INF_WIDTH }
			}

			multiply_temp_variable = { prio_cat = 1000 }
		}

		############################

		### tech_support
	
		if = { limit = { set_temp_variable = { _prio_tech = token:tech_support } set_temp_variable = { _prio_val = prio_cat }

			OR = {
				date > 1938.1.1
				has_war = yes
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_field_hospital

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_field_hospital } set_temp_variable = { _prio_val = prio_cat }

			OR = {
				date > 1938.1.1
				has_war = yes
			}
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_field_hospital2

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_field_hospital2 } set_temp_variable = { _prio_val = prio_cat }

			date > 1939.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_field_hospital3

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_field_hospital3 } set_temp_variable = { _prio_val = prio_cat }

			date > 1942.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_field_hospital4

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_field_hospital4 } set_temp_variable = { _prio_val = prio_cat }

			date > 1945.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_logistics = {

	if = { 
		limit = { 
			EAI_logistics_tech_focus = yes
		}

		set_temp_variable = { prio_cat = @PR_logistics }

		############################
		# Strategies
		############################

		if = { 
			limit = { 
				EAI_MODE_challenging = yes
				EAI_STRATEGY_mass_infantry = yes
				date > 1940.1.1
				check_variable = { EAI_FOCUS/LAND/infantry_width = global.EAI_40W_INF_WIDTH }
			}

			multiply_temp_variable = { prio_cat = 1000 }
		}

		############################

		### tech_support
	
		if = { limit = { set_temp_variable = { _prio_tech = token:tech_support } set_temp_variable = { _prio_val = prio_cat }

			OR = {
				date > 1938.1.1
				has_war = yes
			}

			set_temp_variable = { _year = 1938 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_logistics_company

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_logistics_company } set_temp_variable = { _prio_val = prio_cat }

			OR = {
				date > 1938.1.1
				has_war = yes
			}

			set_temp_variable = { _year = 1938 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_logistics_company2

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_logistics_company2 } set_temp_variable = { _prio_val = prio_cat }

			date > 1939.1.1

			set_temp_variable = { _year = 1939 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_logistics_company3

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_logistics_company3 } set_temp_variable = { _prio_val = prio_cat }

			date > 1942.1.1

			set_temp_variable = { _year = 1942 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_logistics_company4

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_logistics_company4 } set_temp_variable = { _prio_val = prio_cat }

			date > 1945.1.1

			set_temp_variable = { _year = 1945 }
			if = { limit = { has_war = yes } EAI_PR_year_FACTOR = yes }
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_signal = {

	if = { 
		limit = { 
			always = no
		}

		set_temp_variable = { prio_cat = @PR_signal }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### tech_support
	
		if = { limit = { set_temp_variable = { _prio_tech = token:tech_support } set_temp_variable = { _prio_val = prio_cat }

			date > 1938.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_signal_company

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_signal_company } set_temp_variable = { _prio_val = prio_cat }

			date > 1938.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_signal_company2

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_signal_company2 } set_temp_variable = { _prio_val = prio_cat }

			date > 1939.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_signal_company3

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_signal_company3 } set_temp_variable = { _prio_val = prio_cat }

			date > 1942.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### tech_signal_company4

		if = { limit = { set_temp_variable = { _prio_tech = token:tech_signal_company4 } set_temp_variable = { _prio_val = prio_cat }

			date > 1945.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_train = {

	if = { 
		limit = { 
			always = yes
		}

		set_temp_variable = { prio_cat = @PR_train }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### basic_train

		if = { limit = { set_temp_variable = { _prio_tech = token:basic_train } set_temp_variable = { _prio_val = prio_cat }

			date > 1936.6.1
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### wartime_train

		if = { limit = { set_temp_variable = { _prio_tech = token:wartime_train } set_temp_variable = { _prio_val = prio_cat }

			date > 1939.1.1
			has_war = yes
				
		} EAI_PR_add_to_priority_research_queue = yes }

		### armored_train

		if = { limit = { set_temp_variable = { _prio_tech = token:armored_train } set_temp_variable = { _prio_val = prio_cat }

			date > 1936.1.1
			always = no
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}

EAI_PR_STRATEGIES_railway_gun = {

	if = { 
		limit = { 
			always = no
		}

		set_temp_variable = { prio_cat = @PR_railway_gun }

		############################
		# Strategies
		############################

			# if = { limit = { tag = SOV }
			# 	if = {
			# 		limit = {
			# 			always = yes
			# 		}
				
			# 		multiply_temp_variable = { prio_cat = 1 }
			# 	}
			# }

		############################

		### railway_gun

		if = { limit = { set_temp_variable = { _prio_tech = token:railway_gun } set_temp_variable = { _prio_val = prio_cat }

			date > 1937.1.1
				
		} EAI_PR_add_to_priority_research_queue = yes }
	}
}