Question on Options/Mods menu

Place to get help with not working mods / modding interface.
Post Reply
avatarDr
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Jul 06, 2016 1:53 pm
Contact:

Question on Options/Mods menu

Post 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!

Bilka
Factorio Staff
Factorio Staff
Posts: 3133
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Question on Options/Mods menu

Post 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.
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
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Question on Options/Mods menu

Post 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

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Question on Options/Mods menu

Post by Rseding91 »

"per_user = false" doesn't do anything - it's not a real property :P viewtopic.php?f=34&t=32890
If you want to get ahold of me I'm almost always on Discord.

Bilka
Factorio Staff
Factorio Staff
Posts: 3133
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Question on Options/Mods menu

Post by Bilka »

Rseding91 wrote:"per_user = false" doesn't do anything - it's not a real property :P viewtopic.php?f=34&t=32890
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
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

avatarDr
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Jul 06, 2016 1:53 pm
Contact:

Re: Question on Options/Mods menu

Post 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.

Post Reply

Return to “Modding help”