1
DF Modding / DF Architect -- Build your dream fortress with zero effort
« on: August 26, 2010, 05:20:16 pm »
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#msg1523605
Dwarf 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 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?
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#msg1523605
Dwarf 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:
Spoiler (click to show/hide)
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?