Kinda Sorta Maybe Fixed It
I uploaded the latest Beta for testing. I don't want to make any bold declarations just yet, but after a couple hours of playing I did not encounter any database errors in this version.
I found a piece of code in which the very files that were getting corrupted, were actually opened by the script, and under certain circumstances, were allowed to stay open. By not closing these files, it was then easy for them to get corrupted. I have made certain that these files do not remain open, and so far it seems to have corrected the problem, finally, but I am hesitant to say that I'm certain it's gone.
More Testing Required
I plan to test this version of the game over the next week or so before making it the default. If you do decide to try it, I recommend starting a new game.
If you want to preserve your old game, any existing database errors will still be there.
Also, if you encounter the errors again, please let me know.
Contingency Plan
I have some more backup plans I can still implement in order to eliminate this issue.
The next phase will be striping down the database script altogether. I will make the database something that you start the game with. This will remove the scanning process, and the map and star/planet info will just be fixed from the beginning. I don't love this idea, but it's better than a corrupt database.
Hopefully the script errors I found were the root cause and I won't have to resort to such drastic measures.
New Feature
I forgot to mention another new feature of the Beta version of Star Explorers. It is a behind the scenes issue, but I thought it should be mentioned. The old version of the game simply saved all your files right there in the main folder. This was messy and made it very difficult to delete a game if you wnated to do that.
Now all user created files gets saved in a folder with the name you start the game with. This makes it easier to identify, move, delete, and/or organize your saved game files. If you go to the Star Explorers entry in your Steam Library, right click and select properties, then select "Browse Local Files" from the Local Files tab, you will be able to see the new folder structure.
