function starnode_setup()
	game.newStarnodeGenerator("nexus",3,7)
	if game.hardcore == 0 then generator.level = 1 else generator.level = 2 end
	
	game.newMessage("DANGEROUS NEMESIS CIVILIANS DETECTED", "stolenrobot")
	game.newMessage("MAXIMIZE DESRUCTION OF NEMISIS COLONIES FOR HIGH SCORE", "stolenrobot")
	
	--add any survivors that haven't already been encountered
	generator.addSurvivors()
	
	-- place gate at first room
	generator.placeRoom("gate", 0)
	actor.offsety = 42
	
	--shop right after the gate
	generator.placeRoom("shop", 1)
	
	--if we're doing this map only
	if game.playthrough == 0 then
		generator.startingPoints = 750
		generator.startingPods = 1
	end
	
	-- place boss at final room
	generator.placeRoom("boss_dodongo", generator.het-1)
	
	--add a gate right past the boss
	generator.placeRoom("gate", generator.het)
	--actor.addEvent("gate", 6)
	actor.addEvent("winnerisyou", 6)
	actor.addEvent("dest_tartarus")
	
	--paint some backgrounds
	for i = 0, generator.het do
		generator.paintActor("terrain_rotteneggnebula.lua", i)
	end
	
	-- ======== TERRAIN ======== --
	
	-- layer 0 -- backgrounds
	--generator.setRoomLayer(0)
	--generator.addRoom("empty", 100)
	--generator.addRoom("comets", 30)
	
	generator.nextRoomLayer()
	generator.addRoom("empty", 50)
	generator.addRoom("nebula_fog_light", 25)
	generator.addRoom("nebula_storm_heavy", 5)
	generator.addRoom("shop", 10)
	generator.addRoom("planet_nemesis", 35)
	
	generator.nextRoomLayer()
	generator.addRoom("empty", 70)
	generator.addRoom("pixel", 50)
	generator.addRoom("cryopods", 30)
	--generator.addRoom("barnacles", 10)
	generator.addRoom("gravitywells", 20)
	generator.addRoom("anemones", 20)
	
	-- layer 1 -- stuff
	generator.nextRoomLayer()
	generator.addRoom("empty", 30)
	generator.addRoom("crate_points", 30)
	if game.hardcore == 0 then generator.addRoom("crate_equipment", 10) end
	
	-- layer 2 -- fog
	--generator.nextRoomLayer()
	--generator.addRoom("empty", 50)
	--generator.addRoom("nebula_fog_light", 90)
	--generator.addRoom("nebula_fog_heavy", 40)
	--generator.addRoom("nebula_storm_light", 10)
	--generator.addRoom("nebula_storm_heavy", 5)
	
	-- layer 3 -- crunchy terrain
	generator.nextRoomLayer()
	generator.addRoom("empty", 20)
	generator.addRoom("asteroids_plain", 60)
	generator.addRoom("asteroids_bighard", 20)
	
	generator.nextRoomLayer()
	generator.addRoom("empty", 60)
	generator.addRoom("asteroids_gems", 25)
	generator.addRoom("asteroids_hard", 25)
	
	-- layer 4 -- hazards
	generator.nextRoomLayer()
	generator.addRoom("empty", 130)
	generator.addRoom("micrometeors", 45)
	generator.addRoom("asteroids_explode", 30)
	generator.addRoom("mines", 60)
	
	--generator.nextRoomLayer()
	--generator.addRoom("empty", 100)
	--generator.addRoom("eggs", 20)
	
	--generator.nextRoomLayer()
	--generator.addRoom("empty", 100)
	--generator.addRoom("anemones", 10)
	
	--generator.nextRoomLayer()
	--generator.addRoom("empty", 100)
	--generator.addRoom("spikeflowers", 30)
	
	generator.nextRoomLayer()
	generator.addRoom("empty", 100)
	generator.addRoom("gasbags", 10)
	
	generator.nextRoomLayer()
	generator.addRoom("empty", 140)
	generator.addRoom("cuttlefish", 10)
	
	-- ======== ENEMIES======== --
	
	--ENEMY GROUPS
	generator.addMobGroup("actor_interceptor.lua", "A", 8)
	generator.addMobGroup("actor_turret.lua", "A", 2)
	generator.addMobGroup("actor_blinkturret.lua", "A", 2)
	generator.addMobGroup("actor_beamturret.lua", "A", 2)
	
	generator.addMobGroup("actor_artillery.lua", "B", 2)
	generator.addMobGroup("actor_artillery2.lua", "B", 2)
	generator.addMobGroup("actor_node.lua", "B", 2)
	generator.addMobGroup("actor_blinkturret.lua", "B", 2)
	generator.addMobGroup("actor_pillbug.lua", "B", 4)
	generator.addMobGroup("actor_interceptor2.lua", "B", 2)
	generator.addMobGroup("actor_beamturret.lua", "B", 2)
	generator.addMobGroup("actor_lancer.lua", "B", 3)
	generator.addMobGroup("actor_frigate.lua", "B", 1)
	
	generator.addMobGroup("actor_lancer.lua", "C", 5)
	generator.addMobGroup("actor_destrier.lua", "C", 5)
	generator.addMobGroup("actor_artillery2.lua", "C", 3)
	generator.addMobGroup("actor_bulwark.lua", "C", 1)
	generator.addMobGroup("actor_beamturret2.lua", "C", 3)
	generator.addMobGroup("actor_frigate.lua", "C", 4)
	
	generator.addMobGroup("actor_bubbledrone.lua", "Z", 4)
	generator.addMobGroup("actor_node.lua", "Z", 2)
	generator.addMobGroup("actor_pulsardrone.lua", "Z", 4)
	
	--ENCOUNTERS
	generator.nextRoomLayer()
	--generator.addRoom("empty", 30)
	
	generator.addRoom("encounter_31", 30)
	generator.addRoom("encounter_32", 30)
	generator.addRoom("encounter_33", 30)
	generator.addRoom("encounter_34", 30)
	generator.addRoom("encounter_35", 30)
	generator.addRoom("encounter_36", 30)
	generator.addRoom("encounter_37", 30)
	generator.addRoom("encounter_38", 30)
	generator.addRoom("encounter_39", 30)

end