Page 1 of 2

[0.11.x] Time Lapse Mod

Posted: Fri Jun 12, 2015 7:34 pm
by MrP123
After reading and posting in this thread on the Factorio subreddit I decided to create a mod that helps with creating time lapses of your Factorio world.

This mods basic functionallity is taking screenshots at specified intervals, either at the players location or at a specified location.
Out of those screenshots you can create a time lapse gif or video. The following screenshot of the config screen should give you an idea of the implemented features
screenshot of config file - you may have to open it in a different tab to see the whole image
Current version:
Version 2.0.0 for Factorio 0.12.x
Version 1.3.0 - 24.06.2015
Version 1.3.0
Version 1.2.0
Version 1.1.0
Version 1.0.0
This mod can also be found on my github page

Re: [0.11.x] Time Lapse Mod

Posted: Fri Jun 12, 2015 7:59 pm
by FishSandwich
Beautiful! :D

Re: [0.11.x] Time Lapse Mod

Posted: Fri Jun 12, 2015 11:36 pm
by Degraine
That's a brilliant idea.

Re: [0.11.x] Time Lapse Mod

Posted: Sat Jun 13, 2015 12:30 pm
by Align
Sweet!

Would it be possible to make it turn off nighttime briefly when it takes a shot? I'm using 0.1 zoom at the center to see how my base evolves throughout, but about a third of the shots are at night (natch), so it's hard to tell what's happened during those.
It also seems to catch the floating text when picking something up or inputting resources via ctrl/shift-clicking.

Re: [0.11.x] Time Lapse Mod

Posted: Sat Jun 13, 2015 2:39 pm
by MrP123
Align wrote:Sweet!

Would it be possible to make it turn off nighttime briefly when it takes a shot? I'm using 0.1 zoom at the center to see how my base evolves throughout, but about a third of the shots are at night (natch), so it's hard to tell what's happened during those.
It also seems to catch the floating text when picking something up or inputting resources via ctrl/shift-clicking.
Turning of nighttime briefly is now an option in version 1.1.0, but the floating text can't be turned off at all with the current modding features in Factorio

Re: [0.11.x] Time Lapse Mod

Posted: Sat Jun 13, 2015 9:01 pm
by Align
Nice. Now the only question is, where can I upload a 300 MB animated PNG...?

Re: [0.11.x] Time Lapse Mod

Posted: Sun Jun 14, 2015 6:56 am
by MrP123
Align wrote:Nice. Now the only question is, where can I upload a 300 MB animated PNG...?
It's probably better to create a video out of all these screenshots.
Nevertheless you could try gfycat, I'm not quite sure what the size limit is, but as far as I know it is pretty big

Re: [0.11.x] Time Lapse Mod

Posted: Sun Jun 14, 2015 9:15 am
by Align
I'll settle for a low quality giffy, with my zoom set so far out it doesn't make much of a difference

http://www.gfycat.com/RelievedDentalHackee

Re: [0.11.x] Time Lapse Mod

Posted: Sun Jun 14, 2015 9:19 am
by MrP123
Align:
I just saw it on reddit. Looks pretty neat

Re: [0.11.x] Time Lapse Mod

Posted: Sun Jun 14, 2015 10:05 am
by FishSandwich
Align wrote:I'll settle for a low quality giffy, with my zoom set so far out it doesn't make much of a difference

http://www.gfycat.com/RelievedDentalHackee
Very nice! Might I ask how long you were playing and what the screenshot interval was set to?

Re: [0.11.x] Time Lapse Mod

Posted: Sun Jun 14, 2015 11:02 am
by MrP123
FishSandwich wrote:
Align wrote:I'll settle for a low quality giffy, with my zoom set so far out it doesn't make much of a difference

http://www.gfycat.com/RelievedDentalHackee
Very nice! Might I ask how long you were playing and what the screenshot interval was set to?
I'm quoting him from the thread on /r/factorio, as I asked the same question
Uh, most of Saturday to be honest... got really absorbed in it!
Let's see, I think there were 70 images and it takes one every 5 minutes... 6 hours? That sounds about right.

Re: [0.11.x] Time Lapse Mod

Posted: Mon Jun 15, 2015 7:40 am
by StanFear
Hey, "crazy" idea, couyld you make it take the screenshot when the game autosaves ? that way, no problems with laggy games, and if the game tries to generate a huge image that could make the game lag, it won't be "seen"

Re: [0.11.x] Time Lapse Mod

Posted: Mon Jun 15, 2015 4:51 pm
by MrP123
StanFear wrote:Hey, "crazy" idea, couyld you make it take the screenshot when the game autosaves ? that way, no problems with laggy games, and if the game tries to generate a huge image that could make the game lag, it won't be "seen"
Theoretically that would work, by calling my screenshot code within the onsave event, but the modding section of the factorio wiki advises against doing so, as this event is only meant to let the mod init it's own helper structures. Therefore this wouldn't be a good idea and could lead to instability.

Re: [0.11.x] Time Lapse Mod

Posted: Mon Jun 15, 2015 11:42 pm
by Zengief
Is there any way to flip it over to the minimap before the screenshot? I looked through the documentation on the wiki and couldn't find anything to set it or even to detect whether or not the map is already showing.

Re: [0.11.x] Time Lapse Mod

Posted: Tue Jun 16, 2015 1:10 pm
by VeraLapsa
https://youtu.be/RtBYq1ZYFyg

I used VirtualDub to make the video.

I'm fairly new to mods and if a mod can add commands to the game, if so I'd be nice to be able to set the center of the screenshot in the config with a command.

For example the default center is {0,0} but as your base begins to grow it's growing close to one side of the frame, after running the "/c game.player.zoom=0.1", where 0.1 is what ever zoom level you have set in the timelapse config, you move to where you want the new center of the frame to be and run a command to change the configured center.

Have Fun!

Re: [0.11.x] Time Lapse Mod

Posted: Tue Jun 16, 2015 6:21 pm
by Align
Nice. What was the filesize for the screenshots/video?

Re: [0.11.x] Time Lapse Mod

Posted: Tue Jun 16, 2015 6:27 pm
by TheSAguy
Cool idea!
Wonder if you could take the screen-shot at noon, so it's always light.

Re: [0.11.x] Time Lapse Mod

Posted: Tue Jun 16, 2015 9:04 pm
by VeraLapsa
Align wrote:Nice. What was the filesize for the screenshots/video?
Each screenshot was 3.3MB give, or take, for a total of 4.22GB for 1,280 screenshots.

The video, after rendered, is 331MB, so a good reduction.
TheSAguy wrote:Cool idea!
Wonder if you could take the screen-shot at noon, so it's always light.
It's already an option in the config, JSYK.

Re: [0.11.x] Time Lapse Mod

Posted: Wed Jun 17, 2015 4:45 pm
by MrP123
VeraLapsa wrote:https://youtu.be/RtBYq1ZYFyg

I used VirtualDub to make the video.

I'm fairly new to mods and if a mod can add commands to the game, if so I'd be nice to be able to set the center of the screenshot in the config with a command.

For example the default center is {0,0} but as your base begins to grow it's growing close to one side of the frame, after running the "/c game.player.zoom=0.1", where 0.1 is what ever zoom level you have set in the timelapse config, you move to where you want the new center of the frame to be and run a command to change the configured center.

Have Fun!
That time lapse looks very cool, thanks for sharing

Re: [0.11.x] Time Lapse Mod

Posted: Sat Jun 20, 2015 11:49 am
by MrP123
VeraLapsa wrote:I'm fairly new to mods and if a mod can add commands to the game, if so I'd be nice to be able to set the center of the screenshot in the config with a command.
This feature was just added in version 1.2.0, sadly it isn't able to save the changes to the config file, this has to be done manually after you finish playing, but changing the position works perfectly while playing.