Button in mod settings
Button in mod settings
Hi devs!
Can you please to add button to runtime mod settings. It can be useful for reset some values, that this mod has collected.
Can you please to add button to runtime mod settings. It can be useful for reset some values, that this mod has collected.
Re: Button in mod settings
What?
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: Button in mod settings
For example my mod has seasons and the player wants to reset the season to default one. Just open mod settings and click on the "reset season" button for it.
Re: Button in mod settings
So this?
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: Button in mod settings
No, I don't want to reset settings, but I want some event, that can be called from mod settings, may be with the by the on_runtime_mod_setting_changed.
Another example - the players wants to reset evolution in the mod about custom evolution, but he cannot use just checkbox for it. If he clicks just the button, the event will be run and the script can change the evolution factor to 0.
Re: Button in mod settings
You want a button for mod functionality mixed in with the mod settings, do I understand correctly?
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: Button in mod settings
Yes, but this button can be used for changing mod's state.
Suggested button for mod settings:
Re: Button in mod settings
I don't quite understand what you want. It sounds like maybe you want a way to individually reset some setting(s) to their default instead of all settings?
If you want to get ahold of me I'm almost always on Discord.
Re: Button in mod settings
No, just interface for mod settings. If I want to set anything in the global to it's default value, then I can click the button n the mod interface. Right now I can do the same with the checkbox, but the checkbox has two options.
The suggested button must have only one position and the event will be triggered the same way as by the checkbox.
Re: Button in mod settings
I can write the mod "Always Day", where the player has the mod setting checkbox "always day for all surfaces enabled" = true.
The script checks all surfaces where surface.always_day is false, set them to true and adds the list of surfaces into the global table.
Another mod adds new surfaces, some of them have surface.always_day as true, some as false.
For updating I need to switch off the mod setting to false, then set it to true for handing all new added surfaces.
With such suggested buttons I can update the script manually, all new surfaces will be handled the same as before just click the button without disabling and enabling this mod setting.
The script checks all surfaces where surface.always_day is false, set them to true and adds the list of surfaces into the global table.
Another mod adds new surfaces, some of them have surface.always_day as true, some as false.
For updating I need to switch off the mod setting to false, then set it to true for handing all new added surfaces.
With such suggested buttons I can update the script manually, all new surfaces will be handled the same as before just click the button without disabling and enabling this mod setting.
Re: Button in mod settings
In that example, the mod should be listening to the surface_created event and setting the always_day value to true/false depending on the mod setting.
If you want to get ahold of me I'm almost always on Discord.
Re: Button in mod settings
It sounds more like a macro button.
For example, in Randotorio i have a seed setting.
You can either enter the seed manually, or click this hypothetical settings-macro-button to give you a random seed.
+1
It also makes me think of having a thing that lets us select from "settings presets" that are author-configured settings.
example:
In Warptorio2, brutal difficulty is the *Only* difficulty and i'm wondering if there's an easy way to simplify having the options to finely-tune the difficulty or select from a preset.
Re: Button in mod settings
Yo are right. But with the button I can set the current surface to ignore list, or restart the script, for example if another mod needs surface without always_day changing.
Re: Button in mod settings
Next issue: mod settings button to delete LuaRendering lines.
See bug report: https://mods.factorio.com/mod/PlayerTra ... 000cc1823e
The user has changed the time to very small and some of lines got time_to_live less than 1 tick.
It would be nice to start the event, that removes all lines.
See bug report: https://mods.factorio.com/mod/PlayerTra ... 000cc1823e
The user has changed the time to very small and some of lines got time_to_live less than 1 tick.
It would be nice to start the event, that removes all lines.
Re: Button in mod settings
You can add a console command, or somethingdarkfrei wrote: ↑Thu Jan 23, 2020 8:24 am Next issue: mod settings button to delete LuaRendering lines.
See bug report: https://mods.factorio.com/mod/PlayerTra ... 000cc1823e
The user has changed the time to very small and some of lines got time_to_live less than 1 tick.
It would be nice to start the event, that removes all lines.
Re: Button in mod settings
Yes, I can add console command, that disables achievements-with-mods; hotkey, that is normally never must be used; GUI, that close small part of view and normally must be not clicked; I can add migration and all lines by new version will be deleted; also I can this script to the event.on_configuration_changes.
Finally, I can add the checkbox to the mod settings and check if it was changed. Yes, I can use the check box as a button to raise the event for script starting, but not the button itself.
Re: Button in mod settings
-
- Inserter
- Posts: 43
- Joined: Sat Aug 06, 2016 11:48 am
- Contact:
Re: Button in mod settings
+1 to need that sort of buttons!
Re: Button in mod settings
No. Buttons that have nothing to do with settings have no place in settings. Add a button or a command in-game, where it belongs. Not in settings.