[0.15] Mod setting/config interface - give your input
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: [0.15] Mod setting/config interface - give your input
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.
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
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.
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.
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
Re: [0.15] Mod setting/config interface - give your input
Doesn't anyone read the docs?
Factorio sorts mods first by dependencies then by natural sort order accounting for case (https://en.wikipedia.org/wiki/Natural_sort_order).
Re: [0.15] Mod setting/config interface - give your input
Thanks - makes sense!
I've looked at that Data Lifecycle page many times lately... but somehow missed the very top line
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
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:
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:
Does anyone have advice or further instructions aside from the first post of this thread?
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",
}
})
Code: Select all
Unknown key:"research-causes-evolution-all-techs-equal"
Re: [0.15] Mod setting/config interface - give your input
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
Factorio Mod Portal Notifier - https://fac-notify.ml/
Cut and paste tools - https://mods.factorio.com/mods/mickael9/cut-and-paste
Portable Chests - https://mods.factorio.com/mods/mickael9/portable-chests
Cut and paste tools - https://mods.factorio.com/mods/mickael9/cut-and-paste
Portable Chests - https://mods.factorio.com/mods/mickael9/portable-chests
Re: [0.15] Mod setting/config interface - give your input
This was the solution, thank for the help.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
Re: [0.15] Mod setting/config interface - give your input
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.
The "Map" settings seem to remain though.
Re: [0.15] Mod setting/config interface - give your input
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.
Please add it to the API documentation, I think i will add something on the wiki for this.
Sync startup mod options with save
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
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
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?
If you want to get ahold of me I'm almost always on Discord.
Re: [0.15] Mod setting/config interface - give your input
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
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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: [0.15] Mod setting/config interface - give your input
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)
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: [0.15] Mod setting/config interface - give your input
+10 for localizable dropdowns. English string dropdowns are just not an option in e.g. a Japanese locale.Bilka wrote:It would be nice if dropdowns could be translated using localised strings.
Code: Select all
[mod-setting-string]
stringvalueone=Value One
string-value-two=Value Two
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: [0.15] Mod setting/config interface - give your input
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
shouldn't http://lua-api.factorio.com/latest/even ... ng_changed be what you want?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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: [0.15] Mod setting/config interface - give your input
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
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
No, the nature of settings means they can't have access to the data stage otherwise they wouldn't be deterministic in multiplayer.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.
If you want to get ahold of me I'm almost always on Discord.