- 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 "40d:Tilesets"
(3 intermediate revisions by 3 users not shown) | |||
Line 17: | Line 17: | ||
A character set is an image in BMP format that contains the 256 different tiles, corresponding to the [[Main:Character table|IBM Code Page 437]] (sometimes called Extended ASCII), which are used to display the main graphics. [[Main:Tileset repository|Here is a list]] of user-made standard tilesets. To install any of these tilesets, follow these steps: | A character set is an image in BMP format that contains the 256 different tiles, corresponding to the [[Main:Character table|IBM Code Page 437]] (sometimes called Extended ASCII), which are used to display the main graphics. [[Main:Tileset repository|Here is a list]] of user-made standard tilesets. To install any of these tilesets, follow these steps: | ||
− | # Download the tileset via right-click-save-as on | + | # Download the tileset via right-click-save-as on the tileset. The tileset is just an image, so there's no separate download link. (The list is [[Graphics set repository|here]]) |
# Convert it into a 24-bit BMP file. Do NOT just change the extension to .bmp; you must use a program like MS paint to save it as a .bmp. | # Convert it into a 24-bit BMP file. Do NOT just change the extension to .bmp; you must use a program like MS paint to save it as a .bmp. | ||
# Put it in the data/art directory of your Dwarf Fortress installation. | # Put it in the data/art directory of your Dwarf Fortress installation. | ||
Line 46: | Line 46: | ||
* If you are on a Mac you will have to use a program like [http://www.lemkesoft.com/xd/public/download/index._aWQ9Z2MtdWI_.html GraphicConverter] or Photoshop to save tilesets as windows bitmaps. | * If you are on a Mac you will have to use a program like [http://www.lemkesoft.com/xd/public/download/index._aWQ9Z2MtdWI_.html GraphicConverter] or Photoshop to save tilesets as windows bitmaps. | ||
* Recommended only for window mode prior to version 39f, to make it easier to preserve tile aspect ratio. 39f onwards, you should choose a grid size that is of the same aspect ratio as your monitor (e.g. on a 1600x1280 monitor, choose grid size 80:64) | * Recommended only for window mode prior to version 39f, to make it easier to preserve tile aspect ratio. 39f onwards, you should choose a grid size that is of the same aspect ratio as your monitor (e.g. on a 1600x1280 monitor, choose grid size 80:64) | ||
− | * Take note however that you need to set | + | * Take note however that you need to set the window size correctly. |
** For versions prior to 39f, your window width in pixel size should be 3.2 (which is 80/25) times your window height in pixel size. | ** For versions prior to 39f, your window width in pixel size should be 3.2 (which is 80/25) times your window height in pixel size. | ||
*: Example: | *: Example: | ||
Line 53: | Line 53: | ||
** For version 39f onwards where you can change the grid size, you need to compute the aspect ratio from the (grid width)/(grid height). | ** For version 39f onwards where you can change the grid size, you need to compute the aspect ratio from the (grid width)/(grid height). | ||
*: Example: | *: Example: | ||
− | *:: if you | + | *:: if you are using a grid size of 80 by 64, the aspect ratio should be 1.25 (from 80/64). If you set your window width to 1600, then the height will be 1600/1.25 = 1280. |
− | * Also note that stretching a gfx tile may cause graphical artifacts (not the crafted ones in-game!) i.e. slight defects in the visuals, but it should make you able to see smaller tiles on a larger screen area. The exception is when you use | + | * Also note that stretching a gfx tile may cause graphical artifacts (not the crafted ones in-game!) i.e. slight defects in the visuals, but it should make you able to see smaller tiles on a larger screen area. The exception is when you use an integral multiple, e.g. stretching 16x16 tiles to 32x32, which seems to produce the least artifacts. |
* It is not recommended that you shrink tiles though the method is the similar (except defining a smaller window size than is normally required by the grid and tile size). | * It is not recommended that you shrink tiles though the method is the similar (except defining a smaller window size than is normally required by the grid and tile size). | ||
Line 80: | Line 80: | ||
* Bright magenta (#FF00FF) is the background. | * Bright magenta (#FF00FF) is the background. | ||
* Bright white (#FFFFFF) is the foreground. | * 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. | + | * 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. | * Black (#000000) will always be black. | ||
* It's probably best to avoid color in normal tilesets. | * It's probably best to avoid color in normal tilesets. | ||
Line 994: | Line 994: | ||
Accented characters are used for names. | Accented characters are used for names. | ||
− | + | Dwarven: íèîïéóúûôöùòêìëàáåäâabcdefghiklmnorstuvz | |
− | + | Elven: íèéóúÿùòìçabcdefghiklmnopqrstuvwyz | |
Human: ñáabcdefghijklmnopqrstuvwxyz | Human: ñáabcdefghijklmnopqrstuvwxyz |
Latest revision as of 12:34, 15 July 2024
This article is about an older version of DF. |
- (For a chart with the default ASCII characters, see Character table.)
- (For user-created tilesets, see Tileset repository.)
- (For user-created creature graphics sets, see Graphics set repository.)
Tilesets are images the game uses to display its graphics; 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".
Overview and installation[edit]
Character sets[edit]
A character set is an image in BMP format that contains the 256 different tiles, corresponding to the IBM Code Page 437 (sometimes called Extended ASCII), which are used to display the main graphics. Here is a list of user-made standard tilesets. To install any of these tilesets, follow these steps:
- Download the tileset via right-click-save-as on the tileset. The tileset is just an image, so there's no separate download link. (The list is here)
- Convert it into a 24-bit BMP file. Do NOT just change the extension to .bmp; you must use a program like MS paint to save it as a .bmp.
- Put it in the data/art directory of your Dwarf Fortress installation.
- Open data/init/init.txt
- If you want to use the tileset in fullscreen mode, locate and modify the [FULLSCREENX:800], [FULLSCREENY:600], and [FULLFONT:curses_800x600.bmp] configuration lines to match the specifications from the tileset list. The FULLFONT directive should match the filename of the tileset you downloaded. If you want to use the tileset in windowed mode, search for the [WINDOWEDX:640], [WINDOWEDY:300], and [FONT:curses_640x300.bmp] lines instead, and change them to the correct values.
- It is also recommended you change [BLACK_SPACE:NO] to [BLACK_SPACE:YES] to prevent stretching of the graphics.
- Save the file, then you're ready to play!
Graphics sets[edit]
Character sets only change certain graphics, while others are left out. The confusingly-named graphics sets are used to change the appearance of creatures in the game, such as dwarves and unicorns. These are usually designed to work together with certain character sets. The Dystopian Rhetoric graphics set comes with its own DF installer; to install any others (or to install that one manually), you follow a similar process to the above:
- Download the graphics set. (The list is here.)
- Convert it into a 24-bit BMP file using your favorite image editing program.
- Put it in the raw/graphics/example directory of your Dwarf Fortress installation, so it overwrites the existing file.
- Open /raw/graphics/example_text.txt
- Replace the contents with the appropriate text for the graphics set you downloaded. Save the file.
- Open data/init/init.txt
- Locate the [GRAPHICS:NO] line and change it to [GRAPHICS:YES].
- Change the resolution and font directories as above, this time for the lines starting with GRAPHICS instead. So, if you want to use fullscreen mode, modify [GRAPHICS_FULLSCREENX:800], [GRAPHICS_FULLSCREENY:600], and [GRAPHICS_FULLFONT:curses_800x600.bmp] to suit the standard tileset you want to use. For windowed mode, the lines to change are [GRAPHICS_WINDOWEDX:640], [GRAPHICS_WINDOWEDY:300], and [GRAPHICS_FONT:curses_640x300.bmp].
- Be sure to change [GRAPHICS_BLACK_SPACE] to the same setting as [BLACK_SPACE].
- Save the file, then you're ready to get mangled by a great-looking elephant!
How to stretch the tile sets for bigger display[edit]
Simply change [GRAPHICS_BLACK_SPACE:?] and [BLACK_SPACE:?] to NO in the init/init.txt, depending on whether you are using the graphics mode or not. This will stretch the window to the size you specified in [WINDOWEDX:?] and [WINDOWEDY:?] or FULLSCREENX:?] and [FULLSCREENY:?] or [GRAPHICS_WINDOWEDX:?] and [GRAPHICS_WINDOWEDY:?] or [GRAPHICS_FULLSCREENX:?] and [GRAPHICS_FULLSCREENY:?] depending on which mode you run DF in. (NORMAL|GRAPHICS + WINDOWED|FULLSCREEN)
IMPORTANT NOTES:
- If you are on a Mac you will have to use a program like GraphicConverter or Photoshop to save tilesets as windows bitmaps.
- Recommended only for window mode prior to version 39f, to make it easier to preserve tile aspect ratio. 39f onwards, you should choose a grid size that is of the same aspect ratio as your monitor (e.g. on a 1600x1280 monitor, choose grid size 80:64)
- Take note however that you need to set the window size correctly.
- For versions prior to 39f, your window width in pixel size should be 3.2 (which is 80/25) times your window height in pixel size.
- Example:
- if you choose window width to be 1600, i.e. [GRAPHICS_WINDOWEDX:1600] in init/init.txt file, then your height should be 1600/3.2 which gives 500, i.e. [GRAPHICS_WINDOWEDY:500] in init/init.txt. This will automatically stretch your character tiles and gfx tiles accordingly.
- For version 39f onwards where you can change the grid size, you need to compute the aspect ratio from the (grid width)/(grid height).
- Example:
- if you are using a grid size of 80 by 64, the aspect ratio should be 1.25 (from 80/64). If you set your window width to 1600, then the height will be 1600/1.25 = 1280.
- Also note that stretching a gfx tile may cause graphical artifacts (not the crafted ones in-game!) i.e. slight defects in the visuals, but it should make you able to see smaller tiles on a larger screen area. The exception is when you use an integral multiple, e.g. stretching 16x16 tiles to 32x32, which seems to produce the least artifacts.
- It is not recommended that you shrink tiles though the method is the similar (except defining a smaller window size than is normally required by the grid and tile size).
How to increase number of tiles shown keeping the tile size the same[edit]
See Custom grid.
Custom tileset design[edit]
The default (and minimum) gameplay viewport is 80 characters wide, and 25 characters tall. Therefore, a tileset's target resolution will be TILE_X_LENGTH * 80 by TILE_Y_LENGTH * 25. Since the tileset is arranged into a 16x16 grid of tiles (256 tiles total), the tileset image size will be TILE_X_LENGTH * 16 by TILE_Y_LENGTH * 16. Here are some common tile sizes:
- A tileset with 10x12 tiles will be 160x192 pixels large, and the target resolution will be 800x300.
- A tileset with 16x16 tiles will be 256x256 pixels large, and the target resolution will be 1280x400.
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 three categories: rectangular tilesets, square tilesets, and 16x16 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 16x16 square tilesets are just a sub-set, which are grouped together because most Object Tilesets use 16x16 tiles. The graphics in Dwarf Fortress can be somewhat diversified and enhanced through the use of graphics sets.
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.
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.
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.
- Items marked with # can have their tile replaced by a graphics set image, in addition to having their tile changed in the raw data.
- Items marked with $ can be changed in the init.txt file.
For a graphical table, go to the Character Table.
Row 01 (000-015)[edit]
00
|
Used for background tiles in the intro CMV, rarely used elsewhere |
01 ☺
|
Civilian dwarves# used for dead dwarves |
02 ☻
|
Military dwarves# used for dead dwarves |
03 ♥
|
Dimple cups* |
04 ♦
|
Cut gems, large gems |
05 ♣
|
Tower-caps*, Acacia, Mangrove, Maple, Alder and Birch trees* quarry bushes* |
06 ♠
|
Plump helmets*, Oak, Mahogany, Chestnut and Ash trees*, quarry bush leaves* |
07 •
|
Stone, solid workshop tile for several workshops like the magma smelter, lakes in main map, caves in the main map |
08 ◘
|
Solid workshop tile for several other workshops like the magma forge, tanner workshop, catapult cup |
09 ○
|
Well, bracelet, ant colony, millstone, quern, bottomless pits in the local embark map screen (if enabled) |
10 ◙
|
|
11 ♂
|
Male sign, bags |
12 ♀
|
Female sign, amulet |
13 ♪
|
|
14 ♫
|
Armor stands |
15 ☼
|
Gems*, bituminous coal*, currency symbol, masterpiece quality symbol, spider webs, turtle*, 'sun' symbol in engravings, gear assemblies, fireballs |
Row 02 (016-031)[edit]
16 ►
|
Head of Ballista arrow facing east, manta ray* |
17 ◄
|
Head of Ballista arrow facing west |
18 ↕
|
|
19 ‼
|
Cages, on-fire symbol, vertical bars |
20 ¶
|
Mugs, largest elven cities, Highwood trees* |
21 §
|
Restraints, whip vine* |
22 ▬
|
Logs |
23 ↨
|
Some tree types |
24 ↑
|
Interface text (bridge direction), Pine and Larch trees |
25 ↓
|
Hungry/thirsty/drowsy/unhappy indicator, Interface text (bridge direction) |
26 →
|
Interface text (bridge direction) |
27 ←
|
Interface text (bridge direction) |
28 ∟
|
|
29 ↔
|
|
30 ▲
|
Head of Ballista arrow facing north, ramp up |
31 ▼
|
Head of Ballista arrow facing south, ramp down |
Row 03 (032-047)[edit]
32
|
Spaces in text messages, used for background on the title screen/menu |
33 !
|
Various status icons, text |
34 "
|
Shrub*, quotation marks, workshop tiles, kobold's glowing eyes* |
35 #
|
Chasm (bottom in fortress mode), pits, floor grates |
36 $
|
Coins |
37 %
|
Prepared meal, unexplored underground, screw pump in action
|
38 &
|
Demons# |
39 '
|
Rough floors, unexplored underground, Claystone*, Rhyolite*, Periclase* |
40 (
|
Foreign object opening tag, tile in bowyer's workshop, text |
41 )
|
Foreign object closing tag, text |
42 *
|
Ore*, superior quality tags, key reference, working gear assembly, gem floodgate |
43 +
|
Smooth/constructed floors, injured status, finely-crafted quality tags, text, block/bar bridge or road |
44 ,
|
Rough floors, Claystone*, unexplored underground, text |
45 -
|
Scepters, arrows in flight, well-crafted quality tags, keyboard reference, Part of animation when two creatures or dwarves are on the same spot |
46 .
|
Rough floors, Felsite*, text, unexplored underground |
47 /
|
Weapons, bolts, Ballista tile, text |
Row 04 (048-063)[edit]
48 0
|
Coffins, text |
49 1
|
Text, fluids if SHOW_FLOW_AMOUNTS is YES in init.txt |
50 2
|
Text, fluids if SHOW_FLOW_AMOUNTS is YES in init.txt |
51 3
|
Text, fluids if SHOW_FLOW_AMOUNTS is YES in init.txt |
52 4
|
Text, fluids if SHOW_FLOW_AMOUNTS is YES in init.txt |
53 5
|
Text, fluids if SHOW_FLOW_AMOUNTS is YES in init.txt |
54 6
|
Text, fluids if SHOW_FLOW_AMOUNTS is YES in init.txt |
55 7
|
Text, fluids if SHOW_FLOW_AMOUNTS is YES in init.txt |
56 8
|
Text |
57 9
|
Text |
58 :
|
wild strawberry*, prickle berry*, fisher berry*, sun berry*, snowstorms |
59 ;
|
Mason's workshop |
60 <
|
Stairs up |
61 =
|
Stockpiles |
62 >
|
Stairs down |
63 ?
|
"Task assigned" indicator, looking for path |
Row 05 (064-079)[edit]
64 @
|
Sheriff#, berserk dwarf#, adventurer#, fortress guard#, royal guard#, dwarven merchants#, caravan guards#, adventurer's location on world map |
65 A
|
Alligator#, text |
66 B
|
Bears#, text |
67 C
|
Cow#, camels#, text |
68 D
|
Dragon#, text |
69 E
|
Elf#, elephant#, text |
70 F
|
Text |
71 G
|
Text |
72 H
|
Horse#, text |
73 I
|
Support, text |
74 J
|
Text |
75 K
|
Text |
76 L
|
Leopard#, text |
77 M
|
Magma man#, mule#, muskox#, text |
78 N
|
Text |
79 O
|
Trade depot post, glass portal, detailed/constructed wall by itself, text, wall ends |
Row 06 (080-095)[edit]
80 P
|
Text |
81 Q
|
Text |
82 R
|
Text |
83 S
|
Sasquatch#, giant desert scorpion#, giant cave spider#, text |
84 T
|
Titan#, Text |
85 U
|
Human#, Unicorn#, text |
86 V
|
Text |
87 W
|
Text |
88 X
|
Bin, stone floodgate, shop post, building footprint, nausea/winded/stunned/unconscious/migrant indicator, text, up/down stairs, keyboard cursor |
89 Y
|
Text |
90 Z
|
Sleep indicator, text |
91 [
|
Clothing, armor, item stack opening tag, text |
92 \
|
Part of animation when two creatures or dwarves are on the same spot, Ballista tile |
93 ]
|
Floor tile in workshops and furnaces, item stack closing tag, text, clothing?, armor? |
94 ^
|
Trap, Alabaster*, Volcano on world map |
95 _
|
Channel designation, text |
Row 07 (096-111)[edit]
96 `
|
Rough floors, unexplored underground |
97 a
|
Antman#, text |
98 b
|
Batman#, text |
99 c
|
Cat#, text |
100 d
|
Dog#, text |
101 e
|
Text |
102 f
|
Frogman#, text |
103 g
|
Goblin#, Mountain goat#, Gremlin#, Groundhog#, text |
104 h
|
Harpy#, text |
105 i
|
Fire imp#, text |
106 j
|
Text |
107 k
|
Kobold#, text |
108 l
|
Text |
109 m
|
Mandrill#, mussel, text |
110 n
|
Text |
111 o
|
Well construction, bridge construction, text, millstone in action, floor tile in magma furnaces |
Row 08 (112-127)[edit]
112 p
|
Text |
113 q
|
Text |
114 r
|
Ratman#, text |
115 s
|
Snakeman#, Slugman#, Snailman#, text |
116 t
|
Troglodyte#, text |
117 u
|
Text |
118 v
|
Text |
119 w
|
Wolf#, text |
120 x
|
Saltpeter*, text |
121 y
|
Text |
122 z
|
Text |
123 {
|
Forbidden opening tag |
124 |
|
Talc*, pipe sections, Part of animation when two creatures or dwarves are on the same spot |
125 }
|
Forbidden closing tag |
126 ~
|
Unfinished rough stone road, river, magma, flows, dirt road, farm plot under construction, sand, furrowed soils, blood smear, guts |
127 ⌂
|
Animal trap, low mountains on world map, part of mechanic's workshop |
Row 09 (128-143)[edit]
128 Ç
|
Mechanisms |
129 ü
|
Text |
130 é
|
Text |
131 â
|
Text |
132 ä
|
Text |
133 à
|
Text |
134 å
|
Text |
135 ç
|
Totems |
136 ê
|
Text |
137 ë
|
Text |
138 è
|
Text |
139 ï
|
Text |
140 î
|
Elven forest retreat |
141 ì
|
|
142 Ä
|
|
143 Å
|
Idols, text |
Row 10 (144-159)[edit]
144 É
|
||
145 æ
|
Toys | |
146 Æ
|
Coffers, quivers, backpacks | |
147 ô
|
||
148 ö
|
||
149 ò
|
Unactivated levers, Stingrays#, text | |
150 û
|
Bucket, text | |
151 ù
|
||
152 ÿ
|
Valley herb* | |
153 Ö
|
||
154 Ü
|
||
155 ¢
|
Closed hatches | |
156 £
|
Many valuable metals* in veins, Other Features in Local embark map screen (when display is enabled) | |
157 ¥
|
Cave lobster* | |
158 ₧
|
||
159 ƒ
|
Rope reed* |
Row 11 (160-175)[edit]
160 á
|
|
161 í
|
|
162 ó
|
Activated levers, text |
163 ú
|
|
164 ñ
|
|
165 Ñ
|
|
166 ª
|
|
167 º
|
Cloth |
168 ¿
|
Instrument |
169
|