summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordangersalad2020-03-12 18:19:05 -0600
committerdangersalad2020-03-12 18:19:05 -0600
commitf7ad1a9d7a017c71cbfe7dd9d2b4ee5394ece721 (patch)
treee25e45edc30a97b8d61fed04f0b51a7144b35581
parenta51b22dfc4d59b7c5d606e7e78426e5a65c7c464 (diff)
downloadaur-f7ad1a9d7a017c71cbfe7dd9d2b4ee5394ece721.tar.gz
include twbt and configs/graphics/text
-rw-r--r--PKGBUILD119
-rw-r--r--colors.txt48
-rw-r--r--colors_autumn.txt16
-rw-r--r--colors_spring.txt16
-rw-r--r--colors_summer.txt16
-rw-r--r--colors_winter.txt16
-rw-r--r--d_init.txt312
-rw-r--r--dfhack-run.sh45
-rw-r--r--dfhack.init303
-rw-r--r--dfhack.sh45
-rw-r--r--init.txt150
11 files changed, 1023 insertions, 63 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e0af5a766e81..f74ca61c35a6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,59 +1,116 @@
-# Maintainer: Christian Krause ("wookietreiber") <christian.krause@mailbox.org>
-# Maintainer: Alberto Ronzani ("albron") <alberto.ronzani@gmail.com>
+# Maintainer: Paul Davis ("dangersalad") <paul is located at dangersalad and it's a dot com>
# shellcheck disable=2034
# shellcheck disable=2148
-pkgname=dfhack
-pkgver=0.47.03
-_pkgver=$pkgver-beta1
-pkgrel=1
+pkgname=dfhack-twbt
+pkgver=0.47.04
+_pkgver=$pkgver-alpha0
+_twbtver=v6.61
+pkgrel=7
pkgdesc="memory hacking library for Dwarf Fortress and a set of tools that use it"
arch=('x86_64' 'i686')
url="https://dfhack.readthedocs.io/en/stable/"
license=('custom')
depends=("dwarffortress=$pkgver" lua protobuf libpng12 libxrandr libjpeg6 freetype2 libglvnd libxcursor libxinerama)
makedepends=('cmake' 'git' 'python-sphinx' 'perl-xml-libxml' 'perl-xml-libxslt')
-conflicts=('dfhack-bin' 'dfhack-git')
+conflicts=('dfhack-bin' 'dfhack-git' 'dfhack-twbt-bin')
-source=("$pkgname::git+https://github.com/DFHack/dfhack#tag=$_pkgver"
+source=("dfhack::git+https://github.com/DFHack/dfhack#tag=$_pkgver"
+ "twbt::git+https://github.com/thurin/df-twbt#branch=04704"
dfhack.sh
- dfhack-run.sh)
+ dfhack-run.sh
+ colors.txt
+ colors_spring.txt
+ colors_summer.txt
+ colors_autumn.txt
+ colors_winter.txt
+ init.txt
+ d_init.txt
+ dfhack.init
+ "graphics.png::https://dwarffortresswiki.org/images/1/11/Bisasam_20x20_mod_T.png"
+ "text.png::https://dwarffortresswiki.org/images/a/a6/Cooz_curses_square_16x16.png")
md5sums=('SKIP'
- '81f5909c1a32391679f968e40f24d5ca'
- '3853c6f890d3541f710f2c4833a9e696')
+ 'SKIP'
+ 'e74365253ca67a65c49999e5897faa84'
+ '0dcc9284c4e52e02e249df23a79c9349'
+ 'ea2a6ea0f4bfc479fc19d4cc5e27647b'
+ '676417a93ddb35ca31d430f69066285c'
+ 'bd3c49d125291f9658ca409d9db2d49e'
+ '8e039b9ab32a687572c417a13661ae3d'
+ '677edee445fc58036064f11c4294b91f'
+ 'e8bfabc5fe1810fd3a1c91504dce7ee6'
+ '872b709e986d831713812d83f41e1664'
+ 'b72dd69e286287daebb02d748d9c171d'
+ 'f205514b69112b8e69cef8984b3eb886'
+ 'f87b8aab62ecb7edf4fd6f2b1c008a3d')
prepare() {
- # shellcheck disable=2154
- cd "$srcdir"/$pkgname || exit 1
+ # shellcheck disable=2154
+ cd "$srcdir"/dfhack || exit 1
- git remote set-url origin https://github.com/DFHack/dfhack
- git submodule sync
- git submodule update --init
+ git remote set-url origin https://github.com/DFHack/dfhack
+ git submodule sync
+ git submodule update --init
}
build() {
- cd "$srcdir"/$pkgname/build || exit 1
+ cd "$srcdir"/dfhack/build || exit 1
- cmake \
- -DCMAKE_INSTALL_PREFIX=/opt/dwarffortress \
- -DCMAKE_BUILD_TYPE=Release \
- -DBUILD_DOCS=ON \
- -DBUILD_STONESENSE=ON \
- -DDFHACK_BUILD_ARCH=64 \
- ..
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/opt/dwarffortress \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_DOCS=ON \
+ -DBUILD_STONESENSE=OFF \
+ -DDFHACK_BUILD_ARCH=64 \
+ ..
- make
+ make -j14
+
+ cd "$srcdir"/twbt || exit 1
+
+ make -j14 DFHACKVER="$_pkgver" DF=/opt/dwarffortress DH="$srcdir"/dfhack
+
}
package() {
- cd "$srcdir"/$pkgname/build || exit 1
+ cd "$srcdir"/dfhack/build || exit 1
+
+ # shellcheck disable=2154
+ make DESTDIR="$pkgdir" install
+
+ install -Dm755 "$srcdir"/dfhack.sh "$pkgdir"/usr/bin/dfhack
+ install -Dm755 "$srcdir"/dfhack-run.sh "$pkgdir"/usr/bin/dfhack-run
- # shellcheck disable=2154
- make DESTDIR="$pkgdir" install
+ install -Dm644 ../LICENSE.rst "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+ cd "$srcdir"/twbt || exit 1
- install -Dm755 "$srcdir"/dfhack.sh "$pkgdir"/usr/bin/dfhack
- install -Dm755 "$srcdir"/dfhack-run.sh "$pkgdir"/usr/bin/dfhack-run
+ mkdir -p "$pkgdir/opt/dwarffortress/hack/plugins"
+
+ make DFHACKVER="$_pkgver" DF="$pkgdir/opt/dwarffortress" DH="$srcdir"/dfhack inst
- install -Dm644 ../LICENSE.rst "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -Dm755 "$srcdir/dfhack.init" "$pkgdir/opt/dwarffortress/dfhack.init"
+ install -Dm755 dist/shadows.png "$pkgdir/opt/dwarffortress/data/art/shadows.png"
+ install -Dm755 dist/white1px.png "$pkgdir/opt/dwarffortress/data/art/white1px.png"
+ install -Dm755 dist/transparent1px.png "$pkgdir/opt/dwarffortress/data/art/transparent1px.png"
+ install -Dm755 dist/overrides.txt "$pkgdir/opt/dwarffortress/data/init/overrides.txt"
+
+ mkdir -p "$pkgdir/opt/dwarffortress/data/init"
+
+ install -Dm755 "$srcdir/init.txt" "$pkgdir/opt/dwarffortress/data/init/init.custom.txt"
+ install -Dm755 "$srcdir/d_init.txt" "$pkgdir/opt/dwarffortress/data/init/d_init.custom.txt"
+
+ mkdir -p "$pkgdir/opt/dwarffortress/data/art"
+
+ install -Dm755 "$srcdir/graphics.png" "$pkgdir/opt/dwarffortress/data/art/graphics.png"
+ install -Dm755 "$srcdir/text.png" "$pkgdir/opt/dwarffortress/data/art/text.png"
+
+ mkdir -p "$pkgdir/opt/dwarffortress/raw"
+
+ install -Dm755 "$srcdir/colors.txt" "$pkgdir/opt/dwarffortress/raw/colors.txt"
+ install -Dm755 "$srcdir/colors_spring.txt" "$pkgdir/opt/dwarffortress/raw/colors_spring.txt"
+ install -Dm755 "$srcdir/colors_summer.txt" "$pkgdir/opt/dwarffortress/raw/colors_summer.txt"
+ install -Dm755 "$srcdir/colors_autumn.txt" "$pkgdir/opt/dwarffortress/raw/colors_autumn.txt"
+ install -Dm755 "$srcdir/colors_winter.txt" "$pkgdir/opt/dwarffortress/raw/colors_winter.txt"
}
diff --git a/colors.txt b/colors.txt
new file mode 100644
index 000000000000..15f7b2df2308
--- /dev/null
+++ b/colors.txt
@@ -0,0 +1,48 @@
+[BLACK_R:32]
+[BLACK_G:39]
+[BLACK_B:49]
+[BLUE_R:0]
+[BLUE_G:106]
+[BLUE_B:255]
+[GREEN_R:68]
+[GREEN_G:184]
+[GREEN_B:57]
+[CYAN_R:114]
+[CYAN_G:156]
+[CYAN_B:251]
+[RED_R:212]
+[RED_G:54]
+[RED_B:85]
+[MAGENTA_R:176]
+[MAGENTA_G:50]
+[MAGENTA_B:255]
+[BROWN_R:217]
+[BROWN_G:118]
+[BROWN_B:65]
+[LGRAY_R:170]
+[LGRAY_G:196]
+[LGRAY_B:178]
+[DGRAY_R:128]
+[DGRAY_G:151]
+[DGRAY_B:156]
+[LBLUE_R:48]
+[LBLUE_G:165]
+[LBLUE_B:255]
+[LGREEN_R:144]
+[LGREEN_G:255]
+[LGREEN_B:79]
+[LCYAN_R:168]
+[LCYAN_G:212]
+[LCYAN_B:255]
+[LRED_R:255]
+[LRED_G:82]
+[LRED_B:82]
+[LMAGENTA_R:255]
+[LMAGENTA_G:107]
+[LMAGENTA_B:255]
+[YELLOW_R:255]
+[YELLOW_G:232]
+[YELLOW_B:102]
+[WHITE_R:255]
+[WHITE_G:250]
+[WHITE_B:232] \ No newline at end of file
diff --git a/colors_autumn.txt b/colors_autumn.txt
new file mode 100644
index 000000000000..5a07a45825b6
--- /dev/null
+++ b/colors_autumn.txt
@@ -0,0 +1,16 @@
+[BLACK_R:0] [BLACK_G:0] [BLACK_B:0]
+[BLUE_R:0] [BLUE_G:64] [BLUE_B:128]
+[GREEN_R:128] [GREEN_G:128] [GREEN_B:0]
+[CYAN_R:64] [CYAN_G:128] [CYAN_B:128]
+[RED_R:128] [RED_G:64] [RED_B:0]
+[MAGENTA_R:128] [MAGENTA_G:0] [MAGENTA_B:128]
+[BROWN_R:192] [BROWN_G:64] [BROWN_B:0]
+[LGRAY_R:192] [LGRAY_G:192] [LGRAY_B:192]
+[DGRAY_R:128] [DGRAY_G:128] [DGRAY_B:128]
+[LBLUE_R:0] [LBLUE_G:128] [LBLUE_B:192]
+[LGREEN_R:192] [LGREEN_G:255] [LGREEN_B:0]
+[LCYAN_R:64] [LCYAN_G:192] [LCYAN_B:192]
+[LRED_R:255] [LRED_G:64] [LRED_B:0]
+[LMAGENTA_R:192] [LMAGENTA_G:0] [LMAGENTA_B:255]
+[YELLOW_R:255] [YELLOW_G:192] [YELLOW_B:0]
+[WHITE_R:255] [WHITE_G:255] [WHITE_B:255] \ No newline at end of file
diff --git a/colors_spring.txt b/colors_spring.txt
new file mode 100644
index 000000000000..2f29652e6977
--- /dev/null
+++ b/colors_spring.txt
@@ -0,0 +1,16 @@
+[BLACK_R:0] [BLACK_G:0] [BLACK_B:0]
+[BLUE_R:0] [BLUE_G:64] [BLUE_B:192]
+[GREEN_R:0] [GREEN_G:192] [GREEN_B:64]
+[CYAN_R:64] [CYAN_G:192] [CYAN_B:192]
+[RED_R:192] [RED_G:0] [RED_B:64]
+[MAGENTA_R:192] [MAGENTA_G:0] [MAGENTA_B:128]
+[BROWN_R:255] [BROWN_G:128] [BROWN_B:64]
+[LGRAY_R:192] [LGRAY_G:192] [LGRAY_B:192]
+[DGRAY_R:128] [DGRAY_G:128] [DGRAY_B:128]
+[LBLUE_R:0] [LBLUE_G:128] [LBLUE_B:255]
+[LGREEN_R:192] [LGREEN_G:255] [LGREEN_B:192]
+[LCYAN_R:128] [LCYAN_G:255] [LCYAN_B:255]
+[LRED_R:255] [LRED_G:64] [LRED_B:64]
+[LMAGENTA_R:255] [LMAGENTA_G:128] [LMAGENTA_B:255]
+[YELLOW_R:255] [YELLOW_G:255] [YELLOW_B:64]
+[WHITE_R:255] [WHITE_G:255] [WHITE_B:255] \ No newline at end of file
diff --git a/colors_summer.txt b/colors_summer.txt
new file mode 100644
index 000000000000..b4efeffd5a4c
--- /dev/null
+++ b/colors_summer.txt
@@ -0,0 +1,16 @@
+[BLACK_R:0] [BLACK_G:0] [BLACK_B:0]
+[BLUE_R:0] [BLUE_G:0] [BLUE_B:192]
+[GREEN_R:0] [GREEN_G:128] [GREEN_B:0]
+[CYAN_R:0] [CYAN_G:128] [CYAN_B:128]
+[RED_R:128] [RED_G:0] [RED_B:0]
+[MAGENTA_R:128] [MAGENTA_G:0] [MAGENTA_B:128]
+[BROWN_R:192] [BROWN_G:128] [BROWN_B:0]
+[LGRAY_R:192] [LGRAY_G:192] [LGRAY_B:192]
+[DGRAY_R:128] [DGRAY_G:128] [DGRAY_B:128]
+[LBLUE_R:0] [LBLUE_G:64] [LBLUE_B:255]
+[LGREEN_R:64] [LGREEN_G:255] [LGREEN_B:0]
+[LCYAN_R:0] [LCYAN_G:192] [LCYAN_B:255]
+[LRED_R:255] [LRED_G:0] [LRED_B:0]
+[LMAGENTA_R:255] [LMAGENTA_G:0] [LMAGENTA_B:255]
+[YELLOW_R:255] [YELLOW_G:255] [YELLOW_B:0]
+[WHITE_R:255] [WHITE_G:255] [WHITE_B:255] \ No newline at end of file
diff --git a/colors_winter.txt b/colors_winter.txt
new file mode 100644
index 000000000000..778fa546558d
--- /dev/null
+++ b/colors_winter.txt
@@ -0,0 +1,16 @@
+[BLACK_R:0] [BLACK_G:0] [BLACK_B:0]
+[BLUE_R:64] [BLUE_G:64] [BLUE_B:128]
+[GREEN_R:0] [GREEN_G:128] [GREEN_B:128]
+[CYAN_R:64] [CYAN_G:192] [CYAN_B:192]
+[RED_R:128] [RED_G:64] [RED_B:64]
+[MAGENTA_R:128] [MAGENTA_G:64] [MAGENTA_B:128]
+[BROWN_R:128] [BROWN_G:128] [BROWN_B:64]
+[LGRAY_R:192] [LGRAY_G:192] [LGRAY_B:192]
+[DGRAY_R:128] [DGRAY_G:128] [DGRAY_B:128]
+[LBLUE_R:128] [LBLUE_G:128] [LBLUE_B:192]
+[LGREEN_R:0] [LGREEN_G:192] [LGREEN_B:128]
+[LCYAN_R:128] [LCYAN_G:255] [LCYAN_B:255]
+[LRED_R:255] [LRED_G:64] [LRED_B:64]
+[LMAGENTA_R:255] [LMAGENTA_G:64] [LMAGENTA_B:255]
+[YELLOW_R:255] [YELLOW_G:255] [YELLOW_B:128]
+[WHITE_R:255] [WHITE_G:255] [WHITE_B:255] \ No newline at end of file
diff --git a/d_init.txt b/d_init.txt
new file mode 100644
index 000000000000..f22a20e2fb91
--- /dev/null
+++ b/d_init.txt
@@ -0,0 +1,312 @@
+WARNING: Do NOT copy over the d_init.txt from an earlier version of DF.
+Always read the file carefully, including the comments.
+
+In general, you can copy savegames and tilesets from older DF
+versions, but you should not copy anything else. You should not, under any
+circumstances, unpack a new DF on top of an older one.
+
+
+Use these to control the automatic saving behavior in the dwarf fortress mode of game. AUTOSAVE can be set to NONE, SEASONAL or YEARLY. This updates your save at these intervals, so that some of your progress will be saved in case of system instability. You can set AUTOBACKUP to YES if you want the updated save to be copied to another folder so that you'll have several copies of your world at different times. Set AUTOSAVE_PAUSE to YES if you want the game to pause every time it autosaves.
+
+[AUTOSAVE:SEASONAL]
+[AUTOBACKUP:NO]
+[AUTOSAVE_PAUSE:NO]
+
+Set this to YES if you want it to save the game when you start a new fortress. If AUTOBACKUP above is set to YES, it will also create a copy of this new save.
+
+[INITIAL_SAVE:NO]
+
+Set this to NO to make Dwarf Fortress remain in the saved pause state when you load an active game.
+
+[PAUSE_ON_LOAD:YES]
+
+Set this to YES if you want Dwarf Fortress to show the warning window for embark site selection even if there are no issues (as a way of confirming your choice).
+
+[EMBARK_WARNING_ALWAYS:NO]
+
+This option controls whether or not your choice to embark has a confirmation window after you have selected any dwarves and equipment. Valid choices are ALWAYS, IF_POINTS_REMAIN and NO.
+
+[POST_PREPARE_EMBARK_CONFIRMATION:IF_POINTS_REMAIN]
+
+You can change the option below to ALWAYS and NO. More restrictive world parameter settings override these. ALWAYS lets you see the features in the Local view during embark, and NO stops you from looking for features in the site finder (though if you really want to stop the finder, it might be better for you to generate worlds that restrict the use of this feature completely, in which case you don't need to change the settings here).
+
+[SHOW_EMBARK_TUNNEL:FINDER]
+
+Use these options to remove features from the game. Permitted values are YES and NO. Removal might speed the game up in the case of temperature and weather.
+
+[TEMPERATURE:YES]
+[WEATHER:YES]
+[ECONOMY:YES]
+[INVADERS:YES]
+[CAVEINS:YES]
+[ARTIFACTS:YES]
+[ZERO_RENT:NO]
+[TESTING_ARENA:YES]
+[WALKING_SPREADS_SPATTER_DWF:NO]
+[WALKING_SPREADS_SPATTER_ADV:YES]
+
+Change this to YES to output the reasons for world map rejection into a file.
+
+[LOG_MAP_REJECTS:NO]
+
+Change these numbers to make the embark rectangle start at a different size. The format is (EMBARK_RECTANGLE:<width>:<height>). Numbers may run from 2 to 16. The map size warning message will go by these numbers.
+
+[EMBARK_RECTANGLE:4:4]
+
+Change these numbers to set the default weights for traffic designations. If you make the last numbers too large, pathfinding might lag.
+The format is (PATH_COST:<high>:<normal>:<low>:<restricted>).
+
+[PATH_COST:1:2:5:25]
+
+Alter these options to control how aggressively your dwarves place objects in a container with like items (rather than an empty container). The default options are very aggressive. STORE_DIST_ITEM_DECREASE controls the cap on objects it will consider -- for each object it finds in a container, one tile is removed from its apparent distance to the dwarf, up to this cap. The others control how many tiles are removed for each combination type for any match at all. For instance, if ITEM_DECREASE is set to 20, and SEED_COMBINE is set to 100, a dwarf carrying seeds will see a seed bag with 15 seeds as 115 tiles closer than it actually is (and thus pass up any empties within that distance), whereas a seed bag with 30 seeds would be treated as 120 tiles closer (because it hits the ITEM_DECREASE cap). Values from 2 to 1000 are permitted. Before these init options, the behavior was roughly ITEM_DECREASE 2, SEED_COMBINE 2 and the rest at 1000.
+
+[STORE_DIST_ITEM_DECREASE:20]
+[STORE_DIST_SEED_COMBINE:1000]
+[STORE_DIST_BUCKET_COMBINE:1000]
+[STORE_DIST_BARREL_COMBINE:1000]
+[STORE_DIST_BIN_COMBINE:1000]
+
+Change this to YES to disallow pets from coffin burial as the default option.
+
+[COFFIN_NO_PETS_DEFAULT:YES]
+
+Use these to set the color of wounded body parts. The format is <foreground color>:<background color>:<brightness>.
+
+[WOUND_COLOR_NONE:7:0:1] No recorded active wounds on the part. Default = white
+[WOUND_COLOR_MINOR:6:0:0] Any damage that doesn't have functional/structural consequences (might be heavy bleeding though). Default = brown
+[WOUND_COLOR_INHIBITED:6:0:1] Any muscular, structural or functional damage without total loss. Default = yellow
+[WOUND_COLOR_FUNCTION_LOSS:3:0:1] 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 part has lost all structural integrity or muscular ability. Default = bright red
+[WOUND_COLOR_MISSING:0:0:1] The part is completely gone. Default = dark gray
+
+This controls the display of areas that are far below outside. The format is SKY:<character>:<foreground color>:<background color>:<brightness>. The <character> can be either an ASCII tile number or a character in quotes, like '#'.
+
+[SKY:178:3:0:0]
+
+As above, for inside/subterranean areas.
+
+[CHASM:250:0:0:1]
+
+Pillar tile, <character> as above.
+
+[PILLAR_TILE:'O']
+
+Track tiles. I at the end inverts the material colors.
+
+[TRACK_N:208I]
+[TRACK_S:210I]
+[TRACK_E:198I]
+[TRACK_W:181I]
+[TRACK_NS:186I]
+[TRACK_NE:200I]
+[TRACK_NW:188I]
+[TRACK_SE:201I]
+[TRACK_SW:187I]
+[TRACK_EW:205I]
+[TRACK_NSE:204I]
+[TRACK_NSW:185I]
+[TRACK_NEW:202I]
+[TRACK_SEW:203I]
+[TRACK_NSEW:206I]
+[TRACK_RAMP_N:30I]
+[TRACK_RAMP_S:30I]
+[TRACK_RAMP_E:30I]
+[TRACK_RAMP_W:30I]
+[TRACK_RAMP_NS:30I]
+[TRACK_RAMP_NE:30I]
+[TRACK_RAMP_NW:30I]
+[TRACK_RAMP_SE:30I]
+[TRACK_RAMP_SW:30I]
+[TRACK_RAMP_EW:30I]
+[TRACK_RAMP_NSE:30I]
+[TRACK_RAMP_NSW:30I]
+[TRACK_RAMP_NEW:30I]
+[TRACK_RAMP_SEW:30I]
+[TRACK_RAMP_NSEW:30I]
+
+Tiles for the parts of trees.
+
+[TREE_ROOT_SLOPING:127]
+[TREE_TRUNK_SLOPING:127]
+[TREE_ROOT_SLOPING_DEAD:127]
+[TREE_TRUNK_SLOPING_DEAD:127]
+[TREE_ROOTS:172]
+[TREE_ROOTS_DEAD:172]
+[TREE_BRANCHES:172]
+[TREE_BRANCHES_DEAD:172]
+[TREE_SMOOTH_BRANCHES:'#']
+[TREE_SMOOTH_BRANCHES_DEAD:'#']
+[TREE_TRUNK_PILLAR:'O']
+[TREE_TRUNK_PILLAR_DEAD:'O']
+[TREE_CAP_PILLAR:'O']
+[TREE_CAP_PILLAR_DEAD:'O']
+[TREE_TRUNK_N:205]
+[TREE_TRUNK_S:205]
+[TREE_TRUNK_N_DEAD:205]
+[TREE_TRUNK_S_DEAD:205]
+[TREE_TRUNK_EW:205]
+[TREE_TRUNK_EW_DEAD:205]
+[TREE_CAP_WALL_N:205]
+[TREE_CAP_WALL_S:205]
+[TREE_CAP_WALL_N_DEAD:205]
+[TREE_CAP_WALL_S_DEAD:205]
+[TREE_TRUNK_E:186]
+[TREE_TRUNK_W:186]
+[TREE_TRUNK_E_DEAD:186]
+[TREE_TRUNK_W_DEAD:186]
+[TREE_TRUNK_NS:186]
+[TREE_TRUNK_NS_DEAD:186]
+[TREE_CAP_WALL_E:186]
+[TREE_CAP_WALL_W:186]
+[TREE_CAP_WALL_E_DEAD:186]
+[TREE_CAP_WALL_W_DEAD:186]
+[TREE_TRUNK_NW:201]
+[TREE_CAP_WALL_NW:201]
+[TREE_TRUNK_NW_DEAD:201]
+[TREE_CAP_WALL_NW_DEAD:201]
+[TREE_TRUNK_NE:187]
+[TREE_CAP_WALL_NE:187]
+[TREE_TRUNK_NE_DEAD:187]
+[TREE_CAP_WALL_NE_DEAD:187]
+[TREE_TRUNK_SW:200]
+[TREE_CAP_WALL_SW:200]
+[TREE_TRUNK_SW_DEAD:200]
+[TREE_CAP_WALL_SW_DEAD:200]
+[TREE_TRUNK_SE:188]
+[TREE_CAP_WALL_SE:188]
+[TREE_TRUNK_SE_DEAD:188]
+[TREE_CAP_WALL_SE_DEAD:188]
+[TREE_TRUNK_NSE:204]
+[TREE_TRUNK_NSE_DEAD:204]
+[TREE_TRUNK_NSW:185]
+[TREE_TRUNK_NSW_DEAD:185]
+[TREE_TRUNK_NEW:202]
+[TREE_TRUNK_NEW_DEAD:202]
+[TREE_TRUNK_SEW:203]
+[TREE_TRUNK_SEW_DEAD:203]
+[TREE_TRUNK_NSEW:206]
+[TREE_TRUNK_NSEW_DEAD:206]
+[TREE_TRUNK_BRANCH_N:207]
+[TREE_TRUNK_BRANCH_N_DEAD:207]
+[TREE_TRUNK_BRANCH_S:209]
+[TREE_TRUNK_BRANCH_S_DEAD:209]
+[TREE_TRUNK_BRANCH_E:199]
+[TREE_TRUNK_BRANCH_E_DEAD:199]
+[TREE_TRUNK_BRANCH_W:182]
+[TREE_TRUNK_BRANCH_W_DEAD:182]
+[TREE_BRANCH_NS:179]
+[TREE_BRANCH_NS_DEAD:179]
+[TREE_BRANCH_EW:196]
+[TREE_BRANCH_EW_DEAD:196]
+[TREE_BRANCH_NW:217]
+[TREE_BRANCH_NW_DEAD:217]
+[TREE_BRANCH_NE:192]
+[TREE_BRANCH_NE_DEAD:192]
+[TREE_BRANCH_SW:191]
+[TREE_BRANCH_SW_DEAD:191]
+[TREE_BRANCH_SE:218]
+[TREE_BRANCH_SE_DEAD:218]
+[TREE_BRANCH_NSE:195]
+[TREE_BRANCH_NSE_DEAD:195]
+[TREE_BRANCH_NSW:180]
+[TREE_BRANCH_NSW_DEAD:180]
+[TREE_BRANCH_NEW:193]
+[TREE_BRANCH_NEW_DEAD:193]
+[TREE_BRANCH_SEW:194]
+[TREE_BRANCH_SEW_DEAD:194]
+[TREE_BRANCH_NSEW:197]
+[TREE_BRANCH_NSEW_DEAD:197]
+[TREE_TWIGS:';']
+[TREE_TWIGS_DEAD:';']
+[TREE_CAP_RAMP:30]
+[TREE_CAP_RAMP_DEAD:30]
+[TREE_CAP_FLOOR1:249]
+[TREE_CAP_FLOOR2:249]
+[TREE_CAP_FLOOR1_DEAD:249]
+[TREE_CAP_FLOOR2_DEAD:249]
+[TREE_CAP_FLOOR3:249]
+[TREE_CAP_FLOOR4:249]
+[TREE_CAP_FLOOR3_DEAD:249]
+[TREE_CAP_FLOOR4_DEAD:249]
+[TREE_TRUNK_INTERIOR:10]
+[TREE_TRUNK_INTERIOR_DEAD:10]
+
+This controls the "IDLERS: <number>" that is displayed in dwarf mode. You can set it to TOP, BOTTOM or OFF.
+
+[IDLERS:TOP]
+
+You can have your dwarves start/arrive without any labor types enabled here by setting this to NO. You can also set it to SKILLS to make the labor list set by skill, or BY_UNIT_TYPE to have it done by overall unit type.
+
+[SET_LABOR_LISTS:SKILLS]
+
+You can set the maximum population of your fortress here. Keep in mind that your population must be at least 80 to get a king and 100 to obtain the current game features. The strict cap also stops fort births. Both caps can be violated by a few special cases, like the arrival of the monarch if you qualify.
+
+[POPULATION_CAP:20]
+[STRICT_POPULATION_CAP:21]
+
+This allows you to control the number of babies+children in your fortress. The first number is an absolute cap on the number of babies+children. The second is a percentage of the current number of adults in your fortress (the default is the essentially meaningless 1000% here). The lower number is used as the cap. The cap only prevents further pregnancies, so migrant children, multiple births and existing pregnancies from old saves can still push you over the cap. Setting either number to zero will disallow pregnancies in the fortress.
+
+[BABY_CHILD_CAP:5:10]
+
+You can set the maximum number of visitors to your fort here. This does not include merchants, diplomats, animals or invaders, but only those either dropping by for a temporary visit to a tavern, library or temple, or those seeking permanent employment. Once you accept a petition from a visitor to stay at your fort, they no longer count against the cap, even if they never become a full citizen. Certain traveling groups (e.g. quester parties) may also push slightly over the cap.
+
+[VISITOR_CAP:5]
+
+You can set the maximum number of soldiers allowed to invade in serious invasions with these numbers. This doesn't affect smaller raids or mounts, and ambushers and other special units will also ignore the cap. Set INVADERS to NO above if you don't want invaders -- a cap of zero will be ignored here.
+
+[INVASION_SOLDIER_CAP:12]
+[INVASION_MONSTER_CAP:4]
+
+Use the specific seed cap to set the maximum number of seeds of each kind generally allowed in the fortress. Use the fortress seed cap to control the overall number of seeds allowed. Seeds over the global cap will be periodically removed, starting with the oldest and most worthless seeds.
+
+[SPECIFIC_SEED_CAP:200]
+[FORTRESS_SEED_CAP:3000]
+
+If you don't like the ,.`' ground, try setting this to NO. The ground will turn into periods only.
+
+[VARIED_GROUND_TILES:YES]
+
+If you'd like your engravings to start off looking the same (you can toggle them on individual later), set this to YES.
+
+[ENGRAVINGS_START_OBSCURED:YES]
+
+If you get annoyed by seeing items like *<*sword*>* you can
+get rid of the outside ** by setting this to NO.
+
+[SHOW_IMP_QUALITY:YES]
+
+Set this to YES to display fluids as numbers indicating depth.
+
+[SHOW_FLOW_AMOUNTS:NO]
+
+If you'd prefer to leave the history behind every engraving for your adventurers to discover, then set this to NO.
+
+[SHOW_ALL_HISTORY_IN_DWARF_MODE:YES]
+
+This controls "more" in adventure mode. If MORE is set to NO, all announcements will be skipped. DISPLAY_LENGTH controls how many lines are printed before it gives you the "more" prompt.
+
+[MORE:YES]
+[DISPLAY_LENGTH:23]
+
+Set this to NO if you do not want traps to affect you in adventure mode. Cage traps are always disabled for now.
+
+[ADVENTURER_TRAPS:YES]
+
+Set this to NO if you want the game to recenter on your adventurer only when you've gotten close to the edge of the view.
+
+[ADVENTURER_ALWAYS_CENTER:YES]
+
+This controls the up/down views in adventure mode. The first parameter can be OFF, UNHIDDEN, CREATURE or ON. UNHIDDEN makes the view appear when it contains any unhidden square. CREATURE makes the view appear when it contains a creature. The second parameter is the size of the view. It can be 3, 5, 7 or 9. A smaller view lets it stack more of them in the column (3 at size 5, and 5 at size 3).
+
+[ADVENTURER_Z_VIEWS:UNHIDDEN:9]
+
+You can use these to say how nicknames are displayed in each mode
+Options are REPLACE_FIRST, CENTRALIZE (between first and last), REPLACE_ALL
+
+[NICKNAME_DWARF:CENTRALIZE]
+[NICKNAME_ADVENTURE:CENTRALIZE]
+[NICKNAME_LEGENDS:CENTRALIZE]
+
+Set this number to scale how often grazing animals need to eat. Larger numbers mean less food is necessary. Metabolism is always set according to the 3/4ths power of size.
+
+[GRAZE_COEFFICIENT:100]
diff --git a/dfhack-run.sh b/dfhack-run.sh
index 7355a7d58f42..3776e2d445fe 100644
--- a/dfhack-run.sh
+++ b/dfhack-run.sh
@@ -1,32 +1,45 @@
#!/bin/bash
+src_dir="/opt/dwarffortress"
+df_dir="${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress"
+df_conf_dir="${XDG_CONFIG_HOME:-$HOME/.config}/dwarffortress"
+
# check for dwarffortress user directory
-if [[ ! -d ~/.dwarffortress ]] ; then
- mkdir -p ~/.dwarffortress/data
+if [[ ! -d ${df_dir} ]] ; then
+ mkdir -p ${df_dir}/data
+ mkdir -p ${df_conf_dir}/data
- ln -s /opt/dwarffortress/raw ~/.dwarffortress/raw
- ln -s /opt/dwarffortress/libs ~/.dwarffortress/libs
- cp -rn /opt/dwarffortress/data/init ~/.dwarffortress/data/init
+ ln -s "${src_dir}/raw" "${df_dir}/raw"
+ ln -s "${src_dir}/libs" "${df_dir}/libs"
+ cp -rn "${src_dir}/data/init" "${df_conf_dir}/data/init"
+ ln -s "${df_conf_dir}/data/init" "${df_dir}/data/init"
for link in announcement art dipscript help index initial_movies movies shader.fs shader.vs sound speech ; do
- cp -r /opt/dwarffortress/data/$link ~/.dwarffortress/data/$link
+ cp -r "${src_dir}/data/$link" "${df_conf_dir}/data/$link"
+ ln -s "${df_conf_dir}/data/$link" "${df_dir}/data/$link"
done
+
+ cp -a "${src_dir}/data/init/init.custom.txt" "${df_conf_dir}/data/init/init.txt"
+ cp -a "${src_dir}/data/init/d_init.custom.txt" "${df_conf_dir}/data/init/d_init.txt"
+
fi
# check for dfhack user directory
-if [[ ! -d ~/.dwarffortress/hack ]] ; then
- ln -s /opt/dwarffortress/hack ~/.dwarffortress/hack
- ln -s /opt/dwarffortress/stonesense ~/.dwarffortress/stonesense
- ln -s /opt/dwarffortress/dfhack ~/.dwarffortress/dfhack
- ln -s /opt/dwarffortress/dfhack-run ~/.dwarffortress/dfhack-run
- ln -s /opt/dwarffortress/dfhack.init-example ~/.dwarffortress/dfhack.init-example
- cp -r /opt/dwarffortress/dfhack-config ~/.dwarffortress/dfhack-config
-
- cp ~/.dwarffortress/dfhack.init{-example,}
+if [[ ! -d ${df_dir}/hack ]] ; then
+ ln -s "${src_dir}/hack" "${df_dir}/hack"
+ ln -s "${src_dir}/stonesense" "${df_dir}/stonesense"
+ ln -s "${src_dir}/dfhack" "${df_dir}/dfhack"
+ ln -s "${src_dir}/dfhack-run" "${df_dir}/dfhack-run"
+ ln -s "${src_dir}/dfhack.init-example" "${df_dir}/dfhack.init-example"
+ cp -r "${src_dir}/dfhack-config" "${df_conf_dir}/dfhack-config"
+ ln -s "${df_conf_dir}/dfhack-config" "${df_dir}/dfhack-config"
+
+ cp "${src_dir}/dfhack.init" "${df_conf_dir}/dfhack.init"
+ ln -s "${df_conf_dir}/dfhack.init" "${df_dir}/dfhack.init"
fi
# workaround for bug in Debian/Ubuntu SDL patch
export SDL_DISABLE_LOCK_KEYS=1
-cd ~/.dwarffortress
+cd ${df_dir}
exec ./dfhack-run "$@"
diff --git a/dfhack.init b/dfhack.init
new file mode 100644
index 000000000000..792b03422a46
--- /dev/null
+++ b/dfhack.init
@@ -0,0 +1,303 @@
+##############################
+# Generic dwarfmode bindings #
+##############################
+
+# show all current key bindings
+keybinding add Ctrl-F1 hotkeys
+keybinding add Alt-F1 hotkeys
+
+# toggle the display of water level as 1-7 tiles
+keybinding add Ctrl-W twaterlvl
+
+# with cursor:
+
+# designate the whole vein for digging
+keybinding add Ctrl-V digv
+keybinding add Ctrl-Shift-V "digv x"
+
+# clean the selected tile of blood etc
+keybinding add Ctrl-C spotclean
+
+# destroy items designated for dump in the selected tile
+keybinding add Ctrl-Shift-K autodump-destroy-here
+
+# set the zone or cage under the cursor as the default
+keybinding add Alt-Shift-I@dwarfmode/Zones "zone set"
+
+# with an item selected:
+
+# destroy the selected item
+keybinding add Ctrl-K autodump-destroy-item
+
+# scripts:
+
+# quicksave, only in main dwarfmode screen and menu page
+keybinding add Ctrl-Alt-S@dwarfmode/Default quicksave
+
+# gui/rename script - rename units and buildings
+keybinding add Ctrl-Shift-N gui/rename
+keybinding add Ctrl-Shift-T "gui/rename unit-profession"
+
+# a dfhack prompt in df. Sublime text like.
+keybinding add Ctrl-Shift-P command-prompt
+
+# show information collected by dwarfmonitor
+keybinding add Alt-M@dwarfmode/Default "dwarfmonitor prefs"
+keybinding add Ctrl-F@dwarfmode/Default "dwarfmonitor stats"
+
+# export a Dwarf's preferences screen in BBCode to post to a forum
+keybinding add Ctrl-Shift-F@dwarfmode forum-dwarves
+
+# an in-game init file editor
+keybinding add Alt-S@title gui/settings-manager
+keybinding add Alt-S@dwarfmode/Default gui/settings-manager
+
+# change quantity of manager orders
+keybinding add Alt-Q@jobmanagement/Main gui/manager-quantity
+
+# view combat reports for the selected unit/corpse/spatter
+keybinding add Ctrl-Shift-R view-unit-reports
+
+# view extra unit information
+keybinding add Alt-I@dwarfmode/ViewUnits|unitlist gui/unit-info-viewer
+
+##############################
+# Generic adv mode bindings #
+##############################
+
+keybinding add Ctrl-B@dungeonmode adv-bodyswap
+keybinding add Ctrl-Shift-B@dungeonmode "adv-bodyswap force"
+keybinding add Shift-O@dungeonmode gui/companion-order
+keybinding add Ctrl-T@dungeonmode gui/advfort
+keybinding add Ctrl-A@dungeonmode/ConversationSpeak adv-rumors
+
+##############################
+# Generic legends bindings #
+##############################
+
+# export all information, or just the detailed maps (doesn't handle site maps)
+keybinding add Ctrl-A@legends "exportlegends all"
+
+#############################
+# Context-specific bindings #
+#############################
+
+# Stocks plugin
+keybinding add Ctrl-Shift-Z@dwarfmode/Default "stocks show"
+
+# open an overview window summarising some stocks (dfstatus)
+keybinding add Ctrl-Shift-I@dwarfmode/Default "gui/dfstatus"
+keybinding add Ctrl-Shift-I@dfhack/lua/dfstatus "gui/dfstatus"
+
+# q->stockpile - copy & paste stockpiles
+keybinding add Alt-P copystock
+
+# q->stockpile - load and save stockpile settings out of game
+keybinding add Alt-L@dwarfmode/QueryBuilding/Some/Stockpile "gui/stockpiles -load"
+keybinding add Alt-S@dwarfmode/QueryBuilding/Some/Stockpile "gui/stockpiles -save"
+
+# q->workshop - duplicate the selected job
+keybinding add Ctrl-D job-duplicate
+
+# materials: q->workshop; b->select items
+keybinding add Shift-A "job-material ALUNITE"
+keybinding add Shift-M "job-material MICROCLINE"
+keybinding add Shift-D "job-material DACITE"
+keybinding add Shift-R "job-material RHYOLITE"
+keybinding add Shift-I "job-material CINNABAR"
+keybinding add Shift-B "job-material COBALTITE"
+keybinding add Shift-O "job-material OBSIDIAN"
+keybinding add Shift-T "job-material ORTHOCLASE"
+keybinding add Shift-G "job-material GLASS_GREEN"
+
+# sort units and items in the on-screen list
+keybinding add Alt-Shift-N "sort-units name" "sort-items description"
+keybinding add Alt-Shift-R "sort-units arrival"
+keybinding add Alt-Shift-T "sort-units profession" "sort-items type material"
+keybinding add Alt-Shift-Q "sort-units squad_position" "sort-items quality"
+
+# browse linked mechanisms
+keybinding add Ctrl-M@dwarfmode/QueryBuilding/Some gui/mechanisms
+
+# browse rooms of same owner
+keybinding add Alt-R@dwarfmode/QueryBuilding/Some gui/room-list
+
+# interface for the liquids plugin - spawn water/magma/obsidian
+keybinding add Alt-L@dwarfmode/LookAround gui/liquids
+
+# machine power sensitive pressure plate construction
+keybinding add Ctrl-Shift-M@dwarfmode/Build/Position/Trap gui/power-meter
+
+# siege engine control
+keybinding add Alt-A@dwarfmode/QueryBuilding/Some/SiegeEngine gui/siege-engine
+
+# military weapon auto-select
+keybinding add Ctrl-W@layer_military/Equip/Customize/View gui/choose-weapons
+
+# military copy uniform
+keybinding add Ctrl-C@layer_military/Uniforms gui/clone-uniform
+
+# minecart Guide path
+keybinding add Alt-P@dwarfmode/Hauling/DefineStop/Cond/Guide gui/guide-path
+
+# workshop job details
+keybinding add Alt-A@dwarfmode/QueryBuilding/Some/Workshop/Job gui/workshop-job
+
+# workflow front-end
+keybinding add Alt-W@dwarfmode/QueryBuilding/Some/Workshop/Job gui/workflow
+keybinding add Alt-W@overallstatus "gui/workflow status"
+# equivalent to the one above when gui/extended-status is enabled
+keybinding add Alt-W@dfhack/lua/status_overlay "gui/workflow status"
+
+# autobutcher front-end
+keybinding add Shift-B@pet/List/Unit "gui/autobutcher"
+
+# assign weapon racks to squads so that they can be used
+keybinding add P@dwarfmode/QueryBuilding/Some/Weaponrack gui/assign-rack
+
+# view pathable tiles from active cursor
+keybinding add Alt-Shift-P@dwarfmode/LookAround gui/pathable
+
+############################
+# UI and game logic tweaks #
+############################
+
+# stabilize the cursor of dwarfmode when switching menus
+tweak stable-cursor
+
+# stop stacked liquid/bar/thread/cloth items from lasting forever
+# if used in reactions that use only a fraction of the dimension.
+# might be fixed by DF
+# tweak fix-dimensions
+
+# make reactions requiring containers usable in advmode - the issue is
+# that the screen asks for those reagents to be selected directly
+tweak advmode-contained
+
+# support Shift-Enter in Trade and Move Goods to Depot screens for faster
+# selection; it selects the current item or stack and scrolls down one line
+tweak fast-trade
+
+# stop the right list in military->positions from resetting to top all the time
+tweak military-stable-assign
+# in same list, color units already assigned to squads in brown & green
+tweak military-color-assigned
+
+# remove inverse dependency of squad training speed on unit list size and use more sparring
+# tweak military-training
+
+# make crafted cloth items wear out with time like in old versions (bug 6003)
+tweak craft-age-wear
+
+# stop adamantine clothing from wearing out (bug 6481)
+#tweak adamantine-cloth-wear
+
+# Add "Select all" and "Deselect all" options to farm plot menus
+tweak farm-plot-select
+
+# Add Shift-Left/Right controls to import agreement screen
+tweak import-priority-category
+
+# Fixes a crash in the work order contition material list (bug 9905).
+tweak condition-material
+
+# Adds an option to clear currently-bound hotkeys
+tweak hotkey-clear
+
+# Allows lowercase letters in embark profile names, and allows exiting the name prompt without saving
+tweak embark-profile-name
+
+# Misc. UI tweaks
+tweak block-labors # Prevents labors that can't be used from being toggled
+tweak burrow-name-cancel
+tweak cage-butcher
+tweak civ-view-agreement
+tweak eggs-fertile
+tweak fps-min
+tweak hide-priority
+tweak kitchen-prefs-all
+tweak kitchen-prefs-empty
+tweak max-wheelbarrow
+tweak shift-8-scroll
+tweak stone-status-all
+tweak title-start-rename
+tweak tradereq-pet-gender
+
+###########################
+# Globally acting plugins #
+###########################
+
+# Display DFHack version on title screen
+enable title-version
+
+# Dwarf Manipulator (simple in-game Dwarf Therapist replacement)
+enable manipulator
+
+# Search tool in various screens (by falconne)
+enable search
+
+# Improved build material selection interface (by falconne)
+enable automaterial
+
+# Other interface improvement tools
+enable \
+ confirm \
+ dwarfmonitor \
+ mousequery \
+ autogems \
+ automelt \
+ autotrade \
+ buildingplan \
+ resume \
+ trackstop \
+ zone \
+ stocks \
+ autochop \
+ stockpiles \
+ season-palette
+#end a line with a backslash to make it continue to the next line. The \ is deleted for the final command.
+# Multiline commands are ONLY supported for scripts like dfhack.init. You cannot do multiline command manually on the DFHack console.
+# You cannot extend a commented line.
+# You can comment out the extension of a line.
+
+# enable mouse controls and sand indicator in embark screen
+embark-tools enable sticky sand mouse
+
+# enable option to enter embark assistant
+enable embark-assistant
+
+###########
+# Scripts #
+###########
+
+# write extra information to the gamelog
+modtools/extra-gamelog enable
+
+# extended status screen (bedrooms page)
+enable gui/extended-status
+
+# add information to item viewscreens
+view-item-info enable
+
+# a replacement for the "load game" screen
+gui/load-screen enable
+
+
+# TWBT
+
+multilevel 6
+multilevel fogdensity 0.5 0.5 1.2
+multilevel fogcolor 0.2 0.2 0.2
+multilevel shadowcolor 0 0 0 0.2
+
+# stats
+dwarfmonitor enable all
+
+
+
+##############################
+# Extra DFHack command files #
+##############################
+
+# Run commands in this file when a world loads
+sc-script add SC_WORLD_LOADED onLoad.init-example
diff --git a/dfhack.sh b/dfhack.sh
index 0acc659db555..5eb14ba3f6f3 100644
--- a/dfhack.sh
+++ b/dfhack.sh
@@ -1,32 +1,45 @@
#!/bin/bash
+src_dir="/opt/dwarffortress"
+df_dir="${XDG_DATA_HOME:-$HOME/.local/share}/dwarffortress"
+df_conf_dir="${XDG_CONFIG_HOME:-$HOME/.config}/dwarffortress"
+
# check for dwarffortress user directory
-if [[ ! -d ~/.dwarffortress ]] ; then
- mkdir -p ~/.dwarffortress/data
+if [[ ! -d ${df_dir} ]] ; then
+ mkdir -p ${df_dir}/data
+ mkdir -p ${df_conf_dir}/data
- ln -s /opt/dwarffortress/raw ~/.dwarffortress/raw
- ln -s /opt/dwarffortress/libs ~/.dwarffortress/libs
- cp -rn /opt/dwarffortress/data/init ~/.dwarffortress/data/init
+ ln -s "${src_dir}/raw" "${df_dir}/raw"
+ ln -s "${src_dir}/libs" "${df_dir}/libs"
+ cp -rn "${src_dir}/data/init" "${df_conf_dir}/data/init"
+ ln -s "${df_conf_dir}/data/init" "${df_dir}/data/init"
for link in announcement art dipscript help index initial_movies movies shader.fs shader.vs sound speech ; do
- cp -r /opt/dwarffortress/data/$link ~/.dwarffortress/data/$link
+ cp -r "${src_dir}/data/$link" "${df_conf_dir}/data/$link"
+ ln -s "${df_conf_dir}/data/$link" "${df_dir}/data/$link"
done
+
+ cp -a "${src_dir}/data/init/init.custom.txt" "${df_conf_dir}/data/init/init.txt"
+ cp -a "${src_dir}/data/init/d_init.custom.txt" "${df_conf_dir}/data/init/d_init.txt"
+
fi
# check for dfhack user directory
-if [[ ! -d ~/.dwarffortress/hack ]] ; then
- ln -s /opt/dwarffortress/hack ~/.dwarffortress/hack
- ln -s /opt/dwarffortress/stonesense ~/.dwarffortress/stonesense
- ln -s /opt/dwarffortress/dfhack ~/.dwarffortress/dfhack
- ln -s /opt/dwarffortress/dfhack-run ~/.dwarffortress/dfhack-run
- ln -s /opt/dwarffortress/dfhack.init-example ~/.dwarffortress/dfhack.init-example
- cp -r /opt/dwarffortress/dfhack-config ~/.dwarffortress/dfhack-config
-
- cp ~/.dwarffortress/dfhack.init{-example,}
+if [[ ! -d ${df_dir}/hack ]] ; then
+ ln -s "${src_dir}/hack" "${df_dir}/hack"
+ ln -s "${src_dir}/stonesense" "${df_dir}/stonesense"
+ ln -s "${src_dir}/dfhack" "${df_dir}/dfhack"
+ ln -s "${src_dir}/dfhack-run" "${df_dir}/dfhack-run"
+ ln -s "${src_dir}/dfhack.init-example" "${df_dir}/dfhack.init-example"
+ cp -r "${src_dir}/dfhack-config" "${df_conf_dir}/dfhack-config"
+ ln -s "${df_conf_dir}/dfhack-config" "${df_dir}/dfhack-config"
+
+ cp "${src_dir}/dfhack.init" "${df_conf_dir}/dfhack.init"
+ ln -s "${df_conf_dir}/dfhack.init" "${df_dir}/dfhack.init"
fi
# workaround for bug in Debian/Ubuntu SDL patch
export SDL_DISABLE_LOCK_KEYS=1
-cd ~/.dwarffortress
+cd ${df_dir}
exec ./dfhack "$@"
diff --git a/init.txt b/init.txt
new file mode 100644
index 000000000000..f3b9707951e0
--- /dev/null
+++ b/init.txt
@@ -0,0 +1,150 @@
+WARNING: Do NOT copy over the init.txt from an earlier version of DF.
+Always read the file carefully, including the comments.
+
+In general, you can copy savegames and tilesets from older DF
+versions, but you should not copy anything else. You should not, under any
+circumstances, unpack a new DF on top of an older one.
+
+
+Change this to turn sound off.
+
+[SOUND:YES]
+
+The sound volume runs from 0 (off) to 255 (full). You can set the volume from the ESC options menu as well.
+
+[VOLUME:255]
+
+Change this to skip the wonderful intro movies.
+
+[INTRO:YES]
+
+This lets you set the starting windowed/fullscreen setting. Can be YES, NO or PROMPT.
+
+[WINDOWED:YES]
+
+This is the size and font for windowed mode. Changing to the 800x600 font might make you happier.
+If set below 256x256 it specifies the grid size instead, with a minimum of 80x25.
+
+[WINDOWEDX:80]
+[WINDOWEDY:25]
+[FONT:text.png]
+
+You may disable window resizing if you wish.
+[RESIZABLE:YES]
+
+Full screen info. The 0s below mean that the game will choose a resolution for you, but you can set it yourself as well.
+
+[FULLSCREENX:0]
+[FULLSCREENY:0]
+[FULLFONT:text.png]
+
+If this is set to NO, tiles will be stretched to fit the screen if there is a resolution mismatch.
+If this is set to YES, the tiles will not be stretched, but rather the game view will be centralized, surrounded by black space. Tiles that are too large will always be compressed rather than running off the screen.
+
+[BLACK_SPACE:YES]
+
+Graphics info, most of it as above. Set GRAPHICS to YES to turn it all on. This will use the "raw/graphics" folder for tile information. Currently this is limited to whatever creature graphics you have downloaded. The game comes with a few pictures to demonstrate. As of March 2018, the Dwarf Fortress Wiki has custom tilesets available at http://dwarffortresswiki.org/index.php/Tileset_repository and creature graphics at http://dwarffortresswiki.org/index.php/Graphics_set_repository.
+
+[GRAPHICS:NO]
+[GRAPHICS_WINDOWEDX:0]
+[GRAPHICS_WINDOWEDY:0]
+[GRAPHICS_FONT:graphics.png]
+[GRAPHICS_FULLSCREENX:0]
+[GRAPHICS_FULLSCREENY:0]
+[GRAPHICS_FULLFONT:graphics.png]
+[GRAPHICS_BLACK_SPACE:YES]
+
+These settings can have a significant impact on frame rate, especially for people that have slow frame rates on the title screen. Available modes are 2D, 2DSW, 2DASYNC, STANDARD, PARTIAL:<number>, ACCUM_BUFFER, FRAME_BUFFER and VBO. The number after PARTIAL refers to how many frames it will redo a printed tile before skipping it, so you might try increasing it a bit if you have flickering when PARTIAL is set. Please note that any of these combinations might cause frame rates to drop significantly or cause unpleasant side effects like flickering.
+
+By and large, 2D should be the most reliable, while STANDARD has a good combination of speed and reliability. However, all 2D modes are normally far slower than even STANDARD, which may be the slowest OpenGL mode.
+
+On a multi-core machine none of this is very likely to matter; stick to 2D.
+
+2DASYNC may be slightly more responsive than 2D on a multi-core machine, but this has recently become doubtful due to improvements to the other modes.
+
+Linux/OS X users may also use PRINT_MODE:TEXT for primitive ncurses output.
+
+[PRINT_MODE:TWBT]
+ Mode examples:
+ PRINT_MODE:2D
+ PRINT_MODE:TEXT
+ PRINT_MODE:FRAME_BUFFER
+ PRINT_MODE:PARTIAL:0
+[SINGLE_BUFFER:NO]
+
+Switches truetype on whenever the vertical tile size is this many pixels or larger. You may also use YES/NO to force it on/off. Turning it off may provide a minor speed boost (using font small enough that it doesn't activate won't).
+
+[TRUETYPE:YES]
+
+Change this to YES to keep the DF window on top of your other windows.
+
+[TOPMOST:NO]
+
+Change this to YES if you want to see an FPS counter at the top left.
+
+[FPS:YES]
+
+Use this to set the maximum frame rate during play. The movies are always capped at 100. A frame in this case is not graphical but related to the movement speed of a creature. A healthy, unencumbered dwarven peasant takes one step every 10 frames.
+
+You may set FPS_CAP to 0 to make it uncapped.
+
+[FPS_CAP:100]
+
+Use this to set the maximum graphical frame refresh rate during play.
+
+[G_FPS_CAP:50]
+
+On cards that support the OpenGL ARB_sync extension, turning this on can improve framerates in GPU overload conditions. It defaults to NO, as many cards that claim to support this will crash if asked to do so.
+
+[ARB_SYNC:NO]
+
+This sets the applications vertical synchronization behavior. Changing this to YES can impact your FPS if your G_FPS is high. ARB_SYNC is a better option, if your system supports it.
+
+[VSYNC:NO]
+
+Change this to NEAREST if you want the texture values to use the nearest pixel without averaging.
+Change this to LINEAR if you want the texture values to be averaged over the adjacent pixels.
+
+[TEXTURE_PARAM:LINEAR]
+
+Change this to make the dwarfort.exe process have a different priority. From highest to lowest, the options are REALTIME, HIGH, ABOVE_NORMAL, NORMAL, BELOW_NORMAL and IDLE.
+
+[PRIORITY:NORMAL]
+
+Use this to set how fast the game zooms. The default corresponds to
+increasing grid size by 10 units each time you zoom.
+
+[ZOOM_SPEED:10]
+
+Change this to NO if you don't want to have the mouse involved at all.
+
+[MOUSE:YES]
+
+Change this to YES if you'd like to use a BMP for the mouse cursor. The image currently lags when the game is lagging however.
+
+[MOUSE_PICTURE:NO]
+
+This controls the number of milliseconds that must pass before a held key sends an initial repeat press to the game. You might need to adjust this.
+
+[KEY_HOLD_MS:250]
+
+This controls the number of milliseconds that must pass before a held key sends a repeat press to the game after the repeat process has begun.
+
+[KEY_REPEAT_MS:150]
+
+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.
+
+[KEY_REPEAT_ACCEL_LIMIT:8]
+[KEY_REPEAT_ACCEL_START:10]
+
+This controls the number of milliseconds between macro instructions.
+
+[MACRO_MS:5]
+
+This controls the number of milliseconds that must pass before input works again after the view recenters on an event in dwarf mode.
+
+[RECENTER_INTERFACE_SHUTDOWN_MS:0]
+
+Change this to NO if you want to leave save uncompressed (you might want to do this if you are experience save corruption).
+
+[COMPRESSED_SAVES:YES]