mapseed, replay, cliff-settings in presets-file

Place to get help with not working mods / modding interface.
menschmaschine
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu Feb 02, 2017 5:39 pm
Contact:

mapseed, replay, cliff-settings in presets-file

Post by menschmaschine »

Greetings, since ages i wanted to make a map generator preset and after some hiatus now got a few steps
closer to my goal.
Which specifically is to include all settings into the "data-final-fixes"-file that are exposed
in the Presets-GUI.
That is, all but three.

1. The Mapseed
There are various spellings in the core-files, be it map-seed, or map_seed, but none work in the basic_settings section.

2. The Replay
I would prefer replays to be enabled by default when i use my preset. But neither repaly_enabled or enable_replay
work in the basic_settings section.

3. Cliffs
The last part that i cannot figure out how to control via a map generator preset are the cliffs.
In map-gen-settings.example.json is written:
"cliff_settings":
{
"name": "cliff",
"cliff_elevation_0": 10,
"cliff_elevation_interval": 10
},
but i do not know how to translate that into working settings for a presets-file, nor what those mentioned labels
actually mean regarding the usual frequency, size, richness -values that work so fine with all the other fields
for resources and terrain.

Also in map-gen-settings.example.json "peaceful_mode": false is mentioned and in this case, i could successfully
translate that syntax to peaceful_mode = true to make it work, but that does not seem to work for the cliffs.



I included my data-final-fixes.lua which works nicely apart from my three problems.
data-final-fixes.lua
(3.49 KiB) Downloaded 89 times
Maybe someone could help me out to leap over the finishline of my little project.

I am using the latest Factorio v16.51 without mods.
Further information will of course be provided, if requested.
I do not know however, what else to mention.
Bilka
Factorio Staff
Factorio Staff
Posts: 3309
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: mapseed, replay, cliff-settings in presets-file

Post by Bilka »

The map seed is just "seed", although while the game reads it, the field in the gui is not set.

Replays cannot be enabled/disabled based on preset.

The cliff settings are what you pasted into the post, put them under the basic_settings. Here is what they mean: https://lua-api.factorio.com/latest/Con ... ntSettings
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
menschmaschine
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu Feb 02, 2017 5:39 pm
Contact:

Re: mapseed, replay, cliff-settings in presets-file

Post by menschmaschine »

Ah, that's a bummer regarding the Seed and the Replay-setting.

I tried adding this to the basic_settings Section

Cliffs=
{
cliff_elevation_0 = 2.5,
cliff_elevation_interval = 2.5,
},

aswell as the original Syntax from map-gen-settings.example.json
but neither seem to work.
I tested this with both Settings set to the Minimum 2.5, (and the Maximum of 40)
but the Mapgenerator GUI still shows Frequency = normal and Size = normal.

Edit 001:
cliffs=
{
["cliff"] = { frequency = "very-low", size = "very-low" },
},
That does not work either, in fact, nothing seems to produce any change to the normal values.
Bilka
Factorio Staff
Factorio Staff
Posts: 3309
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: mapseed, replay, cliff-settings in presets-file

Post by Bilka »

menschmaschine wrote: Sat Dec 08, 2018 11:09 pm Cliffs=
{
cliff_elevation_0 = 2.5,
cliff_elevation_interval = 2.5,
},
You can't just randomly change the key. It has to be "cliff_settings" like you had in your first post.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
menschmaschine
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu Feb 02, 2017 5:39 pm
Contact:

Re: mapseed, replay, cliff-settings in presets-file

Post by menschmaschine »

Well, that did not work, so i tried other versions of syntax.
I am not a programmer and do not know how to add those settings/values/lines of code
to that file, which is why i am asking here since simply copying the
map-gen-settings.example.json example does not work.

I am beginning to wonder why it seems to be such a Problem simply posting the precise
Solution instead of hinting and saying "that is not how it is done".

But, as this is certainly not a matter to get agitated about,
i just leave it at that and focus on moving the remaining items from terrain to resources
in the map generator GUI.

*smiles* And in the End, those Cliffs DO look quite nice and add a strategical aspect to building a base.
(or simply walking about, like that poor fellow in that friday facts picture who got
himself backed into a dead-end *grins*)
Bilka
Factorio Staff
Factorio Staff
Posts: 3309
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: mapseed, replay, cliff-settings in presets-file

Post by Bilka »

menschmaschine wrote: Sun Dec 09, 2018 11:12 am I am beginning to wonder why it seems to be such a Problem simply posting the precise
Solution instead of hinting and saying "that is not how it is done".
I tend to help by explaining instead of simply presenting the finished product, since it usually means that the person understands what they are doing instead of simply copying it. If you simply want code, please say so in your post, I read it as you just wanting answers to your questions.

Here is example code using the cliff settings:

Code: Select all

basic_settings =
  {
    autoplace_controls =
    {
      ["iron-ore"] = { richness = "very-good", size = "very-big", frequency="very-low"}
    },
    starting_area = "very-big",
    cliff_settings =
    {
      cliff_elevation_0 = 2.5,
      cliff_elevation_interval = 2.5,
    }
  }
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Modding help”