Logic gates like numberabbey has.
Or slightly divergent, a program that takes images and urns them into digging instructions
I actually tried this yesterday evening. Sadly AppleScript is a horrible language and i could not find anything readily available on a vanilla os x to read a pixel's color from an image file in "Image Event"s
I am currently thinking about simply creating a native os x app, where one could create templates on a grid or in a scripted fashion (probably python).
I think the most attractive templates are parametrized ones. The circle is a good example. I have created a small script for my default staircase design with alternating up and down stairs like this:
#####
#< >#
#< >#
#< >#
#####
<> - stairs
- floor
# - wall
and am currently working on variations of that (like orientation) and the ability to input the number of levels you want the staircases to go (up and/or down).
Since i usually use relatively strict layout i will probably create simple layouts as well. What i am not so sure about is digging channels. In my experience i am quite careful with digging channels and do this in at least 2 stages.
For a bunker i could imagine a multi-phase template. First the digging, second some channeling and furniture placement, third some more channeling. I am not sure how to smartly tell df via actionscript which furniture or material (e.g. walls) to use. I would love an easy way to say "a wall of granite from here 10 tiles to the north".