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 DF2014:Mineshaft stitching

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 "DF2014"). 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 1: Line 1:
{{Quality|Exceptional|18:01, 3 February 2018 (UTC)}}
+
#REDIRECT [[Mineshaft stitching]]
{{av}}
 
When using [[Exploratory mining#Mine shafts|mine shafts]], dwarves will prefer to dig all of one level before moving on to the next. This can result in a lot of time spent moving, as miners go up and down mine shafts. If you have a large number of relatively-unskilled miners, this is unlikely to be a problem: digging time will dominate in any case. If you have one or two legendary miners, this is quite annoying. As a solution, you can create a single path that forces the dwarves to finish one shaft before moving on to the next. To do so, connect shafts alternately at the top and bottom layers, so the shaft snakes through the area. For example, the top, middle, and bottom layers could look like:
 
 
 
<pre style="font:bold 20px/1 'Courier New';color:#ccc;background:black;width:auto;padding:5px;float:left">
 
▒▒▒▒▒▒▒▒▒
 
.X▒▒X..X▒
 
▒▒▒▒▒▒▒▒▒
 
▒▒▒▒▒▒▒▒▒
 
▒X..X▒▒X▒
 
▒▒▒▒▒▒▒▒▒
 
 
 
</pre>
 
{{-}}
 
<pre style="font:bold 20px/1 'Courier New';color:#ccc;background:black;width:auto;padding:5px;float:left">
 
▒▒▒▒▒▒▒▒▒
 
▒X▒▒X▒▒X▒
 
▒▒▒▒▒▒▒▒▒
 
▒▒▒▒▒▒▒▒▒
 
▒X▒▒X▒▒X▒
 
▒▒▒▒▒▒▒▒▒
 
</pre>
 
{{-}}
 
<pre style="font:bold 20px/1 'Courier New';color:#ccc;background:black;width:auto;padding:5px;float:left">
 
▒▒▒▒▒▒▒▒▒
 
▒X▒▒X▒▒X▒
 
▒.▒▒.▒▒.▒
 
▒.▒▒.▒▒.▒
 
▒X▒▒X▒▒X▒
 
▒▒▒▒▒▒▒▒▒
 
</pre>
 
{{-}}
 
 
 
 
 
Clearly you can repeat the middle layer as often as you want: I recommend at least 5-10 levels to really make this worthwhile. Note that this pattern creates a very long walkway back to the start of the mineshafts. If you do not excavate routinely, consider connecting the top-level paths of areas you have already explored.
 
 
 
=== AHK script ===
 
An AHK script to construct such a pattern is provided below, based on [[User:StrawberryBunny/Mineshaft.ahk|this script]], but using many fewer keystrokes, constructing only necessary stairs at the top and bottom, and capable of being cancelled at any time.
 
 
 
In the previous version of DF, there was an alternate version [[User:Jondan/stitch.ahk|here]]. It has not been tested for 2010, but there is no reason it shouldn't work.
 
 
 
<pre>
 
 
 
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
; stitching.ahk   ;
 
; this is an ahk script to place exploratory mine shafts. ;
 
; press d and place the cursor   ;
 
; in the top left corner of the area to be explored   ;
 
;                ;
 
; Alt+Shift+c to change parameters   ;
 
; Alt+Shift+s to run           ;
 
; Ctrl+c cancel anytime   ;
 
;   ;
 
; NOTE:           ;
 
; Author: Seth Fogarty           ;
 
; Based on a script by StrawberryBunny   ;
 
; Bug fix from Corey Amend   ;
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 
 
x = 4
 
y = 4
 
depth = 3
 
wait =  100
 
spacing = 1
 
 
 
DropShaft(vertdir, depth, wait)
 
{
 
        if (vertdir = ">")
 
{
 
Send j
 
}
 
else
 
{
 
Send u
 
}
 
Send {Enter 2}i
 
tmp := depth -1
 
Loop %tmp%
 
{
 
Send %vertdir%{Enter 2}
 
Sleep %wait%
 
}
 
        if (vertdir = ">")
 
{
 
Send %vertdir%u{Enter 2}
 
}
 
else
 
{
 
Send %vertdir%j{Enter 2}
 
}
 
}
 
 
 
$+!c::
 
inputbox x, Input Length, Vertical pattern length: x-axis
 
inputbox y, Input Width, Horizontal pattern width: y-axis
 
inputbox depth, Input Depth, Mineshaft depth: z-axis
 
inputbox spacing, Input Spacing, Spacing multiplier (1 for complete visiblity)
 
inputbox wait, Input Delay, Delay in miliseconds (100 recommended)
 
return
 
 
 
$^c::
 
  Critical
 
  ExitApp
 
  return
 
 
 
$+!s::
 
shafts := (x * y) -1
 
vdir = >
 
i := x-1
 
hdir = {Down}
 
next = {Up}
 
 
 
Loop %shafts%
 
{
 
DropShaft(vdir, depth, wait)
 
        if (vdir = ">")
 
{
 
vdir = <
 
}
 
else
 
{
 
vdir = >
 
}
 
k := spacing-1
 
Send d%hdir%{Enter}
 
Loop %k%
 
{
 
Send %hdir%{Enter}%hdir%{Enter}%hdir%
 
Sleep %wait%
 
}
 
Send %hdir%{Enter}%hdir%
 
Sleep %wait%
 
i--
 
if (i = 0)
 
{
 
if (hdir = "{Down}")
 
{
 
hdir = {Right}
 
next = {Up}
 
i=1
 
}
 
else if (hdir = "{Right}")
 
{
 
hdir = %next%
 
i := x-1
 
}
 
else if (hdir = "{Up}")
 
{
 
hdir = {Right}
 
next = {Down}
 
i=1
 
}
 
}
 
}
 
DropShaft(vdir, depth, wait)
 
if (vdir = ">")
 
{
 
Loop %depth%
 
{
 
Send <
 
}
 
}
 
return
 
 
 
 
 
 
 
</pre>
 
 
 
[[Category:Ahk scripts]]
 
[[Category:Guides]]
 

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)

This page is a member of 1 hidden category: