Save custom world presets / Custom map generator presets / Save/load map-exchange-string

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

UberWaffe
Fast Inserter
Fast Inserter
Posts: 202
Joined: Mon May 04, 2015 4:53 am
Contact:

Map Generator Config Templates

Post by UberWaffe »

Idea
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)
    }
  }
}

User avatar
TuckJohn
Filter Inserter
Filter Inserter
Posts: 335
Joined: Sat Jul 04, 2015 4:11 pm
Contact:

Re: Map Generator Config Templates

Post by TuckJohn »

I am all for it. Yes please

Alternatively, you could save what the map generation settings are at to a file, and whenever creating a world preset all of the drop-down menus to how they were last time. You would have to have a "reset to default" button, though.
~1200+ hours clocked in factorio. Avid KSP and Factorio player

Nemoricus
Fast Inserter
Fast Inserter
Posts: 175
Joined: Mon Jan 19, 2015 7:48 am
Contact:

User-Made Difficulty Presets

Post by Nemoricus »

With the addition of difficulty presets, it would be nice if players could make and name their own. I personally use a custom set of settings that doesn't match up neatly with any of the official presets, and it would be nice if I could save and load them.

Yes, map strings let you do this, but that doesn't let you give them a custom name and it requires you to save the string outside of the game if you want to use it later.

hanli427
Inserter
Inserter
Posts: 22
Joined: Wed Apr 26, 2017 4:55 pm
Contact:

Save custom world presets

Post by hanli427 »

With the new 0.15.x, there are a number of presets with the game, such as marathon, death world and rail world. But how about letting the players save their own custom presets for reusing, or sharing with others.

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: Save custom world presets

Post by impetus maximus »

+1

i'm trying to find a good setting for trains. would love to save, or share the setting i end up with.

welcome to the forums hanli427. :)

mattj256
Fast Inserter
Fast Inserter
Posts: 203
Joined: Sun Mar 27, 2016 7:25 am
Contact:

Re: Save custom world presets

Post by mattj256 »

+1

User avatar
Lav
Filter Inserter
Filter Inserter
Posts: 384
Joined: Mon Mar 27, 2017 10:12 am
Contact:

Re: Save custom world presets

Post by Lav »

+1. Was going to suggest this myself. Factorio now has enough options that restoring my custom preset is getting annoying.

hoho
Filter Inserter
Filter Inserter
Posts: 677
Joined: Sat Jan 18, 2014 11:23 am
Contact:

Re: Save custom world presets

Post by hoho »

+1

I was rather surprised that being able to save (and share) presets was not already in game. Having just a handful of them pre-made seems weird.

credomane
Filter Inserter
Filter Inserter
Posts: 278
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

Re: Save custom world presets

Post by credomane »

hoho wrote:Having just a handful of them pre-made seems weird.
The intention behind that was to enable someone to say I beat the game with this preset and everyone knows exactly what that is with what settings. Before death world/rail world/marathon would all very a little between users.

Not being able to create your own list of presets does suck. Mods can add new ones though. :/

hoho
Filter Inserter
Filter Inserter
Posts: 677
Joined: Sat Jan 18, 2014 11:23 am
Contact:

Re: Save custom world presets

Post by hoho »

credomane wrote:The intention behind that was to enable someone to say I beat the game with this preset and everyone knows exactly what that is with what settings. Before death world/rail world/marathon would all very a little between users.
Yes, I know why they added those premade ones. I was just surprised that people can't add to them :)

Karakaz
Inserter
Inserter
Posts: 22
Joined: Sat Jan 21, 2017 12:00 am
Contact:

Re: Save custom world presets

Post by Karakaz »

+1

User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: Save custom world presets

Post by 5thHorseman »

+1000 would instantly install a mod that added this (hint hint) :D

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Save custom world presets

Post by orzelek »

You do realize that custom preset changes actual map gen setting which are contained in map exchange string already?

There is nothing else tied to them - no special functionality etc. It's only changes to other tabs.

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

Re: Save custom world presets

Post by Rseding91 »

hanli427 wrote:With the new 0.15.x, there are a number of presets with the game, such as marathon, death world and rail world. But how about letting the players save their own custom presets for reusing, or sharing with others.
This is what the map exchange string is. Literally - it copies all settings in that display and restores them when pasting it into the exchange string field.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Lav
Filter Inserter
Filter Inserter
Posts: 384
Joined: Mon Mar 27, 2017 10:12 am
Contact:

Re: Save custom world presets

Post by Lav »

Copying a map exchange string is not the same as selecting a preset in the list - it requires a lot more manual actions and an outside storage. It also includes map seed, which is not needed for a preset.

When I find a set of map generation parameters which result in maps that I find interesting, I want that set to be available to me every time I start a new game. Storing a map exchange string in a separate file somewhere on the disk absolutely defeats that purpose - it's probably easier to setup all settings manually than bother with map exchange strings.

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: Save custom world presets

Post by impetus maximus »

boy do i feel dumb. :lol:

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Save custom world presets

Post by ssilk »

Lav wrote:Copying a map exchange string is not the same as selecting a preset in the list - it requires a lot more manual actions and an outside storage. It also includes map seed, which is not needed for a preset.
Agreed, it could be more comfortable, but I use a text-editor and paste the string and when I use it I can or cannot remove the seed.

I think the problem is, that there is a difference between the both use-cases:
A) I want to have filled out all of the configuration so that it can be used as preset to generate a new world.
B) I want to generate exactly the same world as in my (last) game.../I want to share this world
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
Lav
Filter Inserter
Filter Inserter
Posts: 384
Joined: Mon Mar 27, 2017 10:12 am
Contact:

Re: Save custom world presets

Post by Lav »

That's right, except presets list caters exclusively to the first option, but is incomplete at the moment.

bagaznal
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Jul 31, 2017 3:08 am
Contact:

Re: Save custom world presets

Post by bagaznal »

I found out how you can make your own custom preset!

If you want to proceed, you'll need two things:

Notepad++
Minor Coding knowledge (if you can edit minecraft configs and the such, that should be enough)

Go to this address on your computer:

C:\Program Files (x86)\Steam\steamapps\common\Factorio\data\base\prototypes

In this folder you will see a file that says map-gen-presets.lua. Open this with Notepad++

WARNING: BEFORE YOU PROCEED, MAKE A BACKUP OF THIS FILE. IF THE FORMATTING IN THIS FILE IS INCORRECT, THEN FACTORIO WILL FAIL TO START.

To create a "preset", you need to type it in the EXACT same format as the other. I attached a picture to explain some of it. Unfortunately, I have no clue as for specifics, all I know is that when I tested this, it made a new preset with a weird name, and it generated a world from it perfectly fine. Basically, just perfectly match the previous presets, and you should be good to go!
Attachments
This shows what the format should look similar to.
This shows what the format should look similar to.
map-generation.PNG (47.86 KiB) Viewed 6982 times

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Save custom world presets

Post by Jap2.0 »

Also, map strings don't carry over custom settings regarding biters and pollution (last I checked).
There are 10 types of people: those who get this joke and those who don't.

Post Reply

Return to “Ideas and Suggestions”