Allow settings to be set 'hidden'

User avatar
lovely_santa
Filter Inserter
Filter Inserter
Posts: 502
Joined: Sat Feb 18, 2017 9:41 pm
Contact:

Allow settings to be set 'hidden'

Post by lovely_santa »

Hi,

When creating a mod, we can add prerequisites on other mods. But then we have settings, imagine mod Y depends on mod X becose mod Y wants to use some functionality of mod X. Mod X on the other hand has that functionality marked as 'optional', meaning you can enable/disable it through a setting.

Use case: as of now, the mod Y must prompt the player if the settings in mod X aren't set correctly to its minimal requirements. If we look at most mods, settings-updates and settings-final-fixes aren't used to it's full potential... If we could set settings 'hidden', for example by a flag, then that setting would always use its 'default' assigned value.

This would mean that mod Y could change the default setting of mod X to its desired value, and then setting it hidden, so the player cannot change it. This would allow mod Y to not prompt the player anymore to make sure all settings are set correctly. This is not so much annoying when we're talking about a single setting for a single mod, but when we're talking several setting with several options on mods like bob & angel, this can get quite frustrating.

Kind regards
lovely_santa
You can find all my mods on the mod portal. Also helping on Arch666Angel's mods.
Image
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Allow settings to be set 'hidden'

Post by darkfrei »

+1
"hidden" or just "disabled" is very useful for mods with a lot of settings.
For example:
* Enable something [bool]
* Specify parameter if previous setting was enabled [int]

The second setting must be visible / enabled only when the first one is true and you don't need it when it was false.
User avatar
lovely_santa
Filter Inserter
Filter Inserter
Posts: 502
Joined: Sat Feb 18, 2017 9:41 pm
Contact:

Re: Allow settings to be set 'hidden'

Post by lovely_santa »

darkfrei wrote: Wed Apr 10, 2019 9:47 am For example:
* Enable something [bool]
* Specify parameter if previous setting was enabled [int]

The second setting must be visible / enabled only when the first one is true and you don't need it when it was false.
That might be neat, but adding conditional settings might not be easy to implement for the devs? The 'disabled/enabled' parameter might be neat for setting conditions when to enable it (similar on how dependency version requirements work in info.json?)

What I want however is for the setting to still be there, altered by the player for how mod X (the mod that made the setting) sees it, but hidden behind the curtain by mod Y and setting the fixed/desired (default) values that mod X will see).

Both settings might be nice to have.
You can find all my mods on the mod portal. Also helping on Arch666Angel's mods.
Image
Bilka
Factorio Staff
Factorio Staff
Posts: 3309
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Allow settings to be set 'hidden'

Post by Bilka »

Implemented:
0.18.20 changelog wrote:Added mod-setting value "hidden" to hide mod settings from the GUI.
and 83316
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
User avatar
lovely_santa
Filter Inserter
Filter Inserter
Posts: 502
Joined: Sat Feb 18, 2017 9:41 pm
Contact:

Re: Allow settings to be set 'hidden'

Post by lovely_santa »

I explicitly asked to use the default value defined in the settings prototype and not the default that the player has set it to, this has unwanted behaviour:
  • Assume mod X want a setting from mod Y to be set at option A, so it does set the default to that, and hides the setting.
  • Prior to loading my modpack, I first load mod Y, which will have the setting exposed (because mod X is not present to hide it). I manually set the setting to option B.
  • I load my modpack now, mod X and Y are present. Mod X will change the default value and hide the setting. Because the setting was stored in the mod-settings.dat file, option B will be used to load the game, independent if the setting is hidden or not.
=> Hidden settings will not appear in the settings menu, however they will load with their selected setting, which is not always the default setting, depending if it was present in the mod-settings.dat file

So by this I request that this is moved back to "Modding interface requests" instead of "Implemented mod requests".
You can find all my mods on the mod portal. Also helping on Arch666Angel's mods.
Image
Post Reply

Return to “Implemented mod requests”