﻿division_template = {
	name = "Armoured Division"

	regiments = {
		armor_Bat = { x = 0 y = 0 }
		armor_Bat = { x = 0 y = 1 }
		SP_AA_Bat = { x = 0 y = 2 }
		armor_Bat = { x = 1 y = 0 }
		Arm_Inf_Bat = { x = 1 y = 1 }
	}

	support = {
		SP_Arty_Battery = { x = 0 y = 0 }
	}
}

division_template = {
	name = "Mechanised Infantry Division"

	regiments = {
		Arm_Inf_Bat = { x = 0 y = 0 }
		Arm_Inf_Bat = { x = 0 y = 1 }
		SP_AA_Bat = { x = 0 y = 2 }
		Arm_Inf_Bat = { x = 1 y = 0 }
		armor_Bat = { x = 1 y = 1 }
	}

	support = {
		SP_Arty_Battery = { x = 0 y = 0 }
	}
}

division_template = {
	name = "Airborne Division"

	regiments = {
		Mot_Air_Inf_Bat = { x = 0 y = 0 }
		Mot_Air_Inf_Bat = { x = 0 y = 1 }
		Mot_Air_Inf_Bat = { x = 1 y = 0 }
		Mot_Air_Inf_Bat = { x = 1 y = 1 }
		Special_Forces = { x = 2 y = 0 }
	}
}

division_template = {
	name = "Republican Guard Brigade"

	regiments = {
		Mech_Inf_Bat = { x = 0 y = 0 }
		Mech_Inf_Bat = { x = 0 y = 1 }
		Mech_Inf_Bat = { x = 0 y = 2 }
	}

	support = {
		armor_Recce_Comp = { x = 0 y = 0 }
	}

	priority = 2
}

division_template = {
	name = "Armoured Brigade"

	regiments = {
		armor_Bat = { x = 0 y = 0 }
		armor_Bat = { x = 0 y = 1 }
		Arm_Inf_Bat = { x = 0 y = 2 }
	}

	support = {
		SP_AA_Battery = { x = 0 y = 0 }
	}
}

division_template = {
	name = "Mechanized Infantry Brigade"

	regiments = {
		Mech_Inf_Bat = { x = 0 y = 0 }
		Mech_Inf_Bat = { x = 0 y = 1 }
		Mech_Inf_Bat = { x = 0 y = 2 }
	}

	support = {
		Arty_Battery = { x = 0 y = 0 }
	}
}

division_template = {
	name = "Independent Infantry Battalion"

	regiments = {
		Mot_Inf_Bat = { x = 0 y = 0 }
		Mot_Inf_Bat = { x = 0 y = 1 }
		Mot_Inf_Bat = { x = 0 y = 2 }
		Mot_Inf_Bat = { x = 0 y = 3 }
	}
}

units = {
	#Only 1st, 8th, 12th and 40th division have public names
	division = {
		name = "8th Armoured Division"
		location = 7065		#Ras El Ma
		division_template = "Armoured Division"
		start_experience_factor = 0.2
		start_equipment_factor = 0.01
	}

	division = {
		name = "1st Armoured Division"
		location = 7132
		division_template = "Armoured Division"
		start_experience_factor = 0.2
		start_equipment_factor = 0.01
	}

	division = {
		name = "40th Mechanised Infantry Division"
		location = 10731	#Near Moroccan border
		division_template = "Mechanised Infantry Division"
		start_experience_factor = 0.2
		start_equipment_factor = 0.01
	}

	division = {
		name = "12th Mechanised Infantry Division"
		location = 5035
		division_template = "Mechanised Infantry Division"
		start_experience_factor = 0.2
		start_equipment_factor = 0.01
	}

	#Disclosed location and name for these units
	division = {
		name = "17th Airborne Division"
		location = 5095
		division_template = "Airborne Division"
		start_experience_factor = 0.2
		start_equipment_factor = 0.01
	}

	##Republican Guard
	division = {
		name = "Republican Guard Brigade"
		location = 1145
		division_template = "Republican Guard Brigade"
		start_experience_factor = 0.5
		start_equipment_factor = 0.01
	}

	##Independent Armoured Brigade
	division = {
		name = "30th Armoured Brigade"
		location = 4116
		division_template = "Armoured Brigade"
		start_experience_factor = 0.2
		start_equipment_factor = 0.01
	}

	##Independent Mechanized Infantry Brigades
	division = {
		name = "29th Mechanized Infantry Brigade"
		location = 1160
		division_template = "Mechanized Infantry Brigade"
		start_experience_factor = 0.2
		start_equipment_factor = 0.01
	}

	division = {
		name = "91st Mechanized Infantry Brigade"
		location = 8077
		division_template = "Mechanized Infantry Brigade"
		start_experience_factor = 0.2
		start_equipment_factor = 0.01
	}

	division = {
		name = "56th Mechanized Infantry Brigade"
		location = 7166
		division_template = "Mechanized Infantry Brigade"
		start_experience_factor = 0.2
		start_equipment_factor = 0.01
	}

	division = {
		name = "78th Mechanized Infantry Brigade"
		location = 9960
		division_template = "Mechanized Infantry Brigade"
		start_experience_factor = 0.2
		start_equipment_factor = 0.01
	}

	##Independent Infantry Battalions (Oh God, why?!)
	division = {
		name = "11th Infantry Battalion"
		location = 1160
		division_template = "Independent Infantry Battalion"
		start_experience_factor = 0.2
		start_equipment_factor = 0.01
	}

	division = {
		name = "212th Infantry Battalion"
		location = 11953
		division_template = "Independent Infantry Battalion"
		start_experience_factor = 0.2
		start_equipment_factor = 0.01
	}

	division = {
		name = "22nd Infantry Battalion"
		location = 1058
		division_template = "Independent Infantry Battalion"
		start_experience_factor = 0.2
		start_equipment_factor = 0.01
	}

	division = {
		name = "184th Infantry Battalion"
		location = 12034
		division_template = "Independent Infantry Battalion"
		start_experience_factor = 0.2
		start_equipment_factor = 0.01
	}

	#1xSan Giorgio Class Amphibious Transport Docks (Kalaat Béni Abbès)
}

instant_effect = {
	add_equipment_to_stockpile = {
		type = mbt_hull_2
		producer = SOV
		variant_name = "T-90"
		amount = 505
	}

	add_equipment_to_stockpile = {
		type = mbt_hull_1
		producer = SOV
		variant_name = "T-72"
		amount = 500
	}

	add_equipment_to_stockpile = {
		type = mbt_hull_0
		producer = SOV
		variant_name = "T-62M"
		amount = 800
	}

	add_equipment_to_stockpile = {
		type = mbt_hull_0
		producer = SOV
		variant_name = "T-55"
		amount = 600
	}

	add_equipment_to_stockpile = {
		type = IFV_5			#BMPT Terminator
		#version_name = "BMPT Terminator"
		amount = 80
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = IFV_4			#BMP-3
		amount = 100
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = IFV_3			#BMP-2
		amount = 760
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = IFV_1			#BMP-1
		amount = 685
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = APC_4			#BTR-80
		amount = 150
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = APC_1			#BTR-60
		amount = 250
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = APC_1			#BTR-60
		amount = 250
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = APC_3			#FAHD
		amount = 100
		producer = EGY
	}

	add_equipment_to_stockpile = {
		type = APC_1			#Panhard M3
		amount = 55
		producer = FRA
	}

	add_equipment_to_stockpile = {
		type = APC_3			#TPz Fuchs
		amount = 980
		producer = GER
	}

	add_equipment_to_stockpile = {
		type = Rec_tank_0		#BRDM-2
		#version_name = "BRDM-2"
		amount = 90
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = Rec_tank_0		#Panhard AML 60
		#version_name = "Panhard AML"
		amount = 44
		producer = FRA
	}

	add_equipment_to_stockpile = {
		type = util_vehicle_3	#Nimr
		amount = 3000
		producer = ALG
	}

	add_equipment_to_stockpile = {
		type = APC_1		#OT-64
		amount = 150
		producer = CZE
	}

	add_equipment_to_stockpile = {
		type = SP_Anti_Air_0		#ZSU-23-4 Shilka
		#version_name = "ZSU-23-4 Shilka"
		amount = 310
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = SP_arty_0		#2S3 Akatsiya
		amount = 30
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = SP_arty_0		#2S1 Gvozdika
		#version_name = "2S1 Gvozdika"
		amount = 140
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = SP_arty_1		#2S1 Gvozdika
		#version_name = "PLZ-45"
		amount = 50
		producer = CHI
	}

	add_equipment_to_stockpile = {
		type = artillery_0	#D-30
		amount = 160
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = SP_R_arty_1	#BM-30 Smerch
		#version_name = "BM-30 Smerch"
		amount = 50
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = SP_R_arty_0	#BM-21 Grad
		amount = 48
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = SP_Anti_Air_0		#9K33 Osas and 2K12 Kubs
		amount = 88
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = SP_Anti_Air_2		#Pantsirs
		#version_name = "SA-22 Pantsir"
		amount = 76
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = SP_Anti_Air_0		#Strela-1s
		#version_name = "SA-9 Strela-1"
		amount = 20
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = SP_Anti_Air_1		#Strela-10s
		#version_name = "SA-13 Strela-10"
		amount = 32
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = SP_Anti_Air_1		#Strela-10s
		#version_name = "SA-13 Strela-10"
		amount = 32
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = Anti_tank_1			#MILANs
		amount = 50
		producer = FRA
	}

	add_equipment_to_stockpile = {
		type = Anti_tank_2			#Metis
		amount = 50
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = Anti_tank_0			#Malyutka
		amount = 50
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = Anti_tank_1			#Fagot
		amount = 50
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = Heavy_Anti_tank_2			#Kornets
		amount = 50
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = Heavy_Anti_tank_1			#Konkurs
		amount = 50
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = Anti_Air_0			#Strela
		amount = 50
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = infantry_weapons1			#Licensed AK-74s
		amount = 10000
		producer = ALG
	}

	#Aircraft
	add_equipment_to_stockpile = {
		type = AS_Fighter1	#MiG-25
		#version_name = "MiG-25 Foxbat"
		amount = 13
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = AS_Fighter2	#Su-30
		#version_name = "Su-30 Flanker-C"
		amount = 60
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = MR_Fighter2	#MiG-29
		amount = 32
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = Strike_fighter2	#Su-24
		amount = 34
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = attack_helicopter1	#Mi-24
		amount = 35
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = attack_helicopter2	#Mi-28
		amount = 42
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = transport_helicopter1		#Mi-17
		amount = 101
		producer = SOV
	}

	add_equipment_to_stockpile = {
		type = transport_helicopter1		#Mi-26
		amount = 4
		producer = SOV
	}

	#To fill up what's missing
	add_equipment_to_stockpile = {
		type = command_control_equipment
		amount = 1200
		producer = ALG
	}

	add_equipment_to_stockpile = {
		type = Anti_Air_0
		amount = 400
		producer = ALG
	}

	add_equipment_to_stockpile = {
		type = Anti_tank_0
		amount = 150
		producer = ALG
	}

	add_equipment_to_stockpile = {
		type = Heavy_Anti_tank_0
		amount = 200
		producer = ALG
	}

	#Navy licenses
	if = {
		limit = { NOT = { has_dlc = "Man the Guns" } }
		if = {
			limit = { has_dlc = "Death or Dishonor" }
			SOV = {
				create_production_license = {
					target = ALG
					equipment = {
						type = diesel_attack_submarine_3		#Improved-Kilo-Class
					}
					cost_factor = 0
				}
			}
			else = {
				add_equipment_production = {
					equipment = {
						type = diesel_attack_submarine_3
						version_name = "Improved-Kilo-Class"
						creator = "SOV"
					}
					requested_factories = 1
					progress = 0.2
					efficiency = 50
				}
			}
		}

		if = {
			limit = { has_dlc = "Death or Dishonor" }
			GER = {
				create_production_license = {
					target = ALG
					equipment = {
						type = missile_frigate_1		#MEKO A-200AN-Class
					}
					cost_factor = 0
				}
			}
			else = {
				add_equipment_production = {
					equipment = {
						type = missile_frigate_1
						version_name = "MEKO A-200AN-Class"
						creator = "GER"
					}
					requested_factories = 1
					progress = 0.2
					efficiency = 50
				}
			}
		}

		if = {
			limit = { has_dlc = "Death or Dishonor" }
			SOV = {
				create_production_license = {
					target = ALG
					equipment = {
						type = missile_corvette_3			#Steregushchiy-Class
					}
					cost_factor = 0
				}
			}
			else = {
				add_equipment_production = {
					equipment = {
						type = missile_corvette_3
						version_name = "Steregushchiy-Class"
						creator = "SOV"
					}
					requested_factories = 1
					progress = 0.2
					efficiency = 50
				}
			}
		}
		if = {
			limit = { has_dlc = "Death or Dishonor" }
			CHI = {
				create_production_license = {
					target = ALG
					equipment = {
						type = missile_corvette_2
					}
					cost_factor = 0
				}
			}
			else = {
				add_equipment_production = {
					equipment = {
						type = missile_corvette_2
						version_name = "C28A-Class"
						creator = "CHI"
					}
					requested_factories = 1
					progress = 0.4
					efficiency = 75
				}
			}
		}
	}
}