Closed catt0 closed 3 years ago
Missing for a complete 1.1 update is fixing util.get_possible_noise_expression_properties and making use of the newly added LuaGameScript::map_gen_presets. Additional test would be running it with https://mods.factorio.com/mod/fractured-world and making sure new game+ works with the changes (it reuses some util functions and gui files).
Thanks for the pointers! I added support for loading a preset in the GUI. Also I added two special presets:
I tested it with Fractured world (updated its json to allow loading in 1.1, no further change) and was able to change the generator on the fly. The custom properties are also displayed and loaded from the preset. I attached two screenshots showing the different generators and the new preset selection. I am not entirely happy with how the GUI looks atm, but it works (tm).
New game+ runs into the same error as this mod upon opening its GUI. A quick check of its code showed that it most likely can use the same fixes as this commit, but I have not applied them.
As for util.get_possible_noise_expression_properties: I am not sure what needs fixing. I understand that these are properties that should be displayed in the GUI to be modified. However from 1.0 to 1.1 nothing was changed there according to the wiki. Also the GUI shows the same options (minus planet size, which is explicitly disabled) as the new game screen. Any more information on this?
Edit: On a modding usability note: Converting a MapGenPreset into MapGenSettings is annoying and can break on updates to the game that change defaults or add new values. However the game already needs to do the same work when loading a preset. Exposing this as an API would save a lot of code in this change and prevent breakage on updates.
Why it's not merged yet? Is there any other issues?
Why it's not merged yet? Is there any other issues?
There were the following issues:
Unfortunately, due to these issues I could not use this pull request.
All changes seem to be related to a change in 1.1 to only accept strings for the textfield.text property.
I tested this in the editor and the changes are visible in newly generated chunks. I tested resource generation, biter generation and land generation (trees, cliffs and water). I am also using it in my heavily modded savegame to tweak the evolution state and have not run into a problem. If there are any other tests I could do, feel free to suggest them.