- 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.
Difference between revisions of "Tilesets"
m (Added shop signs.) |
m |
||
(48 intermediate revisions by 17 users not shown) | |||
Line 1: | Line 1: | ||
− | {{Quality|Exceptional}}{{av}} | + | {{Quality|Exceptional}} |
+ | {{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]].)'' | ||
:''(For user-created creature tilesets, see [[Main:Tileset repository|Tileset repository]].)'' | :''(For user-created creature tilesets, see [[Main:Tileset repository|Tileset repository]].)'' | ||
:''(For information about Graphic sets, see [[Graphic set|Graphic set]])'' | :''(For information about Graphic sets, see [[Graphic set|Graphic set]])'' | ||
− | :''(For information on how tilesets get colored, see [[ | + | :''(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. | ||
− | '' | + | == 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). | |
− | + | As the tileset is limited to only 256 tiles, some objects share the same tile. Below is a detailed list. | |
− | + | In previous versions of Dwarf Fortress (v0.47 and below), some of the tiles could be changed in the raws and init files, and creatures could have separate graphics (see [[DF2014:Graphic set]], this functionality has been removed in v0.50 (and above) with separate graphics being controlled by mods with "Use Classic ASCII Glyphs" set to "No". | |
== Installation and creation of custom tilesets == | == Installation and creation of custom tilesets == | ||
=== Installation === | === Installation === | ||
− | [[ | + | [[Tileset repository]] is a list of user-made standard tilesets, and provides [[Tileset_repository#Installation|installation instructions]]. |
+ | |||
+ | === Creating a custom tileset === | ||
+ | Scaling occurs automatically based on the size of the tiles and the window. | ||
+ | The desired grid, interface scaling and percentage settings only work when using 8x12 tiles. | ||
+ | |||
+ | When creating a custom tileset, it's often easiest to start with an existing one, and edit it to your liking. Tilesets generally fall into two categories: rectangular tilesets and square tilesets. Rectangular tilesets have tiles that are taller than they are wide. The text in these tilesets is generally easier to read, but the map appears squished horizontally. Square tilesets usually provide more attractive graphics, but are slightly less readable. | ||
+ | |||
+ | The graphics in Dwarf Fortress can be enhanced by setting "Use Classic ASCII Glyphs" to "No" and installing a [[Graphics set]] mod. (A default is provided in the premium version, but has been removed in the classic "free" version.) | ||
− | + | Mifki created a [http://mifki.com/df/fontgen/ tool] to make a tileset from any font, which can be used as starting point or as is.{{cite forum|140250}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Many tiles are used by the game in multiple ways, and this makes customizing the graphics difficult. The same icon is used for chairs and the north end of one-tile-wide vertical bridges. Ashes and broken arrows look the same, and many game entities (such as levers, floodgates, bags, and bins) share characters that are also used in Dwarven names or other bits of text in the interface. | |
− | + | Some of these issues could be fixed by the third-party Text Will Be Text (TWBT) plugin for the [[DF2014:DFHack]] modding API. This has not been updated for compatibility with v0.50. | |
− | |||
− | + | === 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. | |
− | + | <pre>xterm -fa "FONTFAMILY:pixelsize:SIZE:antialias=false" -bg magenta -geometry 16x16 -e "setterm -cursor off && printf '%s' \"\$(<PATH/TO/CODE437.txt)\" && sleep 0.1 && xwd -id \$WINDOWID | xwdtopnm | pnmtopng > \"FONTFAMILY-SIZE.png\""</pre> | |
− | + | This will generate an image in your current directory, so it might be a good idea to cd into your /data/art directory beforehand. | |
− | + | '''This works ''much'' better for bitmap fonts, in their native size.''' For a list of such fonts on your system and their sizes, you can run | |
− | < | + | <pre>fc-list :scalable=false:spacing=mono family pixelsize</pre> |
+ | === 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. | ||
− | + | Alpha values are supported in png fonts (since v0.43.04), allowing for better transparency, and partial transparency, enabling anti-aliased tilesets and other interesting tricks. | |
In general, just remember these rules: | In general, just remember these rules: | ||
Line 88: | Line 92: | ||
As illustrated by this example, colors in the tileset can result in colors that aren't in the foreground color or the tile graphic. In this case, a brown foreground color with a cyan pixel color in the tileset results in a final color of green. | As illustrated by this example, colors in the tileset can result in colors that aren't in the foreground color or the tile graphic. In this case, a brown foreground color with a cyan pixel color in the tileset results in a final color of green. | ||
− | Theoretically, the way the game handles color masks could be used to display different graphics for items that use the same tile (but whose respective colors use different color component channels). For example, if a bright red object and a bright blue object use the same tile, the tile can use bright red for all pixels that only the red object uses, bright blue for all pixels only the blue object uses, and bright magenta (but NOT #FF00FF, it would have to be #FE00FE or something similar) for all pixels both objects use. In this fashion the two objects that share a tile would look completely different. In practice however, this is probably impossible because so many objects share the same tile, the chances of the potential foreground colors sharing a red, green, or blue color component are too great. | + | Theoretically, the way the game handles color masks could be used to display different graphics for items that use the same tile (but whose respective colors use different color component channels). For example, if a bright red object and a bright blue object use the same tile, the tile can use bright red for all pixels that only the red object uses, bright blue for all pixels only the blue object uses, and bright magenta (but NOT #FF00FF, it would have to be #FE00FE or something similar) for all pixels both objects use. In this fashion the two objects that share a tile would look completely different. In practice however, this is probably impossible because so many objects share the same tile, the chances of the potential foreground colors sharing a red, green, or blue color component are too great. |
== 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. | ||
* 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. | ||
* Items marked with <sup>$</sup> can be changed in the [[d_init.txt]] file. | * Items marked with <sup>$</sup> can be changed in the [[d_init.txt]] file. | ||
+ | * Items marked with <sup>¢</sup> use dual colors. | ||
+ | * Items marked with <sup>÷</sup> use inverted tile | ||
For a graphical table, go to the [[Main:Character Table|Character Table]]. | For a graphical table, go to the [[Main:Character Table|Character Table]]. | ||
Line 123: | Line 128: | ||
|- | |- | ||
|<small>007</small> {{TST|•}} | |<small>007</small> {{TST|•}} | ||
− | | Mined-out [[stone]]*, solid [[workshop]] tile for several workshops like the [[magma smelter]], [[river]] sources on world map, [[cave]]s on world map, [[lair]]s on world map, moon on travel map, flower buds* | + | | Mined-out [[stone]]*, solid [[workshop]] tile for several workshops like the [[magma smelter]], filled [[nest box]] building, [[river]] sources on world map, [[cave]]s on world map, [[lair]]s on world map, moon on travel map, flower buds* |
|- | |- | ||
|<small>008</small> {{TST|◘}} | |<small>008</small> {{TST|◘}} | ||
− | | Solid workshop tile for several other workshops like the [[magma forge]], [[tanner's shop]], [[catapult]] cup | + | | Solid workshop tile for several other workshops like the [[magma forge]], [[tanner's shop]], [[catapult]] cup, [[nest box]] tool*, empty [[nest box]] building, [[codex|codices]], [[die|dice]] |
|- | |- | ||
|<small>009</small> {{TST|○}} | |<small>009</small> {{TST|○}} | ||
− | | [[Well]], [[vermin]] colony, [[millstone]], [[quern]], vertical [[axle]], fortress walls on travel map, sun behind clouds on travel map, | + | | [[Well]], [[vermin]] colony, [[millstone]], [[quern]], vertical [[axle]], fortress walls on travel map, sun behind clouds on travel map, [[castle]]s on world map, [[monastery|monasteries]] on world map, [[creeping eye]] out of view (adventure mode)*, [[staring eyeball]]*, [[bubble bulb]]* |
|- | |- | ||
|<small>010</small> {{TST|◙}} | |<small>010</small> {{TST|◙}} | ||
− | | trunk interior<sup>$</sup> | + | | trunk interior<sup>$</sup>, [[fort|forts]] on world map |
|- | |- | ||
|<small>011</small> {{TST|♂}} | |<small>011</small> {{TST|♂}} | ||
− | | [[Gender|Male]] sign, [[bag]]s, [[Tilesets#Creatures| | + | | [[Gender|Male]] sign, [[bag]]s, [[Tilesets#Creatures|various cephalopods]]<sup>#</sup> |
|- | |- | ||
|<small>012</small> {{TST|♀}} | |<small>012</small> {{TST|♀}} | ||
Line 147: | Line 152: | ||
|- | |- | ||
|<small>015</small> {{TST|☼}} | |<small>015</small> {{TST|☼}} | ||
− | | Masterpiece [[Item quality|quality]] tags, unmined [[Gem|gem]] cluster*, Rough [[Gem|gem]]s and Raw [[Glass|glass]], unmined [[bituminous coal]]*, mined [[bituminous coal]]*, [[currency]] symbol, spider [[web]]s, [[pond turtle]]*, sun, [[gear assembly|gear assemblies]], paralyzed [[Status icon|indicator]], fireballs, bandit camps on travel map, towns on world map, night creature senses, artifact gem [[door]]s | + | | Masterpiece [[Item quality|quality]] tags, unmined [[Gem|gem]] cluster*, Rough [[Gem|gem]]s and Raw [[Glass|glass]], unmined [[bituminous coal]]*, mined [[bituminous coal]]*, [[currency]] symbol, spider [[web]]s, [[pond turtle]]*, sun, [[gear assembly|gear assemblies]], paralyzed [[Status icon|indicator]], fireballs, bandit camps on travel map, towns on world map, night creature senses, artifact gem [[door]]s<sup>¢</sup> |
|- | |- | ||
|} | |} | ||
Line 164: | Line 169: | ||
|- | |- | ||
|<small>019</small> {{TST|‼}} | |<small>019</small> {{TST|‼}} | ||
− | | [[Cage]]s, on-[[fire]] tags, vertical [[bars]] | + | | [[Cage]]s<sup>¢</sup>, on-[[fire]] tags, vertical [[bars]] |
|- | |- | ||
|<small>020</small> {{TST|¶}} | |<small>020</small> {{TST|¶}} | ||
Line 232: | Line 237: | ||
|- | |- | ||
|style="white-space:nowrap"|<small>040</small> {{TST|(}} | |style="white-space:nowrap"|<small>040</small> {{TST|(}} | ||
− | | Text, foreign object opening tag, tile in [[bowyer's workshop]], | + | | Text, foreign object opening tag, tile in [[bowyer's workshop]], waning moon on travel map |
|- | |- | ||
|<small>041</small> {{TST|)}} | |<small>041</small> {{TST|)}} | ||
− | | Text, foreign object closing tag, | + | | Text, foreign object closing tag, waxing moon on travel map |
|- | |- | ||
|<small>042</small> {{TST|*}} | |<small>042</small> {{TST|*}} | ||
Line 391: | Line 396: | ||
|- | |- | ||
|<small>088</small> {{TST|X}} | |<small>088</small> {{TST|X}} | ||
− | | Text, [[wear]] tags, keyboard cursor, [[Bin]], [[floodgate]], shop post, building footprint, Depot Access Display, up/down stairs, Tile in Ashery, [[Archery target]], [[Status icon|various status indicators]] | + | | Text, [[wear]] tags, keyboard cursor, [[Bin]]<sup>¢</sup>, [[floodgate]]<sup>¢</sup>, shop post, building footprint, Depot Access Display, up/down stairs, Tile in Ashery, [[Archery target]], [[Status icon|various status indicators]] |
|- | |- | ||
|<small>089</small> {{TST|Y}} | |<small>089</small> {{TST|Y}} | ||
Line 409: | Line 414: | ||
|- | |- | ||
|<small>094</small> {{TST|^}} | |<small>094</small> {{TST|^}} | ||
− | | [[Trap]], [[Alabaster]]*, [[Aluminum]]*, [[Volcano]] on world map, north move indicator (adventure mode) | + | | [[Trap]], [[Alabaster]]*, [[Aluminum]]*, [[Volcano]] on world map, north move indicator (adventure mode), Mechanic Workshop center-south tile (in light cyan) |
|- | |- | ||
|<small>095</small> {{TST|_}} | |<small>095</small> {{TST|_}} | ||
Line 568: | Line 573: | ||
|- | |- | ||
|<small>142</small> {{TST|Ä}} | |<small>142</small> {{TST|Ä}} | ||
− | | | + | | Text, [[Angel]]s |
|- | |- | ||
|<small>143</small> {{TST|Å}} | |<small>143</small> {{TST|Å}} | ||
Line 579: | Line 584: | ||
|- | |- | ||
|<small>144</small> {{TST|É}} | |<small>144</small> {{TST|É}} | ||
− | | Text | + | | Text, [[altar]]s |
|- | |- | ||
|<small>145</small> {{TST|æ}} | |<small>145</small> {{TST|æ}} | ||
Line 612: | Line 617: | ||
|- | |- | ||
|<small>155</small> {{TST|¢}} | |<small>155</small> {{TST|¢}} | ||
− | | [[Hatch cover]]s, musical [[instrument]] pieces{{version|0.42.01}} | + | | [[Hatch cover]]s<sup>¢</sup>, musical [[instrument]] pieces{{version|0.42.01}} |
|- | |- | ||
|<small>156</small> {{TST|£}} | |<small>156</small> {{TST|£}} | ||
Line 621: | Line 626: | ||
|- | |- | ||
|<small>158</small> {{TST|₧}} | |<small>158</small> {{TST|₧}} | ||
− | | [[Stepladder]]* | + | | [[Stepladder]]*, largest forest retreat ruins |
|- | |- | ||
|<small>159</small> {{TST|ƒ}} | |<small>159</small> {{TST|ƒ}} | ||
Line 651: | Line 656: | ||
|- | |- | ||
|<small>166</small> {{TST|ª}} | |<small>166</small> {{TST|ª}} | ||
− | | | + | | dark pit ruins |
|- | |- | ||
|<small>167</small> {{TST|º}} | |<small>167</small> {{TST|º}} | ||
Line 686: | Line 691: | ||
|- | |- | ||
|<small>176</small> {{TST|░}} | |<small>176</small> {{TST|░}} | ||
− | | Partially dug rock, various flows ([[miasma]], [[cave-in]] dust, [[steam]], smoke, etc.), [[Fishery]], fog on travel map, [[Semi-molten_rock|Semi-molten Rock]], [[Tilesets#Stones|various stones]]*, [[Tilesets#Soil|various soils]]*, fallen leaves, vermin swarm | + | | Partially dug rock, various flows ([[miasma]], [[cave-in]] dust, [[steam]], smoke, etc.), [[Fishery]], fog on travel map, [[Semi-molten_rock|Semi-molten Rock]], [[Tilesets#Stones|various stones]]*, [[Tilesets#Soil|various soils]]*, Workshop wall tiles (craftdwarf's, bowyer's, mason's, mechanic's, jeweler's, clothier's, [[kitchen]], and leather works), fallen leaves, vermin swarm |
|- | |- | ||
|<small>177</small> {{TST|▒}} | |<small>177</small> {{TST|▒}} | ||
− | | Partially dug rock, various flows ([[miasma]], [[cave-in]] dust, [[steam]], smoke, etc.), side tiles for catapult, [[window]], fog on travel map | + | | Partially dug rock, various flows ([[miasma]], [[cave-in]] dust, [[steam]], smoke, etc.), side tiles for catapult, [[window]], fog on travel map, [[Tilesets#Stones|various stones]]*, [[Tilesets#Soil|various kinds of soil]]*, fallen leaves, vermin swarm |
|- | |- | ||
|<small>178</small> {{TST|▓}} | |<small>178</small> {{TST|▓}} | ||
Line 716: | Line 721: | ||
|- | |- | ||
|<small>186</small> {{TST|║}} | |<small>186</small> {{TST|║}} | ||
− | | Smooth/constructed walls, [[bridge]]s, wooden [[door]]s, center [[catapult]] tile, center [[Ballista]] tile, [[axle]]s, tracks<sup>$</sup>, fortress walls on travel map, trunk<sup>$</sup>, NS [[Water_wheel|water wheel]], [[Windmill|windmill]] blade | + | | Smooth/constructed walls, [[bridge]]s, wooden [[door]]s<sup>¢</sup>, center [[catapult]] tile, center [[Ballista]] tile, [[axle]]s, tracks<sup>$</sup>, fortress walls on travel map, trunk<sup>$</sup>, NS [[Water_wheel|water wheel]], [[Windmill|windmill]] blade |
|- | |- | ||
|<small>187</small> {{TST|╗}} | |<small>187</small> {{TST|╗}} | ||
Line 754: | Line 759: | ||
|- | |- | ||
|<small>197</small> {{TST|┼}} | |<small>197</small> {{TST|┼}} | ||
− | | [[Door]]s, overworld rivers/Roads, floor [[Stone detailing|detailing]]/[[engraving]] in progress, branches<sup>$</sup> | + | | [[Door]]s<sup>¢</sup>, overworld rivers/Roads, floor [[Stone detailing|detailing]]/[[engraving]] in progress, branches<sup>$</sup> |
|- | |- | ||
|<small>198</small> {{TST|╞}} | |<small>198</small> {{TST|╞}} | ||
Line 854: | Line 859: | ||
|- | |- | ||
|<small>227</small> {{TST|π}} | |<small>227</small> {{TST|π}} | ||
− | | [[Cabinet]], [[Display case]]s*, [[goblin|dark fortress]]es | + | | [[Cabinet]], [[Display case]]s<sup>÷</sup>*, [[goblin|dark fortress]]es |
|- | |- | ||
|<small>228</small> {{TST|Σ}} | |<small>228</small> {{TST|Σ}} | ||
Line 898: | Line 903: | ||
|- | |- | ||
|<small>240</small> {{TST|≡}} | |<small>240</small> {{TST|≡}} | ||
− | | [[Bar]]s, exceptional [[Item quality|quality]] tags, [[activity zone]]s, metal [[door]]s, floor [[bars]], track stops, cirrus clouds on travel map, hamlets on world map, [[quire]]*{{version|0.42.01}}, [[bookcase]]*{{version|0.42.01}} | + | | [[Bar]]s, exceptional [[Item quality|quality]] tags, [[activity zone]]s, metal [[door]]s<sup>¢</sup>, floor [[bars]], track stops, cirrus clouds on travel map, hamlets on world map, [[quire]]*{{version|0.42.01}}, [[bookcase]]*<sup>÷</sup>{{version|0.42.01}} |
|- | |- | ||
|<small>241</small> {{TST|±}} | |<small>241</small> {{TST|±}} | ||
Line 916: | Line 921: | ||
|- | |- | ||
|<small>246</small> {{TST|÷}} | |<small>246</small> {{TST|÷}} | ||
− | | [[Barrel]], [[screw pump]], upper left tile of [[still]], center tile of [[ashery]], upper left tile of [[kitchen]], [[scroll rollers]]*{{version|0.42.01}}, [[book binding]]*{{version|0.42.01}} | + | | [[Barrel]]<sup>¢</sup>, [[screw pump]], upper left tile of [[still]], center tile of [[ashery]], upper left tile of [[kitchen]], [[scroll rollers]]*{{version|0.42.01}}, [[book binding]]*{{version|0.42.01}} |
|- | |- | ||
|<small>247</small> {{TST|≈}} | |<small>247</small> {{TST|≈}} | ||
Line 940: | Line 945: | ||
|- | |- | ||
|<small>254</small> {{TST|■}} | |<small>254</small> {{TST|■}} | ||
− | | [[Block]]s, [[minecart]]s*, [[vault]]s on world map, human houses/shops on travel map, progress bars, move indicator frame 3 (adventure mode) | + | | [[Block]]s, [[minecart]]s*<sup>÷</sup>, [[vault]]s on world map, human houses/shops on travel map, progress bars, move indicator frame 3 (adventure mode) |
|- | |- | ||
|<small>255</small> {{TST| }} | |<small>255</small> {{TST| }} | ||
Line 947: | Line 952: | ||
== Detailed use list by type == | == Detailed use list by type == | ||
+ | The tile used by each entity is defined in each entity's vanilla object files. These can be overridden by using a mod. (See [[Modding]]) Changing the vanilla files is not recommended. | ||
+ | |||
=== Creatures === | === Creatures === | ||
==== Main creature tiles ==== | ==== Main creature tiles ==== | ||
− | This is a list of tiles used by [[creature]]s. | + | This is a list of tiles used by [[creature]]s. |
− | |||
<small>001</small> {{TST|☺}} | <small>001</small> {{TST|☺}} | ||
(Civilian) [[dwarves]] | (Civilian) [[dwarves]] | ||
Line 1,120: | Line 1,126: | ||
<small>234</small> {{TST|Ω}} | <small>234</small> {{TST|Ω}} | ||
− | [[ | + | [[Sea nettle jellyfish]] |
+ | |||
==== Vermin ==== | ==== Vermin ==== | ||
These creatures are classified as "vermin" and cannot have their tiles changed. | These creatures are classified as "vermin" and cannot have their tiles changed. | ||
Line 1,131: | Line 1,138: | ||
==== Additional Tiles Used by Creatures ==== | ==== Additional Tiles Used by Creatures ==== | ||
− | Some creature | + | Some creature specify secondary tiles. They are listed here |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 1,164: | Line 1,171: | ||
|can be removed, reassigned, or overridden by graphics | |can be removed, reassigned, or overridden by graphics | ||
|} | |} | ||
+ | |||
+ | <small> This table needs updating to v0.50 object file specifics </small> | ||
=== Plants === | === Plants === | ||
==== Trees on map ==== | ==== Trees on map ==== | ||
− | |||
<small>005</small> {{TST|♣}} | <small>005</small> {{TST|♣}} | ||
Line 1,311: | Line 1,319: | ||
==== Grasses ==== | ==== Grasses ==== | ||
− | + | Most grasses have 4 tiles that are alternatively used. | |
{| | {| | ||
Line 1,363: | Line 1,371: | ||
=== Unmined inorganic material === | === Unmined inorganic material === | ||
− | |||
==== Stones ==== | ==== Stones ==== | ||
{| | {| | ||
|- | |- | ||
|<small>015</small> {{TST|☼}} | |<small>015</small> {{TST|☼}} | ||
− | | [[ | + | | [[Bituminous coal]] |
|- | |- | ||
|<small>034</small> {{TST|"}} | |<small>034</small> {{TST|"}} | ||
Line 1,454: | Line 1,461: | ||
|- | |- | ||
|<small>156</small> {{TST|£}} | |<small>156</small> {{TST|£}} | ||
− | | [[Adamantine]], [[Cassiterite]], [[Galena]], [[Hematite]], [[Horn silver]], [[Limonite]], [[Malachite]], [[Native copper]], [[Native gold]], [[Native platinum]], [[Native silver]], [[Sphalerite]], [[Tetrahedrite]] | + | | [[Adamantine]], [[Cassiterite]], [[Galena]], [[Garnierite]], [[Hematite]], [[Horn silver]], [[Limonite]], [[Malachite]], [[Native copper]], [[Native gold]], [[Native platinum]], [[Native silver]], [[Sphalerite]], [[Tetrahedrite]] |
|- | |- | ||
|} | |} | ||
Line 1,476: | Line 1,483: | ||
=== Characters used in text and interface === | === Characters used in text and interface === | ||
− | Changes to these may make text look strange or be difficult to understand | + | Changes to these may make text look strange or be difficult to understand. |
* " ! _ + , - . 0 1 2 3 4 5 6 7 8 9 / | * " ! _ + , - . 0 1 2 3 4 5 6 7 8 9 / | ||
Line 1,499: | Line 1,506: | ||
=== No known use === | === No known use === | ||
− | These are ideal for using to change tiles in | + | These are ideal for using to change tiles in a mod. |
↕ ∟ ↔ ½ 255 | ↕ ∟ ↔ ½ 255 |
Latest revision as of 04:48, 3 March 2024
v50.13 · v0.47.05 This article is about the current version of DF.Note that some content may still need to be updated. |
- (For an overview of graphics in DF, see Graphics)
- (For a chart with the default ASCII characters, see Character table.)
- (For user-created creature tilesets, see Tileset repository.)
- (For information about Graphic sets, see Graphic set)
- (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.
Overview[edit]
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 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).
As the tileset is limited to only 256 tiles, some objects share the same tile. Below is a detailed list.
In previous versions of Dwarf Fortress (v0.47 and below), some of the tiles could be changed in the raws and init files, and creatures could have separate graphics (see DF2014:Graphic set, this functionality has been removed in v0.50 (and above) with separate graphics being controlled by mods with "Use Classic ASCII Glyphs" set to "No".
Installation and creation of custom tilesets[edit]
Installation[edit]
Tileset repository is a list of user-made standard tilesets, and provides installation instructions.
Creating a custom tileset[edit]
Scaling occurs automatically based on the size of the tiles and the window. The desired grid, interface scaling and percentage settings only work when using 8x12 tiles.
When creating a custom tileset, it's often easiest to start with an existing one, and edit it to your liking. Tilesets generally fall into two categories: rectangular tilesets and square tilesets. Rectangular tilesets have tiles that are taller than they are wide. The text in these tilesets is generally easier to read, but the map appears squished horizontally. Square tilesets usually provide more attractive graphics, but are slightly less readable.
The graphics in Dwarf Fortress can be enhanced by setting "Use Classic ASCII Glyphs" to "No" and installing a Graphics set mod. (A default is provided in the premium version, but has been removed in the classic "free" version.)
Mifki created a tool to make a tileset from any font, which can be used as starting point or as is.[1]
Many tiles are used by the game in multiple ways, and this makes customizing the graphics difficult. The same icon is used for chairs and the north end of one-tile-wide vertical bridges. Ashes and broken arrows look the same, and many game entities (such as levers, floodgates, bags, and bins) share characters that are also used in Dwarven names or other bits of text in the interface.
Some of these issues could be fixed by the third-party Text Will Be Text (TWBT) plugin for the DF2014:DFHack modding API. This has not been updated for compatibility with v0.50.
Generating a custom tileset from a font in Linux[edit]
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.
xterm -fa "FONTFAMILY:pixelsize:SIZE:antialias=false" -bg magenta -geometry 16x16 -e "setterm -cursor off && printf '%s' \"\$(<PATH/TO/CODE437.txt)\" && sleep 0.1 && xwd -id \$WINDOWID | xwdtopnm | pnmtopng > \"FONTFAMILY-SIZE.png\""
This will generate an image in your current directory, so it might be a good idea to cd into your /data/art directory beforehand.
This works much better for bitmap fonts, in their native size. For a list of such fonts on your system and their sizes, you can run
fc-list :scalable=false:spacing=mono family pixelsize
How colors other than white and magenta work[edit]
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.
Alpha values are supported in png fonts (since v0.43.04), allowing for better transparency, and partial transparency, enabling anti-aliased tilesets and other interesting tricks.
In general, just remember these rules:
- Bright magenta (#FF00FF) is the background.
- Bright white (#FFFFFF) is the foreground.
- Darker shades of white and grey (#C0C0C0, #808080, etc) will display darker shades of the foreground color. It is possible to use any shade of grey, including ones like #333333 and #C2C2C2.
- Black (#000000) will always be black.
- It's probably best to avoid color in normal tilesets.
For an example, the game is drawing an exposed turquoise cluster with color bright blue (#0000FF). While loading the tile image, it encounters the color light grey (#CCCCCC). The color used in its place will be:
Color component | Foreground color | Color mask from tile | Calculation in hex | Calculation in decimal |
---|---|---|---|---|
Red | #0000FF | #CCCCCC | 0016 * CC16 / 10016 = 0016 | 0 * 204 / 256 = 0 |
Green | #0000FF | #CCCCCC | 0016 * CC16 / 10016 = 0016 | 0 * 204 / 256 = 0 |
Blue | #0000FF | #CCCCCC | FF16 * CC16 / 10016 = CB16 | 255 * 204 / 256 = 203 |
Final Color | #0000CB | 0 0 203 |
Color masks with unequal amounts of R, G and B are calculated in the same fashion. The game is now drawing a speardwarf with color brown (#C0C000). It encounters the color cyan while loading the tile (#008080). The color used instead of cyan will be:
Color component | Foreground color | Color mask from tile | Calculation in hex | Calculation in decimal |
---|---|---|---|---|
Red | #C0C000 | #008080 | C016 * 0016 / 10016 = 0016 | 192 * 0 / 256 = 0 |
Green | #C0C000 | #008080 | C016 * 8016 / 10016 = 6016 | 192 * 128 / 256 = 96 |
Blue | #C0C000 | #008080 | 0016 * 8016 / 10016 = 0016 | 0 * 128 / 256 = 0 |
Final Color | #006000 | 0 96 0 |
As illustrated by this example, colors in the tileset can result in colors that aren't in the foreground color or the tile graphic. In this case, a brown foreground color with a cyan pixel color in the tileset results in a final color of green.
Theoretically, the way the game handles color masks could be used to display different graphics for items that use the same tile (but whose respective colors use different color component channels). For example, if a bright red object and a bright blue object use the same tile, the tile can use bright red for all pixels that only the red object uses, bright blue for all pixels only the blue object uses, and bright magenta (but NOT #FF00FF, it would have to be #FE00FE or something similar) for all pixels both objects use. In this fashion the two objects that share a tile would look completely different. In practice however, this is probably impossible because so many objects share the same tile, the chances of the potential foreground colors sharing a red, green, or blue color component are too great.
What tiles are used for what[edit]
- Items marked with * can have their tile changed in the raw data files. [This list need validating for v0.50]
- Items marked with # can have their tile replaced by a graphic set image, in addition to having their tile changed in the raw data.
- Items marked with $ can be changed in the d_init.txt file.
- Items marked with ¢ use dual colors.
- Items marked with ÷ use inverted tile
For a graphical table, go to the Character Table.
Row 01 (000-015)[edit]
000
|
Used for background tiles in the intro CMV and background tiles of interface screens |
001 ☺
|
Civilian dwarves#, various status indicators |
002 ☻
|
Military dwarves# |
003 ♥
|
Dimple cups* |
004 ♦
|
Cut gems, large gems |
005 ♣
|
Quarry bush leaves*, blossoms*, various forest trees* |
006 ♠
|
Broadleaf forest, various forest trees*, various leaf items*, Plump helmets* |
007 •
|
Mined-out stone*, solid workshop tile for several workshops like the magma smelter, filled nest box building, river sources on world map, caves on world map, lairs on world map, moon on travel map, flower buds* |
008 ◘
|
Solid workshop tile for several other workshops like the magma forge, tanner's shop, catapult cup, nest box tool*, empty nest box building, codices, dice |
009 ○
|
Well, vermin colony, millstone, quern, vertical axle, fortress walls on travel map, sun behind clouds on travel map, castles on world map, monasteries on world map, creeping eye out of view (adventure mode)*, staring eyeball*, bubble bulb* |
010 ◙
|
trunk interior$, forts on world map |
011 ♂
|
Male sign, bags, various cephalopods# |
012 ♀
|
Female sign, amulet |
013 ♪
|
Ladles*, dancers dancing |
014 ♫
|
Armor stands, playing instruments |
015 ☼
|
Masterpiece quality tags, unmined gem cluster*, Rough gems and Raw glass, unmined bituminous coal*, mined bituminous coal*, currency symbol, spider webs, pond turtle*, sun, gear assemblies, paralyzed indicator, fireballs, bandit camps on travel map, towns on world map, night creature senses, artifact gem doors¢ |
Row 02 (016-031)[edit]
016 ►
|
Head of Ballista arrow facing east, manta ray# |
017 ◄
|
Head of Ballista arrow facing west |
018 ↕
|
|
019 ‼
|
Cages¢, on-fire tags, vertical bars |
020 ¶
|
Mugs, drinking in-progress, largest forest retreats, cumulonimbus clouds on travel map, Highwood forests* |
021 §
|
Restraints, whip vine* |
022 ▬
|
Logs, hive tool*, hive building |
023 ↨
|
Cedar forest* |
024 ↑
|
Interface text (bridge direction), conifer forests, various forest trees* |
025 ↓
|
Interface text (bridge direction), Various status indicators |
026 →
|
Interface text (bridge direction) |
027 ←
|
Interface text (bridge direction) |
028 ∟
|
|
029 ↔
|
|
030 ▲
|
Head of Ballista arrow facing north, ramp, track ramp up$, mountain on world map |
031 ▼
|
Head of Ballista arrow facing south, ramp on level below, trackramp on level below$ |
Row 03 (032-047)[edit]
032
|
Spaces in text messages, Unexplored underground, black background on the title screen and interface menu |
033 !
|
Text, various status icons, sound indicator in sneaking mode, tracks (footprints) in sneaking mode |
034 "
|
Text, shrub*, various status icons, quotation marks, Carpenter's workshop tile, kobold out of view*, goblin out of view*, blizzard man out of view*, tracks (bent vegetation) in sneaking mode, various stones*, savanna, swamp, shrubland, marsh |
035 #
|
Text, floor grates, various stones*, smoothed branches in elven forest retreats, labyrinths on travel map, towns on world map |
036 $
|
Coins |
037 %
|
Prepared meal, unexplored underground, screw pump in action, footprints in sneaking mode, various fruits*, various buds*, various stones*, Bismuthinite*, Floating guts# |
038 &
|
Demons# |
039 '
|
Text, rough floors, unexplored underground, various stones, one eyed creatures with GLOWTILE " (kobold, goblins, and blizzard in vanilla), various grasses* |
040 (
|
Text, foreign object opening tag, tile in bowyer's workshop, waning moon on travel map |
041 )
|
Text, foreign object closing tag, waxing moon on travel map |
042 *
|
Interface text, superior quality tags, Unmined ore*, glowing pits, key reference, working gear assembly, gem floodgate, various stones*, chestnut fruit*, other fruits and flowers*, moving armies on quick travel map, towns on world map |
043 +
|
Text, finely-crafted quality tags, Smooth/constructed floors, block/bar bridge or road, Bauxite*, injury indicator, towns on world map, mining designation |
044 ,
|
Text, rough floors, Claystone*, unexplored underground, various grasses* |
045 -
|
Text, well-crafted quality tags, Scepters, keyboard reference, various stones*, overlapping creatures animation |
046 .
|
Text, rough floors, various stones*, unexplored underground, various grasses* |
047 /
|
Text, weapons, bolts, Ballista tile, Pestle, overlapping creatures animation, stone axev0.43.01, active windmill blade |
Row 04 (048-063)[edit]
048 0
|
Text, coffins, tombs on world map |
049 1
|
Text, designation priorities, adventurer mode conversation targets, fluids if SHOW_FLOW_AMOUNTS is YES in d_init.txt |
050 2
|
Text, designation priorities, adventurer mode conversation targets, fluids if SHOW_FLOW_AMOUNTS is YES in d_init.txt |
051 3
|
Text, designation priorities, adventurer mode conversation targets, fluids if SHOW_FLOW_AMOUNTS is YES in d_init.txt |
052 4
|
Text, designation priorities, adventurer mode conversation targets, fluids if SHOW_FLOW_AMOUNTS is YES in d_init.txt |
053 5
|
Text, designation priorities, adventurer mode conversation targets, fluids if SHOW_FLOW_AMOUNTS is YES in d_init.txt |
054 6
|
Text, designation priorities, adventurer mode conversation targets, fluids if SHOW_FLOW_AMOUNTS is YES in d_init.txt |
055 7
|
Text, designation priorities, adventurer mode conversation targets, fluids if SHOW_FLOW_AMOUNTS is YES in d_init.txt |
056 8
|
Text, Fortress gates on travel map |
057 9
|
Text |
058 :
|
Interface text, strawberry*, prickle berry*, fisher berry*, sun berry*, snowstorms, underground shrubs* |
059 ;
|
Interface text (command menu Movies key), Mason's workshop, Kitchen, Selenite*, twigs$ |
060 <
|
Interface text (trading screen "Less than 1 unit weight"), brackets around squad names, Stairs up, west move indicator (adventure mode) |
061 =
|
Empty Stockpiles, hamlets on world map, various stones*, middle-left tile of Furnaces, up-right tile of Carpenter's workshop |
062 >
|
Brackets around squad names, Stairs down, east move indicator (adventure mode) |
063 ?
|
Text, various status icons |
Row 05 (064-079)[edit]
064 @
|
berserk dwarf#, adventurer#, dwarven merchants#, dwarven caravan guards#, dwarven diplomat#, adventurer's location on map |
065 A
|
Text, various creatures#, Tile in Farm Workshop |
066 B
|
Text, various creatures# |
067 C
|
Text, various creatures#, construction designations |
068 D
|
Text, various creatures#, Depot Access Display |
069 E
|
Text, various creatures# |
070 F
|
Text, various creatures# |
071 G
|
Text, various creatures# |
072 H
|
Text, various creatures#, high traffic designation |
073 I
|
Text, various creatures#, support, Necromancer's tower on world map |
074 J
|
Text, various creatures# |
075 K
|
Text, various creatures# |
076 L
|
Text, various creatures#, low traffic designation |
077 M
|
Text, various creatures# |
078 N
|
Text, various creatures# |
079 O
|
Text, various creatures#, trade depot post, glass portal, Tile in Farm Workshop, column$, wall construction, full moon on travel map and dwarf mode, trunk$, staring eyeball*, bubble bulb*, windmill hub |
Row 06 (080-095)[edit]
080 P
|
Text, various creatures# |
081 Q
|
Text |
082 R
|
Text, various creatures#, restricted traffic designation |
083 S
|
Text, various creatures# |
084 T
|
Text, various creatures# |
085 U
|
Text, various creatures# |
086 V
|
Text, Badlands on map |
087 W
|
Text, various creatures#, Depot Access Display |
088 X
|
Text, wear tags, keyboard cursor, Bin¢, floodgate¢, shop post, building footprint, Depot Access Display, up/down stairs, Tile in Ashery, Archery target, various status indicators |
089 Y
|
Text, Yak#, Yeti# |
090 Z
|
Text, Sleep indicator |
091 [
|
Text, Floor tile in workshops, Clothing, armor, item stack opening tag, moon on travel map, tracks (bootprints) in sneaking mode |
092 \
|
Overlapping creatures animation, Ballista tile, helves*v0.43.01, active windmill blade |
093 ]
|
Text, Floor tile in workshops and furnaces, item stack closing tag |
094 ^
|
Trap, Alabaster*, Aluminum*, Volcano on world map, north move indicator (adventure mode), Mechanic Workshop center-south tile (in light cyan) |
095 _
|
Text, Channel designation |
Row 07 (096-111)[edit]
096 `
|
Rough floors, unexplored underground*, various stones*, various grasses* |
097 a
|
Text, various creatures# |
098 b
|
Text, various creatures# |
099 c
|
Text, various creatures# |
100 d
|
Text, various creatures# |
101 e
|
Text, various creatures# |
102 f
|
Text, various creatures# |
103 g
|
Text, various creatures# |
104 h
|
Text, various creatures# |
105 i
|
Text, various creatures# |
106 j
|
Text, various creatures# |
107 k
|
Text, various creatures# |
108 l
|
Text, various creatures# |
109 m
|
Text, various creatures# |
110 n
|
Text, various creatures#, Hills on map |
111 o
|
Text, various creatures#, Graphite*, well construction, bridge construction, millstone in action, vertical axle in action, floor tile in magma furnaces, staring eyeball*, bubble bulb*, winter melon*, watermelon* |
Row 08 (112-127)[edit]
112 p
|
Text, various creatures# |
113 q
|
Text |
114 r
|
Text, various creatures# |
115 s
|
Text, various creatures# |
116 t
|
Text, various creatures# |
117 u
|
Text |
118 v
|
Text, various creatures#, various stones*, south move indicator (adventure mode) |
119 w
|
Text, various creatures# |
120 x
|
Text, wear tags, Saltpeter* |
121 y
|
Text |
122 z
|
Text |
123 {
|
Forbidden opening tag, tile in Jeweler's workshop, vermin, purring maggot# |
124 |
|
Talc*, pipe sections, overlapping creatures animation |
125 }
|
Forbidden closing tag, vermin, purring maggot alternate* |
126 ~
|
Unfinished rough stone road, flowing water, dirt road, farm plot under construction, sand, furrowed soil, blood smear, guts, Various creatures#, Magnetite* |
127 ⌂
|
Animal trap, low mountains on world map, part of mechanic's workshop, trunk$ |
Row 09 (128-143)[edit]
128 Ç
|
Text, Mechanisms |
129 ü
|
Text |
130 é
|
Text |
131 â
|
Text |
132 ä
|
Text, Angels |
133 à
|
Text |
134 å
|
Text |
135 ç
|
Text, Totems |
136 ê
|
Text |
137 ë
|
Text, military elves |
138 è
|
Text |
139 ï
|
Text, Pedestal* |
140 î
|
Text, Elven forest retreat |
141 ì
|
Text |
142 Ä
|
Text, Angels |
143 Å
|
Text, Figurines, shrines on travel map |
Row 10 (144-159)[edit]
144 É
|
Text, altars | |
145 æ
|
Toys, hamlets on world map | |
146 Æ
|
Coffers, quivers, backpacks, hamlets on world map | |
147 ô
|
Text, Cauldrons* | |
148 ö
|
Text, Rings | |
149 ò
|
Text, Unactivated levers, Various creatures# | |
150 û
|
Text, Buckets | |
151 ù
|
Text | |
152 ÿ
|
Text, Valley herb* | |
153 Ö
|
Bracelets, wheelbarrows* | |
154 Ü
|
Military Humans | |
155 ¢
|
Hatch covers¢, musical instrument piecesv0.42.01 | |
156 £
|
Various stones*, most unmined ores*, | |
157 ¥
|
Cave lobster* | |
158 ₧
|
Stepladder*, largest forest retreat ruins | |
159 ƒ
|
Rope reed*, splints, arrow bamboo*, golden bamboo*, hedge bamboo* |
Row 11 (160-175)[edit]
160 á
|
Text |
161 í
|
Text |
162 ó
|
Text, Activated levers |
163 ú
|
Text |
164 ñ
|
Text, Bogeyman |
165 Ñ
|
Night creatures |
166 ª
|
dark pit ruins |
167 º
|
Cloth, dark pit |
168 ¿
|
Musical Instruments |
169 ⌐
|
Withered plants*, wormy tendril* |
170 ¬
|
wormy tendril* |
171 ½
|
|
172 ¼
|
Roc nests, roots$, branches$ |
173 ¡
|
Flask, waterskin, Pouch |
174 «
|
Tail of Ballista arrow facing west, item with decoration tags |
175 »
|
Tail of Ballista arrow facing east, item with decoration tags |
Row 12 (176-191)[edit]
176 ░
|
Partially dug rock, various flows (miasma, cave-in dust, steam, smoke, etc.), Fishery, fog on travel map, Semi-molten Rock, various stones*, various soils*, Workshop wall tiles (craftdwarf's, bowyer's, mason's, mechanic's, jeweler's, clothier's, kitchen, and leather works), fallen leaves, vermin swarm |
177
|