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:Macros and keymaps

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 1,509: Line 1,509:
 
  ; then use ctrl+shift+s to run   ;
 
  ; then use ctrl+shift+s to run   ;
 
  ; to change parameters, use ctrl+shift+c   ;  
 
  ; to change parameters, use ctrl+shift+c   ;  
  ; Increasing spacing will increase some shafts   ;
+
  ; Increasing spacing will increase some shafts  
; This version resets it's state so that it can be re-run ;
 
; without having to reload the script   ;
 
 
  ;   ;
 
  ;   ;
 
  ; NOTE:           ;
 
  ; NOTE:           ;
  ; Author: Corey Amend   ;
+
  ; Author: Seth Fogarty           ;
; Based on a script by Seth Fogarty,           ;
+
  ; Based on a script by StrawberryBunny   ;
  ; Which was based on a script by StrawberryBunny   ;
 
 
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
Line 1,611: Line 1,608:
 
Send +,
 
Send +,
 
}
 
}
}
 
else
 
{
 
vdir = +.
 
 
}
 
}
return
 
 
</pre>
 
 
===Upstairs Mineshaft Finisher===
 
This script is used to create a series of up staircases in a pattern for use with mineshaft scripts (like the mineshaft stitching above). Most mineshaft scripts use up/down staircases all the way to the bottom, but the lowest z-level will not allow up/down staircases so you mineshafts will be unfinished. This script allows you to correct this problem and place up stairs where the up/down stairs would be.
 
 
<pre>
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
; Upstair stitching.ahk   ;
 
; this is an ahk script to place up stairs at regular   ;
 
; intervals (useful for completing mine shafts).   ;
 
; press d and place the cursor   ;
 
; in the top left corner of the area to be explored   ;
 
; then use ctrl+shift+u to run   ;
 
; to change parameters, use ctrl+shift+p   ;
 
; Increasing spacing will increase some shafts   ;
 
;   ;
 
; NOTE:           ;
 
; Author: Corey Amend   ;
 
; Based on a script by Seth Fogarty,           ;
 
; Which was based on a script by StrawberryBunny   ;
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 
x = 4
 
y = 4
 
wait =  100
 
spacing = 1
 
vdir = +.
 
 
^+p::
 
inputbox x, Input Length, Vertical pattern length: x-axis
 
inputbox y, Input Width, Horizontal pattern width: y-axis
 
inputbox spacing, Input Spacing, Spacing multiplier (1 for complete visiblity)
 
inputbox wait, Input Delay, Delay in miliseconds (100 recommended)
 
return
 
 
^+u::
 
shafts := (x * y) -1
 
i := x-1
 
hdir = {Down}
 
next = {Up}
 
 
Loop %shafts%
 
{
 
Send u
 
Send {Enter}
 
Send {Enter}
 
Sleep %wait%
 
 
k := spacing-1
 
Send %hdir%
 
Loop %k%
 
{
 
Send %hdir%
 
Send %hdir%
 
Send %hdir%
 
Sleep %wait%
 
}
 
Send %hdir%
 
Send %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
 
}
 
}
 
}
 
Send u
 
Send {Enter}
 
Send {Enter}
 
Sleep %wait%
 
 
 
return
 
return
  

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)

Templates used on this page: