Well, for a starters, it doesn’t reset to zero, it gets rounded down in the Windows if the decimal symbol is set is set other than dot in Regional settings.
Way to reproduce:
(I’m still using XP so your methods may vary)
Go to Control panel -> Regional and language options
Press Customize…
In Customize Regional Options, set Decimal symbol for something else than dot
Apply your settings
Run Cataclysmdda
Go to options and set Spawn Rate scaling factor for something with decimal number
Save your options and restart Cataclysmdda
Go back to options to check the result
So what can user do?
-
Every time you start Cataclysmdda, go to options and re-set your spawn rate to desired value. It can be a hassle and if you forget to do it, the next town you visit might be empty.
-
Set your Decimal symbol to dot in Regional settings. Now the Cataclysmdda will understand what that 0.7 means in your options.txt. This can have some side effects in other programs you use.
How to fix it?
-
Quick and dirty. In options.cpp, line 453, set the minimum accepted value to 0.1. Now the value 0 (from rounded down 0.7) is not accepted, and the value is set to default 1.0. Now the player has at least some zombies to fight for.
-
Right way. Read float values in as a string. Then sanity check them for different kind of decimal symbols before converting them to float.
If my memory serves me right, there can be other ways too, but it’s been over 10 years since last time I banged my head against this brick wall.