[Rseding91] [0.15.34] Achievement progress doesn't survive hard shutdown

This subforum contains all the issues which we already resolved.
Post Reply
vyktor
Burner Inserter
Burner Inserter
Posts: 14
Joined: Fri Oct 13, 2017 8:42 am
Contact:

[Rseding91] [0.15.34] Achievement progress doesn't survive hard shutdown

Post by vyktor »

Playing on current steam version.

I was farming green circuits for Mass production 3, in-game achievement tracker was displaying 11M/20M.

I:
  • saved the game
  • Alt-Tab to browser windows
  • realized it's late and with the game still running hit Windows->Power->Shut down
Today Achievemnt tracker show 7.8M as yesterday again.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13223
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.34] Achievement progress doesn't survive hard shutdown

Post by Rseding91 »

Thanks for the report. Achievement progress is saved on game exit and if it didn't exit normally (because it was killed as a result of you telling the computer to shut down) then that would cause what you experienced.

I'll see about the feasibility of saving progress on exiting a given save and going back to the main menu.

We don't do live write to disk because that has it's own troubles and slowdowns.
If you want to get ahold of me I'm almost always on Discord.

vyktor
Burner Inserter
Burner Inserter
Posts: 14
Joined: Fri Oct 13, 2017 8:42 am
Contact:

Re: [Rseding91] [0.15.34] Achievement progress doesn't survive hard shutdown

Post by vyktor »

Thanks for the reply!

Optimization is a way of life ;)

Since this is the only achievement that is "accumulative progress heavy" I'd suggest saving progress every 500k (this would trigger only 40 disk writes all together) and on a game exit.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: [Rseding91] [0.15.34] Achievement progress doesn't survive hard shutdown

Post by Jap2.0 »

vyktor wrote:Thanks for the reply!

Optimization is a way of life ;)

Since this is the only achievement that is "accumulative progress heavy" I'd suggest saving progress every 500k (this would trigger only 40 disk writes all together) and on a game exit.
I'd suggest saving at every save (and maybe the game exit, if you feel like it or don't want to remove the code), which would make it save when you saved you game, even if you didn't exit, and on autosaves (any more than that is overkill because your save would be lost anyway, and it could cause problems, and saving it when the game saved would save it when you saved and quit the game, even if you exit - and even if you just used autosaves, which some people do).
There are 10 types of people: those who get this joke and those who don't.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13223
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.15.34] Achievement progress doesn't survive hard shutdown

Post by Rseding91 »

I changed it so in 0.16 it will save the achievement progress every time a map is saved.
If you want to get ahold of me I'm almost always on Discord.

Geminus
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Nov 14, 2017 8:18 am
Contact:

Re: [Rseding91] [0.15.34] Achievement progress doesn't survive hard shutdown

Post by Geminus »

Sorry for posting in this old thread, I got here because I had the same problem (viewtopic.php?f=47&t=53994). It seems that the more obvious fix is not persisting the achievement state more often, but bringing the achievement counter in line with the ingame counter (which still correctly displays the number of chips produced in this game, see my post for screenshots). It seems weird that those two counters that obviously track the same thing can get out of sync.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13223
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.15.34] Achievement progress doesn't survive hard shutdown

Post by Rseding91 »

Geminus wrote:Sorry for posting in this old thread, I got here because I had the same problem (viewtopic.php?f=47&t=53994). It seems that the more obvious fix is not persisting the achievement state more often, but bringing the achievement counter in line with the ingame counter (which still correctly displays the number of chips produced in this game, see my post for screenshots). It seems weird that those two counters that obviously track the same thing can get out of sync.
Some achievements are not per-game but global between all of the games you play.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”