[0.17.33] game.take_screenshot not store file it self from control.lua

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
Dontblameme
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Apr 26, 2019 11:46 am
Contact:

[0.17.33] game.take_screenshot not store file it self from control.lua

Post by Dontblameme »

Hello, i am trying do timelapse video from my replay and iam using that method to add script.on_nth_tick and then game.take_screenshot. But only what is created is my folder what i defined in script in "script-output" folder but no pictures at all.

But when i run same command from console it wokred.

Here is my code what iam putting into control.lua of my replay.

Code: Select all

script.on_nth_tick(3600, function(event)
  game.take_screenshot{
    surface = game.surfaces[1],
    position = {50,0},
    resolution = {2000,1500},
    zoom = 0.25,
    path = "timelapse/" .. string.format("%06d" , event.tick/event.nth_tick) .. ".png",
    show_entitiy_info = false
  }
end)

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5147
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.33] game.take_screenshot not store file it self from control.lua

Post by Klonan »

The ability to take screenshots while in a replay was removed due to this bug report: 65901

Dontblameme
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Apr 26, 2019 11:46 am
Contact:

Re: [0.17.33] game.take_screenshot not store file it self from control.lua

Post by Dontblameme »

Hi Klonan, thanks, i saw that report, and i already stared have feeling that this may be an issue ... any tips how to do it now? With mods only during playing the game, or some vanilla aproach? thanks btw.

murgo
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Mar 13, 2018 1:25 am
Contact:

Re: [0.17.33] game.take_screenshot not store file it self from control.lua

Post by murgo »

It would be great if this would be taken into further consideration. I was hoping to make a timelapse of our multiplayer replay, panning the camera outwards as time went on but it doesn't work because of this.

Replays are pretty nifty feature and one big use case for them are timelapses, so I hope this can be reallowed at some point. Built-in timelapse support would be pretty cool in itself but I can handle doing the camerawork via scripting, if only the take_screenshot would work in replays. It could even be a different function for all I care (take_screenshot_from_replay or something).

It's so close to being perfect and easy with the great replay system and the great scripting system.

Post Reply

Return to “Technical Help”