Utility:Tileset Compiler

From Dwarf Fortress Wiki
Jump to navigation Jump to search
This utility page applies to multiple versions of DF.

Gibbed's Dwarf Fortress Tileset Compiler[edit]

example of a created tileset

Tileset Compiler (or TSC for short) is a utility for Dwarf Fortress created by Rick which attempts to ease the creation of graphical creature tilesets.

It is written in C# and requires the .NET 2.0 Runtime.


  • Tileset images will be created properly aligned in width and height so that Dwarf Fortress will load them correctly - this means images that are not a multiple of 4 will function correctly (15x15 tilesets!).
  • A checkboard pattern will be drawn so it is easier to distinguish tiles.
  • Ensures that tiles do not overlap same positions, and will warn about such.
  • Tiles will be centered horizontally if too small width wise, and aligned to the bottom if too small height wise.


TSC is currently a console-based utility. Future versions may sport a proper UI.

To use TSC, all you have to do is specify a graphics_name.txt file for it to parse and build a tileset from.

It will attempt to open images based on definitions found in the file - it will attempt to first open a PNG, then a TGA, then a BMP.

All paths loaded and saved to are relative to the input file name given to TSC.



tsc.exe graphics_example.txt


Warning: Could not find tiles\dwarves\default\dwarf_default_default
Warning: Could not find tiles\dwarves\default\dwarf_default_miner
Created C:\DF\tscexample\example/dwarves.bmp


TSC loads graphics_example.txt, sees two entries, [DEFAULT:DWARVES:0:0:ADD_COLOR] and [MINER:DWARVES:1:0:AS_IS:DEFAULT].

It derives the following file names from these entries:

  • tiles\dwarves\default\dwarf_default_default
  • tiles\dwarves\default\dwarf_default_miner

This is from the following format:

tiles\tile page name\state name\tile page name_state name_profession name

When loading an image:

  • It checks for it in three different formats: PNG, TGA, and BMP.
  • If it finds one it will load and use it.
  • If it does not find one, and it is a CHILD profession, it will check for a DEFAULT image and will load and use it.
  • If it still does not, then it will check for tiles\missing.png and load and use it.
  • If that still does not, it will not draw any tile at all.

Download Tileset Compiler[edit]

Requires .NET 2.0 Runtime!

The current version of TSC is

Mirrors to download Tweak from

Found a bug? Have a suggestion?[edit]

Report it on the talk page!