Page 1 of 1
Question on Options/Mods menu
Posted: Sun Aug 27, 2017 8:12 pm
by avatarDr
Hello everyone.
There is a game menu which can be found by going to Options -> Mods. Could anyone tell what is the purpose of this menu and how can I use it properly?
I need to make some of my mod's settings customizable and I prefer GUI interaction to console.
1. Is there any tutorial on how to configure this menu? (Haven't found any.)
2. Could you recommend some good mod implementing this menu which can be reverse engineered?
3. What is current best practice on providing mod configuration interface? I'm choosing between this menu and making own custom dialog.
Thanks for your attention!
Re: Question on Options/Mods menu
Posted: Sun Aug 27, 2017 8:27 pm
by Bilka
avatarDr wrote:Hello everyone.
There is a game menu which can be found by going to Options -> Mods. Could anyone tell what is the purpose of this menu and how can I use it properly?
I need to make some of my mod's settings customizable and I prefer GUI interaction to console.
1. Is there any tutorial on how to configure this menu? (Haven't found any.)
2. Could you recommend some good mod implementing this menu which can be reverse engineered?
3. What is current best practice on providing mod configuration interface? I'm choosing between this menu and making own custom dialog.
Thanks for your attention!
1.:
https://wiki.factorio.com/Tutorial:Mod_settings
2.: I used
https://mods.factorio.com/mods/Gangsir/Ruins and
https://mods.factorio.com/mods/wormmus/wormmus-config
3.: Using the mod settings is much easier and makes it possible to change prototypes depending on settings. The in-game mod gui does not allow that.
Re: Question on Options/Mods menu
Posted: Mon Aug 28, 2017 7:56 am
by darkfrei
My favorite:
https://mods.factorio.com/mods/Blank/what-fish
Code: Select all
--settings.lua
data:extend({
{
type = "bool-setting",
name = "what-fish-toggle",
localised_name = "Disable Fish",
setting_type = "startup",
default_value = true,
per_user = false
}
})
Code: Select all
-- data.lua
fish_disabled = settings.startup["what-fish-toggle"].value
if fish_disabled then
data.raw["fish"]["fish"].autoplace = {influence = 0.00}
end
Re: Question on Options/Mods menu
Posted: Thu Aug 31, 2017 2:09 am
by Rseding91
"per_user = false" doesn't do anything - it's not a real property
viewtopic.php?f=34&t=32890
Re: Question on Options/Mods menu
Posted: Thu Aug 31, 2017 3:41 am
by Bilka
I guess I'll have to add this as a tip to the tutorial on the wiki or we will have people using this forever lol
Re: Question on Options/Mods menu
Posted: Mon Sep 04, 2017 11:13 pm
by avatarDr
Thanks everyone for help.
It is quite plain and useful feature. I hope it will be extended further to support more widgets, grouping and framing.