Page 1 of 1

Screenshot during replay switch

Posted: Wed Sep 04, 2019 4:24 am
by boskid
TL;DR
Screenshot during replay is prevented by fix 65901 but it is useful for timelapses. Add switch to allow screenshots during replay
What
Switch to allow screenshots to be taken during replay
Why
Since there is use case for doing screenshots during replay i suggest to add some bypass mechanism that would restore possibility to take screenshots during replay.

Assuming screenshot during replay is prevented by simple check of some in-replay flag, this check could by bypassed by additional variable that could be set by user.
Possible ways to put this variable near user:
  1. add checkbox into settings "Allow screenshot during replay"
  2. or, at first screenshot during replay, ask user "do you want screenshots to be taken during replay?"
  3. or by write-only variable that would be set by changed control.lua in replay. Write-only would be to prevent any actual game scripts from relying on its value as it could quickly escalate into full scale replay desync
Another solution would be simply to allow screenshot during replay by default. In the end my intention for 65901 was to prevent overwriting save files since loosing them takes away progress from possibly other map (overwrites them with files from another, longer save file being replayed)


Refs:
65901 - related fix that prevented overwriting saves (intended) and screenshots (partialy intended)

viewtopic.php?p=454682#p454682
74053 - [0.17.59] Problem with replay timelapse
70002 - [0.17.33] game.take_screenshot not store file it self from control.lua

Re: Screenshot during replay switch

Posted: Sat Sep 07, 2019 8:52 pm
by murgo
Yes, the take_screenshot support for replays is pretty useful since you could want to take screenshots of different things when running replays. Time lapse videos are the reason why I'd like to have the support though.

Doing the time lapse videos real time while playing causes some hassle when you just want to play the game, not to mention potential performance hit. I was planning of scripting an automatic zoom out to whole pollution area to capture the current sphere of influence for the factory and making time lapse of that.

I think preventing the take_screenshot in replays doesn't really make that much sense, since same screenshots (like from the tutorial campaign beta feedback) should be identical anyway when replaying the save.

I really like the replay feature and I know it's a pain to maintain for such niche use case. Still it could use some love with the screenshot support (and maybe even better camera controls like free camera pan & zoom but let's not get ahead of ourselves).

Re: Screenshot during replay switch

Posted: Sun Sep 29, 2019 7:32 am
by boskid
-> Implemented Suggestions, [0.17.69]
https://forums.factorio.com/75864 wrote: Scripting
  • Added allow_in_replay flag into LuaGameScript::take_screenshot. (75272)

Re: Screenshot during replay switch

Posted: Sun Sep 29, 2019 7:42 am
by Koub
[Koub] Moved to Implemented suggestions.