Skip to content
NewGRF Meta Language
Branch: master
Clone or download
ConiKost and LordAro Fix #39: Compatibility with >=pillow-6.0.0 (#29)
Changed VERSION to PILLOW_VERSION, as it got removed with >=pillow-6.0.0.

Signed-off-by: Conrad Kostecki <>
Latest commit bcfff83 Jun 3, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Industries: support 16 cargos in / 16 cargos out (#15) Mar 21, 2019
regression Add: Command line option to set verbosity level of info output. Nov 7, 2014
.dorpsgek.yml Add: notify IRC about pushes, issues, and pull-requests to this repos… Feb 23, 2019
.gitignore Codechange: add nmlcache to .gitignore (#9) Dec 21, 2018
.hgignore Change: Ignore a few more editor files Apr 8, 2015
LICENSE Change: move license file to root folder Feb 23, 2019 Change: move license file to root folder Feb 23, 2019
gen_editor Added Visual Studio Editor Script (#5) Nov 4, 2018

NML NewGRF meta language

NML is a a python-based compiler, capable of compiling NML files (along with their associated language, sound and graphic files) into grf and / or nfo files.

The documentation about the language can be found on

NML is licensed under the GNU General Public License version 2, or at your option, any later version. For more information, see LICENSE (GPL version 2), or later versions at

Last updated: 2018-10-15 Release version: 0.4.5

1) Table of Contents

  1. Contact
  2. Dependencies 3.1) Required dependencies 3.2) Optional dependencies
  3. Installation
  4. Usage
  5. Known issues
  6. Credits

2) Contact

Contact can be made via the issue tracker / source repository or via IRC on the #openttd channel on OFTC.

3) Dependencies

3.1) Required dependencies

NML requires the following 3rd party packages to run:

3.2) Optional dependencies

To install NML you'll need these 3rd party packages:

  • gcc (or possibly another c++ compiler). Needed to compile the cython version of the lz77 module for grf encoding.

4) Installation

The easiest way to install NML is by using pip:

pip3 install nml

In order to install NML from a source checkout run:

python install

If you want to install the package manually copy 'nmlc' to any directory in your path and the directory 'nml' to any directory in your python path.

5) Usage

Usage: nmlc [options] <filename>.

Where <filename> is the nml file to parse.


    --version             show program's version number and exit
    -h, --help            show this help message and exit
    -d, --debug           write the AST to stdout
    -s, --stack           Dump stack when an error occurs
    --grf=<file>          write the resulting grf to <file>
    --md5=<file>          Write an md5sum of the resulting grf to <file>
    --nfo=<file>          write nfo output to <file>
    -M                    output a rule suitable for make describing the
                          graphics dependencies of the main grf file (requires
                          input file or --grf)
    --MF=<file>           When used with -M, specifies a file to write the
                          dependencies to
    --MT=<file>           target of the rule emitted by dependency generation
                          (requires -M)
    -c                    crop extraneous transparent blue from real sprites
    -u                    save uncompressed data in the grf file
    --nml=<file>          write optimized nml to <file>
    -o <file>, --output=<file>
                          write output(nfo/grf) to <file>
    -t <file>, --custom-tags=<file>
                          Load custom tags from <file> [default:
    -l <dir>, --lang-dir=<dir>
                          Load language files from directory <dir> [default:
                          The default language is stored in <file> [default:
    --start-sprite=<num>  Set the first sprite number to write (do not use
                          except when you output nfo that you want to include in
                          other files)
    -p <palette>, --palette=<palette>
                          Force nml to use the palette <pal> [default: ANY].
                          Valid values are 'DOS', 'WIN', 'ANY'
    --quiet               Disable all warnings. Errors will be printed normally.
    -n, --no-cache        Disable caching of sprites in .cache[index] files,
                          which may reduce compilation time.
    --cache-dir=<dir>     Cache files are stored in directory <dir> [default:
    --clear-orphaned      Remove unused/orphaned items from cache files.
    --verbosity=<level>   Set the verbosity level for informational output.
                          [default: 3, max: 4]

6) Known issues

See the issue tracker.

7) Credits

Active developers (in alphabetical order):

  • Albert Hofkamp (Alberth)
  • Christoph Elsenhans (frosch)
  • Ingo von Borstel (planetmaker)
  • Remko Bijker (Rubidium)

Inactive developers:

  • Jasper Reichardt (Hirundo)
  • José Soler (Terkhen)
  • Thijs Marinussen (Yexo)
You can’t perform that action at this time.