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

Editing 40d:Custom grid

Jump to navigation Jump to search

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

You are editing a page for an older version of Dwarf Fortress ("Main" is the current version, not "40d"). Please make sure you intend to do this. If you are here by mistake, see the current page instead.

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

Latest revision Your text
Line 3: Line 3:
 
The resolution and font are still a critical concern and must be calculated to match, to avoid strange results and crushed fonts.
 
The resolution and font are still a critical concern and must be calculated to match, to avoid strange results and crushed fonts.
  
== Choosing a grid for a font and resolution combination ==
+
'''To work out what grid size you want for a given screen resolution and font tile size:'''
 
+
# Determine your tile size. This may be found by dividing the x value of the intended screen resolution of the font by the x value of the grid, and then the y values are divided by each other. Example: If we use the default grid size, 80:25, and the resolution of curses_800x600.bmp, 800x600, then we would divide 800 by 80 to get 10 and 600 by 25 to get 24. This means our tiles are each 10x24. Note the tiles in curses_800x600.bmp are actually 10x12.
# Choose a font, know your resolution
+
# Divide the x value of your screen resolution by the x value of the tile size to determine your wanted x grid value, then do the same with the y values to determine your y grid value.
# Determine your tile size.  
+
# Change the [GRID] entry in the init.txt file to reflect your changes.
#* A tile is one character, with its background, as displayed on screen. 
+
* Note: if your font is, for example, a 16x16 font, as specified in the filename, this means that each tile is intended to be 16x16 pixels in size, and you may therefore avoid the mathematics in step 1
#* For the font you've chosen, they are usually named for a target screen resolution, or are named for the tile size... given neither, you could determine based on the dimensions of the font image itself:
 
#** If the font name contains a large pair of numbers, it usually means the target resolution for 80 columns and 25 rows.  Example: curses_800x600.bmp indicates that its tiles are 800/80 = 10 pixels wide and 600/25 = 24 pixels tall. In this particular case, the tiles are actually 12 pixels tall but look good when doubled to 24 pixels tall.
 
#** If the font name contains a small pair of numbers, it's usually the tile size.  Most new tile sets use this, like Tahin_16x16_rounded.png indicating 16x16 tiles.
 
#** If you're not sure, you can examine the tileset image, which uses 16 rows and 16 columns of tiles.  Simply divide each of the dimensions by 16 and you'll have your tile size.  For example, if an image was 144x128, you'd have a 9x8 tileset.
 
# Divide your screen resolution by your tile size to get your target grid, rounding down.
 
#* Example: screen 1600x1200 and a 16x10 tile.  1600/16 = 100, the number of 16pixel tiles you can fit horizontally.  1200/10 = 120 10 pixel tall tiles you can fit vertically.  For this example, you'd use a grid setting of [GRID:100:120]
 
  
 
==Notes==
 
==Notes==

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

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

Cancel Editing help (opens in new window)