[0.17.37] Setting seed for custom map preset does not work

Bugs that are actually features.
Post Reply
RoseQuartz
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Feb 25, 2019 2:32 pm
Contact:

[0.17.37] Setting seed for custom map preset does not work

Post by RoseQuartz »

Action
create a mod with the following data.lua

Code: Select all

data.raw["map-gen-presets"]["default"]["foo"] = {
    order = "d",
    basic_settings = {
        seed = 392430818
    }
}
(key MapGenSettings.seed from https://lua-api.factorio.com/latest/Con ... enSettings)

Expected Result
Preset has seed 392430818

Actual Result
Preset has random seed

This is probably a mistake in the documentation like viewtopic.php?f=11&t=69546. If it is not and it would help you reproduce the issue, I can provide a complete minimal example mod.

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [0.17.37] Setting seed for custom map preset does not work

Post by Bilka »

You are looking at the wrong documentation. The map gen presets are part of the data stage which is documented on the wiki, not on lua-api.factorio.com (which is about run-time scripting). Here is the doc for the seed which confirms the behaviour that you are observing: https://wiki.factorio.com/Types/MapGenPreset#seed
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

RoseQuartz
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Feb 25, 2019 2:32 pm
Contact:

Re: [0.17.37] Setting seed for custom map preset does not work

Post by RoseQuartz »

Thanks for the correction on me using the wrong documentation here and in the other thread.

What exactly does "Read by the game, but not used or set in the GUI. " mean? If I pick the preset and dont touch anything, the seed is not used.
How exactly is the seed being "read by the game"? Is there any other way to set the seed that is used for map generation in my mod so that it works like the GUI field or ideally leads to the GUI field being set?

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [0.17.37] Setting seed for custom map preset does not work

Post by Bilka »

It means that the game reads "seed" and then doesn't do anything with it.

No, there is no way to set seed from mods that I know.
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 “Not a bug”