Would Be Nice To Easily Change ModSettings Values, Rather Than Just "GetValue"

Discuss coding questions, pull requests, and implementation details.
Post Reply
User avatar
Magicono43
Posts: 1139
Joined: Tue Nov 06, 2018 7:06 am

Would Be Nice To Easily Change ModSettings Values, Rather Than Just "GetValue"

Post by Magicono43 »

So I was going to try and "idiot-proof" some settings in my Training Service Overhaul mod, but I realized that actually changing the values for mod settings values was not a simple task, through direct code atleast.

Not that I'm expecting anything, but just wanted to note this down as a "feature" of the already surprisingly robust and useful settings system DFU currently has for mods. But basically instead of just having the easily accessible "GetValue<T>" for getting the value of a specific setting, it would be also great to have something like "SetValue<T>" that would allow for the values to have some logical operations "force" values in some cases, just so if desired the author could try to keep the user from messing around with values that interact and messing things up or something.

But yeah, not clue how easy it would be to add something like that with how the settings backend stuff works currently, but just wanted to put that out there, thanks for reading.

Post Reply