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.

v0.31:Technical tricks

From Dwarf Fortress Wiki
Revision as of 03:31, 21 July 2010 by Zarovin (talk | contribs)
Jump to navigation Jump to search

Template:AV

Overview

In order to configure Dwarf Fortress to your liking there are two files you can edit, init.txt and d_init.txt. The first file, init.txt, contains mostly the settings pertaining to the window, rendering and sound of Dwarf Fortress. The second file, d_init.txt, contains settings that affect game features such as saving and population controls.

Locating your configuration file

The configuration files are in the data\init folder of the directory that you installed Dwarf Fortress to.

Editing the configuration file

You can edit the configuration files with any word processing software or program that can open .txt files. A good program to edit these files in Windows is notepad. All data in these files is contained in what are called tokens. Each token is defined by the text between an opening square bracket, '[', and the first closing square bracket, ']'. Arguments to the various tokens are separated from a token identifier by a colon, ':'.

Init.txt Settings

Sound

  • [SOUND:ON]

Change the argument from "ON" to "OFF" to completely remove sound and music from the game. If this is "OFF", it will not be possible to change the volume from the in game options menu.

  • [VOLUME:255]

Changes the default volume of sound in Dwarf Fortress. The argument can be any value from 0 to 255, with 255 representing 100% volume.

Intro Movie

  • [INTRO:YES]

Change the argument from "YES" to "NO" to turn off the intro movie.

Window

  • [WINDOWED:PROMPT]

Changes the window mode that Dwarf Fortress runs in. If this is "PROMPT" the game will ask you if you want to run in windowed or fullscreen mode. If this is "NO" the game will be fullscreen with no prompt, and if this is "YES" the game will be in windowed mode with no prompt.

  • [WINDOWEDX:80]

If this is below 256, this specifies the width of the grid used by Dwarf Fortress with a minimum of 80. As such, the width of the window used will be the product of this value and the width of the font used. If this value is 256 or above, it specifies the width of the window used directly.

  • [WINDOWEDY:25]

If this is below 256, this specifies the height of the grid used by Dwarf Fortress with a minimum of 25. As such, the height of the window used will be the product of this value and the height of the font use. If this value is 256 or above, it specifies the height of the window used directly.

  • [FONT:curses_640x300.png]

The font file that Dwarf Fortress uses. This value can be any .bmp or .png image in the data/art folder.

  • [RESIZABLE:YES]

Can be "YES" or "NO". If this is "YES" you can resize the window while Dwarf Fortress is running.

  • [TOPMOST:NO]

If this is set to "YES", the window is kept above all other windows.

Fullscreen

These settings are used if the [WINDOWED:PROMPT/YES/NO] token is either "NO", or "PROMPT" and the fullscreen option is chosen.

  • [FULLSCREENX:0]

The width of the screen in fullscreen mode. If the value are 0, Dwarf Fortress chooses the best resolution for you.

  • [FULLSCREENY:0]

The height of the screen in fullscreen mode. If the value is 0, Dwarf Fortress chooses the best resolution for you.

  • [FULLFONT:curses_800x600.png]

The font file that Dwarf Fortress uses. This value can be any .bmp or .png image in the data/art folder.

  • [BLACK_SPACE:YES]

If this is "NO", tiles will be stretched to fit to the screen if there is a resolution mismatch. If this is "YES", the extra space around the grid is filled with black space and the tiles are left unstretched.

Graphics

  • [GRAPHICS:NO]

Can be "YES" or "NO". If this is "YES", Dwarf Fortress will use the raw/graphics folder for certain tile graphics. Currently this is limited to creature graphics.

  • [GRAPHICS_WINDOWEDX:0]

The window width used when Dwarf Fortress is in windowed mode.

  • [GRAPHICS_WINDOWEDY:0]

The window height used when Dwarf Fortress is in windowed mode.

  • [GRAPHICS_FONT:curses_square_16x16.png]

The font used by Dwarf Fortress when in windowed mode and [GRAPHICS:YES/NO] is "YES".

  • [GRAPHICS_FULLSCREENX:0]

The width of the screen used by Dwarf Fortress if in fullscreen mode.

  • [GRAPHICS_FULLSCREENY:0]

The height of the screen used by Dwarf Fortress if in fullscreen mode.

  • [GRAPHICS_FULLFONT:curses_square_16x16.png]

The font used by Dwarf Fortress when in fullscreen mode and [GRAPHICS:YES/NO] is "YES".

  • [GRAPHICS_BLACK_SPACE:YES]

If this is "NO", tiles are stretched to fit window in the case of a resolution mismatch. If this is "YES", the extra space is filled with black space and the tiles are left unstretched.

Video Card Options

  • [PRINT_MODE:2D]

This value changes how Dwarf Fortress draws to the screen. As such, changing this value can significantly change the performance of Dwarf Fortress on your computer. Possible values for this are "2D", "2DSW", "2DASYNC", "STANDARD", "TEXT", "ACCUM_BUFFER", "FRAME_BUFFER", "VBO" and "PARTIAL". "PARTIAL" print mode takes an additional argument similar to how the PARTIAL_PRINT value worked in previous versions, with the number representing the number of frames a changed tile is rendered before it is skipped. "TEXT" is only available on Macintosh and Linux.

  • [SINGLE_BUFFER:NO]

If this is "NO" Dwarf Fortress will use double buffering, which may reduce flickering of the screen at the expense of a possible (small) drop in frame rate. If this is "YES", double buffering is turned off.

  • [ARB_SYNC:NO]

On video cards that support the OpenGL ARB_sync extension, turning this on can greatly improve performance in GPU overload conditions. However, this can cause Dwarf Fortress to crash on some video cards.

  • [VSYNC:NO]

If this is set to "YES", when Dwarf Fortress redraws the screen it will wait for the monitor to finish it's vertical retrace. This can negatively impact your FPS if G_FPS is set high, as the game is forced to suspend calculating game frames to wait for the monitor to finish. The main reason to change this to "YES" is if tearing of the game image occurs regularly for you.

  • [TEXTURE_PARAM:LINEAR]

Can be either "LINEAR" or "NEAREST". If it is "NEAREST", the texture values use the nearest pixel value without averaging. If it is "LINEAR", the texture values use the average of the adjacent pixels.

FPS

  • [FPS:NO]

If this is "YES" a FPS counter is displayed on the top left corner.

  • [FPS_CAP:100]

The game frames per second the game limits itself to. This changes the number of turns calculated per second, not the graphical frames displayed. If this value is 0 the FPS is uncapped.

  • [G_FPS_CAP:50]

The graphical frames per second the game attempts to draw. This changes the number of times Dwarf Fortress draws itself to the screen per second. Lower numbers will cause Dwarf Fortress to run faster but skip displaying more game frames between each redraw. To find the number of game frames that are calculated per redraw done by Dwarf Fortress, divide the value for FPS_CAP by the value of G_FPS_CAP. In the default case, this is 100/50=2, so every second frame calculated dwarf fortress will redraw to the screen.

Priority

  • [PRIORITY:NORMAL]

Change this to affect the process priority of Dwarf Fortress. Higher priorities mean that Dwarf Fortress will run faster and other programs will run slower. Possible values are "REALTIME", "HIGH", "ABOVE_NORMAL", "NORMAL", "BELOW_NORMAL" and "IDLE".

Game Options

  • [ZOOM_SPEED:10]

How fast the game zooms. A value of 10 corresponds to increasing grid size by 10 units each time you zoom.

[RECENTER_INTERFACE_SHUTDOWN_MS:0] This controls the number of milliseconds that must pass before input works again after the view recenters on an event in dwarf mode.

[COMPRESSED_SAVES:YES] Change this to "NO" if you want to leave save uncompressed. If "YES", saves are compressed in the .zip format to save space.

Mouse

  • [MOUSE:YES]

Determines if the game accepts mouse input.

  • [MOUSE_PICTURE:NO]

If the game should display a picture in place of the system mouse icon. The picture lags if Dwarf Fortress is lagging.

Keyboard

  • [KEY_HOLD_MS:250]

The number of milliseconds before holding a key causes it to be repeated.

  • [KEY_REPEAT_MS:150]

The number of milliseconds between consecutive repetitions of a held key.

  • [KEY_REPEAT_ACCEL_LIMIT:8]
  • [KEY_REPEAT_ACCEL_START:10]

If you set KEY_REPEAT_ACCEL_LIMIT above one, then after KEY_REPEAT_ACCEL_START repetitions the repetition delay will smoothly decrease until repetition is this number of times faster than at the start.

  • [MACRO_MS:150]

The number of milliseconds between macro instructions.