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.

Difference between revisions of "40d:Tilesets"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
Line 19: Line 19:
 
=== Graphics sets ===
 
=== Graphics sets ===
  
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 characrter sets. The Dystopian Rhetoric graphics set comes with it's own DF installer; to install any others (or to install that one manually), you follow a similiar process to the above:
+
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 it's own DF installer; to install any others (or to install that one manually), you follow a similiar process to the above:
  
 
# Download the graphics set. (The list is [[Graphics sets|here]].)
 
# Download the graphics set. (The list is [[Graphics sets|here]].)

Revision as of 06:13, 20 November 2007

You may be looking for the List of user character sets or Graphics sets.

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

Character sets

A character set is an image in BMP format that contains the 256 different tiles, corresponding to the IBM Code-page 457 ASCII+Extended characters, which are used to display the main graphics. Here is the list of user-made standard tilesets. To install any of these tilesets, follow these steps:

  1. Download the tileset.
  2. 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.
  3. Put it in the data/art directory of your Dwarf Fortress installation.
  4. Open data/init/init.txt
  5. 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.
  6. It is also recommended you change [BLACK_SPACE:NO] to [BLACK_SPACE:YES] to prevent stretching of the graphics.
  7. Save the file, then you're ready to play!

Graphics sets

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 it's own DF installer; to install any others (or to install that one manually), you follow a similiar process to the above:

  1. Download the graphics set. (The list is here.)
  2. Convert it into a 24-bit BMP file using your favorite image editing program.
  3. Put it in the raw/graphics/example directory of your Dwarf Fortress installation, so it overwrites the existing file.
  4. Open /raw/graphics/example_text.txt
  5. Replace the contents with the appropriate text for the graphics set you downloaded. Save the file.
  6. Open data/init/init.txt
  7. Locate the [GRAPHICS:NO] line and change it to [GRAPHICS:YES].
  8. 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].
  9. Be sure to change [GRAPHICS_BLACK_SPACE] to the same setting as [BLACK_SPACE].
  10. Save the file, then you're ready to get mangled by a great-looking elephant!

Custom tileset design

The 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

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 inequal 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

'This section needs to be redone for the new DF version. Any Volunteers?'

VERY IMPORTANT: Before removing ", others?" at the end, make absolutely sure that there are no other uses for the tile, and always add it if you are not absolutely sure that there are no other uses for the tile. Any edits not following this rule will get reverted.

Items marked with * can have their tile changed in the raw files. Items marked with # can have their tile replaced by an Object Tileset image. This includes all non-vermin creatures (not sure about vermins).

----- Row 01 (000-015) ---------------------------------------------
No use
Civilian dwarves#
Military dwarves#
Dimple Cups*, others?
Cut gems, large gems, others?
Tower-caps*, Acacia trees*, Mangrove trees*, Maple trees*, quarry bushes(*?), others(no other tree)?
Plump Helmets*, Oak trees(*?), quarry bush leaves(*?), others?
Stone, solid workshop tile for several workshops like the magma smelter, lakes in main map, caves in the main map, others?
Solid workshop tile for several other workshops like the magma forge, tanner workshop, catapult cup, others?
Well, bracelet, ant colony, others?
Male sign, bags, others?
Female sign, amulet, others?
Armor stands, others?
Gems, coal, currency symbol, masterpiece quality symbol, turtle*, 'sun' symbol in engravings, others?
----- Row 02 (016-031) ---------------------------------------------
Head of ballista facing east, others?
Head of ballista facing west, others?
Cages, on-fire symbol, others?
Mugs, largest elven cities?, some tree types, others?
§ Restraints, whip vine, others?
Logs, others?
Some tree types, others?
Interface text (bridge and aqueduct direction), others?
Hungry/thirsty/drowsy/unhappy indicator, bridge placement raising direction indicator, others?
Interface text (bridge and aqueduct direction), others?
Interface text (bridge and aqueduct direction), others?
Withered plants, others?
Head of ballista facing north, tree?, ramp, others?
Head of ballista facing south, ramp, others?
----- Row 03 (032-047) ---------------------------------------------
No use
! Strange mood mark, text, others?
" Shrub, quotation marks, kobold's glowing eyes*, others?
# Chasm, pits, Basalt wall, Sandstone wall, others?
$ Coins, others?
% Prepared food, unknown underground area, siltstone, others?
& Demons#, others?
' Rough floors, unknown underground, others?
( Foreign object opening tag, tile in bowyer's workshop, text, others?
) Foreign object closing tag, text, others?
* Ore, superior quality tags, key reference, others?
+ Smooth floors, injured status, finely-crafted tags, text, indicates construction on level below, others?
, Rough floors, unknown underground, text, others?
- Scepters, arrows in flight, well-crafted tags, keyboard reference, others?
. Rough floors, text, unknown underground, others?
/ Weapons, bolts, others?
----- Row 04 (048-063) ---------------------------------------------
0 Coffins, text, others?
1
2
3
4
5
6
7
8
9
: Strawberries, plants (type?), snowstorms, others?
; Workshop(which ones?), others?
< Stairs up, opening tag in some item names, others?
= Stockpiles, Flint Wall, others?
> Stairs down, closing tag in item names, arrowhead on broker precision page, others?
? "Task assigned" indicator, looking for path(?), others?
----- Row 05 (064-079) ---------------------------------------------
@ Sheriff#, berserk dwarf#, adventurer#, fortress guard#, royal guard#, dwarven merchants#, caravan guards#
A Alligator#, text, others?
B
C Cow#, text, others?
D Dragon#, text, others?
E Elf#, elephant#, text, others?
F
G
H
I Support, text, others?
J
K
L Leopard
M Magma man#, mule#, text, others?
N
O Trade depot post, detailing system, text, wall ends, others?
----- Row 06 (080-095) ---------------------------------------------
P
Q
R
S Sasquatch#, text, others?
T
U Human#, Unicorn#, text, others?
V
W
X Bin, floodgate, shop post, nausea/winded/stunned/unconscious/migrant indicator, text, up/down stairs, others?
Y
Z
[ Clothes, armor?, others?
\
] Clothes?, armor?, others?
^ Trap, pressure plate (trap?), others?
_ Channel, text, others?
----- Row 07 (096-111) ---------------------------------------------
` Rough floors, unknown underground, others?
a Antman?
b Batman?
c Cat#, text, others?
d Dog#, text, others?
e
f Frogman#, text, others?
g Goblin#, Goat#, Gremlin#, text, others?
h Harpy#, text, others?
i Fire imp#
j
k Kobold#, text, others?
l
m Mandrill#, mussel, text, others?
n
o Well construction, bridge construction, text, others?
----- Row 08 (112-127) ---------------------------------------------
p
q
r
s Snakeman#, Slugman#, text, others?
t Troglodyte#, text, others?
u
v
w
x
y
z
{
|
}
~ Unfinished rough stone road, river, magma, fluids, dirt road, farm construction, others?
Animal trap, low mountains on world map, part of mechanic's workshop?, others?
----- Row 09 (128-143) ---------------------------------------------
Ç Mechanisms, others?
ü
é
â
ä
à
å
ç Totems, text?, others?
ê
ë
è
ï
î
ì
Ä
Å Idols, text, others?
----- Row 10 (144-159) ---------------------------------------------
É
æ Toys, others?
Æ Coffers, Quivers, others?
ô
ö
ò Unactivated levers, text, others?
û Bucket, text, others?
ù
ÿ
Ö
Ü
¢ Closed hatches, others?
£ Ore in walls, others?
¥ Lobster*, others?
ƒ
----- Row 11 (160-175) ---------------------------------------------
á
í
ó Activated levers, text, others?
ú
ñ
Ñ
ª
º Cloth, others?
¿ Instrument, others?
¬
½
¼
¡ Flask, waterskin, others?
« Ballista arrow tail for west-facing ballistae, decoration mark, others?
» Ballista arrow tail for east-facing ballistae, decoration mark, others?
----- Row 12 (176-191) ---------------------------------------------
Partially dug rock, gases, workshop tiles(which ones?), others?
Partially dug rock, gases, workshop tiles(which ones)?, side tiles for catapult, window, others?
Partially dug rock, gases, workshop tiles(which ones)?, others?
Overworld rivers, others?
Overworld rivers, top-right tile for Loom, others?
Tree in winter, part of bridge system, others?
Ends of smooth walls, Waterfalls, others?
Ends of smooth walls, others?
Walls, waterfalls, others?
Walls, bridges, waterfalls, wooden doors, others?
Walls, bridges, others?
Walls, bridges, others?
Ends of smooth walls, waterfalls, others?
Ends of smooth walls, others?
Overworld rivers, others?
----- Row 13 (192-207) ---------------------------------------------
Overworld rivers, others?
Overworld rivers, others?
Overworld rivers, others?
Overworld rivers, top-left tile for Loom, others?
Overworld rivers, others?
Doors, overworld rivers, (flashing) floor detailing/engraving in progress, others?
Bridges, trees in winter, catapult tile, others?
Walls, bridges, others?
Walls, bridges, others?
Walls, others?
Walls, others?
Walls, waterfalls, others?
Walls, bridges, planted fields, center catapult tile, others?
Walls, bridges, fortifications, (flashing) wall detailing/engraving/fortifying in progress, others?
----- Row 14 (208-223) ---------------------------------------------
Bridges, waterfalls, others?
Table, others?
Chairs, bridges, waterfalls, others?
Ends of smooth walls, waterfalls, others?
Ends of smooth walls, others?
Ends of smooth walls, others?
Ends of smooth walls, waterfalls, others?
Some types of floodgates (metal? wood?)?, others?
Some types of doors (metal?), others?
Overworld rivers, others?
Overworld rivers, others?
Any solid color tile
Siege machine parts, others?
Ballista, others?
Ballista, others?
----- Row 15 (224-239) ---------------------------------------------
α Fish, top-center fishery tile, meat (except?), others?
ß Leather, others?
Γ Weight symbol, others?
π Cabinet, some forts on overworld map (Goblin? Undead?), others?
Σ Trap weapon, others?
σ Anvil, others?
µ Plants*(which?), crown, others?
τ Pig tails*, Tower cap sapling others?
Φ Sweet pods*, bloated tuber*, others?
Θ Beds, others?
Ω Statues, Dwarven cities on map, others?
δ Earrings, kennel tile, others?
Boulder, middle-right butcher tile, unmined andesite*, unmined pumice*, others?
φ Thread, others?
ε Crossbow? Tile in bowyer's workshop, others?
----- Row 16 (240-255) ---------------------------------------------
Bars, excellence quality symbol, others?
± Unfinished road, others?
Spent ammo (catapult stones count), ashes, others?
Spent ammo (catapult stones count), ashes, others?
Willow tree*, other trees?, others?
÷ Barrel, others?
Rough stone road, river, lava, glop, fat, tallow, farm, vomit, blood pools others?
° Ring, others?
Vermin*, others?
· Seeds, others?
Weapon racks, tall grass in main map, tick (selecting production materials, confirmed items on manager window), others?
Something in main map(what is it?), others?
² Body parts, chunks, small corpses, bone, shell, skins, skulls, others?
Blocks, first image seen for a creature falling into the chasm, trees on level below, others?
No use