Page 1 of 1

Death autosave vs. blood of life

Posted: Tue Dec 20, 2011 2:37 pm
by Fela
Dying and resurrecting with the blood of life creates the unique situation that there is a character that - up to the next autosave on leaving the dungeon or manual saving - exists solely in RAM. I just lost a character due to the program freezing in that time period :).

I would suggest saving before the dialogue as well as when the blood of life was used.

Alternatively, saving could wait until the choice was made, but that is obviously open to abuse. (Not REALLY an issue in a solo game, but there you go)

Re: Death autosave vs. blood of life

Posted: Tue Dec 20, 2011 10:11 pm
by Devorius
Autosave should probably take place on death, and also immediately after using the blood of life. You could also save it manually (which I often do in the middle of dungeons, just to be safe).

But, it should have autosaved once you were ported back to Maj'Eyal from the void space anyway...

However, the problem may not be Tome itself as I've had a crash lose my saves (back several save points); this is because of the operating system. Just because a program performs disk writes, doesn't mean they actually happen at that time. Most modern operating systems use write-caching to speed up disk IO. This means that these write ops could remain in the cache for a while before actually being written to disk.

The obvious solution would be to add code to force the OS flush the write buffers, however the method for doing so is platform-specific (Windows has its functions to do so, as does Linux, and MacOS ... probably the same as Linux, but I dunno).

But! There is another way. If you're on Windows, you can disable write-caching per drive via the hard disk's device properties (though the device manager), under the Policies tab. Deselect the "Use Write Caching on the disk" checkbox.

On Linux, you can add the "sync" parameter to your mount command.

On MacOS, you can add the "noasync" parameter to your mount command.

Hope this helps ya.

Re: Death autosave vs. blood of life

Posted: Wed Dec 21, 2011 9:10 am
by Fela
This is all probably very helpful, but doesn't apply in my case of lost save. It was entirely lost to death-autosave and none after.
I simply didn't leave the zone between using the BoL and the game freezing, nor did i safe manually.