Ok, pointless discussion out of the way, why have I posted a screenshot of average mod settings?
Because, the settings are all mixed up and it's hard to tell which one is which. Sections would allow me to have a "Section" for gun turret settings, flamethrower turret settings, laser turret settings, railgun turret settings, rocket turret settings and tesla turret settings. The text would be smaller than the Powerful Lasers heading, but larger than the Mod setting names themselves. In fact, the text wouldn't have to be optional, but could still be used to make name-less divisions, such as this:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If you put something similar into the localised_name (or locale for the name) of your section, you could still create textless divisions.
An example of a section prototype is this:
Code: Select all
-- settings.lua
data:extend{
{ name = "pl_bullet-divider",
type = "section",
section_type = "startup",
order = "bullet",
localised_name = {"pl-setting.pl_section-name", {"turret.pl_bullet"}}
}
}
Code: Select all
-- locale/en/mod.cfg
[pl-setting]
pl_section-name=__1__ Settings:
[turret]
pl_bullet=Gun Turret
Powerful Lasers
Gun Turret Settings:
Improve Gun Turrets [] (<-- Insert real checkbox here)
Enable Gun Turret Improvement Technology [] (<-- Insert real checkbox here)
Gun Turret Damage Multiplier [5000] (<-- Insert real numerical input here)
Gun Turret Speed Multiplier [5000] (<-- Insert real numerical input here)
Without the brackets, though.
Of course, my real code loops through each weapon type, then creates 4 settings each. Preferably, I'd want to create a section with each run of the loop, so that when my mod creates the settings for a weapon type, I'd also create a section for that weapon type.
I think this is a plausible feature to add to the modding API.