Version 2.0 of my
Auto-designation macro is a plugin to bartavelle's excellent
Dwarf Companion that performs the designations of its predecessor
instantly. Note that this is now a memory-editing utility, not an AHK script. It uses the same .csv format as the old one, but the '#' signs are no longer necessary. In addition, it can process images of patterns.
Download -
Demo Movie
Instructions1. Download and install the latest version of Dwarf Companion (0.10 currently). Before trying to run this, make sure Dwarf Companion core is working.
2. Install
PIL, a Python image processing library. This is not required, but you must have it in order to use the new image format.
3. Unzip the program into the /scripts/ folder of Dwarf Companion. autodesig.py should be on the same level as butchercats.py, changeProfession.py, and others (these come bundled with Dwarf Companion)
4. Create your pattern files. They can have any name, but should be placed in the roomdefs folder. They can be in csv format, described in the old forum thread, or in the new image format, described later.
5. Launch Dwarf Fortress, run autodesig.pyw (Notice the w, it hides the console window), select your pattern, move the designation cursor to the top left corner of where you want the pattern, and press Designate.
6. Most errors should be self-explanatory, but 'Only part of a ReadProcessMemory call could be completed' usually means the pattern has gone out of bounds. If you get an cryptic error message, open a command prompt into the directory and run autodesig.py (no w) from the command line (drag it in). Then, you can replicate it and get a detailed traceback you can post here for help.
Image FormatThe image processor currently supports .png, .gif, .jpg, .tif, and .bmp files. Each pixel in the image represents one tile. Black means dig, and white means don't dig. You get a lot of leeway, so don't worry if your image program does a little blending.
Todo: These are things I'll be working on for future versions
-More options in the image processor - more colors for more designations, more than 1 pixel per tile
-Multi-z-level support
-A preview function when you highlight a pattern in the list
-Options for which corner to start designating from, like version 1
Compatibility Note - This is compatible with everything Dwarf Companion is. I can confirm it works in 38c.