auto_outfit_starbases_check = {
	if = {
		limit = {
			has_global_flag = has_nsc_active
		}
		if = {
			limit = { 
				has_starbase_size = starbase_starport
			}
			starbase_designation = {
				STARBASE = starport
				NSC_MODE = yes
			}
		} else_if = {
			limit = { 
				has_starbase_size = starbase_starhold
			}
			starbase_designation = {
				STARBASE = starhold
				NSC_MODE = yes
			}
		} else_if = {
			limit = { 
				has_starbase_size = starbase_starfortress
			}
			starbase_designation = {
				STARBASE = starfortress
				NSC_MODE = yes
			}
		} else_if = {
			limit = { 
				has_starbase_size = starbase_citadel
			}
			starbase_designation = {
				STARBASE = citadel
				NSC_MODE = yes
			}
		} else_if = {
			limit = { 
				has_starbase_size = starbase_stronghold
			}
			starbase_designation = {
				STARBASE = stronghold
				NSC_MODE = yes
			}
		} else_if = {
			limit = { 
				has_starbase_size = starbase_headquarters
			}
			starbase_designation = {
				STARBASE = headquarters
				NSC_MODE = yes
			}
		}
	}
	else = {
		if = {
			limit = { 
				has_starbase_size = starbase_starport
			}
			starbase_designation = {
				STARBASE = starport
			}
		} else_if = {
			limit = { 
				has_starbase_size = starbase_starhold
			}
			starbase_designation = {
				STARBASE = starhold
			}
		} else_if = {
			limit = { 
				has_starbase_size = starbase_starfortress
			}
			starbase_designation = {
				STARBASE = starfortress
			}
		} else_if = {
			limit = { 
				has_starbase_size = starbase_citadel
			}
			starbase_designation = {
				STARBASE = starfortress
			}
		}
	}
}

# Below is a list what the loadout more or less looks like for each template in vanilla. This is the same across all starbase levels just cut down based on module and building available slots.
# Auto Shipyard - Max Shipyard modules and Fleet Academy, Hydroponics Bay, Resource Silo/Recruitment Office buildings.
# Auto Anchorage - Max anchorage modules and Naval Logistics Office, Hydroponics Bay, Resource Silo/Recruitment Office buildings.
# Auto Energy - Max Solar Panel Network modules and Recruitment Office, Hydroponics Bay, Resource Silo buildings.
# Auto Astromining - Max Astrominig Bay modules and Astromining Hub, Hydroponics Bay, Resource Silo/Recruitment Office buildings.
# Auto Trade - Max trade hub modules and Recruitment Office, Hydroponics Bay, Resource Silo buildings.
# Auto Mixed - Mixes all of the above apart from Shipyard and Astromining stuff.

starbase_designation = {
	switch = {
		trigger = has_starbase_flag
		
		[[!NSC_MODE]
			auto_shipyard_starbase_flag = {
				$STARBASE$_shipyard_template = yes
			}
			auto_anchorage_starbase_flag = {
				$STARBASE$_anchorage_template = yes
			}
			auto_energy_starbase_flag = {
				$STARBASE$_energy_template = yes
			}
			auto_astromining_starbase_flag = {
				$STARBASE$_astromining_template = yes
			}
			auto_trade_starbase_flag = {
				$STARBASE$_trade_hub_template = yes
			}
			auto_mixed_starbase_flag = {
				$STARBASE$_mixed_template = yes
			}
		]

		[[NSC_MODE]
			auto_shipyard_starbase_flag = {
				$STARBASE$_shipyard_nsc_template = yes
			}
			auto_anchorage_starbase_flag = {
				$STARBASE$_anchorage_nsc_template = yes
			}
			auto_energy_starbase_flag = {
				$STARBASE$_energy_nsc_template = yes
			}
			auto_mineral_starbase_flag = {
				$STARBASE$_mineral_nsc_template = yes
			}
			auto_astromining_starbase_flag = {
				$STARBASE$_astromining_nsc_template = yes
			}
			auto_alloy_starbase_flag = {
				$STARBASE$_alloy_nsc_template = yes
			}
			auto_trade_starbase_flag = {
				$STARBASE$_trade_hub_nsc_template = yes
			}
			auto_mixed_starbase_flag = {
				$STARBASE$_mixed_nsc_template = yes
			}
		]
	}
}

# Vanilla Starports
starport_shipyard_template = {
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
}

starport_anchorage_template = {
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
}

starport_energy_template = {
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
}

starport_astromining_template = {
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 1
		ALLOYS = 25
		DAYS = 178
	}
	
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 2
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
}

starport_trade_hub_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
}

starport_mixed_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
}

# NSC Starports
starport_shipyard_nsc_template = {
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = fleet_academy
		SLOT = 3
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 50
		DAYS = 178
	}
}

starport_anchorage_nsc_template = {
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = naval_logistics_office
		SLOT = 3
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}
}

starport_energy_nsc_template = {
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
}

starport_mineral_nsc_template = {
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
}

starport_astromining_nsc_template = {
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 1
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 2
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 3
		ALLOYS = 25
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = astromining_hub
		SLOT = 2
		ALLOYS = 50
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
}

starport_trade_hub_nsc_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
}

starport_mixed_nsc_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
}

starport_alloy_nsc_template = {
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 1
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 2
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 3
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
}

# Vanilla Starhold
starhold_shipyard_template = {
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = fleet_academy
		SLOT = 2
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}
}

starhold_anchorage_template = {
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = naval_logistics_office
		SLOT = 2
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}
}

starhold_energy_template = {
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
}

starhold_astromining_template = {
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 1
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 2
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 3
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 4
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = astromining_hub
		SLOT = 2
		ALLOYS = 50
		DAYS = 358
	}
}

starhold_trade_hub_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		TECH_1 = tech_space_trading
		ALLOYS = 100
		DAYS = 358
	}
}

starhold_mixed_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		TECH_1 = tech_space_trading
		ALLOYS = 100
		DAYS = 358
	}
}

# NSC Starhold
starhold_shipyard_nsc_template = {
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = fleet_academy
		SLOT = 4
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
}

starhold_anchorage_nsc_template = {
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = naval_logistics_office
		SLOT = 4
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
}

starhold_energy_nsc_template = {
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
}

starhold_mineral_nsc_template = {
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
}

starhold_astromining_nsc_template = {
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 1
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 2
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 3
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 4
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 5
		ALLOYS = 25
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = astromining_hub
		SLOT = 4
		ALLOYS = 50
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
}

starhold_trade_hub_nsc_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
}

starhold_mixed_nsc_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 4
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
}

starhold_alloy_nsc_template = {
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 1
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 2
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 3
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 4
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 5
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
}

# Starfortress
starfortress_shipyard_template = {
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = fleet_academy
		SLOT = 2
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}

	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = recruitment_office
		SLOT = 3
		ALLOYS = 50
		DAYS = 718
	}
}

starfortress_anchorage_template = {
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = naval_logistics_office
		SLOT = 2
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}

	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = recruitment_office
		SLOT = 3
		ALLOYS = 50
		DAYS = 718
	}
}

starfortress_energy_template = {
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = recruitment_office
		SLOT = 3
		ALLOYS = 50
		DAYS = 718
	}
}

starfortress_astromining_template = {
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 1
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 2
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 3
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 4
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = astromining_hub
		SLOT = 2
		ALLOYS = 50
		DAYS = 358
	}

	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 5
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 6
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = recruitment_office
		SLOT = 3
		ALLOYS = 50
		DAYS = 718
	}
}

starfortress_trade_hub_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		TECH_1 = tech_space_trading
		ALLOYS = 100
		DAYS = 358
	}

	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = recruitment_office
		SLOT = 3
		ALLOYS = 50
		DAYS = 718
	}
}

starfortress_mixed_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 1
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		TECH_1 = tech_space_trading
		ALLOYS = 100
		DAYS = 358
	}

	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = recruitment_office
		SLOT = 3
		ALLOYS = 50
		DAYS = 718
	}
}

# NSC Starfortress
starfortress_shipyard_nsc_template = {
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = fleet_academy
		SLOT = 4
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
}

starfortress_anchorage_nsc_template = {
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = naval_logistics_office
		SLOT = 4
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
}

starfortress_energy_nsc_template = {
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
}

starfortress_mineral_nsc_template = {
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
}

starfortress_astromining_nsc_template = {
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 1
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 2
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 3
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 4
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 5
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 6
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 7
		ALLOYS = 25
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = astromining_hub
		SLOT = 4
		ALLOYS = 50
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
}

starfortress_trade_hub_nsc_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
}

starfortress_mixed_nsc_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 4
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
}

starfortress_alloy_nsc_template = {
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 1
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 2
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 3
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 4
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 5
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 6
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 7
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
}

# NSC Citadel
citadel_shipyard_nsc_template = {
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = fleet_academy
		SLOT = 4
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
}

citadel_anchorage_nsc_template = {
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = naval_logistics_office
		SLOT = 4
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
}

citadel_energy_nsc_template = {
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
}

citadel_mineral_nsc_template = {
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
}

citadel_astromining_nsc_template = {
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 1
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 2
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 3
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 4
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 5
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 6
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 7
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 8
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 9
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 10
		ALLOYS = 25
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = astromining_hub
		SLOT = 4
		ALLOYS = 50
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
}

citadel_trade_hub_nsc_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
}

citadel_mixed_nsc_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 4
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 8
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 9
		TECH_1 = tech_alloys_1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
}

citadel_alloy_nsc_template = {
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 1
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 2
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 3
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 4
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 5
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 6
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 7
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 8
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 9
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 10
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
}

# NSC Grand Citadel
stronghold_shipyard_nsc_template = {
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 11
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 12
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 13
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 14
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 15
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = fleet_academy
		SLOT = 4
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
}

stronghold_anchorage_nsc_template = {
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 11
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 12
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 13
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 14
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 15
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = naval_logistics_office
		SLOT = 4
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
}

stronghold_energy_nsc_template = {
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 11
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 12
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 13
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 14
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 15
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
}

stronghold_mineral_nsc_template = {
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 11
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 12
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 13
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 14
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 15
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
}

stronghold_astromining_nsc_template = {
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 1
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 2
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 3
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 4
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 5
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 6
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 7
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 8
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 9
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 10
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 11
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 12
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 13
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 14
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 15
		ALLOYS = 25
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = astromining_hub
		SLOT = 4
		ALLOYS = 50
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
}

stronghold_trade_hub_nsc_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 11
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 12
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 13
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 14
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 15
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
}

stronghold_mixed_nsc_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 4
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 8
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 9
		TECH_1 = tech_alloys_1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 11
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 12
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 13
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 14
		TECH_1 = tech_alloys_1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 15
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
}

stronghold_alloy_nsc_template = {
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 1
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 2
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 3
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 4
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 5
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 6
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 7
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 8
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 9
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 10
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 11
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 12
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 13
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 14
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 15
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
}

# NSC Solar Stronghold
headquarters_shipyard_nsc_template = {
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 11
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 12
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 13
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 14
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 15
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 16
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 17
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 18
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 19
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = shipyard
		SLOT = 20
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = fleet_academy
		SLOT = 4
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
	fill_starbase_slot = {
		BUILDING = target_uplink_computer
		SLOT = 16
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = disruption_field
		SLOT = 17
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = communications_jammer
		SLOT = 18
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = crew_quarters
		SLOT = 19
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = recruitment_office
		SLOT = 20
		ALLOYS = 50
		DAYS = 718
	}
}

headquarters_anchorage_nsc_template = {
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 11
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 12
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 13
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 14
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 15
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 16
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 17
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 18
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 19
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 20
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = naval_logistics_office
		SLOT = 4
		TECH_1 = tech_interstellar_fleet_traditions
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
	fill_starbase_slot = {
		BUILDING = target_uplink_computer
		SLOT = 16
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = disruption_field
		SLOT = 17
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = communications_jammer
		SLOT = 18
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = crew_quarters
		SLOT = 19
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = recruitment_office
		SLOT = 20
		ALLOYS = 50
		DAYS = 718
	}
}

headquarters_energy_nsc_template = {
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 11
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 12
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 13
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 14
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 15
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 16
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 17
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 18
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 19
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 20
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
	fill_starbase_slot = {
		BUILDING = target_uplink_computer
		SLOT = 16
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = disruption_field
		SLOT = 17
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = communications_jammer
		SLOT = 18
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = crew_quarters
		SLOT = 19
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = recruitment_office
		SLOT = 20
		ALLOYS = 50
		DAYS = 718
	}
}

headquarters_mineral_nsc_template = {
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 11
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 12
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 13
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 14
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 15
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 16
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 17
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 18
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 19
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 20
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
	fill_starbase_slot = {
		BUILDING = target_uplink_computer
		SLOT = 16
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = disruption_field
		SLOT = 17
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = communications_jammer
		SLOT = 18
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = crew_quarters
		SLOT = 19
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = recruitment_office
		SLOT = 20
		ALLOYS = 50
		DAYS = 718
	}
}

headquarters_astromining_nsc_template = {
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 1
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 2
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 3
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 4
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 5
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 6
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 7
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 8
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 9
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 10
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 11
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 12
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 13
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 14
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 15
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 16
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 17
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 18
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 19
		ALLOYS = 25
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = astromining_bay
		SLOT = 20
		ALLOYS = 25
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = astromining_hub
		SLOT = 4
		ALLOYS = 50
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
	fill_starbase_slot = {
		BUILDING = target_uplink_computer
		SLOT = 16
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = disruption_field
		SLOT = 17
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = communications_jammer
		SLOT = 18
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = crew_quarters
		SLOT = 19
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = recruitment_office
		SLOT = 20
		ALLOYS = 50
		DAYS = 718
	}
}

headquarters_trade_hub_nsc_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 4
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 8
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 9
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 11
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 12
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 13
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 14
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 15
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 16
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 17
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 18
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 19
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 20
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
	fill_starbase_slot = {
		BUILDING = target_uplink_computer
		SLOT = 16
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = disruption_field
		SLOT = 17
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = communications_jammer
		SLOT = 18
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = crew_quarters
		SLOT = 19
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = recruitment_office
		SLOT = 20
		ALLOYS = 50
		DAYS = 718
	}
}

headquarters_mixed_nsc_template = {
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 3
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 4
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 5
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 6
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 7
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 8
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 9
		TECH_1 = tech_alloys_1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 10
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 11
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 12
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 13
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 14
		TECH_1 = tech_alloys_1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 15
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = trading_hub
		SLOT = 16
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = solar_panel_network
		SLOT = 17
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = asteroid_mining
		SLOT = 18
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 19
		TECH_1 = tech_alloys_1
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = anchorage
		SLOT = 20
		ALLOYS = 50
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
	fill_starbase_slot = {
		BUILDING = target_uplink_computer
		SLOT = 16
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = disruption_field
		SLOT = 17
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = communications_jammer
		SLOT = 18
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = crew_quarters
		SLOT = 19
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = recruitment_office
		SLOT = 20
		ALLOYS = 50
		DAYS = 718
	}
}

headquarters_alloy_nsc_template = {
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 1
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 2
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 3
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 4
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 5
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 6
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 7
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 8
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 9
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 10
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 11
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 12
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 13
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 14
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 15
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 16
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 17
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 18
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 19
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}
	fill_starbase_slot = {
		MODULE = space_foundry
		SLOT = 20
		TECH_1 = tech_alloys_1
		ALLOYS = 75
		DAYS = 178
	}

	fill_starbase_slot = {
		BUILDING = construction_office
		SLOT = 1
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = resource_silo
		SLOT = 2
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = hydroponics_bay
		SLOT = 3
		TECH_1 = tech_hydroponics
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 4
		ALLOYS = 100
		DAYS = 298
	}
	fill_starbase_slot = {
		BUILDING = artifact_silo
		SLOT = 5
		TECH_1 = tech_archaeostudies
		ALLOYS = 150
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = synthetic_gase_fabricator
		SLOT = 6
		TECH_1 = tech_exotic_gases
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_crystal_fabricator
		SLOT = 7
		TECH_1 = tech_rare_crystals
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = synthetic_volatile_motes_fabricator
		SLOT = 8
		TECH_1 = tech_volatile_motes
		ALLOYS = 200
		DAYS = 498
	}
	fill_starbase_slot = {
		BUILDING = navcom_ai
		SLOT = 9
		ALLOYS = 250
		DAYS = 720
	}
	fill_starbase_slot = {
		BUILDING = command_center
		SLOT = 10
		TECH_1 = tech_command_matrix
		ALLOYS = 250
		DAYS = 360
	}
	fill_starbase_slot = {
		BUILDING = reinforced_defenses
		SLOT = 11
		ALLOYS = 150
		DAYS = 398
	}
	fill_starbase_slot = {
		BUILDING = strategic_defenses
		SLOT = 12
		ALLOYS = 150
		DAYS = 648
	}
	fill_starbase_slot = {
		BUILDING = adv_starbase_defenses
		SLOT = 13
		ALLOYS = 200
		DAYS = 998
	}
	fill_starbase_slot = {
		BUILDING = starbase_ai
		SLOT = 14
		ALLOYS = 350
		DAYS = 718
	}
	fill_starbase_slot = {
		BUILDING = repair_module
		SLOT = 15
		ALLOYS = 50
		DAYS = 300
	}
	fill_starbase_slot = {
		BUILDING = target_uplink_computer
		SLOT = 16
		ALLOYS = 100
		DAYS = 358
	}
	fill_starbase_slot = {
		BUILDING = disruption_field
		SLOT = 17
		ALLOYS = 100
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = communications_jammer
		SLOT = 18
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = crew_quarters
		SLOT = 19
		ALLOYS = 50
		DAYS = 178
	}
	fill_starbase_slot = {
		BUILDING = recruitment_office
		SLOT = 20
		ALLOYS = 50
		DAYS = 718
	}
}

reset_auto_outfit_starbase = {
	if = {
		limit = {
			OR = {
				is_variable_set = starbase_current_module_slot
				is_variable_set = starbase_current_building_slot
			}
		}
		set_variable = {
			which = starbase_current_module_slot
			value = 0
		}
	}

	remove_starbase_flag = auto_shipyard_starbase_flag
	remove_starbase_flag = auto_anchorage_starbase_flag
	remove_starbase_flag = auto_energy_starbase_flag
	remove_starbase_flag = auto_mineral_starbase_flag
	remove_starbase_flag = auto_alloy_starbase_flag
	remove_starbase_flag = auto_trade_starbase_flag
	remove_starbase_flag = auto_mixed_starbase_flag
	remove_starbase_flag = auto_astromining_starbase_flag
}

fill_starbase_slot = {
	[[MODULE]
		if = {
			limit = {
				NOT = {
					is_variable_set = starbase_current_module_slot
				}
			}
			set_variable = {
				which = starbase_current_module_slot
				value = 0
			}
		}
	]
	if = {
		limit = {
			[[!MODULE]
				always = no
			]
			NOR = {
				has_starbase_flag = auto_outfitting_starbase_flag
				has_starbase_flag = auto_outfit_starbases_ready_flag
				has_starbase_flag = auto_upgrading_starbase_flag
				check_variable = {
					which = starbase_current_module_slot
					# Do not take the > off, galaxy might blow up
					value >= $SLOT$
				}
			}
			root = {
				[[TECH_1]
					has_technology = $TECH_1$
				]
				[[ALLOYS]
					resource_stockpile_compare = {
						resource = alloys
						value >= $ALLOYS$
						mult = value:positive_modifier_mult|MODIFIER|starbase_modules_cost_mult|
					}
				]
			}
		}
		set_starbase_flag = auto_outfit_starbases_ready_flag
		set_timed_starbase_flag = {
			flag = auto_outfitting_starbase_flag
			days = root.value:speed_modifier_mult|DAYS|$DAYS$|MODIFIER|starbase_module_build_speed_mult|
		}
		fleet = {
			set_variable = {
				which = lazy_automation_month_timer
				value = root.value:days_to_months_speed_converter|DAYS|$DAYS$|MODIFIER|starbase_module_build_speed_mult|
			}
		}
		root = {
			[[ALLOYS]
				add_resource = {
					alloys = $ALLOYS$
					mult = value:negative_modifier_mult|MODIFIER|starbase_modules_cost_mult|
				}
			]
		}
	}
	if = {
		limit = {
			[[!MODULE]
				always = no
			]
			NOR = {
				has_starbase_flag = auto_outfitting_starbase_flag
				has_starbase_flag = auto_upgrading_starbase_flag
				check_variable = {
					which = starbase_current_module_slot
					# Do not take the > off, galaxy might blow up
					value >= $SLOT$
				}
			}
			has_starbase_flag = auto_outfit_starbases_ready_flag
		}
		
		set_starbase_module = {
			slot = $SLOT$
			module = $MODULE$
		}

		remove_starbase_flag = auto_outfit_starbases_ready_flag

		set_variable = {
			which = starbase_current_module_slot
			value = $SLOT$
		}

		root = {
			# create_message = {
			# 	type = AUTO_OUTFIT_STARBASE_MESSAGE_TYPE
			# 	localization = AUTO_OUTFIT_STARBASE_MESSAGE_TYPE_DESC
			# 	days = 30
			# 	target = prev.solar_system
			# 	variable = {
			# 		type = name
			# 		localization = FLEET
			# 		scope = prev
			# 	}
			# 	variable = {
			# 		type = name
			# 		localization = SYSTEM
			# 		scope = prev.solar_system
			# 	}
			# }
		}
	}

	[[BUILDING]
		if = {
			limit = {
				NOT = {
					is_variable_set = starbase_current_building_slot
				}
			}
			set_variable = {
				which = starbase_current_building_slot
				value = 0
			}
		}
	]
	if = {
		limit = {
			[[!BUILDING]
				always = no
			]
			NOR = {
				has_starbase_flag = auto_outfitting_starbase_flag
				has_starbase_flag = auto_outfit_starbases_ready_flag
				has_starbase_flag = auto_upgrading_starbase_flag
				check_variable = {
					which = starbase_current_building_slot
					# Do not take the > off, galaxy might blow up
					value >= $SLOT$
				}
			}
			root = {
				[[TECH_1]
					has_technology = $TECH_1$
				]
				[[ALLOYS]
					resource_stockpile_compare = {
						resource = alloys
						value >= $ALLOYS$
						mult = value:positive_modifier_mult|MODIFIER|starbase_buildings_cost_mult|
					}
				]
			}
		}
		set_starbase_flag = auto_outfit_starbases_ready_flag
		set_timed_starbase_flag = {
			flag = auto_outfitting_starbase_flag
			days = root.value:speed_modifier_mult|DAYS|$DAYS$|MODIFIER|starbase_building_build_speed_mult|
		}
		fleet = {
			set_variable = {
				which = lazy_automation_month_timer
				value = root.value:days_to_months_speed_converter|DAYS|$DAYS$|MODIFIER|starbase_building_build_speed_mult|
			}
		}
		root = {
			[[ALLOYS]
				add_resource = {
					alloys = $ALLOYS$
					mult = value:negative_modifier_mult|MODIFIER|starbase_buildings_cost_mult|
				}
			]
		}
	}
	if = {
		limit = {
			[[!BUILDING]
				always = no
			]
			NOR = {
				has_starbase_flag = auto_outfitting_starbase_flag
				has_starbase_flag = auto_upgrading_starbase_flag
				check_variable = {
					which = starbase_current_building_slot
					# Do not take the > off, galaxy might blow up
					value >= $SLOT$
				}
			}
			has_starbase_flag = auto_outfit_starbases_ready_flag
		}
		
		set_starbase_building = {
			slot = $SLOT$
			building = $BUILDING$
		}

		remove_starbase_flag = auto_outfit_starbases_ready_flag

		set_variable = {
			which = starbase_current_building_slot
			value = $SLOT$
		}

		root = {
			# create_message = {
			# 	type = AUTO_OUTFIT_STARBASE_MESSAGE_TYPE
			# 	localization = AUTO_OUTFIT_STARBASE_MESSAGE_TYPE_DESC
			# 	days = 30
			# 	target = prev.solar_system
			# 	variable = {
			# 		type = name
			# 		localization = FLEET
			# 		scope = prev
			# 	}
			# 	variable = {
			# 		type = name
			# 		localization = SYSTEM
			# 		scope = prev.solar_system
			# 	}
			# }
		}
	}
}