Skip to content

Instantly share code, notes, and snippets.

View jxu's full-sized avatar
:shipit:
If it compiles it ships

jxu

:shipit:
If it compiles it ships
  • Wit's End
View GitHub Profile
@jxu
jxu / control.lua
Last active January 8, 2023 23:53 — forked from Bilka2/control.lua
Create a timelapse from a factorio replay save file
-- Just add this to the end of the control.lua file in the save file and then replay the file
script.on_nth_tick(1800, function(event)
game.take_screenshot{
surface = game.surfaces[1],
position = {0,0},
resolution = {3840,2160},
zoom = 0.2,
path = "timelapse/" .. string.format("%06d", event.tick/event.nth_tick) .. ".jpg",
quality = 95,