DF Architect Version 1.WhoTheHellCares.0.01a
Author: Tiny_Puppy_Smasher (Which is totally my real name. It's hard to get a job with it, though.)
Table of Contents
1) Disclaimer - READ BEFORE USING
2) How to use
3) Making your own designs
---1---
**Disclaimer, Very Important**
Dwarf Fortress Architect is a tool for Dwarf Fortress. Go figure.
It is dead-simple (seriously, it only has 2 buttons) to use, but there are some quirks that you'll have to work around because of the inherent limitations of working across multiple programs with a utility like this which doesn't use memory-hacks.
The program is written in Java - While this means that it will work with both PC and Mac, Java has no hooking function to listen for key-presses from outside the JVM. (At least not that I'm aware of.) This means that you'll have to press "Designate" on the DFArchitect, then alt-tab back into Dwarf Fortress before the program starts running the loaded script. I've alotted 3 seconds from the mouse click of "Designate" to give Dwarf Fortress focus. This amount of time seems more than adequate, but if enough people give me feedback I can change it.
Also, there are no checks against invalid file types. I'm a terrible GUI programmer, and I don't really have the skills to check for stupid errors the user might make. For instance, the program works with 24 bit bitmap files (.bmp) and bitmap files alone. However, the program will gladly load up a text file and proceed to crash and burn.
Please be responsible.
I'm not at fault if you decide to load up "Windows.EXE" and the program proceeds to shred your computer into tiny little pieces.
**Disclaimer End**
---2---
This program is drop-dead stupidly easy to use.
a) First, make sure Dwarf Fortress is open. Pause the game, and open the designation menu by pressing "d". Place the cursor where you want the index location to be placed (See section 3 for more about the index location), then open up DFArchitect.
b) There is a "Load" button and a "Designate" button. When you press load, a file dialog will pop up. Select the BMP file you wish to use, and open it up. The program will parse the information and create a script that will execute when you press "Designate".
c) After you press "Designate", the program will act like it is hanging up. It's not. When you press the button, you have 3 seconds to give focus back to Dwarf Fortress either by alt-tabbing if you're playing fullscreen, or clicking in the window if you're playing in window-mode. (I realize that this is completely arbitrary. Before you complain, read the disclaimer for the reasoning behind why the program must work this way.)
d) Once you've given focus to Dwarf Fortress and waited 3 seconds, the script will run. Watch as your dream fortress is designated for you before your very eyes. Grab some popcorn and enjoy the show.
---3---
DFArchitect runs by reading pixel information from 24-bit bitmap images.
Depending on the color of the pixel, a different designation will be made. It's pretty straightforward.
Here is the key that the program uses so you can make your own very own architect plans :
Designation Type = Approximate Color [Hex Values R,G, and B]
BLANK = White 255, 255, 255 (Blank, i.e. Don't do anything in this spot)
DIG = Black 0, 0, 0
INDEX = Green 128, 255, 0 (Neon green)
UPSTAIR = Red 200, 0, 0
DOWNSTAIR = Orange 250, 150, 50
UPDOWNSTAIR = Green 50, 150, 50 (Dark green)
CHANNEL = Blue 75, 75, 255
UPRAMP = Purple 225, 75, 255
If you look at that list, you'll see something called Index. That's not a designation type, you're saying to yourself. I know.
The index tells the program where to center your design. The index aligns itself to the starting location of the cursor inside of the Dwarf Fortress designation menu when you run the script.
It's best explained by example:
Let's say you make a twisty-windy-springy hallway BMP that's long and skinny that you want to be modular -- you're going to use it all over your fort. You can put an index tile in the BMP, and the hallway will center about that point. Let's say you put it at the far right in the center of a 3-tile wide hallway. You have a dining hall, and you want a hallway to extend from east to west.
Place your cursor at the left of the dining hall where you want the hallway to start, run DFArchitect, and the hallway will align to extend from the dining hall exactly where you had your cursor. The three example plans included all have indeces, and there is one example that is purely designed to show how indeces work.
The index is always treated as a dig designation.
If you don't include an index, the program defaults to centering around the top-left pixel.
Also, you CAN include more than one index in a plan without the program crashing, but don't. It's not pretty.
(Also, don't tell anyone, but DFArchitect only looks at the red component of the pixels in the bitmap that you're using. The colors I gave are merely a standard that I've set up, but so long as the Red in the RGB values of the colors you use is the same as the key, it doesn't matter what colors you use. Shh, that's our little secret.)