Unify (mod-)settings access.

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Unify (mod-)settings access.

Post by eradicator »

What?
The naming scheme for mod specific settings currently uses up to three different names for each settings type.
What?!
For example a setting that is specific to a savegame is located under the "Map" tab in the games mod option GUI. In the data stage it is created as <setting_type="runtime-global"> and in control stage it can be read using <settings.global>. I see no good reason for not calling all three instances just "map". Here's the loopup table i currently use in my mod:

Code: Select all

local lookup = {
  --scope = (data, control) --GUI
  startup = {'startup'         , 'startup'} , --"Startup"
  map     = {'runtime-global'  , 'global' } , --"Map"
  player  = {'runtime-per-user', 'player' } , --"Per player"
}
Why?
Using mod settings is really confusing with the current name chaos, especially for new modders. My guess is that this is just for "historical" reasons, so you might as well unify the naming for 0.16 when mod authors have to update their mods anyway to reflect API changes.
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.

Post Reply

Return to “Modding interface requests”