Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dwarfchitect - A tool for design(ing)/(ating) your fort  (Read 2489 times)

ShKCh

  • Escaped Lunatic
    • View Profile
Dwarfchitect - A tool for design(ing)/(ating) your fort
« on: September 05, 2017, 02:09:31 pm »

After having my fair share of fun with Dwarf Fortress I felt like it's time to give a little back to whomever this might concern.

https://github.com/Putesestvije/Dwarfchitect/releases

Dwarfchitect is a program that allows you design your fort, save it, load it, and later to export it as a macro command for Dwarf Fortress. It has a simple (maybe even crude) UI reminiscent of the older MS Paint versions. Most of important information about the program and how to use it (if any) is in the link above but there are still a few things to mention :
  • Type the first letter of designation to switch your brush to that designation
  • Use "<" and ">" to switch between layers on multi-layered projects
  • Whether you are using a square or rectangle tileset doesn't matter. Toggle how the tiles render through the view menu to see how would your project with your tileset
  • Use ctrl + scroll to zoom in and out
  • There are two options on how you want the designation to be exported as a macro
    • "Top left of the map" means that after you create the macro, you place the cursor inside DF on the top left corner of your current game and the designation will be laid out in your game in the same position as in Dwarfchitect
    • The second option, "Topmost leftmost tile", means that when you run the macro in Dwarf Fortress the resulting designation will be placed such that its topmost leftmost tile will be under your cursor (ie. it will start from there). Useful for smaller macros
  • Like Dwarf Fortress, when the project is sufficient in size, Dwarfchitect tends to run more slowly. Sorry about that, but I'm using the Qt in a way it was never intended  :-[
    • Sometimes the screen won't repaint as soon as you start painting with the line, ellipse or the rectangle tool so please bear with it
  • Grayed out options are not yet (or ever) added features

There might be stray debug output to stdout and file extensions appear in duplicate, but please report here any weird or bad behavior by the program.

Finally I can't avoid mentioning other designation centered projects, like Quickfort and Simmetricity. In my naivety, only by the time I was already programming the basic UI and algorithm capabilities of my program has it occurred to me to check if, in the now more than 10 year long history of DF, someone did something like this. My intention is not to try and steal anyone's thunder, so to speak, or to show off. I'm also sorry if I'm fragmenting the user base somehow by releasing yet another solution of a problem solved time and time again. It was a fun little personal project to practice working in c++/Qt, and since it's more or less done I hope there is no harm in releasing it into the wild...

SCREENSHOT TIME
Spoiler (click to show/hide)
Logged

CLA

  • Bay Watcher
    • View Profile
Re: Dwarfchitect - A tool for design(ing)/(ating) your fort
« Reply #1 on: September 07, 2017, 05:26:42 am »

Does not start on Windows 7 64bit:
Code: [Select]
This application failed to start because it could not find or load the Qt platform plugin "windows" in "". Reinstalling the application may fix this problem
Also:
There are two options on how you want the designation to be exported as a macro
I have a suggestion for a third option.
I find that the most annoying and inconvenient part about these utilities is to position your DF cursor at the correct spot.
So how about this:
3rd option called 'Key Tile'
you place it like the other designations, but it can only be one tile. can be anywhere.
This is the tile your cursor is supposed to be when you start the macro in DF.
Say you want to dig out your fortress you'd have to line up the macro so that it hits the edge of the mountain where the entrance is supposed to be.
That might be difficult to do when you need to place the cursor at the corner of the map/screen. Instead you could put the key tile right on your entrance in Dwarfchitect and then in DF position the cursor right on the edge where the entrance is supposed to be.
Logged
CLA - an ASCII-like Graphic Pack with simplified letter-like creature graphics. The simple and clean looks of ASCII with distinct creature graphics - best of both worlds!

http://www.bay12forums.com/smf/index.php?topic=105376.0

ShKCh

  • Escaped Lunatic
    • View Profile
Re: Dwarfchitect - A tool for design(ing)/(ating) your fort
« Reply #2 on: September 07, 2017, 08:24:33 am »

Does not start on Windows 7 64bit:

Thank you so much, I got two ancient archives mixed up, I uploaded the wrong one.

So how about this:
3rd option called 'Key Tile'
you place it like the other designations, but it can only be one tile. can be anywhere.

I'll do this later this evening. If I don't come up with some smart solution the only limitation will be that you can place the starter tile only on the topmost layer.
Logged

CLA

  • Bay Watcher
    • View Profile
Re: Dwarfchitect - A tool for design(ing)/(ating) your fort
« Reply #3 on: September 07, 2017, 08:45:16 am »

Thank you so much, I got two ancient archives mixed up, I uploaded the wrong one.
The program starts now, but I can't use keyboard shortcuts and I only see the tile grid after I opened a new file. No tool panels and so on. The options under View> do nothing.
I can click with left/right mouse buttons and they designate tiles. Can't switch designation type though.

Quote
I'll do this later this evening. If I don't come up with some smart solution the only limitation will be that you can place the starter tile only on the topmost layer.
Sounds good. Switching Z levels is easy without fucking up the position.
Logged
CLA - an ASCII-like Graphic Pack with simplified letter-like creature graphics. The simple and clean looks of ASCII with distinct creature graphics - best of both worlds!

http://www.bay12forums.com/smf/index.php?topic=105376.0

ShKCh

  • Escaped Lunatic
    • View Profile
Re: Dwarfchitect - A tool for design(ing)/(ating) your fort
« Reply #4 on: September 07, 2017, 08:56:36 am »

Quote
The program starts now, but I can't use keyboard shortcuts and I only see the tile grid after I opened a new file. No tool panels and so on. The options under View> do nothing.
I can click with left/right mouse buttons and they designate tiles. Can't switch designation type though.

Windows is a bit cheeky. Every time I open the QtCreator on windows it manages to mess up something, like the shortcuts.

Does the grid open only after you load a csv file or only after starting a new project? In that sennse it behaves like photoshop for example, it assumes nothing until you tell him how big your project is gonna be.

I'll check out the options under view ASAP, zooming and changing whether tiles are squares or rectangles should work, stuff that doesn't should be grayed out. Keep in mind that none of those should work before you start or load a project.

One last thing, on what windows are you? 7, 8 or 10?
Logged

CLA

  • Bay Watcher
    • View Profile
Re: Dwarfchitect - A tool for design(ing)/(ating) your fort
« Reply #5 on: September 07, 2017, 09:02:52 am »

Quote
The program starts now, but I can't use keyboard shortcuts and I only see the tile grid after I opened a new file. No tool panels and so on. The options under View> do nothing.
I can click with left/right mouse buttons and they designate tiles. Can't switch designation type though.

Windows is a bit cheeky. Every time I open the QtCreator on windows it manages to mess up something, like the shortcuts.

Does the grid open only after you load a csv file or only after starting a new project? In that sennse it behaves like photoshop for example, it assumes nothing until you tell him how big your project is gonna be.

I'll check out the options under view ASAP, zooming and changing whether tiles are squares or rectangles should work, stuff that doesn't should be grayed out. Keep in mind that none of those should work before you start or load a project.

One last thing, on what windows are you? 7, 8 or 10?

The grid isn't there when I start up the program. It appears with the correct dimensions once I open a new file (and I assume the same is true for opening an existing file, but I don't have any .csv handy.)
That is working as I expected though. To clarify, the things I mentioned don't work after I open a (new) file.

Quote
One last thing, on what windows are you? 7, 8 or 10?
Does not start on Windows 7 64bit:

In case this helps you:
There is a small panel on the left side which I can grab and move to the other sides, but I can't change its size. It appears as if the expected tool panel spawns but with 0,0 dimensions so you can't see anything.
Here is a screenshot. The panel in question is circled in red.
https://imgur.com/a/xg8gQ
« Last Edit: September 07, 2017, 09:07:22 am by CLA »
Logged
CLA - an ASCII-like Graphic Pack with simplified letter-like creature graphics. The simple and clean looks of ASCII with distinct creature graphics - best of both worlds!

http://www.bay12forums.com/smf/index.php?topic=105376.0

ShKCh

  • Escaped Lunatic
    • View Profile
Re: Dwarfchitect - A tool for design(ing)/(ating) your fort
« Reply #6 on: September 07, 2017, 09:11:57 am »

Quote
Here is a screenshot. The panel in question is circled in red.
https://imgur.com/a/xg8gQ


Sweet Armok, that stuff is even more ancient. I got the right zip now, but put in the wrong .exe. I'm not hime now, but I'll take care of that.
Logged

ShKCh

  • Escaped Lunatic
    • View Profile
Re: Dwarfchitect - A tool for design(ing)/(ating) your fort
« Reply #7 on: September 07, 2017, 09:49:04 am »

I finally uploaded the right windows version  8). If there was someone else working besides me I'd have them sacked. I'll start working on the starter tile later this evening.

On an unrelated note, It says escape lunatic under my name. Is is something related to how Long I've been here or the amount of posts I made?
Logged

CLA

  • Bay Watcher
    • View Profile
Re: Dwarfchitect - A tool for design(ing)/(ating) your fort
« Reply #8 on: September 07, 2017, 10:02:40 am »

Can confirm it's working well now. This is really useful, Thank you! Especially the square and circle tools are great to have.

If you're bored and look for ways to improve it in the future, other similar tools have options to import from/export to a bitmap IIRC. Though I don't think it's that necessary.
Some also use different colors for the different designations, which can be useful in discerning what is what. It makes it easier to see the structure at first glance, so you might want to add different background colors to the designations.
Logged
CLA - an ASCII-like Graphic Pack with simplified letter-like creature graphics. The simple and clean looks of ASCII with distinct creature graphics - best of both worlds!

http://www.bay12forums.com/smf/index.php?topic=105376.0

ShKCh

  • Escaped Lunatic
    • View Profile
Re: Dwarfchitect - A tool for design(ing)/(ating) your fort
« Reply #9 on: September 13, 2017, 08:30:44 am »

Quote
I find that the most annoying and inconvenient part about these utilities is to position your DF cursor at the correct spot.
So how about this:
3rd option called 'Key Tile'
you place it like the other designations, but it can only be one tile. can be anywhere.
This is the tile your cursor is supposed to be when you start the macro in DF.

Done. Here is the new release:
https://github.com/Putesestvije/Dwarfchitect/releases/tag/V1.1

I haven't had the time to go bug hunting but in normal circumstances it works as it should.
Logged