Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 16 17 [18] 19 20 ... 29

Author Topic: DFHack: quickfort | buildingplan | blueprint | blueprints/library  (Read 92218 times)

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #255 on: April 27, 2021, 06:44:07 pm »

Yeah, the combination of iteration and SafeCall() being slow makes sense to me. Cutting down on the number of SafeCall() invocations would essentially require moving the iteration into C++ as well as the logic (or keeping it in C++, rather), but that should eliminate both of the major slowdowns. Thanks for looking into this!

I don't have a good explanation for why looking up dfhack.maps.getTileType would be slower than df.tiletype.attrs... they are both stored in Lua tables, as far as I can tell, and the "df" table is considerably larger than any of the others involved.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #256 on: April 29, 2021, 06:51:25 pm »

Ok, I spent some more time thinking and writing things down in a design doc. I apologize for the formality, but it helps me get my thoughts in order. Let me copy in the user-facing sections here, and I'd love to hear everyone's opinions on which features you're looking forward to and which features you don't really care about. The group of people I'm really trying to reach with these changes to blueprint, though, is the newbies who are generating blueprints and using quickfort for the first time. I'm not expecting them to know about this thread, so I'm afraid ultimately I'll have to move forward with some guesses about what is best.

To recap, the point of this overhaul is to make blueprint a more productive member of the quickfort ecosystem. The blueprint plugin is the easiest way to create useful, valid quickfort blueprints, especially for people new to quickfort. However, there are a lot of opportunities to make blueprints easier to create, edit, and play back. There are also many ways to improve the quality of the generated blueprints via capturing more map information.

The next sections are kind of long, so I'll put them in spoiler tags.

Spoiler: Use Cases (click to show/hide)


Spoiler: GUI design (click to show/hide)

If you're interested in the architectural or development milestone planning, or just want to see an easier-to-read version of what's in the spoiler tags above, please check out the full design doc -- but please leave comments here so we can have all the discussion in one place.
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #257 on: May 04, 2021, 04:58:31 pm »

Ok, done with the interactive gui (the gui/blueprint script) and the commandline parsing changes to the blueprint plugin. I have some questions on details of the implementation, though, so it might take a bit to submit all the pull requests and do the reviews.

This forum doesn't allow embedded images, but here's a screenshot of the gui in action: https://drive.google.com/file/d/1YT9wMtTbghaRMxTBmmQkTsyv33sQQe-G/view?usp=sharing
Just imagine the green X's flashing to indicate the selected area.
Logged

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #258 on: May 13, 2021, 05:29:34 am »

First of all let me tell you that you are doing a very nice and much needed job with DFHACK QuickFort, for my part I have wished for years for something to appear capable of replacing the good old quickfort within the DFHACK environment, you are responsible for making this dream of mine and many other people in our community come true.

This was surely no easy feast, as the original quickfort is packed with functionality and beautifully designed as attests to the extraordinary longevity of Joel's utilities.

For all that you have already offered to this community, I thank you for the effort you have dedicated, selfishly and especially for the promise of what is yet to come, I would like you to find as much satisfaction developing and polishing DFHACK quickfort as users of this utility will feel using it in the years to come.

Thanks again! :)

... done with the interactive gui (the gui/blueprint script) and the commandline parsing changes to the blueprint plugin. I have some questions on details of the implementation...

Normally I prefer to play with nano-embarks of 1x1 with 48x48 tiles, that means usually very vertical fortress that use all the area disponible over 6-10 levels for the active or live part of the  fortresss.

In those limite conditions, Would DFHACK QuickFort be able to blueprint all the 48x48xDeep of the fortress?

« Last Edit: May 13, 2021, 05:34:24 am by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #259 on: May 13, 2021, 07:56:11 am »

Thank you very much for your kind words! I love working with this community and with the core DFHack developers!

Would DFHACK QuickFort be able to blueprint all the 48x48xDeep of the fortress?

I've run blueprint and quickfort over hundreds of z-levels and millions of tiles. 48x48x10 should be no trouble for it at all. In fact, dreamfort is just about that size since I originally designed it to be usable on a 1x1 embark (though now that I look through the blueprints, it looks like I let the guildhall level get too big to fit. I'll have to fix that. Recently I've been testing on a 4x4 embark for the easier access to trees so I didn't notice that I'd gone beyond 1x1 boundaries.)

You can do all the z-levels at once or you can split them up level by level. Designating all the digging at once makes sense, but you might want to separate out the other phases for the other levels. It would slow down your fort development a lot if you had to wait for the digging to be done for the entire fort before you could start doing any building. I do suggest using the dreamfort blueprints as a model for creating whole-fort blueprint sets. If you haven't already seen it, I wrote a guide for how to build these kinds of large-scale blueprint sets while still making them as easy as possible to reapply later.
« Last Edit: May 13, 2021, 07:58:08 am by myk »
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #260 on: May 13, 2021, 08:54:25 am »

How well do they work on 16x16 embarks?
Logged
Really hoping somebody puts this in their signature.

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #261 on: May 13, 2021, 09:01:27 am »

I'll have run some tests and get back to you : ) blueprint has to touch every tile, which is slow, but is written in C++, which is fast. quickfort only has to touch the tiles that need modification, which is fast, but is written in lua, which is slow. It will depend a lot on exactly what we're doing with them. What do you think a "typical" 16x16 blueprinted fortress would look like?
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #262 on: May 13, 2021, 02:12:18 pm »

Not really sure what a typical one would look like.  Maybe like and 8x8 one with more space to expand laterally?  I’m still trying to survive beyond a few years.  My forts so far seem to have the same basic layout for the main levels.  First I dig ramps down to two levels below the highest rock layer and then dig a long 3-tile-wide tunnel leading to my 1x1 central staircase (which is in a 3x3 room) and then dig out an 11x11 room for my main stockpile behind that.  Then I dig out a 5x5 room in front of the staircase and to the side of the tunnel, with a 3xtile-wide entrance for the trade depot.

Then I dig 4 levels down making 3x3 rooms for each level of the staircase.  On the lowest level so far, I dig out a 33x11 room on one side of the stairwell to act as a meeting hall/dining room with chairs and tables against the walls (which I eventually convert into a tavern).  My tavern always has an engraving of the fortress symbol directly opposite the entrance. Behind that I dig out another 33x11 room for prepared food, drink, and mug stockpiles.  Then, behind that, I dig out a series of 5x5 workshops for my kitchen(s), still(s) (I only recently learned it was better to put my stills down there instead of up with the farms), fishery, butcher’s shop, tannery, and leather works.  Behind that, I have another 33x11 room for raw food stockpiles.  In then dig out three 3-tile-wide hallways from the central stairwell forming a “T” shape.  I then dig out 3x3 offices for my manager and clerk on the inner corners of the “T” near the entrance to my meeting hall.  Next to these (and across from the tavern), I dig out two 3x3 rooms (one on each side of the “T”) with stairs going up to the next level (which is where my visitor housing is).  On each side of the main hallway, I start digging out 11x11 rooms.  The first of these is invariably used to temporarily house my carpenter’s and mason’s workshops and feed stockpiles until I can dig out the industry level.  Later it becomes my display room.  The second one becomes a non-denominational temple.  Other ones become my well room (with 5 wells in a quincunx pattern drawing from a 9x9 reservoir with it’s surface on the level below).  Next to this goes my hospital (with a door directly connecting it to the well room).  Another room is used for my library.  And other rooms are used for dedicated temples (which I only set up when asked to).  I also, start digging out additional 11x11 rooms behind these and make additional 3-tile-wide hallways to access these (thus turning the “T” into an “m”).  These are used for my guildhalls (which I, also, don’t set up until asked to).  Guildhalls seem to go the same way every time.  Start by digging out an 11x11 room and smoothing it.  Place four tables and four chairs.  Add Statues as necessary.  Guildhalls can be converted to grand guildhalls by simply engraving them and adding more statues as necessary.  Finally, on the outer sides of these auxiliary hallways, I put my noble suites.  Currently, these include three connected 5x5 rooms: an office, a dining room, and a bedroom.  The suites are tessellated to reduce the amount of space taken up.  I’m currently considering adding a fourth room with an upright spike in the center linked to an adjacent lever…

I then dig down another level and make my industry level.  This features a central 3x3 stairwell room with 3-tile-wide hallways shooting off of it in all four directions.  I tile workshop/stockpile areas on this level as I am able.  Each area consists of four 5x5 workshops in a row sandwiched between two 24x11 stockpile rooms (except that some workshops -such as the jeweler’s- get their own 5x5 stockpile rooms), one for feeder stockpiles, and one for product stockpiles.  These are usually dedicated to a particular category of industry (woodworking, stone working, metalworking, ceramics, glassworking, etc.) and are completely surrounded by 3-tile-wide hallways.  Of course, I can’t place these “areas” everywhere.  I have to contend with the reservoir.

I then dig down eight levels and dig out an 11x11 room to use as a dormitory.

On the level below the dormitory I start digging out housing blocks.  Each housing block consists of 10 3x3 bedrooms in a 2x5 matrix.  Each housing block is surrounded by 3-tile-wide hallways.

The visitor housing on the level above the tavern level follows a similar pattern.

I also, extend the main staircase up into the soil layers where I build my farms and farming related workshops (as well as a 5x5 seed stockpile room).

Above the farming level, I dig out a large underground pasture and a set of 11x11 rooms for my poultry.

(In one fortress, I even managed to dig out a multi-level tree farm, but didn’t last long enough to harvest anything from it).

I also dig out 5x5 sand and clay gathering areas on appropriate levels.

The reason that I have the entrance tunnel sandwiched between two unused z-levels above and two below, is because I eventually want to use the space for a “welcoming center” for unwanted guests (complete with a trauma conga line).

Anyways, the above might not be dug/built in the order listed, and I might have missed something, but hopefully, that should give you and idea of how I’m building my forts.

And all of this, so far, has been on 8x8 embarks.
Logged
Really hoping somebody puts this in their signature.

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #263 on: May 13, 2021, 07:20:00 pm »

From what you describe of your fort, I think both blueprint and quickfort should complete in less than a second. If you edit the blueprint files and do something really complex, maybe quickfort will take two or three seconds (and yes, there are ways to make pathologically complex blueprints that can take longer to apply), but the relatively simple blueprints generated by the blueprint plugin should get applied by quickfort as fast as you can type the commands. You probably would want to split the blueprints up per level so your dorfs can concentrate on getting one thing done at a time, though.

For each level (or group of related adjacent levels), this is how it could work:

  • in your existing, built fort, run gui/blueprint and select the (possibly multi-level) area to generate blueprints for
  • in a new, blank fort, run gui/quickfort to apply the dig mode blueprint (or use the non-gui quickfort command according to your preference)
  • once the area is dug out, use quickfort to apply the place and build blueprints
  • once furniture is placed, use quickfort to apply the query blueprint, if there are any rooms to configure

There will still be some manual steps, like digging the ramps down through a variable number of soil layers, but blueprint and quckfort should be able to make the repetitive parts go by much more quickly.

Note that stockpile configurations are not yet recorded in blueprints. My current idea is that if you name the stockpile something obvious, like "plants" or "pots", blueprint can figure out what quickfort alias to use to do the configuration. Recording arbitrary stockpile configuration might be too difficult, though. I'll know more once I start looking into this near the end of the planned overhaul.
Logged

Garfunkel

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #264 on: May 18, 2021, 05:36:39 am »

How well do they work on 16x16 embarks?
What sort of supercomputer do you have to that you can do 16x16 embarks!  :o
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #265 on: May 18, 2021, 09:23:56 pm »

How well do they work on 16x16 embarks?
What sort of supercomputer do you have to that you can do 16x16 embarks!  :o

Iirc, it has an older Core i8 Extreme Edition processor (Ivy Bridge, I think) and 16 GB of memory.  I think it can be upgraded to 32 GB.
Logged
Really hoping somebody puts this in their signature.

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #266 on: May 20, 2021, 09:55:29 pm »

Now that I come to think of it, I think it might be a sandy bridge processor.

Anyways, that machine isn’t working right now so I’m using a notebook with a skylake processor.  It’s only got 8GB of memory, only 4 cores, and runs at a lower clock rate, but for some reason it feels like it’s genning worlds faster.
Logged
Really hoping somebody puts this in their signature.

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #267 on: May 31, 2021, 12:42:59 pm »

Normally I prefer to play with nano-embarks of 1x1 with 48x48 tiles

I shrunk the dreamfort guildhall level down to eight 7x7 rooms instead of sixteen so it fits more comfortably in a 1x1 embark.  If a fort needs more hall/temple/library space, you can always run
Code: [Select]
quickfort run library/dreamfort.csv -n /guildhall1 and lay down another guildhall level.

old guildhall level


new guildhall level


The tables, chairs, altars, etc. are not part of the blueprint, of course. They were just what I needed for that particular fort.
« Last Edit: May 31, 2021, 12:47:57 pm by myk »
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #268 on: June 05, 2021, 05:18:03 pm »

I needed to make an insta-dig tool so I could test the blueprint-quickfort-blueprint loop. Since it will be a standard DFHack plugin visible to players, I tried to make it useful to and usable by players in addition to serving my purposes for testing. So without further ado, I bring you dig-now:
Code: [Select]
dig-now
=======

Instantly completes dig designations, modifying map tiles and creating boulders,
ores, and gems as if a miner were doing the mining or engraving. By default, all
dig designations on the map are completed and boulder generation follows
standard game rules, but the behavior is configurable.

Note that no units will get mining or engraving experience for the dug/engraved
tiles.

Currently, trees are not chopped down and any designated trees or roots will be
ignored. Engravings are also not automatically generated by this plugin as they
depend on the skill and creative choices of individual engravers.

Usage::

    dig-now [<pos> <pos>] [<options>]

Where the optional ``<pos>`` pair can be used to specify the coordinate bounds
within which ``dig-now`` will operate. If they are not specified, ``dig-now``
will scan the entire map.

Any ``<pos>`` parameters can either be an ``<x>,<y>,<z>`` triple (e.g.
``35,12,150``) or the string ``here``, which means the position of the active
game cursor should be used.

Examples:

``dig-now``
    Dig designated tiles according to standard game rules.

``dig-now --clean``
    Dig designated tiles, but don't generate any boulders, ores, or gems.

``dig-now --dump here``
    Dig tiles and dump all generated boulders, ores, and gems at the tile under
    the game cursor.

Options:

:``-c``, ``--clean``:
    Don't generate any boulders, ores, or gems. Equivalent to
    ``--percentages 0,0,0,0``.
:``-d``, ``--dump <pos>``:
    Dump any generated items at the specified coordinates. If the tile at those
    coordinates is open space or is a wall, items will be generated on the
    closest walkable tile below.
:``-e``, ``--everywhere``:
    Generate a boulder, ore, or gem for every tile that can produce one.
    Equivalent to ``--percentages 100,100,100,100``.
:``-h``, ``--help``:
    Show quick usage help text.
:``-p``, ``--percentages <layer>,<vein>,<small cluster>,<deep>``:
    Set item generation percentages for each of the tile categories. The
    ``vein`` category includes both the large oval clusters and the long stringy
    mineral veins. Default is ``25,33,100,100``.
:``-z``, ``--cur-zlevel``:
    Restricts the bounds to the currently visible z-level.

This is certainly a "cheat" plugin, but I expect it to be useful for players who want to rapidly test quickfort blueprints.
« Last Edit: June 05, 2021, 07:56:20 pm by myk »
Logged

Nameless Archon

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #269 on: June 17, 2021, 03:43:51 pm »

This is certainly a "cheat" plugin, but I expect it to be useful for players who want to rapidly test quickfort blueprints.
Excellent. Just in time for me to begin poking at this for real, instead of in my head.
Logged
Pages: 1 ... 16 17 [18] 19 20 ... 29