Map Gen settings to create an infinite grass world?

Place to get help with not working mods / modding interface.
User avatar
Gangsir
Inserter
Inserter
Posts: 20
Joined: Fri Jul 15, 2016 4:50 pm
Contact:

Map Gen settings to create an infinite grass world?

Post by Gangsir »

I can't seem to make heads or tails of the map gen settings system.

I'm looking to make a new surface that's just infinite grass in all directions (never generate ores, cliffs, trees, etc, just grass tiles, a blank pasture), but I can't figure out what I need to specify (or not specify).

I'd really appreciate some help on the matter.
I'm an administrator over at the Factorio wiki. If you have any questions about the wiki, or concerns, please do not hesitate to contact me. I'm on the subreddit (/r/factorio, /u/Gangsir) as well.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3714
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Map Gen settings to create an infinite grass world?

Post by DaveMcW »

I would like to do this too.

It looks like most blank map mods scripts just delete everything in on_chunk_generated().
User avatar
lovely_santa
Filter Inserter
Filter Inserter
Posts: 502
Joined: Sat Feb 18, 2017 9:41 pm
Contact:

Re: Map Gen settings to create an infinite grass world?

Post by lovely_santa »

Here you go, just made one (0.17.43):

Code: Select all

  game.create_surface("MyGrassySurfaceName", {
    -- TERRAIN SPECIFICATION --
    terrain_segmentation = 0,
    water  = 0, -- no water
    width  = 0, -- infinite
    height = 0, -- infinite
    
    -- AUTOPLACE SETTINGS --
    autoplace_controls = nil,
    default_enable_all_autoplace_controls = false, -- autoplace not set, disallow to get default controls
    autoplace_settings = nil,
    cliff_settings = nil, -- no cliffs
    seed   = 0, -- doesn't matter, just has to be something

    starting_area   = 0,    -- no starting area generation procedure
    starting_points = {},   -- no starting points on this map
    peaceful_mode   = true, -- doesn't mater, no biters are autoplaced

    property_expression_names = {
      ["moisture"            ] = 1,
      ["aux"                 ] = .5,
      ["temperature"         ] = -20,
      ["elevation"           ] = 1,
      ["cliffiness"          ] = 0,
      ["enemy-base-intensity"] = 0,
      ["enemy-base-frequency"] = 0,
      ["enemy-base-radius"   ] = 0
    },
  })
You can find all my mods on the mod portal. Also helping on Arch666Angel's mods.
Image
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3714
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Map Gen settings to create an infinite grass world?

Post by DaveMcW »

Thanks for the example!

I edited it down to just 3 lines and it still works:

Code: Select all

game.create_surface("my-surface", {
  starting_points = {},
  default_enable_all_autoplace_controls = false,
  property_expression_names = {cliffiness = 0},
});
Post Reply

Return to “Modding help”