Screenshot Toolkit


* Automatically does screenshots of the whole base in set minute intervals. * Allows for screenshots of selected areas, similar to programs like the Windows Snipping Tool, Greenshot or Flameshot. Written to be performance friendly with various settings giving you control over how the screenshots are done and how much the performance is impacted. For more information check the information tab.

8 hours ago
0.18 - 1.1
585
Owner:
Anders142536
Source:
Anders142536/FacAutoscreenshot
Homepage:
N/A
License:
GNU GPLv3
Created:
9 months ago
Latest Version:
2.0.7 (8 hours ago)
Factorio version:
0.18 - 1.1
Downloaded:
585 times

This mod has the following functionalities:

  • Area screenshots: Creating screenshots of a given area similar to common screenshotting software (Windows Snipping Tool, Greenshot, Flameshot).
  • Auto screenshots: Creating screenshots of your whole base in set minute intervals with automatic zooming to fit your base on the screenshots perfectly. If you want to do a timelapse video of your whole base growing, this is meant for you.
  • Image Stitcher: The Auto screenshots are fragmented into smaller image files unless you disable this. My image stitcher program is part of this mod and will stitch your images back together.

MANUAL

Area screenshots

The resolution of the area screenshots are currently limited to 16385x16385 pixels, as this is the hardcoded limit by the game. There are workarounds for this, but unless required you will have to take several screenshots and stitch them back together manually using your favorite image manipulation program.

GUI

  • Area
    Here you can set the area you want to screenshot. The grey button will give you a selection crosshair, the red one will delete your currently selected area. You can select an area by clicking two points on the map with left click and right click. The area will be shown with a white rectangle, including your selected points.
    Currently the four number textfields on the right are just for displaying your selection and allowing input is maybe coming in the future.

  • Zoom level
    Here you can manipulate the zoom level of the resulting screenshot. Lower values mean a higher zooming. For example a zoom level of 0.5 will result in a 2x zoomed image. A zoom level of 4 will result in a 0.25x zoomed image.

  • Estimates
    I give you estimates of the resolution and filesize. The resolution should be mostly the exact value. The filesize is based on screenshots taken, with a little extra on top. So your screenshots should stay below that value, but not by far.

  • Start Area Screenshot Button
    This button will trigger a screenshot with the given area. It requires that:
    x An area has been selected
    x The resulting resolution is below 16385x16385

Auto screenshots

The whole base is screenshotted until an unreasonably big base size is reached. To avoid performance impact the whole screenshot is dynamically split into several smaller screenshots, each taken one after the other, one per tick. This also means that the first fragment and the last fragment will have a time difference that can be many seconds. This means you will need to use my stitcher program to stitch those fragments back together. If you want to avoid using this you can simply select the "Single tick Screenshots" checkbox, but the performance will be impacted a lot more, possibly even causing several second long freeze frames.

Currently, only the vanilla surface "nauvis" is supported.

GUI

The GUI shows the current status of the auto screenshots, the currently screenshotted surface as well all the necessary controls. You will see either a progress bar displaying the progress of the current screenshot or a timer until the next screenshot will be taken.

Map Settings

  • Enable debug?
    Will make the logging more verbose. If you run into issues I will have an easier time understanding the issue with logs having this enabled.

Background theory for nerds

Factorios engine does not allow for asynchronous screenshotting, meaning the game engine is either calculating your game or doing a screenshots. Furthermore it is not possible to do screenshots for two players at the same time, so screenshots for different players need to be queued. This causes quite some isues for the simple task of screenshotting your whole base. Factorios engine runs at 60 update ticks per second or 60 UPS. This means everything that happens in 1/60th of a second has to be calculated before a new image can be rendered for your screen. When you are playing the game the engine only touches the very necessary entities in the map that are required to render the next state of the game to render an image in, so a huge amount of entities can be ignored during that calculation. Basically, all entities whose state is about to change (visual state, logical state, etc.) or that are displayed on your screen are touched. When doing a screenshot of your whole base, however, everything is "on your screen", so the game has to touch every single one of them. This takes time, a lot actually.

While you will discover further below that you can set the mod to do a single tick screenshot, I strongly recommend not to. By default the mod takes way more, smaller screenshots by splitting the whole, resulting image into tiny fragments. This reduces the performance impact massively with the downside of thousands of small screenshots being produced instead of one. This splitting is dynamically adjusted to the total base size, so you do not have to worry about it. As a rough approximation this is based on total vertical and horizontal span of your base rather than entity count.

This brings us to the two, unfortunatly unsolvable, problems of this feature.

  1. If the splitting is too strong there will be quite a time difference between the first and the last screenshot. The (probably not used) limit by the settings I give you is 18 mins and 16 s, based on your Increased Splitting value.

  2. If there are three players taking screenshots, all three of them have to take the screenshots one after another. If the settings are set so that every player takes a screenshot every 10 minutes and every screenshots takes roughly 4 minutes, the game will not be done with taking screenshots when the next round of screenshots is tried to be taken.

I should mention that screenshotting times in the minutes are not meant to be achieved with settings required on a mid to high end machine running factorio. This is purely allowed to give you the choice to do so. In my personal experience the point where using such a high splitting setting would be tempting is when the save is anyways so bloated that a stable UPS count can no longer be achieved. But still, the choice is yours.

Image Stitcher

If you are separating your screenshots over several ticks by disabling the Single Screenshot option (which I heavily recommend) the mod will take a shitton of fragmented screenshots instead of just one big screenshot. Unfortunatly, it is quite a hassle to stitch them back together. Fortunatly, I wrote a program to automate this process for you! It is pretty quick and is delivered with the mod after version 1.2. It is written in java 12, so you will need to install java 12 or higher. You don't need to trust me, the code is readable here: https://github.com/Anders142536/imageStitcher or when decompiling the .jar file

For now the program is a pure command line program, as to my knowledge I am the only one using it. If required by users (like you?) I will gladly add some ui to make using it easier.

Until a UI is added, do this to stitch your fragmented screenshots back together:

  1. Open up some command line. If using linux you should know how to do this. If using windows, press WINDOWS and type "cmd", then press enter. If using mac then good luck, bro, I never touched a mac ¯\_(ツ)_/¯. Duck Duck Go is your friend.

  2. Navigate to the folder where the imagestitcher.jar file is. It is delivered with the mod or accessible under: https://github.com/Anders142536/imageStitcher
    If using the delivered version you will have to copy my mod to a folder of your choice, unzip it, and take the .jar file from there. If you do not understand this, google the instructions. Under linux my mod should be found under /home/YOURUSERNAMEHERE/.factorio/mods/FacAutoScreenshot. Under windows it should be found under C:/User/YOURUSERNAMEHERE/Appdata/Roaming/Factorio/Mods/FacAutoScreenshot. Under mac... well good luck bro when googling it.

  3. Enter "java -jar imagestitcher.jar" and press enter. Do not panic, on the first run this will throw an error, due to no config file being found. It will be created for you, so just open the file that is described in the response, then run the program again.

  4. Config:

    • Please keep in mind that under windows a path has to be given with / instead of \, due to some stupid java limitation when reading text from a file.
    • The output folder of your screenshots should be found in your factorio folder:
      When using linux that is the same .factorio folder from before/script-output/screenshots/GAMESEEDOFYOURSAVE/split. Under Windows thats the same Factorio folder from before with the same sub path. Under Mac, well, I really, really hope you know what you are doing :D
  5. The programm will create a folder in the directory it is in, called "stitched screenshots" with all stitched screenshots in it.

Last, but not least, I would recommend you to stitch them back together often and clean up the fragmented files, as especially when screenshotting with 8k resolution, your hard drive will quickly fill up with data from this. When stitching the images your hard drive will require as much space as the input folder has in size. I do not delete those files automatically for you as I dont even trust myself enough to do automated deletion of anything. You should not trust yourself with that either, probably, just saying.

If you need further instructions, first google, then ask me. Still, dont mind to ask me if you have any questions. You can just text me on discord: Anders 142536#1425