Removing mod settings from "mod-settings.dat"

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
User avatar
Tealc.
Inserter
Inserter
Posts: 27
Joined: Fri Aug 10, 2018 2:28 am
Contact:

Removing mod settings from "mod-settings.dat"

Post by Tealc. »

I had an issue with a mod that caused an error when trying to load any game while the mod was enabled.

Deleting the mod enabled me to reload games again. Once open I resaved the game with the new mod list (ie. minus the mod that was giving an error).

I then re-downloaded a fresh version of the mod from the in game mod portal.

Upon trying to reload a game again I was met by the same mod still giving me an error.

My question is, when a mod is deleted should its settings also be deleted too? Because in this case it seems to me that the settings must still be present. I would hope that the settings are deleted when deleting a mod as there is no simple way to read/edit the settings file anymore.

I should add that I am certain the issue is with my mod-settings.dat file as when I delete the file allowing the game to rebuild it, games once again load fine even with the mod in question.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Removing mod settings from "mod-settings.dat"

Post by Rseding91 »

Removing a mod does not remove the settings. It works that way by design and by request of the mod authors and players. That way disabling a mod to join a vanilla server for example doesn't erase all of your settings when you re-enable it.
If you want to get ahold of me I'm almost always on Discord.

User avatar
valneq
Smart Inserter
Smart Inserter
Posts: 1150
Joined: Fri Jul 12, 2019 7:43 am
Contact:

Re: Removing mod settings from "mod-settings.dat"

Post by valneq »

There is a dedicated button to "reset settings" in the mod settings, in the top right. Did that not do the trick? For all practical purposes that should behave just like removing the mod-settings.dat – afterwards everything is set to default again.

User avatar
Tealc.
Inserter
Inserter
Posts: 27
Joined: Fri Aug 10, 2018 2:28 am
Contact:

Re: Removing mod settings from "mod-settings.dat"

Post by Tealc. »

Rseding91 wrote:
Fri Jun 05, 2020 6:50 pm
Removing a mod does not remove the settings. It works that way by design and by request of the mod authors and players. That way disabling a mod to join a vanilla server for example doesn't erase all of your settings when you re-enable it.
Thanks very much for your reply Rseding.

Yes, I knew that disabling a mod kept the settings intact and the very important reasons for doing so, it was just what happens when a mod is deleted I wasn't 100% sure on. But as you have now confirmed my suspicions from my own experience that suggested that the settings were kept even when deleting a mod were correct.

In my search for answers I did find the (I think) orginal first post that led to the first implementation of the mod-settings file. When it was originally a JSON file it was simple to change settings of a single mod. But after the format change there were more posts about the settings file and how it was now not able to be accessed (easily) to change the settings of a single "bad" mod.

Even in your post from a few years ago it was still desired by many to have a way to reset just a single mod's settings. Alas you provided details of a "quick-and-dirty" editor to read the new file format and change settings outside of the game. Sadly it never really went anywhere to being useable by "simple" users. I guess there just want a strong enough demand. Though it would have been nice to have in those few rare use cases where there was a need to reset just a single mod's settings.

I did find another post where betrok had made a conversion script using "Go". I tried to download all the tools to make it work but its a little out of my depth. Back to entering all my old settings manually for me!

valneq wrote:
Fri Jun 05, 2020 7:01 pm
There is a dedicated button to "reset settings" in the mod settings, in the top right. Did that not do the trick? For all practical purposes that should behave just like removing the mod-settings.dat – afterwards everything is set to default again.
Wow, thanks valneq. I must admit I had never noticed that button there before. Alas it would reset all settings other than just the single mod causing issues. At that point I may as well just delete the whole mod-settings file (which I did do) as by doing so has the same effect.

User avatar
valneq
Smart Inserter
Smart Inserter
Posts: 1150
Joined: Fri Jul 12, 2019 7:43 am
Contact:

Re: Removing mod settings from "mod-settings.dat"

Post by valneq »

Tealc. wrote:
Sat Jun 06, 2020 8:48 am
Wow, thanks valneq. I must admit I had never noticed that button there before. Alas it would reset all settings other than just the single mod causing issues. At that point I may as well just delete the whole mod-settings file (which I did do) as by doing so has the same effect.
When you just hover over the button, it highlights all the settings that do not have default values.
Making it easier to spot what is set to custom values.
Just saying, in case you did not notice :-)

Post Reply

Return to “Technical Help”