Now I understand more where the issue comes from, I did try generating the map using the Windows factorio version with the map exchange string. Using the editor I went to vulcanus, this time everything was correctly generated, the things it share in common were the cliff patterns, demolisher regions and the coal patches locations.
- 10-30-2024, 09-58-00.png (718.07 KiB) Viewed 1177 times
Then I tried checking the map settings using the lua command on the surface of vulcanus on both saves (Windows[map-gen-settings-vulcanus.json] and the Headless[map-gen-settings-vulcanus3.json] versions).
There I found out where the issue came from. On the Headless version where I was doing the playthrough, almost all the vulcanus settings had 0 defaults thus many vulcanus things weren't generated.
Code: Select all
/c helpers.write_file("map-gen-settings-vulcanus.json", helpers.table_to_json(game.player.surface.map_gen_settings))
Code: Select all
git diff map-gen-settings-vulcanus.json map-gen-settings-vulcanus3.json
I believe the issue comes from how someone can generate a map using the create option with specific settings in mind (
https://wiki.factorio.com/Multiplayer#D ... ess_server) the only option is using the
--map-gen-settings and
--map-settings arguments but there's not an option to use directly the map export string that contains all of the information.
In order to obtain the map-gen-setting.json from my particular map exchange string, I looked at the answers on this 5 years old post where the most recent answer was using this command:
viewtopic.php?t=71563
Code: Select all
/c helpers.write_file("map-gen-settings.json", helpers.table_to_json(game.player.surface.map_gen_settings))
But that map-gen-settings.json that I was using didn't contain the information about the other planets because it used
game.player.surface.map_gen_settings those are the settings specific for the surface of nauvis and that did work fine for the previous plays before Space Age.
But now after taking a deeper look at the lua-api seems I should have used
game.default_map_gen_settings instead. I have tesed out if this map-gen-settings-default.json and indeed it generated vulcanus properly and I guess the other planets too.
Code: Select all
/c helpers.write_file("map-gen-settings-default.json", helpers.table_to_json(game.default_map_gen_settings))
I think, an on going game can be fixed under /editor -> surfaces -> edit map gen settings.
Some possible solutions I can think to avoid this problem
1) Allowing to directly use the map exchange string as an argument for factorio --create
2) Updating the defaults to generate the map surfaces correctly(not just demolishers) if no information is present on map-gen-settings.
3) Doing some validity checks on factorio --create --map-gen-settings. Checking if the input json was generated using game.player.surface.map_gen_settings or game.default_map_gen_settings
4) Adding more documentation on how to generate the map-gen-settings and map-settings there is not much more than looking on the forums.