##### Division Templates #####
division_template = {
	name = "División de Infantería" 		# Regular infantry divisions, all at reserve levels in 1939
	# 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

	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 
									# 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 = {			
		name = "11a División de Infantería"		
		location = 3938  # Madrid
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

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

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

	}			

	# II Cuerpo # 
	division = {			
		name = "21a División de Infantería"		
		location = 7183  # Sevilla
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

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

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

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

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

	}	

	# IV Cuerpo # 
	division = {			
		name = "41a División de Infantería"		
		location = 3816  # Zaragosa
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

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

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

	}

	# V Cuerpo # 
	division = {			
		name = "51a División de Infantería"		
		location = 9764  # Barcelona
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

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

	}			

	# VI Cuerpo # 
	division = {			
		name = "61a División de Infantería"		
		location = 740  #Bilbao
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

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

	}			

	# VII Cuerpo # 
	division = {			
		name = "71a División de Infantería"		
		location = 885  # Burgos
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.5

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

	}	

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

	}			
	division = {			
		name = "82a División de Infantería"		
		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 = {			
		name = "Comandancia de Baleares"		
		location = 9793  #Mallorca
		division_template = "División de Infantería"		
		start_experience_factor = 0.1
		start_equipment_factor = 0.3

	}			
	division = {			
		name = "Comandancia de Canarias"		
		location = 13071  # Canary Islands
		division_template = "División de Infantería"		
		start_experience_factor = 0.1
		start_equipment_factor = 0.3

	}			


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

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

	}				
	division = {			
		name = "Circunscripción Morocco"		
		location = 12100  #Melilla
		division_template = "Fuerza Colonial"
		start_experience_factor = 0.1
		start_equipment_factor = 0.3

	}			

	# X Cuerpo # 
	division = {			
		name = "101a División de Infantería"		
		location = 9945  #Ceuta
		division_template = "División de Infantería"
		start_experience_factor = 0.1
		start_equipment_factor = 0.3

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

	}			
	division = {			
		name = "Circunscripción Maestrazgo"		
		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
	}
}