Page 1 of 1

Map Gen settings to create an infinite grass world?

Posted: Sat May 04, 2019 9:42 pm
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.

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

Posted: Sun May 05, 2019 12:35 am
by DaveMcW
I would like to do this too.

It looks like most blank map mods scripts just delete everything in on_chunk_generated().

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

Posted: Sat May 25, 2019 9:33 am
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
    },
  })

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

Posted: Sun May 26, 2019 11:05 pm
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},
});