prevent nauvis from generating?
Posted: Tue Sep 27, 2022 12:15 am
				
				Hi,
I'm trying to prevent Nauvis from generating in the first place, since it seems to take quite a bit of time to do when launching a new game and my mod is using it's own new surfaces without nauvis. Currently, I'm just deleting chunks after they are generated, even though nothing is generated except for empty tiles.
I have to start a new game during development and debugging, I've done it already 500 times, possibly going to go into the thousands in the future while making this mod, and each new game generates a new map unnecessarily adding to development time exponentially.
			I'm trying to prevent Nauvis from generating in the first place, since it seems to take quite a bit of time to do when launching a new game and my mod is using it's own new surfaces without nauvis. Currently, I'm just deleting chunks after they are generated, even though nothing is generated except for empty tiles.
Code: Select all
	local defaultSurface = game.surfaces[1]
	local gen_settings = defaultSurface.map_gen_settings
	defaultSurface.map_gen_settings = gen_settings
	for chunk in defaultSurface.get_chunks() do
		defaultSurface.delete_chunk({chunk.x, chunk.y})
	end
 
  But honestly, cutting off 30-60 seconds on each iteration multiplied by hundreds or even thousands of times generating a new world, the time adds up, just maybe not exponentially
   But honestly, cutting off 30-60 seconds on each iteration multiplied by hundreds or even thousands of times generating a new world, the time adds up, just maybe not exponentially  