Page 1 of 1

[Mod API] Allow dependent mod settings or preset settings to update other visible setting values

Posted: Tue Jun 09, 2026 9:20 am
by yumie
I would like to request declarative preset support for the mod settings GUI.

Current problem:
Mods can define startup settings in settings.lua and read them later in the data stage, but one setting cannot update the visible values of other settings in the mod settings GUI before saving/reloading.

This makes preset-based configuration misleading. A mod can internally apply preset values, but the GUI still shows the old/manual values, so the player sees values different from what the mod actually applies.

Example:
A train mod has startup settings for speed, power, braking, weight, wagon capacity, fluid capacity, and fuel consumption. It would be useful to have a preset selector such as "high speed" or "heavy haul" that fills those numeric settings with predefined values.

Requested API:
A limited, declarative, same-mod preset mapping. When a string-setting value is selected, Factorio updates specified settings owned by the same mod in the settings GUI.

This does not need:
- runtime application without restart
- arbitrary Lua callbacks in the settings GUI
- cross-mod setting changes
- changing startup settings while a save is running

Expected behavior:
- selecting a preset updates the visible target settings
- the player can still manually edit those settings afterward
- manual edits may leave the preset unchanged or switch it to "custom"
- the final visible values are what get saved and later read in the data stage

Why this matters:
For mods with many related startup settings, presets are the cleanest UX. Without GUI-level preset support, mod authors must choose between no presets, misleading hidden preset logic, or forcing users to manually copy many values.

This is not a request to make startup settings dynamic at runtime. It is only a request for the mod settings GUI to support honest preset-based value filling before save/reload.