Better Questing

Better Questing

39M Downloads

Making a mistake when editing QuestDatabase.json results in it being deleted?!

McFrugal opened this issue ยท 3 comments

commented

Fail-deadly isn't a very good policy when dealing with save data. I'd suggest leaving the file alone, giving an error message, and not allowing the player to look at their quests at all (because they're invalid obviously) until they exit the game and fix the error.

commented

If you're attempting to manually edit the json file without having a back up or checking validity then that's less my fault and more user error.

If you were using the in game editor then you shouldn't have this kind of corruption issue.

If this becomes a bad habit for developers then I will have to add in a special case for this, not because I should have to.

commented

Decided to add it for a future update anyway and save the trouble. Malformed files will be marked as such and moved before resuming loading.

commented

Yeah I was editing it manually. I did have the forethought to back it up, thankfully. How would I check validity?

Marking a malformed file instead of deleting it will work just fine, thanks.