One wrong number in my game settings file silently breaks the game
When the numbers that balance a game live in a file the AI edits, one slip, such as a number written as text or a minimum above a maximum, can pass unnoticed until the game behaves strangely. Here is a check that reads the whole file and lists every problem with where it is.
Why this works
A settings file is read by a program that trusts every number. Writing down once what a good file looks like, and checking all of it at the end, catches mistakes where they are made instead of far away as strange behaviour. Listing every problem at once saves repeated trips.
When not to use it
Skip it when the file is tiny and rarely changes, or when the game already refuses to start on bad input. Then a check is more upkeep than help. Also, a check says whether numbers are valid, not whether the game is fun: you still have to play it.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 54 lines of example code with 5 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "One wrong number in my game settings file silently breaks the game" (read_entry balance-config-file-check-with-paths) 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