Page 1 of 1
Add a slider-setting as a new type of mod setting
Posted: Fri Mar 28, 2025 3:46 pm
by MrSmoothieHuman
Wanted to ask about the possibility of adding a new type of mod setting, that'd utilise sliders. It'd make it a lot easier to make settings that have a lot of options, instead of having to utilise things like string setting types - which is what I'm currently doing for my own mod.

- 03-28-2025, 15-38-05.png (11.04 KiB) Viewed 405 times
I have two ideas for how they could function in-game, one of them being something like:
Code: Select all
{
type = "slider-setting",
name = "how-many-extra-fish?",
setting_type = "startup",
default_value = 0,
allowed_values = {-2, -1, 0, 1, 2}
}
(you could also have this work similar to a string-setting, where you can individually name each value)
or something more akin to this?
Code: Select all
{
type = "slider-setting",
name = "how-many-extra-fish?",
setting_type = "startup",
default_value = 1,
maximum_value = 10,
minimum_value = 0,
increase_amount = 1,
}
where every bar on the slider would be the `increase_amount`.
I hope that these ideas sound even somewhat feasible for an addition, or a different implementation - but having even more types of settings would be super nice to have for all modders :]
Re: Add a slider-setting as a new type of mod setting
Posted: Fri Mar 28, 2025 4:52 pm
by curiosity
But why are you limiting a multiplier to a select few values? Same for the fish thing, just a regular integer input field works great.
Re: Add a slider-setting as a new type of mod setting
Posted: Fri Mar 28, 2025 7:14 pm
by MrSmoothieHuman
But why are you limiting a multiplier to a select few values?
Entirely because i would prefer control over how high or low a multiplier can be, rather then having to put the min/max values in the description of the mod setting, for example :]
I defintely could just let the player but any value they want, but I'd much rather do that for something that isnt bot speed - its purely preference on my part
on the example code though? thats just because what im used to when working on settings, but i had already realised that i couldnt show off every possible example halfway through writing - and just left it at two different variats

Re: Add a slider-setting as a new type of mod setting
Posted: Fri Mar 28, 2025 10:14 pm
by curiosity
MrSmoothieHuman wrote: Fri Mar 28, 2025 7:14 pm
Entirely because i would prefer control over how high or low a multiplier can be, rather then having to put the min/max values in the description of the mod setting, for example :]
Setting min/max is
exactly how you control the setting's range. So use them.
MrSmoothieHuman wrote: Fri Mar 28, 2025 7:14 pm
I defintely could just let the player but any value they want, but I'd much rather do that for something that isnt bot speed - its purely preference on my part
So what's wrong with 1.33? How about 1.7?
Re: Add a slider-setting as a new type of mod setting
Posted: Sat Mar 29, 2025 12:15 pm
by MrSmoothieHuman
Setting min/max is exactly how you control the setting's range. So use them.
but its not the only way to control them, so i'm using the other way to control them
So what's wrong with 1.33? How about 1.7?
1, 1.25, 1.5, 1.75, 2, etc etc are commonly used increased amounts, and are easily to mentally calculate ("oh its 2 x 1.5? so it'd be 3!") then doing 1.7 or 1.33 - and by that logic, whats wrong with 1.25 or 1.5?
to go back to the original point of this post, I just think that it'd look a lot cleaner then doing what im currently doing (while still setting pre-determined values) - and giving more options to modders is never a bad thing :]
Re: Add a slider-setting as a new type of mod setting
Posted: Sat Mar 29, 2025 1:01 pm
by Ashier
curiosity wrote: Fri Mar 28, 2025 10:14 pm
Setting min/max is
exactly how you control the setting's range. So use them.
You're ignoring the point of what MrSmoothieHuman is requesting. Min/max isnt the main reason to request a slider, its the specific increment. I agree that a slider or allowed values would be useful, exactly like how the sliders in map settings only allow specific percentages.
Re: Add a slider-setting as a new type of mod setting
Posted: Sat Mar 29, 2025 1:37 pm
by curiosity
MrSmoothieHuman wrote: Sat Mar 29, 2025 12:15 pm
but its not the only way to control them, so i'm using the other way to control them
to go back to the original point of this post, I just think that it'd look a lot cleaner then doing what im currently doing (while still setting pre-determined values) - and giving more options to modders is never a bad thing :]
Then you did it to yourself, why'd the API have to suffer? It's just bloat.
MrSmoothieHuman wrote: Sat Mar 29, 2025 12:15 pm
1, 1.25, 1.5, 1.75, 2, etc etc are commonly used increased amounts, and are easily to mentally calculate ("oh its 2 x 1.5? so it'd be 3!") then doing 1.7 or 1.33 - and by that logic, whats wrong with 1.25 or 1.5?
You are missing the point. You take away the option to specify other values from the player for no reason.
Ashier wrote: Sat Mar 29, 2025 1:01 pm
You're ignoring the point of what MrSmoothieHuman is requesting. Min/max isnt the main reason to request a slider, its the specific increment. I agree that a slider or allowed values would be useful, exactly like how the sliders in map settings only allow specific percentages.
Map settings is a bad example, it also takes away options from the player for no reason. Although, IIRC, there's a way to sneak arbitrary values in. No such workaround for mod settings.
A slider with fixed values only makes sense when you can only handle those specific values, for example the interface scaling slider in the game settings. But that's not the kind of example the OP brings up. And you can just use a dropdown.
Re: Add a slider-setting as a new type of mod setting
Posted: Sat Mar 29, 2025 1:49 pm
by MrSmoothieHuman
Then you did it to yourself, why'd the API have to suffer? It's just bloat.
its not bloat when its something achieveable in the base game, and is in the smallest part of the entire API - settings have 5 different types? adding one more, to me, is not considered bloating the settings API
You are missing the point. You take away the option to specify other values from the player for no reason.
okay, sure - but i haven't been asked by a player to give them any value, people i've shown it too have had no issue with pre-determined values. If someone wants me to add more values or make it up to the players choice - then i'd change it
No such workaround for mod settings.
to be fair, you could just edit the mod settings yourself - you'd just need the knowledge on how to do that
A slider with fixed values only makes sense when you can only handle those specific values, for example the interface scaling slider in the game settings.
so a better example would be a mod setting that changes how much of an item you spawn with - yeah sure you
could use a dropdown for it, but why not also let people use a slider for it? it'd appear visually better, and allow for a lot more values to be included compared to a dropdown.
ontop of that, why does it matter that you could use a dropdown? some people (including myself) would'nt want to, and would much rather prefer to be given as many options as possible to customise our expirence
Re: Add a slider-setting as a new type of mod setting
Posted: Sat Mar 29, 2025 1:57 pm
by sassxolotl
i made a forum account just because I read this and found one person being so against sliders when they don't even work on the game
like sliders look cool and are easy to use and take less clicks than drop-downs.
Re: Add a slider-setting as a new type of mod setting
Posted: Sat Mar 29, 2025 2:17 pm
by Ashier
curiosity wrote: Sat Mar 29, 2025 1:37 pm
Map settings is a bad example, it also takes away options from the player for no reason. Although, IIRC, there's a way to sneak arbitrary values in. No such workaround for mod settings.
A slider with fixed values only makes sense when you can only handle those specific values, for example the interface scaling slider in the game settings. But that's not the kind of example the OP brings up. And you can just use a dropdown.
What makes map settings a bad example?? Its literally the perfect example and its
in the base game? There are plenty of examples where "taking away player options" is good. It can help maintain mod balance, or prevent errors. Waving away a use case under the pretense of "OP didnt specify that" adds nothing to discussing the usefulnessof the request.
Like MrSmoothieHuman said, a dropdown is clunky and unintuitive for integer values. And what if I have 100 values? Am I supposed to make a drop down with 100 allowed values? No, obviously not.
Re: Add a slider-setting as a new type of mod setting
Posted: Sat Mar 29, 2025 3:37 pm
by curiosity
MrSmoothieHuman wrote: Sat Mar 29, 2025 1:49 pm
so a better example would be a mod setting that changes how much of an item you spawn with - yeah sure you
could use a dropdown for it, but why not also let people use a slider for it? it'd appear visually better, and allow for a lot more values to be included compared to a dropdown.
ontop of that, why does it matter that you could use a dropdown?
some people (including myself) would'nt want to, and would much rather prefer to be given as many options as possible to customise our expirence
That's quite hypocritical
But the number of items is just a number. Neither dropdown nor slider make sense.
MrSmoothieHuman wrote: Sat Mar 29, 2025 1:49 pm
its not bloat when its something achieveable in the base game, and is in the smallest part of the entire API - settings have 5 different types? adding one more, to me, is not considered bloating the settings API
But there is no need for it. And if you want to add bloat so much, at least do it well: if a setting has the allowed_values property, then it can have a slider property (false by default). That way you can have sliders for all meaningful setting types without adding a nonsensical "slider-setting" (what is that? a setting that stores a value type of slider specification or something?)
MrSmoothieHuman wrote: Sat Mar 29, 2025 1:49 pm
okay, sure - but i haven't been asked by a player to give them any value, people i've shown it too have had no issue with pre-determined values. If someone wants me to add more values or make it up to the players choice - then i'd change it
There was no point in limiting the options to begin with. If you need someone to ask, then I ask you this: always let settings be customizable to the fullest possible extent. No artificial limitations.
But I see you aren't taking any of this seriously, why did you even make a request then?
Ashier wrote: Sat Mar 29, 2025 2:17 pm
What makes map settings a bad example?? Its literally the perfect example and its
in the base game? There are plenty of examples where "taking away player options" is good. It can help maintain mod balance, or prevent errors. Waving away a use case under the pretense of "OP didnt specify that" adds nothing to discussing the usefulnessof the request.
Like MrSmoothieHuman said, a dropdown is clunky and unintuitive for integer values. And what if I have 100 values? Am I supposed to make a drop down with 100 allowed values? No, obviously not.
The usefulness of the request is not a given. OP failed to demonstrate it with his examples. It's not "adding to discussion of usefulness", merely pointing out there is nothing to add to in the first place. If you have a convincing example of usage, feel free to provide it. Saying "there are plenty of examples" doesn't add anything either.
And a slider with 100 positions would look like crap. I'd rather have a dropdown. Or if your integer values are contiguous (most likely they are), you should use min/max instead of allowed values, with a convenient input field.
If the aim of a request is to enable bad mod design, it's not a good request.
Re: Add a slider-setting as a new type of mod setting
Posted: Sat Mar 29, 2025 4:38 pm
by sassxolotl
it's obvious there's no convincing this individual, they quite obviously and simply really dislike when people ask for stuff that they don't like the idea of, so I'm just gonna say:
On a dropdown menu, to select a percentage value I have to click 3 times, click the dropdown, click the scroll on the side to 69%, click the number.
I like the way I don't have to click three times on a slider, just one click and drag. it feels nice and it would be nice to let mod settings visually match the rest of the UI.
Re: Add a slider-setting as a new type of mod setting
Posted: Sat Mar 29, 2025 7:03 pm
by curiosity
sassxolotl wrote: Sat Mar 29, 2025 4:38 pm
it's obvious there's no convincing this individual, they quite obviously and simply really dislike when people ask for stuff that they don't like the idea of, so I'm just gonna say:
On a dropdown menu, to select a percentage value I have to click 3 times, click the dropdown, click the scroll on the side to 69%, click the number.
I like the way I don't have to click three times on a slider, just one click and drag. it feels nice and it would be nice to let mod settings visually match the rest of the UI.
You know what else doesn't require three clicks? An input field. But there is no convincing you, obviously [Moderated by Bilka]
Re: Add a slider-setting as a new type of mod setting
Posted: Sat Mar 29, 2025 7:58 pm
by Bilka
Chill with the personal attacks. You can suggest other solutions, but there's no need to argue against modding interface requests. In the end it will be us developers making the decision for whether something will be implemented. If that then results in a bug, you can always make a bug report then.
Re: Add a slider-setting as a new type of mod setting
Posted: Sat Mar 29, 2025 8:05 pm
by curiosity
Bilka wrote: Sat Mar 29, 2025 7:58 pm
Chill with the personal attacks. You can suggest other solutions, but there's no need to argue against modding interface requests. In the end it will be us developers making the decision for whether something will be implemented. If that then results in a bug, you can always make a bug report then.
So me retaliating is unacceptable, but me being attacked is fine? Typical.