Page 1 of 1

A timelapse of a replay

Posted: Sun Apr 01, 2018 8:41 pm
by Gergely
It is great that Factorio has a replay option which makes it very easy to record hundreds of hours of game play very efficiently. Say, I have a saved data with a replay of a very long session in single player vanilla Factorio. I want to create a time lapse of it, in a single camera position, zoomed out. (Using a screen recorder software.) However, the camera follows the player at all times. Is there anything I can do to disable this and set the camera to a fixed position?

I did not find the right place to put this topic, so for the time being, I place it in the General Discussions.
Gameplay help is about gameplay,
Technical help is about anything on software level,
Modding discussions don't quite fit either....
Edit: This topic was recently moved to Technical Help FROM General Discussions.

Re: A timelapse of a replay

Posted: Tue Apr 03, 2018 5:53 am
by JimBarracus
You could use the map mode.
But you can't zoom out very far without using the simplified view.

Re: A timelapse of a replay

Posted: Tue Apr 03, 2018 8:51 am
by Gergely
JimBarracus wrote:You could use the map mode.
But you can't zoom out very far without using the simplified view.
Where is this "map mode"?
Also, I do not mind being unable to zoom out far. I can record multiple instances at different locations, and attach them into a single screen later on.

Re: A timelapse of a replay

Posted: Tue Apr 03, 2018 9:46 am
by JimBarracus
Press m (default) and zoom in.
You should see the world and you can move around without the character.
The area needs to be covered by a radar.

Re: A timelapse of a replay

Posted: Tue Apr 03, 2018 10:39 am
by Gergely
JimBarracus wrote:Press m (default) and zoom in.
You should see the world and you can move around without the character.
The area needs to be covered by a radar.
I can't. Not during a replay.

Re: A timelapse of a replay

Posted: Tue Apr 03, 2018 5:14 pm
by Jap2.0
There's a console command that may help.

Re: A timelapse of a replay

Posted: Tue Apr 17, 2018 1:49 pm
by Gergely
Jap2.0 wrote:There's a console command that may help.
I cannot open the console during a replay.

:x

Hmmm... perhaps doing something with the scenario script of the saved data can solve this problem. But what exactly? (I mean, how do you detach the a camera, and not the player from the character?)

Re: A timelapse of a replay

Posted: Thu May 17, 2018 11:12 pm
by DaveMcW
Gergely wrote:Hmmm... perhaps doing something with the scenario script of the saved data can solve this problem.
Yes, you can edit the save to include a timelapse script. Add this to the bottom of control.lua.

Code: Select all

script.on_nth_tick(3600, function(event) 
  game.take_screenshot{
    surface = game.surfaces[1],
    position = {0,0},
    resolution = {1280,720},
    zoom = 0.2,
    path = "timelapse/" .. string.format("%06d", event.tick/event.nth_tick) .. ".jpg",
    show_entitiy_info = true,
  }
end)
After you watch the replay, you will end up with a folder full of images. Then you need to find a tool that converts a folder full of images to mp4.