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 "Technical tricks"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m (fine or better)
(→‎init.txt: clarified when settings are saved to prefs, tweaks)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{migrated article}}
 
 
{{Quality|Fine}}
 
{{Quality|Fine}}
 
{{av}}
 
{{av}}
 
{{TOC right}}
 
{{TOC right}}
 +
''Dwarf Fortress'' has various settings that can affect the game experience. You can configure these in ''[[Settings]]'' accessed from the main menu or {{Menu icon|Esc}} menu. However, some settings can only be changed by directly editing the game configuration files, which include:
 +
* [[announcements.txt]] - contains configuration for the various game announcements.
 +
* [[arena.txt]] - contains layouts of [[object testing arena]] maps.
 +
* [[colors.txt]] - contains the [[color scheme]] used to display various text.
 +
* [[d_init.txt]] - contains settings that affect game features such as autosaving, interface, simulation, and population controls.
 +
* [[embark_profiles.txt]] - contains embark presets saved from [[Embark#Prepare_Carefully|prepare carefully]] or copied from the [[embark profile repository]].
 +
* [[init.txt]] - contains settings pertaining video, audio, and input.
 +
* [[interface.txt]] - contains keybinds.
 +
* [[world_gen.txt]] - contains [[advanced world generation]] presets.
 +
* [[macros]] - the folder where macro files are saved.
  
''Dwarf Fortress'' has various settings that can affect the game experience. You can configure these to your liking from the main menu or in-game menu by pressing the ''Settings'' button. Some settings can only be changed by editing the game configuration files directly [[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 configuration files ==
 +
These configuration files might be found in two places in the [[Installation|install]] folder:
 +
* <code>data\init\</code> - files here contain the default values installed with the game and also may contain some explanations of the settings.
 +
* <code>prefs\</code> - files here contain the current values saved by the game.
  
== Locating your configuration files ==
+
You can edit the configuration files with any plain text editing software, such as Notepad, Vim, or Emacs.
In most cases, the configuration files for ''Dwarf Fortress'' are in the <code>\prefs\</code> folder of the directory you [[Installation|installed]] it to. On linux user data is often located in your home directory, for the exact mod folder locations for your operating system, see [[game folders and files]].
 
  
You can edit the configuration files with almost all text editing software, such as Vim or Emacs.
+
Most data in these files is in [[token]] form. Each token is defined by the text between an opening square bracket, <code>[</code>, and the next closing square bracket, <code>]</code>. The token identifier and any values are separated by a colons, <code>:</code>.
All data in these files is contained in what are called [[token]]s. 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, ':'.
 
  
If anything goes wrong, you can completely reset the game's settings by deleting the prefs folder while the game is not running.
+
If anything goes wrong, you can completely reset the game's saved settings by deleting the <code>prefs\</code> folder while the game is not running, assuming the defaults have not been changed. This does not work with the files in <code>data\init\</code>, so you should make backups of them before modifying them. The game also uses the last occurrence of a token, so you could add your changes after the default values. You could then just remove the leading <code>[</code> to disable your entries and use the defaults.
  
== Settings - init.txt ==
+
== d_init.txt ==
 +
For settings that can be changed in game see: [[Settings]].
 +
*[WALKING_SPREADS_SPATTER_ADV:YES] - Still in the files but currently has no effect, of course. Turns on or off the spread of blood spatter and other [[contaminant]]s between creatures and ground tiles in [[Adventurer mode]].
  
=== Audio ===
+
== init.txt ==
* [SOUND:YES]
+
For settings that can be changed in game see: [[Settings]].
Change the argument from "YES" to "NO" to completely remove sound and music from the game. If this is "NO", it will not be possible to change the volume from the in game options menu.
+
*[SOUND:YES] - Change the argument from "YES" to "NO" to completely remove sound and music from the game. If this is "NO", it will not be possible to change the volume from the in game options menu.
  
* [MASTER_VOLUME:255]
+
*[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.
* [MUSIC_VOLUME:255]
 
* [AMBIENCE_VOLUME:230]
 
* [SFX_VOLUME:204]
 
Changes the default volume of sound in ''Dwarf Fortress''. The argument can be any value from 0 to 255, with 255 representing 100% volume. You can set the volume from the ESC options menu as well.
 
  
=== Window ===
+
{{TipBox|#fb0|float=center|'''The game does not save the following font options to {{tt|/prefs/init.txt}}; you can add them but they will be removed the next time you exit Settings in game.''' To make them persistent add them to {{tt|/data/init/init_default.txt}}.}}
*[WINDOWED:PROMPT]
+
*[FONT:curses_640x300.png] - The font file that ''Dwarf Fortress'' uses in windowed mode. These values can be any .bmp or .png image in the {{tt|/data/art}} folder.
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]
+
*[FULLFONT:curses_800x600.png] - The font file used in fullscreen mode.
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]
+
*[BASIC_FONT:curses_640x300.png] - The font used during the initial load sequence and menus.
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.
 
  
[WINDOWEDX:98][WINDOWEDY:98] will make window big enough to display whole 2x2 [[embark]] [[site]] with 8x8 [[tileset]] or one embark tile with 16x16 tileset.
+
*[FPS_CAP:0] - Setting this to zero will cause it to be uncapped, allowing simulation to happen as fast as possible. This may cause the FPS display to show negative numbers when the game is paused and in the main menu.
  
*[FONT:curses_640x300.png]
+
*[G_FPS_CAP:0] - Setting this to zero will still use the default of 50 rather than it being uncapped.
The font file that ''Dwarf Fortress'' uses. This value can be any .bmp or .png image in the data/art folder.
 
  
*[RESIZABLE:YES]
+
== Resolution to grid ratios ==
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 is 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 [[Graphics set repository|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 [[Main:Tileset repository|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", the tiles are stretched to fit the 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".  A technical description of what these do can be found [http://www.bay12forums.com/smf/index.php?topic=63667.msg1478550#msg1478550 in this post].
 
"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 OS X and Linux, and uses the 8 ANSI colors with emboldening. OS X users should enable "Use bright colors for bold text" in the Profile tab of their Terminal preferences.
 
 
 
*[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 its 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. In terms of what the two options do to the graphics, the "LINEAR" option will appear to blur adjacent pixels and can result in a fuzzy appearance. The "NEAREST" option will produce a sharp, pixelated look but may result in images looking clipped at some different screen resolutions.
 
 
 
=== 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 for every second frame calculated ''Dwarf Fortress'' will redraw the screen.
 
 
 
=== Priority ===
 
;<nowiki>[PRIORITY:NORMAL]</nowiki>
 
: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".
 
 
 
{{verify}}
 
 
 
=== 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. If you experience save corruption, you can try turning this off. However, turning this off may cause saves to be over ten times their compressed size, which can lead to your save folder growing several gigabytes large if you have seasonal backups enabled. Make sure you have plenty of disk space or delete old backups regularly if you want to turn this off.
 
 
 
=== Mouse ===
 
;<nowiki>[MOUSE:YES]</nowiki>
 
:Determines if the game accepts mouse input.
 
 
 
;<nowiki>[MOUSE_PICTURE:NO]</nowiki>
 
:If the game should display a picture in place of the system mouse icon. The picture lags if ''Dwarf Fortress'' is lagging. {{verify}}
 
 
 
=== 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.
 
 
 
== Settings - d_init.txt ==
 
 
 
These settings are found in '''d_init.txt'''.
 
 
 
=== Save Behavior ===
 
*[AUTOSAVE:NONE]
 
When ''Dwarf Fortress'' should automatically save your game. If this is "NONE", ''Dwarf Fortress'' never saves your game for you. Possible values are "NONE", "SEASONAL", "SEMIANNUAL" and "YEARLY".
 
 
 
*[AUTOBACKUP:NO]
 
If this is "YES", ''Dwarf Fortress'' will back up your save file each time it autosaves your game.
 
 
 
*[AUTOSAVE_PAUSE:NO]
 
If ''Dwarf Fortress'' should pause the game each time it autosaves for you.
 
 
 
*[INITIAL_SAVE:NO]
 
If this is "YES", ''Dwarf Fortress'' will save the game immediately after you embark.
 
 
 
=== More Game Options ===
 
;<nowiki>[IDLERS:TOP]</nowiki>
 
:Where to display the number of idling dwarves. The value can be either "TOP", "BOTTOM", or "OFF".{{verify}}
 
 
 
;<nowiki>[PAUSE_ON_LOAD:YES]</nowiki>
 
:If "YES", ''Dwarf Fortress'' starts Fortress mode paused.
 
 
 
;<nowiki>[TEMPERATURE:YES]</nowiki>
 
:Turns [[temperature]] ''calculations'' on or off. If temperature calculations are off, only a few direct temperature changes will take place. For example, [[magma]] will set tiles and creatures to high temperatures, but those tiles will never cool and those creatures will not catch fire. Effects that rely on temperature calculations, such as water freezing, melting, or evaporating, or creatures and items taking temperature-related damage, will not occur.
 
 
 
;<nowiki>[WEATHER:YES]</nowiki>
 
:Turns [[weather]] on or off. If weather is off it will never rain or snow.
 
 
 
;<nowiki>[ECONOMY:YES]</nowiki>
 
:Turns on or off the fortress mode dwarven economy. This has no effect, since the economy does not function in v0.40.
 
 
 
;<nowiki>[INVADERS:YES]</nowiki>
 
:Turns on or off fortress mode [[siege]]s. Turning this off for your first couple of games may make the game easier to start with.
 
 
 
;<nowiki>[CAVEINS:YES]</nowiki>
 
:If this is "YES" it is possible for [[cave-in]]s to occur.
 
 
 
;<nowiki>[ARTIFACTS:YES]</nowiki>
 
:Turns on or off [[strange mood]]s and the resulting [[artifact]]s.
 
 
 
;<nowiki>[ZERO_RENT:NO]</nowiki>
 
:If this is "YES", when the dwarven economy kicks in all rooms will cost nothing, allowing even the poorest of haulers to have a room fit for a king. This has no effect, since the economy does not function in the current version.
 
 
 
;<nowiki>[TESTING_ARENA:YES]</nowiki>
 
:Turns on or off the testing arena.
 
 
 
;<nowiki>[WALKING_SPREADS_SPATTER_DWF:NO]</nowiki>
 
:Turns on or off the spread of blood spatter and other contaminants between creatures and ground tiles in [[Fortress mode]]. As contaminants are [[Blood|buggy]] and can have a major negative impact on [[FPS]] in [[Fortress mode]], it is recommended to leave this set at "NO" for now.
 
 
 
;<nowiki>[WALKING_SPREADS_SPATTER_ADV:YES]</nowiki>
 
:Turns on or off the spread of blood spatter and other contaminants between creatures and ground tiles in [[Adventurer mode]].
 
 
 
;<nowiki>[PATH_COST:1:2:5:25]</nowiki>
 
:The pathfinding costs associated with different [[traffic]] values.
 
 
 
;<nowiki>[STORE_DIST_ITEM_DECREASE:20]</nowiki>
 
;<nowiki>[STORE_DIST_SEED_COMBINE:1000]</nowiki>
 
;<nowiki>[STORE_DIST_BUCKET_COMBINE:1000]</nowiki>
 
;<nowiki>[STORE_DIST_BARREL_COMBINE:1000]</nowiki>
 
;<nowiki>[STORE_DIST_BIN_COMBINE:1000]</nowiki>
 
 
 
;<nowiki>[SHOW_IMP_QUALITY:YES]</nowiki>
 
:If "YES" ''Dwarf Fortress'' will display the [[quality]] of an item's improvements in the name. If you get annoyed by seeing items like *<*sword*>* you can
 
get rid of the outside ** by setting this to NO.
 
 
 
;<nowiki>[SHOW_ALL_HISTORY_IN_DWARF_MODE:YES]</nowiki>
 
:If "YES", inspecting engravings and artifacts in Fortress Mode will have an extended history displayed.
 
 
 
;<nowiki>[LOG_MAP_REJECTS:NO]</nowiki>
 
:If this is "YES", ''Dwarf Fortress'' will log the reason why maps were rejected during world gen in the log.txt file.
 
 
 
;<nowiki>[GRAZE_COEFFICIENT:100]</nowiki>
 
:???
 
 
 
=== Adventure Mode ===
 
*[MORE:YES]
 
*[DISPLAY_LENGTH:23]
 
*[ADVENTURER_TRAPS:NO]
 
If you set this to "YES" your adventurer will trigger the traps of your old fortresses.
 
*[ADVENTURER_ALWAYS_CENTER:YES]
 
*[ADVENTURER_Z_VIEWS:UNHIDDEN:9]
 
 
 
=== Nicknames ===
 
*[NICKNAME_DWARF:REPLACE_FIRST]
 
*[NICKNAME_ADVENTURE:REPLACE_FIRST]
 
*[NICKNAME_LEGENDS:REPLACE_FIRST]
 
 
 
=== Embark Options ===
 
*[EMBARK_WARNING_ALWAYS:NO]
 
If this value is YES, then it will always pop up a warning screen when you embark (Like you get when you have [[DF2012:Water#Salt Water|Salt Water]] or an [[DF2012:Aquifer|Aquifer]] on-site)
 
*[SHOW_EMBARK_TUNNEL:FINDER]
 
*[EMBARK_RECTANGLE:4:4]
 
The size of the default embark site.
 
 
 
=== Wounds ===
 
*[WOUND_COLOR_NONE:7:0:1]
 
The color of body parts when there are no recorded active wounds on the part.
 
Default = white
 
 
 
*[WOUND_COLOR_MINOR:6:0:0]
 
The color of body parts when there is any damage that doesn't have functional/structural consequences (might be heavy bleeding though).
 
Default = brown
 
 
 
*[WOUND_COLOR_INHIBITED:6:0:1]
 
The color of body parts when there is any muscular, structural or functional damage without total loss.
 
Default = yellow
 
 
 
*[WOUND_COLOR_FUNCTION_LOSS:3:0:1]
 
The color of body parts when an important function of the part is completely lost, but the part is structurally sound (or at least partially intact).
 
Default = bright cyan
 
 
 
*[WOUND_COLOR_BROKEN:4:0:1]
 
The color of body parts when the part has lost all structural integrity or muscular ability.
 
Default = bright red
 
 
 
*[WOUND_COLOR_MISSING:0:0:1]
 
The color of body parts when the part is completely gone.
 
Default = dark gray
 
 
 
=== Tiles ===
 
 
 
*[SKY:178:3:0:0]
 
The tile and color of areas that are far below the currently displayed z level.
 
The format is SKY:<character>:<foreground color>:<background color>:<brightness>. <character> can be either an ASCII number or a character in single quotes, like '#'.
 
 
 
*[CHASM:250:0:0:1]
 
The tile and color of areas that are far below the currently displayed z level while indoors.
 
The format is the same as for SKY above.
 
 
 
*[PILLAR_TILE:'O']
 
The tile displayed for pillars. Pillars are created at the ends of strings of wall tiles. Some [[tilesets]] may have been designed to use tile 9, 10, or 255 for this, even some that are primarily ASCII, and may or may not include a custom d_init.txt file to do so.
 
 
 
*Multiple [TRACK_*] and [TREE_*] lines
 
The tiles displayed for most of the various possible [[track]] or [[tree]] parts. Not all the track tiles can be customized, such as the [[roller]]s or the track stop. By default, the track tiles are followed by an I to have them displayed with inverted colors so that they don't look the same as walls. Some tilesets may have been designed to use tile 9, 10, or 255 for tree trunk pillars, instead of the default 'O'. Note that the TREE_TRUNK_* and TREE_CAP_WALL_* corner tokens use a different naming convention than the other tokens; For example, by default TREE_TRUNK_NW uses tile 201 which is ╔, while TREE_BRANCH_NW uses 217 which is ┘, and TRACK_NW uses 188 (with inverted colors) which is ╝.
 
 
 
*[VARIED_GROUND_TILES:YES]
 
If this is "YES" the ground will be varied randomly using the tiles ,.`'.
 
If this is "NO", only the period will be used for ground tiles.
 
 
 
*[ENGRAVINGS_START_OBSCURED:NO]
 
If this is "YES", all [[engravings]] are displayed initially looking the same, like highlighted smooth walls/floors. Otherwise, they'll be displayed as a tile of one of the things they depict. Either way, a given engraving's behavior can be changed through designation.
 
 
 
*[SHOW_FLOW_AMOUNTS:NO]
 
If "YES" ''Dwarf Fortress'' displays water as numbers from 1-7 indicating [[depth]].
 
 
 
=== Resolution to Grid Ratios ===
 
 
Taken from [http://www.bay12forums.com/smf/index.php?topic=22302.msg241991#msg241991]
 
Taken from [http://www.bay12forums.com/smf/index.php?topic=22302.msg241991#msg241991]
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-

Latest revision as of 06:51, 24 November 2023

This article is about the current version of DF.
Note that some content may still need to be updated.

Dwarf Fortress has various settings that can affect the game experience. You can configure these in Settings accessed from the main menu or Ui Esc.pngEsc menu. However, some settings can only be changed by directly editing the game configuration files, which include:

Locating configuration files[edit]

These configuration files might be found in two places in the install folder:

  • data\init\ - files here contain the default values installed with the game and also may contain some explanations of the settings.
  • prefs\ - files here contain the current values saved by the game.

You can edit the configuration files with any plain text editing software, such as Notepad, Vim, or Emacs.

Most data in these files is in token form. Each token is defined by the text between an opening square bracket, [, and the next closing square bracket, ]. The token identifier and any values are separated by a colons, :.

If anything goes wrong, you can completely reset the game's saved settings by deleting the prefs\ folder while the game is not running, assuming the defaults have not been changed. This does not work with the files in data\init\, so you should make backups of them before modifying them. The game also uses the last occurrence of a token, so you could add your changes after the default values. You could then just remove the leading [ to disable your entries and use the defaults.

d_init.txt[edit]

For settings that can be changed in game see: Settings.

  • [WALKING_SPREADS_SPATTER_ADV:YES] - Still in the files but currently has no effect, of course. Turns on or off the spread of blood spatter and other contaminants between creatures and ground tiles in Adventurer mode.

init.txt[edit]

For settings that can be changed in game see: Settings.

  • [SOUND:YES] - Change the argument from "YES" to "NO" to completely remove sound and music from the game. If this is "NO", it will not be possible to change the volume from the in game options menu.
  • [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.
The game does not save the following font options to /prefs/init.txt; you can add them but they will be removed the next time you exit Settings in game. To make them persistent add them to /data/init/init_default.txt.
  • [FONT:curses_640x300.png] - The font file that Dwarf Fortress uses in windowed mode. These values can be any .bmp or .png image in the /data/art folder.
  • [FULLFONT:curses_800x600.png] - The font file used in fullscreen mode.
  • [BASIC_FONT:curses_640x300.png] - The font used during the initial load sequence and menus.
  • [FPS_CAP:0] - Setting this to zero will cause it to be uncapped, allowing simulation to happen as fast as possible. This may cause the FPS display to show negative numbers when the game is paused and in the main menu.
  • [G_FPS_CAP:0] - Setting this to zero will still use the default of 50 rather than it being uncapped.

Resolution to grid ratios[edit]

Taken from [1]

Geometry Character Size
Resolution Aspect 8x8 12x12 16x16
800x600 4:3 100 x 75 66 x 50 50 x 37
1024x768 4:3 128 x 96 85 x 64 64 x 48
1152x864 4:3 144 x 108 96 x 72 72 x 54
1280x960 4:3 160 x 120 106 x 80 80 x 60
1600x1200 4:3 200 x 150 133 x 100 100 x 75
1280x1024 5:4 160 x 128 106 x 85 80 x 64
1440x900 16:10 180 x 75 135 x 56.25 90 x 37.5
1680x1050 16:10 210 x 131 140 x 87 105 x 65
1920x1080 16:9 240 x 135 160 x 90 120 x 67
1920x1200 16:10 240 x 150 160 x 100 120 x 75