Page 1 of 1

[0.17.2] Scenario script can trigger save while in replay

Posted: Thu Feb 28, 2019 2:51 pm
by boskid
What i did:
1/ Play introduction mission to win screen
2/ Save replay
3/ open replay and run it till end (i am using 64x speed)
3.5/ (how i found this: Since i unpacked one of autosaves to directory, factorio while in replay was trying to autosave but there was notice i was not expecting "cannot save map: there are multiple packages for package _autosave-survive in directory....")
4/ all autosaves: "_autosave-fortify", "..-leave" , "..-prepare-evacuation", "..-rebuild", "..-repair-assembler" and "..-scan-wreck" are overwritten by replay.

What i expected:
- while in replay, factorio should quietly discard save requests from scenario script (for me, replay is "read operation" and should not modify anything)

Re: [0.17.2] Scenario script can trigger save while in replay

Posted: Thu Mar 14, 2019 7:53 pm
by Rseding91
Thanks for the report. It's now fixed for the next version of 0.17.

Re: [0.17.2] Scenario script can trigger save while in replay

Posted: Wed Sep 04, 2019 2:59 am
by murgo
Damn it boskid, because of this bug we lost the ability to make timelapses of replays since take_screenshot no longer writes files in replays. Too bad, was looking forward to it.

Re: [0.17.2] Scenario script can trigger save while in replay

Posted: Wed Sep 04, 2019 3:30 am
by boskid
murgo wrote:
Wed Sep 04, 2019 2:59 am
Damn it boskid, because of this bug we lost the ability to make timelapses of replays since take_screenshot no longer writes files in replays. Too bad, was looking forward to it.
My report did not mention screenshots, only save files - however it was fixed that way as extension of general rule of "read operation"

Your use case if valid, most likely qualifies for "ideas and suggestions". I guess it could be implemented by adding checkbox "allow screenshot during replay" into settings (even hidden, ctrl+shift settings) or as write-only lua property that could be set by changed control.lua. Changing control.lua of replay file is most likely error-prone as any change in game state would cause desync. I guess because of this, timelapse is quite fragile.

-- edit:
I have created topic in "ideas and suggestions": 75272