GRFCODEC(1)

πŸ’– GRFCODEC πŸ’–

okay bestie, so this is the GRFCodec manual page, section 1 β€” a tool to convert a GRF file into graphics files and meta data, and vice versa. yes, both directions, it's giving versatile icon ✨


🌸 SYNOPSIS 🌸

grfcodec [-sv] [-d | -e] [options] GRF-file [Directory]

so like, quick vibe check on the args:

  • <GRF-File> β€” this is the .GRF file you want to work on, e.g. TRG1.GRF πŸŽ€
  • <Directory> β€” this is where the individual sprites should be saved. if you omit it, they default to a subdirectory called sprites/ πŸ’…

✨ OPTIONS ✨

πŸ¦‹ The main girlies

  • -? β€” Display the help message. (she's asking for directions, respect it)
  • -e β€” Encode a GRF file. The GRF-file you pass is the file where to encode to. The source of the GRF-file, i.e. the .nfo, will be looked for in sprites/GRF-file.nfo. All graphics files will be searched for relative from the location of the GRF-file.
  • -d β€” Decode a GRF file. The GRF-file you pass is the file to decode. The result will be in sprites/GRF-file.nfo and sprites/GRF-file.png.
  • -s β€” Silences the progress output in interactive mode. (peace and quiet, we love her for that πŸ™ˆ)
  • -v β€” Display the version.

πŸŽ€ Options for decoding

  • -w num β€” Write spritesheets files with the given width (default 800, minimum 16).
  • -h num β€” Split spritesheets when they reach this height (default no limit, minimum 16).
  • -b num β€” Organize sprites in boxes of this size (default 16).
  • -o ssf β€” Sets the format of generated spritesheets. See -o ? for a list. πŸ‘€
  • -p pal β€” Use this palette instead of the default. See -p ? for a list.
  • -t β€” Disable decoding of plain text characters as strings.
  • -x β€” Disable production of unquoted escape sequences.
  • -xx β€” Disable production of both quoted and unquoted escape sequences.
heads up bestie: this has the side effect of producing a version 6 .nfo, instead of a version 7 .nfo. 😭
  • -X β€” List sprite numbers in the image file in hex.

πŸ”₯ Options for encoding

  • -c β€” Crop extraneous transparent blue from real sprites.
  • -u β€” Save uncompressed data (probably not a good idea). πŸ’€
  • -q β€” Suppress warning messages.
  • -g num β€” Create a GRF file with the given container version. Valid versions are 1 and 2, where the latter allows bigger sprites, larger sounds, and multiple zoom levels and bit depths for the sprites. (version 2 really said main character energy πŸ‘‘)
  • -n β€” Try both compression algorithms and use the most efficient. This might cause trouble when loading the NewGRF in TTDPatch.

πŸ’œ Options for both encoding and decoding

  • -m num β€” Apply colour translation to all sprites except character-glyphs.
  • -M num β€” Apply colour translation to all sprites.
ngl if both of these are specified, only the last is obeyed. -m ? or -M ? for a list of colour translations. πŸ“‹

🫢 SEE ALSO

The documentation in /usr/share/doc/grfcodec/


πŸ‘‘ AUTHOR

GRFCodec was written by Josef Drexler.

This manual page was written by Remko Bijker.


GRFCodec is Copyright (C) 2000-2005 by Josef Drexler <josef@ttdpatch.net>


okay that's the whole thing, no cap πŸ’… and just so you know β€” this page is from February 24, 2012, and it's GRFCodec(1), section 1 of the manual. slay, go encode something iconic πŸ¦‹βœ¨