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 "User talk:CLA"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
Line 266: Line 266:
 
|<small>033</small>&nbsp;{{TST|!}}
 
|<small>033</small>&nbsp;{{TST|!}}
 
|
 
|
|<small>034</small>&nbsp;{{TST|"}}
+
|style="background-color: green;"|<small>034</small>&nbsp;{{TST|"}}
 
|
 
|
|<small>035</small>&nbsp;{{TST|#}}
+
|style="background-color: green;"|<small>035</small>&nbsp;{{TST|#}}
 
|
 
|
 
|<small>036</small>&nbsp;{{TST|$}}
 
|<small>036</small>&nbsp;{{TST|$}}
Line 276: Line 276:
 
|<small>038</small>&nbsp;{{TST|&}}
 
|<small>038</small>&nbsp;{{TST|&}}
 
|
 
|
|<small>039</small>&nbsp;{{TST|&#39;}}
+
|style="background-color: green;"|<small>039</small>&nbsp;{{TST|&#39;}}
 
|
 
|
 
|<small>040</small>&nbsp;{{TST|(}}
 
|<small>040</small>&nbsp;{{TST|(}}
Line 282: Line 282:
 
|<small>041</small>&nbsp;{{TST|)}}
 
|<small>041</small>&nbsp;{{TST|)}}
 
|
 
|
|<small>042</small>&nbsp;{{TST|*}}
+
|style="background-color: green;"|<small>042</small>&nbsp;{{TST|*}}
 
|
 
|
|<small>043</small>&nbsp;{{TST|+}}
+
|style="background-color: green;"|<small>043</small>&nbsp;{{TST|+}}
 
|
 
|
|<small>044</small>&nbsp;{{TST|,}}
+
|style="background-color: green;"|<small>044</small>&nbsp;{{TST|,}}
 
|
 
|
 
|<small>045</small>&nbsp;{{TST|-}}
 
|<small>045</small>&nbsp;{{TST|-}}
 
|
 
|
|<small>046</small>&nbsp;{{TST|.}}
+
|style="background-color: green;"|<small>046</small>&nbsp;{{TST|.}}
 
|
 
|
 
|<small>047</small>&nbsp;{{TST|/}}
 
|<small>047</small>&nbsp;{{TST|/}}
Line 298: Line 298:
 
{|
 
{|
 
|
 
|
|<small>048</small>&nbsp;{{TST|0}}
+
|style="background-color: green;"|<small>048</small>&nbsp;{{TST|0}}
 
|
 
|
 
|<small>049</small>&nbsp;{{TST|1}}
 
|<small>049</small>&nbsp;{{TST|1}}
Line 324: Line 324:
 
|<small>060</small>&nbsp;{{TST|<}}
 
|<small>060</small>&nbsp;{{TST|<}}
 
|
 
|
|<small>061</small>&nbsp;{{TST|&#61;}}
+
|style="background-color: green;"|<small>061</small>&nbsp;{{TST|&#61;}}
 
|
 
|
 
|<small>062</small>&nbsp;{{TST|>}}
 
|<small>062</small>&nbsp;{{TST|>}}

Revision as of 17:01, 14 August 2015

How colors other than white and magenta work

TODO: magenta=alpha, proofread, verify, rewrite?, link in graphic set and tileset pages

where to put? colors section on graphics page? color page?

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.

Creating your own

Creating your own Tileset

Deciding on size

The character tileset is always arranged in 16x16 tiles but their size is variable. So the first decision you have to make when creating a new tileset is deciding on the tile size: Bigger tiles allow you to draw more details, but you will be able to see less of them at the same time. Non-square 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 without enabling TrueType. More information about size is on the tileset and custom grid pages. Less important points to consider are subdivisions, even/uneven numbers, and popularity. Especially the first two have very little effect, but they're listed for completeness.

Subdivisions

For example, a 10x10px wide tile is divisible by 2/5; 16 by 2/4/8; 18 by 3/6/9. In practice, this could have an effect on tiles where you plan to use multiple subdivisions in symmetry. On a 10x10 tileset, you can't have a checkered floor tile with 9 symmetric small squares; on a 18x18 tileset, you can. If you want them to have a border, the calculations change.

Even/uneven numbers

Tiles with uneven dimensions (9x9, 15x15) have a center pixel. Some tiles benefit from some sort of center point (maybe a gear assembly), and on small tile sizes, a 2x2 center simply would be too thick. So you need to decide between circular symmetry and linear symmetry.

Popularity

Square tilesets - especially 16x16 - are the most popular choice amongst users. Even if you just use the tileset for yourself, you might want to use it together with existing creature graphics, which mostly exist for 16x16 tilesets. While not strictly necessary, it is recommended to use the same tile size for the tileset and creature graphics.

Choosing a base tileset

It's a lot easier to start with an existing tileset than to start with a blank file. You have something to go from and have an overview of the rough look of the original tile. You might not want to change every tile anyway. Obviously you should choose one that has the same tile size as you plan on using; A tileset that already looks close to

Editing a tileset

This tutorial is a step-by-step guide on changing a few tiles from a tileset, saving it, and setting DF to use it. It should contain everything a user without previous experience needs for basic tileset editing. We will be using curses_square_16x16.bmp (a stretched variant of the default tileset) as a base tileset. The instructions apply to Photoshop CS5, but should work with all recent versions of Photoshop and possibly with small differences in GIMP and other bitmap editing programs. You will only need to use a small amount of features: Layers and groups, transparency and masks, and some basic tools (pen, eraser, selection tool). So any program that allows you to use layers, alpha transparency, and can save .png files with transparency should be completely sufficient.

Opening and preparing the base tileset

You should download the newest version of DF and install it in a separate folder. Try to create a typical fortress to see how your new tileset will look in the most common situations
For the purpose of teaching it properly, some steps might seem unnecessary complicated for the scope of the changes in this tutorial. See graphics#good practices below

Open your bitmap editor and load the file "curses_square_16x16.bmp". You will find it in your DF folder in data/art.

  • First, make sure you see the following panels: Layers, channels, tools. If not, you can open them in the menu bar under "Window".
  • press ctrl+k (or navigate to edit>preferences>general) and click on "guides grids & slices" on the left. Under "grid" set the value for "Gridline Every" to your tile size. In our case, 16 and press OK. You still need to press ctrl+' to make it visible. You should now see a yellow grid on the tile borders.

Our new tileset will be a .png with alpha transparency, so we will have to get rid of the magenta background.

  • Right click on the "Background" layer in the layer panel and select "Make layer from background..."
  • use the Wand tool (w) and click anywhere on the magenta color; make sure "continuous" and "anti-aliasing" are unchecked in the top bar. Then, press del on the keyboard.
  • right click on it, select layer properties and rename it to "base tileset". In big, complicated files, organizing your layers is crucial. Name them appropriately. If you have lots of layers, try to organize them into groups.
  • with the layer still selected, press on the "add layer mask" button (bottom of the layers panel, grey square with white circle inside).A layer mask hides pixels of a layer everywhere it's black. White areas are visible. you can draw directly on it like any normal layer by selecting it. Make sure to select the one you want to edit, layer or its mask. You can make it visible in the channel panel, or by pressing '\'

We will use it to mask any of the original tiles we change.

Drawing a white tileset is a lot easier looking at a darker background instead of a checkered greyish white., but we will be using a helper layer instead that won't be visible in the final version. You can also change the background color under preferences>transparancy (ctrl+k). If you only use the program to draw DF tilesets, you might want to use that instead.

  • make a new layer (shift+ctrl+n or the button next to the trash can at the bottom of the layers panel)
  • verify that you selected the new layer and that your foreground color is black (D to switch to default colors); press alt+del
  • move the layer of the background by dragging it down on the layers panel
  • Rename it to Black background. Give it another color to differentiate it from other layers.
  • Now we only need a new layer for the changes we plan to make. Ctrl+shift+n, move it on top, and call it "new"

This concludes our preparations. Save the file as .psd in your project folder (ctrl+s). We will now add eyebrows to the dwarf tile (tile #1, second tile in first row) and draw a new bed. Finally we will copy the walls of another tileset and use them in ours.

  • make sure the base tileset layer is selected. Use the marquee tool (m) to select the dwarf tile; right click on the selection and click on "Layer from copy"
  • Select the dwarf again, this time while selecting the mask of the base tileset and press alt+del (make sure your foreground color is black)
  • verify the tile is invisible by toggling visibility of "Layer 1"
  • Select the Layer with the dwarf on it and draw eyebrows with the pen (n) in white. You can change the tool size right below the menu bar (tool bar).
  • Select the eraser tool and set the mode to "pencil" in the tool bar. Give the dwarf a shave and erase some pixels from his beard.

Once you're happy with the outcome, select both, "layer 1" and "new". Merge them with ctrl+e and save your document.

Next we'll draw a new bed.

  • Select the base tileset mask again, and with the pen, draw directly (in black) on the bed to make it invisible. We won't be copying the bed to a new layer because it will be completely different.
  • Back to layer "new" and start drawing a bed in white.For quick drawing, it's often faster to switch between black and white (x to toggle background/foreground color) instead of switching to the eraser and back to the pen.

If you choose to do that, make the black background layer invisible once you're done and delete all the black pixels at the end.

We'll now manually merge two tilesets by adding the walls from another one.

  • download a 16x16 tileset from the repository and open it in photoshop (keep your new tileset open, too).
  • Right click on the background layer and "duplicate layer" into your new tileset file.
  • go back to your tileset, rename the layer to "walls" and select the walls with a marquee. holding shift lets you select additional areas, holding alt lets you subtract areas
  • Select the new layer and, with the marquee selection still active, add a mask. If you chose a tileset with magenta background, remove it as shown above.

Now we want to mask the exact same tiles on the base layer

  • ctrl click on the mask of the "walls" layer to select visible pixels
  • with the marquee selection active, select the mask of "base tileset" and press alt+del (with black as foreground color)

Save your document again. At this point we're done with our changes and want to export the image.

  • Make the black background invisible and go to File>Save for web&devices...
  • on the top right, set the file type to PNG-24 and make sure transparency is ticked
  • press save and give it a fancy name
  • TODO:set init, format, add images?


    • basic photoshop stuff: masks, layers, alpha channel transparency, some tools (pen, eraser, selection tools) (get someone to add GIMP equivalents)
    • good practices: non-destructive editing, using separate layers, organizing in groups and naming layers, grid (plus subgrid, pixel grid), debug layers, save often.
    • walkthrough of making a new tileset
      • preparation download fresh DF install, put into separate test directory, make world, start fortress, ideally with a typical fortress and all objects visible somehow
      • open base tileset of your choice (square vanilla in this case?), set grid to right size, make visible
      • bmp or png, magenta/alpha transparency
        • use png, and alpha transparency, if you start with bmp, make layer from background, select magenta with wand, press del. save as psd
        • first debug/auxiliary layer : black background; new layer, move to back, [d], alt+del. Give it a nice name and color in layers menu
      • change bed, give dwarf beard:
        • non-destructive editing: select dwarf & bed tile, layer with copy.
        • select base layer again, invert selection, press mask button, lock layer, save as psd
        • select new layer, draw beard on with pen
        • erase bed, draw new bed
      • save as psd again
      • test out your creation
        • make debug layers invisible
        • save for web & devices: png-24, alpha transparency in data/art.
        • open data/init/init.txt, point to your new tileset
        • load up DF, marvel at your artistic genius.
      • Not good enough yet? Kill DF (strg+shift+esc), change in PS, overwrite tileset, start DF again.

advanced stuff/raw changes

  • init & raw changes, link to tileset lists
  • most commonly used tiles with multiple meanings: u-d-stairs/bins/cursor/archery, male/female
  • note on unused tiles
  • compatibility, dependency, conflicts, maintainance across versions (file changes.txt, etc)
  • TODO: best place to add documentation about raw syntax (plants, init, etc)

tricks and magic

  • how df blends colors/background/foreground
  • transparency, partial transparency (including opaque background tiles), engraving, INVERTED, animated tiles
  • [1]

advanced photoshop stuff

actions: automating common steps. for example export: select debug layers, make invisible, save for web and devices


TODO: copypasta.txt includes some old tutorials I wrote, check it.

stuff to change on tileset page once everything's in place

  • main creature tiles section: add something like "for a list with raw names see {here|link to graphic set#table}"

Creature Graphics

this page

  • conflicts, reminder to delete example files or better, overwrite with empty file
  • link to list of creatures by tile, add names grabbed from raws with wiki template;
  • testing (link to utilities#raw explorer)
  • suggestions about grouping

TODO for 'graphic set' page (listed here for drafting)

  • templates
    • .psd templates will they work in gimp?
    • text templates, complete with dimensions so you just have to draw. separated by biome?

TrueType Font

  • bug, commonly missing symbols in existing TTF, fontforge

Colors

  • add short intro
  • be aware of contrasting colors, best to test how every color looks withe every other color

add it all together

  • releasing your own stuff
  • dffd, other file hosts
  • updating to a new version, resolving conflicts: change log, file changes.txt, diff


Add on tileset page

↕ ∟ ↔ ₧ ½ ⌡ 255


000   001  002  003  004  005  006  007  008  009  010  011  012  013  014  015 
016  017  018  019  020  021 § 022  023  024  025  026  027  028  029  030  031 
032   033 ! 034 " 035 # 036 $ 037 % 038 & 039 ' 040 ( 041 ) 042 * 043 + 044 , 045 - 046 . 047 /
048 0 049 1 050 2 051 3 052 4 053 5 054 6 055 7 056 8 057 9 058 : 059 ; 060 < 061 = 062 > 063 ?
064 @ 065 A 066 B 067 C 068 D 069 E 070 F 071 G 072 H 073 I 074 J 075 K 076 L 077 M 078 N 079 O
080 P 081 Q 082 R 083 S 084 T 085 U 086 V 087 W 088 X 089 Y 090 Z 091 [ 092 \ 093 ] 094 ^ 095 _
096 ` 097 a 098 b 099 c 100 d 101 e 102 f 103 g 104 h 105 i 106 j 107 k 108 l 109 m 110 n 111 o
112 p 113 q 114 r 115 s 116 t 117 u 118 v 119 w 120 x 121 y 122 z 123 { 124 | 125 } 126 ~ 127 
128 Ç 129 ü 130 é 131 â 132 ä 133 à 134 å 135 ç 136 ê 137 ë 138 è 139 ï 140 î 141 ì 142 Ä 143 Å
144 É 145 æ 146 Æ 147 ô 148 ö 149 ò 150 û 151 ù 152 ÿ 153 Ö 154 Ü 155 ¢ 156 £ 157 ¥ 158  159 ƒ
160 á 161 í 162 ó 163 ú 164 ñ 165 Ñ 166 ª 167 º 168 ¿ 169  170 ¬ 171 ½ 172 ¼ 173 ¡ 174 « 175 »
176  177  178  179  180  181  182  183  184  185  186  187  188  189  190  191 
192  193  194  195  196  197  198  199  200  201  202  203  204  205  206  207 
208  209  210  211  212  213  214  215  216  217  218  219  220  221  222  223 
224 α 225 ß 226 Γ 227 π 228 Σ 229 σ 230 µ 231 τ 232 Φ 233 Θ 234 Ω 235 δ 236  237 φ 238 ε 240 
240  241 ± 242  243  244  245  246 ÷ 247  248 ° 249  250 · 251  252  253 ² 254  255  

Legend:

Used in game Used on map and interface Used in both No known use

List from Dibujor

TODO:

  • Format tile symbol
  • decide on overall format (next to normal table? in "by type" section? probably both. implement the table above too? on character table page?)
  • implement in page
  • add "under construction" or whatever note
  • verify correctness (tileset with all other symbols as magenta "X") and add tiles that are missing

Items between brackets [] can have their tile changed in the raw data files.

Row 1:

5 - [various forest trees] (apple, maple, cherry...) 6 - [Broadleaf forest] (oak, almond, Olive) 7 - river sources, caves 9 - fortress 15 - Human town

Row 2:

20 - Largest forest retreats 23 - [Cedar forest] 24 - [Conifer forest] 30 - mountain

Row 3:

34 - savanna, swamp, shrubland, marsh 35 - Human city ([i]local map,world map[/i]) 39 - rocky wasteland 42 - Human city ([i]JUST world map?[/i]) 43 - Human town 44 - rocky wasteland 46 - Various grasses

Row 4:

48 - Tombs 61 - Hamlets

Row 5:

73 - Necromancer's tower 79 - ??? (appears to be related to forests)

Row 6:

86 - Badlands 94 - Volcano

Row 7:

110 - Hills

Row 8:

126 - Water on lakes, Sand Desert 127 - Low mountains

Row 9:

140 - Elven forest retreat

Row 10:

145 - Hamlets (world map) 146 - Hamlets

Row 11:

166 - Goblin settlements ([i]in world map[/i]) 167 - Dark Pits (Goblin "cities")([i]only world map[/i])

Row 12:

176 - Glaciers 177 - Glaciers 178 - Glaciers 179 - Overworld rivers 180 - Overworld rivers 181 - Dead trees 185 - Overworld rivers 186 - Overworld rivers 187 - Overworld rivers 191 - Overworld rivers

Row 13:

192 - Overworld rivers/roads 193 - Overworld rivers/roads 194 - Overworld rivers/roads 195 - Overworld rivers/roads 196 - Overworld rivers/roads 197 - Overworld rivers/roads 198 - [Dead Trees] 200 - Rivers 201 - Rivers 202 - Rivers 203 - Rivers 204 - Rivers 205 - Rivers 206 - Rivers 207 - Rivers

Row 14:

217 - Overworld rivers 218 - Overworld rivers

Row 15:

226 - Tropical forest 227 - Dark fortress (Goblin "city") ([i]world (escarcely), local map[/i]) 230 - Ruins 231 - Shrublands 234 - Dwarven cities 239 - Hills

Row 16:

240 - Hamlets 244 - [Willow forest/swamp](not sure if terrain or tree here) 247 - Water, Sand Desert 249 - Tundra 250 - Tundra 251 - Badlands 252 - Savanna, marsh, grassland, badlands