Allow pre-defined templates to be made (and saved) for the map generation config.
A template would set the options to that as defined in the file (config option not specified by the file simply remain unchanged).
Options can still be changed after a template is chosen, a template simply does a once-off set of the config values.
Reasons
There are certain config options that I enjoy playing with, without wanting to go as far as using a map exchange string (which also specifies the world seed). I'd like to be able to save and load them, without having to remember and re-setup each time.
Especially when more resource types are introduced via mods, it can become a pain to set everything to the values that I enjoy. (I know they retain unless you quit the game, but you don't always realize a map start is bad until you've played a bit. Which often includes saving and quitting and thus losing the settings.)
Predefined templates shipped with the game for 'easy', 'medium', and 'hard' will also make map generation easier to understand for new players (at least I didn't really understand the impact of changing the settings until I had played through a game once. I had messed with the settings before I played my first game, and only afterwards had I understood what I had done. And only then really when I had done several map generations in the map editor to see what it results in.)
Overhaul Mods can also provide one or two 'suggested' map-gen-config option files, which help people new to the mod to get it with more than just pure 'normal' settings.
Description
A template file could look something like this:
Code: Select all
{
type = "map-gen-template",
name = "easy",
-- description = "", -- This is in the locale file.
peaceful_mode = false,
terrain_segmentation = 3, -- 1 (Very Low) -> 5 (Very High)
water = 3, -- 0 (Only in starting area) -> 5 (Very Big)
starting_area = 5, -- 0 (None) -> 5 (Very Big)
resource_configs =
{
{
name = "iron-ore",
frequency = 4, -- 1 (Very Low) -> 5 (Very High)
size = 3, -- 0 (None) -> 5 (Very Big)
richness = 5, -- 1 (Very Poor) -> 5 (Very Rich)
},
{
name = "copper-ore",
frequency = 4, -- 1 (Very Low) -> 5 (Very High)
size = 3, -- 0 (None) -> 5 (Very Big)
richness = 5, -- 1 (Very Poor) -> 5 (Very Rich)
},
{
name = "coal",
frequency = 4, -- 1 (Very Low) -> 5 (Very High)
size = 3, -- 0 (None) -> 5 (Very Big)
richness = 5, -- 1 (Very Poor) -> 5 (Very Rich)
},
{
name = "stone",
frequency = 4, -- 1 (Very Low) -> 5 (Very High)
size = 3, -- 0 (None) -> 5 (Very Big)
richness = 5, -- 1 (Very Poor) -> 5 (Very Rich)
},
{
name = "crude-oil",
frequency = 4, -- 1 (Very Low) -> 5 (Very High)
size = 4, -- 0 (None) -> 5 (Very Big)
richness = 4, -- 1 (Very Poor) -> 5 (Very Rich)
},
{
name = "aliens",
frequency = 1, -- 1 (Very Low) -> 5 (Very High)
size = 3, -- 0 (None) -> 5 (Very Big)
richness = 5, -- 1 (Very Poor) -> 5 (Very Rich)
}
}
}