Repair a settings file that holds nonsense instead of crashing on it
Players edit their settings by hand, copy them from forums, or lose half the file. A volume of minus five or a sensitivity of nothing at all must not break the game. This entry gives the AI a rule for each kind of wrong value and a report of what it fixed.
Why this works
Anything a person can edit will one day hold nonsense, and the game cannot know whose fault it is. Describing each setting once, with its default and limits, lets one rule repair every case, and a plain list of fixes keeps the repair honest.
When not to use it
Quiet repair is wrong for values where a guess does harm, such as a payment choice or a saved world, because a wrong guess there hides a real problem. For those, refuse to continue and show the player what is wrong instead of fixing it for them.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 41 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Repair a settings file that holds nonsense instead of crashing on it" (read_entry settings-file-with-bad-values) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP