Enable/Disable Autoplace For Surfaces

Post Reply
User avatar
Sauerkraut
Inserter
Inserter
Posts: 42
Joined: Fri Jul 17, 2015 3:37 pm
Contact:

Enable/Disable Autoplace For Surfaces

Post by Sauerkraut »

Currently all surfaces autogenerate similar "worlds". It would be nice if one could disable certain things on different surfaces. AFAIK tiles, trees, resources, biters(+spawner and worms) and doodads are autoplaced.

The specifications for a surface must be defined before the surface is generates, so I'd suggest an additional table as optional argument for the create_surface() function. I'd imagine something like this:

Code: Select all

game.create_surface("tatooine",game.surfaces["nauvis"].map_gen_settings,
{
    {
        to_set=game.tile_prototype["grass"]
        enable=false
    },
    {
        to_set=game.tile_prototype["grass-medium"]
        enable=false
    },
    {
        to_set=game.entity_prototype["tree-01"]
        enable=false
    },
    {
        to_set=game.entity_prototype["tree-02"]
        enable=false
    }
}    
)
So if I want to create a peaceful forest surface I'd disable desert-y tiles, enemies, dead trees, maybe even change resources.

I think the ability to change autoplace settings for different surfaces would be too much to ask for, but this should do it.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Enable/Disable Autoplace For Surfaces

Post by Rseding91 »

If you want to get ahold of me I'm almost always on Discord.

User avatar
Sauerkraut
Inserter
Inserter
Posts: 42
Joined: Fri Jul 17, 2015 3:37 pm
Contact:

Re: Enable/Disable Autoplace For Surfaces

Post by Sauerkraut »

Yes, but those autoplace controls only contain data about resources and enemies, not about tiles, trees and doodads.

StevilKnevil
Burner Inserter
Burner Inserter
Posts: 16
Joined: Thu May 25, 2017 8:03 pm
Contact:

Re: Enable/Disable Autoplace For Surfaces

Post by StevilKnevil »

It seems like a sensible extension would be to allow more types in the MapGenSettings autoplace_controls table so that you can include tile types and doodads.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Enable/Disable Autoplace For Surfaces

Post by Rseding91 »

OK, in 0.16 you can configure all of the autoplace settings for a given surface. You can also change map gen settings runtime for a surface if you want.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Implemented mod requests”