v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing Tilesets

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.

If you are creating a redirect to the current version's page, do not use any namespace. For example: use #REDIRECT [[Cat]], not #REDIRECT [[Main:Cat]] or #REDIRECT [[cv:Cat]]. See DF:Versions for more information.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{Quality|Exceptional}}
+
{{migrated article}}
{{av}}
+
{{Quality|Unrated}}{{av}}
 
:''(For an overview of graphics in DF, see [[Graphics|Graphics]])''
 
:''(For an overview of graphics in DF, see [[Graphics|Graphics]])''
 
:''(For a chart with the default ASCII characters, see [[Main:Character table|Character table]].)''
 
:''(For a chart with the default ASCII characters, see [[Main:Character table|Character table]].)''
Line 7: Line 7:
 
:''(For information on how tilesets get colored, see [[Color]])''
 
:''(For information on how tilesets get colored, see [[Color]])''
 
----
 
----
 +
 
'''Tilesets''' are images the game uses to display its graphics when "Use Classic ASCII Glyphs" is set to "Yes"; each tile is used to show text and represent things. Users create custom tilesets for a number of reasons, including increased visibility, aesthetics, or small size. Tilesets come in two flavors: "'''character sets'''" (or simply "tilesets") and "'''graphics sets'''". This article is only about tilesets.
 
'''Tilesets''' are images the game uses to display its graphics when "Use Classic ASCII Glyphs" is set to "Yes"; each tile is used to show text and represent things. Users create custom tilesets for a number of reasons, including increased visibility, aesthetics, or small size. Tilesets come in two flavors: "'''character sets'''" (or simply "tilesets") and "'''graphics sets'''". This article is only about tilesets.
  
 
== Overview ==
 
== Overview ==
A character set (or 'tileset') is an image in BMP or PNG format that contains the 256 different tiles (numbered 0-255), corresponding to the [[Main:Character table|IBM Code Page 437]] (sometimes called Extended ASCII), which are used to display all graphics. The tiles are always arranged in a 16×16 grid, but its dimensions can be varied. You can have both square and non-square tiles, with 16x16 pixels being the most common size. (If "Use Classic ASCII Glyphs" is set to "No", the tileset must be 128×192 pixels (tiles 8×12 pixels) in order to render the customs tiles properly. See [[Graphic set]])
 
  
UI scaling will only work if the tileset is 128×192px (8×12px tiles).  
+
A character set (or 'tileset') is an image in BMP or PNG format that contains the 256 different tiles (numbered 0-255), corresponding to the [[Main:Character table|IBM Code Page 437]] (sometimes called Extended ASCII), which are used to display all graphics. The tiles are always arranged in a 16x16 grid, but its dimensions can be varied. You can have both square and non-square tiles, with 16x16 pixels being the most common size. (If "Use Classic ASCII Glyphs" is set to "No", the tileset must be 128x192 pixels (tiles 8x12 pixels) in order to render the customs tiles properly. See [[Graphic set]])
 +
 
 +
UI scaling will only work if the tileset is 128x192px (8x12px tiles).  
  
 
As the tileset is limited to only 256 tiles, some objects share the same tile. Below is a detailed list.
 
As the tileset is limited to only 256 tiles, some objects share the same tile. Below is a detailed list.
Line 37: Line 39:
  
 
=== Generating a custom tileset from a font in Linux ===
 
=== Generating a custom tileset from a font in Linux ===
 +
 
In Linux, it is possible to create tileset from a .ttf font programmatically in the terminal. The following command will open a terminal window with your desired font, rendered appropriately for ''Dwarf Fortress'', and screenshots it. It requires xterm, the screenshot utility xwd, and a text file containing the code page 437 characters in the appropriate order.
 
In Linux, it is possible to create tileset from a .ttf font programmatically in the terminal. The following command will open a terminal window with your desired font, rendered appropriately for ''Dwarf Fortress'', and screenshots it. It requires xterm, the screenshot utility xwd, and a text file containing the code page 437 characters in the appropriate order.
  
Line 48: Line 51:
  
 
=== How colors other than white and magenta work ===
 
=== How colors other than white and magenta work ===
 +
 
When the game draws a tile, it will select a foreground color, a background color, and a tile based on the item being drawn.  The background color will be used in place of magenta (Hex code #FF00FF or RGB 255 0 255).  All other colors in the tile will be treated as a mask against the foreground color.  Pure white (#FFFFFF) will always show the foreground color, while light grey (#CCCCCC) will be a slightly darker version of the foreground color, and dark grey (#888888) will be a dark version of the foreground color.  Black (#000000) will always be black.  It is impossible to use different shades of the background color.
 
When the game draws a tile, it will select a foreground color, a background color, and a tile based on the item being drawn.  The background color will be used in place of magenta (Hex code #FF00FF or RGB 255 0 255).  All other colors in the tile will be treated as a mask against the foreground color.  Pure white (#FFFFFF) will always show the foreground color, while light grey (#CCCCCC) will be a slightly darker version of the foreground color, and dark grey (#888888) will be a dark version of the foreground color.  Black (#000000) will always be black.  It is impossible to use different shades of the background color.
  
Line 95: Line 99:
  
 
== What tiles are used for what ==
 
== What tiles are used for what ==
 +
 
* Items marked with * can have their tile changed in the [[modding|raw data]] files. <small>[This list need validating for v0.50]</small>
 
* Items marked with * can have their tile changed in the [[modding|raw data]] files. <small>[This list need validating for v0.50]</small>
 
* Items marked with <sup>#</sup> can have their tile replaced by a [[graphic set]] image, in addition to having their tile changed in the raw data.
 
* Items marked with <sup>#</sup> can have their tile replaced by a [[graphic set]] image, in addition to having their tile changed in the raw data.

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

This page is a member of 1 hidden category: