##### Division Templates #####
division_template = {
	name = "División de Infantería" 		# Regular infantry divisions, all at reserve levels in 1939
	division_names_group = SPA_INF_01
	# Note: Spanish divisions were 2x brigades of 2x2 rgts each, + support
	regiments = {
		infantry = { x = 0 y = 0 }
		infantry = { x = 0 y = 1 }
		infantry = { x = 0 y = 2 }
		infantry = { x = 0 y = 3 }
		infantry = { x = 1 y = 0 }
		infantry = { x = 1 y = 1 }
		infantry = { x = 1 y = 2 }
		infantry = { x = 1 y = 3 }
	}
	support = {
		artillery = { x = 0 y = 0 }  # Spanish Arty Rgt/Bge had 2 Bn 105mm arty
		engineer = { x = 0 y = 1 }   
	}
}
division_template = {
	name = "División de Caballería"  		# Cavalry Division semi-motorized by 1939
	division_names_group = SPR_CAV_01

	regiments = {
		cavalry = { x = 0 y = 0 }
		cavalry = { x = 0 y = 1 }
		cavalry = { x = 0 y = 2 }
		cavalry = { x = 0 y = 3 }
		motorized = { x = 1 y = 0 }
		motorized = { x = 1 y = 1 }
		motorized = { x = 1 y = 2 }
		motorized = { x = 1 y = 3 }
	}
	support = {
		recon = { x = 0 y = 0 }
		engineer = { x = 0 y = 1 }   
	}
}
division_template = {
	name = "Fuerza Colonial" 		# Collection of Spanish Legion, native militias, and cavalry 
	division_names_group = SPR_GAR_01
									# Averages out to regular experience and equipment (Legion = elite, militias = low-quality)
	regiments = {
		infantry = { x = 0 y = 0 }	
		infantry = { x = 0 y = 1 }	
		infantry = { x = 0 y = 2 }	
		infantry = { x = 1 y = 0 }	
		infantry = { x = 1 y = 1 }	
		infantry = { x = 1 y = 2 }	
		cavalry = { x = 2 y = 0 }
		cavalry = { x = 2 y = 1 }
	}
	priority = 0
}

###### OOB ######
units = {
	#####LAND UNITS #####
	### Ejército de Tierra de España ###
	division = {			
		name = "División de Caballería"		
		location = 3938  # Madrid
		division_template = "División de Caballería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}		
	
	# I Cuerpo # 
	division = { # "11a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 11
		}
		location = 3938  # Madrid
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}			
	division = { # "12a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 12
		}
		location = 3938  # Madrid
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}			
	division = { # "13a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 13
		}
		location = 3938  # Madrid
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}			

	# II Cuerpo # 
	division = { # "21a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 21
		}
		location = 7183  # Sevilla
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}			
	division = { # "22a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 22
		}
		location = 7183  # Sevilla
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}			
	division = { # "23a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 23
		}
		location = 7183  # Sevilla
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}		
	
	# III Cuerpo # 
	division = { # "31a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 31
		}
		location = 6906  # Valencia
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}			
	division = { # "32a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 32
		}
		location = 6906  # Valencia
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}	

	# IV Cuerpo # 
	division = { # "41a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 41
		}
		location = 3816  # Zaragosa
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}
	division = { # "42a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 42
		}
		location = 3816  # Zaragosa
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}
	division = { # "43a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 43
		}
		location = 3816  # Zaragosa
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}

	# V Cuerpo # 
	division = { # "51a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 51
		}
		location = 9764  # Barcelona
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}			
	division = { # "52a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 52
		}
		location = 9764  # Barcelona
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}			

	# VI Cuerpo # 
	division = { # "61a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 61
		}
		location = 740  #Bilbao
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}			
	division = { # "62a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 62
		}
		location = 740  #Bilbao
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}			

	# VII Cuerpo # 
	division = { # "71a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 71
		}
		location = 885  # Burgos
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}			
	division = { # "72a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 72
		}
		location = 11825  # Valladolid
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}	

	# VIII Cuerpo # 
	division = { # "81a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 81
		}
		location = 758  # La Coruña
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}			
	division = { # "82a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 82
		}
		location = 758  # La Coruña
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

	}			

	### Island Garrisons ###
	division = { # "Comandancia de Baleares"		
		division_name = {
				is_name_ordered = yes
				name_order = 1
		}
		location = 9793  #Mallorca
		division_template = "Fuerza Colonial"		
		start_experience_factor = 0.1
		start_equipment_factor = 0.3

	}			
	division = { # "Comandancia de Canarias"		
		division_name = {
				is_name_ordered = yes
				name_order = 2
		}
		location = 13071  # Canary Islands
		division_template = "Fuerza Colonial"		
		start_experience_factor = 0.1
		start_equipment_factor = 0.3

	}			


	### Ejército de África ###
	# IX Cuerpo # 
	division = { # "91a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 91
		}
		location = 12100  #Melilla
		division_template = "División de Infantería"
		start_experience_factor = 0.1
		start_equipment_factor = 0.3

	}			
	division = { # "92a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 92
		}
		location = 12100  #Melilla
		division_template = "División de Infantería"
		start_experience_factor = 0.1
		start_equipment_factor = 0.3

	}				
	division = { # "Circunscripción Morocco"		
		division_name = {
				is_name_ordered = yes
				name_order = 3
		}
		location = 12100  #Melilla
		division_template = "Fuerza Colonial"
		start_experience_factor = 0.1
		start_equipment_factor = 0.3

	}			

	# X Cuerpo # 
	division = { # "101a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 101
		}
		location = 9945  #Ceuta
		division_template = "División de Infantería"
		start_experience_factor = 0.1
		start_equipment_factor = 0.3

	}			
	division = { # "102a División de Infantería"		
		division_name = {
				is_name_ordered = yes
				name_order = 102
		}
		location = 9945  #Ceuta
		division_template = "División de Infantería"
		start_experience_factor = 0.1
		start_equipment_factor = 0.3

	}			
	division = { # "Circunscripción Maestrazgo"		
		division_name = {
				is_name_ordered = yes
				name_order = 4
		}
		location = 9945  #Ceuta
		division_template = "Fuerza Colonial"
		start_experience_factor = 0.1
		start_equipment_factor = 0.3

	}			


	##### NAVAL UNITS #####
	navy = {
		name = "Base Naval El Ferrol"
		base = 758
		location = 758  # Ferrol/Coruna
		ship = { name = "ARE Canarias" definition = heavy_cruiser equipment = { heavy_cruiser_2 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Libertad" definition = light_cruiser equipment = { light_cruiser_1 = { amount = 1 owner = SPR version_name = "Príncipe Alfonso Class" } } }
		ship = { name = "ARE Almirante Cervera" definition = light_cruiser equipment = { light_cruiser_1 = { amount = 1 owner = SPR version_name = "Príncipe Alfonso Class" } } }
		ship = { name = "ARE Miguel de Cervantes" definition = light_cruiser equipment = { light_cruiser_1 = { amount = 1 owner = SPR version_name = "Príncipe Alfonso Class" } } }
		# Flotilla de Destructores de El Ferrol
		ship = { name = "ARE Alsedo" definition = destroyer equipment = { destroyer_1 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Velasco" definition = destroyer equipment = { destroyer_1 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Lazaga" definition = destroyer equipment = { destroyer_1 = { amount = 1 owner = SPR } } }
	}
	navy = {
		name = "Base Naval Cádiz"
		base = 1048
		location = 1048  #Cádiz
		ship = { name = "ARE República" definition = light_cruiser equipment = { light_cruiser_1 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Méndez Núñez" definition = light_cruiser equipment = { light_cruiser_1 = { amount = 1 owner = SPR } } }
		# Flotilla de Destructores n.4
		ship = { name = "ARE Melilla" definition = destroyer equipment = { destroyer_1 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Ceuta" definition = destroyer equipment = { destroyer_1 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Huesca" definition = destroyer equipment = { destroyer_1 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Teruel" definition = destroyer equipment = { destroyer_1 = { amount = 1 owner = SPR } } }
	}
	navy = {
		name = "Base Naval Cartagena"
		base = 10024
		location = 10024  #Cartagena/Murcia
		# Flotilla de Destructores n.1
		ship = { name = "ARE Sánchez Barcáiztegui" definition = destroyer equipment = { destroyer_2 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Alcalá Galiano" definition = destroyer equipment = { destroyer_2 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Almirante Valdés" definition = destroyer equipment = { destroyer_2 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Almirante Miranda" definition = destroyer equipment = { destroyer_2 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Gravina" definition = destroyer equipment = { destroyer_2 = { amount = 1 owner = SPR } } }
		# Flotilla de Destructores n.2
		ship = { name = "ARE Churucca" definition = destroyer equipment = { destroyer_2 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE José Luis Díez" definition = destroyer equipment = { destroyer_2 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Lepanto" definition = destroyer equipment = { destroyer_2 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Almirante Antequera" definition = destroyer equipment = { destroyer_2 = { amount = 1 owner = SPR } } }
		# Flotilla de Destructores n.3
		ship = { name = "ARE Escaño" definition = destroyer equipment = { destroyer_2 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Císcar" definition = destroyer equipment = { destroyer_2 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Jorge Juan" definition = destroyer equipment = { destroyer_2 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE Ulloa" definition = destroyer equipment = { destroyer_2 = { amount = 1 owner = SPR } } }
	}
	navy = {
		name = "Grupo de Cartagena"
		base = 10024
		location = 10024  #Cartagena/Murcia
		# S101 Flotilla
		ship = { name = "C1" definition = submarine equipment = { submarine_1 = { amount = 1 owner = SPR version_name = "C Class" } } }
		ship = { name = "C2" definition = submarine equipment = { submarine_1 = { amount = 1 owner = SPR version_name = "C Class" } } }
		ship = { name = "C4" definition = submarine equipment = { submarine_1 = { amount = 1 owner = SPR version_name = "C Class" } } }
	}
	navy = {
		name = "Grupo de Cádiz"
		base = 1048
		location = 1048  #Cádiz
		# S103 Flotilla
		ship = { name = "B1" definition = submarine equipment = { submarine_1 = { amount = 1 owner = SPR } } }
		ship = { name = "B2" definition = submarine equipment = { submarine_1 = { amount = 1 owner = SPR } } }
		ship = { name = "B3" definition = submarine equipment = { submarine_1 = { amount = 1 owner = SPR } } }
		ship = { name = "B4" definition = submarine equipment = { submarine_1 = { amount = 1 owner = SPR } } }
	}

}

### Air Wings
air_wings = {
	41 = { 														# Madrid (Getafe)
		fighter_equipment_0 = { owner = "SPR" amount = 80 }		# I/1a Región Aérea Centro -- CR.32, He 51 fighters
		CAS_equipment_1 = { owner = "SPR" amount = 24 }			# II/1a Región Aérea Centro -- BR.20, Do 17E bombers
	}
	169 = {														# Sevilla
		tac_bomber_equipment_1 = { owner = "SPR" amount = 60 }	# 2a Región Aérea del Estrecho -- SM.79-I bombers
		fighter_equipment_0 = { owner = "SPR" amount = 24 }		# I/5a Región Aérea Atlantico -- CR.32 fighters
		tac_bomber_equipment_0 = { owner = "SPR" amount = 30 }	# II/5a Región Aérea Atlantico -- SM.81 bombers
		CAS_equipment_1 = { owner = "SPR" amount = 24 }			# III/5a Región Aérea Atlantico -- He 45, Ca.310 bombers
	}
	166 = {														# Barcelona
		fighter_equipment_0 = { owner = "SPR" amount = 64 }		# 3a Región Aérea Levante -- Polikarpov I-15 fighters
	}
	173 = {														# Galacia
		fighter_equipment_1 = { owner = "SPR" amount = 30 }		# I/4a Región Aérea Levante -- Bf 109B fighters
		tac_bomber_equipment_1 = { owner = "SPR" amount = 40 }	# II/4a Región Aérea Levante -- He 111 bombers
	}
	290 = {														# Morocco
		fighter_equipment_1 = { owner = "SPR" amount = 36 }		# I/4a Región Aérea Levante -- G.50, He 112, CR.32 fighters
	}
}


### Starting Production ###
instant_effect = {
	add_equipment_production = {
		equipment = {
			type = infantry_equipment_1
			creator = "SPR"
		}
		requested_factories = 1
		progress = 0.60
		efficiency = 100
	}
	add_equipment_production = {
		equipment = {
			type = support_equipment_1
			creator = "SPR"
		}
		requested_factories = 1
		progress = 0.80
		efficiency = 100
	}
	add_equipment_production = {
		equipment = {
			type = artillery_equipment_1
			creator = "SPR"
		}
		requested_factories = 1
		progress = 0.80
		efficiency = 100
	}
	add_equipment_production = {
		equipment = {
			type = motorized_equipment_1
			creator = "SPR" 
		}
		requested_factories = 1
		progress = 0.4
		efficiency = 100
	}
	add_equipment_production = {
		equipment = {
			type = fighter_equipment_1
			creator = "SPR"
		}
		requested_factories = 1
		progress = 0.30
		efficiency = 100
	}
}