Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: dfdigger  (Read 823 times)

mizipzor

  • Bay Watcher
    • View Profile
    • Blog
dfdigger
« on: February 20, 2010, 07:26:19 pm »

Background
A few years into the fort I always find designating all the trees to be cut down way to time consuming. Therefor I wrote this tool to do it for me.

Download link

How it works
The program scans the map for trees and designates a set number of trees, closest to the specified origin, to be cut down.

How to use it
I only tested this with DF D17. Download the zip and extract it to your DF folder. Consider backing up your SDL.dll should you ever want to remove it.

The dfdigger.exe program takes three parameters:

  • --max, which specifies the maximum number of trees to be cut.
  • --targets, which specifies the targets to designate set it to "9,10" (without quotes) to target trees (it can currently only handle trees but I plan to expand it handle stone).
  • --origin, close to which point trees should be designated in "x,y,z" format (without quotes), since we dont want dwarves running across the map for a tree.

You can use the dfposition.exe tool to find your position. In DF, press K to go into look mode, which gives you a cursor. Place this cursor close to where you want trees cut from, like your fort entrance. Run the position tool and it will output the cursor position in x/y/z format.

Included is also a bat file (cut10trees.bat) that you can look at if youre unsure on how to handle command line options for a program. Feel free to edit this. Every time you double click the bat file 10 new logs should be brought into the fortress.  :) Easy, easy.

How to remove it
Remove every file in the DF folder that was placed there during the extraction of the zip file. Make sure your backed up SDL.dll is restored.
Logged