Page 1 of 1

Move runtime-global mod settings to Map generator

Posted: Wed Dec 12, 2018 8:26 pm
by Therax
A frequent point of confusion is that the settings accessed by Main menu -> Options -> Mod settings -> Map tab affect only new games, not existing saves. I have fielded several complaints that my mod is "not working" or "malfunctioning" due to this.

Suggestion:
1) Add a warning at the top of the existing Mod settings -> Map tab noting that changes made on that tab affect only new maps, and with instructions on how to change settings for an existing map, OR
2) Move the Mod settings -> Map tab to Main menu -> Play -> New game -> Map generator, alongside Resource settings, etc.

Re: Move runtime-global mod settings to Map generator

Posted: Thu Dec 13, 2018 8:53 pm
by Rseding91
I think you might be misunderstanding how settings work. If a player changes the setting you get an event Lua side and you're meant to react to the new value. In that regard changing those settings runtime *should* effect the map and your mod not doing that would be a bug.

Re: Move runtime-global mod settings to Map generator

Posted: Thu Dec 13, 2018 11:53 pm
by Nexela
@rseding, You are thinking from inside out. not outside in.

In a NEW game the runtime-global settings (and user) are set to whatever is set when edited from the main menu (or default)

Changing these settings FROM the main menu then loading an existing game doesn't change the current maps value. I assume intended because they are the "default" values for runtime-global

Therax's point is that this is not very clear to the end user of the mod. Who add the mod to their game and edit the runtime settings from the main menu and wonder why it doesn't work in their existing save.

So I second the opinion that this needs to be made more clear to the end user.

Re: Move runtime-global mod settings to Map generator

Posted: Fri Dec 14, 2018 7:04 am
by Optera
Just add a Line "Settings only apply to new games" to map and user settings when opened from main menu.
Potentially change the line to "Settings only apply to current game" when opened from running game.

Re: Move runtime-global mod settings to Map generator

Posted: Fri Dec 14, 2018 9:45 am
by bobingabout
I haven't tried it myself, but in theory, the settings are saved in the save game, so if the settings no longer match when the game is loaded, it SHOULD fire the same settings changed events as if you had changed them there and then in the running game.

I don't know what actually happens, but in theory that's what should happen.
at the very least, I think it does still fire the "mod configuration changed" event.

Re: Move runtime-global mod settings to Map generator

Posted: Fri Dec 14, 2018 4:23 pm
by Rseding91
Optera wrote:
Fri Dec 14, 2018 7:04 am
Just add a Line "Settings only apply to new games" to map and user settings when opened from main menu.
Potentially change the line to "Settings only apply to current game" when opened from running game.
Seems reasonable: "Settings only apply to new games or to the current running game". I'll make a note to add it once the new GUI for mod settings is finished.

Re: Move runtime-global mod settings to Map generator

Posted: Fri Dec 14, 2018 5:13 pm
by steinio
Rseding91 wrote:
Fri Dec 14, 2018 4:23 pm
Optera wrote:
Fri Dec 14, 2018 7:04 am
Just add a Line "Settings only apply to new games" to map and user settings when opened from main menu.
Potentially change the line to "Settings only apply to current game" when opened from running game.
Seems reasonable: "Settings only apply to new games or to the current running game". I'll make a note to add it once the new GUI for mod settings is finished.
:mrgreen: :D