Rail compositer and slicer

Tools which are useful for mod development.
Post Reply
d3x0r
Filter Inserter
Filter Inserter
Posts: 316
Joined: Sun Jun 04, 2017 8:56 am
Contact:

Rail compositer and slicer

Post by d3x0r »

This is a tool that can take the individual Factorio rail images and composite them into single layers.
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 
-c
(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
-s
(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)

Post Reply

Return to “Development tools”