nmlc - Man Page

A compiler from NML code to NFO and/or GRF files.


nmlc[options] [file]



Crop extraneous transparent blue from real sprites.


Save real sprites uncompressed to GRF files. This saves a lot of time during encoding but it's not recommended when creating a file for distribution since it makes the output file substantially bigger.


Write output in GRF format to <file>.


Write output in NFO format to <file>.


Write output in NML format to <file>.

--output=file | -o file

Write output to <file>. The output type is detected from the extension of the filename. It must be one of nfo, nml or grf.


Write an md5sum of the resulting grf to <file>.

--debug | -d

Print a dump of the AST to stdout.


Print programme's version number and exit.

--help | -h

Print usage information.

--stack | -s

Dump stack when an error occurs.


Output a rule suitable for make describing the graphics dependencies of the main grf file (requires input file or --grf)


When used with -M, specifies a file to write the dependencies to


Target of the rule emitted by dependency generation (requires -M)

--custom-tags=file | -t file

Load custom tags from <file> [default: custom_tags.txt].

--lang-dir=dir | -l dir

Load language files from directory <dir> [default: lang].


The default language is stored in <file> [default: english.lng].

--sprites-dir=dir | -a dir

Store 32bpp sprites in directory <dir> [default: sprites].


Set the first sprite number to write (do not use except when you output nfo that you want to include in other files).

--palette=palette | -p palette

Force nml to use the palette <pal> [default: ANY]. Valid values are 'DOS', 'WIN', 'ANY'.


Disable all warnings. Errors will be printed normally.


Cache files are stored in directory <dir> [default: .nmlcache].


Remove unused / orphaned items from cache files.


Set the verbosity level for informational output [default: 3, max: 4].

See Also

The language reference at http://newgrf-specs.tt-wiki.net/wiki/NML:Main


NML was written by Albert Hofkamp, Christoph Elsenhans, Jasper Reichardt, Ingo von Borstel, José Soler and Thijs Marinussen.

This manual page was originally written by Thijs Marinussen.


January 7, 2016