Resetting mod config data doesn't reset the value to the default option, instead erases the config data entirely. If the default is enabled, and you can switch to disabled. Hitting reset doesn't switch it back to enabled, it switches it to nothing. Causing neither the disabled nor enabled function of my code to work.
Here I added a picture of mod config options. Now, even though all the values are on enabled, code within modmain that requires them to be set to enabled don't work if I hit the reset button and start the server. Here's an example.
if EnableShops=="enabled" then
if IsServer then
inst:AddTag("shopper")
end
elseif EnableShops=="disabled" then
inst:RemoveTag("shopper")
end
If I click the arrows to disable, and back to enable, it works properly. However, hitting the reset button and then starting the server causes the code to not work, guessing the reset button isn't actually reading the default values of modinfo config options, and just erasing any data what so.
To summarize. Hitting reset causes modconfig options to not work despite showing enabled.
Simply switching them to disabled, and then back to enabled causes them to work again.
This leaves be to believe reset button is erasing the options entirely, and not just reverting them to default.
Run any mod with config options that work on an on/off state. Reset the value to default, and start the server.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now