Page 1 of 1

[Genhis][2.0.10] Vulcanus Map generation not working

Posted: Tue Oct 29, 2024 1:14 pm
by Hesiodich
On my playthrough when i land on vulcanus it only generates coal patches, demolishers and clifs. But the map generation is creating it on a grass land without the other resources. I've tried reloading from other saves but still is the same.
Im playing this on a headless server, I did generate the map with the cli using --map-gen-settings

~/factorio/bin/x64$ ./factorio --version
Version: 2.0.10 (build 79578, linux64, headless)
Version: 64
Map input version: 1.0.0-0
Map output version: 2.0.10-1
10-29-2024, 13-19-42.png
10-29-2024, 13-19-42.png (13.03 MiB) Viewed 1173 times
10-29-2024, 13-41-02.png
10-29-2024, 13-41-02.png (5.1 MiB) Viewed 1173 times
10-29-2024, 13-47-12.png
10-29-2024, 13-47-12.png (548.1 KiB) Viewed 1173 times

Re: [2.0.10] Vulcanus Map generation not working

Posted: Tue Oct 29, 2024 1:18 pm
by Genhis
Thanks for the report. Please attach your save file and the CLI command you used to generate the map.

Re: [2.0.10] Vulcanus Map generation not working

Posted: Tue Oct 29, 2024 2:10 pm
by Hesiodich
I've attached the savefile and the map-gen-settings I've used to create the map

These were my steps for creating the map-gen-settings from a exange string:

1) I generated the map using this string

Code: Select all

>>>eNp1U72LE0EUn7kYcuYSDRIU4TgjXCXEQq+wkOyohYjov7BONpPc4GY3zkfktDDgFSKCCDbaaGFjDqy0ECwCNgoKopXdyTUWgh5GsRDizO7OZncvPnhvX97vff3ebuYAAAWlYLGCr0jq+rbDZIvYPnUBQJYC0MZwaBUc7DpUkGRsl+PjVFLR8Xs9wuo+S+XtDjrWMx2LxCPdtXoTc5U8QJFa5bYrfUY9YveJJ5IF5bZ0Oz7DtuPSdlvnGt1rEMpd7LV4ElvouKQ5o6YSxoMl7GgJBYwCsBSCPdVNzOrGhe+lKEbxq1gQlsyfp8z3svcou1SsUtm1m5pnEil5WPYp37ltnvnO5dQmee4w3EsW7+cCM0G9jo0ZwXbXp1xIRtJF2cWrXLptyahjY4e27A5Z45rBNCEvGCGpySUhvQ4XxLMzvBYkw57iFfIFU7596TrYk4pX5oPZFyN9XzuUd1PrBvfcGB6xwnYqCg88eXVvsL4EtE5ugNpkolV5mypHK4CDcARUQSP56KKgdkrp6XgIhPB69dnZL9fuWzDMPIoiZzOKjJomcs44F9F/oWXjrCT6HA/kZ8IJhwo1IsqaR1MnBNc1COH26tatF3/GDfj36fbHC81LFuzfLI9/HX7eUKD+48K52Dx8oOWloQISK4TQZwu+f6flmwXzuqKqDTqhzOh8DsDKHuU9vqNMbRGY1RqmTRXBdiC/DZMt43yysjzUIU7q5kvavNEmGBhvBkMX3UUQHTLowWmKqj8Gkju0pgzfmrGvE/Mzi+x8EUkemcgymvEainpgKzZfc/E26p4fCuYXeoRgTjs6a6xi4S+NmFbhs4KCc+fij/KHZZ5wEsh3KxhVPLNy+x9FxUnK<<<
2) Then I've used the console to create the settings file

Code: Select all

 /c helpers.write_file("map-gen-settings.json", helpers.table_to_json(game.player.surface.map_gen_settings))
3) I've copied the file from %appdata%\Factorio\script-output into the server using scp
4) I used this command to create the map

Code: Select all

~/factorio/bin/x64/factorio --create ~/factorio/saves/Map.zip --map-gen-settings ~/factorio/data/map-gen-settings.json
5) I had realised the map was correctly generated but the deathworld settings werent applied, so i typed these commands on the game

Code: Select all

/c game.map_settings.pollution.ageing=0.5
/c game.map_settings.pollution.enemy_attack_pollution_consumption_modifier=0.5
/c game.map_settings.enemy_evolution.time_factor=0.00002
/c game.map_settings.enemy_evolution.pollution_factor=0.0000012

Re: [Genhis][2.0.10] Vulcanus Map generation not working

Posted: Wed Oct 30, 2024 11:19 am
by Hesiodich
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
10-30-2024, 09-58-00.png (718.07 KiB) Viewed 1059 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.

Re: [Genhis][2.0.10] Vulcanus Map generation not working

Posted: Wed Oct 30, 2024 1:17 pm
by Genhis
I was thinking about this issue a bit because it could be attributed to user error - applying Nauvis map gen settings globally. In the end I decided to do "solution 2" and enable autoplace objects which haven't been explicitly disabled. This will apply to all ungenerated planets in your save file.

The map exchange string idea in --create seems nice, we could consider it if there is demand from server owners.

Re: [Genhis][2.0.10] Vulcanus Map generation not working

Posted: Wed Oct 30, 2024 1:50 pm
by Hesiodich
Thanks for the reply :D