[0.17] surface.map_gen_settings .starting_area = none, seems to be ignored

Bugs that are actually features.
staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

[0.17] surface.map_gen_settings .starting_area = none, seems to be ignored

Post by staviq »

When creating a new surface, settings starting area to "none" still results in starting area having water.
This was not the case for 0.16, and lua api does not mention any changes.

EDIT:
Steps to reproduce:
1. Start a new game with the NiceFill mod.
2. Place landfill anywhere in the starting area.
3. NiceFill mod creates a surface "NiceFill_nauvis" with starting area set to none, yet the new surface contains water in the starting area.



See mod "NiceFill" on the mod portal ( just update info to 0.17 )

Or this is the part of the code:

Code: Select all

local map_gen_settings = evtsurface.map_gen_settings
			
			--map_gen_settings.autoplace_controls = nil
			--map_gen_settings.autoplace_controls = {}
			
			for k,v in pairs(map_gen_settings.autoplace_controls) do
				if DEBUG then log( serpent.block( k ) ) end
				if DEBUG then log( serpent.block( v ) ) end
			end
			
			map_gen_settings.autoplace_controls["enemy-base"] = {frequency="none",size="none",richness="none"}
			map_gen_settings.autoplace_controls["trees"] = {frequency="none",size="none",richness="none"}
			-- map_gen_settings.default_enable_all_autoplace_controls = false
			map_gen_settings.autoplace_settings =
			{
				entity =
				{
					treat_missing_as_default = false,
					settings =
					{
						frequency = "none",
						size = "none",
						richness = "none"
					}
				},
				decorative =
				{
					treat_missing_as_default = false,
					settings =
					{
						frequency = "none",
						size = "none",
						richness="none"
					}
				}
			}
			
			--printf( event.player_index, serpent.block( map_gen_settings.cliff_settings ) )
			--printf( event.player_index, serpent.block( map_gen_settings.autoplace_settings ) )
			if DEBUG then
				log( serpent.block( map_gen_settings.cliff_settings ) )
				log( serpent.block( map_gen_settings.autoplace_settings ) )
			end
			
			map_gen_settings.water = "none"
			map_gen_settings.starting_area = "none"
			map_gen_settings.peaceful_mode = true
			
			map_gen_settings.cliff_settings = {
				cliff_elevation_0 = 0,
				cliff_elevation_interval = 0,
				name = "cliff"
			}
			
			-- if not pcall(game.create_surface( "NiceFill", map_gen_settings )) then
				-- log( "Failed to create surface " .. serpent.block( map_gen_settings ) )
			-- end
			
			log( serpent.block( map_gen_settings ) )
			
			if pcall( game.create_surface,nicename, map_gen_settings ) then
				if DEBUG then log( "NiceFill surface success." ) end
			else
				log( "NiceFill surface fail." )
				force_debug( "NiceFill failed create surface. Did you disable or enable any mods mid-game ?" );
			end

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5246
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17] surface.map_gen_settings .starting_area = none, seems to be ignored

Post by Klonan »

Starting area generally only affects biters in 0.17:
Image

staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

Re: [0.17] surface.map_gen_settings .starting_area = none, seems to be ignored

Post by staviq »

Klonan wrote:
Wed Feb 27, 2019 2:03 pm
Starting area generally only affects biters in 0.17:
Image
Ok, so now any additional game surface forcibly has water in the middle of it ?

Doesn't this defeat the purpose of multiple surfaces ?

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5246
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17] surface.map_gen_settings .starting_area = none, seems to be ignored

Post by Klonan »

staviq wrote:
Wed Feb 27, 2019 8:25 pm
Ok, so now any additional game surface forcibly has water in the middle of it ?

Doesn't this defeat the purpose of multiple surfaces ?
Yes

I don't see how multiple surfaces is related to the starting water,
If you don't like it, you can set tiles over it, or create the surface with no starting points

staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

Re: [0.17] surface.map_gen_settings .starting_area = none, seems to be ignored

Post by staviq »

Klonan wrote:
Wed Feb 27, 2019 8:28 pm
staviq wrote:
Wed Feb 27, 2019 8:25 pm
Ok, so now any additional game surface forcibly has water in the middle of it ?

Doesn't this defeat the purpose of multiple surfaces ?
Yes

I don't see how multiple surfaces is related to the starting water,
If you don't like it, you can set tiles over it, or create the surface with no starting points
Maybe i'm explaining this wrong.

I'm trying to update my mod NiceFill to 0.17.
It works by creating a copy of the nauvis surface as a new surface except without water and without starting area.
When user places the landfill in the nauvis, mod reads tile texture from the additional surface and replaces it in the nauvis.
That's how i access the map gen to get the correct texture.

In 0.17 if i create a copy of the nauvis surface with no water and no starting area, there is still water in the starting area on the new additional surface and so the mod cannot detect what texture should be there.

How should i create a new surface with the same settings as nauvis, except absolutely no water ?

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5246
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17] surface.map_gen_settings .starting_area = none, seems to be ignored

Post by Klonan »

staviq wrote:
Wed Feb 27, 2019 8:52 pm
How should i create a new surface with the same settings as nauvis, except absolutely no water ?
Create it with `starting_points = {}` in the map_gen_settings

staviq
Fast Inserter
Fast Inserter
Posts: 129
Joined: Wed Jun 29, 2016 1:22 pm
Contact:

Re: [0.17] surface.map_gen_settings .starting_area = none, seems to be ignored

Post by staviq »

Klonan wrote:
Wed Feb 27, 2019 10:03 pm
staviq wrote:
Wed Feb 27, 2019 8:52 pm
How should i create a new surface with the same settings as nauvis, except absolutely no water ?
Create it with `starting_points = {}` in the map_gen_settings
Works like a charm, Thanks !

Post Reply

Return to “Not a bug”