Good news!
I recovered the world. Sadly, I have not yet recovered the one thing I was working on at crash time. As for the world though, it's up and running for me to move around in. How did I fix it...?
As a precaution, I copy the complete starmade installed folder structured before I do any updates. I know the update process has a backup feature, but I like a completely untouched backup. If I was more organised, I'd setup regular backups or restore points. Sadly I'm not.
- Long story short, I created a blank install of the same version as the damaged one.
- Started it up in single player with my usual login name etc so it created it's world0 folder etc.
- I renamed the new world0 folder to world99.
- Then I copied the damaged world0 folder "Starmade/server-database/world0" into this new install.
- Testing it, the problem persisted.
- After trying various file swaps between the backup made before updating to the current version, I isolated the files that were buggy.
- Copying over ".data", ".properties" and ".script" inside the "Starmade/server-database/world0/index" folder did the trick. NOTE: I deleted everything in the new index folder to remove doubt as I did with any other files I substitued. Was easy enough to re-copy them from the damged install as required.
And that's it for this particular problem. Unfortunately, because I was using old index files, the project I was working on at the time of the crash did not exist at the time. The object/structure files are still there, I just can't see them in the single player world. I'll figure something out.
What made me revisit this was, I had a computer crash the day before yesterday. So went through this drama with the latest version. Sadly, this did not work. The latest problem was caused by a different file.
- Same deal creating a fresh install and renaming the world0 to world99.
- Copied over the damaged world0 to try file swapping with the previous install/update version.
- This time, found the file "TRADING.tag" was the problem in the "StarMade\server-database\world0" folder itself.
And luckily, everything was there.
So, it takes a little time and trial and error, but it can be done.
Hope this helps other players recover their damaged worlds0 or whatever folders.