It can then also take a composite image and slice it into the component images.
Download... (if it fails to load it needs VS2015 runtime)
Usage: (My steam folder is installed in c:\games... replace the beginning of the path with path to your factorio installation....
To composite images...
Code: Select all
factorio.rail_composer.exe -c c:\games\steam\steamapps\common\Factorio\data\base\graphics\entity -o composite
(path to factorio)/data/base/graphics/entity
-o <some output directory>
This will write composite images into the output directory. It also produces some mask files, which are the shape of the masks used internally to slice actually... (not used; just given for information)
To slice images...
Code: Select all
factorio.rail_composer.exe -s composite -o sliced
(path to composited images)
-o (some output directory)
This will produce (outpath)/straight-rail and (outpath)/curved-rail which can then be used with regular named scripts. (or copied back over your original data but I don't recommend that)
if -s and -c are used, expected input directory should contain composite images; the resulting sliced images are then re-composited and written into the output directory. so the output will havve /(composites) /curved-rail/(rail parts) and /straight-rail/(rail parts)
source can be found at https://github.com/d3x0r/SACK/blob/mast ... ser/main.c (though the rest of the library around it needs to be built to use it... it's portable but only via the outer library which builds with cmake)