Mods / Client Settings Save Spam Check
- Tags:
- Author:
- MadSeraph
- Side:
- Client
- Created:
- Jun 29th at 11:54 PM
- Last modified:
- Jun 29th at 11:54 PM
- Downloads:
- 8
-
Latest release (for Vintage Story 1.22.3, potentially outdated):
ClientSettingsSaveSpamCheck_1.0.0.zip 1-click install
You probably don't need this mod.
This was inspired by a discussion in the official discord #mod-development channel about a client settings corruption issue I experienced. This bug was brought up:
https://github.com/anegostudios/VintageStory-Issues/issues/4920 (clientsettings appears to be constantly overwriting/changing itself)
I couldn't reproduce the bug in the current version, but discovered that under the right circumstances through a bad mod interaction or even a vanilla bug the client settings json could be rewritten every 2 seconds, increasing the chances of a corrupted settings in the event of something like as power loss. The game checks every 2 seconds if the settings are "dirty", and if they are it rewrites the file. The "dirty" flag is set any time any property of the ClientSettings class is altered.
This mod warns with a chat message and a log entry if this happens 5 consecutive times in a row, and if that happens it saves a stacktrace in the log for every call that caused the config to be marked dirty. If something is causing this to happen, this will hopefully point the finger right at what is doing it.
This mod was hastily thrown together and could break things. Only use it if you understand what it is doing and why you would want it. I'm not posting this on github or anything, so I included the source code in the zip disguised as a txt file so the game doesn't try to compile it. Consider the code and this mod in the public domain.
| Mod Version | Mod Identifier | For Game version | Downloads | Released | Changelog | Download | 1-click mod install* |
|---|---|---|---|---|---|---|---|
| 1.0.0 | clientsettingssavespamcheck | 8 | Jun 29th at 11:54 PM | ClientSettingsSaveSpamCheck_1.0.0.zip | 1-click install | ||
|
Initial release. | |||||||