Expedition Leader: "You there! Architect! Fetch your planning tablet. I want this to be the most glorious fortress in our kingdom."
Urist McArchitect: "Aye, sir. Let us plan our entrance,
and our dining hall, and our apartments, and our..."
Many hour pass...Expedition Leader: "Ah! Excellent! This is truly the greatest design in Dwarven history!"
Urist McArchitect: "I agree. Now that you've planned it, though, it's time for you to go tell the dwarves where to dig."
Expedition Leader: "What? No, no, no, that's for you to do. You're the architect, after all."
Urist McArchitect: "Sorry, that's not in my job description."
Expedition Leader cancels designate fortress, strangling Urist McArchitect
-----
Dwarf Fortress, for all of its amazing qualities, has a very cumbersome UI. And as anyone who has ever tried making a fortress more complex than a square with some tables in it, you know that designating large and elaborate fortress is an incredibly time-consuming and frustrating task.
There are two ways around this frustration:
1) Use the mouse. While it does give more control, the mouse is very finicky.
2) Use macros and use a template. This is easier, but you still have to designate the fortress in the first place to record your macro.
Neither of the solutions are ideal, because they both require you to exert at least some small amount of effort. I've decided that this is simply unacceptable.
Enter
Dwarf Fortress Architect, a small and very simple yet extremely powerful Java application I've written that designates your fortress for you while you sit there and watch.
It loads a bitmap image that you or someone else creates in their favorite graphics editing program and extracts color information from the pixels. It then parses that information into commands for the program to execute -- commands that just so happen to correlate with keyboard shortcuts in Dwarf Fortress. Do you see where I'm going with this?
I made this Bitmap in Photoshop:
This image is enlarged. The true size is 29X29 -- Less than 3KB.I then loaded it into DF Architect and pressed the "Designate" button.
In a matter of seconds, I had this:
Magic!
(Not really. It's just Java.)With DF Architect, you can design your dream fortress and then share it with your friends. Just upload the bitmap image to an image hosting site (one that doesn't convert to jpeg -- that will ruin your design and it won't work), then send them the link and they can download and create it.
Version 0.2 now available! See what's new in my post on page 2 here:
http://www.bay12forums.com/smf/index.php?topic=64723.msg1523605#msg1523605Dwarf Fortress Architect is available for the extremely reasonable price of free. You can purchase it here:
<Link temporarily removed>
Please make sure to read the readme, as the program is in its earliest of early stages and is not very forgiving of mistakes in the operating procedure at the moment. (That is an understatement.)
It will tell you how to operate it. The procedure is a bit bizarre and arbitrary at first, but it's not difficult at all.
This is the first program I've ever seen through to fruition. It's also the first program I've ever given to somebody else to run. This whole thing could potentially be the biggest flop in the history of mankind. BUT I'M WILLING TO TAKE THAT RISK.
I'm not exactly a master-coder -- I'm mostly self-taught. There are likely to be bugs. Post in this thread and I'll get around to fixing them as time permits. (But seeing as how classes start Monday, time may not permit much.
)
Readme is here if you are so inclined:
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.)
DF Architect was written in Java and requires the latest Java Runtime Environment to execute. Extract and double-click the JAR file to start it. I've included 3 example files: An example on using indeces (see the readme), the example I used above, and a twisty-bendy little hallway.
This should work on both PC and Mac, and there is (theoretically) no limit on the size of the design that you can create to be designated by the tool. Every pixel is one square in game. A 29x29 bitmap results in a 29x29 grid-size fortress (provided you designate the whole area).
Currently, you can't designate multiple-z-level fortresses in one pass. It's still easy to do with clever use of indeces, but I'll work on a way to get it into the program without over-engineering a solution. Ideas are welcome if you have them.
Oh, and this is my first post. Hello Dwarf Fortress community!
I hope this is the right forum... Modding, yes?