Skip to content

fgardt/factorio-spritter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

actions status release ko-fi

Spritter

A simple CLI tool to combine individual sprites into spritesheets for factorio.

Usage

~$ spritter help
Spritesheet generator for factorio

Usage: spritter <COMMAND>

Commands:
  spritesheet  Generate sprite sheets from a folder of images
  icon         Generate a mipmap icon from a folder of images
  help         Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Spritesheet

~$ spritter help spritesheet
Generate sprite sheets from a folder of images

Usage: spritter spritesheet [OPTIONS] <SOURCE> <OUTPUT>

Arguments:
  <SOURCE>  Folder containing the individual sprites
  <OUTPUT>  Output folder

Options:
  -l, --lua
          Enable lua output generation
  -p, --prefix <PREFIX>
          Prefix to add to the output file name [default: ]
  -r, --recursive
          Recursive search for images. Each folder will be a separate sprite sheet
  -t, --tile-resolution <TILE_RESOLUTION>
          Resolution of the input sprites in pixels / tile [default: 32]
      --hr
          Set when the output file should be considered to be HR (8k x 8k resolution limit).
          When set the tile resolution will be set to 64 unless specified otherwise.
      --no-crop
          Set when the sprites should not be cropped
  -a, --crop-alpha <CROP_ALPHA>
          Sets the max alpha value to consider a pixel as transparent [0-255].
          Use a higher value in case your inputs have slightly transparent pixels and don't crop nicely. [default: 0]
  -s, --scale <SCALE>
          Set a scaling factor to rescale the used sprites by.
          Values < 1.0 will shrink the sprites. Values > 1.0 will enlarge them. [default: 1]
      --scale-filter <SCALE_FILTER>
          The scaling filter to use when scaling sprites [default: catmull-rom] [possible values: nearest, triangle, catmull-rom, gaussian, lanczos3]

Icon

~$ spritter help icon
Generate a mipmap icon from a folder of images

The individual images are used as the respective mip levels and combined into a single image

Usage: spritter icon [OPTIONS] <SOURCE> <OUTPUT>

Arguments:
  <SOURCE> Folder containing the individual sprites
  <OUTPUT> Output folder

Options:
  -l, --lua
          Enable lua output generation
  -p, --prefix <PREFIX>
          Prefix to add to the output file name