Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: DF Architect -- Build your dream fortress with zero effort  (Read 20258 times)

Tiny_Puppy_Smasher

  • Escaped Lunatic
    • View Profile
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.  ;D)

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!  :D
I hope this is the right forum... Modding, yes?
« Last Edit: August 29, 2010, 04:55:20 pm by Tiny_Puppy_Smasher »
Logged

Eagle_eye

  • Bay Watcher
    • View Profile
Re: DF Architect -- Build your dream fortress with zero effort
« Reply #1 on: August 26, 2010, 05:24:54 pm »

I think there's already a similar add on for quickfort that does this, but this seems to be a bit simpler to use. very nice :D
Logged

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile
Re: DF Architect -- Build your dream fortress with zero effort
« Reply #2 on: August 26, 2010, 06:26:29 pm »

Now if only there were some way to tell your dwarves which tiles to dig first...
Logged
The World Without Knifebear A much safer world indeed.
regardless, the slime shooter will be completed, come hell or high water, which are both entirely plausible setbacks at this point.

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: DF Architect -- Build your dream fortress with zero effort
« Reply #3 on: August 26, 2010, 08:09:56 pm »

Very nice. Only one suggestion: use http://dffd.wimbli.com/ for df related files. It's free, painless and has neat features.
Logged

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: DF Architect -- Build your dream fortress with zero effort
« Reply #4 on: August 27, 2010, 03:37:55 am »

I would love to download it and it looks awesome but filedropper isn't allowed on my network. :'( Please transfer it over to dffd!
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

Dbuhos

  • Bay Watcher
  • Carbon Strain
    • View Profile
    • DeviantArt
Re: DF Architect -- Build your dream fortress with zero effort
« Reply #5 on: August 27, 2010, 04:44:29 am »

Now that's pretty interesting. I'll probably give it a try. :)
Logged

orbcontrolled

  • Bay Watcher
    • View Profile
Re: DF Architect -- Build your dream fortress with zero effort
« Reply #6 on: August 27, 2010, 08:06:27 am »

Anything that can replace two utilities with one is good, and the index feature alone could make this better than quickfort.

Criticisms though:

-There should be a way to exit the program at any time, either a hotkey, or the red X on the GUI. Haven't you ever read the Sorcerers Apprentice? Never build anything without an "off" button! (This is especially true because the task can't even be killed without keyboard/mouse control)
-A Pause hotkey too.
-It doesn't designate as efficiently as quickfort. At the very least, it fails to skip empty lines. You should look at the quickfort code and do at least as much optimization as that.
-Alternatively, if DFHack can be made to work across languages (I don't know how big an "if" that is), use it to write the designations to DF immediately, and lose all the weaknesses of manual designation.

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.

The simplest way would be one of those list boxes with arrows to move items up or down in it. If you want to be fancy, you could also have the program check if the file is an animated GIF, and then make each frame a level.
Logged

Tiny_Puppy_Smasher

  • Escaped Lunatic
    • View Profile
Re: DF Architect -- Build your dream fortress with zero effort
« Reply #7 on: August 27, 2010, 11:08:54 am »

Anything that can replace two utilities with one is good, and the index feature alone could make this better than quickfort.

Criticisms though:

-There should be a way to exit the program at any time, either a hotkey, or the red X on the GUI. Haven't you ever read the Sorcerers Apprentice? Never build anything without an "off" button! (This is especially true because the task can't even be killed without keyboard/mouse control)
-A Pause hotkey too.
-It doesn't designate as efficiently as quickfort. At the very least, it fails to skip empty lines. You should look at the quickfort code and do at least as much optimization as that.
-Alternatively, if DFHack can be made to work across languages (I don't know how big an "if" that is), use it to write the designations to DF immediately, and lose all the weaknesses of manual designation.

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.

The simplest way would be one of those list boxes with arrows to move items up or down in it. If you want to be fancy, you could also have the program check if the file is an animated GIF, and then make each frame a level.

I've thought thoroughly about all the things you've criticized as I wrote the program, and I'll be working on them. I really just wanted to get it out there as a proof of concept to see what the response to something like this would be.
Optimization is a major goal. At the very least, I'll make it to where it can designate rows of designations without hitting "enter" every tile.
However, the Java robot is very fast in execution. I'm artificially slowing it down, because it goes so quick that Dwarf Fortress can't keep up. The maximum speed at which it can move very much depends on how fast your computer is, and in turn how fast DF can process the key input. I should make it an option to change...

I believe DFHack is written in C, which would make cross-compatibility tough.

Also, the GIF thing is an interesting idea. Animated GIFs are tough to make, though, which defeats the purpose of having a very simple tool.
« Last Edit: August 27, 2010, 11:11:38 am by Tiny_Puppy_Smasher »
Logged

hSaxon

  • Escaped Lunatic
    • View Profile
Re: DF Architect -- Build your dream fortress with zero effort
« Reply #8 on: August 27, 2010, 12:03:48 pm »

How about doing multiple levels with multiple images? Say you ask the program to use coolFort.bmp, this program looks in the same folder for coolFort001.bmp and uses that one level down, coolFort002.bmp etc.
Also hi, first post.
Logged

gtmattz

  • Bay Watcher
  • [PREFSTRING:BEARD]
    • View Profile
Re: DF Architect -- Build your dream fortress with zero effort
« Reply #9 on: August 27, 2010, 12:19:06 pm »

Now if only there were some way to tell your dwarves which tiles to dig first...

I think that one could work this by having multiple templates for the various stages of digging so as to excavate the area in the best manner for the situation.  Apply one template, let the dwarves dig it out, then apply the next stage and let them at it, etc.
Logged
Quote from: Hyndis
Just try it! Its not like you die IRL if Urist McMiner falls into magma.

[NO_THOUGHT]

  • Bay Watcher
  • *cricket*
    • View Profile
Re: DF Architect -- Build your dream fortress with zero effort
« Reply #10 on: August 28, 2010, 04:22:11 pm »

For those of you who want to try this out, I have recolored the amazing fractal design Raynard from the df wiki that I have tried several times to designate by hand but failed miserably  :P

It's here
Logged

Still Standing

  • Bay Watcher
    • View Profile
Re: DF Architect -- Build your dream fortress with zero effort
« Reply #11 on: August 28, 2010, 04:51:32 pm »

For those of you who want to try this out, I have recolored the amazing fractal design Raynard from the df wiki that I have tried several times to designate by hand but failed miserably  :P

It's here


I made that exact same one into a Quickfort file.  xD
Logged
Diggy diggy hole.

Randomtask

  • Bay Watcher
    • View Profile
Re: DF Architect -- Build your dream fortress with zero effort
« Reply #12 on: August 28, 2010, 05:18:49 pm »

Mad props to you and this utility, good sir.
Logged

Tiny_Puppy_Smasher

  • Escaped Lunatic
    • View Profile
Re: DF Architect -- Build your dream fortress with zero effort
« Reply #13 on: August 28, 2010, 06:45:38 pm »

I've been playing around with different designation methods to make it more efficient -- One grid-based one and one a slight modification of the list-system I'm using now. They were both complete failures. (I fail at math. -_-)
I think I'll just try optimizing what I have now instead of changing my mind over and over as to how I'm going to go about this. Currently I've gotten to where I can designate rows very very quickly, and it works 9 times out of 10. But sometimes it explodes -- I have no idea why. I'm working on it. I think it has something to do with the index, and that's a very important feature.

I'll get an update out soon once I figure it out.

Edit: Also, once I tried testing that large file only to have a very important IM pop up in the middle, I quickly realized the importance of having an "Abort" function. Optimization is no longer a top priority.  :P
« Last Edit: August 28, 2010, 06:53:24 pm by Tiny_Puppy_Smasher »
Logged

Randomtask

  • Bay Watcher
    • View Profile
Re: DF Architect -- Build your dream fortress with zero effort
« Reply #14 on: August 29, 2010, 10:52:36 am »

So, I checked around in the thread and readme, but I couldn't see anything about this.

Is there a way to stop Architect? I plopped down that huuuuge fractal design, and halfway through, I realized I'd put my cursor two or three spaces down and to the right.

I wanted to stop it, go back and redesignate, but I realized with some minor horror, that I had no idea how to stop it.

Also, I think today I will try my hand at making a few designs I find myself often using.
Maybe.
If the wife doesn't decide she wants to try taming the unicorns we found on my map.  ::)
Logged
Pages: [1] 2 3