##### Division Templates #####
division_template = {
	name = "División de Infantería" 		# Used for both regular infantry divisions and larger garrison divisions
	# 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 }   # Eng Bn
	}
}
division_template = {
	name = "División de Caballería"  		# Only one Cavalry Division (3x bge of 2x2 Rgts)

	regiments = {
		cavalry = { x = 0 y = 0 }
		cavalry = { x = 0 y = 1 }
		cavalry = { x = 0 y = 2 }
		cavalry = { x = 0 y = 3 }
		cavalry = { x = 1 y = 0 }
		cavalry = { x = 1 y = 1 }
		cavalry = { x = 1 y = 2 }
		cavalry = { x = 1 y = 3 }
		cavalry = { x = 2 y = 0 }
		cavalry = { x = 2 y = 1 }
		cavalry = { x = 2 y = 2 }
		cavalry = { x = 2 y = 3 }
	}
	support = {
		recon = { x = 0 y = 0 }      # Recon consisted of motorcycles and ACs
	}
}
division_template = {
	name = "Brigada Montaña"  		# Mountain Brigades were 2x2 Rgts + support

	regiments = {
		mountaineers = { x = 0 y = 0 }	
		mountaineers = { x = 0 y = 1 }
		mountaineers = { x = 1 y = 0 }
		mountaineers = { x = 1 y = 1 }
	}
	support = {
		artillery = { x = 0 y = 0 }  # Spanish Arty Rgt/Bge had 2 Bn 105mm arty
	}
}
division_template = {
	name = "Brigada de Infantería" 		# Infantry Brigade - Used for smaller garrison units
	regiments = {
		infantry = { x = 0 y = 0 }	
		infantry = { x = 0 y = 1 }	
		infantry = { x = 1 y = 0 }	
		infantry = { x = 1 y = 1 }	
	}
	support = {
		engineer = { x = 0 y = 0 }   # Eng Bn
	}
}

###### OOB ######
units = {
	#####LAND UNITS #####
	### MAINLAND UNITS ###
	division = {			
		name = "1a División de Infantería"		
		location = 3938  # Madrid
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.8

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

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

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

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

	}			
	division = {			
		name = "6a División de Infantería"		
		location = 885  # Burgos
		division_template = "División de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.8

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

	}			
	division = {			
		name = "8a 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.8

	}			

	division = {			
		name = "1a División de Caballería"		
		location = 9764  # Barcelona
		division_template = "División de Caballería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.8

	}			

	division = {			
		name = "1a Brigada Montaña"		
		location = 13071  # Canary Islands
		division_template = "Brigada Montaña"
		start_experience_factor = 0.2
		start_equipment_factor = 0.8

	}			
	division = {			
		name = "2a Brigada Montaña"		
		location = 740  #Bilbao
		division_template = "Brigada Montaña"
		start_experience_factor = 0.2
		start_equipment_factor = 0.8

	}			
	division = {			
		name = "Brigada Mixta Montaña"		
		location = 11707  #Oviedo
		division_template = "Brigada Montaña"
		start_experience_factor = 0.2
		start_equipment_factor = 0.8

	}			

	division = {			
		name = "Brigada de Arma de Infantería"		
		location = 1048  #Cádiz
		division_template = "Brigada de Infantería"
		start_experience_factor = 0.2
		start_equipment_factor = 0.8

	}			


	### Island Garrisons ###
	division = {			
		name = "Comandancia de Baleares"		
		location = 9793  #Mallorca
		division_template = "Brigada de Infantería"		# garrison division, lower equipment, experience
		force_equipment_variants = { infantry_equipment_0 = { owner = "SPR" } }
		start_experience_factor = 0.1
		start_equipment_factor = 0.5

	}			
	division = {			
		name = "Comandancia de Canarias"		
		location = 13071  # Canary Islands
		division_template = "Brigada de Infantería"		# garrison division, lower equipment, experience
		force_equipment_variants = { infantry_equipment_0 = { owner = "SPR" } }
		start_experience_factor = 0.1
		start_equipment_factor = 0.5

	}			


	### Ejército de África ###
	division = {			
		name = "Circunscripción Occidental"		
		location = 9945  #Ceuta
		division_template = "División de Infantería"		# garrison division, lower equipment, experience
		start_experience_factor = 0.1
		start_equipment_factor = 0.8

	}			
	division = {			
		name = "Circunscripción Oriental"		
		location = 12100  #Melilla
		division_template = "División de Infantería"		# garrison division, lower equipment, experience
		start_experience_factor = 0.1
		start_equipment_factor = 0.8

	}			


	##### NAVAL UNITS #####
	navy = {
		name = "Base Naval El Ferrol"
		base = 758
		location = 758  # Ferrol/Coruna
		ship = { name = "ARE Jaime I" definition = battleship equipment = { battleship_1 = { amount = 1 owner = SPR } } }
		ship = { name = "ARE España" definition = battleship equipment = { battleship_1 = { 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 } } }
	}
	navy = {
		name = "Base Naval Cartagena"
		base = 10024
		location = 10024  #Cartagena/Murcia
		# Flotilla de Destructores n.1
		ship = { name = "ARE Almirante Ferrándiz" definition = destroyer equipment = { destroyer_2 = { amount = 1 owner = SPR } } }
		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 } } }
		# 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 } } }
	}
	navy = {
		name = "Grupo de Cartagena"
		base = 10024
		location = 10024  #Cartagena/Murcia
		# S101 Flotilla
		ship = { name = "B5" definition = submarine equipment = { submarine_1 = { amount = 1 owner = SPR } } }
		ship = { name = "B6" definition = submarine equipment = { submarine_1 = { amount = 1 owner = SPR } } }
		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 = "C3" 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" } } }
		ship = { name = "C5" definition = submarine equipment = { submarine_1 = { amount = 1 owner = SPR version_name = "C Class" } } }
		ship = { name = "C6" 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 = {
	# Arma de Aviación -- Madrid (Getafe)
	41 = { 
		# Grupo n.1 de Caza FARE 'Alas Rojas'
		fighter_equipment_0 = {
			owner = "SPR" 
			amount = 36
		}
	}
	# Arma de Aviación -- Sevilla (and Barcelona)
	169 = {
		# Grupo n.3 de Caza FARE 'Malraux'
		fighter_equipment_0 = {
			owner = "SPR" 
			amount = 24
		}
	}
	# Aeronáutica Naval -- Murcia
	168 = {
		nav_bomber_equipment_1 = {
			owner = "SPR" 
			amount = 27
		}
	}
}


instant_effect = {
	add_equipment_production = {
		equipment = {
			type = infantry_equipment_1
			creator = "SPR"
		}
		requested_factories = 2
		progress = 0.42
		efficiency = 100
	}
	add_equipment_production = {
		equipment = {
			type = support_equipment_1
			creator = "SPR"
		}
		requested_factories = 1
		progress = 0.24
		efficiency = 100
	}
	add_equipment_production = {
		equipment = {
			type = artillery_equipment_1
			creator = "SPR"
		}
		requested_factories = 1
		progress = 0.24
		efficiency = 100
	}
	### Under Contruction Notes ###
	# DD: Churucca class (x3) ("ARE Almirante Miranda" "ARE Gravina" "ARE Escaño" "ARE Císcar" "ARE Jorge Juan" "ARE Ulloa")
	add_equipment_production = {
		equipment = {
			type = destroyer_2
			creator = "SPR"
		}
		requested_factories = 1
		progress = 0.80
		amount = 3
	}
	# CA: ARE Canarias (Canarias class, comm. 1-Oct, 1936), ARE Baleares (Canarias class, comm. 28-Dec, 1936)
	add_equipment_production = {
		equipment = {
			type = heavy_cruiser_2
			creator = "SPR"
		}
		requested_factories = 2
		progress = 0.85
		amount = 2
	}
}