Page 9 of 11
Re: [0.15] Mod setting/config interface - give your input
Posted: Wed Jul 05, 2017 11:41 am
by bobingabout
Mod sort order is based on the name of a mod.
I'm not sure how to decide the order either, probably just alphabetical of the internal mod name.
in any case, all settings of a mod will be grouped together, sorted by the setting's order tag, or setting's name if the order tag doesn't exist.
Re: [0.15] Mod setting/config interface - give your input
Posted: Wed Jul 05, 2017 1:59 pm
by moon69
Ha ha!!! It's all the
many Bob's settings that are pushing mine right to the bottom

Not concerned about it for release, but during development/testing I'm frequently having to scroll to the bottom to change/check options.
Sorting doesn't seem to based on internal or localised mod-name.
No big deal though... just curious.
Re: [0.15] Mod setting/config interface - give your input
Posted: Wed Jul 05, 2017 2:02 pm
by justarandomgeek
Doesn't anyone read
the docs?
Re: [0.15] Mod setting/config interface - give your input
Posted: Wed Jul 05, 2017 2:42 pm
by moon69
Thanks - makes sense!
I've looked at that Data Lifecycle page many times lately... but somehow missed the very top line

Re: [0.15] Mod setting/config interface - give your input
Posted: Fri Jul 14, 2017 1:49 am
by admo
I cannot solve why my mod setting is showing up in the UI as an unknown key. I tried to copy the simplest example I could find, Cardinal, but I don't understand what it is doing differently.
I added a settings.lua file and in it I placed this code:
Code: Select all
data:extend({
{
type = "bool-setting",
name = "research-causes-evolution-all-techs-equal",
setting_type = "startup",
default_value = 0,
order = "a",
}
})
Seemingly this should be enough to get my key to show up in the GUI but in the main menu under options->mods I instead have a checkbox titled:
Code: Select all
Unknown key:"research-causes-evolution-all-techs-equal"
Does anyone have advice or further instructions aside from the first post of this thread?
Re: [0.15] Mod setting/config interface - give your input
Posted: Fri Jul 14, 2017 1:57 am
by mickael9
The setting name is only an identifier, you need to define an actual name for it in the locale (translation) files, eg, in
locale/en/base.cfg:
Code: Select all
[mod-setting-name]
research-causes-evolution-all-techs-equal=Setting name here
[mod-setting-description]
research-causes-evolution-all-techs-equal=Optional setting description
Re: [0.15] Mod setting/config interface - give your input
Posted: Fri Jul 14, 2017 2:35 am
by admo
mickael9 wrote:The setting name is only an identifier, you need to define an actual name for it in the locale (translation) files, eg, in
locale/en/base.cfg:
Code: Select all
[mod-setting-name]
research-causes-evolution-all-techs-equal=Setting name here
[mod-setting-description]
research-causes-evolution-all-techs-equal=Optional setting description
This was the solution, thank for the help.
Re: [0.15] Mod setting/config interface - give your input
Posted: Mon Jul 17, 2017 11:44 pm
by moon69
My mods "Startup" settings are resetting to default whenever I increase the mod version... do I need to handle this in migration or something?
The "Map" settings seem to remain though.
Re: [0.15] Mod setting/config interface - give your input
Posted: Sun Jul 23, 2017 2:22 pm
by Xerus
Wow it has taken me forever to find this essential thread!
Please add it to the API documentation, I think i will add something on the wiki for this.
Sync startup mod options with save
Posted: Thu Sep 07, 2017 11:31 am
by gheift
Hi,
I don't know if it was already requested, but I would like to restore the startup settings of the mods from a save file. If I play e.g. with bobs, angels etc. there are many options, which alter the prototypes. If I change them for another game I want to restore these settings for the older save. Just like the "sync mods" button in the load dialog, just for the options.
Thanks,
Gerhard
Re: [0.15] Mod setting/config interface - give your input
Posted: Tue Sep 26, 2017 3:38 am
by Rseding91
So, it's about that time again and I've got some time I want to put towards this. Now that mod devs have had time to use mod settings what do you guys think are the main things that should be improved with them?
Re: [0.15] Mod setting/config interface - give your input
Posted: Tue Sep 26, 2017 4:00 am
by Nexela
On the more "complicated" ends sliders and multiple selection listboxes would be nice. Also being able to add a simple divider bar type gui between settings would be nice.
Re: [0.15] Mod setting/config interface - give your input
Posted: Tue Sep 26, 2017 6:30 am
by Bilka
It would be nice if dropdowns could be translated using localised strings. Since atm you get the value of dropdows as a string this obviously wouldn't work. So perhaps add another type called localised dropdown and then make it work like the mod gui dropdowns: Array of localised strings for the options, and selected_index as the value that you can then read.
Re: [0.15] Mod setting/config interface - give your input
Posted: Tue Sep 26, 2017 12:08 pm
by Arch666Angel
Some if..then logic that shows on the GUI, so some e.g. selection boxes are greyed out until you enable the main button. (example: enable infinite ore, then enabling/disabling individual ore are selectable)
Re: [0.15] Mod setting/config interface - give your input
Posted: Tue Sep 26, 2017 5:56 pm
by eradicator
Bilka wrote:It would be nice if dropdowns could be translated using localised strings.
+10 for localizable dropdowns. English string dropdowns are just not an option in e.g. a Japanese locale.
Code: Select all
[mod-setting-string]
stringvalueone=Value One
string-value-two=Value Two
Re: [0.15] Mod setting/config interface - give your input
Posted: Thu Oct 12, 2017 8:40 pm
by quyxkh
Have mod settings changes drive `on_configuration_changed`, or add `on_mod_settings_changed` to the script api? I suspect `settings.global.my_setting_name.value` drives table creation every time, certainly updating the value via script (properly) doesn't work.
Re: [0.15] Mod setting/config interface - give your input
Posted: Thu Oct 12, 2017 9:02 pm
by Bilka
quyxkh wrote:Have mod settings changes drive `on_configuration_changed`, or add `on_mod_settings_changed` to the script api? I suspect `settings.global.my_setting_name.value` drives table creation every time, certainly updating the value via script (properly) doesn't work.
shouldn't
http://lua-api.factorio.com/latest/even ... ng_changed be what you want?
Re: [0.15] Mod setting/config interface - give your input
Posted: Thu Oct 12, 2017 9:16 pm
by quyxkh
Should be and is, and I'm leaving my body to neuroscience so they can figure out out how exactly this game gives me such an intense case of the blind spots.
Re: [0.15] Mod setting/config interface - give your input
Posted: Thu Nov 30, 2017 6:15 pm
by darkfrei
Is it possible by mod settings to read data.raw? It would be nice to get some information from it, as example is mod with disabling of some biomes (vanilla and from _all_ mods), disabling some recipes or weapons.
Re: [0.15] Mod setting/config interface - give your input
Posted: Thu Nov 30, 2017 6:22 pm
by Rseding91
darkfrei wrote:Is it possible by mod settings to read data.raw? It would be nice to get some information from it, as example is mod with disabling of some biomes (vanilla and from _all_ mods), disabling some recipes or weapons.
No, the nature of settings means they can't have access to the data stage otherwise they wouldn't be deterministic in multiplayer.