Page 1 of 1

Unify (mod-)settings access.

Posted: Tue Nov 21, 2017 3:25 am
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.