Bay 12 Games Forum

Dwarf Fortress => DF Modding => Utilities and 3rd Party Applications => Topic started by: myk on July 14, 2020, 02:10:38 am

Title: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on July 14, 2020, 02:10:38 am
Update: quickfort is now part of the official DFHack release!

The docs are available on the DFHack docs server:
This thread has also expanded from just quickfort development to support of the whole quickfort ecosystem:

Original first post:
I'm implementing quickfort inside of DFHack. Why would I do this? Well, a couple reasons:
For those who are unfamiliar with quickfort/qfconvert, the idea is that you record the keys you want to play back in a spreadsheet. Quickfort moves the cursor to the position that corresponds to the cell in the spreadsheet and plays back the keystrokes. Quickfort runs in one of four modes: dig, build, place, and query. Dig digs, build builds, place places stockpiles, and query changes building/stockpile settings. The mode is determined by a marker in the upper-left cell of the spreadsheet. You can see an example of sheets in each of the four modes here (https://docs.google.com/spreadsheets/d/1KcNFC63m-iHLPPdttosR5cuNiZ0vUtxlT51T_MV0588/edit#gid=2051360746).

What about digfort (https://docs.dfhack.org/en/stable/docs/_auto/base.html#digfort) and fortplan (https://docs.dfhack.org/en/stable/docs/Plugins.html#fortplan)?

Yeah, they work great, actually, but digfort only does dig mode and fortplan only handles build mode, and only the buildings that buildingplan (https://docs.dfhack.org/en/stable/docs/Plugins.html#buildingplan) supports (mostly furniture). I plan to build on what they already provide, but I'd really like to see support for all buildings and constructions, stockpiles, query mode, the full set.

So what's your plan?

I wrote a design doc (https://docs.google.com/document/d/17EjZlGsUOJ6E8WtqkCRZi9BBKjL9L1IdHfkB3Ajqas8/edit?usp=sharing), if you're into that sort of thing, but here's a quick rundown of what I have in mind:

Spoiler: Script usage examples (click to show/hide)

What are your thoughts? How many quickfort users do we have out there who would appreciate something like this? What other features would you like to see? What are the most annoying manual steps you have to take that could be automated by this project?

Here are the milestones I'm using to track my progress:
Done

All done! I have lots of ideas of where to go from here, but I'd like to see the script get some real usage first so we can work out the bugs.
Title: Re: DFHack script: quickfort
Post by: clinodev on July 14, 2020, 10:12:36 pm
I'm really glad to see this project!

As one of the /r/dwarffortress mods, I very regularly see and field questions about problems with quickfort, and while I've been recommending the current DFhack replacements, not everyone has had great luck with those either. I tried to copy and duplicate one of my own mutti-level structures recently (mining only,) with them, and it was a mess. Perhaps it was an operator error, or the components didn't go together the way I hoped; I'm not sure.

I am hopeful a single command / single source solution could solve a lot of problems, and if it reads the many existing community blueprints, that would be excellent!
Title: Re: DFHack script: quickfort
Post by: myk on July 15, 2020, 08:39:13 am
Yes, compatibility with current blueprints is definitely a priority. I'd hate to lose all the great work that's already out there!

I think the feature I'm looking forward to most in this project is materials control. I'm just so tired of forbidding bars of ash and charcoal every time I want to apply a build blueprint!

I'm curious - what are the common problems people have with quickfort?
Title: Re: DFHack script: quickfort
Post by: danaris on July 15, 2020, 09:47:42 am
Very glad to see you picking this up, after I had to leave it unfinished five years ago!

I don't currently have time for much Dwarf Fortress in my life, but if I did, I would definitely still want this tool, and I'm happy that soon it will (hopefully!) be available to those who can benefit from it.
Title: Re: DFHack script: quickfort
Post by: clinodev on July 17, 2020, 06:36:59 am
myk quickfort notes

Awkwardly, we remove the sorts of posts you'd probably like to see, but I'll copy a recent representative one  I can still view.

>Hey everyone, I got some good help on credit last time with an issue I had, so here we go again.

>I'm trying out quickfort as it came with the starter pack I downloaded, and I'm finding that the digs are coming out weird. It seems to be doing fine, and then all of a sudden at around 75% or so it starts doing a bunch of weird stuff, then it says its done. I've attached images of this that show the issue very clearly, but I've tested it on a bunch of blueprints.

>Thanks for the help

>*should also point out that it tends to designate stuff that is outside of the original footprint that was designated with alt-v.

>(https://imgur.com/lqjmM7M.png)

>(https://imgur.com/gfNwa8Y.png)

>EDIT: I've done some testing, and I think that it might be relevant that it fails in the same way every time.


This is pretty much my post 0.44.x experience as well. I had a similar experience recently trying to use the DFhack equivalent tools, unfortunately, but I haven't followed up.


Title: Re: DFHack script: quickfort
Post by: myk on July 17, 2020, 01:57:05 pm
Problems with rendering dig plans should certainly be solved. Quickfort applies blueprints by simulating keystrokes, which is not exactly foolproof. Keystrokes can get lost, and cursor positions can shift when the screen has to scroll and the mousequery plugin's edge scrolling feature is enabled.

This particular problem, though, is probably already solved with DFHack's digfort (https://docs.dfhack.org/en/stable/docs/_auto/base.html#digfort), which applies dig blueprints via DFHack's internal APIs. I plan to absorb its functionality into the new quickfort script.
Title: Re: DFHack script: quickfort
Post by: myk on July 18, 2020, 08:32:18 am
Ok, I wrote a first draft of the help text (which will appear in https://docs.dfhack.org/en/stable/docs/Scripts.html). I'd appreciate comments on whether everything is clear -- especially on whether it would be clear to someone who had never heard of quickfort before! The formatting and hyperlinks get lost when I paste it in the forums like this, but you can see the markup source at https://github.com/myk002/scripts/blob/quickfort_skeleton/quickfort.lua

Quote
quickfort
Processes Quickfort-style blueprint files. This is a pre-release – not all features are implemented yet.

Quickfort blueprints record what you want at each map coordinate in a spreadsheet, storing the keys in a spreadsheet cell that you would press to make something happen at that spot on the DF map. Quickfort runs in one of four modes: dig, build, place, or query. dig designates tiles for digging, build builds buildings and constructions, place places stockpiles, and query changes building or stockpile settings. The mode is determined by a marker in the upper-left cell of the spreadsheet (e.g.: #dig in cell A1).

You can create these blueprints by hand or by using any spreadsheet application, saving them as .xlsx or .csv files. You can also build your plan “for real” in Dwarf Fortress, and then export your map using the DFHack blueprint plugin for later replay in a different fort. Blueprint files should go in the blueprints subfolder in the main DF folder.

You can read more about how to create blueprint files in the blueprints/README.txt file, and there are ready-to-use examples of blueprints in each of the four modes in the blueprints/library folder.

Usage:

quickfort set [<key> <value>]
Allows you to modify the active quickfort configuration. Just run quickfort set to show current settings. See the Configuration section below for available keys and values.

quickfort list [-l]
Lists blueprints in the blueprints folder. Blueprints are .csv files or sheets within .xlsx files that contain a #<mode> comment in the upper-left cell. By default, blueprints in the blueprints/library/ subfolder are not included. Specify -l to include library blueprints.

quickfort <command> <list_num>
Applies the blueprint with the number from the list command.

quickfort <command> <filename> [-s <sheet_num>]
Applies the blueprint from the named file. If it is an .xlsx file, the -s parameter is required to identify the sheet number (the first sheet is -s 1).

<command> can be one of:

run
applies the blueprint at your current active cursor position.

orders
uses the manager interface to queue up orders for the specified build-mode blueprint.

undo
applies the inverse of the specified blueprint, depending on its type. Dig tiles are undesignated, buildings are canceled or removed (depending on their construction status), and stockpiles are removed. No effect for query blueprints.

Configuration:

The quickfort script reads its startup configuration from the dfhack-config/quickfort/quickfort.txt file, which you can customize. The following settings may be dynamically modified by the quickfort set command (note that settings changed with the quickfort set command will not change the configuration stored in the file):

blueprints-dir (default: ‘blueprints’)
Can be set to an absolute or relative path. If set to a relative path, resolves to a directory under the DF folder.

force-marker-mode (default: ‘false’)
Set to “true” or “false”. If true, will designate dig blueprints in marker mode. If false, only cells with dig codes prefixed with m will be designated in marker mode.

interactive-build (default: ‘false’)
Allows you to manually select building materials for each building/construction when running (or creating orders for) build blueprints. Materials in selection dialogs are ordered according to preferences in materials.txt (see below). If false, will only prompt for materials that have :labels. See original Quickfort documentation for details.

There are also two other configuration files in the dfhack-config/quickfort folder: aliases.txt and materials.txt. aliases.txt defines keycode shortcuts for query blueprints, and materials.txt defines forbidden materials and material preferences for build blueprints. The formats for these files are described in the files themselves.
Title: Re: DFHack script: quickfort
Post by: myk on July 20, 2020, 06:18:54 pm
Skeleton PRs are up as PR#1609 (https://github.com/DFHack/dfhack/pull/1609) and PR#159 (https://github.com/DFHack/scripts/pull/159)!
Title: Re: DFHack script: quickfort
Post by: myk on July 24, 2020, 08:46:12 pm
I've completed a few milestones beyond what I've started PRs for -- I'm waiting for the current PRs to get reviewed and merged before I start more PRs (I don't want to overwhelm the dev team with review requests!). Specifically, I just finished implementing dig mode, and I could use some help with test material.

For those of you who have made blueprints, could you send them to me? I'd like to make sure I've tested "real" blueprints and can handle all the variations there are in style and formatting.

The DFHack quickfort plugin will have a few capabilities beyond digfort or the original quickfort. the new quickfort script:

The new script depends on some library functionality in PR1609 (https://github.com/DFHack/dfhack/pull/1609), but once that gets in, people who are interested in beta testing can try it out.
Title: Re: DFHack script: quickfort
Post by: myk on July 29, 2020, 01:36:14 am
In order to keep the new quickfort separate from the release while it's under initial development, lethosor has created a separate branch (https://github.com/DFHack/scripts/tree/quickfort) that I'm merging into. We'll merge it into master once it's implemented enough/stable enough, but beta testers are welcome to snag it from that branch in the meantime!

In other news, I've implemented place blueprints except for one last detail. The fun part about place blueprints was implementing a "flood fill" algorithm that figures out the boundaries of an arbitrarily-shaped stockpile.  Now you can have stockpiles of any shape, as long as it's connected horizontally or vertically to another stockpile tile, and as long as the whole thing fits within the Dwarf Fortress stockpile limit of 31x31 tiles. For example:
Code: [Select]
#place
 ,a, , , ,a,a
a,a, , , , ,a
a,a,a, , , ,a
a,a,a,a,a,a,a
would create a valid, though oddly shaped, animal stockpile.

The last bit of place to implement is enabling the correct stockpile category based on the type of stockpile in the blueprint. The code for this is not straightforward, and it looks like I'll have to do some refactoring inside of the DFHack codebase to cleanly support it. I'll probably move on to build for now and come back to this part later.
Title: Re: DFHack script: quickfort
Post by: Fleeting Frames on July 29, 2020, 06:13:53 am
Huh. Does that mean
Code: [Select]
#place
 ,a,w,w,w,a,a
a,a,w,w,w,w,a
a,a,a,w,w,w,a
a,a,a,a,a,a,a
Would also work?
Title: Re: DFHack script: quickfort
Post by: myk on July 29, 2020, 10:59:31 am
absolutely. that layout is similar to one of my test cases that I used to verify the algorithm. You can have circular stockpiles surrounded by other circular stockpiles, or stockpiles that have the same bounding box upper-left corner like this:
Code: [Select]
#place
a,u,s,h
u,u,s,h
s,s,s,h
h,h,h,h
(which doesn't sound complicated but there's some technical complexity with it)
Title: Re: DFHack script: quickfort
Post by: lethosor on July 29, 2020, 12:46:49 pm
PTW. That flood-fill support sounds cool!
Title: Re: DFHack script: quickfort
Post by: Fleeting Frames on July 29, 2020, 02:18:14 pm
Does it connect diagonally or only orthogonally?
Title: Re: DFHack script: quickfort
Post by: myk on July 29, 2020, 03:52:26 pm
Currently, just orthogonally, but there's no reason why I can't make it also connect diagonally if that's what map makers want. What would be "expected" by a novice mapmaker? should this be one stockpile or two?:
Code: [Select]
#place
a,a, ,a
a, ,a,a
In either case, I plan to suport adding labels to the cells so a stockpile can be defined as disconnected patches. Like, if we do decide to keep the flood fill just checking orthogonal tiles, we could still define the above stockpile as a single pile like this:
Code: [Select]
#place
a:onepile,a:onepile,         ,a:onepile
a:onepile,         ,a:onepile,a:onepile
or even do a disconnected one like this:
Code: [Select]
#place
a:onepile, , , ,a:onepile
a:onepile, , , ,a:onepile
a:onepile, , , ,a:onepile
But I'll get to that once I get basic functionality done for build and query
Title: Re: DFHack script: quickfort
Post by: myk on July 31, 2020, 05:19:41 pm
I'm halfway (I think) through implementing build mode, and boy is it a complicated one! The parsing and boundary detection logic is actually very similar to place, and I was able to generalize and reuse those algorithms. The difficulty comes from mapping all the different key sequences to buildings and then ensuring those buildings get configured correctly. After playing this game for years, I had no idea how many different kinds of buildings there are!

The operations map is currently 400 lines of dense configuration code, and still growing as I correct the bad assumptions I made in the first draft.

In general, I'm coding it to enforce the same rules as the in-game UI for allowed placement of buildings (e.g. beds have to be inside, doors have to be adjacent to a wall, etc.). A notable exception is that I'm allowing constructions and machine components to be designated regardless of whether they are reachable or currently supported. This allows the player to designate an entire floor of an above-ground
building or an entire power train without micromanagement. I'm also not enforcing that materials are accessible from the designation location. That is something that the player can manage.

I did some basic testing to make sure machine components wouldn't just immediately deconstruct when the were built in the "wrong" order, but I haven't verified yet that complex machines work as expected. If it needs more work, I might be able to control automatic suspension of the construction jobs to ensure things get built "correctly".
Title: Re: DFHack script: quickfort
Post by: myk on August 02, 2020, 01:53:44 pm
build mode is done, except for a few caveats. I haven't implemented material preferences yet, of course -- that's planned for later, but a few of the buildings are just very complex in their potential configurations. Weapon and upright spike traps, for example, can be built with a variable number of weapons attached. And pressure plates.. there's not even a deterministic ordering of keys that will result in a particular configuration! I'm going to return to those three later.

In other news, query mode is also mostly done! I though query mode would be the most complex since it can read an arbitrary sequence of keys and expand arbitrary aliases, but it turned out to be the easiest mode of all to implement!

There are still a few improvements to be made, especially around error detection (bad key sequences that don't return to the main screen, attempts to configure tiles that don't contain buildings, etc.), but once this gets merged, the quickfort script will be ready for some actual play testing!
Title: Re: DFHack script: quickfort
Post by: myk on August 04, 2020, 12:37:14 am
Well, that about wraps up the basics! Dig, build, place, and query are now usable. I'm doing some play testing and writing documentation before I go any further so the current code is release-ready. While writing the docs, though, I realized that since DFHack quickfort is compatible with Python Quickfort, much of the previous tool's user manual (https://github.com/joelpt/quickfort#user-manual) is still very much applicable. I reached out to Joel Thornton, the author, to see if I could get his permission for reuse. His manual has lots of great examples and his writing is excellent. Anything I write would pale in comparison!

The next big coding tasks are .xlsx support. I should also spend some time putting together a library of useful example blueprints. If anyone has blueprints to share, I'd love to see them!
Title: Re: DFHack script: quickfort
Post by: Zalthor on August 05, 2020, 01:31:51 pm
I should also spend some time putting together a library of useful example blueprints. If anyone has blueprints to share, I'd love to see them!
I know that the Starter Pack has its own library of blueprints. Perhaps you could port those?
Title: Re: DFHack script: quickfort
Post by: myk on August 05, 2020, 02:52:10 pm
Good idea -- I'll also look at the ones linked from the user guide for the original python Quickfort. By the way, Joel gave us permission to use his user guide, so I'll be copying lots of good info from there into the new DFHack quickfort user guide. Thanks Joel!!

I've been playtesting the quickfort script and things have been going well. Fixing bugs as I find them. I'm significantly expanding the library of query mode aliases, too, so complex query blueprints should be much easier to write now. I even wrote a set of aliases that sets up everything you need for a quantum stockpile : )
Title: Re: DFHack script: quickfort
Post by: Starver on August 05, 2020, 04:28:34 pm
Currently, just orthogonally, but there's no reason why I can't make it also connect diagonally if that's what map makers want. What would be "expected" by a novice mapmaker? should this be one stockpile or two?:
Code: [Select]
#place
a,a, ,a
a, ,a,a
Slightly late to this[1], but I tend to chequerboard some pairs of stockpiles (say in preparation for alloy-making, copper-storing tiles alternating with tin ones, or whatever) for no good reason other than aesthetics and a rather specific kind of at-a-glance level checking.

I'd usually do this by painting a major square of one type (bars/copper, e.g.), deselecting alternates and then repainting the same major square of the next type (bars/tin...). Other useful mixes and ratios-of-mix get implemented, too, with additional work.

It looks like you've got got #place notation capable of doing this with the "a:onepile"-type definitions, but I thought I'd mention it as a further testable situation that others might benefit from.


Not that it's important to cater for, but might be an edge-condition worthwhile considering, especially when there are non-adjacent (orthagonal or diagonal) disconnects and exclaving/enclaving. Or don't, if you just think I'm being awkward. ;)


[1] Would say "long time listener, first time caller", except that the thread isn't old enough, and I probably only saw it first on an idle-pass over the threads after a week or so.
Title: Re: DFHack script: quickfort
Post by: myk on August 05, 2020, 06:01:41 pm
I've actually been leaning towards including diagonals since I discovered, while implementing build mode, that roads and farm plots and other "extent"-based structures are unhappy when they are fully disconnected, but are perfectly happy if they are connected only by a diagonal. This makes it "canon" enough for me to support diagonally-connected stockpiles without hrmming and hawing about it (is that how you spell it?).

I also discovered that although you can't place disconnected farm plots and roads via the UI, they work just fine if you place them via directly on the game map using the API. For most structures I enforce the same rules as the UI (for example, you can't build in hidden tiles, even if they're really an empty cavern floor), but there is no reason *not* to support disconnected farm plots and roads, so I went ahead an relaxed the rules. This will save you from some frustration when a center tile of a planned farm plot is taken up with a piece of stone.

edit: done (https://github.com/myk002/scripts/commit/de680e4cd03b5aa506b0faae8d20c53315d862ba) with diagonal stockpiles. isn't Lua scripting easy?
Title: Re: DFHack script: quickfort
Post by: myk on August 06, 2020, 02:16:55 am
I've been going through the user guide for python Quickfort and adapting it for this implementation. One of the first sections is the list of features. Here's what I have so far:

* Manages complete blueprints to handle the four main phases of DF construction
* Supports .csv and multi-worksheet .xlsx blueprint files
* Near-instant application, even for very large and complex blueprints
* Multi-z-level blueprints
* Designates complete constructions at once, without having to wait for each tile to become supported before you can build it
* Supports stockpiles of all shapes, not just rectangular blocks
* Automatic splitting of stockpiles and buildings that exceed DF size limits
* Automatic cropping of blueprints that extend beyond the map boundaries
* Automatic blueprint validity checking so, for example, buildings that cannot be placed on a certain tile will simply not be placed instead of the blueprint failing to apply or the blueprint getting desynchronized and "going bonkers". Blueprints that are only partially applied for any reason can be safely reapplied to build the remaining buildings.
* Relaxed rules for farm plot and road placement, allowing disconnected tiles to be part of the same building.
* Handles arbitrarily complex minecart track designations
* Supports aliases to automate frequent keystroke combos
* Supports including aliases in other aliases, and repeating key sequences a specified number of times
* Includes a library of aliases to automate most common tasks, such as configuring stockpiles for important item types or creating hauling routes for quantum stockpiles.
* "Undo" functionality for dig, build, and place blueprints
* Generates and queues manager orders for everything required to apply build blueprints
* Assortment of read-to-use blueprints included
* Instant halting of blueprint application when keystroke errors are detected
* Verbose mode that logs detailed processing steps when debugging blueprints

Need to work on some of the wording, but I've got 2000 more lines of user guide to go through first...

I think the most important bit is that (non-query) blueprints are now idempotent -- that is, you can apply the blueprint multiple times and you get the same consistent result: any missing buildings will be placed, and any buildings that are already placed won't be changed, and, more importantly, won't make the blueprint go crazy because it can't place something that it's trying to place.
Title: Re: DFHack script: quickfort
Post by: rmblr on August 06, 2020, 04:20:23 am
Quite a project!

I think idempotency is very important, also undo functionality, nice to see that there.

I suppose included will be the option to designate the blueprints in marker mode?
Title: Re: DFHack script: quickfort
Post by: myk on August 06, 2020, 05:40:27 am
I totally forgot to add that! Yes, already implemented. Also configurable settings for max numbers of bins, barrels, and wheelbarrows for blueprint stockpiles.
Title: Re: DFHack script: quickfort
Post by: rmblr on August 06, 2020, 06:34:45 am
Will it also support designating stockpile settings themselves (the items that can be placed in the stockpile)?

That would be seriously amazing. I wrote the savestock/loadstock (https://github.com/DFHack/dfhack/blob/develop/docs/Plugins.rst#id71) plugin for dfhack just because I make extensive use of fine grained stockpiles in every fort, and defining them is a very tedious process. Being able to have blue prints that designate my rooms, workshops AND stockpiles would be killer!
Title: Re: DFHack script: quickfort
Post by: myk on August 06, 2020, 11:52:21 am
Yes, setting stockpile settings is supported via actual keystroke playback, abstracted behind a library of aliases (and aliases that combine aliases) that handle the common key sequences.

For example, a series of blueprints that I've been testing with that creates a quantum stockpile system for non-economic stone and gems looks like this:

Code: [Select]
#build
 ,`
 ,trackstopN
`,`,`
`,`,`
`,`,`

#place
 ,s
 ,
s,s,s
s,s,s
s,s,s

#query
 ,quantum
 ,quantumstopfromsouth
`,`,otherstone
`,`,enablegems
`,`,`

which will create stone stockpiles and the trackstop (dumping North), configure them like we want, and create a hauling route so dwarves will load and dump the minecart onto the quantum stockpile above. each of the strings in the query blueprint is defined in an aliases list that is distributed with dfhack or in a player-defined alias that builds on the common aliases.

As an example, "quantum" is defined like this:
Code: [Select]
quantum: {linksonly}{nocontainers}{enableanimals}{enablefood}{enablefurniture}{enablestone}{enableammo}{enablecoins}{enablebars}{enablegems}{enablefinishedgoods}{enableleather}{enablecloth}{enablewood}}{enableweapons}{enablearmor}{enablesheet}where each of those elements are aliases themselves, for example:
Code: [Select]
foodprefix:  s{Down}
enablefood:  {foodprefix}e^
The caret ("^") is shorthand for {ESC}, required to exit the stockpile settings screen. query blueprints have to make sure to return to the same screen they started on whenever they apply a configuration so we can move the cursor to the next cell to configure.

Another simpler example is a food stockpile that is configured to just hold booze:
Code: [Select]
booze: {foodprefix}b{Right}{Down 5}p{Down}p^
Title: Re: DFHack script: quickfort
Post by: myk on August 10, 2020, 03:38:22 am
After an intense battle (https://github.com/DFHack/dfhack/pull/1620) with the build system, the quickfort script now supports reading from .xlsx files (https://github.com/DFHack/scripts/pull/177). That was a lot tougher than I thought it would be! Cross-platform support is difficult when building libraries you don't control on operating systems you don't have! Huge thanks to lethosor for getting me unstuck when I ran into linker symbol resolution issues, and for giving me an excellent walkthough for how to make C pointers type safe when sending them through the Lua layer!

I've also adapted the Python Quickfort's user guide into the DFHack quickfort user guide (https://github.com/DFHack/dfhack/pull/1617), which, when merged, will be available here (https://github.com/DFHack/dfhack/tree/develop/data/blueprints) (as of this posting, that file just contains a few lines; after the merge, it'll have about 1000).
Title: Re: DFHack script: quickfort
Post by: myk on August 12, 2020, 01:54:42 am
Two new features for today:

1) ability to filter quickfort list output by mode and/or by substring. As I run through my test blueprints when I make a change, it was getting more and more difficult to find the blueprint I wanted. This helps a lot : )

2) you can now generate manager orders to produce everything you need for a build-mode blueprint! For now, I hard-coded it to produce rock where possible, then wood if we can't use rock, then iron if we need a metal. We'll see how much more configurable it needs to be once people start using it.

The next big thing I'll be working on is support for buildingplan. Currently, quickfort places all requested buildings, even if you don't actually have the materials to build them. That's fine, but if you don't have the materials, they disappear with a "can't build building" message as soon as the job is scheduled. Integration with buildingplan will keep the buildings suspended until materials are available.  The big difficulty here is that buildingplan only supports a few item types. I'm looking into extending its functionality to cover *all* item types.
Title: Re: DFHack script: quickfort
Post by: Warmist on August 12, 2020, 02:36:12 am
After an intense battle (https://github.com/DFHack/dfhack/pull/1620) with the build system, the quickfort script now supports reading from .xlsx files (https://github.com/DFHack/scripts/pull/177). That was a lot tougher than I thought it would be! Cross-platform support is difficult when building libraries you don't control on operating systems you don't have! Huge thanks to lethosor for getting me unstuck when I ran into linker symbol resolution issues, and for giving me an excellent walkthough for how to make C pointers type safe when sending them through the Lua layer!
<...>
I'm still scarred from some library integration - build time is 200 times longer.The library itself builds for half a day. Never again...

Now everything i build small and more c-like and single header.
Title: Re: DFHack script: quickfort
Post by: myk on August 13, 2020, 01:35:59 am
Hehe yeah, the more I program in C++, the more I like C ^_^.

I'm still working on buildingplan integration. I have it working for the furniture types that buildingplan already supports, which is cool, but I have some questions about how I'm "Lua-izing" the plugin before I start modifying it further. So while I'm waiting for some feedback on PRs, I worked on some packaging functionality.

Specifically, I'm working on meta blueprints, that is, blueprints that run a series of other blueprints. I'm finding that many blueprints follow this pattern:
- apply dig
- wait for miners to dig
- apply build
- apply place
- apply query to configure stockpiles
- wait for buildings to get built
- apply query to configure rooms

Those three "apply"s in the middle might as well get done in one command instead of three. A meta blueprint can encode that sequence.

This requires a number of design choices. How do you address parts of a blueprint? How do you make that addressing scheme usable with both .csv and .xlsx files? I came up with a labeling syntax that I think will do the trick, similar to the cursor offset notation. I also added the ability to have multiple blueprints in a single file/sheet. This way sets of blueprints can be packaged into a single .csv file and be addressable by a meta blueprint in that same file. I decided not to allow meta blueprints to access other files because that opens a packaging can of worms -- it's much easier to verify that a meta blueprint is valid if all the data is in a single file. You can still keep blueprints in separate spreadsheet sheets, of course, so it shouldn't make blueprint editing any more complex.

Eventually meta blueprints could maybe script repetitions and transformations of blueprints, but just getting sequencing done will be useful enough for now :-)
Title: Re: DFHack script: quickfort
Post by: myk on August 16, 2020, 02:03:58 am
Ok, more progress. I'm pretty happy with how meta blueprints came out. You can now apply a bunch of blueprints with a single command. I also implemented a "hidden()" marker for blueprints that are managed by meta blueprints so the lower-level blueprint doesn't clutter up the quickfort list output.

Also done is a #zone mode for placing zones, similar to the existing #place mode for stockpiles.

BTW, the user manual is now up! For now, you can view it here (https://github.com/DFHack/dfhack/tree/develop/data/blueprints#readme), but eventually we'd like to integrate it into the DFHack docs on https://docs.dfhack.org/. I've written explanations for all the features I've completed so far (including a few which are done but haven't been merged yet). Please give it a read and tell me if anything isn't clear!

I've been working on a large-scale end-to-end example to stress test all these features, and the biggest issue I'm running into is complexity management. You have a long list of blueprints in quickfort list. Which one do you apply next? At what point should you run quickfort orders to queue up the manager orders so you can apply build blueprints? And which "meta" blueprints refer to build blueprints such that running quickfort orders is worthwhile?

It makes me think more about blueprint packaging and user experience. Now that we have meta blueprints to manage all the lower-level blueprints, do we need something even higher level than meta?

One feature I just added was the ability for a blueprint to output a message when it completes. For example, if you require a manual action after the blueprint runs, this message could give you details. For example, if a #zone blueprint just designated a pasture, the message could remind you to assign animals to it. Perhaps a series of meta blueprints with "next step" messages would be a good way to keep track of what's next. I'll try that with my example fort (which has 23 steps) and see how it goes.
Title: Re: DFHack script: quickfort
Post by: indyofcomo on August 18, 2020, 01:12:31 pm
PTW. This is great. I just recently started my first serious attempt at using quickfort. Didn't know this was being done.

I came to the forum to ask a question about python quickfort, but I'll ask here. I'm still reading through the manual at the moment, but does your quickfort support comments? Like "# This is a comment" in a cell?
Title: Re: DFHack script: quickfort
Post by: indyofcomo on August 18, 2020, 03:29:25 pm
Oh, also: does this work with dfhack planner?
Title: Re: DFHack script: quickfort
Post by: myk on August 18, 2020, 06:26:51 pm
Yes, it supports comments, and if by "planner" you mean buildingplan, then yes, if buildingplan supports a building type, the quickfort script will use buildingplan to manage the building.

Once I get the current script fully merged, I plan to extend buildingplan to support more building types.
Title: Re: DFHack script: quickfort
Post by: indyofcomo on August 18, 2020, 08:13:11 pm
that's great, myk! I didn't want to have to construct 200+ beds before running my #build :)
Title: Re: DFHack script: quickfort
Post by: myk on August 19, 2020, 03:54:38 pm
I've completed the last two major development milestones! There is now a small library of example blueprints, including the large-scale "dreamfort" end-to-end example. There is also now a GUI, so you can use quickfort from a pop-up dialog instead of the command line. Once it all clears review and gets merged, it will be available for actual use! I'm really looking forward to feedback so we can smooth out any remaining rough edges and implement features that people come up with.
Title: Re: DFHack script: quickfort
Post by: Zalthor on August 21, 2020, 03:51:38 am
You madman, well done! This community is really inspiring, at times.
Title: Re: DFHack script: quickfort
Post by: myk on August 21, 2020, 04:43:03 pm
Glad to be a part of it : )

There are still quite a few PRs to submit. I'm getting it merged feature by feature, and I don't want to overload lethosor with too many PRs at once (the quickfort script is almost 4000 lines long at this point). All the required C++ code has been merged, though, so if you're building DFHack from source and want to try quickfort, you can download it here (https://drive.google.com/file/d/10in6-XqzqKfQCP4mS6WZdjDmu_2v7l-s/view?usp=sharing). Just extract the file in your hack/scripts directory. It contains the quickfort.lua entrypoint (which is mostly just help text) and the actual script logic in internal/quickfort/*.lua. It will be much easier, of course, to wait until it's included in an actual release (I'm hoping it will all be merged by the upcoming -r3), but I'm posting the code in case anyone is eager to try it out.
Title: Re: DFHack script: quickfort
Post by: Zalthor on August 22, 2020, 06:44:38 am
There are still quite a few PRs to submit. I'm getting it merged feature by feature, and I don't want to overload lethosor with too many PRs at once (the quickfort script is almost 4000 lines long at this point). All the required C++ code has been merged, though, so if you're building DFHack from source and want to try quickfort, you can download it here (https://drive.google.com/file/d/10in6-XqzqKfQCP4mS6WZdjDmu_2v7l-s/view?usp=sharing). Just extract the file in your hack/scripts directory. It contains the quickfort.lua entrypoint (which is mostly just help text) and the actual script logic in internal/quickfort/*.lua. It will be much easier, of course, to wait until it's included in an actual release (I'm hoping it will all be merged by the upcoming -r3), but I'm posting the code in case anyone is eager to try it out.
So the download is if one would like to compile dfhack? Do you or anyone else have a post-compiled version we could drop in just to see how it works?
Title: Re: DFHack script: quickfort
Post by: myk on August 22, 2020, 07:56:29 am
ah, of course -- you can pick up a pre-compiled binary at https://dfhack.org/builds/ -- the most recent "Unstable automated build". Here's the direct link (https://buildmaster.lubar.me/api/ci-badges/link?page=build&key=badges&$ApplicationId=3&$BinariesAvailable=true)

then just extract the quickfort script (https://drive.google.com/file/d/10in6-XqzqKfQCP4mS6WZdjDmu_2v7l-s/view?usp=sharing) on top of that.
Title: Re: DFHack script: quickfort
Post by: Zalthor on August 22, 2020, 07:59:00 am
Ah, okay, I thought that your files had to be part of the compilation process. Thanks for all your hard work, again!
Title: Re: DFHack script: quickfort
Post by: Zalthor on August 22, 2020, 02:31:08 pm
I've completed the last two major development milestones! There is now a small library of example blueprints, including the large-scale "dreamfort" end-to-end example. There is also now a GUI, so you can use quickfort from a pop-up dialog instead of the command line. Once it all clears review and gets merged, it will be available for actual use! I'm really looking forward to feedback so we can smooth out any remaining rough edges and implement features that people come up with.
Is the gui present in the build that you linked? If so, how it is accessed? Perhaps I'm being blind, but I see no reference to it anywhere.
Title: Re: DFHack script: quickfort
Post by: myk on August 22, 2020, 02:34:59 pm
Does 'quickfort gui' not work? If not, I must have saved from the wrong branch :-\ Will fix when I get home. Btw, full command documentation will be on docs.dfhack.org once the script is merged, but for now you can read it in the top comment in quickfort.lua.
Title: Re: DFHack script: quickfort
Post by: Zalthor on August 22, 2020, 02:49:30 pm
Does 'quickfort gui' not work? If not, I must have saved from the wrong branch :-\ Will fix when I get home. Btw, full command documentation will be on docs.dfhack.org once the script is merged, but for now you can read it in the top comment in quickfort.lua.
It does not, it only reprints the usage commands. Also, the documention does not mention anything about the GUI, I believe. I did a whole control-f and everything.
Title: Re: DFHack script: quickfort
Post by: myk on August 22, 2020, 04:12:50 pm
Ok I must have pulled the wrong branch. Sorry! I'll fix tonight, but if you like, you can fork my GitHub repo (https://github.com/myk002/scripts) and merge all my feature branches. It's all up there, just not all in one place. Make a local branch and merge in all branches that start with quickfort_

edit: I uploaded a new version of quickfort.7z (https://drive.google.com/file/d/10in6-XqzqKfQCP4mS6WZdjDmu_2v7l-s/view?usp=sharing). The problem was that I forgot to merge the quickfort_gui branch into my own combined branch </facepalm>.

Anyway, it should have a gui now : )
Title: Re: DFHack script: quickfort
Post by: Rogue Yun on August 23, 2020, 11:44:47 am
I'm just a rather old out of touch DF fart (haven't played DF in about 2 years) so I beg your pardon if I missed seeing this somewhere, but will this eventually be dig priority compatible? d = 4 and if you like replace d with numbers 1-7 to indicate the priority you would like a blueprint dug at? If not I'd like to suggest it for your consideration.
Title: Re: DFHack script: quickfort
Post by: myk on August 23, 2020, 01:33:00 pm
I actually hadn't heard of dig priorities until now, but it looks very useful. How do you think it could best be integrated into quickfort?
Title: Re: DFHack script: quickfort
Post by: Rogue Yun on August 23, 2020, 03:04:08 pm
As I say I'm kind of out of it I don't remember the exact syntax required to design forts and I lost all my old csv files of them... But I'll do my best.

I was thinking along the lines of
Code: [Select]
, , , , ,3, , , , ,
d,d,d,d,d,3,d,d,d,d,d
d,d,d,d,d,3,d,d,d,d,d
d,d,d,d,d,3,d,d,d,d,d
d,d,d,d,d,3,d,d,d,d,d
d,d,d,d,d,3,d,d,d,d,d
d,d,d,d,d,3,d,d,d,d,d
d,d,d,d,d,3,d,d,d,d,d
d,d,d,d,d,3,d,d,d,d,d
d,d,d,d,d,3,d,d,d,d,d
d,d,d,d,d,3,d,d,d,d,d
d,d,3,3,3,3,3,3,3,d,d
 , ,3, , , , , ,3, ,
4,4,2,4,4, ,4,4,2,4,4
4,2,2,2,4, ,4,2,2,2,4
4,2,2,2,4, ,4,2,2,2,4
4,2,2,2,4, ,4,2,2,2,4
4,4,4,4,4, ,4,4,4,4,4

This concept was mostly thought of for editing the CSV file by hand as I don't know how well it could be implemented with export plugins in DF (But you are welcome to try!). Where d would by synonymous with 4 (Cause dig is 4 anyway) and 1 through 7 would be the priority of the dig. Spaces represent where you don't want to dig. The above example (if I've done it right) would clear a path quickly to the bottom of a what will eventually be an 11 by 11 room to construct the rooms and clear the space for the workshops first to quickly get a fort's production up and going.

As for the implementation for the code I'd have to somehow see the code and be lead by the hand to understand it. I know a little python but it's a self taught understanding. I don't know if you would have time for something as silly as that.

Thank you, and I hope that gives some clarity!
Title: Re: DFHack script: quickfort
Post by: myk on August 23, 2020, 05:14:49 pm
Ok, I read up on priorities at https://dwarffortresswiki.org/index.php/DF2014:Designations_menu. I'm not sure how I missed them before.

Anyway, it looks like they can be set for any kind of designation, not just standard dig. The natural syntax might be the designation letter followed by the priority, that is, d3 or h3 instead of just 3, and the priority number would go before any expansion notation, e.g. d1(20x3). And if no priority is specified, we'd assume 4. This is totally doable. I'll add it to my todo list. You're welcome to take a stab at it too. The code is actually in Lua, not Python, but it's easy to pick up (I didn't know anything about Lua when I started this project). I think the code for this would follow the same pattern as what I have for custom stockpiles that have multiple categories enabled: an _index handler that parses arbitrary text and generates a table entry based on an existing table entry. Check out place.lua or zone.lua in my last PR to see what I mean: https://github.com/DFHack/scripts/pull/185/files
Title: Re: DFHack script: quickfort
Post by: Starver on August 23, 2020, 08:06:58 pm
Perhaps assume a bare digit to be "dig, priority <n>", like the suggestion of a bare letter to be "<whatever>, priority 4". Any requirements beyond that (or pedantic specification of the assumption, for at least the better human readability of the 2.5-dimensional data without the overwhelming vision of whitespace 'gaps') need to be char+digit.

(I don't know if there's similar use of Marking and Designate-(All,Auto-mine,etc)...  Perhaps the automine extension, but perhaps not given the purpose to carefully mould rooms, without excess.)


Priorities are sooooo useful, as demonstrated. Especially that trick of slightly raised(/not so depressed) priorities encouraging immediate extension of reach into higher priority 'bubbles' that start to attract workers en mass once encountered.

(Though I would have extended those 3s one further space into the 2s. That final 3 in the doorway reveals three 2s beyond to suck up effort, whereas the 2 is slightly premature and draws in just one worker slightly too quickly for my liking. But that's just me.)

Title: Re: DFHack script: quickfort
Post by: indyofcomo on August 24, 2020, 01:25:29 pm
There's also marking and the auto-dig options.
Title: Re: DFHack script: quickfort
Post by: Starver on August 24, 2020, 02:52:33 pm
(I don't know if there's similar use of Marking and Designate-(All,Auto-mine,etc)...  Perhaps the automine extension, but perhaps not given the purpose to carefully mould rooms, without excess.)


...and as for the Marking.  Well, I sort of imagined that this is some of what quickfort does (apply things when you want them, though you set it up beforehand) so...  Yes, I imagine you could 'quickfortmark' (or quickfort while manually in Mark mode) and then paint Mark-Toggle-Off over it later.

But I'm not really sure of the relative advantages.

Still, always useful to know about, both for user and an dev who is working with Designation stuff.  Up to everyone whether either take advantage of the facility, where available, though. ;)
Title: Re: DFHack script: quickfort
Post by: lethosor on August 24, 2020, 09:05:03 pm
There's also marking and the auto-dig options.
In my opinion, these probably aren't that important to support, at least right now. From what I remember (which could be out of date), auto-dig only works on revealed vein tiles, so I don't see much of a use-case for pre-planned auto-dig designations (since they would most likely do nothing). As for markers, there's a d-M option that you could use to toggle the marker status of some (or all) of a blueprint after it has been applied. I don't expect many cases where people would want fine-grained control over which tiles are just markers, but I suppose there could be some.

I'm not intending to shoot down your suggestions - they're definitely options that could be implemented (and possibly easily, if the relevant pieces are extensible), but they may not be as high-priority (heh) as priorities and other features right now.
Title: Re: DFHack script: quickfort
Post by: myk on August 24, 2020, 11:07:45 pm
Marker mode is actually already supported, though I realize I forgot to document it properly in the user manual (https://github.com/DFHack/dfhack/tree/develop/data/blueprints) (added to my TODO list -- edit: documentation PR (https://github.com/DFHack/dfhack/pull/1634) submitted). add 'm' the beginning of the designation letter to dig the blueprint tile in marker mode. e.g. to dig the outline of a room but leave the interior in marker mode:

Code: [Select]
#dig
d, d, d, d,d
d,md,md,md,d
d,md,md,md,d
d,md,md,md,d
d, d, d, d,d

or, equivalently:
Code: [Select]
#dig
d,d,d,d,d
d,md(3x3),,,d
d, , , , d
d, , , , d
d,d,d,d,d

There is also a global quickfort setting `force_marker_mode` which will apply all blueprint dig tiles in marker mode while it is set to true:

Code: [Select]
[DFHack]# quickfort run important_level.csv
[DFHack]# quickfort set force_marker_mode true
[DFHack]# quickfort run level_i_just_want_to_plan_but_not_dig_right_now.csv
[DFHack]# quickfort reset

setting marker mode in the UI with 'M' won't affect quickfort since it doesn't use the UI to run the blueprint. It designates the tiles directly in DF's memory structures. I probably *could* use the 'M' state as a replacement for the flag, though, if people find that more intuitive.

as lethosor said, auto-dig probably doesn't make sense to support.

Perhaps assume a bare digit to be "dig, priority <n>", like the suggestion of a bare letter to be "<whatever>, priority 4". Any requirements beyond that (or pedantic specification of the assumption, for at least the better human readability of the 2.5-dimensional data without the overwhelming vision of whitespace 'gaps') need to be char+digit.

this sounds good to me. I'll call this the plan.
Title: Re: DFHack script: quickfort
Post by: myk on August 28, 2020, 01:37:17 am
This is my current "what's next" short list, though I'm holding off on any more Lua code development while I get the current quickfort code merged into master. I do want to highlight that others are welcome to contribute to this script as well!


The case study will be a deep dive into how the library "Dreamfort" set of blueprints is put together. Those blueprints use pretty much every quickfort feature, so the case study can model how to create advanced blueprints using practical examples, as opposed to the simplified "toy" examples currently in the user guide. I'm hoping this will lower the difficulty of authoring a blueprint.

I think the enhancements to buildingplan will also be a game changer. Having designated buildings suddenly disappear because of lack of materials is a confusing and frustrating player experience. The workaround is currently to run quickfort orders first and pre-build the materials, but when buildingplan supports all building/construction types players can designate first and build materials later without issues.

For the last item -- more library blueprints -- I'd love to hear ideas from the players here on what would be a good, generally useful and/or instructive blueprint to have in a standard library. Right now I have Dreamfort, post-embark workshops and stockpiles, exploratory mining patterns, and marker-mode diagonal lines that can be used to find diagonal intersections. What else should we include?
Title: Re: DFHack script: quickfort
Post by: Zalthor on August 29, 2020, 02:12:10 pm
What else should we include?
The bedroom styles from the old quickfort library provided in the LNP.

Edit: Also, is there some bug with queries, or am I simply not using it correctly? I generate a blueprint in DFHACK, and apply the query blueprint to a set of rooms I've built, but it doesn't apply. No errors appear in the log, so I'm confused.
Title: Re: DFHack script: quickfort
Post by: myk on August 29, 2020, 06:25:51 pm
try applying the blueprint with the -v parameter to enable verbose logging. If something unexpected is   happening, that should tell you why.

Are the bedroom blueprints online somewhere I can check them out? Are they from https://github.com/joelpt/quickfort/tree/master/Blueprints ?

Thanks to lethosor, who has been reviewing all my code, the quickfort script was fully merged into the DFHack/scripts master branch. The most up to date code will now always be available in the standard unstable builds.
Title: Re: DFHack script: quickfort
Post by: Zalthor on August 29, 2020, 08:00:58 pm
Are the bedroom blueprints online somewhere I can check them out? Are they from https://github.com/joelpt/quickfort/tree/master/Blueprints ?
No, they're in the ...\LNP\utilities\Quickfort\blueprints folder from the PeridexisErrant's Starter Pack (https://dffd.bay12games.com/file.php?id=7622).

I uploaded them separately as well, if you would prefer. (https://mega.nz/file/qtFV3aQR#zMogJ7ePwogUSxhcuhPFRH4QJCxTw-s2qV9x_I5eC-Q)

Edit: I attempted the command with verbose logging, and it says that it is applying everything (https://i.imgur.com/LnJwAKg.png), but then I'm greeted with this (https://i.imgur.com/WV5SBMz.png) blinking, but with no rooms assigned.
Title: Re: DFHack script: quickfort
Post by: myk on August 29, 2020, 09:29:29 pm
Ahh, I'm guessing the blueprint plugin is missing the enter at the end: r+ instead of r+&. That's actually something I discussed with the author of the original quickfort (Joel): why did r+ ever work? If you enter that in the ui, you get exactly what you see in your screenshot - the room isn't applied until you hit enter! Joel didn't know why it was functional. it might have been a bug or a side effect of the "choose next available material" algorithm used for buildings.

Since there are probably a lot of blueprints out there that have this, I'll see if I can alias r+ to mean r+&. Thanks for bringing this to my attention!

Until then, put a & at the end and that should get it working.

edit: sent PR#188 (https://github.com/DFHack/scripts/pull/188) to fix this.
Title: Re: DFHack script: quickfort
Post by: myk on August 30, 2020, 07:59:16 pm
I took a stab at dig priorities: https://github.com/DFHack/scripts/pull/190
Please take a look at the pull request (if you like looking at code : ) and comment if the implementation doesn't match your expectations.

The syntax for dig blueprints is now [letter][number] where if the letter is not specified, 'd' is assumed, and if number is not specified, 4 is assumed.

expansion syntax is the same.

examples:
d = dig this tile at priority 4
d1 = dig this tile at priority 1
1 = dig this tile at priority 1
d7(50x50) = dig this giant block at priority 7

lethosor is currently converting the quickfort user manual from markdown to reStructuredText (the format that the rest of DFHack's documentation is written in), so I don't want to make any changes there right now.  I'll document this feature when he's done.
Title: Re: DFHack script: quickfort
Post by: myk on August 31, 2020, 12:07:33 am
I uploaded them separately as well, if you would prefer.

Thanks! I've been looking through them. There are a lot in there, even only considering the bedrooms! Do you have an opinion on which are the most useful? Every file we add makes the library list more confusing. I'd like to be selective about what we add.

I did implement searching for the quickfort list command (and gui), but that only helps if you know what you're looking for. I'd like to keep the library distributed with DFHack small enough that it's not overwhelming for a newbie -- say, 30 files. We can always add links in the documentation to places where people can find more.
Title: Re: DFHack script: quickfort
Post by: myk on September 04, 2020, 07:28:14 pm
Ok, I wrote up a guide for advanced blueprints. It's a little longer than I expected it would be, and the audience is probably smaller than the rest of the user guide, but I'm hoping it will be useful to the "serious blueprinters" out there!

I'm planning on getting it properly reviewed and merged into the user guide once lethosor migrates it to RST format, but here's a first draft:

Spoiler (click to show/hide)

the links got lost when I pasted it in, but this is the important one:
Dreamfort blueprints: https://drive.google.com/drive/folders/1iS90EEVqUkxTeZiiukVj1pLloZqabKuP
Title: Re: DFHack script: quickfort
Post by: A_Curious_Cat on September 04, 2020, 11:31:57 pm
Neither of those files contains any blueprints.  The first one contains what appears to be the start of a Dreamfort walkthrough, and the other one purports to be for a guildhall, but (like the first one) doesn't contain any actual blueprints.
Title: Re: DFHack script: quickfort
Post by: myk on September 05, 2020, 12:19:11 am
Sharing settings are hard, apparently. Do all 7 files appear in the folder now? The first sheet in each file, by the way, is just notes and help text. The blueprints are in additional sheets. Use the tabs at the bottom of the page to switch sheets in the spreadsheet. dreamfort_0_help is just the one sheet with mostly text, though. It is actually a blueprint with no content, just metadata. It's the help text that gets displayed in-game for Dreamfort.

Edit: I verified everything in incognito mode. All blueprints should now be accessible.
Title: Re: DFHack script: quickfort
Post by: myk on September 09, 2020, 04:03:30 pm
There is one particular feature that python quickfort had that I haven't implemented yet. The old quickfort would accept blueprints that had no modeline and interpret them as #dig blueprints. I didn't implement this for a few reasons:
But looking through the blueprint library that Zalthor was so kind to upload, I see there are quite a few modeless blueprints in there. This, plus a comment lethosor made when I first implemented dig mode, made me rethink my position. Backwards compatibility is very important, and I don't want to break any blueprints that were working before.

So this is my new plan:
- if the first line of a .csv file or spreadsheet sheet has no modeline, assume #dig. that blueprint will run until the next modeline in the file, just like a regularly-specified blueprint
- introduce a new mode: #notes which can contain any text, will not show up in quickfort list, and will run until the next blueprint modeline is detected. we already have #comment syntax for inline comments. #notes mode will essentially act as a block comment.

Then I'll just convert all the "Notes" sheets in the Dreamfort blueprint set to #notes "blueprints". This has the added benefit that I can stop filtering those sheets out when I convert the .xlsx data to .csv for the DFHack blueprint library dreamfort.csv file. The notes will now be available in the .csv file if anyone goes spelunking in there to look for them.
Title: Re: DFHack script: quickfort
Post by: myk on September 13, 2020, 05:01:29 pm
I'm making progress on all-buildings support in buildingplan (https://github.com/DFHack/dfhack/issues/1640). I'm hoping to get it done before quickfort is officially released in -r3 since it will be such a usability improvement, but we'll see.

The one thing this script *really* needs, though, is some playtesting, especially by people who are not me -- since my "style" is already fairly well tested. For the readers out there (and from the view count I know there are a lot of you), would you be willing to download the latest unstable automated build (https://dfhack.org/builds/) and try running a few of your favorite blueprints? I would really appreciate it! It would help me get the "facepalm" bugs out of the way before the script is exposed to a wider audience.
Title: Re: DFHack script: quickfort
Post by: PeridexisErrant on September 15, 2020, 08:45:31 pm
Are the bedroom blueprints online somewhere I can check them out? Are they from https://github.com/joelpt/quickfort/tree/master/Blueprints ?
No, they're in the ...\LNP\utilities\Quickfort\blueprints folder from the PeridexisErrant's Starter Pack (https://dffd.bay12games.com/file.php?id=7622).

I uploaded them separately as well, if you would prefer. (https://mega.nz/file/qtFV3aQR#zMogJ7ePwogUSxhcuhPFRH4QJCxTw-s2qV9x_I5eC-Q)

Also available from https://dffd.bay12games.com/file.php?id=8185, if that would help... though for the last ~three years or so they've been packaged up with the Quickfort implementation I've shipped.

Personally I'm super excited to change over to the plugin implementation, but I'll probably keep shipping the Python version until it breaks since some people prefer to play without DFHack (strange, but true!).
Title: Re: DFHack script: quickfort
Post by: myk on September 17, 2020, 04:27:15 am
Thanks! I'm still looking though all the blueprints, trying to figure out exactly what the role of the DFHack blueprint library should be. Which blueprints should be adopted into the "core" library and which should be add-ons? I definitely want Dreamfort in the DFHack library since it is the main example for all of quickfort's features, and I want the core library to be small enough so that it isn't overwhelming, but the only other requirement I see for the core library blueprints is that they are generally useful. I'd appreciate your thoughts on this.

Quickfort reads user blueprints from the blueprints/ directory and library blueprints from the blueprints/library/ directory. Which do you think LNP should add its blueprints to? The difference is that library blueprints don't show up in the quickfort list output unless the -l or --library parameters are specified, which I think is appropriate for LNP blueprints so they won't crowd out user-created blueprints in the list output, but might make them less discoverable. Maybe install them in blueprints/library/LNP?
Title: Re: DFHack script: quickfort
Post by: PeridexisErrant on September 19, 2020, 03:21:51 am
I'd default to sticking them in the library directory - to help with discoverability, how about adding a hint line like "[and list NN more with `quickfort list --library`]" as the last line of default output? 
Title: Re: DFHack script: quickfort
Post by: myk on September 21, 2020, 06:03:50 pm
That's a good idea. I have something similar for searches ("45 blueprints did not match filter"), but I hadn't thought about making the library more discoverable that way too. I'll add that to my todo list.

In other news, I've finished generalizing the code in buildingplan plugin so it can handle all building types. It actually runs much faster than the old code - 100 to 1000 times faster - but you're unlikely to notice unless your fort is very large with lots of items. So unless something comes up in code review, that's done. Yay ^_^

edit: actually, not quite done. need to update the buildingplan UI to handle buildings that have multiple input items.
Title: Re: DFHack script: quickfort
Post by: myk on September 26, 2020, 12:42:47 am
Ok, getting the ui to handle multiple items took some work, but it's functional now. C++ is finicky about how constness works, and that required some jumping through language hoops. Like, it's very difficult to have a non-mutable container of mutable objects. C++ forces the objects to inherit the constness of their container, which required a custom wrapper, which required a..ok enough ranting.

Anyway, here are the visible changes coming to buildingplan:

And it's also like 100x faster, but buildingplan was already mostly "fast enough" so you probably won't notice it.

The algorithm is generalized so that when new building types become supported by the dfhack library, buildingplan will automatically pick them up.
Title: Re: DFHack script: quickfort
Post by: myk on September 27, 2020, 11:56:54 pm
I'd default to sticking them in the library directory - to help with discoverability, how about adding a hint line like "[and list NN more with `quickfort list --library`]" as the last line of default output?

done in PR#200 (https://github.com/DFHack/scripts/pull/200)
Title: Re: DFHack script: quickfort
Post by: PeridexisErrant on September 28, 2020, 03:45:17 am
☼pull request☼

(I remain very, very excited for a DFHack release which includes this  :D)
Title: Re: DFHack script: quickfort
Post by: danaris on September 28, 2020, 11:34:21 am
And I'm very excited to see this idea of mine from several years ago (that I was never able to do justice to) finally take form! You've done an amazing job, myk.
Title: Re: DFHack script: quickfort
Post by: myk on September 28, 2020, 04:45:25 pm
Thank you both! I'm excited to see this go out too, but it remains to be seen whether I've done a good job -- the lack of beta testers makes me very nervous. I am but a simple coder. I have stars in my eyes, but I have written no unit tests. Lethosor has been awesome finding bugs in code reviews, but despite whatever testing we have done, the chance that my >4000 line script (plus the >2000 line rewrite of buildingplan) is bug-free is essentially nil.

n.b. I do have plans for unit and integration tests, but there are a lot of organizational and technical hurdles to figure out before tests are feasible. Once the tests are in place, though, we can have much more confidence that future changes to the quickfort script won't break existing features.
Title: Re: DFHack script: quickfort
Post by: myk on October 05, 2020, 06:29:19 pm
Just a quick update: support for all building types in buildingplan (https://github.com/DFHack/dfhack/issues/1640) is making its way through code review, and in the meantime, I started work on zone configuration. You can already set the flags for the zone type(s), but this is for the settings on the sub-screens, like pit/pond or hospital supplies. Hospital supplies was tricky since there are no hotkeys defined in the UI for setting the values. I had to come up with a syntax for use in zone blueprints. The code I wrote for it might someday be useful for parameterized query blueprint aliases too. Like, currently to set up a quantum dump you'd write something like:
Code: [Select]
#query
{quantumstopfromeast}{namelastrouteprefix}Goods/Wood quantum{namelastroutesuffix}
but we could potentially use the syntax I defined to simplify to:
Code: [Select]
#query
{quantumstopfromeast name="Goods/Wood quantum"}
I put that on my "Future ideas" list

I also looked into how hard it might be to assign animals to pastures in #zone blueprints. This would eliminate another common manual step in fortress setup. It looks like the zone (https://docs.dfhack.org/en/latest/docs/Plugins.html#zone) plugin might do what we need here. I'd just need to build an interface to the zone plugin that I could call from quickfort. Hopefully it will be easier to update than buildingplan was!
Title: Re: DFHack script: quickfort
Post by: myk on October 09, 2020, 10:33:05 am
A release is coming! A release is coming!

-r3 is upon us!

The quickfort script will finally be part of an official release! I'm looking forward to the bug reports ^_^

We decided to delay the buildingplan changes until -r4, though, so we can have more time to test. I expect some users will be annoyed when their buildings disappear due to lack of materials, but we *really* don't want to break buildingplan with a hasty release.
Title: Re: DFHack script: quickfort
Post by: Nameless Archon on October 12, 2020, 05:16:20 pm
Keeping an eye on this one - Quickfort has always been one of my favorite tools and I'm looking forward to demonstrating this one later on stream this month.
Title: Re: DFHack script: quickfort
Post by: myk on October 13, 2020, 02:07:55 pm
That would be awesome! The -r3 release is finalized, so please try it out! I would love to hear your impressions and suggestions on what could be done better.

Now that quickfort is part of an official release, the docs are available on the DFHack docs server:

As of now, this is my plan for -r4 (totally open for change, though, if there are requests from the community):
of course
This solves the #1 usability problem: buildings disappearing after running a #build blueprint because of lack of required materials. quickfort orders (https://docs.dfhack.org/en/latest/docs/guides/quickfort-user-guide.html#generating-manager-orders) will generate manager orders to manufacture everything you need for a #build blueprint, but once buildingplan supports all buildings, you won't have to actually wait for all the orders to be fulfilled. You can run the #build blueprint right away.
Quickfort and buildingplan will pick up support for free once the core library supports them. After this, the only building type left is instruments, but those will be considerably more difficult to support since they're handled so differently by the game.
Allows us to simplify #query blueprint alias definitions like {myaliasprefix}something{myaliassuffix} to {myalias varname=something}
You can currently do this in #query blueprints, but the functionality would be more at home in a #zone blueprint. Hospital settings, which have no hotkeys assigned, will use the parameterized alias syntax defined by the previous task.
I feel like this is important to help people get started with quickfort, but I would feel more comfortable with community feedback about which blueprints would be best to include. I don't want to just include everything that's out there. That would be overwhelming for someone who is seeing quickfort for the first time. What I would like here at least is a good set of generally useful #dig blueprints accompanied by corresponding #build (and, if applicable, #query) blueprints
This will be going on in the background for a while, I think, but I want to get it started. I want to get the code fully tested and then integrate the tests into the automated pull request verification process. Quickfort is very large -- it is already the largest script in all of DFHack -- and it depends on other plugins and core DFHack functionality that other people modify. It's impossible to manually test everything after every change. Automated tests will help keep quickfort from getting broken by future changes.
Title: Re: DFHack script: quickfort
Post by: ESharpAxe on October 17, 2020, 01:03:24 am
Is this the right place to ask a question about dreamfort? I loaded PeridexisErrant's Starter Pack 0.47.04-r09, which has DFHack 0.47.04-r3. I've never used quickfort before, so I am trying dreamfort from the library with
[DFHack] # quickfort list -l
I ran the "/surface1". I get a message that says
Once the area is clear, continue with /surface2.
I'm not sure what that means. Is there some documentation or walkthrough on how to run dreamfort? What is a good way to learn quickfort?
Title: Re: DFHack script: quickfort
Post by: myk on October 17, 2020, 01:36:11 am
Hi! Yes, this is definitely the right place to ask. I put the Dreamfort set of blueprints (https://drive.google.com/drive/folders/1iS90EEVqUkxTeZiiukVj1pLloZqabKuP) together to showcase what quickfort can do.

The Dreamfort walkthrough is the first blueprint in the series - the "/help" blueprint. You can run it to read it, or see it online here (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit?usp=drivesdk).

Run quickfort list dreamfort -l to just see the Dreamfort blueprints -- or run quickfort gui and set the filter to dreamfort.

To answer your question, though, /surface1 clears some trees on the surface, and /surface2 builds starting workshops in the clear area. That's what the message is referring to.

I'm definitely interested in hearing how quickfort can be made more accessible. If you have trouble, or if anything isn't as clear as it should be, please share your thoughts on this thread!
Title: Re: DFHack script: quickfort (and the blueprint library)
Post by: ESharpAxe on October 18, 2020, 08:28:45 pm
TL;DR Quickfort is not accessible to me without learning the blueprint macro language to make use of quickfort.

Here's the story of my introduction to quickfort. I hope my n00b perspective can help those wishing to expand the accessibility of quickfort to achieve their goals.

Two different programs with one language.
At first I was confused by having fun reading documentation where some docs referred to a DFHack command, while other docs referred to a Python utility that needed to be running. In my Starter Pack, I found two folders called blueprints. When I ran quickfort like this
[DFHack]# quickfort
I got this output
quickfort is not a recognized command.
After more documentation fun, I found that I needed Starter Pack 0.44.12-r09 instead of the 0.44.12-08 I was using. After a quick upgrade, I found the quickfort command I wanted to use.

After a couple of hours of documentation fun and an understanding that the DFHack quickfort is a new implementation of an old Python program, I was ready to apply some blueprints. I had learned that the new  quickfort script is supposed to use the same blueprint language that the old Python program used. My preliminary orientation was complete.

I guess I could work on the dwarffortresswiki.org to help others become aware of the two different programs and the multiple blueprints folders in the Starter Pack.

My hopes for quickfort.
When I first started exploring quickfort, I imagined that it might be a way for me to experience other fort designs. I was excited to experience and learn about someone else's approach to the game.

Even though I've been playing DF for six years, my forts are rudimentary and quick to fail. I never figured out channeling, wall building, or levers. My rudimentary forts do have a pattern though. I thought that I would like to capture that and start building on it with quickfort.

I hoped I would be able to apply blueprints and capture existing structures into blueprints without learning the blueprint macro language. I hoped and wondered if it was possible for me to build a fort with quickfort by applying a blueprint example, make some modifications, capture the design to a new blueprint, and apply the new blueprint to a fresh embark. I hoped I would be able to use a blueprint like some kind of JSON nugget of fort design. I imagined that the Design Strategies page in the dwarffortresswiki.org would maybe start referencing some blueprints as examples of security, efficiency, or aesthetics.

Wow! This quickfort thing is going to be awesome.

Hopes dashed.
I was off to find a blueprint to start with. Most blueprints are just code. TheQuickFortress looked good, but after a couple of paragraphs, I ran into this.
Consider building Blueprints/General/embarding-build.csv and -stockpiles.csv first (outside of your 30x20 footprint).
I couldn't figure this out. It seemed like there were missing pieces. So, I gave up on that. The only other blueprint that sounded like what I wanted and had some documentation to go along with it was Dreamfort. It also had the advantage of being included in the DFHack blueprints library.

I started running the Dreamfort though quickfort. I was reading all the messages on the screen from "/help." A message said
Directly after embark, apply /surface1 on a flat area on the surface
I thought I better chop down all the trees to make it flat. I hoped the wood piles would be okay. I wasn't exactly sure what "flat area" meant. So, I had the dwarfs chop down all the trees.
Another message said to be sure to bring blocks. I have never used blocks, so I wasn't sure if my embark was suitable for Dreamfort. The message said to apply "/surface1" on a flat surface and "/industry1" underground. I was wondering how they would be connected. I ran "/surface1" and got this message.
Once the area is clear, continue with /surface2.
I wondered if I needed to have all the wood piles cleared from the surface. I wasn't sure what "area is clear" meant.
I navigated my game cursor down a few levels. I ran "/industry1." When I resumed the game, I started getting announcements about non-economic blocks and unable to complete <some> workshop.

This is when I had had enough fun on my own and decided to ask for help.

Going forward
It seems there is no way for me to use quickfort without learning the blueprint macro language. The Quickfort User Guide states that it "teaches players how to understand and build blueprint files. It also says that the Dreamfort case study is a practical guide to advanced blueprint design. I'm starting to think of quickfort as a macro interpreter that reads the blueprint macro language. I do not think it is a tool that helps me build fortresses that other people have designed. I now think of the Quickfort User Guide as a blueprint programming manual.

I think of the Quickfort User Guide as something like The C Programming Language by Kernighan and Ritchie. I think the Quickfort User Guide could benefit from a "hello, world" example. To quote from Kernighan, "The only way to learn a new programming language is by writing programs in it." If Dreamfort is a showcase of blueprint code, I think the "hello, world" example should be one of the first building blocks of Dreamfort. There are a few code chunks in the Editing Blueprints section of the Quickfort User Guide, I plan to write files based on those code chunks and learn the language. Once I learn enough to read the Dreamfort "/surface1", I hope to be able to take chunks of code from that file to make a tutorial for myself.

This post is too long, but I wanted to capture my n00b perspective in hopes that it might help hose wishing to expand the accessibility of quickfort to achieve their goals.


Title: Re: DFHack script: quickfort (and the blueprint library)
Post by: myk on October 19, 2020, 01:25:03 am
TL;DR Quickfort is not accessible to me without learning the blueprint macro language to make use of quickfort.

First of all, thank you very much for your feedback! I've been working mostly blind up to this point, and stories like this really help me figure out the next steps I need to take. It definitely looks like you've run into some rough edges. Let me see what I can do to smooth them out. You touch on a lot of topics, so methinks this will also be a long post.

From your story, I'm hearing that:
Let me say that allowing players to easily experience other's fort designs is exactly what I want for quickfort. To me, this has meant:

Dreamfort has been my main test case for figuring out what features I need to add. Each Dreamfort level has a list of manual steps you still have to take. One of my goals is to get those lists down to zero.

You have pointed out a number of glaring holes in the documentation, though (sorry, another list. i like lists, it seems):


Quote
I hoped I would be able to apply blueprints and capture existing structures into blueprints without learning the blueprint macro language. I hoped and wondered if it was possible for me to build a fort with quickfort by applying a blueprint example, make some modifications, capture the design to a new blueprint, and apply the new blueprint to a fresh embark.

Let me introduce you to the blueprint plugin (https://docs.dfhack.org/en/stable/docs/Plugins.html#blueprint), which looks at the map area you specify and writes a quickfort blueprint. The blueprint documentation refers to another tool, fortplan, which is another previous, partial implementation of quickfort functionality. The quickfort script will be able to play them back. The blueprint plugin cannot capture every nuance of your setup, though. For example, it won't capture stockpile configuration, so you might still have to make some manual blueprint modifications, particularly in the #query blueprints.

Quote
When I resumed the game, I started getting announcements about non-economic blocks and unable to complete <some> workshop.

I plan to fix this in the next DFHack release. Blocks are generally preferable to boulders for a number of reasons (http://dwarffortresswiki.org/index.php/DF2014:Block#Blocks_vs._rocks), and if quickfort didn't restrict the building to using blocks, the game might choose to use your precious iron bars, or coal, or potash, or logs, or some other material with other, better uses. However, as you've seen, if you don't have blocks, this feature is just an annoyance. I'm rewriting it to prefer blocks if they're available, and otherwise use boulders or logs. This should "just work" by default. In the meantime, you can edit your dfhack-config/quickfort/quickfort.txt file and change the buildings_use_blocks setting to false.

Quote
In my Starter Pack, I found two folders called blueprints.

I'll talk to PeridexisErrant about that -- it seems to me that we should be able to combine them.

Quote
I guess I could work on the dwarffortresswiki.org to help others become aware of the two different programs

This is the very first release of the DFHack quickfort script, so the internet isn't very aware of it yet. I would definitely appreciate it if you started adding links to DFHack quickfort on the wiki!

Quote
I think of the Quickfort User Guide as something like The C Programming Language by Kernighan and Ritchie. I think the Quickfort User Guide could benefit from a "hello, world" example. To quote from Kernighan, "The only way to learn a new programming language is by writing programs in it." If Dreamfort is a showcase of blueprint code, I think the "hello, world" example should be one of the first building blocks of Dreamfort. There are a few code chunks in the Editing Blueprints section of the Quickfort User Guide, I plan to write files based on those code chunks and learn the language. Once I learn enough to read the Dreamfort "/surface1", I hope to be able to take chunks of code from that file to make a tutorial for myself.

This is why the engineers shouldn't write the docs. I'm too familiar with the code. I would love to see any tutorial that you write, and, with your permission, maybe integrate it into the official docs.
Title: Re: DFHack script: quickfort (and the blueprint library)
Post by: ESharpAxe on October 19, 2020, 11:36:13 pm
I believe you got all that I was trying to say. Thank you for the info on "blocks not rocks." I'm working on learning the blueprint language. I find the Quickfort User Guide helpful for that. I'll be back with more when I get a few blueprints to run right. I like the direction you are taking this. I hope to be able to help you more. Now, back to fun with blueprints for me.
Title: Re: DFHack script: quickfort (and the blueprint library)
Post by: myk on October 20, 2020, 01:52:52 pm
I look forward to seeing what you are able to accomplish! As you experiment more, I would love to hear your thoughts on what works well and what doesn't.

To alleviate the confusion around requiring blocks by default for quickfort buildings, I'm planning on moving the material matching functionality to buildingplan (which quickfort uses to manage placed buildings). Buildingplan is much better suited for this kind of thing since it already deals with material selection. I would have done it this way to begin with, but I only recently rewrote buildingplan to get it into shape to handle features like this.

I'll remove the buildings_use_blocks setting from quickfort and introduce a new Global Settings page for buildingplan. Settings pages are surprisingly hard to write -- how much help text do you need? How should everything be formatted? What granularity of settings should you provide? How much familiarity with buildingplan concepts can you assume the player has?

Anyway, here's a mockup of the new settings page (accessible via the 'G' hotkey shown on every building build sidebar, where the other buildingplan hotkeys already are). I included a bunch of features from my TODO list that I intend to add to buildingplan eventually to fill the page out a little more. The first version will likely only have the generic/fire-safe/magma-safe building material type toggles and the Legacy Quickfort Mode toggle.

Code: [Select]
                          Buildingplan Global Settings
 
  e: Enable all: Off
    Enables buildingplan for all building types. Use this to avoid having to
    manually enable buildingplan for each building type that you want to plan.
    Note that DFHack quickfort will use buildingplan to manage buildings
    regardless of whether buildingplan is "enabled" for the building type.
 
  Allowed types for generic, fire-safe, and magma-safe building material:
  b: Blocks:   On
  s: Boulders: On
  w: Wood:     On
  r: Bars:     Off
    Changes to these settings will be applied to newly-planned buildings.
 
  A: Apply building material filter settings to existing planned buildings
    Use this if your planned buildings can't be completed because the settings
    above were too restrictive when the buildings were originally planned.
 
  M: Edit list of materials to avoid
  potash
  pearlash
  ash
  coal
    Buildingplan will avoid using these material types when a planned building's
    material filter is set to 'any'. They can stil be matched when they are
    explicitly allowed by a planned building's material filter. Changes to this
    list take effect for existing buildings immediately.
 
  g: Allow bags: Off
    This allows bags to be placed where a 'coffer' is planned.
 
  f: Legacy Quickfort Mode: Off
    Compatibility mode for the legacy Python-based Quickfort application. This
    setting is not needed for DFHack quickfort.

I also plan to implement settings persistence across map reloads and support setting these global settings from the [DFHack]# prompt (so you can set things the way you like from dfhack.init).
Title: Re: DFHack: quickfort / buildingplan / blueprint / blueprint library
Post by: myk on October 24, 2020, 11:58:01 pm
I think at this point I've completed the critical changes I was hoping to get into the next release (0.47.04-r4):

Once these are out in the upcoming -r4 release, I'd like to focus more on testing (though I have a seemingly endless list of features that I'd like to get to as well). My hope is that as usage of quickfort picks up, we'll start getting more specific requests.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on October 28, 2020, 08:00:06 pm
One more item I think I need to get in before -r4: there's functionality overlap between the automaterial and buildingplan plugins when placing constructions, and building constructions from the ui is a bit confusing now as a result (building from quickfort works as expected, though). I need to get automaterial and buildingplan talking to each other so the right thing happens if both, one, or neither plugin is enabled.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on November 04, 2020, 05:25:13 pm
Ok, 0.47.04-r4 is just about wrapped. Found and fixed a few more small bugs. Nothing to write home about.

With the buildingplan changes in this release, players can finally lay out entire fortresses and everything will just "come into being" as items are manufactured (automated with quickfort orders). This has been my dream since I started playing DF decades ago, and is the main reason I started this project. I've lost count of the number of times I've started building my fortress, just to get interrupted when I ran out of materials and lose my train of thought. Now I can design in peace and things will just happen! : )

This, along with the manager orders (https://drive.google.com/file/d/17WcN5mK-rnADOm2B_JFpPnByYgkYjxhb/view?usp=sharing) that I distribute with dreamfort (https://drive.google.com/drive/folders/1iS90EEVqUkxTeZiiukVj1pLloZqabKuP) (put the file in dfhack-config/orders/ and use with
Code: [Select]
orders import automation) means that the low level toil of building a self-sustaining fortress is now completely automated, and players can focus on other exciting things, like trade or dwarven engineering projects or preparing for HFS or conquering the world!

@Nameless Archon: if you're still looking to do a quickfort stream, I think this release will give you something pretty exciting to show : D

So what's next?

Lethosor and I have been having a good discussion (https://github.com/DFHack/dfhack/issues/1690) about automated regression testing, and I'm excited to get started on that after -r4. It's great to build something cool, but in software, the greater challenge is keeping it running. Despite its importance, it's the less shiny side of engineering, so I'm unlikely to talk about it much here. If there are any reliability engineers (test engineers, SREs, etc.) reading this who have an opinion, feel free to chime in at the link above.

Other than testing, I have my eyes on a few high-level objectives:
This is a continuing goal to eliminate manual steps when applying blueprints. My primary driver is dreamfort, where there are still steps like "assign grazing animals to pasture" and "assign minecart to route" that can't yet be done by a blueprint. Also features like blueprint repetitions and transformations, and syntax for context-sensitive repetitions like "repeat until map edge" or "repeat until surface".
This comes down to expanding the usability and capabilities of the blueprint (https://docs.dfhack.org/en/latest/docs/Plugins.html#blueprint) plugin. There is a lot of information about a fort that we can detect and record in blueprints that the plugin doesn't do yet.
As ESharpAxe suggested, it would be useful to have downloadable blueprints on the wiki wherever there are design examples.

As always, I'd love to hear suggestions and feedback from the community as well.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on November 05, 2020, 12:40:28 am
Out of curiosity what happens when quickfort encounters that caverns while digging?  Can it cancel the part that extends into the cavern and automatically wall-up the hole?  Also, how good is it at recovering from breaching the caverns from above.  Can it make proper by-passes?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on November 05, 2020, 01:31:20 am
Quickfort doesn't autodig, it applies blueprint files like this one (https://docs.google.com/spreadsheets/d/1riVrl2NMB4w0rah4gAbStDu4OrGLU21HMHq2DSN3sUA/edit#gid=2051360746). For a #dig blueprint, quickfort designates the tiles for digging and then exits. It's not actually active while your dwarves are digging out the designated tiles. If you run a #dig blueprint and dig into a cavern because of it, the game responds as it usually does - the tiles that you now know to be in mid-air are undesignated, and everything else is up to you to fix. There is a quickfort undo command, at least, to quickly undesignate the tiles that you now don't want dug out.

Your question makes me think, though, there is no reason why quickfort can't monitor progress through a blueprint and automatically apply the next blueprint at the right time. For example, it could detect when you're done digging out a #dig blueprint and then automatically apply corresponding #build and #place and #query blueprints. This...is an interesting idea. I'll have to think about how this might be accomplished.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on November 09, 2020, 07:19:37 pm
has blueprint (https://docs.dfhack.org/en/stable/docs/Plugins.html?#id230) been properly extended to work with the new version of quickfort and it's features?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on November 09, 2020, 10:29:24 pm
The blueprint plugin will currently produce perfectly valid blueprints that dfhack quickfort will use, but it has not yet been modified to take advantage of all of dfhack quickfort's new capabilities. This is my feature list for blueprint that I expect to work on (any help from the community on this is, of course, very much appreciated):
blueprint doesn't write output for all building types. There is some duplication here since both blueprint and quickfort need complete mappings of hotkeys to building types. I plan to factor a queryable database out of quickfort that they both can use so we only have one place to maintain the mappings.
That is, make use of dfhack quickfort's extended modelines: comment, label, start position and start_comment, message, hidden, etc. More info about modelines in the guide (https://docs.dfhack.org/en/latest/docs/guides/quickfort-user-guide.html#modeline-markers)
at least pick up all the top-level enabled categories. recording full stockpile configuration will take a lot more work, though
more than just the current if room then "r+". I'm thinking actual room sizes, justice settings, door settings, etc.
If they're within the same blueprint

And then I'm thinking blueprint needs some usability features too:
blueprint is not very user friendly when it comes to specifying the area to scan. I'd like to add a "box select" mode (perhaps stolen  from/shared with the automaterial feature of the same name) so you can select the bounds of your blueprint directly on the game map.

I don't have this work scheduled for myself yet, but it is on my radar.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on November 10, 2020, 01:07:40 pm
The blueprint plugin will currently produce perfectly valid blueprints that dfhack quickfort will use, but it has not yet been modified to take advantage of all of dfhack quickfort's new capabilities. This is my feature list for blueprint that I expect to work on (any help from the community on this is, of course, very much appreciated):
  • Support remaining building types
blueprint doesn't write output for all building types. There is some duplication here since both blueprint and quickfort need complete mappings of hotkeys to building types. I plan to factor a queryable database out of quickfort that they both can use so we only have one place to maintain the mappings.
  • Specify blueprint modeline metadata
That is, make use of dfhack quickfort's extended modelines: comment, label, start position and start_comment, message, hidden, etc. More info about modelines in the guide (https://docs.dfhack.org/en/latest/docs/guides/quickfort-user-guide.html#modeline-markers)
  • Multi-type stockpiles
at least pick up all the top-level enabled categories. recording full stockpile configuration will take a lot more work, though
  • Non-rectangular stockpiles
  • Zone blueprints (incl. detailed settings)
  • Room configuration
more than just the current if room then "r+". I'm thinking actual room sizes, justice settings, door settings, etc.
  • Stockpile links (give/take)
If they're within the same blueprint

And then I'm thinking blueprint needs some usability features too:
  • Select target area with cursor
blueprint is not very user friendly when it comes to specifying the area to scan. I'd like to add a "box select" mode (perhaps stolen  from/shared with the automaterial feature of the same name) so you can select the bounds of your blueprint directly on the game map.

I don't have this work scheduled for myself yet, but it is on my radar.

I've been looking through the guide that you posted a link to and it doesn't mention anything about you or your accomplishments.  It also refers to quickfort as a script.  I thought the new version was a plugin.  Are you sure this is the latest documentation?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: lethosor on November 10, 2020, 02:39:52 pm
Assuming you are referring to https://docs.dfhack.org/en/latest/docs/guides/quickfort-user-guide.html, it is the latest - it has "latest" in the URL. This thread and that guide are about the new quickfort script, which is implemented as a DFHack script. It has always been a script, never a plugin (see also the first post of this thread). The guide does reuse some material (but not all) from an older implementation of quickfort, which was an external utility (independent of DFHack) written in Python.

You may be confusing this with blueprint (https://docs.dfhack.org/en/latest/docs/Plugins.html#blueprint), which is a plugin that has existed for a while and can be used in combination with quickfort, but it has a different use-case.

Quote
it doesn't mention anything about you or your accomplishments
I'm not really sure what you're looking for, but these don't seem like things that belong in the documentation to me (other than possibly mentioning breaking changes, but the guide currently says that any Python quickfort blueprints should work with this script). There are lots of contributors to DFHack, listed on the authors page (https://docs.dfhack.org/en/latest/docs/Authors.html), and changes are listed in the changelog (https://docs.dfhack.org/en/latest/docs/NEWS.html) (including some quickfort changes).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on November 10, 2020, 05:33:38 pm
Assuming you are referring to https://docs.dfhack.org/en/latest/docs/guides/quickfort-user-guide.html, it is the latest - it has "latest" in the URL. This thread and that guide are about the new quickfort script, which is implemented as a DFHack script. It has always been a script, never a plugin (see also the first post of this thread). The guide does reuse some material (but not all) from an older implementation of quickfort, which was an external utility (independent of DFHack) written in Python.

You may be confusing this with blueprint (https://docs.dfhack.org/en/latest/docs/Plugins.html#blueprint), which is a plugin that has existed for a while and can be used in combination with quickfort, but it has a different use-case.

Quote
it doesn't mention anything about you or your accomplishments
I'm not really sure what you're looking for, but these don't seem like things that belong in the documentation to me (other than possibly mentioning breaking changes, but the guide currently says that any Python quickfort blueprints should work with this script). There are lots of contributors to DFHack, listed on the authors page (https://docs.dfhack.org/en/latest/docs/Authors.html), and changes are listed in the changelog (https://docs.dfhack.org/en/latest/docs/NEWS.html) (including some quickfort changes).

Ah.  Thank you.

Btw, does anyone know if quickfort can designate areas for dumping (i.e. d-b-d )?  Or do I have to do that by hand?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on November 10, 2020, 06:34:23 pm
Yeah, all actions in the (d)esignate menu are implemented, including traffic, forbidding, and dumping. 'bd' in a #dig blueprint cell will designate all items in that cell for dumping. This works with expansion syntax too, so you can write, for example,
Code: [Select]
db(20x20) to dump all items in a 20 by 20 area.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on November 10, 2020, 06:38:14 pm
Yeah, all actions in the (d)esignate menu are implemented. 'bd' in a #dig blueprint cell will designate all items in that cell for dumping. This works with expansion syntax too, so you can write, for example,
Code: [Select]
db(20x20) to dump all items in a 20 by 20 area.

Thank you.  Designating stuff by hand is getting tedious.  Especially when I have to designate the same stuff over and over again.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on November 12, 2020, 02:12:02 am
One thing I've noticed is that the Quickfort User Guide only briefly glosses over aliases.  I had to read aliases.txt and aliases-common.txt (and data/init/interface.txt and the associated article on the wiki) to figure out how they work.

Is there any way that you could expand upon the information that the guide gives concerning aliases (i.e. make a section explaining syntax, how to make one's own alias, etc)?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on November 12, 2020, 09:28:21 am
Yeah, Python Quickfort had its alias documentation in aliases.txt, so originally I just continued that tradition. It was only a few lines long anyway. Now that the documentation is much more complete and you have more advanced features like aliases including other aliases, aliases that act as functions with optional parameters, etc., it's starting to make sense to move the documentation to the user guide. I'll add that to my list to do for the next release (DFHack 0.47.04-r5, since -r4 is already in code freeze).

On another note, although you *can* use any named keycode from data/init/interface.txt, it should be very very rare that you need to. What information could I have included in the guide or syntax documentation that would have made you decide that it wasn't worth spending time reading data/init/interface.txt or the keycode wiki article? And since you did read them, did you find any useful information there that I should include directly in the quickfort documentation?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on November 12, 2020, 04:52:12 pm
Yeah, the reason I went to interface.txt was because I was referred there by aliases.txt.  I then used the wiki to try and make sense of the syntax of interface.txt.  As for what I think should be included in the guide:  Basic syntax, an overview of all of the features and how to use them.  Also, a guided example.  And, of course, a list of all of the possible named keycodes.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on November 13, 2020, 02:09:15 pm
I snuck in a few more tiny features before the -r4 release:
You can use those last two in your blueprints like this:
{givename name="some name"} when over a building or stockpile
{namezone name="some name"} when over an activity zone

I also allowed the 'quantum' alias to take a 'name' parameter. So now you can do stuff like succinctly set up a quantum stockpile and give all the parts useful names like this:
Code: [Select]
#place set up weapons quantum stockpile
p, ,c
#build set up quantum trackstop
,trackstopE
#query configure quantum dump
{nocontainers}{givename name="weapons feeder"},{quantumstopfromwest name="weapons quantum rt."},{quantum name="weapons quantum"}

the quantumstopfromwest name names the hauling route and the quantum name names the quantum stockpile itself. Remember that names have a maximum length of 20 characters!

-r4 is almost done. Lethosor and I have been finding and squashing a few bugs and inconsistencies with the new buildingplan behavior. I have to say, Lethosor is an excellent leader for this project. He is extremely supportive of both contributors and players, and he works very hard to make sure DFHack maintains a high standard of quality.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on November 24, 2020, 03:19:37 am
Ok, time to think about what's next. I'm focusing on feedback and refining the user experience right now, so no major new features. Just quality-of-life stuff. Here's my shortlist:

As requested by A_Curious_Cat. One of the major problems with the alias documentation being in aliases.txt is that aliases.txt is a user configuration file and it doesn't get overwritten when you install a new version of DFHack. Therefore, if the docs in aliases.txt get updated, players with existing aliases.txt files *will never see the updated docs*. Pure silliness. Alias documentation belongs on docs.dfhack.org with the rest of the docs.
Right now the parsing function we're using is overly strict about parameter order. For example, quickfort list dreamfort -l is legal syntax but quickfort list -l dreamfort is not. The second form is a more natural ordering and should totally be valid.
Essentially add gui/quickfort as another way to call quickfort gui so people who look for gui-driven scripts in the gui/ directory can find quickfort.
When buildingplan only supported a few building types, it wasn't such a big deal to enable buildingplan for each building type you want to use it for. Now that there are so many supported building types, though, we need a quick way to just enable everything.
Implement 'buildingplan set [settingname] [value]' so settings can be initialized from dfhack.init or onMapLoad.init. I'm personally going to use this to configure buildingplan to enable all building types and only use blocks (and not logs, boulders, or bars) when finding items for buildings that require generic construction materials:
Code: [Select]
buildingplan set all_enabled true
on-new-fortress buildingplan set boulders false; buildingplan set logs false
bars are off by default so we don't actually have to set that one. Note that I just set boulders and logs on new fortresses. They'll get saved with the fortress after that, and if I do change them in-game, I don't want those changes to be overwritten by commands in my onMapLoad.init.
Without this it is impossible to read long messages when using quickfort gui. This came up because the dreamfort help text has been getting longer and longer, and now is longer than my screen can accommodate.
For stuff that shouldn’t be visible to quickfort, like personal development notes. These "blueprints" won't appear in quickfort list
Dreamfort has a good, thorough walkthrough, but it is kinda long. I think it could use a condensed checklist that basically says: "here are the commands you need to run, in the order you need to run them in (see walkthough for details)". It will include all quickfort commands as well as calls to other scripts (like
Code: [Select]
orders import)
So dreamfort is more usable and understandable.
So players can error-check blueprints and get statistics on what would be done, but not actually change any game state.
Right now, quickfort requires a game cursor before it will "run" a blueprint. Otherwise it wouldn't know where on the map to apply it. This made sense when the only blueprint types affected the map, but #notes blueprints just display help text. Requiring a cursor when running these blueprints is just annoying.
This is the only complex new feature I'm planning for the next wave. It will define a new blueprint mode: #aliases. Aliases defined in that "blueprint" can be used by any #query blueprint in the same file (i.e. a multi-blueprint .csv file or any sheet in an .xlsx file). With file-scoped aliases, players can share their blueprints on the forums/wikis and be sure that they will work correctly for other people, even if the blueprints use aliases that are not found in the DFHack aliases-common.txt "standard library".


Ok, that's it for now. Happy quickforting!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: PeridexisErrant on November 25, 2020, 07:42:32 pm
  • Move alias documentation from aliases.txt to the user guide
As requested by A_Curious_Cat. One of the major problems with the alias documentation being in aliases.txt is that aliases.txt is a user configuration file and it doesn't get overwritten when you install a new version of DFHack. Therefore, if the docs in aliases.txt get updated, players with existing aliases.txt files *will never see the updated docs*. Pure silliness. Alias documentation belongs on docs.dfhack.org with the rest of the docs.

The ".. include::" directive (https://docutils.sourceforge.io/docs/ref/rst/directives.html#include) might help with that; it's how documentation is pulled out of scripts and it should work for aliases.txt too.  That means you don't have to worry about keeping two versions in sync, and still get to see all the docs while editing the file  ;)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on November 26, 2020, 04:05:38 pm
I'd like to be able to do that, but there is still the issue that the docs in a player's aliases.txt won't be up to date unless they delete their aliases.txt file every time they update DFHack. I think it will be necessary to replace the help text in aliases.txt with a pointer to the online docs. Maybe keep basic docs in aliases.txt and just have more complete docs with advanced usage examples in the guide.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: lethosor on November 29, 2020, 12:15:58 pm
Yeah, a pointer to the docs is probably best in that case. Release builds of DFHack also include docs in hack/docs, so you could additionally point users there for an offline copy.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on December 03, 2020, 02:16:10 pm
edit: final draft, with some fixes, is available here: https://dfhack--1724.org.readthedocs.build/en/1724/docs/guides/quickfort-alias-guide.html

Alright, I've been writing a "Quickfort Alias Guide" which goes over #query blueprint alias features, syntax, and usage. I'm also adding a complete walkthrough for the DFHack standard alias library. I'm grateful that A_Curious_Cat brought up the lack of documentation. I'm realizing that there is actually quite a bit to say that I hadn't written down anywhere before.

This is what I have so far. DFHack documentation is written in ReStructuredText (RST) format, but it'll be rendered in nice HTML once it's on docs.dfhack.org. I'm still writing the first draft of the alias library walkthrough. I'll post that too once I have something readable.


.. _quickfort-alias-guide:

Quickfort Alias Guide
=====================

Aliases allow you to use simple words to represent complicated key sequences
when configuring buildings and stockpiles in quickfort ``#query`` blueprints.

For example, say you have the following ``#build`` and ``#place`` blueprints:

::

    #build masonry workshop
    ~, ~,~,`,`,`
    ~,wm,~,`,`,`
    ~, ~,~,`,`,`

    #place stockpile for mason
    ~,~,~,s,s,s
    ~,~,~,s,s,s
    ~,~,~,s,s,s

and you want to configure the stockpile to hold only non-economic ("other")
stone and to give to the adjacent mason workshop. You could write the
key sequences directly:

::

    #query configure stockpile with expanded key sequences
    ~,~,~,s{Down 5}deb{Right}{Down 2}p^,`,`
    ~,~,~,g{Left 2}&,                   `,`
    ~,~,~,`,                            `,`

or you could use aliases:

::

    #query configure stockpile with aliases
    ~,~,~,otherstone,`,`
    ~,~,~,give2left, `,`
    ~,~,~,`,         `,`

If the stockpile had only a single tile, you could also replay both aliases in
a single cell:

::

    #query configure mason with multiple aliases in one cell
    ~,~,~,{otherstone}{give2left},`,`
    ~,~,~,`,                      `,`
    ~,~,~,`,                      `,`

With aliases, blueprints are much easier to read and understand. They also
save you from having to copy the same long key sequences everywhere.

Alias definition files
----------------------

DFHack comes with a library of aliases for you to use that are always
available when you run a ``#query`` blueprint. Many blueprints can be built
with just those aliases. This "standard alias library" is stored in
:source:`data/quickfort/aliases-common.txt`. The aliases in that file are
described at the `bottom of this document <quickfort-alias-library>`.

Please do not edit the aliases in the standard library directly. The file will
get overwritten when DFHack is updated and you'll lose your changes. Instead,
add your custom aliases to :source:`dfhack-config/quickfort/aliases.txt`.
Definitions in this file take precedence over any definitions in the standard
library.

Alias syntax and usage
----------------------

The syntax for defining aliases is:

::

    aliasname: expansion

Where ``aliasname`` is at least two letters or digits long (dashes and
underscores are also allowed) and ``expansion`` is whatever you would type
into the DF UI.

You use an alias by typing its name into a ``#query`` blueprint cell where you
want it to be applied. You can use an alias by itself or as part of a larger
sequence, potentially with other aliases. If the alias is the only text in the
cell, the alias name is matched and its expansion is used. If the alias has
other keys before or after it, the alias name must be surrounded in curly
brackets (:kbd:`{` and :kbd:`}`). An alias can be surrounded in curly brackets
even if it is the only text in the cell, it just isn't necesary. For example,
the following blueprint uses the ``aliasname`` alias by itself in the first
two rows and uses it as part of a longer sequence in the third row:

::

    #query apply alias 'aliasname' in three different ways
    aliasname
    {aliasname}
    literaltext{aliasname}literaltext

For a more concrete example of an alias definition, a simple alias that
configures a stockpile to have no bins (:kbd:`C`) and no barrels (:kbd:`E`)
assigned to it would look like this:

::

    nocontainers: CE

The alias definition can also contain references to other aliases by including
the alias names in curly brackets. For example, ``nocontainers`` could be
equivalently defined like this:

::

    nobins: C
    nobarrels: E
    nocontainers: {nobins}{nobarrels}

Aliases used in alias definitions *must* be surrounded by curly brackets, even
if they are the only text in the definition:

::

    alias1: text1
    alias2: alias1
    alias3: {alias1}

Here, ``alias1`` and ``alias3`` expand to ``text1``, but ``alias2`` expands to
the literal text ``alias1``.

Keycodes
~~~~~~~~

Non-printable characters, like the arrow keys, are represented by their
keycode name and are also surrounded by curly brackets, like ``{Right}`` or
``{Enter}``. Keycodes are used exactly like aliases -- they just have special
expansions that you wouldn't be able to write yourself. In order to avoid
naming conflicts between aliases and keycodes, the convention is to start
aliases with a lowercase letter.

Any keycode name from the DF interface definition file
(data/init/interface.txt) is valid, but only a few keycodes are actually useful for blueprints:

::

    Up
    Down
    Left
    Right
    Enter
    ESC
    Backspace
    Page Down
    Page Up
    Tab

Repetitions
~~~~~~~~~~~

Anything enclosed within curly brackets can also have a number, indicating how
many times that alias or keycode should be repeated. For example:
``{togglesequence 9}`` or ``{Down 5}`` will repeat the ``togglesequence``
alias nine times and the ``Down`` keycode five times, respectively.

Modifier keys
~~~~~~~~~~~~~

Ctrl, Alt, and Shift modifiers can be specified for the next key by adding
them into the key sequence. For example, Alt-h is written as ``{Alt}h``.

Note that DF does not handle keys that have more than a single modifier, so
sequences like ``{Ctrl}{Alt}a`` will result in an error.

Shorthand characters
~~~~~~~~~~~~~~~~~~~~

Some frequently-used keycodes are assigned shorthand characters. Think of them
as single-character aliases that don't need to be surrounded in curly
brackets:

::

    &   expands to {Enter}
    @   expands to {Shift}{Enter}
    ~   expands to {Alt}
    !   expands to {Ctrl}
    ^   expands to {ESC}

If you need literal versions of the shorthand characters, surround them in
curly brackets, for example: use ``{!}`` for a literal exclamation point.

Built-in aliases
~~~~~~~~~~~~~~~~

Most aliases that come with DFHack are in ``aliases-common.txt``, but there is
one alias built into the code for the common shorthand for "make room":

::

    r+  expands to r+{Enter}

This needs special code support since ``+`` can't normally be used in alias
names. You can use it just like any other alias, either by itself in a cell
(``r+``) or surrounded in curly brackets (``{r+}``).

Sub-aliases
~~~~~~~~~~~

You can specify sub-aliases that will only be defined while the current alias
is being resolved. This is useful for "injecting" custom behavior into the
middle of a larger alias. For example:

::

    {quantumstopfromeast name="Trash Dump"}

The value of the sub-alias ``name`` is used in the middle of the definition of
``quantumstopfromeast`` to give a useful name to your quantum dump hauling
route. Without sub-aliases, we'd have to write something like:

::

    {quantumstopfromeastprefix}Trash Dump{quantumstopfromeastsuffix}

which is more difficult to write and more difficult to understand.

A handy technique is to define an alias with some sort of default
behavior and then use sub-aliases to override that behavior as necessary. For
example, here is a simplified version of the standard ``quantum`` alias that
sets up quantum stockpiles:

::

    quantum_enable: {enableanimals}{enablefood}{enablefurniture}...
    quantum: {linksonly}{nocontainers}{quantum_enable}

You can use the default behavior of ``quantum_enable`` by just using the
``quantum`` alias by itself. But you can override ``quantum_enable`` to just
enable furniture for some specific stockpile like this:

::

    {quantum quantum_enable={enablefurniture}}

Sub-aliases must be in one of the following formats:

::

    subaliasname=keyswithnospaces
    subaliasname="keys with spaces or {aliases}"
    subaliasname={singlealias}

If you specify both a sub-alias and a number of repetitions, the number for
repetitions goes last, right before the :kbd:`}`:

::

    {alias subaliasname=value repetitions}

Beyond query mode
~~~~~~~~~~~~~~~~~
``#query`` blueprints normally do things in DF :kbd:`q`\uery mode, but nobody
said that we have to *stay* in query mode. ``#query`` blueprints send
arbitrary key sequences to Dwarf Fortress. Anything you can do by typing keys
into DF, you can do in a ``#query`` blueprint. It is absolutely fine to
temporarily exit out of query mode, go into, say, hauling or zone or hotkey
mode, and do whatever needs to be done.

You just have to make certain to exit out of that alternate mode and get back
into :kbd:`q`\uery mode at the end of the key sequence. That way quickfort can
continue on configuring the next tile -- a tile configuration that assumes the
game is still in query mode.

For example, here is the standard library alias for giving a name to a zone:

::

    namezone: ^i{givename}^q

The first :kbd:`\^` exits out of query mode. Then :kbd:`i` enters zones mode.
We then reuse the standard alias for giving something a name. Finally, we exit
out of zones mode with another :kbd:`\^` and return to :kbd:`q`\uery mode.

.. _quickfort-alias-library:

The DFHack standard alias library
---------------------------------

TODO
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: PeridexisErrant on December 05, 2020, 07:15:21 pm
Very nice!

FYI DFHack could enable docs previews for pull requests (https://docs.readthedocs.io/en/stable/guides/autobuild-docs-for-pull-requests.html), if you wanted to have an online HTML version of your current draft  ;D
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: lethosor on December 05, 2020, 07:53:39 pm
Very nice!

FYI DFHack could enable docs previews for pull requests (https://docs.readthedocs.io/en/stable/guides/autobuild-docs-for-pull-requests.html), if you wanted to have an online HTML version of your current draft  ;D
Neat, I've enabled that - didn't realize it was a feature, but it's been something I've wanted to investigate for a while.

Worth noting that it'll only work for PRs in the main "dfhack" repo, but that's where this particular change would be made anyway.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on December 05, 2020, 10:09:34 pm
edit: final draft, with some fixes, is available here: https://dfhack--1724.org.readthedocs.build/en/1724/docs/guides/quickfort-alias-guide.html

I put in PR#1724 (https://github.com/DFHack/dfhack/pull/1724) to test out the docs autobuild, but I don't see the "continuous-documentation/read-the-docs" build check. How do we access the docs built for the PR?

Anyway, I did promise to post the alias library docs here too, so here's the current draft. You might notice that there are some holes in the stockpile alias tables. Those aliases simply haven't been written yet. I didn't want to add a bunch of new stuff right before -r4 is set to go out, so I just documented what is already there. I'll fill it out a bit more in a future release.

I marked the PR as WIP since I haven't fully tested the few changes to the alias library I did end up making.


.. _quickfort-alias-library:

The DFHack standard alias library
---------------------------------

DFHack comes with many useful aliases for you to use in your blueprints. Many
blueprints can be built with just these aliases alone, with no custom aliases
required.

This section goes through all aliases provided by the DFHack standard alias
library, discussing their intended usage and detailing sub-aliases that you
can define to customize their behavior.

If you do define your own custom aliases in
``dfhack-config/quickfort/aliases.txt``, try to build on the library aliases.
For example, if you create an alias to modify particular furniture stockpile
settings, start your alias with ``{furnitureprefix}`` instead of
``s{Down 2}``. Using library prefixes will allow sub-aliases to work with your
aliases just like they do with library aliases. In this case, using
``{furnitureprefix}`` will allow your stockpile customization alias to work
with both stockpiles and hauling routes.

Naming aliases
~~~~~~~~~~~~~~

These aliases give descriptive names to workshops, levers, stockpiles, zones,
etc. Dwarf Fortress building, stockpile, and zone names have a maximum length
of 20 characters.

========  ===========
Alias     Sub-aliases
========  ===========
givename  name
namezone  name
========  ===========

``givename`` works anywhere you can hit Ctrl-n to customize a name, like when
the cursor is over buildings and stockpiles. Example:

::

    #place
    f(10x2)

    #query
    {booze}{givename name="booze"}

``namezone`` is intended to be used when over an activity zone. It includes
commands to get into zones mode, set the zone name, and get back to query
mode. Example:

::

    #zone
    n(2x2)

    #query
    {namezone name="guard dog pen"}

Quantum stockpile aliases
~~~~~~~~~~~~~~~~~~~~~~~~~

These aliases make it easy to create :wiki:`minecart stop-based quantum stockpiles <Quantum_stockpile#The_Minecart_Stop>`.

+----------------------+------------------+
| Alias                | Sub-aliases      |
+======================+==================+
| quantum              | | name           |
|                      | | quantum_enable |
+----------------------+------------------+
| quantumstopfromnorth | | name           |
+----------------------+ | stop_name      |
| quantumstopfromsouth | | route_enable   |
+----------------------+                  |
| quantumstopfromeast  |                  |
+----------------------+                  |
| quantumstopfromwest  |                  |
+----------------------+------------------+
| quantumstop          | | name           |
|                      | | stop_name      |
|                      | | route_enable   |
|                      | | move           |
|                      | | move_back      |
+----------------------+------------------+

The idea is to use a minecart on a track stop to dump an infinite number of
items into a receiving "quantum" stockpile, which significantly simplifies
stockpile management. These aliases configure the quantum stockpile and
hauling route that make it all work. Here is a complete example for quantum
stockpiling weapons, armor, and ammunition. It has a 3x1 feeder stockpile on
the bottom (South), the trackstop in the center, and the quantum stockpile on
the top (North). Note that the feeder stockpile is the only stockpile that
needs to be configured to control which types of items end up in the quantum
stockpile. By default, the hauling route and quantum stockpile itself simply
accept whatever is put into them.

::

    #place
     ,c
     ,
    pdz(3x1)

    #build
     ,
     ,trackstopN

    #query message(remember to assign a minecart to the new route)
     ,quantum
     ,quantumstopfromsouth
    nocontainers

The ``quantum`` alias configures a 1x1 stockpile to be a quantum stockpile. It
bans all containers and prevents the stockpile from being manually filled. By
default, it also enables storage of all item categories (except corpses and
refuse), so it doesn't really matter what letter you use to place the
stockpile. :wiki:`Refuse` is excluded by default since otherwise clothes and
armor in the quantum stockpile would rot away. If you want corpses or bones in
your quantum stockpile, use :kbd:`y` and/or :kbd:`r` to place the stockpile
and the ``quantum`` alias will just enable the remaining types. If you *do*
enable refuse in your quantum stockpile, be sure you avoid putting useful
clothes or armor in there!

The ``quantumstopfromsouth`` alias is run over the track stop and configures
the hauling route, again, allowing all item categories into the minecart by
default so any item that can go into the feeder stockpile can then be placed
in the minecart. It also links the hauling route with the feeder stockpile to
the South.The track stop does not need to be fully constructed before the
``#query`` blueprint is run, but the feeder stockpile needs to exist so we can
link to it. This means that the three blueprints above can be run one right
after another, without any dwarven labor in between them, and the quantum
stockpile will work properly.

Finally, the ``nocontainers`` alias simply configures the feeder stockpile to
not have any containers (which would just get in the way here). If we wanted
to be more specific about what item types we want in the quantum stockpile, we
could configure the feeder stockpile further, for example with standard
`stockpile adjustment aliases <quickfort-stockpile-aliases>`.

After the blueprints are run, the last step is to manually assign a minecart
to the newly-defined hauling route.

You can define sub-aliases to customize how these aliases work, for example to
have fine-grained control over what item types are enabled for the route and
quantum stockpile. We'll go over those options below, but first, here is an
example for how to just give names to everything:

::

    #query message(remember to assign a minecart to the new route)
     ,{quantum name="armory quantum"}
     ,{quantumstopfromsouth name="Armory quantum" stop_name="Armory quantum stop"}{givename name="armory dumper"}
    {givename name="armory feeder"}

All ``name`` sub-aliases are completely optional, of course. Keep in mind that
hauling route names have a maximum length of 22 characters, hauling route stop
names have a maximum length of 21 characters, and all other names have a
maximum length of 20 characters.

If you want to be absolutely certain that nothing ends up in your quantum
stockpile other than what you've configured in the feeder stockpile, you can
set the ``quantum_enable`` sub-alias for the ``quantum`` alias. This can
prevent, for example, somebody's knocked-out tooth from being considered part
of your furniture quantum stockpile when it happened to land on it during a
fistfight:

::

    #query
    {quantum name="furniture quantum" quantum_enable={enablefurniture}}

You can have similar control over the hauling route if you need to be more
selective about what item types are allowed into the minecart. If you have
multiple specialized quantum stockpiles that use a common feeder pile, for
example, you can set the ``route_enable`` sub-alias:

::

    #query
    {quantumstopfromsouth name="Armory quantum" route_enable="{enableweapons}{enablearmor}{enableammo}"}

Any of the `stockpile configuration aliases <quickfort-stockpile-aliases>` can
be used for either the ``quantum_enable`` or ``route_enable`` sub-aliases.
Experienced Dwarf Fortress players may be wondering how the same aliases can
work in both contexts since the keys for entering the configuration screen
differ. Fear not! There is some sub-alias magic at work here. If you define
your own stockpile configuraiton aliases, you can use the magic yourself by
building your aliases on the ``*prefix`` aliases described later in this
guide.

Finally, the ``quantumstop`` alias is a more general version of the
``quantumstopfrom*`` aliases. The ``quantumstopfrom*`` aliases assume that the
feeder stockpile is orthogonally adjacent to your track stop (which is how
most people set them up). If your feeder stockpile is somewhere further away,
you can use the ``quantumstop`` alias directly. In addition to the
``quantumstopfrom*`` sub-aliases, you can also define the ``move`` and
``move_back`` sub-aliases, which let you specify the cursor keys required to
move from the track stop to the feeder stockpile and back again, respectively:

::

    #query
    {quantumstop move="{Right 2}{Up}" move_back="{Down}{Left 2}"}

Farm plots
~~~~~~~~~~

Sets a farm plot to grow the first or last type of seed in the list of
available seeds for all four seasons. The last seed is usually Plump helmet
spawn, suitable for post-embark. But if you only have one seed type, that'll
be grown instead.

+------------------+
| Alias            |
+==================+
| growlastcropall  |
+------------------+
| growfirstcropall |
+------------------+

Instead of these aliases, though, it might be more useful to use the DFHack
`autofarm` plugin.

Stockpile configuration utility aliases
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

===============  ===========
Alias            Sub-aliases
===============  ===========
linksonly
nocontainers
give2up
give2down
give2left
give2right
give10up
give10down
give10left
give10right
give             move
togglesequence
togglesequence2
===============  ===========

``linksonly`` and ``nocontainers`` set the named basic properties on
stockpiles. ``nocontainers`` sets bins and barrels to 0, but does not affect
wheelbarrows since the hotkeys for changing the number of wheelbarrows depend
on whether you have the DFHack `stockpiles` plugin active. It is better to set
the number of wheelbarrows via the `quickfort` ``stockpiles_max_wheelbarrows``
setting. It is set to ``0`` by default.

The ``give*`` aliases set a stockpile to give to a workshop or another
stockpile located at the indicated number of tiles in the indicated direction
from the current tile. For example, here we use the ``give2down`` alias to
connect an ``otherstone`` stockpile with a mason workshop:

::

    #place
    s,s,s,s,s
    s, , , ,s
    s, , , ,s
    s, , , ,s
    s,s,s,s,s

    #build
    `,`,`,`,`
    `, , , ,`
    `, ,wm,,`
    `, , , ,`
    `,`,`,`,`

    #query
     , ,give2down
    otherstone

and here is a generic stone stockpile that gives to a stockpile that only
takes flux:

::

    #place
    s(10x1)
    s(10x10)

    #query
    flux
    ,
    give2up

If you want to give to some other tile that is not already covered by the
``give2*`` or ``give10*`` aliases, you can use the generic ``give`` alias and
specify the movement keys yourself in the ``move`` sub-alias. Here is how to
give to a stockpile or workshop one z-level above, 9 tiles to the left, and 14
tiles down:

::

    #query
    {give move="<{Left 9}{Down 14}"}

``togglesequence`` and ``togglesequence2`` send ``{Down}{Enter}`` or
``{Down 2}{Enter}`` to toggle adjacent (or alternating) items in a list. This
is useful when toggling a bunch of related item types in the stockpile config.
For example, the ``dye`` and ``tallow`` aliases in the standard alias library
need to select specific items from long lists:

::

    dye:    {foodprefix}b{Right}{Down 11}{Right}{Down 28}{togglesequence 4}^
    tallow: {foodprefix}b{Right}{Down 13}{Right}{Down}{togglesequence2 811}^

.. _quickfort-stockpile-aliases:

Stockpile adjustment aliases
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For each stockpile item category, there are three standard aliases:

* ``*prefix`` aliases enter the stockpile configuration screen and position
  the cursor at a particular item category in the left-most column, ready for
  further keys that configure the elements within that category. All other
  stockpile adjustment aliases are built on these prefixes. You can use them
  yourself to create stockpile adjustment aliases that aren't already covered
  by the standard library aliases. Using the library prefix instead of
  creating your own also allows your stockpile configuration aliases to be
  used for both stockpiles and hauling routes. For example, here is the
  library definition for ``booze``:

::

    booze: {foodprefix}b{Right}{Down 5}p{Down}p^

* ``enable*`` aliases enter the stockpile configuration screen, enable all
  subtypes of the named category, and exit the stockpile configuration screen
* ``disable*`` aliases enter the stockpile configuration screen, disable all
  subtypes of the named category, and exit the stockpile configuration screen

====================  ====================  =====================
Prefix                Enable                Disable
====================  ====================  =====================
animalsprefix         enableanimals         disableanimals
foodprefix            enablefood            disablefood
furnitureprefix       enablefurniture       disablefurniture
corpsesprefix         enablecorpses         disablecorpses
refuseprefix          enablerefuse          disablerefuse
stoneprefix           enablestone           disablestone
ammoprefix            enableammo            disableammo
coinsprefix           enablecoins           disablecoins
barsprefix            enablebars            disablebars
gemsprefix            enablegems            disablegems
finishedgoodsprefix   enablefinishedgoods   disablefinishedgoods
leatherprefix         enableleather         disableleather
clothprefix           enablecloth           disablecloth
woodprefix            enablewood            disablewood
weaponsprefix         enableweapons         disableweapons
armorprefix           enablearmor           disablearmor
sheetprefix           enablesheet           disablesheet
====================  ====================  =====================

Then, for each item category, there are aliases that manipulate interesting
subsets of that category:

* Exclusive aliases forbid everthing within a category and then enable only
  the named item type (or named class of items)
* ``forbid*`` aliases forbid the named type and leave the rest of the
  stockpile untouched.
* ``permit*`` aliases permit the named type and leave the rest of the
  stockpile untouched.

Note that for specific item types (items in the third stockpile configuration
column), you can only toggle the item type on and off. Aliases can't know
whether sending the ``{Enter}`` key will enable or disable the type. The
``forbid*`` aliases that affect these item types assume the item type was
enabled and toggle it off. Likewise, the ``permit*`` aliases assume the item
type was disabled and toggle it on. If the item type is not in the expected
enabled/disabled state when the alias is run, the aliases will not behave
properly.

Animal stockpile adjustments
````````````````````````````

===========  ===========  ============
Exclusive    Forbid       Permit
===========  ===========  ============
cages        forbidcages  permitcages
traps        forbidtraps  permittraps
===========  ===========  ============

Food stockpile adjustments
``````````````````````````

===============  ====================  ====================
Exclusive        Forbid                Permit
===============  ====================  ====================
preparedfood     forbidpreparedfood    permitpreparedfood
unpreparedfish   forbidunpreparedfish  permitunpreparedfish
plants           forbidplants          permitplants
booze            forbidbooze           permitbooze
seeds            forbidseeds           permitseeds
dye              forbiddye             permitdye
tallow           forbidtallow          permittallow
miscliquid       forbidmiscliquid      permitmiscliquid
===============  ====================  ====================

Furniture stockpile adjustments
```````````````````````````````

+-----------+
| Exclusive |
+===========+
| pots      |
+-----------+
| bags      |
+-----------+
| buckets   |
+-----------+
| sand      |
+-----------+

Notes:

* Because of the limitations of Dwarf Fortress, ``bags`` cannot distinguish
  between empty and filled bags

Refuse stockpile adjustments
````````````````````````````

===========  ==================  ==================
Exclusive    Forbid              Permit
===========  ==================  ==================
bodyparts    forbidbodyparts     permitbodyparts
rawhides     forbidrawhides      permitrawhides
tannedhides  forbidtannedhides   permittannedhides
skulls       forbidskulls        permitskulls
bones        forbidbones         permitbones
shells       forbidshells        permitshells
teeth        forbidteeth         permitteeth
horns        forbidhorns         permithorns
hair         forbidhair          permithair
craftrefuse  forbidcraftrefuse   permitcraftrefuse
===========  ==================  ==================

Notes:

* ``bodyparts`` includes remains/corpses and rotten rawhdes.
* ``craftrefuse`` includes everything a craftsdwarf can use: skulls, bones,
  shells, teeth, horns, and hair.

Stone stockpile adjustments
```````````````````````````

=============  ====================  ====================
Exclusive      Forbid                Permit
=============  ====================  ====================
metal          forbidmetal           permitmetal
iron           forbidiron            permitiron
economic       forbideconomic        permiteconomic
flux           forbidflux            permitflux
plaster        forbidplaster         permitplaster
coalproducing  forbidcoalproducing   permitcoalproducing
otherstone     forbidotherstone      permitotherstone
bauxite        forbidbauxite         permitbauxite
clay           forbidclay            permitclay
=============  ====================  ====================

Ammo stockpile adjustments
``````````````````````````

===============  ====================
Exclusive        Forbid
===============  ====================
bolts
\                forbidmetalbolts
\                forbidwoodenbolts
\                forbidbonebolts
===============  ====================

Bar stockpile adjustments
`````````````````````````

===========  ==================
Exclusive    Forbid
===========  ==================
bars         forbidbars
metalbars    forbidmetalbars
ironbars     forbidironbars
steelbars    forbidsteelbars
pigironbars  forbidpigironbars
otherbars    forbidotherbars
coal         forbidcoal
potash       forbidpotash
ash          forbidash
pearlash     forbidpearlash
soap         forbidsoap
blocks       forbidblocks
===========  ==================

Gem stockpile adjustments
`````````````````````````

===========  ================
Exclusive    Forbid
===========  ================
roughgems    forbidroughgems
roughglass   forbidroughglass
cutgems      forbidcutgems
cutglass     forbidcutglass
cutstone     forbidcutstone
===========  ================

Finished goods stockpile adjustments
````````````````````````````````````

+-----------+
| Exclusive |
+===========+
| jugs      |
+-----------+

Cloth stockpile adjustments
```````````````````````````

+------------------+
| Exclusive        |
+==================+
| thread           |
+------------------+
| adamantinethread |
+------------------+
| cloth            |
+------------------+
| adamantinecloth  |
+------------------+

Weapon stockpile adjustments
````````````````````````````

=================  ========================  ====================
Exclusive          Forbid                    Permit
=================  ========================  ====================
\                  forbidweapons             permitweapons
\                  forbidtrapcomponents      permittrapcomponents
metalweapons       forbidmetalweapons        permitmetalweapons
\                  forbidstoneweapons        permitstoneweapons
\                  forbidotherweapons        permitotherweapons
ironweapons        forbidironweapons         permitironweapons
copperweapons      forbidcopperweapons       permitcopperweapons
steelweapons       forbidsteelweapons        permitsteelweapons
masterworkweapons  forbidmasterworkweapons   permitmasterworkweapons
artifactweapons    forbidartifactweapons     permitartifactweapons
=================  ========================  ====================

Armor stockpile adjustments
```````````````````````````

===============  ======================  ====================
Exclusive        Forbid                  Permit
===============  ======================  ====================
metalarmor       forbidmetalarmor        permitmetalarmor
otherarmor       forbidotherarmor        permitotherarmor
ironarmor        forbidironarmor         permitironarmor
copperarmor      forbidcopperarmor       permitcopperarmor
steelarmor       forbidsteelarmor        permitsteelarmor
masterworkarmor  forbidmasterworkarmor   permitmasterworkarmor
artifactarmor    forbidartifactarmor     permitartifactarmor
===============  ======================  ====================
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on December 06, 2020, 01:02:49 pm
Thanks to lethosor and PeridexisErrant, the rendered version of the in-progress Quickfort alias guide are available here: https://dfhack--1724.org.readthedocs.build/en/1724/docs/guides/quickfort-alias-guide.html
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on December 10, 2020, 08:22:22 pm

.. _quickfort-alias-guide:

Quickfort Alias Guide
=====================



I’ve been spending some time learning RST and I have a question about the first line.

The first line appears to be a directive setting up an internal hyperlink target.  However, according to this (https://docutils.sourceforge.io/docs/user/rst/quickref.html#implicit-hyperlink-targets) you should just be able to use the section heading that follows as an implicit target.  Therefore the directive setting up the explicit internal hyperlink target seems unnecessary. 

Is there any reason for using an explicit target, instead of an implicit one?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: lethosor on December 10, 2020, 11:11:49 pm
Explicit targets can be used across documents (strictly speaking, this is a Sphinx feature - the RST spec itself only focuses on single documents).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on December 10, 2020, 11:32:24 pm
Explicit targets can be used across documents (strictly speaking, this is a Sphinx feature - the RST spec itself only focuses on single documents).

Ah.

Thanks for the explanation!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on December 17, 2020, 06:28:26 pm
I seem to be on a documentation binge. Here's another guide, this time for the blueprint library.  There is already a fair bit of documentation in the walkthroughs in the blueprints themselves, but there wasn't anything that gives a high-level overview of what is in the library as a whole. There aren't any pictures yet, but this first version of the guide makes the blueprint library a little more accessible (I hope).

Rendered draft here: https://dfhack--1731.org.readthedocs.build/en/1731/docs/guides/quickfort-library-guide.html

Feedback is welcome!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: PeridexisErrant on December 17, 2020, 08:26:58 pm
Looks great :D

I'm a huge fan of your efforts to make things accessible and well-documented - it's the kind of work that really helps new players, and I do remember when that included me <3
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: Fleeting Frames on December 23, 2020, 05:47:43 am
Quote
Note that DF does not handle keys that have more than a single modifier, so
sequences like ``{Ctrl}{Alt}a`` will result in an error.
Personally, I use Ctrl+Alt+o for orders fine. Maybe Windows issue?

(Also, that fixed-with font is kinda hard to read on the forums for some reason.)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on December 23, 2020, 11:00:58 am
Ah, sorry, that note was removed in the final draft (https://dfhack--1724.org.readthedocs.build/en/1724/docs/guides/quickfort-alias-guide.html#modifier-keys) of the docs. In fact, multiple modifiers are handled by quickfort just fine if there are custom mappings in interface.txt that define them for the game. It's just that DF has no multiple modifier mappings by default.  These are different from DFHack hotkeys, which, as you saw, use multiple modifiers all over the place.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: cjhammel on January 21, 2021, 10:06:10 am
I have been doing a DreamFort run through seeing how the features work in a play mode.   I have found that zones created are not working.  The animal pen on the surface the dwarfs will not move the dogs to the pen on the stairs nor the zone for the grazing animals.  In fact these zones were causing the game to crash very quickly within a few game days after I added the animals.  When I deleted the zone and added them via manually the crashing went away and animals were properly penned.

Dwarfs would not add the crutches, splints, bandages, thread to hospital zone on the services level.  I deleted the zone add it manually then everything started getting added. 

Not sure if I should post it here as well, but I also added an issue to the dfhack GITHUB issue page.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 21, 2021, 10:15:02 am
Thank you for the report! I'll look into it.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 22, 2021, 09:16:47 pm
Just want to say great work on this.
Getting a lot of use out of it (especially since DF keeps crashing so I get to do the same things over and over and over again...I'm getting a lot of practice)

So I noticed the labels not being set for Dreamfort zones & piles, since I was reading along from the download, but I realize the files included with the LNP don't have those lines. Editing them in, they do work nicely (and saves a lot of typing).

I like it, other than central stairs being a known contributor to FPS death and also Fun! caused by falling objects/dorfs, I suggest a central ramp.
While I'd prefer a 3 wide ramp myself, this is what fits without much change:
`   h   `   #
`   `   `   #
`   h   `   #
#>   #   #   #
d         #
h   `   h   #
      d   #
#>   #   #   #

Some comments/suggestions on industry level:
The iron/steel meltables has an incorrect setting for weapons. Steel bars & coke piles also missing no containers.
Is it safe mixing cloth & refuse in the same pile? Will it not cause the cloth to rot rapidly or it that only clothing?
Stone, metalworkers & corpses piles would benefit greatly from heavy feeders (wheelbarrows) as well as light feeders (no wheelbarrows).
Rotating the workshops (making the smelters/forge on the Southside....hey is plan rotation a thing in this version of Quickfort?) would allow building Services level directly underneath but allowing for magma in the otherwise wasted space (I pretty much always bring the magma where I want it, by minecart if need be...building on the magma sea is one of the worst pieces of advice given to noobs, building near the flux/coal/iron/sand is much more efficient)

Other:
The surface fort takes forever to get going. Some more granular separation would make it easier to get some minimal security faster. I'm thinking separate flooring to prioritize the exposed farming level as well as maybe walls around stairwell. Some kind of marksdorf shooting gallery would be nice too (although the massed cage traps really don't need much help and are hard to beat). Haven't gotten around to doing it myself.

Temp office for bookkeeper on other side of farming level.

Services. Why such lavish jail cells? And why no walls between them? (longstanding habit: I don't appoint a sheriff so I'm ignorant about the finer points of jails) Not crazy about the cisterns, although with the new shitty aquifers maybe this is more sensible than the large ones I favor. Same for the baths, the concept is cool but aren't they just going to cause contaminants to be tracked all over? Also seems like a good place for tombs on these levels.

Lye automation order is broken; it's dependent on the soap making order being completed, which can't be done without lye.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: lethosor on January 22, 2021, 09:22:18 pm
Getting a lot of use out of it (especially since DF keeps crashing so I get to do the same things over and over and over again...I'm getting a lot of practice)
I'm curious now - could this be related to the comment about some zones causing crashes above (on the previous page)?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 22, 2021, 10:21:09 pm
Getting a lot of use out of it (especially since DF keeps crashing so I get to do the same things over and over and over again...I'm getting a lot of practice)
I'm curious now - could this be related to the comment about some zones causing crashes above (on the previous page)?

With the zones? I doubt it. Oh! Forgot to mention, and this is also the posters issue why they won't work (don't know about crashes); they aren't marked active. I keep forgetting to fix it since it's quick to run through and turn them all on.

My latest experiment was to download vanilla 47.01 small and generate the world from there and then copy it over to my LNP 47.04 So far so good, other than some wierdness with graphics (seems like Vettlngr tiles, Phoebus sprites, but at least my text is clear) and when I try to update PyLNP says something to the effect of "save will be busted by broken raws, no can do". Correction - default sprites, I guess Toady actually added some (crappy ones at that) for dorfs and the dogs are D and the cat is C and etc.

I was able to fix the graphics by hand, hasn't broken...yet.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 23, 2021, 12:00:04 am
I couldn't reproduce the crash, though I gave myself a good forehead smack when I saw the missing active flag. I'll get that fixed up then go back to investigating the crash.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 23, 2021, 01:16:21 am
I couldn't reproduce the crash, though I gave myself a good forehead smack when I saw the missing active flag. I'll get that fixed up then go back to investigating the crash.

I don't think my crashes are related to Quickfort, it seems pretty stable. Lethosor has been looking into it.

So I swapped the forges with the textiles, I double-checked the settings for the iron/steel weapon meltables and they are correct but same results. Also shouldn't the regular meltables exclude iron & steel or was it mutually exclusive to set?

I just realized you don't have furniture going anywhere either. Is this intentional?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 23, 2021, 12:02:15 pm
Pull request for fixing the 'active' flag is here: https://github.com/DFHack/scripts/pull/245/files
It's a one-line fix in internal/quickfort/zone.lua, if you'd like to just patch your copy yourself.

Thank you for the Dreamfort suggestions! I'll respond to your questions on those later today when I have a bit more time to think about them more carefully.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: lethosor on January 23, 2021, 01:46:19 pm
I don't think my crashes are related to Quickfort, it seems pretty stable. Lethosor has been looking into it.
There is still a possibility that quickfort (or DFHack) is corrupting something that causes crashes later, but doesn't crash immediately when you use it. If you're seeing frequent crashes across different saves, and have been using quickfort in all of them, then I would recommend trying similar things in different saves without using quickfort to see if you also get crashes.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 23, 2021, 02:47:22 pm
I don't think my crashes are related to Quickfort, it seems pretty stable. Lethosor has been looking into it.
There is still a possibility that quickfort (or DFHack) is corrupting something that causes crashes later, but doesn't crash immediately when you use it. If you're seeing frequent crashes across different saves, and have been using quickfort in all of them, then I would recommend trying similar things in different saves without using quickfort to see if you also get crashes.

Now that you mention it, the save that never crashes is a mature fort so I haven't run any quickfort commands in it with the new version.
My newly generated save has started crashing, although it's been very infrequent, we'll see when the caravan comes.

Plant gathering seems buggy (I've never been a big fan of it, especially for surface plants) - after a point anyone assigned to it will get stuck, and even unassigning them I still have to wait for a few stragglers always it seems. It seems to happen towards end/change of season when there are leftover designated plants that have died. All of these were done from Dreamfort surface1, since I have been testing it out in all my new games.

And we made it to caravan unloading again and instacrash, every reload now. I'm fucking done!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 23, 2021, 03:54:16 pm
Just want to say great work on this.
Thanks! I appreciate that : )

Quote
So I noticed the labels not being set for Dreamfort zones & piles, since I was reading along from the download, but I realize the files included with the LNP don't have those lines. Editing them in, they do work nicely (and saves a lot of typing).
Yeah, the online spreadsheet has them, but the changes haven't been merged with DFHack yet (pull request here (https://github.com/DFHack/dfhack/pull/1750)) You can download the spreadsheets (File -> Download -> Microsoft Excel), put the .xlsx files in your blueprints folder, and use those directly too.

Quote
I like it, other than central stairs being a known contributor to FPS death and also Fun! caused by falling objects/dorfs, I suggest a central ramp.
While I'd prefer a 3 wide ramp myself, this is what fits without much change:
`   h   `   #
`   `   `   #
`   h   `   #
#>   #   #   #
d         #
h   `   h   #
      d   #
#>   #   #   #
I like the idea. Currently, each level has stairs included, but I won't be able to do that with ramps since now each level can have either one of two possible ramp placements. I can change the stair_guide (https://docs.google.com/spreadsheets/d/1vlxOuDOTsjsZ5W45Ri1kJKgp3waFo8r505LfZVg5wkU/edit#gid=1058843185) to run the ramp down 10 levels or so, and make that blueprint unhidden so it can be manually run repeatedly to extend the ramps down further as needed. Probably also want to rename it from 'stair_guide' to 'central_ramp'. Overall, this increases complexity for people who are trying to use dreamfort, but results in a better/safer fortress and exemplifies best practices. I'm very wary about making the blueprints any more difficult to apply, but in this case it's probably a good trade-off.

Quote
Some comments/suggestions on industry level:
The iron/steel meltables has an incorrect setting for weapons.
Ah, looks like a mistake in the alias definitions. I'll fix that up. Thanks!

Quote
Steel bars & coke piles also missing no containers.
fixed. thanks!

Quote
Is it safe mixing cloth & refuse in the same pile? Will it not cause the cloth to rot rapidly or it that only clothing?
according to the wiki (https://dwarffortresswiki.org/index.php/DF2014:Refuse), this is safe. The 'refuse' category will only cause accelerated rotting for clothing and armor, not raw cloth (or leather or anything else in that pile).

Quote
Stone, metalworkers & corpses piles would benefit greatly from heavy feeders (wheelbarrows) as well as light feeders (no wheelbarrows).
I'd had bad experiences with wheelbarrows in the past, but you're right that they can help here. I'll need to design a new feature for setting the wheelbarrow count for specific stockpiles, though, since the interface for setting wheelbarrows depends on whether you have the stockpiles plugin enabled (so I can't just do it in a #query blueprint). I currently just have a global setting for how many wheelbarrows to set by default for all quickfort stone stockpiles, but that's not flexible enough.

Quote
Rotating the workshops (making the smelters/forge on the Southside....hey is plan rotation a thing in this version of Quickfort?) would allow building Services level directly underneath but allowing for magma in the otherwise wasted space (I pretty much always bring the magma where I want it, by minecart if need be...building on the magma sea is one of the worst pieces of advice given to noobs, building near the flux/coal/iron/sand is much more efficient)
Good idea. I'll do this (and blueprint rotation is on my backlog (https://docs.google.com/document/d/17EjZlGsUOJ6E8WtqkCRZi9BBKjL9L1IdHfkB3Ajqas8/edit#heading=h.xk2hv04zs6ea))

Quote
Other:
The surface fort takes forever to get going. Some more granular separation would make it easier to get some minimal security faster. I'm thinking separate flooring to prioritize the exposed farming level as well as maybe walls around stairwell. Some kind of marksdorf shooting gallery would be nice too (although the massed cage traps really don't need much help and are hard to beat). Haven't gotten around to doing it myself.
Yeah, the slow safety of the surface level has been irking me for quite some time. I believe I can split it up as you describe without adding any extra steps. I can split the building up into smaller blueprints and simply chain them together in the #meta blueprints. buildingplan will match items for buildings in the order that they were planned, so I can still plan large constructions but have them be built in a more sensible order.

Quote
Temp office for bookkeeper on other side of farming level.
Good idea -- I have always made a single dorf be both my manager and my bookkeeper, but it makes sense to be more flexible.

Quote
Services. Why such lavish jail cells? And why no walls between them? (longstanding habit: I don't appoint a sheriff so I'm ignorant about the finer points of jails)
we build lavish jail cells to keep criminals happy of course : )  It was my attempt to follow [some of the] advice on the wiki (https://dwarffortresswiki.org/index.php/DF2014:Jail). I'm open to suggestions, though.

I could totally add walls. At one point I had a library planned out behind the jail cells and I was starved for space, but now that libraries have moved to the (relatively new) guildhall level, there's no reason why we can't make the jail cells more "celly".

Quote
Not crazy about the cisterns, although with the new shitty aquifers maybe this is more sensible than the large ones I favor.
I wanted to make them equally usable for players who fill their wells with a bucket brigade and those who fill them by routing flowing water. How do you think they could be improved?

Quote
Same for the baths, the concept is cool but aren't they just going to cause contaminants to be tracked all over?
Sigh...the baths have gone through so many design changes and caused so much trouble.. I should just take them out. You're right about the contaminants. There used to be a dwarven shower set up over the baths that would clean the contaminants, but it was just too complex to set up and keep running. It involved a ring mist generator (https://dwarffortresswiki.org/index.php/DF2014:Mist#Ring_generator) powered by a dwarven water reactor (https://dwarffortresswiki.org/index.php/DF2014:Water_wheel#Dwarven_Water_Reactor) and linked by controllable gears. It was awesome, but it added 3 more blueprint application steps to the services level. Moreover, the whole thing would randomly just stop working and need to be reset. When I removed the mist generator components, I forgot that the whole reason it was there was to clean contaminants.

On the plus side, removing the baths also gets rid of the most difficult manual step in all of dreamfort -- filling them up with water to exactly 3/7 depth.

Quote
Also seems like a good place for tombs on these levels.
I integrated the tombs into the apartment levels, since dorfs like looking at urns so much.

Quote
Lye automation order is broken; it's dependent on the soap making order being completed, which can't be done without lye.
Sorry, I should add documentation for this. DF has a bug that prevents 'lye-containing items' from being used as a condition. You can *add* the condition, but it disappears when you save and reload, breaking the manager order that it was attached to. In the dreamfort automation orders, I have it set up so that soap making triggers lye making so lye exists for the *next* bar of soap, but you have to "prime the system" by manually making a few buckets of lye first.

Quote
Also shouldn't the regular meltables exclude iron & steel or was it mutually exclusive to set?
The lower meltables stockpile is a superset of the upper, iron/steel-specific one. There are just two meltable stockpiles since dorfs prioritize melting the closest items, so this is how I have them prioritize melting iron and steel items. I didn't see any reason to exclude iron and steel from the lower stockpile -- if you have a lot of garbage iron and steel, you probably want to melt it all first anyway.

Quote
I just realized you don't have furniture going anywhere either. Is this intentional?
Thank you for catching that. Fixed. Furniture was intended to be included in the "goods" quantum stockpile. I didn't notice while playtesting since quickfort orders creates exactly the amount of furniture that I needed and I never had any to stockpile : P

Quote
And we made it to caravan unloading again and instacrash
ugh, could you possibly try a run without zones? I could prepare a version of dreamfort that skips them.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 23, 2021, 05:19:45 pm
I like the idea. Currently, each level has stairs included, but I won't be able to do that with ramps since now each level can have either one of two possible ramp placements. I can change the stair_guide (https://docs.google.com/spreadsheets/d/1vlxOuDOTsjsZ5W45Ri1kJKgp3waFo8r505LfZVg5wkU/edit#gid=1058843185) to run the ramp down 10 levels or so, and make that blueprint unhidden so it can be manually run repeatedly to extend the ramps down further as needed. Probably also want to rename it from 'stair_guide' to 'central_ramp'. Overall, this increases complexity for people who are trying to use dreamfort, but results in a better/safer fortress and exemplifies best practices. I'm very wary about making the blueprints any more difficult to apply, but in this case it's probably a good trade-off.
Yeah, it is easy to FUBAR an embark with bad ramp placement. Since I've been doing ramps & quickfort a long time, what I generally do is designate my central ramp for the entire map first thing. Removing stairwells from level blueprints is of course critical to this. If I'm using a larger (I'm a fan of 3 wide so depot can go anywhere I want it) ramp then I will set it to mark only at a reasonable depth, but otherwise I find it useful to get a general idea of the map by digging until you hit an impasse, especially if not using reveal & prospect. I'm a fan of underground pasture too, so getting cavern breached for fungus ASAP is usually important. LOL, I'm a fan of underground in general, I usually even let everyone go cave-adapted. The killzone PeridexisErrant designed (https://df-walkthrough.readthedocs.io/en/latest/chapters/chap09-end.html#chapter09) has been pretty effective for my playstyle. I do like the idea of having a large surface fort for future-proofing though. It just needs to be able to be secured faster.
I'd had bad experiences with wheelbarrows in the past, but you're right that they can help here. I'll need to design a new feature for setting the wheelbarrow count for specific stockpiles, though, since the interface for setting wheelbarrows depends on whether you have the stockpiles plugin enabled (so I can't just do it in a #query blueprint). I currently just have a global setting for how many wheelbarrows to set by default for all quickfort stone stockpiles, but that's not flexible enough.
The big thing with wheelbarrows is getting the stockpile settings right, but I never go without them. I've also never found the need to go past 3 per pile, so my designs are vanilla safe. I use "heavy feeders" in a 2x3 for stone and some (large & heavy) furniture. Coupled with 12 tile light receivers. Granted I also tend to be overly granular (AR?) with my stockpiles & workshop links. What I wound up doing with the Dreamfort was making the relevant feeders heavy and then I fit a 12 tile light around them. Also cut a 2x3 chunk out of large trash pile for corpses. Nothing worse than trying to haul some dead megabeast corpse up from the caverns without a wheelbarrow. Oh, you probably want to add sandbags to your metal feeder (furniture, forbid all types but sandbags at bottom, leave the rest).

we build lavish jail cells to keep criminals happy of course : )  It was my attempt to follow [some of the] advice on the wiki (https://dwarffortresswiki.org/index.php/DF2014:Jail). I'm open to suggestions, though.

I could totally add walls. At one point I had a library planned out behind the jail cells and I was starved for space, but now that libraries have moved to the (relatively new) guildhall level, there's no reason why we can't make the jail cells more "celly".
Having no experience with jails I'm clueless.
I wanted to make them equally usable for players who fill their wells with a bucket brigade and those who fill them by routing flowing water. How do you think they could be improved?

Sigh...the baths have gone through so many design changes and caused so much trouble.. I should just take them out. You're right about the contaminants. There used to be a dwarven shower set up over the baths that would clean the contaminants, but it was just too complex to set up and keep running. It involved a ring mist generator (https://dwarffortresswiki.org/index.php/DF2014:Mist#Ring_generator) powered by a dwarven water reactor (https://dwarffortresswiki.org/index.php/DF2014:Water_wheel#Dwarven_Water_Reactor) and linked by controllable gears. It was awesome, but it added 3 more blueprint application steps to the services level. Moreover, the whole thing would randomly just stop working and need to be reset. When I removed the mist generator components, I forgot that the whole reason it was there was to clean contaminants.

On the plus side, removing the baths also gets rid of the most difficult manual step in all of dreamfort -- filling them up with water to exactly 3/7 depth.

Before the aquifer change, I've had said no to filling by hand but the light aquifers being next to useless combined with them being too large it might be necessary. I know most players are frightened by aquifers but I used to always make sure I had a partial if no river/brook (and I took to not having river/brook). I'm back to running water on my embark until I figure out my way forward. I generally only ever do a single well somewhere near the hospital with a (probably overlarge) cistern. Dorfs will grab a bucket & soap and bathe at the well. They also don't leave contaminant trails that way.

I was a big fan of the mist generator since Buketgeshud, and designed an improved version based off that. It's a late game thing though, and requires drains on the lowest level, I never pump the water back through, have just had too many issues with contaminants in old versions. My plumbing systems tend towards the elaborate. I generally will work in several floodgates and grates connected to levers with multiple taps. Besides the well I'll have a cistern for obsidian generator, possibly as many as 8 seperate pipes for mist gens, and of course a water reactor for the magma pump stack.

I integrated the tombs into the apartment levels, since dorfs like looking at urns so much.

Unfortunately haven't gotten the bedrooms levels built since I can't get past first caravan so I didn't know about the urns (but I have had dead visitors to bury). I didn't even know urns were a thing, usually build coffins. Is cremation a thing now?
Sorry, I should add documentation for this. DF has a bug that prevents 'lye-containing items' from being used as a condition. You can *add* the condition, but it disappears when you save and reload, breaking the manager order that it was attached to. In the dreamfort automation orders, I have it set up so that soap making triggers lye making so lye exists for the *next* bar of soap, but you have to "prime the system" by manually making a few buckets of lye first.

I think the bugs with lye have been fixed for a while now (unless there are new ones). My old fort has a single tile pile for lye, in a barrel even (I remember that was an issue at one time; they put the buckets of lye in the barrel instead of dumping the lye into it). My order condition is "lye" not "lye containing" (which is used making soap), you get it from "p"  I believe it works properly, or at least used to. Understanding your reasoning though, your system is sound as well. Speaking of wood and work orders, that huge charcoal outlay is nuts, I wouldn't do that unless I had no coal. 20 makes sense, 200 ties up too many resources (both wood & labor) early on.

The lower meltables stockpile is a superset of the upper, iron/steel-specific one. There are just two meltable stockpiles since dorfs prioritize melting the closest items, so this is how I have them prioritize melting iron and steel items. I didn't see any reason to exclude iron and steel from the lower stockpile -- if you have a lot of garbage iron and steel, you probably want to melt it all first anyway.

I thought about that, the thing is automelt goes through stages. Keep everything, melt everything not steel, melt non-masterwork steel (and possibly I might filter the steel in ascending quality depending how things are playing out). So it'd be easy to toggle on first pile, then second pile. The lower pile will wind up being strictly Goblinite fairly early anyway.

ugh, could you possibly try a run without zones? I could prepare a version of dreamfort that skips them.

You mean without having quickfort place the zones or without them altogether? I can modify the plans easy enough. Already been slowly customizing. If you mean play without zones altogether I don't really see how. I went and commented them out, along with the cut trees and gather plants (which I heavily suspect at the moment)

Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 23, 2021, 06:50:44 pm
You mean without having quickfort place the zones or without them altogether? I can modify the plans easy enough. Already been slowly customizing. If you mean play without zones altogether I don't really see how. I went and commented them out, along with the cut trees and gather plants (which I heavily suspect at the moment)
Right - without having quickfort place the zones. Try a game manually placing them instead, and see if that stops the crashes. What's your operating system?

btw, to fix the bad config for the iron/steel meltables, you can add this to your aliases.txt file:
Code: [Select]
ironweapons:   {metalweapons}{forbidmetalweapons}{permitironweapons}
copperweapons: {metalweapons}{forbidmetalweapons}{permitcopperweapons}
steelweapons:  {metalweapons}{forbidmetalweapons}{permitsteelweapons}
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 23, 2021, 06:56:41 pm
You mean without having quickfort place the zones or without them altogether? I can modify the plans easy enough. Already been slowly customizing. If you mean play without zones altogether I don't really see how. I went and commented them out, along with the cut trees and gather plants (which I heavily suspect at the moment)
Right - without having quickfort place the zones. Try a game manually placing them instead, and see if that stops the crashes. What's your operating system?

btw, to fix the bad config for the iron/steel meltables, you can add this to your aliases.txt file:
Code: [Select]
ironweapons:   {metalweapons}{forbidmetalweapons}{permitironweapons}
copperweapons: {metalweapons}{forbidmetalweapons}{permitcopperweapons}
steelweapons:  {metalweapons}{forbidmetalweapons}{permitsteelweapons}

Just set the files up and I had a backup of the embark so loaded that up. *Fingers crossed*
Win10 Pro.

Thanks! I hadn't gotten around to playing with the aliases, I know you did a tremendous amount of work on them though.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 23, 2021, 07:22:50 pm
Bah. after removing the baths on the services level, there is no longer enough room for magma, so I swapped the clothier and metalworker sections back to their original locations. I'll add a note to the walkthrough to suggest leaving an empty level underneath industry for magma purposes.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on January 23, 2021, 08:31:35 pm
Bah. after removing the baths on the services level, there is no longer enough room for magma, so I swapped the clothier and metalworker sections back to their original locations. I'll add a note to the walkthrough to suggest leaving an empty level underneath industry for magma purposes.

What about the necessary holes that need to be channeled for the magma workshops?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 23, 2021, 08:43:26 pm
Bah. after removing the baths on the services level, there is no longer enough room for magma, so I swapped the clothier and metalworker sections back to their original locations. I'll add a note to the walkthrough to suggest leaving an empty level underneath industry for magma purposes.

Shouldn't take too much room, although I don't know how much you've condensed the level. Just short tunnels from smelter to smelter, joining at the forge (for volcano embark). If I was carting it up then of course just 1x1 in the right places.
Here is how I redid industry2, but granted that was with original services underneath.
Spoiler (click to show/hide)

Have made it to early March (whatevs) without crashing, so cautiously optimistic. Besides the zones I also did tree & gather designations by hand. Curious to see next season if the plant gathering bug happens again too.

So do you really make use of the huge refuse pile? Being as you have the quantum. I've always gotten by with 2 small feeders (1 light, 1 hvy) and usually an incinerator but sometimes a quantum. Would help early security having less open roof. I'm torn about the vents in general. On the 1 hand I seldom have miasma issues, on the other hand, when I do, I wish I had something like this.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 23, 2021, 08:46:32 pm
Bah. after removing the baths on the services level, there is no longer enough room for magma, so I swapped the clothier and metalworker sections back to their original locations. I'll add a note to the walkthrough to suggest leaving an empty level underneath industry for magma purposes.

What about the necessary holes that need to be channeled for the magma workshops?

That's what Myk was talking about. I'm not sure you can build a normal shop over them so it's something to be done by hand. Like my current embark is on a volcano so I can get right to them, but if I had to bring it up from the magma sea then I would be running regular shops for some time in all liklihood. (verified, you can't place non-magma shops over a hole)

Oh, I looked on your google Myk, just make the corridors to hospital and tavern 2 blocks longer each, magma will fit in 11 blocks wide.
Voila!
Spoiler (click to show/hide)

If you leave the stairs out of level plans, it makes it much easier for me to update mine if I don't have to rip them out of every level ;)
Even if you don't adopt the ramps, I would just make the stairguide 3x3 and leave it at that. If you're thinking about early time spent mining exploratory stairs, then this is as good a time as any to introduce noobs to our good friend "Marker Only"

Ordinarily I would just as soon spread across more Z-levels but I tend to play with custom worlds designed by Vjek and the 1 big flaw (for me) is they tend to be shallow. I've been foregoing guilds level and squeezing them into services levels too.

Piles working fine with new alias. More thought about them, I'd combine steel and bronze instead of iron, since if I can't make steel (perish the thought!) then I'm probably making my gear from bronze, not iron.

So we made it almost until the end of the first season and then we crashed. I was in the middle of using planning mode to build the ashery (because some workpile decided to snatch my barrel). Industry2 gets a lot of job cancellations in general (lost or missing). I was trying to pre-empt by cancelling and designating normal builds. Actually I am getting the same lost/missing BS with regular jobs just as much. This feels like the worst version of DF ever.

Had to repeat most of the month of March, but didn't crash again (also didn't play with planning mode again) and we made it to Summer. I went and cancelled any leftover gather plant designations before the end of the season.

By the by, doing this with mason 5, carpenter 5, mechanic 5, stonecrafter 5, weaponsmith5/grower3, miner5x2. Only brought an axe, had to make bronze picks but equipped all 6 non-woodchopper. The non-miners made level 2-3 and the miners made 7. So have managed to dig out surface 3, industry1, about half of farming1. Tunnel dug, magma should arrive by the time they get the smelters built.

Still not really sure if it's worth bringing trained miners or not, but definitely not if you are making picks. I think it takes too long getting temp forge setup and picks made and it costs too much time, on a dangerous embark I'd have been screwed. I will probably still bring mats for bronze but also bring 2 picks next time.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 24, 2021, 12:51:47 am
Oh, I looked on your google Myk, just make the corridors to hospital and tavern 2 blocks longer each, magma will fit in 11 blocks wide.
Voila!
fair enough. done. This let me reorganize the jail cells into a nicer pattern as well.

Quote
If you leave the stairs out of level plans, it makes it much easier for me to update mine if I don't have to rip them out of every level ;)
will do.

Quote
If you're thinking about early time spent mining exploratory stairs, then this is as good a time as any to introduce noobs to our good friend "Marker Only"
I went back and forth on marker mode. I eventually decided against it for the reason you allude to -- newbies aren't familiar with it and it could frustrate them. Instead I went with dig priorities on the stair guide so miners would only dig down once there is nothing else to dig on the upper levels.

Quote
Piles working fine with new alias. More thought about them, I'd combine steel and bronze instead of iron, since if I can't make steel (perish the thought!) then I'm probably making my gear from bronze, not iron.
so, upper meltables: steel and bronze, lower meltables: all metals other than steel and bronze?

Quote
So we made it almost until the end of the first season and then we crashed.
This crashiness worries me. I've been through dreamfort dozens of times, and the only times I've gotten DF to crash are when I've recompiled DFHack and reinstalled it while the game is running. If this is a problem with quickfort (or with the DFHack library functions it calls), it's going to be hard to track it down. I'll try to reproduce it while playtesting the new dreamfort changes.

Quote
I was in the middle of using planning mode to build the ashery (because some workpile decided to snatch my barrel).
barrel snatching stockpiles are the *worst*. I try to build industry before farming for that reason.

on another note, buildingplan is the other potential source of crashes. I essentially rewrote the entire plugin for this release so it could support all the building types. It is *possible* that I have a bug somewhere in there. If only I could reproduce the crash, then I could run df in a debugger and get the stack trace.

Quote
Industry2 gets a lot of job cancellations in general (lost or missing). I was trying to pre-empt by cancelling and designating normal builds. Actually I am getting the same lost/missing BS with regular jobs just as much. This feels like the worst version of DF ever.
even with buildingplan enabled, you're still getting job cancellations? that's what buildingplan is supposed to prevent..

just to clarify, quickfort uses buildingplan to build buildings regardless of whether "planning mode" is enabled for that building type. As long as the buildingplan plugin itself is enabled, quickfort will use it.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 24, 2021, 01:42:49 am
Oh, I looked on your google Myk, just make the corridors to hospital and tavern 2 blocks longer each, magma will fit in 11 blocks wide.
Voila!
fair enough. done. This let me reorganize the jail cells into a nicer pattern as well.

Quote
If you leave the stairs out of level plans, it makes it much easier for me to update mine if I don't have to rip them out of every level ;)
will do.
Awesome! Thanks!

so, upper meltables: steel and bronze, lower meltables: all metals other than steel and bronze?
That's what I went with. Iron is still better than bronze but I don't think I've ever not had flux and had iron, but I have had flux and no iron. If I didn't have iron on the map I would be recycling it from goblinite in all liklihood.

This crashiness worries me. I've been through dreamfort dozens of times, and the only times I've gotten DF to crash are when I've recompiled DFHack and reinstalled it while the game is running. If this is a problem with quickfort (or with the DFHack library functions it calls), it's going to be hard to track it down. I'll try to reproduce it while playtesting the new dreamfort changes.
Yeah, it's been a nightmare. I have generated at least 7 worlds with 47.04 now and all have suffered the same fate. I haven't crashed again since reload with this one, mid-June, got first migrant wave, still going strong. I have plant gathering set on the surface zones, although hating it...the miners would rather pick fruit than mine even. I still suspect the plant gathering.
Quote
I was in the middle of using planning mode to build the ashery (because some workpile decided to snatch my barrel).
barrel snatching stockpiles are the *worst*. I try to build industry before farming for that reason.
I've complained about that in the past. I see it still isn't fixed (I don't give a fuck what Mr "I don't play fortressmode" Toady says, I consider it an undesirable feature). Once again something from the old Quickfort; the small booze piles on every level. Worked great except each tied up an extra barrel. Somehow between the food and the booze pile on the surface 1 of them decided they needed an extra barrel. I think I made a really good case about why this was a worse issue than whatever it potentially was useful for but was shot down, and I let it go.

on another note, buildingplan is the other potential source of crashes. I essentially rewrote the entire plugin for this release so it could support all the building types. It is *possible* that I have a bug somewhere in there. If only I could reproduce the crash, then I could run df in a debugger and get the stack trace.

Quote
Industry2 gets a lot of job cancellations in general (lost or missing). I was trying to pre-empt by cancelling and designating normal builds. Actually I am getting the same lost/missing BS with regular jobs just as much. This feels like the worst version of DF ever.
even with buildingplan enabled, you're still getting job cancellations? that's what buildingplan is supposed to prevent..

just to clarify, quickfort uses buildingplan to build buildings regardless of whether "planning mode" is enabled for that building type. As long as the buildingplan plugin itself is enabled, quickfort will use it.

I wish I could isolate it down to something repeatable. Other than the caravan crashes nothing is reproduceable. https://dffd.bay12games.com/file.php?id=15384 is a save that will crash reliably shortly after unpause. It's been verified on Linux as well.

Yes, the industry level in particular for some reason. The farming level not so bad. I can't get much further to date.
I'm assuming buildingplan is enabled.

Just took a peak at the latest, I think I'd push the cells up even further (even with the tavern rooms) and then maybe put a barracks for the city guard in between the cells and the stairs.

LMAO! So with all the vents, where do I get miasma? From a piece of rotten cheese in the farmers workshop. Too funny.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 24, 2021, 02:04:32 am
so, upper meltables: steel and bronze, lower meltables: all metals other than steel and bronze?
That's what I went with. Iron is still better than bronze but I don't think I've ever not had flux and had iron, but I have had flux and no iron. If I didn't have iron on the map I would be recycling it from goblinite in all liklihood.
that sounds like the upper meltables should be steel, iron, and bronze then, no?

Quote
I wish I could isolate it down to something repeatable. Other than the caravan crashes nothing is reproduceable. https://dffd.bay12games.com/file.php?id=15384 is a save that will crash reliably shortly after unpause. It's been verified on Linux as well.
Thanks for that save. It's crashing due to stack overflow in the DF binary -- infinite recursion. I'm getting more suspicious of the "I'm my own grandparent" behavior that DFHack has with created zones. (see the bug (https://github.com/DFHack/dfhack/issues/1758#issuecomment-766181035) for more details)

Quote
Just took a peak at the latest, I think I'd push the cells up even further (even with the tavern rooms) and then maybe put a barracks for the city guard in between the cells and the stairs.
I had intended the barracks to be built in the empty room across from the trade depot on the surface. Do we need another one down on the services level?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 24, 2021, 03:02:50 am
Well I had my discussion with the liason and am actually conducting a trade, no crash.
So I guess it was the zones. I'm glad I popped in this thread, the zones were the last thing I thought it might be.
I'm wondering now if I delete them from some of the other saves if they will stabilize.

so, upper meltables: steel and bronze, lower meltables: all metals other than steel and bronze?
That's what I went with. Iron is still better than bronze but I don't think I've ever not had flux and had iron, but I have had flux and no iron. If I didn't have iron on the map I would be recycling it from goblinite in all liklihood.
that sounds like the upper meltables should be steel, iron, and bronze then, no?

Quote
I wish I could isolate it down to something repeatable. Other than the caravan crashes nothing is reproduceable. https://dffd.bay12games.com/file.php?id=15384 is a save that will crash reliably shortly after unpause. It's been verified on Linux as well.
Thanks for that save. It's crashing due to stack overflow in the DF binary -- infinite recursion. I'm getting more suspicious of the "I'm my own grandparent" behavior that DFHack has with created zones. (see the bug (https://github.com/DFHack/dfhack/issues/1758#issuecomment-766181035) for more details)

Quote
Just took a peak at the latest, I think I'd push the cells up even further (even with the tavern rooms) and then maybe put a barracks for the city guard in between the cells and the stairs.
I had intended the barracks to be built in the empty room across from the trade depot on the surface. Do we need another one down on the services level?

I'm torn on the iron, probably the lower. The only time I wouldn't have coal/flux/iron on my embark are if I wanted to make myself suffer. I would go so far to say as long as there is steel, candy and sand I will deal with anything else the game can throw at me (although I'm not a fan of syndrome rains and reanimation)

Oh, I build 1 barracks per squad usually, and I tend to have 2 infantry and 1 marksdorfs, like I said I don't usually use the city guard, but I'd make them another marksdorf squad for a total of 4.
The surface location is good, I'd put an inf squad there, another at my cavern entrance. I pretty much don't want anything coming into the fort without going past an inf squad. Sometimes I have extra barracks as well. I might go a bit overboard, but I'd probably do a duty rotation with this fort to prevent cave adaptation on them.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 24, 2021, 11:16:49 am
Well I had my discussion with the liason and am actually conducting a trade, no crash.
So I guess it was the zones. I'm glad I popped in this thread, the zones were the last thing I thought it might be.
I'm wondering now if I delete them from some of the other saves if they will stabilize.
I just verified this with the save you posted. Removing all zones before the merchants unload avoids the crash.

pull request with the fix: https://github.com/DFHack/dfhack/pull/1759
Thank you very much for finding this and helping me debug it!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 24, 2021, 12:29:12 pm
Well I had my discussion with the liason and am actually conducting a trade, no crash.
So I guess it was the zones. I'm glad I popped in this thread, the zones were the last thing I thought it might be.
I'm wondering now if I delete them from some of the other saves if they will stabilize.
I just verified this with the save you posted. Removing all zones before the merchants unload avoids the crash.

pull request with the fix: https://github.com/DFHack/dfhack/pull/1759
Thank you very much for finding this and helping me debug it!

Awesome! Glad I could help.
Glad I can play now too :D
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 24, 2021, 01:39:44 pm
Oh! You did go with my ramp :D
Add another channel/floor over farmers workshop (the rotten cheese incident).
I like the smaller refuse pile, although still say corpses need wheelbarrows. I can make it work in that space though, so I can deal if you are deadset against it.

I'm also rethinking the order; it is much faster to dig in soil so getting farming layer done before industry allows to get buttoned up faster (and I like getting my food & booze underground asap) if a smaller subset of flooring is done for surface.
Since I'm going to gen a fresh world to celebrate my new found freedom from crashes I'll give it a shot if I can figure out how to get this xml converter to work.

Some more work order stuff:
Dwarven peanut butter (rock nut paste & oil, soap). I think I use the tallow for cooking instead of making soap, although I guess one could do both.

mill seeds/nuts to paste
at least 30 unrotten PRESS_LIQUID_MAT-producing seeds
at most 10 non-pressed PRESS_LIQUID_MAT-producing

press liquid from paste
at least 1 non-pressed PRESS_LIQUID_MAT-producing glob
at least 1 liquid container
at most 10 SOAP_MAT-producing liquid

make soap from oil
at least 1 lye-containing item
at least 1 SOAP_MAT-producing liquid
at most 25 soap bars

Make cheese
at least 1 unrotten milk item

Brew drink from plant could use a check for empty food containers to reduce cancellation spam.
Could also use a brew drinks from fruit.

Add at most 0 bit & lignite to make charcoal order. (wood is either common or a precious commodity depending on embark, plus cutting/gathering/processing all that wood is a big time sink)
Auto-smelt for the other ores.

I'm guessing the auto-tailor works? I haven't gotten that far, but will try it without my usual clothing orders. Also leather armor/shields? Meh! I never use leather armor. Since marksdorfs like to melee more than they should, I give them the same armor, also steel xbows. It also protects them from elite goblin archers sniping them through fortifications (It has happened to me more than I like). I do make leather gloves, hoods, shoes for civilian wear. Also would benefit from "type leather" added to stock check, unless the idea is they are only made if there is a lack of metal armor.

Oh, as far as the job cancellations, I did come across a note somewhere about job cancellations being caused by item scatter (from deconstructing workshops), highly likely I had some of that going on since I start removing the surface workstations before industry2 is done.

Can confirm my lye-making order works correctly.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 24, 2021, 05:19:03 pm
Oh! You did go with my ramp :D
Yeah -- I haven't tested all these changes yet, but unless it causes unforeseen problems, I'm totally open to keeping it.

Quote
Add another channel/floor over farmers workshop (the rotten cheese incident).
done

Quote
I like the smaller refuse pile, although still say corpses need wheelbarrows. I can make it work in that space though, so I can deal if you are deadset against it.
not set against it at all, I just need to write the feature that will allow setting of wheelbarrow counts per stockpile, probably in the #place blueprint. the default for quickfort is 0 wheelbarrows, and I need to be able to set the wheelbarrow count regardless of whether the interface expects "www" or "w3{Enter}"

Quote
Some more work order stuff:
Dwarven peanut butter (rock nut paste & oil, soap). I think I use the tallow for cooking instead of making soap, although I guess one could do both.
I had reserved the tallow for soapmaking purposes since it's low value and eating it doesn't make dorfs happy. I'll work your suggestions in. Thanks!

Quote
I'm guessing the auto-tailor works?
Yeah, I've been happy with it in my long-running fortresses. It significantly reduced the complexity of the manager orders.

Quote
Also leather armor/shields? Meh! I never use leather armor. Since marksdorfs like to melee more than they should, I give them the same armor, also steel xbows. It also protects them from elite goblin archers sniping them through fortifications (It has happened to me more than I like). I do make leather gloves, hoods, shoes for civilian wear.
I'd like to keep those in to cover players who use the "defaults". The orders only keep one in stock at a time so it's not too much waste for those who don't use them.

Quote
Oh, as far as the job cancellations, I did come across a note somewhere about job cancellations being caused by item scatter (from deconstructing workshops), highly likely I had some of that going on since I start removing the surface workstations before industry2 is done.
that's very likely. I've run into the same thing when I disassemble the starter workshops on the surface. I call it out in the surface walkthrough (https://docs.google.com/spreadsheets/d/1vlxOuDOTsjsZ5W45Ri1kJKgp3waFo8r505LfZVg5wkU/edit#gid=1864520676), but it's a real annoyance.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 24, 2021, 06:16:30 pm
Oh! You did go with my ramp :D
Yeah -- I haven't tested all these changes yet, but unless it causes unforeseen problems, I'm totally open to keeping it.

I'm ready to give the new plans a whirl, but I can't for the life of me figure out how to make the xlsx2csv script work though (yes, I downloaded it and I have Python installed) so having to combine sheets by hand.

Historicly for me, the central ramp works as well as stairs, although the single wide I am concerned about collisions but there honestly isn't much you can do about it, even wide hallways are no guarantee dorfs won't run into each other. The 3 wide was mainly for carvans, I think they still ran into each other just as often, but it would require a 7 wide shaft. I think we could make the ramps 2 wide without otherwise adjusting your layouts, I might give that a shot too. 2x2 wide ramps should be able to handle a lot of traffic.
Quote

Also leather armor/shields? Meh! I never use leather armor. Since marksdorfs like to melee more than they should, I give them the same armor, also steel xbows. It also protects them from elite goblin archers sniping them through fortifications (It has happened to me more than I like). I do make leather gloves, hoods, shoes for civilian wear.
I'd like to keep those in to cover players who use the "defaults". The orders only keep one in stock at a time so it's not too much waste for those who don't use them.

Oh good point! I sometimes forget about other playstyles, which becomes a pain when I want to do something different myself. Yes, flexibility is good!

Aack! Speaking of the ramps, found an error. My fault. Starting from 3rd level for the odd levels needs to be(actually it could be done on the first with no harm)
Code: [Select]
#>
h d
` ` `
d h `
#>

So the pattern is:
Code: [Select]
#> # #
h d
`
d h
#> # #
d
h ` h
d
#> # #

There is also no reason the central column couldn't be dug out if desired, as long as those corner tiles are left solid to support the ramps we're good.

Farming plan missing a "Z" on farm workshop center.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 24, 2021, 07:22:49 pm
Ok, now that the crash bug is dealt with, let me summarize the changes to dreamfort based on the last two pages, just to make sure I haven't missed anything and so we can discuss any loose ends.

Already done:

TODO:

other notes:
Code: [Select]
bronzeweapons: {metalweapons}{forbidmetalweapons}{permitbronzeweapons}
forbidbronzeweapons:  {weaponsprefix}{Right}{Down 2}{Right}{Down 6}&^
permitbronzeweapons:  {forbidbronzeweapons}
bronzearmor: {metalarmor}{forbidmetalarmor}{permitbronzearmor}
forbidbronzearmor: {armorprefix}{Right}{Down 6}{Right}{Down 6}&^
permitbronzearmor:  {forbidbronzearmor}
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 24, 2021, 08:28:56 pm
Oh, cool, running off the spreadsheets directly makes life a lot easier.

I think that covers everything. I'm ready to make a fresh play-through so we will see.
I did verify my orders will make lye and soap, but I didn't verify that they will stop at the desired thresholds(which is equally important). I also didn't try the single barrel pile, I had let my old game run a season when trying to determine the cause of the crashes, but there's a good bit of lye in the barrel already (I was probably tinkering with work orders still back then) and a ton of soap.

I figured it out with the coffins, depending what material you make them with, you get different burial items. Also interesting note on them, "corpses inside them aren't protected from reanimation", which could lead to some Fun! in the bedroom...

AHhhhhhh! Yer killin me Smalls! I'm going to stop with the 8:42PM Surface file since I see you are still tweaking.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 24, 2021, 08:46:28 pm
awesome -- I'm in the middle of rejiggering the surface level, but it should still work. surface3 is commented out at the moment, but the blueprints that were in there have been moved to surface2, so it should be fine. I haven't tested our changes yet, so keep an eye out for blueprint bugs.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 24, 2021, 08:49:45 pm
awesome -- I'm in the middle of rejiggering the surface level, but it should still work. surface3 is commented out at the moment, but the blueprints that were in there have been moved to surface2, so it should be fine. I haven't tested our changes yet, so keep an eye out for blueprint bugs.

Ok cool. That makes sense, I wind up doing surface 2&3 together usually anyway. Although I bump the priority up for the industry dig. Ok, working off 8:42PM version.

Need to make a different checklist for the xls, but no biggy.

Zones still not active, although I am assuming I need to delete them and make them by hand until DFHack is fixed and distributed.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 24, 2021, 09:15:59 pm
Yes, active zones and non crashy zones will take a DFHack release. You should still skip creating zones with quickfort until then (unless you patch in the changes and build DFHack yourself).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 24, 2021, 09:51:08 pm
It would make sense to share my embark too I guess. It's a variation off ye venerable craftlords & all it's variants. A little more noob friendly than the purer ones, not as good for moodables, designed for getting dug in rapidly.
Spoiler (click to show/hide)
New activity log: (and I'm just going to keep adding to this like a running checklist/notes)
Set additional labors with DT
Set bookkeeper (and full precision),manager, broker
Adjust autobutcher settings
Set all dogs to be war trained (and not butchered). Designate booze not for cooking.
Designate wagon to disassemble (because it is far from my building spot anyway)
Find spot with surface 4, unset, designate surface 1. Clean up some undesired tiny ponds with tiletypes
Redesignate zones, assign geese, pack animals. Do not assign dogs until they are trained. Place nestbox. Add gather plants & clay, meeting zone(temp because wagon is far) to main pasture zone.
Build mason, smelter, forge
Queue orders for: 10 quartzite blocks, 2 coke, 1 bronze from ore, 4 bronze picks, 3 willow buckets, 9 willow wheelbarrows (obviously I've brought the materials)
Unpause
2 miners grab the copper picks and get to it
carpenter assigned woodcutter, grabs copper axe and cuts trees
weaponsmith/grower starts building forge
other 3 knuckleheads train the dogs and then I turn on plant gathering, cooking, brewing, milk, cheese, butcher, tanning, forge operator for them
since I've breached the cavern (on purpose), I designate some of the ramps mark only so that I am only vulnerable to flyers, until I can make a secure entrance
run surface2 and industry1 (1/18)

And the game crashed at that point. It is possible I screwed up with the zones though (was trying to be lazy and use the namer), will go back and comment them out.

Reload from embark (fortunately I keep ALL levels of saves and backups enabled)

baG - turn off everything except blocks
run surface2 and industry1 (1/20 was slower this time)
I undesignate the crafter and mechanic since I will not run the orders that need them until industry2 is underway
I also make some changes to the pile more suited to what I brought - this is a highly personalized thing since it depends what one brought, everyone should adjust as needed
*STRONG RECOMENDATION* Do not seperate surface temp food piles, just make 1 big 1, will cut down early game barrel shenanigans. Recommend for everyone.
Are 60 surface plots really necessary? :P I'd say designate less initially, ain't nobody got time fo'dat!
I undesignate the crafter and mechanic since I will not run the orders that need them until industry2 is underway. I do leave the 2nd mason so that the stonecrafter can also help make blocks
I also make some changes to the pile more suited to what I brought - this is a highly personalized thing
Designate temp kitchen, still, farmers workshop - brew the plump helmets before my fucktards eat them, milk yak and make cheese,  cook some meals
Queue up 4 hatch covers, they will go on surface to provide some minimal protection (I went with dual 2-wide ramps)
I run combine-plants & combine-drinks as needed to keep things tidy (I wish there was a way to automate these to run periodicly)
Now because I've collected all these stupid misc plants I wish I had put my custom booze reactions back in, I want the plumpers brewed first. At least I can turn the others off from the kitchen for the moment.
Bronze picks completed (2/12) as soon as they are finished up with the current orders everyone else but the carpenter/woodcutter will go help mine. Industry1 is half dug at this point.

   Status Update 3/1 All digging, maybe 3/5 done with industry1. I had to give the miners a kick in the ass, for some reason they stopped working.
I find changing the priority designation on a few tiles usually gets their asses in gear, but I feel I should have been further along by now. Of course there is so much work to be done and so few dorfs to do it. All wine is brewed and as many lavish meals as we could make. I'll butcher the yaks as soon as we get farming level shops in. Which probably won't be til next season.
Buried in creepy crawler remains (90+) sick of looking at them, autodump into volcano.

Can't figure out how to make orders work from xlsx. I put the csv back into the directory as well, just have to be careful not to mix stuff up and cancel what is no longer needed.

Industry finished digging (3/23) forgot to mention we queued up orders, probably later than we should have, but at least I can cancel the blocks since I have the quartzite blocks.
How come the orders don't take into account what you already have?
Channels are dug already, onto farming dig!
I make my adjustments to the feeders (which is why we made wheelbarrows ahead of time, willow is the lightest wood I have available)
I also cancel all the smelters and forge since I am going right for lava and designate the channels & tunnel to volcano
We get rid of all surface piles except food and all except carpenter and mason are dismantled. As soon as orders are finished they will go. Orders for farm won't get placed until then. I want all future work orders being done inside

*Possible bug* Are my aliases out of date? Stoneworker feeder set to ALL.
*Suggestion* Sandbags in metal QSP closer to glassmaker. I also enable the potash since it's only excluded bar, just have to remember to add a take from for the fertilizer pile near farm.
*To investigate* Putting lye and milk of lime into piles with a single barrel. *Bug* Glad I checked this pile was set to all food. A bunch of piles are wrong. Will undo and reapply to make sure I didnt maybe use the wrong file (habit).
I most certainly ran the right one, about half of the piles got jacked. Might be from WIP industry build?
I downloaded the file again, something is very messed up even though it all looks correct. I'm too tired to troubleshoot it tonight.
Ahhhh! Yup, I need bronze weapons alias.

And I had a crash again, on 3/28. I used the buildplanner again for some magma smelters (because my quartzite blocks somehow disappeared even though I have more than enough of them for ALL the workshops and trackstops). FUUUUUCKKKKK!!! I haven't saved since 1/20. An ironman save system for a buggy alpha is just assinine! Calling it a night.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 25, 2021, 04:00:16 pm
Continuing from 1/20 I decided to dig out the farm level first, I want to say it was finished around 2/16. The miners shot up 3 levels, which is good since I don't want the other 4 guys going past lvl 5 (moods).
Bronze picks are done too, but for the moment I want everyone crafting since the farm level needs stuff. Letting the doors wait, it's just way too many so early, stone is actually at a premium.

So we made it to summer without incident this time. Industry is about 80% dug out with just the 2 miners mining. Farming is done. So the extra unskilled miners wouldn't have made much difference.
I put another 2 hatches in the lower ramp, and locked them, prior to the crash we had a hungry head infestation. IIRC building destroyers can't destroy stuff about them, and I don't think flying building destroyers are upper cavern monsters anyway.
I worked around the build orders with a combination of creating them by hand/copying the individual spreadsheet contents to the csv. Being particular (AR) about which blocks get used for what, I designated the few surface floors and walls by hand.
So we are more or less secure (from low level threats) and food is underground.
*Bug* Seeds & booze wound up in cookable food. Technicaly they are but wrong pile. Also half the tallow is not forbidden, and it's run of the mill stuff not procedurally generated.
4/10 Industry dug out. Not too shabby. We can concentrate on finishing the farm layer furniture now.
Lay down industry2, adjust my feeder piles, remove forge/smelters, dig out magma tunnels and layout smelters

Got a very decent first migrant wave for a change! 7 adults. Legendary Dr, Glass worker. Someone with steel & axe pref (will be another weaponcrafter). No useless pets. A passable soldier.
Starting dig for services, after due consideration I am skipping the wells in the cells. I just don't think they merit their own wells and the risk of them running out of booze should be slim. As Aahz said, "I said bring me something to drink, not something to bathe in!"
Singletile piles too, I can't see tying up a lot of resources. Also I won't actually build the jail stuff until later. Hospital and tavern are priorities or I would dig this level later.
As I'm going to tap the nearby brook for water I add 3 mechanisms, a floodgate and a grate to build orders

So I'm getting a lot of job cancellations for storing items - dangerous terrain. Seems to be the double ramp somehow. I've never had these issues with the single, or even the triple I used extensively in another design. Possibly because of the way it is crammed in the space, so will stick with the plan (thank god for tiletypes)
I let things settle a bit (building & hauling) it is now 5/12,
Run import automation - create the other jobs I mentioned. Change the lye-making, also make seperate 1 tile piles for lye and milk of lime with a barrel since I want to experiment.
Turn booze cooking back on (now that we have no fear of cooking all our booze)
I have 3 miners now (1 immigrant was lvl 6), while I tend to turn on peasant labors for most dorfs, reading up on guild formation it sounds like a bad idea now - I don't mind a guild for each craft group, but I don't need 10 different farming peasant skill guilds FFS! (anyone made a mod to cut down on this?)
*WARNING* Process plants to barrel is no bueno; getting them to cook with syrup requires so much shenanigans to be not worth it. Better to make sweet pods into booze. I know some people like it as a trade good but at least set the input very high.
Magma is just reaching the forges (5/16)
Make a maximum size zone across farming level for plant gathering (since we've got cave fungus)

Made it to the fall. Things are quiet. Slow going all the masonry. Still making doors for farming2, just barely started on blocks for surface4. Need more masons!

*BUG* Meltables piles taking from cloth QSP (which was original metal QSP location) sorry I didnt notice this earlier.
*SCIENCE!* So about the lye. My order works. The trick is making it stop ;) The lye has to be in a barrel to count as the shutoff for the work order to make lye. For making soap it will count lye in buckets or barrel. So the single tile stockpile with a barrel. I haven't gotten around to paper but I imagine it works more or less the same, will see when I get enough pigtails.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 25, 2021, 10:48:24 pm
I'm following this with interest. Some notes:

Surface has been rewritten for much faster security. I'm looking forward to your opinion on the changes (on your next run, no hurry). I also removed the berry gathering step. Players can do that manually if desired.

baG for disabling wood/boulders, in the next version of DFHack you'll be able to do this in onMapLoad.init with:
  on-new-fortress buildingplan set boulders false; buildingplan set logs false

You recommended combining the surface food piles for cutting down on barrel usage, but the non-booze pile does not have barrels enabled.

Yeah, 60 surface farm plots is a lot. I moved their construction to much later, after the surface is minimally secure. I kept all 60 of them for now - what else would be useful in that space?

Hatch covers on surface - good idea. Will add.

Automated combine-plants and combine-drinks - see DFHack "repeat"

Orders from .xlsx - what is the issue? There is a difference in the -n parameter value (it's sheetname/label instead of just /label), but it works the same. You can avoid the names entirely if you use the list number (e.g. "quickfort list -l dreamfort" to get the number and then something like "quickfort orders 23"). I should implement supporting just /label syntax for xlsx files. I'd have to scan all sheets in the file, but it would be much more user friendly.

Orders don't take into account what you already have since there is no way to tell if you want "up to 10" of something or "10 more" of something. I figured in general if a player is using "quickfort orders" to manufacture items, then they need 10 more, not 10 total. Players who need "up to 10" should use workflow.

I'd like to put sandbags in the metalworker pile, but there is no way to distinguish them from empty bags. I think the solution here is to have a dedicated stockpile take from a glassmaker's workshop that only collects sand. I thought this was too case specific to add to the blueprint, though.

Why enable potash in the bars pile? The manager order keeps the count within what will fit in the potash pile on the farming level.

Note the bronze aliases I posted earlier had a typo originally. You may need to copy the most recent version from the post on the previous page.

Doors on farming level: yeah, there are a lot. At least since they're all in the same order they only enqueue one job at a time (per mason) so they don't block other stuff from getting built. I don't really want to create an extra step just for doors - there are already too many steps. I think advanced players can just pause the order like you did.

Seeds & booze in wrong pile - I'll check this

Also half the tallow is not forbidden - are you running a modded game? The tallow alias is keyed on the number of tallow variants in vanilla. I could use the search plug-in to find all types of tallow, but I didn't want to make quickfort dependent on any other plugins. Even buildingplan is optional.

Fixed meltables piles taking from wrong qsp
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 25, 2021, 11:24:11 pm
I've been following along with your changes on google drive, so have tried out some of the new surface fort, it helps a lot.
I ran surface5 finally just as we are about to go into winter.

The non-booze not having barrels has been a problem for me, it draws more pests, and if you are plant gathering it will get overfull, and then meals will get left in kitchen (I cook a few meals before getting dug in) and rot. I also want all plumps brewed asap, which relies on the barrels from the food used to make the first lavish meal.

Probably a smaller surface fort. I'd cut the plots, nests and hives in half really. The pastures too. Even for a pop of 200+. Could make it concentric, with the later plans expanding it, wrap the trap lines around the outside, make a killzone, etc. The doublewidth walls can go too (even though they look cool with my texture pack).

Good on the other tips. That helps a lot. Repeat won't work because the script needs to be ran on a stockpile directly.

Yes, sandbags are their own item type. Furniture>Types>Sand bags (all the way at the bottom). Been like that long as I can remember.

The potash count is higher actually (which is good, I like to have extra), but it isn't a big deal since it's not like the ashery is going to get full enough to be cluttered in all liklihood.

Stock LNP here. After some thought though, I would put the tallow in that pile anyway. Otherwise, the kitchen will be cluttered with tallow within a couple years if you've got an advanced meat industry.

Oh, do leave space for a QSP near Depot (there is room currently). I like to do an auto-tradetrash dump for low quality crap.

Walls about done (although much of the floor not, 64 blocks to go...and then the hundreds for the roof)  11/10, of course none of the levers are built, mechanic still has 34 mechanisms to go. I have all 3 masons shops being worked too. The 3 miners barely keeping up for stone too. This is just too labor intensive for early game.

So I can't seem to reliably get the make lye to stop, some task decides to grab the barrel (probably to dump bucket in) and then the lye in the barrel becomes unseen and the task triggers. Vicious cycle. It could be because I have labor problems, but I'm starting to think your method is better.

Oh, I think the farming level should be flipped N-S. So piles tend to fill from top left to bottom right, which means it is always a far walk from the kitchen. Also it might help make dorfs prefer to eat meals. I still see too many of them mawing on raw fruits & veggies.

Along with wheelbarrows, making masons/etc take from QSP prevents the jackasses from running down 10 levels and 40 east to lug a piece of stone back by hand.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 26, 2021, 02:09:21 am
What do you think of this design for the surface level? https://docs.google.com/spreadsheets/d/1vlxOuDOTsjsZ5W45Ri1kJKgp3waFo8r505LfZVg5wkU/edit#gid=232787567
compact enough?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 26, 2021, 02:34:09 am
What do you think of this design for the surface level? https://docs.google.com/spreadsheets/d/1vlxOuDOTsjsZ5W45Ri1kJKgp3waFo8r505LfZVg5wkU/edit#gid=232787567
compact enough?

Yes! Maybe make the trap corridors 1 wide even, since it would force everything through the traps and allow you to start with less of them. Extensions could always be built surrounding the complex later if desired.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: clinodev on January 26, 2021, 06:35:42 am
It would make sense to share my embark too I guess. It's a variation off ye venerable craftlords & all it's variants.

Oh wow, is Craftlords venerable now? I feel honored! And old!

Have you seen the current "Annotated" version where I explain the design choices? (https://pastebin.com/2xNtgiqS)

I'm waiting for the next release to update it.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 26, 2021, 09:53:24 am
It would make sense to share my embark too I guess. It's a variation off ye venerable craftlords & all it's variants.

Oh wow, is Craftlords venerable now? I feel honored! And old!

Have you seen the current "Annotated" version where I explain the design choices? (https://pastebin.com/2xNtgiqS)

I'm waiting for the next release to update it.

Well hello. I have actually, nice work on it! The equipment loadout I went with is actually based off that one, although disciplined craftlords has been a heavy influence on all my embark profiles over the years. I'm still a huge advocate of discipline for everyone.

Quartzite is my choice over bauxite because I get a distressing amount of fails on bauxite and I like the nice clean white.
I bring a nestbox because I've found it will be Fall before I can be arsed to make them otherwise. The need to get cleared and dug in fast I also brought the axe and picks. Since the crashes gave me the joy of restarting over and over again, I did get to closely observe some things. Even making 6 picks it is still less productive than embarking with 2. I can't seem to get it done in less than a month. Then of course with this fort your 4 basic crafters are tied up forever. Pretty much leaves the farmer doing everything until migrants.

We're into the next year. Levers and links built since we ran out of stone for mechanisms. Outside gate traps set (not sure they are useful, mobs will probably avoid?) Still quite a bit of floor to build. I'm looking forward to the new smaller design for next run.
Work orders - brew needs check for empty containers (5) to reduce cancellation spam, also brew fruit job. 400 drinks is only 16 barrels, I like to keep more.
Armor and weapons, I'm torn between liking more stock on hand (sometimes I will designate an entire squad at once) and the fact that this is quick and easy to get running, also for melting & reforging until we get all good pieces. It does keep the workflows running smooth I guess.
I give up with the lye - 2 orders, 1 tied to tallow soap as original, 1 to oil soap. I also added condition of max 5 lye (in case we somehow do have a barrel full) The 1 barrel stockpile seems fine.
Still no paper, I can't imagine we haven't produced enough pig tail by now, need to check all the relevant orders, might need to tinker them to ensure stock for all jobs happens from time to time.
Should probably set limit on plant cloth for process plants job.
I think too much milling flour instead of making booze going on too. I need to find how I used to handle dye production. At one time I used custom reactions but they got to be a pain (because graphics packs override them, etc) FOUND IT! millable unrotten dye plants (NM, I forgot that won't change the job, it will still mill anything) I think I did it from a specially linked mill & pile, I did a lot of micromanaged shit, unfortunately lost my more recent stuff - dead computer, corrupt/incomplete backups.
Collect sand - empty boxes and bags at least a few (I use10) , sand-bearing items at most 10 (seems like a good amount). I like to keep orders for green glass stuff and things in stock as well, but I guess this might not be for everyone.
Make rock crystal into pearlash.

Actually watching you work on plans in real time. Didn't know the Google had collaboration features.
siegebait! I love it! Yeah, was gonna mention adding 2nd guard dog pasture, when the one by stairs gets crowded it leads to accidents. As soon as the first litter of pups is born I start spliting them.

New farm level looks good too. Realized after I said flip it, that the vents would require a full redesign. Also have to worry about trees growing on top of areas that wouldn't have fit in new fort.

Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 27, 2021, 02:26:33 am
I tested the new layout and ironed out the obvious bugs, but I got distracted: since you've been seeing crashes, I've been running DF in a debugger while I playtested the new layouts, and I finally got it to crash. With lethosor's help, I think I tracked down the reason (https://github.com/DFHack/dfhack/issues/1762). It shouldn't be too hard to fix, but it might take me a few days to write and test the code. Once it's merged, you could pick up a dev build and overwrite your LNP version. Fewer crashes might be better for your psyche : )

I like how compact everything is now - it really makes it easier to get settled.

Btw, the new trade goods quantum needs a new alias: crafts. I'll post the definition when I get back to my computer (on phone).

If you're updating the automation orders in your fort, could you export the json and upload it somewhere (or post it here)? If you are already expanding the orders and updating the conditions, I'd hate to just be duplicating your work.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 27, 2021, 10:01:04 am
I tested the new layout and ironed out the obvious bugs, but I got distracted: since you've been seeing crashes, I've been running DF in a debugger while I playtested the new layouts, and I finally got it to crash. With lethosor's help, I think I tracked down the reason (https://github.com/DFHack/dfhack/issues/1762). It shouldn't be too hard to fix, but it might take me a few days to write and test the code. Once it's merged, you could pick up a dev build and overwrite your LNP version. Fewer crashes might be better for your psyche : )

I like how compact everything is now - it really makes it easier to get settled.

Btw, the new trade goods quantum needs a new alias: crafts. I'll post the definition when I get back to my computer (on phone).

If you're updating the automation orders in your fort, could you export the json and upload it somewhere (or post it here)? If you are already expanding the orders and updating the conditions, I'd hate to just be duplicating your work.

Glad you guys are tracking down and fixing bugs. I've only had the odd crash since we figured out the zone issue.

I tried the new layout out last night, even with some mishaps (dead civ - wound up with the king already, aquifer all over this embark - cancellations make me nuts, and I needed to divert for engraving) making good progress, caravan just leaving and I have drawbridges and levers down, ready to start walls. I went with 2 full masons this time. I got the bright idea to make the masons engravers and the miners architects (flipped from my usual) after reading up on guilds a bit. I regret it and will revert next embark. Mason & engraver are considered the same general guild. I think it isn't as bad as I originally thought with the individual skill guilds since I believe it is not just dorfs with levels of skill, but it being their actual profession (highest skill). As there are a dozen guilds just to cover the basics I really don't want anymore, although I might be making something out of a non-issue. We will see. Most of the new features seem to add nothing but headaches.

I'll be happy to export the orders.
https://drive.google.com/file/d/1lK8bRqN0_d3T7YeSZIpRCryftMF-dfVu/view?usp=sharing

Added make cheese, mill seeds, press oil, make soap from oil, coal & lignite check to charcoal, barrel req to brew drinks, brew drinks from fruit, steel pick/crossbow/breastplate/greaves, smelt orders for all other ores and alloys. I think that's everything. Scaled brew orders in half for more reliable production. I was getting dangerously low on booze waiting for 10 empty pots.

I'm still getting a lot of dangerous terrain cancellations around the ramps, I don't understand. This has never happened before. Are you seeing them as well? It's like they all got butterfingers and drop items on the ramp all the time. Figured this out too, tree root right next to ramp made a hole. Fixed the hole and problem went away.

10/12 - Roof 1/4 done, but I had some issues with the walls not being finished in spots and trying to snag blocks is hard. I think I'd like more hard stops in between some stages. The roof being a good example since it can wait a bit usually. Roof over center and doorways in surface5 (because those evil keas), the rest in surface6. Barracks maybe becomes 7. I do like the idea of barracks in it's own stage so it can be ordered and built sooner if needed. Also getting floors made out of potash and gold even though I have all but blocks disabled. NM, I know what happened, I unsuspended jobs that didnt have materials ready for them.

I don't remember crafting being a higher priority than building construction. Annoying me to no end that of the 3 masons none can find time to build/destroy in months. The quirks of this game seem worse than ever.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 27, 2021, 08:48:25 pm
I finished playtesting the current version (crash free with my in-development fixes. Hopefully I'll be able to get them merged soon), but let me go back and incorporate more of your suggestions. You really have helped to greatly improve dreamfort. I appreciate your feedback!

I found a bug in the stockflow plugin that prevents some stockpiles from being named correctly. I submitted a fix, but until it gets merged, if you get errors on the farming level, try disabling stockflow.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 28, 2021, 11:36:49 am
Spring of 2nd year and surface mostly done. Getting the traps built takes forever. Did get a 2nd (low-level) mechanic in this wave at least.
Wave after wave of keas have shown up this year, I forgot how truly annoying they are. Much cancellation spam. Militia squad has been killing them at least.
Thought I was going to have goblins, but it turned out to be just a human thief; a couple wardogs ripped her apart.
Realized I missed the 1 tile dump zone in services (was getting crashes again).
Had some oddities and aggravations, partly because I want particular stone used for particular things, partly because trying to work in your own side projects while the quickfort orders & builds are processing just leads to fighting over resources. I had to unbuild quite a bit.

So is it just me or did crafting times get longer (last time I played was when 44 was current)? I feel like my starting 7 used to be able to accomplish more. Granted sieges were also guaranteed to come by 1st winter if not before so there was much more rush to get dug in.


 
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 28, 2021, 02:26:26 pm
Ok, time for a roll-up update from my previous summary (http://www.bay12forums.com/smf/index.php?topic=176889.msg8239932#msg8239932) of done and upcoming changes.

Done:

TODO:

Notes:

New aliases needed in your aliases.txt:
(until the next DFHack release, when they'll be in the standard alias library)
Code: [Select]
crafts: {finishedgoodsprefix}{Right}f{Right}{Down 9}{togglesequence 9}^
forbidcrafts: {finishedgoodsprefix}{Right 2}{Down 9}{togglesequence 9}^
permitcrafts: {forbidcrafts}
bronzeweapons: {metalweapons}{forbidmetalweapons}{permitbronzeweapons}
forbidbronzeweapons:  {weaponsprefix}{Right}{Down 2}{Right}{Down 6}&^
permitbronzeweapons:  {forbidbronzeweapons}
bronzearmor: {metalarmor}{forbidmetalarmor}{permitbronzearmor}
forbidbronzearmor: {armorprefix}{Right}{Down 6}{Right}{Down 6}&^
permitbronzearmor:  {forbidbronzearmor}
tallow:         {foodprefix}b{Right}{Down 13}{Right}stallow&p^
forbidtallow:         {foodprefix}{Right}{Down 13}{Right}stallow&f^
permittallow:         {foodprefix}{Right}{Down 13}{Right}stallow&p^
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 28, 2021, 03:49:18 pm
TODO:
  • Heavy feeder stockpiles for corpses, boulders, and ores. this includes designing and implementing a mechanism for blueprints to specify (at stockpile creation time) how many wheelbarrows a particular stockpile should have
I think you should go ahead and add the piles, it's easy enough to manually add wheelbarrows until you get the code for them, but would save a lot of trouble. Cut the current feeder to 6 tiles. Make a 12 tile feeder for gems (build a 4x5 around the other piles, works out to 12 useable). Remove gems from stone. Metal just keeps the stones, everything else goes to the light feeder. Split the current trash feeder into 2 2x3. Corpses (both types) go into the lower pile, the refuse stays in the top. Add the 3 new piles to the hauling routes. Done. Even without the wheelbarrows it won't make anything any worse (other than the potential for more concurrent hauling jobs, which situationally can be good or bad).
Notes:
  • From your reports, it seems that the current lye-soap order chain is the best we can do (for now). is that right?
Yeah unfortunately. There's a few things in workorders I wish Toady would fix. Milkable animals another condition that doesn't work, I tried adding it to the autogenerated milking order. Material exclusions another thing I wish for (use any wood other than willow, any stone other than jet, specific plants, etc). Still it has come a long way.
  • It wouldn't be too difficult to extend combine-plants and combine-drinks to iterate over all stockpiles and automatically combine stockpiles that have the appropriate item types enabled. I suggest filing a feature request bug
Oh that would be awesome. Would save me a lot of trouble. I run them frequently.
  • If you want walls/floors built out of a particular material, you can set the filter in buildingplan and quickfort will use it. for example, to set walls to be made out of quartzite: bCwPM{Right}quartizite{Enter}{Shift}{Enter}. you just have to set the filter before you run the quickfort blueprint.
That's awesome too. Was going to ask if there was any way to do that. Do I leave it open instead of "k-menu"?
  • I forbid tallow in the cookables pile since it's enabled in the 'goods' quantum on the industry level (for use in soap). the kitchen will still use it, but with it stored so far away, all the higher-quality cookables will be used first.
Yeah, I realized that at some point after I mentioned it. Makes perfect sense.
  • Right now I only enable crafts in the trade depot QSP. are there any other item types we should add here?
That's a very discretionary item. Eventually I like to trade away EVERYTHING less than masterwork, other than most metal goods (higher than 33% return on melting). Obviously one cannot start out that way. My first caravan trade usually consists of 20-30 spiked wooden balls (which is pretty much enough to buy out the caravan, even giving them insane profit; happy carvan master==larger immigrant waves). As I said on another strategy-crafting thread once, DF trade is not like RL trade. It isn't to make a profit, it is to get rid of unwanted shit.
  • I normally dig a quarry below the apartment levels for more stone for the masons. would this be useful to add to the blueprint set?
If you've got something elaborate (or even just something cool), maybe with minecart tracks? (I'd love to see someone actually do something with them). I normally use reveal to find a patch of whatever I want and then just designate a large block/the entire vein as needed.
  • The traps outside the main gate aren't very useful for sieges (since you can't protect them with bridges to reset them during the siege), but they're great capturing wildlife that are pathing past your fort in peacetime. I found they are excellent for harvesting wild meat.
I actually caught a couple keas in them so I am now a big fan.
#$%@&! keas!
  • Barracks on the surface is in it's own stage, true, but the roof needs to be completed first, otherwise we can't place the beds (need to be "indoors"). When I split the roof construction, though, I can make sure the beds tiles are covered in an early stage
Found that out the hard way lol.
  • Re: I unsuspended jobs that didnt have materials ready for them -- yeah, this is buildingplan's bane. It's on my backlog to see if I can prevent buidlingplan-managed buildings from being manually unsuspended from the jobs list. They're already protected when querying the building itself, but, as you found, there are other ways to unsuspend.
I can break anything. I am the reason error-trapping is a thing. ;)
  • Sandbags in metal QSP - I'm having second thoughts about this one. I'm worried splitting furniture across two stockpiles will cause confusion. the current furniture QSP is really not that far away -- just 12 tiles (true, the metalworker QSP is only 4 tiles away, but is the increased efficiency for making glass worth the added complexity?)
I think you are right. For ease of designation it is fine to leave them. The few extra tiles probably doesn't make much difference (only for heavy things like stone does it really matter). I tend to get all granular with the piles, but even the master himself(https://www.reddit.com/r/MechGuides/) only uses 5 piles. I'm not sure the way I do them is worth the extra work, but workflow wasn't a thing back when I originally started using QSP.
New aliases needed in your aliases.txt:
(until the next DFHack release, when they'll be in the standard alias library)
[/list]
Code: [Select]
crafts: {finishedgoodsprefix}{Right}f{Right}{Down 9}{togglesequence 9}^
forbidcrafts: {finishedgoodsprefix}{Right 2}{Down 9}{togglesequence 9}^
permitcrafts: {forbidcrafts}
bronzeweapons: {metalweapons}{forbidmetalweapons}{permitbronzeweapons}
forbidbronzeweapons:  {weaponsprefix}{Right}{Down 2}{Right}{Down 6}&^
permitbronzeweapons:  {forbidbronzeweapons}
bronzearmor: {metalarmor}{forbidmetalarmor}{permitbronzearmor}
forbidbronzearmor: {armorprefix}{Right}{Down 6}{Right}{Down 6}&^
permitbronzearmor:  {forbidbronzearmor}
Ahhh, thanks for that!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 28, 2021, 06:27:25 pm
I went through the automation orders. I saw a few repeats of Lye and soap, I think left over from the experiments. I kept only the original lye and soap from tallow, removing the soap from oil (which I saw had a bad condition -- the one forgotten when a game is reloaded).

You added steel breastplates and greaves. I had left those out since mail shirts and leggings are superior and cover the same body parts (or so I understand). Do we need breastplates and greaves as well?

Uploaded integrated/clean/categorized/alphabetized version here (https://drive.google.com/file/d/17WcN5mK-rnADOm2B_JFpPnByYgkYjxhb/view?usp=sharing)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 28, 2021, 06:38:42 pm
I went through the automation orders. I saw a few repeats of Lye and soap, I think left over from the experiments. I kept only the original lye and soap from tallow, removing the soap from oil (which I saw had a bad condition -- the one forgotten when a game is reloaded).

You added steel breastplates and greaves. I had left those out since mail shirts and leggings are superior and cover the same body parts (or so I understand). Do we need breastplates and greaves as well?

Uploaded integrated/clean/categorized/alphabetized version here (https://drive.google.com/file/d/17WcN5mK-rnADOm2B_JFpPnByYgkYjxhb/view?usp=sharing)

Oops. There should be exactly 2 make lye and 2 make soap. The make lye as you had it plus 1 that checks the other soap job. The 2nd soap job from oil. I'll have to doublecheck what I did here.
BP & greaves are worn over mail & leggings. The mail is better against blunt and of course the parts the rigid armor doesn't cover but slash/pierce is much better on plate. Armor actually stacks too. Supposedly (I never really played Adventurer) wearing like 6 mail shirts and a bp and other shenanigans used to be the way to go. I never bothered with any of that, but a full suit + cloak is what I usually assign. I gave up trying to do other clothes because of the frustration of them screwing it up, but the cloak gives some level of protection to the entire body. Including the face. I think the armor & weapons stock counts should be higher too. I made half a squad from the last migrant wave, would have been nice to have equipment ready for them.

I am of course assuming none of these things changed from 44 to 47.

Edit - Oh, I forgot, you didn't have the ash and empty buckets checks. I'm always trying to minimize the job failure spam. The lye condition sorta works, the problem was when the barrel got tasked it stopped seeing it, which caused the trigger, and then the job went again, and the barrel got tasked again, and the job triggered again. Ad nauseum. Unneeded with the soap job trigger, I was curious to see how it works with buckets since the stockpile doesn't have barrels.

Some of the other jobs I am thinking of cutting to smaller batch sizes too.

Keep forgetting, barracks only needs like 1-2 coffers. For ammo mostly (they should store packs & waterskins in it when not in use). Squad ammo bugs were finally fixed some time ago. I'm not sure about racks and armor stands at the moment (if they actually work for storing things, I think it was a DFHack that made them useable and I don't see it anymore). Need cabinets so they don't drop all their clothing all over. Hospital doesn't need them (unless it's just for decoration) again 1-2 coffers. I think they'll bathe with the soap from the hospital storage too. I had a fort once with a marksdorf who had an infection that never went away (he was badly wounded in the first siege and I kept waiting for him to die, he never did). I made him a hunter, and in between hunts I observed him grabbing a bucket and soap and going to wash at the well regularly.

Oh! The lye-containing items is the bugged one? Can remove it from the oil soap, it'll work similar to the tallow one then.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 29, 2021, 04:18:27 pm
Fresh embark with latest files.
Something is wrong with the forbidcrafts alias. And bypassing that it's choking on forbidbronze or something on that line.
Bizarre because the melt pile was all working before.

Otherwise so far so good, just hit Spring with last few workshops on industry level being built. No volcano on this one so regular metalworking for now.
Farming level done, other than the tables/chairs/doors. Already crafting those and then we'll be onto glorious...rock...blocks...

Not sure why this one went so fast, I think closer (like 50 blocks away, so not sure) to the wagon.
I did build temp smelter & forge right next to the wagon. I also slapped down 2 masons and quickly knocked out 10 rock blocks from the starting quartzite and then disassembled them.
I get wheelbarrows made early out of the starting willow to keep the stone moving fast. I don't think I had any more or less trees in my build spot than last embark.
The only other thing I can think of is I skipped plant gathering for now, also the grower didn't bother planting anything this season. That all turned into extra labor. I even did get everyone mining briefly to finish the industry dig.

Farming3 not setting dormitory as dormitory. Hadn't noticed before since I generally designate the rooms by hand, because I can't wait for the level to be done.
Checklist missing "quickfort orders library/dreamfort.csv -n /farming3"
I did another tab for xlsx orders btw.

Outer main and depot gates got skipped for some reason. I just noticed it now, although it was some time ago I ran the command. All it says for them is no building at coordinates, skipping name, there was no build error. The next line is successfully completed. The spreadsheet is correct.

Fall has come. Finishing up the bridges (difficult to get the masons to leave their shops, have to go suspend all their jobs) and ready to run surface5. Guildhall is about half dug as well and services designated. Oh, got 5 adult migrants last season, 2 are legendary bonecrafters lmao, first time I've gotten pre-mooded dorfs, which kinda sucks...also 1 who had been possesed I guess since his skills all suck. Not the greatest but I'm happy to get 5 warm bodies 1st wave.
 
The downward stairs for the roof got removed at some point so they didn't finish building up there.

Life is much better since you told me about using the build planner filter!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 29, 2021, 09:02:16 pm
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 29, 2021, 10:11:06 pm
Oh, the masons aren't any fault of Quickfort, it's DF. Construction (at least for skill requirement jobs, not the general hauling) should be higher priority than crafting but it isn't.
The other issue is even when they get out of the shop it's like they would rather do ANYTHING except construction. Same for mechanic and carpenter. They will start hauling even. I guess I should turn that off on them too when I need them. Generally I have pretty much everyone haul everything. I've found that craftjobs take up so little time, especially for legendary skilled that having everyone haul when they aren't otherwise occupied works well.

Can you chain the orders? Like I will queue them all up, but like I will make surface6 jobs trigger when 5 is done, 5 when 4 is done, etc.

Seeing my mechanic is done with making mechanisms, it seems construction actually is part of the problem. He'd rather work on walls/floors than build traps.

Just queued services order, still confused how it comes up with orders for 5 blocks, 5 wells, 5 blocks, which is 1.25 builds not 5.

Actually I am liking that inside stairs for permanant roof access. With a hatch over it of course. I don't think there are any flying building destroyers.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 29, 2021, 10:24:20 pm
Can you chain the orders? Like I will queue them all up, but like I will make surface6 jobs trigger when 5 is done, 5 when 4 is done, etc.
That's on my backlog, but it will take quite a bit of time to design and implement. I have some ideas on how to do this, but don't expect it any time soon : )
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 30, 2021, 03:06:14 pm
Looking at what you are doing today. Constructed walls include a walkable floor on top, so the long paths aren't necessary.
I'm more inclined to keep that main pasture stairwell. While the undead siege thankfully didn't climb the outside stairs and jump down through my unfinished roof, I would expect goblins to.
Secured with a hatch it makes it easy to build more levels later if desired.

Should probably add an order for leather cloak, I still don't really know how tailor plugin works but assuming it won't create military uniform. Pre-candy I add a leather cloak to the all steel uniform, also don't know if you missed but absolutely yes, BP & greaves + mail shirt & leggings. The only reason I don't assign pants, shirt, socks, mittens as well are because the idiots have trouble dressing themselves and will leave a boot or glove off.

I still need to verify if the soldiers will store their civilian clothes in cabinets in barracks when assigned to store personal goods. Getting steel going now and actually got a decent armorer in 3rd migrant wave so will find out soon.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 30, 2021, 03:54:34 pm
It's true that constructed walls have a walkable top, but at the time that part of the roof is constructed, the walls below haven't been built yet. You make a good point about moving the roof access back into the pasture, though. Previously, the pasture staircase was temporary, just there so we could build the minimal roof over the central ramp. I deconstructed it in a later blueprint to clean it up, but it wasn't always getting deconstructed in time and it was interfering with the final roof. However, if we just make it permanent and stick a hatch on it, it solves that problem. I'll move that back. Thanks!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 30, 2021, 04:08:46 pm
It's true that constructed walls have a walkable top, but at the time that part of the roof is constructed, the walls below haven't been built yet. However, you make a good point about moving the roof access back into the pasture. Previously, the pasture staircase was temporary, just there so we could build the minimal roof over the central ramp. I deconstructed it in a later blueprint to clean it up, but it wasn't always getting deconstructed in time and it was interfering with the final roof. However, if we just make it permanent and stick a hatch on it, it solves that problem. I'll move that back. Thanks!

Add the needed walls instead of floors that need to be removed later? Eh, I guess none of the current roof needs to be removed so 6 on 1, half a doz on the other.

Charcoal, I did create a condition like the lye where it needs to be jump-started.
A 2nd charcoal job, that has less than 10 as a condition will alleviate that without using a lot of wood when we do have coal (so keep both jobs)

Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 30, 2021, 04:46:44 pm
Add the needed walls instead of floors that need to be removed later?
Fair point : )  I'll keep that in mind if it comes back up in later design changes.

I'm really happy with how dreamfort has changed over the last week! There are still improvements to be made, but I just found out that DFHack 0.47.04-r5 is going to be released soon and I want to get dreamfort playtested, documented, and merged ASAP. We can always make further changes that will come out with DFHack 0.47.05. Updates to the automation orders can be done anytime, since they're just hosted on Google Drive and not part of the DFHack release.

The crash fixes have been merged into the main codebase. If you're willing to, could you possibly install the latest "unstable automated build" from https://dfhack.org/builds/ and give dreamfort one more run through? You still need the aliases in your dfhack-config/quickfort/aliases.txt (the recent alias fixes haven't been merged yet (https://github.com/DFHack/dfhack/pull/1760)), but you no longer need to fiddle with the zones or the stockflow plugin.

I've been refining the command checklist (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=1459509569), tweaking the high-level build order and adding guidance comments to the checklist items. I'd appreciate your thoughts on that as well.

I've also been putting together embark profile suggestions (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=149144025), and you might have some thoughts on how effective those suggestions are.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 30, 2021, 08:27:53 pm
Add the needed walls instead of floors that need to be removed later?
Fair point : )  I'll keep that in mind if it comes back up in later design changes.

I'm really happy with how dreamfort has changed over the last week! There are still improvements to be made, but I just found out that DFHack 0.47.04-r5 is going to be released soon and I want to get dreamfort playtested, documented, and merged ASAP. We can always make further changes that will come out with DFHack 0.47.05. Updates to the automation orders can be done anytime, since they're just hosted on Google Drive and not part of the DFHack release.

The crash fixes have been merged into the main codebase. If you're willing to, could you possibly install the latest "unstable automated build" from https://dfhack.org/builds/ and give dreamfort one more run through? You still need the aliases in your dfhack-config/quickfort/aliases.txt (the recent alias fixes haven't been merged yet (https://github.com/DFHack/dfhack/pull/1760)), but you no longer need to fiddle with the zones or the stockflow plugin.

I've been refining the command checklist (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=1459509569), tweaking the high-level build order and adding guidance comments to the checklist items. I'd appreciate your thoughts on that as well.

I've also been putting together embark profile suggestions (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=149144025), and you might have some thoughts on how effective those suggestions are.

Cool. Let me know when you're done making changes and I will give it a run and proofread. Will be nice to not have to delete and recreate all the zones (especially the nestboxes what a pain).

Embark stuff. Hadn't thought about additional woodcutters (until migrants), but it would be handy for a heavily treed embark. I will give that a try this time actually.
Skillpoints into woodcutter, brewing, cook - NEVER! I've discussed these to death in a few threads. The first 2 there is no difference between 0 and 20, it still takes the same amount of time, the outcomes are the same (even the rare injury from falling wood is just as likely to happen to a skilled woodcutter). I think both of them are completely broken. Cooking doesn't give any bang for the buck. I'll cook a single lavish meal on embark that gives 20 food and not have to cook again until winter. Meal quality doesn't matter; they'll just as happily still steal the raw plump helmets instead of eating the meals.

While I've toyed with beekeeping here and there (well, whenever I do a surface fort) I've never thought, Gee! This is amazing! Am I missing something here? I think I've yet to see mead brewed in the Dreamfort btw. I have a feeling you know a secret I've yet to discover.

Rocks cheaper, plus I like my blocks to be "homegrown", I'm actually upping my initial haul to 12, which covers industry & farm for making blocks (I have this thing about my workshops). Having the 2 masons make blocks gives them something to do while we wait for miners (after all the dogs are trained for war of course, I bring 6). I also like the carpenter to have produced some wheelbarrows for stone hauling. I really hate seeing a dorf hauling a piece of stone by hand. After a year even still using autodump when the mood strikes me, there is too much shit to be hauled even with 30+ dorfs.

I bring some wood, I recommend willow because it is lightest after featherwood (which I have never been able to get on embark). It doesn't really make much difference, most wooden things being fairly light anyway, I like the wheelbarrows to be as light as possible though. Willow crossbows for city guard might save someone a tooth or 3. Most people recommend making someone else cut wood but I usually have the carpenter do it out of the 7 and then get a migrant(s) doing it.

2nd Mechanic does seem like a good idea. Grower is usually so busy that I don't let him do much else. Would I let go of my starting weaponcrafter for an extra mechanic for this fort? Yeah...considering I am still getting done in 2nd year for surface that was otherwise done months ago (and the mechanisms and cages were also done). I've never been so heavily into traps, but the cage traps are so OP they're almost broken. So very worth it.

I'm normally not a big fan of points into architect, I did it this run for SnG, I usually enable it on all 7. Stonecrafter not bothering with points. Will likely make 1st migrant wave before finding time to build the hives/nestboxes. After that it's just pots & jugs (oh and some mugs). Rock crafts suck and the masons & mechanic eat up all the stone anyway.

Won't get clothes going for first year at least. I bring a thread/cloth/rope as suggested by clinodev, as well as for early hospital on a more dangerous embark. Since the 1st caravan doesn't usually have much I want badly besides leather, thread/cloth/dye are things I will trade for initially. Anvil a must really, counting on caravan to bring 1 is lunacy.

I'm a big fan of bring bronze material, even if I wind up not using it initially, it makes a lot of xbow bolts and the cassiterite is never in a convenient place for me (if my site even has it). I realize the early smelter/forge isn't for noobs. Even I still bring pick & axe generally.

Of course the more crap you bring, the more time wasted hauling shit on the surface. I love my load of cheap sandbags but they are a bit of a hassle.

Almost forgot! Point of judge of intent.  If you care who is expedition leader, give it to them, make them broker as well of course. Of all the nob skills this is the only 1 I recommend on embark. Otherwise you have to guess the traders mood. If you want a lot of population quickly, I can't stress it enough, make sure he leaves ecstatic! Appraisal trains instantly (like 5 to 10 levels too)the first time you go into the depot, otherwise it would be essential as well. The medical skills are all fairly worthless (probably broken), again I haven't seen a level 13 surgeon do any better work than a 0 level surgeon. It doesn't go any faster either. The other skills aren't important (consoling,etc...fuck your feelz) or will be learned on the job (bookkeeping, organizer, leader).

Oh, and we're still all too happy to throw our clothes all over the place instead of use the cabinets (I have seen dorfs use cabinets in their own rooms, although again this might have been an old DFHack plug-in) so it looks like a rack, stand, chest, some (they won't all sleep at same time) beds is all we need for barracks.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 30, 2021, 09:08:15 pm
The orders checklist and tips looks good.
I really like the combined dig since I generally do exactly that anyway. I thought you were talking about the build orders earlier.

Other than I think services level still needs to be broken into phases.
Hospital I will want early, probably the tavern chairs & tables, a chest for mugs, and the stockpiles.
Everything else, including the statues but especially the jail and guard barracks can wait until surface6 is done. I'd probably put it off until after suites and maybe even an apartment level. Having a sheriff doesn't make the fort safer; it makes more potential !Fun!
Failing that, I wouldn't consider running services2 before surface 5 is done.

I'm having a problem with ropes not being seen as chains. Unless this is a new "feature"
I can't designate them to place (buildplan does just fine) and mechanic cancelling make traction bench. Rope are there and not forbidden. Last fort I was already making gold chains by this time so it didn't come up.
My bad, they were tied up for well construction.

Speaking of the aliases, I think the embedded obj tag you left in the list (before permitcraft) there was my issue.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 31, 2021, 12:12:54 am
Ok new embark. I went more random instead of the usual tailored design. Advanced smaller world default params with some adjustments for performance (cull, pop cap, sites, etc) metal everywhere (100) and no vampires/werewolves/otherbullshit (we do have towers though). Got gobbos, tower, hippies for neighbors. All the metals, sand, coal, flux, lava pipe to 130, 1 big spire of candy, wagon right next to river full of evil carp...FML! - all the things that make a dorfs life worth living. All in a 2x2 embark too.

Very little wood, surprising since it is a woodland level embark, it's all swamp and pretty dry too. Very odd. Of course I brought that 2nd axe so this is your fault Myk! At least site clearance will be very very quick. Fairly flat, which is good or we'd have trouble placing the fort. As it is I'm fairly limited in where I can put it, but it looks like near the center will work.

Spoiler (click to show/hide)
I forget what I explained or not before about choices. The problem with old people is they repeat themselves constantly...
The discipline and swimming are very situational, they also seemed more important in earlier versions. I still feel comforted by them. The architecture and engraving could be replaced with whatever is desired. For dangerous embarks some military skills probably.
5 units each of 4 food, any is fine. This makes a lavish meal (20 units) and leaves 4 empty barrels for wine (20 PH). Some people like to totally min/max for barrels but I find that's enough to get going. 9 each seed except PH (1 just for ready bag). I cut down our coal and metal for extra axe. Just the mated pair of birds with nestbox because too busy to deal with more early on and the first clutch will get you off to a good start for next year. 5/1 on the dogs so autobutcher doesn't catch me offguard before I fix the settings (I'll let my dorfs butcher cats all day long but no doggos!) We dropped weaponcrafting on grower for mech. This should let us get our traps and levers built before fucking xmas!

The usual assign dogs for war training. leader to broker, 1 miner to manager, 1 bookkeeper (set max precision, always do this or you'll forget), leave the rest for now. Go to kitchen and block booze cooking. Find spot. This would have been easier if someone gave me a new CSV :P (figured it out though, perimeter is hidden...quickfort gui ftw! although the gui is a bit fussy at times...queue orders could use some sort of feedback) Assign animals to pasture. Place nestbox.

Then we'll do a few things a little different this time. The 2 mechanics will cut wood since they have fuck all to do until the area is cleared and then I'll have them cook and brew, the miners will go mine, the other 3 will each train 2 dogs and then get shops setup next to wagon and get to initial blocks and wood stuff. Obviously assign the other jobs as needed.

Forgot to mention, I change the surface channel designations to priority 1, otherwise the miners haul stuff/stand around doing fuckall. Once they start digging they will generally continue to (until some kind of reset happens; reload, gets hungry/thirsty/sleepy/etc). I find besides prioritizing 1 dig over another, they also have a subtle influence on what other tasks they might do. If all their digging is 7 they will seem to find anything else more important to do. Engraving is generally an even lower priority than digging, which is why I find the combo works. When they run out of things to mine they go smooth.

Following along the help, I designate my digs, order industry2, farming2, surface3. Add my own 9 wheelbarrows, 3 buckets, crutch, splint, stepladder. Set all my wood & stone types. Almost forgot a lavish meal, and 4 brew plants (trigger start after meal).

Autonestbox doesn't seem to be working right, I manually ran start on it. Complained 1 box short (for the male???) and even though she claimed the box and laid eggs, she isn't assigned to the pasture.
Misc and cloth/leather pile still have bins enabled. Names not right eit....Tradestockpiles still messed up so they borked the rest. Might be my aliases still. Feeder has good, all qualities and 1 barrel. None of which is right. Actually I would set all qualities to off, so that nothing goes there by default and put in the help that it is for setting as desired. Or you could go with my personal fav, schwetty spiked chocolate salty wooden balls! QSP should be set to auto-trade of course.

Hmm, actually it doesn't like X15, otherstone. Removing that fixed it. Other than the single barrel on the feeder.
Another thing I forget all the time, taming area should be a pasture as well, for dumping cages.

You need to fix the farming plan, I think I forgot that too, been broken a while now. 3 is not a valid dig command!

Farming level dug out by 2nd month. I like the new minimal buildplan a lot! Will have that done quick.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 31, 2021, 02:12:24 am
Time for another summary rollup. I submitted (https://github.com/DFHack/dfhack/pull/1766) the current version of dreamfort for merging. Any further improvements will land in the following DFHack release. I want to make sure the version that goes public in the upcoming release is reliable. I'll continue to make updates to the online version, though.

Alias fixes have been merged. They should be part of the latest "unstable automated build" from https://dfhack.org/builds/. If you install it, you can get rid of the aliases in dfhack-config/quickfort/aliases.txt.

Done:

TODO:

Notes:
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 31, 2021, 02:52:08 am
Oh, I forget the auto-trade is a plugin that some people might not be using. Yes, I also set it to take from all the QSP. No, it isn't safe as it is, at least not for me (all finished goods of all quality).
The usual thing it does when it doesn't like a cell, it says which cell it didn't like. I thought otherstone was odd too since it has always worked fine before.

Yes, I will get the orders updated and reposted sometime tomorrow (after some sleep).

Yeah 5 beds should be plenty for a barracks.

I think the 5 hives are fine, I guess having it enabled on a few dorfs even at embark isn't going to hurt. It doesn't seem to be a very time-consuming skill at least.

So if you want to dump caged monsters, you can assign them to a pasture. This one is good since no other critters should be pastured there, it is right next to the barracks and it can be sealed easy. So you give the squad kill orders for the gobbo/undead/beasty and then have it assigned to that pasture. Most people make elaborate pits and dump mechanisms (and it is a fun exercise for later) but really if you strip an enemy and let an entire squad beat on it at once most of what you are going to capture on the surface poses little threat.

The feeder piles fine, it is the starter piles on the surface that have bins. No big deal since they are temporary. My skin just crawls at the site of "bins !=0"

3 hasn't worked for me, switching it to d3 does.

Industry2 giving me problems now too. expected to be back on screen querybuilding yada yada, but screen is civlist (yes, it drops me into civlist)...AA19 qauntumname, etc. Which has also always worked fine. I suspect it's some other pile and a bad alias again. I'll fix the build tomorrow and try it again.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 31, 2021, 11:26:29 am
Ah, it looks like DFHack 0.47.04-r5 was just released (http://www.bay12forums.com/smf/index.php?topic=164123.msg8242609#msg8242609). This is good. The crash bugs needed to be fixed. The dreamfort updates (https://github.com/DFHack/dfhack/pull/1766) didn't make it in, but that just gives us a little more time to test and refine. DFHack 0.47.05 will be out soon, and we'll catch that train.

No need for you to grab a dev build, then, you can just use the official release (https://github.com/DFHack/dfhack/releases/tag/0.47.04-r5). I *think* this will clear up all the errors and stockpile configuration inconsistencies you were seeing. Remember to clear your aliases.txt file so the updated library aliases are used.

You can get an updated unified dreamfort.csv file from the PR (https://github.com/DFHack/dfhack/pull/1766/files). Click on the three dots to the right of "data/blueprints/library/dreamfort.csv", select "View file". Then select 'raw', then r-click and save as dreamfort.csv. Overwrite the dreamfort.csv in your blueprints/library folder in your DF installation.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 31, 2021, 11:55:42 am
Ah, it looks like DFHack 0.47.04-r5 was just released (http://www.bay12forums.com/smf/index.php?topic=164123.msg8242609#msg8242609). This is good. The crash bugs needed to be fixed. The dreamfort updates (https://github.com/DFHack/dfhack/pull/1766) didn't make it in, but that just gives us a little more time to test and refine. DFHack 0.47.05 will be out soon, and we'll catch that train.

No need for you to grab a dev build, then, you can just use the official release (https://github.com/DFHack/dfhack/releases/tag/0.47.04-r5). I *think* this will clear up all the errors and stockpile configuration inconsistencies you were seeing. Remember to clear your aliases.txt file so the updated library aliases are used.

You can get an updated unified dreamfort.csv file from the PR (https://github.com/DFHack/dfhack/pull/1766/files). Click on the three dots to the right of "data/blueprints/library/dreamfort.csv", select "View file". Then select 'raw', then r-click and save as dreamfort.csv. Overwrite the dreamfort.csv in your blueprints/library folder in your DF installation.

gui/quickfort: fast access to the quickfort interactive dialog
Thought this was already a thing?

workorder-recheck: resets the selected work order to the Checking state
OMG! Peace and quiet at last! (well, 1 less source of spam)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 31, 2021, 12:07:30 pm
quickfort gui was already a thing. I just made it accessible via gui/quickfort as well so it's more clearly a member of the gui scripts (https://docs.dfhack.org/en/latest/docs/_auto/gui.html)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 31, 2021, 12:18:20 pm
It seems like TWBT is broken. Unplayable for me.

The dll is actually missing. It was in the unstable build, which of course is gone. :(
Actually it was not in the unstable build, but the old TWBT worked with it, now it says not compatible.
Among the many things I hate in this world are stylized bullshit fonts that look nice but are illegible.

So I fixed my alias file and industry2 works properly. I see what you did with the tradegoods and yes, that works since the only purpose of those items is for trade.
Although should probably still remove masterwork & artifact quality to prevent tantrums.

Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 31, 2021, 03:14:15 pm
yeah, TWBT is not included (https://github.com/DFHack/dfhack/issues/1597) in the DFHack release since they are hard to synchronize.

Fixed the tradegoods pile, but had to add some aliases to do it. Here's a new bunch that you'll need to add to your aliases.txt file : / (obviously not all of them are required for the trade goods pile, but we should keep your aliases synced with the master library list to avoid future mismatches):
Code: [Select]
masterworkonly: {prefix}{Right}{Up 2}f{Right}{Up 2}&^
artifactonly:   {prefix}{Right}{Up 2}f{Right}{Up}&^
togglemasterwork: {prefix}{Right}{Up 2}{Right}{Up 2}&^
toggleartifact:   {prefix}{Right}{Up 2}{Right}{Up}&^
masterworkfurniture: {masterworkonly prefix={furnitureprefix}}
artifactfurniture:   {artifactonly prefix={furnitureprefix}}
forbidmasterworkfurniture: {togglemasterwork prefix={furnitureprefix}}
forbidartifactfurniture:   {toggleartifact prefix={furnitureprefix}}
permitmasterworkfurniture: {togglemasterwork prefix={furnitureprefix}}
permitartifactfurniture:   {toggleartifact prefix={furnitureprefix}}
masterworkammo: {masterworkonly prefix={ammoprefix}}
artifactammo:   {artifactonly prefix={ammoprefix}}
forbidmasterworkammo: {togglemasterwork prefix={ammoprefix}}
forbidartifactammo:   {toggleartifact prefix={ammoprefix}}
permitmasterworkammo: {togglemasterwork prefix={ammoprefix}}
permitartifactammo:   {toggleartifact prefix={ammoprefix}}
masterworkfinishedgoods: {masterworkonly prefix={finishedgoodsprefix}}
artifactfinishedgoods:   {artifactonly prefix={finishedgoodsprefix}}
forbidmasterworkfinishedgoods: {togglemasterwork prefix={finishedgoodsprefix}}
forbidartifactfinishedgoods:   {toggleartifact prefix={finishedgoodsprefix}}
permitmasterworkfinishedgoods: {togglemasterwork prefix={finishedgoodsprefix}}
permitartifactfinishedgoods:   {toggleartifact prefix={finishedgoodsprefix}}
masterworkweapons: {masterworkonly prefix={weaponsprefix}}
artifactweapons:   {artifactonly prefix={weaponsprefix}}
forbidmasterworkweapons: {togglemasterwork prefix={weaponsprefix}}
forbidartifactweapons:   {toggleartifact prefix={weaponsprefix}}
permitmasterworkweapons: {togglemasterwork prefix={weaponsprefix}}
permitartifactweapons:   {toggleartifact prefix={weaponsprefix}}
masterworkarmor: {masterworkonly prefix={armorprefix}}
artifactarmor:   {artifactonly prefix={armorprefix}}
forbidmasterworkarmor: {togglemasterwork prefix={armorprefix}}
forbidartifactarmor:   {toggleartifact prefix={armorprefix}}
permitmasterworkarmor: {togglemasterwork prefix={armorprefix}}
permitartifactarmor:   {toggleartifact prefix={armorprefix}}

Give me a bit to work on the surface level, though. I'm moving a few parts around.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: lethosor on January 31, 2021, 05:18:13 pm
https://github.com/thurin/df-twbt/releases/ has a 0.47.04-r5 build of TWBT now, by the way.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 31, 2021, 08:47:19 pm
https://github.com/thurin/df-twbt/releases/ has a 0.47.04-r5 build of TWBT now, by the way.

Ahhh awesome. Thank you kind sir.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on January 31, 2021, 10:37:39 pm
The surface and services levels have been refined a bit. The important parts should be much faster to set up now. Updated dreamfort.csv in the PR (https://github.com/DFHack/dfhack/pull/1766)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: thurin on January 31, 2021, 10:41:31 pm
https://github.com/thurin/df-twbt/releases/ has a 0.47.04-r5 build of TWBT now, by the way.

sorry it took me so long ;)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on January 31, 2021, 10:46:51 pm
The surface and services levels have been refined a bit. The important parts should be much faster to set up now. Updated dreamfort.csv in the PR (https://github.com/DFHack/dfhack/pull/1766)

Awesome! Looks good. I am ready for surface4 now so will put it to work, as well as the services. I'm back on the R5 and have all the aliases in and it all seems to be working fine. Industry2 went off without a hitch.

And of course I see that PE just released new LNP a couple hours ago.

https://github.com/thurin/df-twbt/releases/ has a 0.47.04-r5 build of TWBT now, by the way.

sorry it took me so long ;)

Really, thank you so much! I find the game unplayable without TWBT these days.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 01, 2021, 12:59:37 am
New automation orders posted
https://drive.google.com/drive/folders/1kXvtKSYjBO8kKDSxNcMwttqZx5gYuS01

I reduced a lot of the jobs from batches to 1.
Increased steel armor/weapon stocks to 10 each. Same for leather pack/skin/quiver. Got fed-up trying to equip squads without gear ready to roll.
Adjusted conditions on many jobs.
Added strand extraction and wafers. Not sure how you feel about adding candy, being it's an advanced item, so I didn't do weapons/armor, but could add them as well.
I set limits of 100 each cloth type on the weave jobs, otherwise might as well just remove those jobs and use autoloom dyed thread (it's vanilla not dfhack)
Added a no-repeat make 1 lye order to kickstart the process (so 3 lye orders total)
Added 2nd charcoal order which makes up to 10 regardless of coal status. Otherwise coke won't get produced because of it's own start condition.

Removed surface and other orders that I had running when I did export. Hopefully I got them all. Obviously you shouldn't see any rock or mechanism jobs.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 01, 2021, 01:44:05 am
Those changes look great! Thank you so much for taking the time to go through them! I'll update the master copy.

And I found out what is making the farming level blueprint unhappy. It works fine in .csv. Apparently, when reading from an .xlsx, the value is modified to "3.0" by something in the reading stack. I'll get that fixed up.

edit: PR (https://github.com/DFHack/scripts/pull/251) submitted
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 01, 2021, 02:10:43 am
Those changes look great! Thank you so much for taking the time to go through them! I'll update the master copy.

And I found out what is making the farming level blueprint unhappy. It works fine in .csv. Apparently, when reading from an .xlsx, the value is modified to "3.0" by something in the reading stack. I'll get that fixed up.

Cool. Let me know if I missed anything.

I would add an early bed, coffer and table to the Hospital (like in services2). This lets it be (mostly, need water for cleaning) functional. Items won't get stocked without a coffer. Probably the hospital well as well.

A coffer for mugs in the dining hall too.

This is a first, got a necromancer outpost liason and caravan??? https://drive.google.com/file/d/1fiCgtKvivI17x4r2AokjasR4U6Wj_vl6/view?usp=sharing
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 01, 2021, 02:30:06 am
I didn't add any hospital furniture in /services2 since I didn't want to delay placement of the dining room table that we need for a query anchor. /services3, which builds all the (functional) hospital furniture is run as soon as the table and chair are placed, which shouldn't take more than a game day.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 01, 2021, 03:08:05 am
I didn't add any hospital furniture in /services2 since I didn't want to delay placement of the dining room table that we need for a query anchor. /services3, which builds all the (functional) hospital furniture is run as soon as the table and chair are placed, which shouldn't take more than a game day.

It's a higher priority than the large dining room. Like right now I am still finishing up surface5/6 and it's fall. Winter is likely to bring trouble.
Stone is getting tight. I've got too much work to do and too few dorfs to do it, granted I haven't gotten 2nd migrant wave yet.

I don't think I have ever actually had papyrus before, here's an order to add. I'll get it in tomorrow.
Spoiler (click to show/hide)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 01, 2021, 05:40:03 am
It's a higher priority than the large dining room.
Fair enough. done.

Quote
I don't think I have ever actually had papyrus before, here's an order to add. I'll get it in tomorrow.
Sheets are good, but if we start creating rules for quires or scroll rollers, we need to figure out how to keep them out of the jugs stockpile. or maybe we could turn the jugs stockpile into a tools QSP so we don't have to worry about it.

I'm going to tackle the heavy feeder piles next, I think. I implemented (https://github.com/DFHack/scripts/pull/254) the ability to set wheelbarrow counts per stockpile, but the code will need to be out in a release before dreamfort can use it. I'll just follow your suggestion of separating the stockpiles now and adding in the automatic wheelbarrow config later.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: Fleeting Frames on February 01, 2021, 09:32:21 am
Quire and Scroll material is the sheet material. So plant paper ones matches "Allow non-plant/Animal (!) Plant Cloth material". And parchment quires/scrolls don't get moved, even to everything stockpile.

Distinguishing scroll rollers from jugs....You could maybe do it with a minecart that is so full a jug (size 300) doesn't fit in & scroll rollers (size 100) do, but I'd suggest stockpile linking or keep scroll rollers stuck in workshop.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 01, 2021, 10:12:55 am
Yeah, I'm not really sure what to do about the other book-making stuff.
I'd hold off on adding until a library is built.
I'm still nervous about that too. Does anyone know if the endless cycle of taking out books and putting them away is fixed?

The roof continues to be a major manpower sink. I still can't get the traps, levers & bridges done first, even with 2 mechanics & 2 masons.
It should go to its own stage, even after the barracks. Barracks could actually go with surface5 I think. Make roof 6 and the extra traps/walls 7.
Otherwise barracks 6, roof 7, extra 8.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 01, 2021, 12:01:34 pm
Ok, let's:

edit: done. playtesting the changes now.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 01, 2021, 12:38:16 pm
Ok, let's:
  • build the entire barracks in /surface5 (I just need to make a note that the player should check to ensure the little roof segment over the barracks beds has been finished. it's usually the long tail of /surface4)
  • move the traps into /surface5 so they can be completed before all the walls/flooring show up
  • /surface6 will be the labor-intensive step, but traps, levers, and bridges should be completed before it begins. Walls will get built first, then floors, then roof (thanks to buildingplan remembering the order in which constructions were planned, of course there's always some variation depending on when the "ready" tasks actually get picked up)
  • /surface7 will be the extra trap corridor (and corresponding roof extension)

edit: done. playtesting the changes now.

I think just move the roof. Getting the walls done sooner rather than later is important. The roof is important, just it can wait until the other things are done.
The issue I am seeing is that everyone will prefer to do the wall/floor construction over everything else. If we have a hard pause in between the roof, it gives us time to get other jobs done as well as all the building. I just went and manually cancelled the roof and now bridges are getting built.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: Fleeting Frames on February 01, 2021, 12:39:54 pm
I'm still nervous about that too. Does anyone know if the endless cycle of taking out books and putting them away is fixed?
43.04 fix (https://www.bay12games.com/dwarves/mantisbt/view.php?id=9273).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 01, 2021, 12:52:28 pm
Updated automation.json
I had forgot leather cloaks, added the papyrus, adjusted bone & wood bolts jobs.

I'm still nervous about that too. Does anyone know if the endless cycle of taking out books and putting them away is fixed?
43.04 fix (https://www.bay12games.com/dwarves/mantisbt/view.php?id=9273).

Awesome!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 01, 2021, 02:05:16 pm
I think just move the roof. Getting the walls done sooner rather than later is important.
yeah, after playtesting, I agree. The bridges can get done if you wait to start /surface6 until after /surface5 is completely built (bridges, et. al.), but the roof distracts from finishing the walls. will move.

Quote
Updated automation.json
Thanks! I'll update the master.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 01, 2021, 03:41:00 pm
Didn't realize you shrank the guard barracks. Was wondering why the jail cells were off (I had already dug with older plan).
The dining hall needs to be resized more; it isn't filling out the room.

Annnnnd...I am finding myself in the position where I am actually going to make iron weapons & armor initially. The flux is fairly deep (below 2nd cavern) and I've got too much other stuff to do before I work my way down there. The cassiterite is deep as well, so the only bronze is what I brought and that's already been turned into xbow bolts. I forgot how shallow the embarks Vjek designs are (not to mention 1 cavern simplifies a few things) compared to default. It does change how you go about it a bit.

Of course the current bunch also made a liar out of me, they are putting their civvies in the barracks chests. Since I wasn't at all prepared for them with gear, I gave them "wear over" as opposed to the usual "replace", and so they put the clothes they had to remove in the chest as they got gear. NM, got excited over nothing. Was looking at someone's equip. They stashed some food in the chest, which will of course rot and stink up the place.
At least they're good for something Cannonfodder all of them, the last 2 migrant waves have brought me 30+ semi-useless twats. More than half of them have level 2 animal care and nothing else. A 15 mechanic. About 5 various low level soldiers. That's it. Not even a legendary cheesemaker among them.

Error in the sheet orders, needs to be just plain sheets or it'll keep making them, "reaction_class" : "PAPER_PLANT" not working.
Updated v6 now.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 01, 2021, 11:08:00 pm
Whew, I went through and reworked the command checklist (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=1459509569) to make it (I hope) more useful. Each stage is now annotated with about how long it should take (measured in migration waves).

Updated hospital, dining room, and surface roof according to your suggestions. Please tell me if I missed anything.

I updated the master automation.json (https://drive.google.com/file/d/17WcN5mK-rnADOm2B_JFpPnByYgkYjxhb/view?usp=sharing) and the dreamfort.csv file in the pull request (https://github.com/DFHack/dfhack/pull/1766/files#diff-335781fe7aa2310d365a2391d2750e96d3e97b0989af980e413e209c131c7e40).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 02, 2021, 04:45:44 pm
I've been playtesting dreamfort a few more times, and I keep running an issue where miners channel themselves down through the ramp but haven't dug it out fully so they can't get back up, trapping themselves down below. setting priorities for the ramp to make sure it gets dug in the right order has been partially successful, but miners don't always do it exactly right, especially when there are multiple miners involved.

Currently, I have the dig tiles for the ramp at priority 6 and the channel tiles at priority 7. This, normally, causes the miners to dig out an entire level before, digging the ramp dig tiles and then finally digging the channel tiles (or at least one of them) before starting on the next level down. This normally works fine, but for the services level, the channel tiles for the wells provide an alternate route down to the next level, and the sequence gets messed up. I solved the problem for this particular level by adding a staircase up from the cistern to the main services level. On my latest runthrough, a single dig tile got canceled (dangerous terrain or something random like that) and my miners got stuck on the guildhall level.

Do you see issues like this with your ramps? how do you avoid them?

My initial thought is that we can build in a failsafe. I can build a staircase that goes up each level next to the ramp. Not a single column that would have the same danger as the original central staircase that we replaced with the ramp, but alternating staircases on the left and right of the ramp, like this:

Code: [Select]
` ` h7 d6 `
d ` d6 ` u
` d6 h7 ` `
#>
` d6 ` ` `
u h7 d6 h7 d
` ` ` d6 `
#>
...

thoughts?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 02, 2021, 05:02:26 pm
I've been playtesting dreamfort a few more times, and I keep running an issue where miners channel themselves down through the ramp but haven't dug it out fully so they can't get back up, trapping themselves down below. setting priorities for the ramp to make sure it gets dug in the right order has been partially successful, but miners don't always do it exactly right, especially when there are multiple miners involved.

Currently, I have the dig tiles for the ramp at priority 6 and the channel tiles at priority 7. This, normally, causes the miners to dig out an entire level before, digging the ramp dig tiles and then finally digging the channel tiles (or at least one of them) before starting on the next level down. This normally works fine, but for the services level, the channel tiles for the wells provide an alternate route down to the next level, and the sequence gets messed up. I solved the problem for this particular level by adding a staircase up from the cistern to the main services level. On my latest runthrough, a single dig tile got canceled (dangerous terrain or something random like that) and my miners got stuck on the guildhall level.

Do you see issues like this with your ramps? how do you avoid them?

My initial thought is that we can build in a failsafe. I can build a staircase that goes up each level next to the ramp. Not a single column that would have the same danger as the original central staircase that we replaced with the ramp, but alternating staircases on the left and right of the ramp, like this:

Code: [Select]
` ` h7 d6 `
d ` d6 ` u
` d6 h7 ` `
#>
` d6 ` ` `
u h7 d6 h7 d
` ` ` d6 `
#>
...

thoughts?

Might not be a bad idea. Probably not going to make pathing any worse.
Other than the services level, which I ran into that issue too, saw your fix :) I haven't really had problems with them digging out the ramp, other than a "miners strike"
It was wierd, I set another batch of ramp, have like half a dozen miners or so, they went and dug it all and then they sat there for a bit at the bottom acting like they were stuck. There was more to dig above but they wouldn't budge for a few. I designated a few more things at very high priority and then they got moving. Maybe try using priority 5, which should still make them dig the levels out first. 6 & 7 seem almost bugged to me, like they would rather go haul than mine at that point.

So I got a large undead siege, filled all the cage traps and then some. I shudder to imagine what would have happened if we didn't have them (still lost 1 soldier to stupidity). What a pain it is clearing them out though. Need to look into mass-pitting solution. I vaguely remember hearing it is broken these days.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 02, 2021, 06:52:09 pm
I was thinking more about the ramp -- I wouldn't want the side staircase to break the surface, so I was going to modify to handle that, then I got to thinking, why do we need a ramp at all? wouldn't it be both "fall to death safe" and "miner dig self into hole safe" if we just used a spiral staircase?

Code: [Select]
` j7 `
u ` u
` j7 `
#>
` u `
j7 ` j7
` u `
#>
...

This would allow miners to dig up or down from their current position. Is there any advantage to using a ramp over this design?

yeah, I haven't had much luck with mass pitting in recent versions. In a previous version of dreamfort, I had an automated goblin flinger where hostiles in the animal stockpile would get loaded into a minecart, pushed down a series of impulse ramps, and shot through a fortification, where they would drop, stunned, into the middle of my barracks. Made for lots of well-trained soldiers : ) I took it out of dreamfort, though, since it made the surface that much more complicated to build. I might put it back in someday as an extra, though, once dreamfort "settles down" a bit.

edit: ok, so I just read the ramps vs. stairs (http://www.bay12forums.com/smf/index.php?topic=67523.0) thread and the stairs vs. ramps (http://www.bay12forums.com/smf/index.php?topic=157441.0) thread (and the why ramps instead of stairs? (http://www.bay12forums.com/smf/index.php?topic=104663.0) thread), but I'm not so sure if ramps have the definitive advantage here.

another suggested approach is a vertical shaft of stairs with hatch covers every few levels, but I don't like the thought of having to produce so many hatch covers.

ramps vs. spiral staircase:

we're paying the complexity cost of a different layout on every level with both approaches, so that's moot.
both prevent dorfs from falling to their deaths, both prevent line of sight issues (enemy on staircase on the surface would be able to see all the way down a central staircase shaft), and both prevent temperature issues from being open to the sky (not sure if this is really a thing, though).

ramps reduce dorf path distance when traversing.

stairs are guaranteed not to get any dorfs stuck in a hole and die.

I'm willing to be convinced one way or another, but at this point I'm leaning towards spiral staircase, since I like the "don't get stuck" quality of stairs and I'm not sure how relevant the "efficiency/FPS gain" from ramps is.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 02, 2021, 07:36:07 pm
I was thinking more about the ramp -- I wouldn't want the side staircase to break the surface, so I was going to modify to handle that, then I got to thinking, why do we need a ramp at all? wouldn't it be both "fall to death safe" and "miner dig self into hole safe" if we just used a spiral staircase?

Code: [Select]
` j7 `
u ` u
` j7 `
#>
` u `
j7 ` j7
` u `
#>
...

This would allow miners to dig up or down from their current position. Is there any advantage to using a ramp over this design?

yeah, I haven't had much luck with mass pitting in recent versions. In a previous version of dreamfort, I had an automated goblin flinger where hostiles in the animal stockpile would get loaded into a minecart, pushed down a series of impulse ramps, and shot through a fortification, where they would drop, stunned, into the middle of my barracks. Made for lots of well-trained soldiers : ) I took it out of dreamfort, though, since it made the surface that much more complicated to build. I might put it back in someday as an extra, though, once dreamfort "settles down" a bit.

edit: ok, so I just read the ramps vs. stairs (http://www.bay12forums.com/smf/index.php?topic=67523.0) thread and the stairs vs. ramps (http://www.bay12forums.com/smf/index.php?topic=157441.0) thread, but I'm not so sure if ramps have the definitive advantage here.

another suggested approach is a vertical shaft of stairs with hatch covers every few levels.

I'm not so sure either anymore. I loved the 3 wide spiral ramp, but this one it seems like I get a lot of cancelation spam related to it (probably them bumping into each other in passing). The dual 2x1 ramps I squeezed into 1 iteration of Dreamfort didn't seem to work so well. A single 3-wide ramp would require a 7x7 well. A 3x3 of stairs is surely bad for pathfinding and hence FPS, but if its as bad as other people say I don't know. Before I went to ramps I used a central 2x2. Granted, as mentioned, hatches at regular intervals do work, as long as you remember to place them.

I'd say that new design of yours is worth a shot if nothing else. It really shouldn't be any different than the current ramp design FPS wise.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 03, 2021, 03:58:35 pm
Updated to stairs, and no problems seen, so I removed the "escape route" stairway near the jail cells. Continuing to play test to refine the checklist (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=1459509569) order. I'm moving the automation import down until after the stairwell is protected on the surface and the hospital has basic functionality. Otherwise the dofs are too distracted to set up defenses on the surface. I'm also playing with the configuration of the starting dwarves to understand how much faster we can go with higher starting skills. Making the miners and masons proficient really seems to make a difference in how quickly we can get the basic fort up and running.

I working on updating (and documenting) the quantum hauling aliases so they can more easily handle multiple input stockpiles, needed for the heavy piles.

edit: Heavy piles done. I kept them small to keep the current footprint -- 3x3 refuse and corpse pile became 2x3 refuse and 1x3 corpse, 3x3 otherstone and gem became 2x3 otherstone and 1x3 gem, etc. We'll see if that's big enough or if we need more. Once my wheelbarrow-setting PR (https://github.com/DFHack/scripts/pull/254) is merged, I'll initialize them each with 2 wheelbarrows. quickfort orders will pick up that config as well and generate orders to build the wheelbarrows as well (this functionality is implemented, but it's built upon several unmerged PRs so I can't start the code review until the current crop of code reviews is done. Given the core team's focus on df-0.47.05, all this might not land until dfhack-0.47.05-r2, but we'll see)

Here is the most recent batch of alias updates:
Code: [Select]
sp_link: s{move}p{move_back}
sp_links: {sp_link}
quantumstop: ^hrn{name}&sn{stop_name}&&xxx{route_enable enter_sp_config={enter_sp_config_hauling}}{sp_links}^^q
corpses:     {refuseprefix}b{Right}{Down}p^
forbidcorpses:     {refuseprefix}{Right}{Down}f^
permitcorpses:     {refuseprefix}{Right}{Down}p^

and, for the interested, here's the updated documentation for how to use the quantumstop alias (though the docs look better in HTML):
Spoiler (click to show/hide)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 03, 2021, 08:30:03 pm
Updated to stairs, and no problems seen, so I removed the "escape route" stairway near the jail cells. Continuing to play test to refine the checklist (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=1459509569) order. I'm moving the automation import down until after the stairwell is protected on the surface and the hospital has basic functionality. Otherwise the dofs are too distracted to set up defenses on the surface. I'm also playing with the configuration of the starting dwarves to understand how much faster we can go with higher starting skills. Making the miners and masons proficient really seems to make a difference in how quickly we can get the basic fort up and running.

I working on updating (and documenting) the quantum hauling aliases so they can more easily handle multiple input stockpiles, needed for the heavy piles.

edit: Heavy piles done. I kept them small to keep the current footprint -- 3x3 refuse and corpse pile became 2x3 refuse and 1x3 corpse, 3x3 otherstone and gem became 2x3 otherstone and 1x3 gem, etc. We'll see if that's big enough or if we need more. Once my wheelbarrow-setting PR (https://github.com/DFHack/scripts/pull/254) is merged, I'll initialize them each with 2 wheelbarrows. quickfort orders will pick up that config as well and generate orders to build the wheelbarrows as well (this functionality is implemented, but it's built upon several unmerged PRs so I can't start the code review until the current crop of code reviews is done. Given the core team's focus on df-0.47.05, all this might not land until dfhack-0.47.05-r2, but we'll see)

Here is the most recent batch of alias updates:
Code: [Select]
sp_link: s{move}p{move_back}
sp_links: {sp_link}
quantumstop: ^hrn{name}&sn{stop_name}&&xxx{route_enable enter_sp_config={enter_sp_config_hauling}}{sp_links}^^q
corpses:     {refuseprefix}b{Right}{Down}p^
forbidcorpses:     {refuseprefix}{Right}{Down}f^
permitcorpses:     {refuseprefix}{Right}{Down}p^

and, for the interested, here's the updated documentation for how to use the quantumstop alias (though the docs look better in HTML):
Spoiler (click to show/hide)

Looks good. Small feeders should be fine. I don't do much bigger.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 05, 2021, 02:48:49 am
After a bit more playtesting, I refined the farming level to make it go faster and move all those doors to a later stage. Also documentation (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=0) updates, checklist (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=1459509569) refinements, and better (or at least better-tested) embark profile suggestions (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=149144025).

Oh, also I moved two nestboxes to the initial surface stages so egg layers that you bring with you can start to do their thing.

I'm always open to more changes, but I consider this version leaps and bounds over the previously-released version of dreamfort, and I'm proud to release it with the next version of DFHack. Thank you again, ldog, for all your suggestions and playtesting!

Once my recent pull requests (https://github.com/DFHack/scripts/pulls?q=is%3Apr+author%3Amyk002+) get merged, I plan to do a small update to automatically set the correct number of wheelbarrows for all the "heavy" feeder stockpiles and autogenerate manager orders to build those wheelbarrows.

I'll have to update the advanced blueprint guide, based on dreamfort, with some of the lessons and techniques I've learned.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 05, 2021, 10:16:00 am
Looking good! Glad I could help.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 07, 2021, 04:50:39 pm
I'm hacking on the automation orders a little. I've noticed that all my pig tails are getting mashed into slurry, despite the fact that I have a barrel full of the stuff. The order condition doesn't seem to be tracked properly. I might just take out the entire "sheet" chain for now.

I found an inverted condition in the make charcoal -- lignite should be at most 0, not at least 0

I was getting cancellation spam from leather and steel jobs, so I bumped up the thresholds where those jobs start getting enqueued.

I also tweaked the farming level a bit more, moving the dining hall further away from the kitchen. This makes booze less likely to get chosen as an ingredient for roasts.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 07, 2021, 05:23:42 pm
I'm hacking on the automation orders a little. I've noticed that all my pig tails are getting mashed into slurry, despite the fact that I have a barrel full of the stuff. The order condition doesn't seem to be tracked properly. I might just take out the entire "sheet" chain for now.

I found an inverted condition in the make charcoal -- lignite should be at most 0, not at least 0

I was getting cancellation spam from leather and steel jobs, so I bumped up the thresholds where those jobs start getting enqueued.

I also tweaked the farming level a bit more, moving the dining hall further away from the kitchen. This makes booze less likely to get chosen as an ingredient for roasts.

Yeah, I had to turn off booze-cooking until services is setup.
I thought I got the slurry making to stop. Maybe add X sheets as stop condition?
Those conditionals get me every time.
Does it help any starting them higher? I've found it just leaves me without stuff at times but I don't really get any less cancellation spam no matter what I do.
After about a week or two of playing this game I get burnt out because I realize how fucked up and broken it still is, every time.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: clinodev on February 15, 2021, 04:07:16 am
I want to reiterate that this project is wonderful, and just getting better with each update!

I wonder if you're familiar with the old DwarfMockup utility (http://www.bay12forums.com/smf/index.php?topic=143546.0), which allowed you to design fortress areas in a sort of DF "free mode" using a tileset, and then write them to the old quickfort format. It was always a little buggy, but when it worked, it was amazingly handy!

It would be amazing to have something like that to support your work!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 16, 2021, 04:01:28 pm
Thanks! I looked over DwarfMockup's feature list (the source code seems to have disappeared). I definitely see some things I like: ghost images of other blueprints for alignment, easy shape drawing, and, of course, tileset previews. I'm a little reticent to start *another* large project at this point, especially one that needs its own GUI, cross-platform build pipeline, test infrastructure, and release process. It also occurs to me that a game map itself could serve as a blueprint design, we have some of the required functionality implemented in DFHack already (though not in as usable a form):
How could we possibly augment the tools that we have to make in-game blueprint design efficient (and maybe even enjoyable)? I have a few pending tasks for the blueprint plugin in my backlog (https://docs.google.com/document/d/17EjZlGsUOJ6E8WtqkCRZi9BBKjL9L1IdHfkB3Ajqas8/edit#heading=h.8o9g2awig6v6), but they're just a start. I'm sure we can come up with more ideas here. One idea is to designate digging in the standard way in-game and have a script that converts the designated tiles into "dug" tiles. Copy/paste would be very nice -- essentially something that combines blueprint and quickfort in a user-friendly way.

In your opinion, what were the most useful parts of DwarfMockup and how do you think they might be implemented with DFHack tools in a way that you'd actually want to use?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 22, 2021, 02:27:36 am
If anyone would like a sample dreamfort (https://docs.dfhack.org/en/latest/docs/guides/quickfort-library-guide.html#dreamfort) savegame to poke around in (fully built, >200 population), I uploaded one of my recent playthroughs to dffd: https://dffd.bay12games.com/file.php?id=15434
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: clinodev on February 22, 2021, 04:51:01 am
I've managed to make contact with the DwarfMockup dev!

First fruits: https://github.com/fredlacave/dwarfmockup
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 22, 2021, 10:26:44 am
Nice! I'm glad it found a new owner. I sent you a PR, trying to get it to run, though I ran into a missing file. I think it's going to need some work overall.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: clinodev on February 22, 2021, 04:37:04 pm
Nice! I'm glad it found a new owner. I sent you a PR, trying to get it to run, though I ran into a missing file. I think it's going to need some work overall.

I'm very happy to say it's the original developer who's put it up, not me.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 22, 2021, 10:27:03 pm
Oh, that's even better -- I didn't look closely at the github user icon and confused it with yours : )

I'm looking forward to dwarfmockup's revival! More tools in this space is a good thing.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 23, 2021, 03:01:35 pm
If anyone would like a sample dreamfort (https://docs.dfhack.org/en/latest/docs/guides/quickfort-library-guide.html#dreamfort) savegame to poke around in (fully built, >200 population), I uploaded one of my recent playthroughs to dffd: https://dffd.bay12games.com/file.php?id=15434

I can't get it to showup.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 23, 2021, 03:39:53 pm
you mean in the DF game? the file is an archive of the region1 directory. you need to extract it in your save folder
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 23, 2021, 05:18:36 pm
you mean in the DF game? the file is an archive of the region1 directory. you need to extract it in your save folder

For real? :P
Yeah, I know. I unzip it into the save directory after removing my own region1 and it doesn't show.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 23, 2021, 05:51:53 pm
Hey, I've learned not to make assumptions when fielding bug reports :-) The save was made with df 0.47.05? Have you upgraded to that version yet? Also, you're sure it didn't get extracted into region1/region1 or something?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 24, 2021, 10:25:08 am
Hey, I've learned not to make assumptions when fielding bug reports :-) The save was made with df 0.47.05? Have you upgraded to that version yet? Also, you're sure it didn't get extracted into region1/region1 or something?

Ahhh, no, forgot about that. Was still running '04
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 28, 2021, 08:21:04 pm
Ok, now that dfhack-0.47.05-r1 is drawing near, it's time for a quick summary of what's recently changed and what's in the pipeline. A lot has gone in since my last summary (see the DFHack core (https://github.com/DFHack/dfhack/blob/develop/docs/changelog.txt) and scripts (https://github.com/DFHack/scripts/blob/master/changelog.txt) changelogs for the definitive list), but here are the highlights:
Quickfort got a lot of testing this cycle, both from me doing normal development (plus seemingly endless dreamfort (https://docs.dfhack.org/en/latest/docs/guides/quickfort-library-guide.html#dreamfort) runs) and from members of the community. Thank you cjhammel and ldog for helping me isolate the #zones (#post_zones) crash bug, and thank you Grumalg for helping me find the issue that was preventing stockpiles from being placed in empty regions within the bounds of other stockpiles. Special thanks as well to lethosor, who is always there to point me in the right direction when I get lost in DF's (and DFHack's) internals. Now that I'm more confident in quickfort's stability, I've gone ahead and deprecated DFHack's digfort script and fortplan plugin, which partially handled #dig and #build blueprints, respectively. I've added documentation to help digfort and fortplan users transition to quickfort (essentially: move your blueprints to the blueprints/ folder and replace the words "digfort" and "fortplan" with "quickfort run" on the commandline).
That's a subjective measurement of course, but really, with ldog's feedback and assistance, dreamfort has come a long way. The individual levels are much more efficiently designed and the fort as a whole is much faster to get up and running, making it work just as well in dangerous embark sites. The automation orders have been tuned to cover a greater variety of fortress needs while greatly reducing cancellation spam. The help documentation is far more complete, and there is now a checklist of commands (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=1459509569) so players can just copy/paste their way to victory. I also wrote up some embark profile suggestions (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=149144025) for players looking to optimize their dreamfort experience.
The quickfort GUI dialog got some love. It now gives feedback when you generate manager orders. You can also set the string filter as well as the --hidden and --library flags from the commandline instead of having to set them with hotkeys after the dialog is shown. For example, quickfort gui --library dreamfort notes will start the dialog with the dreamfort walkthrough blueprints already shown.
You can now set exactly how many bins, barrels, and/or wheelbarrows a stockpile should have when creating them with #place blueprints. This also hooks into the manager orders generation, so running quickfort orders on a #place blueprint will now enqueue orders for any explicitly set number of (wooden) bins, (stone) pots, and (wooden) wheelbarrows.
Now that all building types are supported by buldingplan, it can be annoying to enable each type individually when you just want planning mode everywhere. Now there is an "enable all" option in buildingplan's global settings dialog to switch all building types to planning mode. You can now also set buildingplan global settings from the console, for example: buildingplan set boulders false. Buildingplan global filter settings (like boulders, logs, bars, etc.) are persisted in the savegame, so you don't need to set them every time you load a game. "Mode" settings (like the new "enable all" setting) are not persisted, but they can be set from onMapLoad.init if you want them on all the time.
One of my long term goals for this project is to make community blueprints super easy to share and use so players can learn from other players. Having aliases separate from the blueprints that use them is a barrier to sharing them easily. With aliases in a separate file, there are two steps for using someone else's blueprints: (1) copy their aliases into your dfhack-config/quickfort/aliases.txt file and then (2) run the blueprint. Now with the new #aliases sections, you can declare your aliases right in the blueprint file. This means players can use shared blueprints without any manual steps, which should result in far fewer "it doesn't work" complaints.


So what's next?

I'm finally getting around to the automated regression test framework (https://github.com/DFHack/dfhack/issues/1690). After all the manual testing that went into the current version of quickfort, it seems silly not to "lock in the quality". I would hate to inadvertently break something in the future and not notice because it's too much work to manually test everything after every change. Automated tests will give me a lot more confidence that I can make disruptive changes safely.

While I'm writing quickfort tests, I plan to focus on buildingplan for actual feature work. There are still a lot of usability enhancements I'd like to get done for buildingplan, like persisting the item filter settings in the savegame, setting all related filters at once (e.g. setting all constructions to use a particular color of stone blocks), resetting all filters to defaults, etc. I also want to tweak the item matching algorithm so that pickier filters are satisfied first, and I want to give players the ability to move specific buildings up in priority so important buildings get their items matched ASAP.

At some point I'd also like to overhaul the blueprint plugin so it produces more complete and more usable blueprints, too.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: clinodev on March 01, 2021, 02:35:16 am

[...]

I also wrote up some embark profile suggestions (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=149144025) for players looking to optimize their dreamfort experience.

[...]


Are you familiar with my Annotated Craftlords embark profile(s) (https://pastebin.com/2xNtgiqS)?

When DF looks at an embark profile, it just ignores anything not in [square brackets] so it's possible to include up to a full tutorial.

If you'd like to pretty up an embark profile, (annotated or not) and have it included with the Packs, let me know.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on March 01, 2021, 07:08:38 am
That would be awesome - something that players can use more directly would be very useful
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on March 07, 2021, 12:37:21 pm
w00t! DFHack-0.47.05-r1 is out! With the bugs ironed out of quickfort and the improvements to dreamfort, I'm really excited about this release.

Formal testing is going well. I got code coverage reporting integrated into DFHack (https://github.com/DFHack/scripts/pull/261) and I've fully unit tested the quickfort parser functions (https://github.com/DFHack/scripts/pull/263). Found and fixed a few small bugs in previously unexplored corner cases, but nothing that significant. Testing should get more interesting as I create integration tests that modify game state.

I'm going to start looking at updating wikis and making DFHack quickfort more well known. I'm confident now that it's ready for widespread use.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: Mir on March 17, 2021, 11:38:16 pm
I'm having some trouble figuring out how to use the Blueprint plugin to create the blueprints I want to later replay.

I've got a small 5x5 block of random designations in place... some up stairs, some down stairs, and some dig squares.

I've tried placing my cursor at the center of it with all of q, d, k and then running 'blueprint 5 5 1 test dig`.
It creates the test-dig.csv I'd expect, and it's got quickfort style blueprint data in it... but it's designating nothingness for every square.

Doesn't seem to matter where I place the cursor, or how I 'get' the cursor. Hell I've tried centering with the mouse cursor even and using the ctrl+shift+p dfhack console to issue the command and keep the mouse in place... nothing.

I'm sure I'm overlooking something simple, but I just can't sort it. Any advice?

This is via PeridexisErrant's Starter Pack 0.47.05-r02, which is running Dwarf Fortress 0.47.05 and DFHack 0.47.05-r1 (release).


Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on March 18, 2021, 12:24:38 am
Blueprint needs some usability work, I will not deny.

It would certainly be cool if blueprint could read designations, and I have this feature in mind for the future. For now, though, blueprint reads the *actual* shape of the tile, not the designation. This means that you have to actually dig the tiles out before blueprint will create a proper blueprint from them.

Also, blueprint expects the cursor to be at the top left of the target area. Allowing a flexible start position is another idea I have for blueprint's future.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: Mir on March 18, 2021, 01:09:58 am
Oh! Well that makes a lot of sense.
Thanks for the help!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: bassmannate on April 10, 2021, 05:09:31 pm
Just making sure I'm not missing anything about getting this to work. I'm using the GUI to select my blueprints. If I don't have a cursor on the screen, it give me an error to place the cursor at the start location. If I bring up literally any cursor such as "look" or "designate" it will bring up the notes for that blueprint but doesn't appear to do anything.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on April 10, 2021, 10:21:44 pm
What's probably happening here is that you're running the first blueprint in the file, and that blueprint happens to be the help text blueprint. To actually do something to the map, be sure to select the blueprint with the proper label within the file.

For example, library/dreamfort.csv contains many blueprints. The first one is /help, which gets run by default if you don't specify a -n parameter on the commandline (e.g. quickfort run library/dreamfort.csv) or if you run the first dreamfort blueprint in the gui. If you want to run the dreamfort blueprint that, say, digs a central stairwell and sets up surface zones (among other things), you'd run quickfort run library/dreamfort.csv -n /surface1 or select that line in the quickfort gui.

I'm making some assumptions here about what's happening, so if this isn't useful, maybe take a screenshot of the quickfort gui screen so I can see what you're seeing. Then I can give better advice. If this post *is* useful, though, what could I change in the documentation or in quickfort itself to make things more obvious?

Btw, in the latest release of DFHack (0.47.05-r1), a cursor is no longer required to run help text (i.e. #notes) blueprints.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: bassmannate on April 11, 2021, 08:13:51 am
No, I've double checked it. I've tried the surface-1 blueprint as well as some of the older quick fortress blueprints. When I do it through the console using the run command, it tells me that "Tiles outside map boundary: X I just tried that with the embark.csv and it told me 12.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on April 11, 2021, 09:51:20 am
Yeah, it seems something else is going on here. There might be two separate problems:

1. Whatever dreamfort blueprint you try to run, it always runs the first blueprint (as if you were running quickfort run library/dreamfort.csv -n /help)
2) Other blueprints you try to run think they're outside the map boundary

First things first, could you possibly update to a recent version of DHack? There have been a *lot* of changes to quickfort (and dreamfort) in the past few months, and it will be hard to debug this if we're running different code. You can get a recent development version from the "Build Artifacts" list on this page (https://buildmaster.lubar.me/applications/3/builds/build?buildId=9892). You can just overwrite the similarly-named files in your DF game directory. If you're not already running DF 0.47.05, you'll need to update to that version first.

Also, when you get the report that all tiles are outside the map boundaries, could you run the following command in the DFHack# console and report the result?
Code: [Select]
lua ~df.global.cursor
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: bassmannate on April 11, 2021, 11:21:09 am
Yeah, it seems something else is going on here. There might be two separate problems:

1. Whatever dreamfort blueprint you try to run, it always runs the first blueprint (as if you were running quickfort run library/dreamfort.csv -n /help)
2) Other blueprints you try to run think they're outside the map boundary

First things first, could you possibly update to a recent version of DHack? There have been a *lot* of changes to quickfort (and dreamfort) in the past few months, and it will be hard to debug this if we're running different code. You can get a recent development version from the "Build Artifacts" list on this page (https://buildmaster.lubar.me/applications/3/builds/build?buildId=9892). You can just overwrite the similarly-named files in your DF game directory. If you're not already running DF 0.47.05, you'll need to update to that version first.

Also, when you get the report that all tiles are outside the map boundaries, could you run the following command in the DFHack# console and report the result?
Code: [Select]
lua ~df.global.cursor

I'll give it a shot here later. I'm not sure if it's worth mentioning but I'm running this under the LinuxDwarfPack version of the Lazy Newb Pack. I'll see if I can get a separate install with DFHack going or even see if I can put the latest version of DFHack into the system installation directory since I installed this with a DEB package.

Here's the output of that lua command after I ran the embark.csv:
Code: [Select]
[DFHack]# lua ~df.global.cursor
<global.T_cursor: 0x19bfe60>
x                      = 108
y                      = 96
z                      = 129
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: bassmannate on April 11, 2021, 11:33:14 am
Alright, instead of risking my system install, I simply copied it all over to my home directory and extracted the newer build of DFHack over that install. My initial try looks promising. I did the quickfortress dig1 blueprint from the gui and it did designate a number of channeling tiles. I'll mess with it some more and report back here but it may be that the version of DFHack in that pack is just old despite it being released only a month ago.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: bassmannate on April 11, 2021, 06:52:48 pm
Alright, new problem. I'm following dreamfort to learn how it all works. The guide says to run automation.json but despite having it where it's saying to put it, it's still telling me that dfhack-config/orders/automation.json could not be found.

Code: [Select]
:~/Applications/linux-dwarf-pack/df_47_05_linux/dfhack-config/orders$ ls
automation.json

Any thoughts? Am I missing something obvious?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on April 11, 2021, 07:22:06 pm
Since you copied the files from a package manager-managed directory, are there any symlinks involved? or does the launcher script set the current working directory? We saw a similar issue in https://github.com/DFHack/dfhack/issues/1671. Are the comments in that bug helpful?

If you put a .csv blueprint file in the blueprints/ directory, does it show up in quickfort list? How about if you add a file to your system-installed blueprints/ dir?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: bassmannate on April 11, 2021, 08:32:47 pm
I don't see any symlinks anywhere. Just for grins, I created a ~/.dwarffortress folder and copied dfhack-config and all its contents over. Still nothing when I run order import automation. Everything is showing up just fine and it's finding the blueprints but it's just not finding this json for some reason.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on April 11, 2021, 09:22:36 pm
If you manually create a few manager orders and run

orders export testytest

Where does testytest.json show up?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: lethosor on April 11, 2021, 11:59:05 pm
Similarly, does
Code: [Select]
:lua ~dfhack.filesystem.getcwd()
print
Code: [Select]
~/Applications/linux-dwarf-pack/df_47_05_linux/
or something else? If something else (other than expanding "~"), then you should be looking in whatever folder it printed for the "dfhack-config" folder to edit. Alternatively, your pack might be setting the working directory incorrectly.

Another thing I might have missed: did the "dfhack-config" folder already exist? It should have, so if it didn't, the one you're modifying was likely created in the wrong place - see paragraph above.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: bassmannate on April 12, 2021, 04:59:08 pm
Aha! It went to ~/.local/share/linux-dwarf-pack/df_47_05_linux/dfhack-config/orders which kinda makes sense since this is a system install. I'm a little new to Linux Mint and even before switching, Ubuntu was in the process of moving configs all over the place. This looks like the "normal" place for Mint to put configs judging by what else is in the ~/.local/share folder.

I just copied my automation.json over to the ~/.local location and it appears to have worked fine since I didn't get an error. It should also be noted that this is my first real attempt at using dfhack so quite a bit of this is all new to me and I'm not entirely sure what all is possible with everything which is why I didn't even know that export command exitsted.

Also, I don't know if it's worth mentioning but the dfhack-config folder was present but the orders folder was not under my installation folder. I'll stop now since this is getting more into issues with the pack I'm using than anything. Thanks for the help, guys!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on April 23, 2021, 05:45:22 pm
I've been silent for a while about development, so I should write an update. I've been focusing on tests for the core quickfort algorithms. Some 2000 lines of unit tests later, I've fixed a good number of bugs that now won't get to annoy you ; )

I still need to write the higher-level functional and integration tests, but I think I'll take a break from testing for a while. Instead, I'm going to take a look at the blueprint plugin and start thinking about what it will take to make it more useful.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: clinodev on April 23, 2021, 06:18:03 pm
Your labors are much appreciated!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on April 24, 2021, 10:44:53 am
Thanks!  : ) I love working with this community!

Ok, here's a rough roadmap for blueprint. All this is open for discussion/suggestions, but the goals I have are:

Blueprint usability
This essentially comes down to adding an interactive visual interface. I'm thinking: use the cursor to select the boundaries of the blueprint area (complete with flashing blocks indicating the selected area) and then select the "start" position of the blueprint (where the cursor should be when replaying the blueprint). Other on-screen elements could allow other options to be set before the blueprint is generated.

Capture more map state
There are lots of opportunities for improvement here. Here's a few items that I plan to cover:
I'd like to be able to exactly reproduce stockpile configuration with regards to which item types are enabled, but it's difficult to do. Perhaps I can integrate with the stockpiles plugin to export the configuration, but I'd need to build functionality into quickfort to be able to automatically import it again. I'll think about this more later, once blueprint is in better shape.

Quickfort integration
Quickfort supports a lot of blueprint metadata that the blueprint plugin doesn't currently provide, like descriptive comments, labels, and blueprint chains. These could be added automatically or customized with blueprint plugin commandline/gui settings.

Finally, I'd like to add a section to the quickfort user guide on how to create blueprints with the blueprint plugin and the bits of syntax you need to know to make finishing touches. A guide for creating blueprints with absolutely minimal effort.

Big questions to answer first
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on April 24, 2021, 04:50:33 pm
1. Sounds like a lot of work for little/no gain. I don't see any reason to use the original anymore. Yours is fuller featured. I guess if DFHack stopped being a thing the standalone Quickfort would still work, but it doesn't seem a likely scenario.
2. It looks like you made your case for Lua here. Isn't most of DFHack Lua scripts anyway?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: lethosor on April 24, 2021, 07:45:57 pm
Blueprint usability
This essentially comes down to adding an interactive visual interface. I'm thinking: use the cursor to select the boundaries of the blueprint area (complete with flashing blocks indicating the selected area) and then select the "start" position of the blueprint (where the cursor should be when replaying the blueprint). Other on-screen elements could allow other options to be set before the blueprint is generated.
Awesome. I was thinking pretty much along the same lines. gui/mass-remove might be useful to reference for some of the UI flow, and there are probably others as well. I hadn't even thought of allowing the start position to be chosen, but that makes sense to me (maybe a default of the top left corner and/or a way to choose presets like the corner/center of a blueprint could be useful?).

Quote
Finally, I'd like to add a section to the quickfort user guide on how to create blueprints with the blueprint plugin and the bits of syntax you need to know to make finishing touches. A guide for creating blueprints with absolutely minimal effort.
Thanks, that'd be great!
Quote
Should I re-implement blueprint in Lua? ... Blueprint is currently written as a C++ plugin, but there's nothing about the functionality that requires it to be a plugin instead of a native Lua script.
"Convential wisdom" is that map-based operations over a large area tend to be noticeably slow in Lua, with an extreme example being "reveal". I think most reasonably-sized blueprints wouldn't be too slow to create from Lua, but you might want to benchmark something dreamfort-sized and be open to implementing bottlenecks in Lua edit: C++. (I don't have a great understanding of exactly what slowed down Lua "reveal", but DF field accesses can add up, so caching those as locals could potentially help in some cases.)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on April 24, 2021, 09:49:21 pm
"Convential wisdom" is that map-based operations over a large area tend to be noticeably slow in Lua
ahh, ok. thanks! let me run some benchmarks to see what's feasible
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on April 25, 2021, 12:03:28 pm
Ok, I implemented blueprint in lua for dig. There is a performance difference of about 50x. For a large number of tiles, this is very significant. For example, scanning a 190x190x100 block (that's 3,610,000 tiles) takes only 200ms in C++ but a whopping 10s in lua. 10 seconds is way too long to make users wait for something that's supposed to be interactive.

However, we're expecting blueprints to be over much smaller areas. The entirety of Dreamfort, for example, is less than 60x60x15 (54,000 tiles). On those scales, even the lua implementation only takes 150ms.

So, for the expected common use case (manually run by players, at most once a minute as they make edits to a map and export their blueprints), performance of C++ and Lua is essentially equivalent.

C++ would make a difference if blueprint generation is automated and/or run over a huge area. For example, a script that takes periodic blueprint snapshots of the entire map in the background while a player plays. Do we expect a use case like this to ever happen?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: lethosor on April 25, 2021, 11:15:51 pm
Looks like I made a typo in my earlier post - I meant to suggest implementing slow parts of the logic in C++ and the rest in Lua. I haven't looked too closely at the blueprint source recently, but do you have an idea of which operations are slow in Lua (if there are any in particular)?

A multiple-second slowdown isn't great, but also not likely for users to run into IMO. That said, I don't know for sure if we would want to support larger blueprints/snapshots down the line, so I'm hesitant to migrate pieces to Lua if they would only be migrated back to C++ later.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on April 26, 2021, 12:33:01 am
Looks like I made a typo in my earlier post - I meant to suggest implementing slow parts of the logic in C++ and the rest in Lua.
no worries, I understood what you meant : )

Quote
do you have an idea of which operations are slow in Lua (if there are any in particular)?
I implemented blueprint dig in a number of ways, trying to determine the performance of different parts. The breakdown was:

- 500ms for lua loop logic
- 1s for local pos = xyz2pos(x, y, z)
- 4.5s for local tt = dfhack.maps.getTileType(pos)
- 3.5s for local shape = df.tiletype.attrs[ tt ].shape

and on the C++ side:
- 2s for calling lua from C++ for every tile (i.e. Lua::SafeCall())

so doing just about anything in lua is slow at this scale (even xyz2pos, which just puts the vars in a table. I guess there's memory allocation involved), and even just switching between lua and C++ for every tile would take unacceptably long (2s).

edit2: incidentally, caching the dfhack.maps.getTileType function in a local variable to avoid the table lookups shaves a full 700ms off the runtime, so local caching is actually worth it for performance-critical code in lua.

edit3: interestingly, similarly caching df.tiletype.attrs only saves 100ms.

Quote
A multiple-second slowdown isn't great, but also not likely for users to run into IMO. That said, I don't know for sure if we would want to support larger blueprints/snapshots down the line, so I'm hesitant to migrate pieces to Lua if they would only be migrated back to C++ later.
yeah, that's fair. Let me think a bit about what bits of logic would really be useful to have in Lua and come up with an architecture.

edit: more detailed performance breakdown
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on April 26, 2021, 05:55:35 pm
so, given that nothing that involving iteration across tiles can be in Lua, I'm thinking the core algorithm will need to be all in C++, with just the gui, commandline parsing, and other pre/post processing tasks being done in lua.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: lethosor 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.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on April 29, 2021, 06:51:25 pm
Ok, I spent some more time thinking and writing things down in a design doc (https://github.com/DFHack/dfhack/issues/1842). 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 (https://github.com/DFHack/dfhack/issues/1842) -- but please leave comments here so we can have all the discussion in one place.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk 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.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: Abadrausar 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?

Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk 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 (https://docs.dfhack.org/en/latest/docs/guides/quickfort-library-guide.html#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 (https://docs.google.com/spreadsheets/d/1wwKcOpEW-v_kyEnFyXS0FTjvLwJsyWbCUmEGaXWxJyU/edit#gid=1321228665) 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 (https://drive.google.com/drive/folders/1iS90EEVqUkxTeZiiukVj1pLloZqabKuP) as a model for creating whole-fort blueprint sets. If you haven't already seen it, I wrote a guide (https://docs.dfhack.org/en/latest/docs/guides/quickfort-user-guide.html#dreamfort-case-study-a-practical-guide-to-advanced-blueprint-design) for how to build these kinds of large-scale blueprint sets while still making them as easy as possible to reapply later.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on May 13, 2021, 08:54:25 am
How well do they work on 16x16 embarks?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk 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?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat 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.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk 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:


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 (https://docs.dfhack.org/en/latest/docs/guides/quickfort-alias-guide.html#stockpile-adjustment-aliases) 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.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: Garfunkel 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
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat 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.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat 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.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on May 31, 2021, 12:42:59 pm
Normally I prefer to play with nano-embarks of 1x1 with 48x48 tiles

I shrunk (https://github.com/DFHack/dfhack/pull/1862) 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
(https://drive.google.com/uc?export=download&id=18QX6QSEJL_PMoKrN6-b0quLK3YXWqqFY) (https://drive.google.com/file/d/18QX6QSEJL_PMoKrN6-b0quLK3YXWqqFY/view?usp=sharing)

new guildhall level
(https://drive.google.com/uc?export=download&id=1J14BONFOnrmTXM8ux-n7rANAjk0BmZi9) (https://drive.google.com/file/d/1J14BONFOnrmTXM8ux-n7rANAjk0BmZi9/view?usp=sharing)

The tables, chairs, altars, etc. are not part of the blueprint, of course. They were just what I needed for that particular fort.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk 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.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: Nameless Archon 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.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on June 21, 2021, 12:36:39 pm
Note that the dig-now plugin is still in code review (https://github.com/DFHack/dfhack/pull/1853). However, its dependencies *have* been merged, so if you want to give it a spin, you can merge that PR locally and build it yourself.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: falcnor on June 25, 2021, 10:18:00 am
Long time lurker, old school player trying to check out some automation tools.
I've jumped into quickfort and testing the dreamfort runs on some peaceful instances of DF.
Unfortunately I've run into some errors that I cannot find any posts about (aside from common issues with this in LUA in general) and unable to correct my self.

Trying to run the surface1 macro/label at start and get the following errors.
Code: [Select]
[DFHack]# quickfort run /library/dreamfort.csv -n /surface1
applying blueprint: "/central_stairs"
applying blueprint: "/surface_clear_small"
applying blueprint: "/surface_zones"
applying blueprint: "/surface_name_zones"
...rtress 0.47.05/hack/scripts/internal/quickfort/query.lua:26: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
        [C]: in function 'pairs'
        ...rtress 0.47.05/hack/scripts/internal/quickfort/query.lua:26: in upvalue 'load_aliases'
        ...rtress 0.47.05/hack/scripts/internal/quickfort/query.lua:99: in field '?'
        ...ress 0.47.05/hack/scripts/internal/quickfort/command.lua:54: in field 'do_command_internal'
        ...ortress 0.47.05/hack/scripts/internal/quickfort/meta.lua:52: in upvalue 'do_meta'
        ...ortress 0.47.05/hack/scripts/internal/quickfort/meta.lua:59: in field '?'
        ...ress 0.47.05/hack/scripts/internal/quickfort/command.lua:54: in global 'do_command_internal'
        ...ress 0.47.05/hack/scripts/internal/quickfort/command.lua:120: in function <...ress 0.47.05/hack/scripts/internal/quickfort/command.lua:116>
        [C]: in function 'dfhack.call_with_finalizer'
        C:\data\PEPack\Dwarf Fortress 0.47.05\hack\lua\dfhack.lua:72: in function 'dfhack.with_finalize'
        ...ress 0.47.05/hack/scripts/internal/quickfort/command.lua:114: in field '?'
        ...PEPack\Dwarf Fortress 0.47.05/hack/scripts/quickfort.lua:221: in local 'script_code'
        C:\data\PEPack\Dwarf Fortress 0.47.05\hack\lua\dfhack.lua:680: in function 'dfhack.run_script_with_env'
        (...tail calls...)

Any assistance from anyone?
Thanks much!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on June 25, 2021, 11:36:25 am
We figured it out on discord, but posting here for the record.

The issue was the extra slash ('/') in the blueprint path -- the code expected "library/dreamfort.csv", not "/library/dreamfort.csv". Some blueprints worked fine with the leading slash (e.g. build mode), but some did not (e.g. query mode). I'm fixing the path normalization code so that leading slashes will be ok to use in the future. All blueprint paths are intended to be relative to the "blueprints" directory under your DF game folder (though this directory *is* configurable in dfhack-config/quickfort/quickfort.txt for players who want to store their blueprints somewhere else).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on July 07, 2021, 08:59:40 am
The dig-now plugin has continued to get improved as I play with it more (it really makes testing quickfort go much faster!) and I've started on a build-now script to instantly complete "Construct building" jobs. I thought I was almost done with the script -- buildings get built, items get attached, everything ends up usable. The only bit I had left were simple constructions (e.g. walls and floors) that are handled a little differently by the game.

That last little bit has doubled the length of the script and I'm still not done! There's a lot of logic that is actually very similar to what I wrote in dig-now. Like, if you construct a ramp, a ramp top appears in the z-level above it (if there is open space) and if you build a wall, you have to adjust all the adjacent constructed and smooth natural walls so that they're connected.

I'm trying not to write all the same logic twice, but there are also enough differences between how natural rock is shaped in dig-now and how constructions are handled in build-now that I need to put some thought into how to share the code.

The refactors might take me a while, and now that my last batch of PRs have been mostly merged, I might get started on milestone 2 of the blueprint overhaul plan (https://github.com/DFHack/dfhack/issues/1842), which focuses on packaging improvements for the generated blueprints that make them easier to manage and play back in quickfort.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 08, 2021, 09:20:04 am
Hey Myk. The latest tweaks to the Dreamfort design have really helped speed it along, I will be on schedule for the 3rd migrant wave.
So far everything is fairly clean and trouble-free.

The new stairwell design doesn't suffer from the job cancellation issues the ramps had. I think the digging priority needs adjustment from 7 to 5 (and leave the 4 at 4) because I have noticed the lower priority tasks aren't just lower than other similar tasks, but all tasks (such as hauling;I don't use designated haulers, everyone hauls when they aren't otherwise busy). 5 will keep them from being dug before any 4s, even ones halfway across the map.

I found a way to cheat and add empty bag to sand collection (in-game it won't let you) by copy-pasta and importing order:
Code: [Select]
{
"amount_left" : 1,
"amount_total" : 1,
"frequency" : "Daily",
"id" : 180,
"is_active" : false,
"is_validated" : false,
"item_conditions" :
[
{
"condition" : "AtLeast",
"flags" :
[
"empty",
"bag"
],
"item_type" : "BOX",
"value" : 2
},
{
"condition" : "AtMost",
"flags" :
[
"sand_bearing"
],
"value" : 6
}
],
"job" : "CollectSand"
}
I don't know if you want to add it to the main orders. In theory it should sit quietly until you build a glassworks. Still trying to get the soap cancellation spam to stop, seems like I am constantly ordering extra lye manually, but at least once we get full stock it will stop. I have been adjusting some of the orders to require n+1 of problematic inputs, which seems to help a bit.

The guildhall bp is the old 4x4 instead of the new 3x3.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on July 09, 2021, 01:38:38 pm
Hey Myk. The latest tweaks to the Dreamfort design have really helped speed it along, I will be on schedule for the 3rd migrant wave.
So far everything is fairly clean and trouble-free.
Awesome! I've been pretty happy with it too. I think we've achieved a good balance of functionality and simplicity.

Quote
The new stairwell design doesn't suffer from the job cancellation issues the ramps had. I think the digging priority needs adjustment from 7 to 5 (and leave the 4 at 4) because I have noticed the lower priority tasks aren't just lower than other similar tasks, but all tasks (such as hauling;I don't use designated haulers, everyone hauls when they aren't otherwise busy). 5 will keep them from being dug before any 4s, even ones halfway across the map.
Hummmm. I'll need to give this some thought. Lowering the priority of the stairwell tiles will make it trickier to dig the well cisterns on the services level. I might be able to do it with the stairwell at priority 6, but I need priority 5 to force the miners to dig the cistern tiles in the correct order. Otherwise we could end up with messy ramps or undug tiles on the main service level. Would raising the priority of the stair tiles to 6 be enough? An alternative would be to change *all* the default 4 dig tiles to 3 and move everything up a notch. I think that would make the blueprints unacceptably messy, though, and they'd be less useful as the "copyable examples" I'd want them to be.

I guess I've never run into this before since I use dedicated diggers. I enable hauling on all my other dwarves (or rather I let the autohauler plugin (https://docs.dfhack.org/en/latest/docs/Plugins.html#autohauler) do it for me), but, at least in my forts, diggers are diggers 'til the diggin' is done. I don't really want to impose that playstyle on everyone, though, so I'd like Dreamfort to be as flexible as possible.

Quote
I found a way to cheat and add empty bag to sand collection (in-game it won't let you) by copy-pasta and importing order:
Nice. I'll add it in.

Quote
Still trying to get the soap cancellation spam to stop, seems like I am constantly ordering extra lye manually, but at least once we get full stock it will stop.
It has been difficult to find an orders configuration that works well for soap. I've been thinking, perhaps the best way to solve this problem is to write a dfhack fix script that scans existing orders and adds the missing condition for lye-containing items for any order that produces soap bars. If we call that script from onMapLoad.init, it would solve the issue on every map load after df fails to restore the condition from the savegame.
edit: ok, so I went to the DF bug tracker to get the bug number for this issue, and I was surprised that I couldn't find it. So I started to file it myself. While I was verifying the "steps to reproduce", I found that *the bug has been fixed*! "lye-containing items" conditions are properly restored from saves now! I guess I haven't checked since 0.47.05 came out. I'll update the orders we've been using and see if the "proper" configuration works now.

Quote
I have been adjusting some of the orders to require n+1 of problematic inputs, which seems to help a bit.
Yeah, I've been playing with that as well. The issue seems to be:
1) needed item is produced
2) manager identifies that the needed item exists, activates the orders that use it
3) needed item is picked up and hauled to a stockpile OR item is used by another order
4) newly-activated order can't use the item because it's "in a job" (or already consumed)

I'm experimenting with requiring at least 5 (or, rather, n+4+number of other orders that can consume item) of any item that we use as input. This solves the competing automation orders problem, allows manually-added orders that use the same items to take precedence, and has a very low chance of having all free items in hauling jobs at the same time. It also has the (potentially) useful side effect of maintaining a small cache of basic items that the player can use in an emergency. The downside, of course, is that it will take longer to build up enough items to get started on the item pipelines. This might not be such a bad thing, though, since the automation orders are intended to "nudge" the fortress into a good steady state. I'll play with it a bit and see if there are any problems with the longer ramp-up time.

The automation orders are turning out to take more careful design than I originally thought they would! I'll have to write some documentation on how they work so players can understand and extend them more easily. In the far future, maybe this entire set of automation orders could be implemented as a configurable DFHack script (or integrated into the orders plugin as a generate command).

I'm also making some annotated screenshots of the dreamfort levels (and I'm realizing how difficult it is to make readable annotated screenshots : ) All this will eventually go into the quickfort library guide (https://docs.dfhack.org/en/latest/docs/guides/quickfort-library-guide.html#dreamfort), I think.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 09, 2021, 02:26:25 pm
Oh, good find on the bug report for the lye. I'll give it a try again.

I usually dig the stairwell all the way down first anyway; I'm an early cavern breacher. But I'm constantly adjusting dig priorities on the fly anyway.
I have not found an issue with the wells being dug, other than that they jump around from place to place, but I haven't had any cancellations or miners getting stuck. As long as the order you set is maintained it seems to be pretty bulletproof. Still, sounds like I need to give the autohauler a shot. I agree with you about keeping the default at 4.

I recently came to the same conclusions you did with the work orders. So some orders can be kept to pretty tight settings and others need more safety. I do find holding off on importing the orders until after the 1st migrant wave like you said helps some, possibly even until the 2nd(also lets you see who you want to assign to what). I've usually got farming and industry levels dug just around the end of the 1st season starting with 2 skilled miners.

Oh, something else I've been toying with, autobutcher settings. Been adding more to your onmapload.init as they showup since I'm too lazy to go through the raws right now and still adjusting some things.
Code: [Select]
autobutcher target 4 1 1 1 BIRD_TURKEY
autobutcher target 50 50 14 2 BIRD_GOOSE
autobutcher target 2 1 4 2 ALPACA SHEEP LLAMA PIG
autobutcher target 1 1 1 1 CAT
autobutcher target 1 1 0 0 HORSE YAK DONKEY WATER_BUFFALO GOAT
autobutcher target 0 0 0 0 CAVY BIRD_DUCK BIRD_GUINEAFOWL
autobutcher unwatch DOG

Goose is still the overall winner for me (I raise birds primarily for leather), so I really don't want to be bothered with other birds that always seem to migrate in (you'd want to swap the goose and turkey settings...although I like how you went with crundles in that one save...) Pigs are just low maintenance & can be milked, besides providing a lot of meat. A small herd of sheep/alpaca/llama for wool aren't bad. The pasture probably won't handle all 3 at once though. I like to keep 1 cat, obviously those who like a Chinese takeout & kitten totem industry need to adjust settings.  It is generally better to butcher most unwanted animals on adulthood for hides. Cavy/Duck/Guinefowl are worthless since they never give hide. Finally I want my wardogs left alone. Granted they do tend to become a problem for me later, but I just find it hard to butcher dogs. Other animals sure. Sentient beings? Yeah, murder them all. Especially the Elves. Not dogs though...

Now we just need a good giant cave spider silk farm.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 09, 2021, 08:03:35 pm
So I was going to replace the blunt weapons with silver but because of what I was able to do with the sand collection, it got me to thinking, why stop with silver...
Code: [Select]
[
{
"amount_left" : 1,
"amount_total" : 1,
"frequency" : "Daily",
"id" : 84,
"is_active" : false,
"is_validated" : true,
"item_conditions" :
[
{
"condition" : "AtLeast",
"item_type" : "BAR",
"material" : "INORGANIC:PLATINUM",
"value" : 5
},
{
"condition" : "AtLeast",
"item_type" : "BAR",
"material" : "COAL",
"value" : 100
},
{
"condition" : "AtMost",
"item_subtype" : "ITEM_WEAPON_HAMMER_WAR",
"item_type" : "WEAPON",
"material" : "INORGANIC:PLATINUM",
"value" : 10
}
],
"item_subtype" : "ITEM_WEAPON_HAMMER_WAR",
"job" : "MakeWeapon",
"material" : "INORGANIC:PLATINUM"
},
{
"amount_left" : 1,
"amount_total" : 1,
"frequency" : "Daily",
"id" : 86,
"is_active" : false,
"is_validated" : true,
"item_conditions" :
[
{
"condition" : "AtLeast",
"item_type" : "BAR",
"material" : "INORGANIC:PLATINUM",
"value" : 5
},
{
"condition" : "AtLeast",
"item_type" : "BAR",
"material" : "COAL",
"value" : 100
},
{
"condition" : "AtMost",
"item_subtype" : "ITEM_WEAPON_MACE",
"item_type" : "WEAPON",
"material" : "INORGANIC:PLATINUM",
"value" : 10
}
],
"item_subtype" : "ITEM_WEAPON_MACE",
"job" : "MakeWeapon",
"material" : "INORGANIC:PLATINUM"
}
]
Muahahahahahaha.
Yes, it works. Non-artifact platinum weapons are a thing.
Oh, should add crossbow too, because marksdorfs like to bash too. Maybe shields? That might be too much.
I'd replace the steel mace & war hammer for sure though.
Y'know, I'm thinking maybe add alternate weapon/armor with conditional checks on other types. So like make iron armor/weapons if we have no steel, etc. Maybe just check for metal bars. So no steel bar, make iron, no iron make bronze (seems iron is better than bronze these days). steel/silver/platinum for blunt. Thoughts?

BTW, the lye condition appears to be working :)

I bet we can make jobs for specific brewing/milling/processing too. I had made custom reactions once, but it is such fuckery with the saved games folders that it isn't worth the hassle (if you don't start a fresh save with them you can't add or change them after).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on July 10, 2021, 01:26:21 am
Making the best weapons possible with whatever materials are available makes sense, but at this level of sophistication, I'm thinking the orders will be easier to maintain as code rather than as a static JSON file. That way we can tweak values across many orders without having to make lots of manual changes. We can also make some things configurable.

If you make an expanded set of orders in JSON, I could use it as a guide to write some orders generation code. How does that sound?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 10, 2021, 08:41:38 am
Making the best weapons possible with whatever materials are available makes sense, but at this level of sophistication, I'm thinking the orders will be easier to maintain as code rather than as a static JSON file. That way we can tweak values across many orders without having to make lots of manual changes. We can also make some things configurable.

If you make an expanded set of orders in JSON, I could use it as a guide to write some orders generation code. How does that sound?

Sounds good.

For some reason lye-containing items exports as this:
Code: [Select]
{
"condition" : "AtLeast",
"value" : 1
}
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 10, 2021, 01:16:27 pm
Weapons & Armor, a bit of tweaking to the rest of the automation orders. Be warned though that I exported this from my game so some prefs are set that shouldn't be (willow is my lightest so most wood jobs, jet for pots, etc) I guess I could do some alternates for those too, like generic make pots unless you have jet, etc.

Also you can't assign silver or platinum crossbows nor platinum war hammers & maces from uniform menu but you can assign them as specific weapons to individuals.

https://pastebin.com/5sBQYZNg

I went copper>bronze>iron>steel>silver>platinum (last 2 only for hammer/mace/xbow of course)
The current consensus seems to be iron is better than bronze, we're using the bronze for bolts, and iron is generally close to surface if present. If using embark bronze for weapons/armor it is likely done manually before automation orders imported anyway (and I have learned importing them too soon is a good way to fuck yourself over).
I thought about adding candy, but being how it's very scarce and very late game I think it's best to leave that to the users discretion.

I just stumbled upon this wonderful tweak; tweak do-job-now. It adds a menu item to the job list that lets you make the job high priority. Since my stubborn assholes never seem to want to build bridges/levers/trackstops and I need that shit done yesterday not when they feel like it, it is a life-saver. I have added it to my onmapload.init. Seedwatch start is another I recommend, turns seed-cooking on/off, default is 30 which is perfect for our layout.

This:
Code: [Select]
{
"condition" : "AtLeast",
"flags" :
[
"lye-containing"
],
"value" : 1
}
is what I believe the condtion should look like, but importing it throws an error. Nothing else I could think of worked, it didn't throw errors, but it just showed up as 1 blank item.

I forgot bismuth bronze, which is an alternative to bronze. Less tin if you have bismuth. I would put it between regular bronze and iron.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on July 11, 2021, 12:28:21 pm
Ok, some progress to report. The build-now script is in pretty good shape. I've tested it fairly thoroughly, though I'm sure there are still corner cases to discover and address.

Now that I have both dig-now (https://github.com/DFHack/dfhack/pull/1853) and build-now (https://github.com/DFHack/scripts/pull/310), I can test dreamfort without any explicit dwarven effort (except for tree cutting, which dig-now doesn't handle yet). As a happy side effect, I can finally get some clean screenshots without force-dumping everything in my fort : )

Behold!
Spoiler (click to show/hide)

(by the way, if anyone has a talent for creating readable annotated screenshots, I'd be grateful for something that looks nicer than the images that I cobbled together)

Now to take a closer look at the manager orders for fort automation.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 11, 2021, 11:34:33 pm
Ok, some progress to report. The build-now script is in pretty good shape. I've tested it fairly thoroughly, though I'm sure there are still corner cases to discover and address.

Now that I have both dig-now (https://github.com/DFHack/dfhack/pull/1853) and build-now (https://github.com/DFHack/scripts/pull/310), I can test dreamfort without any explicit dwarven effort (except for tree cutting, which dig-now doesn't handle yet). As a happy side effect, I can finally get some clean screenshots without force-dumping everything in my fort : )

Behold!
Spoiler (click to show/hide)

(by the way, if anyone has a talent for creating readable annotated screenshots, I'd be grateful for something that looks nicer than the images that I cobbled together)

Now to take a closer look at the manager orders for fort automation.


So I grabbed the lua for those scripts, but when I try to run build-now, I get errors about missing argparse files and I can't find them on github. I take it this isn't ready for public use?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: lethosor on July 12, 2021, 09:34:40 am
I believe it will only work on DFHack 0.47.05-r2 and newer.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 12, 2021, 10:08:23 am
I believe it will only work on DFHack 0.47.05-r2 and newer.

I'm on r03.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: lethosor on July 12, 2021, 10:42:23 am
I believe it will only work on DFHack 0.47.05-r2 and newer.

I'm on r03.
That isn't a DFHack version that exists. Running "help" in the DFHack console will tell you what DFHack version you have. It should also be displayed in the top left corner of the title screen.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 12, 2021, 12:30:27 pm
I believe it will only work on DFHack 0.47.05-r2 and newer.

I'm on r03.
That isn't a DFHack version that exists. Running "help" in the DFHack console will tell you what DFHack version you have. It should also be displayed in the top left corner of the title screen.

Derp! Forgot the DFHack and LNP versions aren't necessarily the same. Yeah, I'm on r1.

Oh, and with the lye-containing condition mostly fixed (because not being able to export/import it properly is a pain), the 2 make lye jobs can be replaced with something along the lines of:
Code: [Select]
{
"amount_left" : 1,
"amount_total" : 1,
"frequency" : "Daily",
"id" : 546,
"is_active" : true,
"is_validated" : true,
"item_conditions" :
[
{
"condition" : "AtLeast",
"item_type" : "BAR",
"material" : "ASH",
"value" : 2
},
{
"condition" : "AtLeast",
"flags" :
[
"empty"
],
"item_type" : "BUCKET",
"value" : 2
},
{
"condition" : "AtMost",
"item_type" : "LIQUID_MISC",
"material" : "LYE",
"value" : 5
}
],
"job" : "MakeLye"
},

And a lye stockpile of 1 tile with 1 barrel can be used instead of tying up buckets.

If you move the meltables piles to the other side then you can get more magma forges in.

I think I'd make an apartments4 for the doors (actually I'm going to). I am finding that part gets really slow, especially as I tend to run out of stone (I like to make them uniform). The cancellation spam can drive one nuts, and the soldiers throw less shit on the floor if they have cabinets & coffers (because I tend to be ramping up military at the same time apts are being built).

Adding conditions for breastplate and greaves that there are some mail shirts and possibly other armor stocked. That will speed up getting squads full coverage before we worry about the extra protection. Still testing for right feel.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on July 14, 2021, 12:02:54 am
Nice. I like where you're taking this. I uploaded a new version of automation.json with tweaked balance. Now all orders produce no more than 1 item (except for charcoal, which is needed by too many other orders to just keep at 1). Orders now also depend on 5 source items being available before they become active. With these changes, I have seen very little cancellation spam.

I'm digging into the issue with dfhack orders not being able to export the "lye-containing" trait. It seems to be stored in an unnamed variable ("anon_3"). When the "lye-containing" trait is there, anon_3 = 24. This is either a bitfield of 16+8 or an enum. I'll have to experiment more to find out which it is.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 14, 2021, 10:22:00 am
Nice. I like where you're taking this. I uploaded a new version of automation.json with tweaked balance. Now all orders produce no more than 1 item (except for charcoal, which is needed by too many other orders to just keep at 1). Orders now also depend on 5 source items being available before they become active. With these changes, I have seen very little cancellation spam.

I'm digging into the issue with dfhack orders not being able to export the "lye-containing" trait. It seems to be stored in an unnamed variable ("anon_3"). When the "lye-containing" trait is there, anon_3 = 24. This is either a bitfield of 16+8 or an enum. I'll have to experiment more to find out which it is.

Couple caveats. Smelter jobs (at least for weapons grade material) and probably the charcoal as well, should be set to 4 so each smelter/furnace gets a job every cycle.

Plants can stack to 12 (and I use combine-plants regularly) and being as a stack is our working unit for most jobs, minimum source items should be set to at least 13.

Oh, and "is_validated" should probably be set to false. Purists would consider it cheating having them already validated, I'm more concerned the manager is missing out on all that job experience.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on July 19, 2021, 03:13:49 pm
Let me catch up a bit here. I got the "lye-containing" (and "honey-containing") issue solved (https://github.com/DFHack/dfhack/pull/1906) in the orders plugin, but that won't be usable by players until the next dfhack release. Until then, there can be a manual step to go reinstate the missing traits for the soap and mead orders. This should finally address the cancellation spam with missing lye, though!

I changed the dig priority of the stairwell to 6 and adjusted the services level to compensate. Could you test to see if that works for you? (links at bottom of this post)

added collect sand job you wrote and, since we can, I added a "Make raw green glass" job to use the sand for something.

made suggested modifications to autobutcher settings, though I left dogs and cats at the default (war dogs are ignored by autobutcher, btw).

I didn't get the pastebin link before it expired -- could you post that again and I'll update automation.json.

Added note about 'tweak do-job-now' to the embark suggestions (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=149144025) page. Good find!

I used to run with seedwatch enabled, but I ran into issues (IIRC) with running out of pig tail seeds. I'll have to test again to be sure. Back then I don't think I understood that the seeds you care about get unilaterally deleted from the game when you buy massive numbers of new seeds from merchants. It could have been due to that.

As lethosor said, dig-now and build-now require the latest release of DFHack (0.47.05-r2). the build-now script also requires the dig-now plugin since it reuses some logic in the C++ portion of dig-now. Be sure to pull both (https://github.com/DFHack/dfhack/pull/1853) PRs (https://github.com/DFHack/scripts/pull/310) and recompile DFHack to get all the goodies.

You're totally right about moving the meltables piles to make more room for magma forges. Gah! Need to retake and re-annotate the screenshot (https://drive.google.com/file/d/1emMaHHCaUPcdRbkLQqvr-0ZCs2tdM5X7/view?usp=sharing) now :$

I'm not entirely on board with separating the apartment doors out into another blueprint. I get that it slows things down and uses a lot of stone, but at the point that you're building apartments, construction speed isn't very important, and I really want to be careful about adding extra required steps. If the doors are an issue, players can delete the manager order for the doors and re-add it when it's convenient.

Personally, I also find I run out of stone with just the digging done by the dreamfort blueprints. I usually dig a quarry level beneath the bottom apartments level to compensate.

updated charcoal jobs to 20 per order and weapons-grade smelting jobs to 4. I also made sure that plant input numbers are at least 15.

I also set is_validated to false : ) I guess my original thought was that automation.json would be imported at the beginning of the game, when the number of dwarves is fewer than 20 and all orders are pre-validated, but I have since updated the guidance to not import until at least the first migration wave. Otherwise, as you saw, your few starting dwarves are overwhelmed with automation tasks and don't get the core fort built quickly enough.

I didn't overwrite the "official" files yet, but the beta versions with the updates are available here (https://drive.google.com/drive/folders/1lLGgWaoVdgIZ22FNBhkQDWU7NbPL_9WN?usp=sharing):
- dreamfort.csv (https://drive.google.com/file/d/1W8rR6p-YURJX9GSN75_bpc49SrUFPMa8/view?usp=sharing)
- onMapLoad.init (https://drive.google.com/file/d/1BmUXzhu60gcU_QxeYGoiHpPkCAkXIFj8/view?usp=sharing)
- automation.json (https://drive.google.com/file/d/11RYGcFgwCHFG-_IZHRQdBTfURXZCeNKP/view?usp=sharing)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on July 20, 2021, 08:38:29 pm
Did some more testing. Lye in barrels is difficult to set a stop condition for, so I think I'll keep them in buckets. With some manual tweaking of the JSON, I got the lye creation job to be limited by "lye-containing items", which isn't normally possible on the ui, but it's the only condition that is actually effective.

Importing the new automation.json, however, is dependent on the changes I made to the orders plugin, which has yet to be merged.

I ran some longer tests on dreamfort and attempted some things I'd never tried before, like a 150+ z-level magma pump stack powered by a massive windmill farm on the roof. I built a "prisoner processing facility" to recycle cages and give my military dwarves some practical experience. I found our refuse quantum dump just can't keep up with the resulting carnage, so I built an atom smasher.

Finally, I built a defensible area to buffer the main fort from the caverns. It allowed my small force of 10 marksdwarves and 30 meleedwarves to squash the hordes of HFS.

Most of these things aren't easily made into blueprints, but it's nice to see how easily they can be done with dreamfort as a base.

I did write some blueprints for the pump stack, which I'll document and add to the DFHack blueprint library.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 21, 2021, 12:53:35 am
Here's the orders again https://pastebin.com/mimjRjDm (https://pastebin.com/mimjRjDm) Use this one instead, I made changes to bring it a little more in line with your last https://pastebin.com/rKDggfY6 (https://pastebin.com/rKDggfY6) Our metal smelting jobs got all out of sync, partly because of all the new smithing, but I might have shifted them around too.
Actually given some more thought to this, and it would probably be better to check for stone instead of bars. So if we have flux and iron, even unsmelted, we know we can make steel so shouldn't waste our time with lesser things, etc. I need to rework them.

I've got a pumpstack design, although either the new quickfort doesn't have the feature or I don't know how to use it, but you used to be able to type run:x and it would run x repetitions. It is only 2 levels, so you just repeat it as many times as needed. There are 4 different for each orientation of output direction. I haven't done a windmill powered design in ages, dwarven reactors ftw! Oh, obsidian works is something to add once you have a pumpstack. I've used the retracting bridge design off the wiki many times. That would be an interesting project to automate.

Atom-smasher is a nice addition actually, late game it's like a necessity. Cavern defensive works would be too, but I know how hard it is to try to pattern them, they tend to be unique. Right now I'm actually trying to put together a sub-surface dreamfort, where the 1st or 2nd cavern would basicly be the surface level.

I haven't noticed an excess buildup of lye, but then I seem to go through more soap than I ever have. I suspect the dwarf-vet plugin, which lets your pets go to the hospital and be tended to. The wardogs tend to get banged up a lot. Speaking of them, I know they don't get butchered but the problem is your regular dogs will before you get a chance to train them. I'm tempted to just bring a couple and not breed any. I always get tore up when bad things happen to them, doesn't help that I had to put my old dog down recently either.

I think this
Spoiler (click to show/hide)
is press cake (I'm reading it out of game) which has no other use than being pressed, so value of 1 would be safe. There's a few items like that. Wax would be another. Granted they are minor things.

I would leave the leather requirements lower (you seem to have standardized them across the board) for the important things (backpack/quiver/water-skin) as well as the bags. We should probably have a cloth bags job too. Maybe even silk and yarn as well. Bags are just so important. Oh cloaks too, I like to issue the military cloaks for the extra facial protection mainly, but also since they cover most of the body they are good for keeping them from getting unhappy thoughts when they wind up walking around with missing armor pieces (as often happens when you are still grinding out pieces). Ash bar should be 4 jobs. Not sure about the charcoal jobs conditions/numbers, I really like to avoid making charcoal because it is so inefficient. I still prefer 0 coal/lignite as conditions.

Autobutcher start should probably not have on-new-fortress? I still say turkeys are garbage, it would probably be fine to add goose, blue peafowl and chicken to the turkey line so all the useful ones are covered (Maybe 4 layers per even because eventually the idiots bring them all as pets and you are stuck with them anyway
Code: [Select]
on-new-fortress autobutcher target 50 50 4 2 BIRD_GOOSE BIRD_PEAFOWL_BLUE BIRD_CHICKEN BIRD_TURKEY). I've never had any issues with seedwatch as far as I know, I've used it for a long time. Pig tails (or any seeds really) can have their own individual thresholds set, but of course there is the ingame max of 200 per (which can be adjusted in the d_init file if necessary). The autobutcher targets are correct but they are being set to unwatched. This
Spoiler (click to show/hide)
is where mine deviates. These settings worked fine prior, all I did for this run is add the "on-new-fortress"

Blatantly ripping off Inspired by clinodev, I made my own annotated embark profile for Dreamfort https://pastebin.com/h4Yt3NA7 (https://pastebin.com/h4Yt3NA7) Oops! Fixed an error (that's what happens when you move things around) https://pastebin.com/W5gyEFNk (https://pastebin.com/W5gyEFNk)

Hmmph. I had a crash right before the end of the 1st season, that hasn't happened lately.

The horror! An elf outpost liason. I figured it out now at least, the liason is of course from the mountainhome, it just refers to them by their race. I guess necromancer is a race too, because that is what I had been getting lately. I'll take a necromancer over an elf any day!

Broken job, I think it is supposed to be make lye, won't import
Spoiler (click to show/hide)
Oh, or is that one that needs the new plugin?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on July 22, 2021, 12:19:13 am
https://pastebin.com/rKDggfY6 (https://pastebin.com/rKDggfY6)
Thanks! integrated. Could you check the json files here (https://drive.google.com/drive/folders/1lLGgWaoVdgIZ22FNBhkQDWU7NbPL_9WN) to make sure I incorporated your feedback and additions properly (except perhaps for the items discussed below)?

The orders list is getting quite long, so I split it up into separate files. This also gives players some flexibility about when to import certain types of orders. I broke it down like this:

basic.json handles basic fort necessities:

furnace.json creates basic items that require heat. I separated this out from basic.json to give players the opportunity to set up magma furnaces first in order to save resources. It handles:

military.json adds high-volume smelting jobs for military-grade metal ores and produces weapons and armor:

smelting.json adds smelting jobs for all ores. It includes handling the ores already managed by military.json, but has lower limits. This ensures all ores will be covered if a player imports smelting but not military, but the military orders will take priority if both are imported.

I can update the dreamfort checklist to suggest importing the orders at appropriate times.

What do you think?

There are some finer points I'd like to discuss. Could you tell my why geese are better than turkeys? I haven't done the research here, so it might be obvious. I was just going off the turkey recommendation I saw in one of the videos on Salford Sal's youtube channel (https://www.youtube.com/c/salfordsal/videos).

Second, 1 vs 5 for AtLeast conditions for items you want to use all of. I've gone back and forth on this. Theoretically, it *should* be 1. If exist, then use. The problem that I've run into sometimes is cancellation spam when an item is being hauled or when the item is inaccessible. The spam from hauling is temporary, but it can be constant if the item is inaccessible. Probably wouldn't be an issue for press cake, but I've run into this problem with bituminous coal and lignite. I can certainly knock the press cake, totem, and wax crafts down to 1.

Third, AtMost 0 vs >0 for if-then conditions (e.g. make iron maces only if there are 0 steel bars). I think setting the condition to 0 is too strict. If I buy 1 steel bar or melt 1 steel item, I don't want all production of iron weapons and armor to stop. I think setting it to the production limit of steel (20 in this case) would ensure manufacture of maces continues, and it would transition smoothly to steel once we have enough bars.

Could you share your pumpstack design? I suspect it's very close to my own (https://docs.google.com/spreadsheets/d/1TP2n-W-O9f30Dtl6yoTcn6yczWQRu11iM7U6TEE9634/edit#gid=1881009552), but I'd like to see if there's anything obvious I've missed. DFHack quickfort doesn't have "repeat up/down" functionality yet. The code won't be that hard, but I haven't had the time to think about the syntax and how it might be specified on both the commandline and in meta blueprints. Perhaps simplifying the pump stack blueprint will be the kick I need to get that done.

If you feel like creating blueprints for an obsidian works, I'd love to add it to the blueprint library!

Quote
doesn't help that I had to put my old dog down recently either.
I've been there. I'm sorry about that.

Quote
Autobutcher start should probably not have on-new-fortress?
Surprisingly, it's fine. I verified that autobutcher's enabled status gets saved and restored automatically along with the rest of its settings.

Quote
autobutcher target 50 50 4 2 BIRD_GOOSE BIRD_PEAFOWL_BLUE BIRD_CHICKEN BIRD_TURKEY

That's...a lot of birds. I'd be worried about FPS at that point. We could allow them all but cut the 50 down to 10?

Quote
I made my own annotated embark profile for Dreamfort

This is awesome, and far more dorfy than my version. I learned a few things from reading it as well, such as the anachronisms I was holding to with discipline and swimming. Also why geese are better than turkeys. If you don't mind, I might steal a few ideas from your profile for the embark suggestions (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=149144025) page. I want to keep the "official" embark profile simple and small (i.e., newbie friendly), but could you possibly host your version somewhere more durable so I could link to it "for a more advanced approach"?

edit:
Quote
Oh, or is that one that needs the new plugin?
That's the one. "Make mead" as well for the contains [ "honey" ]. PR is here (https://github.com/DFHack/dfhack/pull/1906) if you can build locally.

I thought it should still import, just not getting the new properties. Did it give you an error?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 22, 2021, 02:49:18 am
Yeah, I think splitting it up is good, both for the end user and for us. It's just getting too large and cumbersome to work with.
I think those are good item sets to work with. I'll try to go through them tomorrow.

I go back and forth on the item amounts too. For some things it is almost impossible to stop the spam, for others they almost never happen. The last run even plants started acting up on me, because of the lack of granularity in orders (not being able to specify for example brew ph or brew ale) and item conditions (we're stuck with generic plants). I just had so much shit to haul that I let the plants pile up unprocessed pretty much until we were out of seeds. I didn't import the orders until after the 2nd migration wave. So the jobs started running with tons of everything, but when it is leaving 12 units per job conditions can change fast. Fortunately it righted itself next cycle.

So low volume stuff like make cheese, press cakes, bee related stuff seem to be ok with 1, maybe 2 for a safety. You want to keep a few skulls for strange moods, IIRC the macabre will go murder someone if they can't find any.

Stone definitely needs a buffer for hauling. Today drove me insane, they just could not keep up with the masons and god-forbid the masons grab a wheelbarrow and go haul it in between cancelling jobs. 10 seems to be good for orders of 1-4 pieces. The larger orders maybe 20. It's still a bit of a crapshoot since there can be a ton on the map but not in the stockpiles, and I like to use links for the masons and smelters since I don't want them hauling stone by hand from halfway across the map. It's mostly a first year problem though, I make the caravan leave ecstatic and get like 20+ 3rd wave on so the labor issues go away.

Yeah, I guess the pumpstack is really simple once you understand it. Other than the doors are completely unnecessary it's exactly like yours.
I have seperate rotations depending which way you want it to be pointed, so 4 different sets but mine are legacy quickfort plans (which means 8 files), I should clean them up like yours first. I guess with the new quickfort it is possible to get all 4 in 1 file since you can just run different commands. Yeah, I'll do the obsidian works, it'd be good practice for me.

The birds, yes it can be awful, goosesplosions are a thing. 10 each sex is probably a lot more fps friendly and still gives you 20 hides per year. 60 if you go goose/blue/chicken. Should be plenty. Bone too.

Glad you like my embark. Haha, yeah, I still hold onto the discipline and swimming myself. Absolutely, use it, abuse it. That's what it's there for. Hell, I copied Clinodev's comments from his where I was in agreement with him instead of reinventing the wheel. I was going to put it on the wiki but it is a pita, but yeah, I will throw it on my google drive, would be easier for everyone involved than pastebin. I'm always tweaking it slightly (ready to add more rope for your godawful traction benches!) Speaking of, 1 would be fine for first phase, I hardly see them get used. Would also be good to get the hospital well built in services2. I used to bring all crafters and have them all mine until migrants (make them stop right at level 5 so it doesn't become their moodable) but I've found it more practical to go with almost what we have now, because migrants are such a crapshoot anyway. If not building surface fortifications like Dreamfort, the 2nd mason would be a stonecrafter or a marksdorf instead.

Sometimes simple is good too. Today because I was busy fixing my mixup of miner/mason and trying to dig out UNDER an aquifer (yeah, today was not my A-game) I didn't realize for quite some time that I forgot to assign the carpenter to cut wood and was wondering what was taking so damn long. So while that point of skill in woodcutter may be worthless, it's cheap compared to the aggravation it can save you.

Oh, almost forgot. Yes, the automation import errors. On syntax of all things, it complains that the close brace is wrong, when it clearly isn't.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 22, 2021, 11:03:31 am
Here's the embark https://drive.google.com/file/d/1Et42JTzeYK23iI5wrPMsFJ7lUXwVBQob/view?usp=sharing (https://drive.google.com/file/d/1Et42JTzeYK23iI5wrPMsFJ7lUXwVBQob/view?usp=sharing) That's public.
The directory I forgot I had shared with you when we started working together, orders files https://drive.google.com/drive/folders/1kXvtKSYjBO8kKDSxNcMwttqZx5gYuS01 (https://drive.google.com/drive/folders/1kXvtKSYjBO8kKDSxNcMwttqZx5gYuS01) have my latest changes (discussed below).

So how do I build lua stuff? I've used gradle for java (minecraft shit) on git, which is surprisingly incredibly easy, but I tend to shy away from stuff that needs to be compiled generally (just lazy like that).

Orders
Basic
change unrotten cookable items from 15 to 20 on lavish meals (I got spam frequently at 15) probably because of large stacks of qb leaves.
both brew drink jobs, do we want to go with large pots instead of food storage item? it is available, I usually link the brewery to the pots (as well as plants, kitchen & jugs piles) since I try to get rid of the barrels eventually.
make cheese, 2 milk (from 5)
press honey, 2 jugs (from 5) probably enough, only this and oil use them and both tend to be infrequent
make mead, 2 honey (from 5)enough
process plant to bag, 15 (instead of 20) is good, it is only qb and qb isn't used for anything else
press liquid from paste, if we've bothered to make paste (only happens when we are loaded with rock nuts), might as well press it, remove soap condition
spin thread, 2 (from 5)
dye jobs, I'm a bit torn but since there are 2 and we could have 12 dye in a bag probably bump dye items up to 15
make rock pot & jug, do we not think 10 rock is enough? granted I tend to set them to specific materials (usually jet when available for light pots, gypsum surprising 2nd choice, microline jugs because why not) maybe do them like the military jobs
wooden bucket, 50 is fine for generic I think, I usually do 10 and specify willow (habit), although buckets weight laughable, all same for crutch/splint, yes I was gonna suggest making less since hospital stock doesn't count, this is good
soap! hmmm, this time it imported w/o error, maybe my copy paste job was bad last time although I couldn't for the life of me find what was wrong, just the blank item conditions, which are fixable at least (oh yeah, mead had blank item of course too)

Furnace
large batch charcoal, I like 0 coal/lignite better, although I guess if you are reliant on this job you need some buffer...but we know I'm biased since if I don't have magma smelters running before 2nd caravan I am likely having too much !fun! granted it's probably a non-issue, I mean I embark with 20+ coal anyway
small batch charcoal, could arguably go into basic, would make sure there is some for people who aren't ready for furnace/military but might need the odd weapon/anvil/minecart/etc
plaster powder, lol, like the crutch/splint 1 is plenty...the 5 bags of plaster in the hospital will likely last forever anyway, hospital defaults are enough to survive a zombie HFS apocalypse.
smelt adamantine, granted it has been a long time since I've had candy (I just get bored/annoyed around the end of year 2 lately and start a new fort) but why a ceiling on wafers? or do you need strands still for cloaks and robes?

Smelting
All good here.

Military
Mostly good across the board. Is the overlap with smelting going to cause us job cancellations?
Conditions changes we've thrown back and forth, actually 1 I don't think I mentioned I've been mulling; instead of checking for bars of the higher grade material, check for the items? So if we have a few (not the full 10, I think just 2-3 is good) platinum maces in stock, we probably don't want to make silver ones. Etc, etc.
BP & greaves should also check for the full stock of mail shirts of that material (if I wasn't lazy I'd do all the set pieces but I think this will suffice, if we've got 10 mail shirts, we've probably got full stock of the rest too), I must have uploaded the wrong one. My reasoning is it makes sure everyone has full coverage first and then they get the heavy over pieces when available. Otherwise when equipping a squad or 2 (I have dumped entire migrant waves of useless sods right into the military) rapidly we get the first few guys full kit and the rest half naked. I keep at least 2 forges now, 1 for weapon 1 for armor, since metalworker/smith are usually low volume (at least until military crafting is stabilized) I let them do at both. I know you want to keep industry from sprawling more so there is room for customization but there's a few shops need extras pretty much guaranteed. Forge of course. 2 more crafters (over by cloth). I restrict original to stone only, another for bonecrafter, and 3rd for everything else. Otherwise it just becomes a total bottleneck.
Oh! Crossbows, wood, again I like willow/saguaro/featherwood (to reduce the amount of teeth lost from beatings) but at a minimum stock check needs to be for wooden xbows since we want both wood and metal, although wood is only for the 1 squad really, I dunno. Some people may prefer to issue them to everyone instead of weapons grade ones I guess, the platinum ones are fucking heavy. Yeah, check for wood. Argh! and of course wooden is not a selectable trait :(

Hey! What else can we do with that custom reaction wrapper? These are my ancient custom reactions that I got tired of having to modify raws for every new pack version, but I believe they still work. Could we import them into an already existing game? Doing them by hand involves editing entity_default.txt, editing entity_default.txt generally results in having to start a new game/instability/corruption in your existing one, especially if you try to change graphics packs.
Spoiler (click to show/hide)

I couldn't be bothered to do individual fruit jobs. Too much work for too little gain. Too much clutter in workshop interface too.
Also from the old modest mod (which was how I learned it was even possible to do this)
Spoiler (click to show/hide)
I think the empty bucket was for a bug that has been long fixed (buckets of water being left lying around rendering them unusable) and I really can't be arsed to collect deez nuts, let alone process them but the milling jobs are pfm! If we can import these and the job manager works with them that could reduce spam too.

Oh an unrelated note, have you ever had success on a 1x1 embark for Dreamfort? I cannot find one that meets my requirements that isn't littered with ponds, and I gen worlds with max metals so it opens up plenty of possibilities even for someone as picky as me (on default I can barely find a standard size embark that pleases me, forget the 2x2 I prefer).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on July 22, 2021, 03:35:36 pm
good points. I updated the beta files (https://drive.google.com/drive/folders/1lLGgWaoVdgIZ22FNBhkQDWU7NbPL_9WN).

I didn't realize the doors were unnecessary for the pump stack. I thought liquids would leak through the diagonal. I'll have to test that on my next run-through.

I'm looking forward to your obsidian farm blueprints! Tell me if you have any trouble with them or if quickfort needs a new feature to make them easier to write.

Birds. I worry that we're making this too complicated. What's the down-side to just allowing geese and insta-butchering all other birds? The pets that migrate in will not contribute eggs (since the nest boxes will all be taken up by geese, presumably), but if geese are categorically better to raise, is that such a problem? The player can always customize after the fact, but I want the defaults to "just work" for most players.

I think we could probably add more animal types to the "always butcher" lines. Purchasing animals from caravans is the best source of bones for bolts, but keeping them all around until they hit default autobutcher limits would kill FPS.

+1 on the pain traction benches cause. Originally they were being built later in the hospital, but I found that there was just too much competition for tables at that point. Building them earlier results in easier access to tables, but then you need to bring ropes (or build an early clothier's shop to manufacture them). The current solution appears to be the sub-optimal-but-local-minimum for cancellation spam.

Fair point in moving the well earlier. It does make filling the cistern via bucket brigade slightly less convenient, since if the well is there, it will become a "water source" as soon as the cistern is 3/7 full, and then the little dwarves, in all their brilliance, will attempt to fill the well with its own water. You'd have to build a temporary grate to block the bucket or deconstruct the well to finish filling the cistern. However having the well early is required to make the hospital minimally functional, which is the point of building anything there early in the first place. I'll add some documentation (https://docs.google.com/spreadsheets/d/1IBy6_pGEe6WSBCLukDz_5I-4vi_mpHuJJyOp2j6SJlY/edit#gid=6456804) around this.

Thanks for the embark link! I've added it to the dreamfort embark suggestions (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=149144025) page.

How do you build lua scripts? That's the neat part -- you don't : ). It's an interpreted language. Just write the script and run it.

Updated and uploaded orders.

I *think* I'd like to keep the booze depending on "food storage items" rather than specifically "large pots". Barrels are entirely valid to use, and I don't want there to be confusion if a player is used to using barrels and it suddenly doesn't work.

press liquid from paste -- the soap condition is still needed because we want the presence of enough soap to stop this job, which stops the mill seeds/nuts to paste job. Seedwatch can then cook the extra seeds/nuts.

I had thread at 5 since it can be used by moods (I think -- can anyone verify this?).

I set rock pot and jug to require 20 available stone because for most of the early game, masons are cranking through stone constantly. By the time the original batch of boulders starts to run out (which is when this condition would actually matter), high master masons are using it up at a very fast rate. 20 gives us a reasonable buffer to start the pot/jug job before all boulders get converted to doors and coffins so we don't get cancellation spam.

For furnace, the limit on adamantine wafers is partially for cloth, partially just so there's a limit so dwarves only make as much as is actually needed. I could totally be convinced to just process all adamantine into wafers, though. Leaving it lying around for doctors to use for suturing seems like a bad idea.

For military, I need to test, but I don't *think* the overlap with smelting will result in a conflict. The military orders should take precedence if both are imported.

I was thinking about depending on items rather than bars too, but I think bars is the right choice. If there is the potential for steel weapons, we shouldn't be spending time producing iron weapons, even if there are no steel weapons *yet*.

Thanks for adding conditions for breastplates and greaves. I was trying to order the pieces by "importance" so the top ones would get picked up first by the workshops, but adding explicit conditions is the much better way to go.

I also have seen the benefit of two forges. I add a second one in the empty space in the lower right corner (I moved the meltables stockpiles in the latest dreamfort.csv beta) once I get magma pumped in. I think I'm happy letting players add the extra workshops as needed, though. Some people may not want to play a military.

I had actually thought the wooden crossbows were just to get started until the marksdwarves auto-upgrade to steel crossbows. Do people generally want a specific stock of wooden ones? I just assign "Ranged weapon" and let the dwarves figure it out.

The code for reaction-based conditions in orders is more flexible than what you can do in the UI. any trait from any reaction can be used in any job. If you add custom reactions, the reagents can be used to create conditions for any order. You just have to do it directly in the JSON.

1x1 Dreamfort? I used to do it all the time, until I became too reliant on wood. Now that I've become more comfortable with pumping magma, I might go back to the smaller embark for the FPS gain.

Ponds can get in the way, but if you can line them up with open areas in the farming level, the water will just spread out over the farming level and dry out, and you can floor over any unwanted gaps in the surface. It might take some grazing area away, but it's doable. If you're not adverse to "cheating" a bit, the tiletypes plugin can also overwrite pond tiles with dirt.

Rivers take up too much space, but if you can find an embark site with a light aquifer, that's just as good for filling up the cisterns (though they're a little fiddly to work with, since a dwarf needs to dig out enough tiles and get out before they drown).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 23, 2021, 01:40:39 am
If you've got magma leaking out of your pump stack you've got serious !fun! incoming

I have no problem with butchering all the other birds, although I generally let stuff growup first because in DF they generally don't give products or give a lot less.
I've been adding things to my config as they showup too. I had cut down to 10 10 4 2 though, which would allow multiple breeding types (and crundles). Allowing only 20 young if we have 14 layers then that means we're going to be wasting a lot of time butchering immature geese.

Oh, I also just had another thought, some people will prefer the others (and just like irl, geese can be annoying cunts in this game), or there might be the rare case goose is unavailable. Some turkeys are stubborn and still prefer to embark with turkeys. Granted we can't do a 1 size fits all I guess. Even the starting nestboxes. I've started bringing 4, so I just assign 2 more and remove them from later stage by hand. Someone who brought no birds then even the initial 2 are a waste of time and resources. Speaking of if I cut back to 2 geese, 1 gander, 20 coal we can bring 4 silk ropes for the traction benches and the well.

Well not lua scripts, the plugins are compiled aren't they? And the dlls.

Fair enough on the barrels vs pots. The masons are also part of why I have the stonecrafter work with different materials than them (I'm anal enough to go through and specify the materials for the build orders). Same for the oil. I forgot rock nuts can just be cooked without pressing.

I forget about manual fill since I always secure a water supply one way or another, I guess that could be an issue though.

Moods...I don't think if something is not present they will want it (besides the afore-mentioned skulls, oh and I was wrong, that is fell and they will murder someone regardless, although macabre will want bone of some sort) forbidding also works to hide things. The thread though might be an issue because the hospital will have thread but they can't use the hospitals thread. Speaking of the hospitals thread,  spinning the initial draft animals will give you like 10-20 thread, if you bump up the hospital to that number and forbid all your other thread, let hauling finish, then set it back down to default you will probably never need to restock or worry about them stealing your candy thread.

The wood crossbows are for the city guard squad, per tradition those who employ one issue them wooden crossbows (preferably featherwood), so that when they beat the everloving shit out of your hapless haulers and crafters who ignored mandates they might not kill them. Some people worry about weight for their marksdorfs and even lesser trained ones, so they might prefer wooden bows all around (I'm not sure how durability has affected that, I know wooden shields now suck). After some early (like version 34) experiments with leather and bucklers and other garbage, I armor them identical to my infantry, shield and all.

So we can add the booze and milling jobs? Nice! Hopefully they work with work orders (I don't remember if they did or not)

Yeah, tiletypes my old friend. I don't know why I didn't think about flooring over the ponds. I guess going deeper makes it a bit easier too if you've got multiple soil levels.

Oh, jobs for green glass corkscrew and tube would be good additions to the orders (pump stack parts). Maybe blocks (I tend to go with rock still since glass are made 1 at a time not 4).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 23, 2021, 02:30:24 pm
Here https://dffd.bay12games.com/file.php?id=12803 (https://dffd.bay12games.com/file.php?id=12803) is a very old fort of mine that has the obsidian works if you want to see it in action.
It's is the bridge method https://dwarffortresswiki.org/index.php/DF2014:Obsidian_farming (https://dwarffortresswiki.org/index.php/DF2014:Obsidian_farming) with a self-measuring reservoir and pump-stack powered by double-dwarven water reactors.

It has drains for excess water but they get very little if any. It's also great for garbage disposal. The 3 wide intakes on the magma supposedly are better for fps, I really can't tell. I also set the pumpstack up so that it can actually be turned on and off and so it runs very little, as the fill is very fast. You only need 1 depth per tile.

So looking at that fort, again the "amount of lye" as a condition appears to work properly for me, if I play with the number it goes red/green appropriately. I'm also wondering if a barrel will only hold 5 units (again I have the 1 tile stockpile for it).

Here https://drive.google.com/file/d/1zoE9SnRYa1rAcohciRPq1pFCfev1U8_x/view?usp=sharing (https://drive.google.com/file/d/1zoE9SnRYa1rAcohciRPq1pFCfev1U8_x/view?usp=sharing)is a rough of the plan, the exporter didn't capture place/query for the levers. Very WIP obviously. Might have to seperate the pump stack and water reactors, it makes the orientation somewhat fixed. Same for the levers. We want the access doors on the south side for Dreamfort, since it should go north of the fort, alongside the masons and closest to the QSP. It should be the middle or lower layer ideally (we clear the room by channeling) And then that reactor could only handle a few more levels of pumpstack, so if it were very deep it wouldn't be enough.

Oh, surface1, bump trees up to pri 1, so the woodcutter doesn't find other things more important to do. Allow all food in the starting pile too (fats & seeds); the seed bags will wind up in a barrel, I have fat that would rot in the kitchen (because I slap up butcher/tanner/kitchen/still/2nd mason on the surface while most of them would be standing around doing fuckall waiting for the woodcutter & miners and get initial jobs done. Useable refuse somewhere (underutilized cloth pile is a good place) for the butchering by-products as well.

Ok, the new autobutcher settings not working right for me.
These are mine:
Spoiler (click to show/hide)
It sets everyone to unwatched. When I had unwatch DOG the line above autobutcher start it acted like it wasn't there (dogs were marked). Before I added the on-new-fortress it worked properly.
Ok, I added "on-new-fortress autobutcher watch all" above "on-new-fortress autobutcher unwatch DOG" and that seems to work.

Do you find that you have to toggle the hospital zone from/back to hospital before the boxes/beds/etc showup? Oh, also if zone is set for animal training then dwarfvet will make use of it.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on July 24, 2021, 06:30:05 pm
We've made some assumptions in the automation orders about how things are configured. I've been experimenting with a "setup" blueprint (https://docs.google.com/spreadsheets/d/13PVZ2h3Mm3x_G1OXQvwKd7oIR2lK4A1Ahf6Om1kFigw/edit#gid=1044475404) that makes some standardizing changes. However, I'm not exactly sure which changes I make are "universal" and which are just a product of my own idiosyncrasies. Which of these changes make sense? They should be good as defaults for newbies in particular. As long as we're clear about what changes we're making, more experienced players can override them with their own preferences. But is there anything here that is clearly "most people won't want this"? Is there anything obvious I've missed?

For the pump stack, I've come to the conclusion that I messed up the dig pattern. I connected the access stairwell to the incorrect pump tile. That's why it was leaking without doors. Fixed, but now it needs another round of testing.

You're right about not min-maxing on geese. Leaving most creatures at the autobutcher defaults is probably the right way to go. OTOH, I *will* make a *personal* config (onMapLoad_myk.init) that butchers more aggressively.

I revamped my embark profile (based a lot on yours), and 4 silk ropes definitely made the cut. I'm still testing it, but I can already see it is suitable for a much greater variety of embarks. I don't have to be so prescriptive about which embarks are "good" for dreamfort now! I am still trying to avoid any troublesome items, like bituminous coal, though.

Regarding the nestboxes -- you said you "remove them from later stage by hand" -- what do you mean? Having something in target tiles would bork Python quickfort, but in DFHack quickfort, it's perfectly fine if the nestboxes are built early. They'll just get skipped by the later #build blueprint when it detects the tile isn't free.

I am fairly certain that moods can require things regardless of whether you have them on hand. In just my last game, a moody dwarf required raw green glass. I could produce it easily, luckily, but I hadn't ever made any before the mood struck.

I'm not convinced that we should add orders to our automation for one-off building projects. If it's coming from a blueprint, there's 'quickfort orders' for that. If it's something you're doing yourself, I think it would be more efficient if the player were to also generate the corresponding orders.

For example, I just created a 98-level pump stack. As part of the planning, I set buildingplan to require screw pumps to be made of green glass and I (manually) created orders for 98 green glass tubes, 98 green glass corkscrews, and 98 green glass blocks (my stone was being eaten by my masons too quickly for me to depend on stone availability -- and I have embraced the multicolor constructions that come from not setting the material for my mason jobs : p). If we had automation orders that ensure 1 available green glass tube, corkscrew, and block, it would take at least 98 days to get the pump stack operational. Creating the one-off, high-volume jobs got the job done much quicker.

Nice obsidian farming blueprint! Once it's done, we can export all the sheets to csv format (via xlsx2csv (https://github.com/dilshod/xlsx2csv) -a -p '' "obsidian farm.xlsx") and open a PR to merge it into the DFHack blueprint library (https://github.com/DFHack/dfhack/tree/develop/data/blueprints) -- it's generally useful and not specifically tied to dreamfort. It should also get some documentation in the library guide (https://docs.dfhack.org/en/stable/docs/guides/quickfort-library-guide.html).

I haven't gotten to auto-connecting levers yet in the blueprint plugin (https://docs.dfhack.org/en/latest/docs/Plugins.html#blueprint), but it's on my list.

I'll play with lye a bit. Right now that stockpile accepts all misc liquids, which means lye plus milk of lime. With barrels, we could likely halve the size of the pile (or maybe have two one-tile piles?). Any ideas what to put in the extra space? something we'd like a visual cue for whether we have stock or not?

Brilliant idea for raising the priority for chopping the trees. Done. I wrote those blueprints long before setting priority was a quickfort feature and I never thought to go back and update it. I'll test on my next run-through to make sure my woodcutter stays on task without manual prodding.

I've actually been a little unhappy with the starting food and booze stockpiles ever since we made all those improvements to getting a minimally functional fort set up faster. Now its useful lifetime is very short -- only a few days. Do we even need one anymore? Stockpiles on the industry level won't be available until the miners get through all that rock, so stone and wood (and "misc") stockpiles are still useful. However, the farming level, which stores food, booze, and refuse, is ready so quickly. My dwarves usually haven't finished storing the booze that I brought in the wagon before it's time to move it all downstairs.

The reason I hadn't enabled seeds in the starting pile was because the seed feeder pile on the farming level doesn't accept barrels. If seeds are collected into a barrel on the surface pile, they won't ever be moved to the (barrel-enabled) seeds stockpile on the farming level, which takes only from the (non-barrel-enabled) seed feeder pile. (If anyone is wondering why it's set up this way, see the note on the wiki (https://dwarffortresswiki.org/index.php/DF2014:Seed#Seed_Production).)

Now, as I'm writing this, I realize that we can actually handle this situation. we know the farming level is directly beneath the surface (unless the player does something fancy like channel an extra layer of vents and dig farming two layers down to avoid ponds like we discussed a few days back...but let's ignore that case for now). We can set up a "give" relationship between the stockpiles on the surface and the ones on the farming level. Then we can be a little more generous with what the surface stockpiles accept.

I enabled animal training for the hospital for dwarfvet (and documented it here (https://docs.google.com/spreadsheets/d/1IBy6_pGEe6WSBCLukDz_5I-4vi_mpHuJJyOp2j6SJlY/edit#gid=6456804)). Do you happen to know if veterinarians need just ANIMAL_CARE enabled, or ANIMAL_CARE plus the normal doctor labors?

I haven't had any trouble with hospital furniture getting placed -- furniture gets placed in the order it was registered with buildingplan. How would toggling the zone even affect furniture placement?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 25, 2021, 03:08:34 am
If I made the mechanic first in the embark then that would work for me. I usually set it to highest but I've just come to the conclusion it is better to leave it alone until at least 1st migrant wave. Early on having everyone working and hauling (especially my last embark I got like 800 wood just from the surface clearing orders) is more important than an accurate stock count. I aim to have industry dug out and farm3 completed by the end of the 1st season. Broker I am finding my initial 7 never do, since the first 2 migrant waves generally have better candidates anyway. Manager has to be assigned but won't actually start working (or gaining skill) until...I am not really sure what triggers it, either migrant wave or possibly 20+ dorfs.

Burrows would be hard to define unless you can find a way to do them in the actual build plans? So when you designate surface1 or farming1 it paints them in. That would be pretty badass.

The rest of them sound great to me (especially if I don't have to manually build uniforms, my least favorite task), except taking away the hunters ammo. They need it to function. I'm not big on them (military squad is much better) but I often let ones who arrive with the skill continue to do it until I decide to yoink them for military service.

Oops, yeah pump stacks are easy to mess up, been there done that, I didn't catch it on your plan either.

Well I don't think the default is all that great, although I think we've got a fairly good tuning for the most common things. Granted clinodev probably won't like all his guinea hens being butchered lmao. I've always been the goose crusader, trying to get other poultry users to see the error of their ways.

I just did 4 ropes this time too, a lot easier than trying to have the planter make them (he is busy by then, besides I'd generally rather his moodable be weaponsmith than clothier)

Oh, I meant I remove the extra nestboxes from crafting. Cancel job and recreate with 2 less. I just did 2 female/1 male this embark, and they both laid fertile eggs so I may stick with it. I got 10 between the 2 of them, which if I get that every season is still way too many hatchlings anyway.

Other people have said that about moods so you could be right. Maybe I've just been lucky and never had that happen to me. OTOH, the people who really like to micro-manage their artifacts go and forbid everything they don't want used, like to force platinum artifact weapons for instance. That's a level past what I can be arsed with so I've never tried, but that would be same net effect as not having it. I think thread and cloth would be special cases because if you have them in a hospital they become like Schrodinger's cat or something. They aren't available but they don't quite "cease to exist" like a forbidden item.

Not sure which one-off you are talking about (because I dumped so much info)? The pump parts?  I was thinking just handy to have a couple on hand, just like blocks and mechanisms and other odds and ends; I always like to have a few extra on hand for those little last minute projects. Yes, for a pumpstack or the obsidian farm I would queue them the usual way. Being as the orders have gotten very long and complicated I can understand your objection to them.

Yeah, it's a good little farm, runs pretty smooth.

I split them into 2 seperate 1 tile piles. I haven't gotten around to making paper lately so not sure about the lime, but it should act the same. Visual stock, on that side of the house...would have to think about it (brain addled from long late Rust session, need to go to bed). The steel, coal and sandbags are certainly handy.

Getting food into a stockpile is kinda critical, granted booze doesn't rot, seeds have to be left out a very long time. I think anything in the wagon is safe anyway. The meals and any leftover meat from butchering as well as the tallow need to go into a pile. Especially since I remove those extra surface facilities as soon as I am done with them. The booze is kinda important for me still, because I want to reclaim those barrels with combine-drinks. The seed bags should get taken back out to go into the barrelless pile, but yes, you either need to make a link or remove the surface pile.

The stone pile I find very useful, because you can set links which forces wheelbarrows to be used to get stone instead of them hauling it. The rest of the stockpiles, not so much actually, depends how early I decide to pop the wagon, and there really is no pressing need to dismantle it. I'm seeing patience in a lot of things actually gets the Dreamfort built faster. Queueing too many things at once and it turns into a clusterfuck.

Just animal care. They will actually gain the regular skills from treating animals though. I didn't actually notice that until today since the wardogs went apeshit on some wild boars and got themselves all tore up, and my vet had started skilling in all of the medical skills.

Not the furniture getting placed, it's when I go in and look at the hospital zone details I see 0 coffers, 0 tables, etc. I noticed it because I realized stock wasn't getting hauled and when I looked into the issue that was why. It has been my last few embarks. I don't seem to recall this issue from several months ago, but I am old and lately somewhat forgetful.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on July 25, 2021, 10:27:49 am
Ok, I removed the hunter ammo removal and the "Clearcutting area" burrow. I kept the precision setting for the bookkeeper since most people (I think) would forget to set it later (and it would be difficult to write a blueprint to set it later since the number of nobles may have changed and we wouldn't know the position of the bookkeeper).

Auto-adding to burrows is an intriguing thought. I worry that doing this in a #query blueprint is too fragile -- what if the player removes the Inside burrow or has them in a different order by the time the #query blueprint is run?

I think I can make it more robust, though. I could add a "burrows" command to quickfort. Just like the "orders" command generates orders from #build and #place blueprints, the "burrows" command could add the area affected by a #dig blueprint to a user-specified burrow. This would allow for a lot more dynamic error checking than a #query blueprint. I'll add this idea to my backlog (https://docs.google.com/document/d/17EjZlGsUOJ6E8WtqkCRZi9BBKjL9L1IdHfkB3Ajqas8/edit#heading=h.xk2hv04zs6ea).

re:odds and ends, you're right that having a few of everything on hand is useful.. I was objecting adding them to the "main" automation orders which focus on the basics, but now that we're splitting things into separate files, a set of orders that keeps a small stock (1 or 2) of items like pump parts, chairs, tables, mechanisms, alters, bookcases, statues, etc. could be nice. Then players could just buildingplan plan whatever they want and everything would just get built without any explicit orders at all. Only big projects (that's what I meant by "one-off") would require real orders. I wonder if players would appreciate options for which material these items are made out of -- one for rock and one for glass? Not everyone will be able to build glass, though.

I'll tweak the starting piles and test the hospital.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 25, 2021, 01:59:01 pm
Maybe make glass it's own file.
So looking at the setup we could actually add entire uniforms from scratch?
Can we set other starting jobs too? (I honestly don't even remember how to do that without Dwarf Therapist it's been so long)
I love automating repetitive tasks.

Among other jobs, I am seeing the stone crafting really can wait until the 1st migrant wave (once the initial 2 nestboxes are made). Bee keeping too. I don't know about you but I'm not getting surface5 going before Late Summer/Early Autumn. LOL, and I just got sieged in Early Autumn for the first time in a while. Necro came raised 2 dead keas and left. Undead kea's truly terrifying. GG.

Oh, not only does the vet gain regular skills, they also don't gain any animal care (last game I was overrun with entire waves of migrants with animal care & plant gathering and no other skills) but they do need it enabled. Considering the state Toady left it in, I can accept the fact that is a kludgy hack to make it work at all. They do get a lot of area inaccessible cancelation spam for some reason I can't understand (other than when they can't walk).

So make mead is importing properly (my bad, was make honey), lye & soap jobs are still getting plain ITEMS. On the numbers by the way, I think 5-10 each plus what is in the hospital is plenty.
I guess I forgot to make the dfhack updates.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on July 27, 2021, 07:23:54 pm
I remember now why I configured the starting food pile to not use containers -- it eats all our barrels which we need to build the ashery and dyer's workshops. However, now that the farming level gets built so quickly, this point is moot since *those* stockpiles can eat the barrels anyway. I'll add documentation that extra barrels might need to be built (and/or combine-plants and combine-drinks need to be run) if stockpiles have claimed the ones you need.

We can absolutely create entire uniforms from scratch in a #query blueprint. Unlike the other modes, which modify game structures directly, #query blueprints are just glorified keystroke replayers. Anything you can do in the UI, you can do in a #query blueprint. Be aware, though, that the cursor behaves..oddly.. in the military menu and doesn't always end up where you expect. Scripting the military menu takes a lot of careful transcribing of direction key sequences.

Setting starting labors can be done the same way, just by scripting the key sequences. Creating custom professions in the DFHack manipulator UI (u-l), saving them with 'P', and later setting labors with 'p' might be easiest. I uploaded the set of DFHack manipulator professions I use to the dreamfort folder (https://drive.google.com/drive/folders/1iS90EEVqUkxTeZiiukVj1pLloZqabKuP) (copy into the "professions" subdir in the DF directory). I'll have to document them.

Dwarf Therapist can actually import these professions (as long as you have them assigned to some dwarf) so you can use the same profession presets in DFHack manipulator and DT.

The reaction condition support for the orders plugin is not merged yet (https://github.com/DFHack/dfhack/pull/1906), so the only way to solve the "plain items" problem on orders import is to locally pull the PR and build the code yourself. Once it's merged, it will be easy to get the updated code via DFHack's continuous integration builds (https://buildmaster.lubar.me/api/ci-badges/link?page=build&key=badges&$ApplicationId=3&$BinariesAvailable=true) (the "Build Artifacts" list).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on July 27, 2021, 08:17:40 pm
Never really thought about that with the barrels (but after consolidating I have enough empties to last until pots get going), but the surface pile isn't going to be the culprit as you said, it's the farming level. Build orders queues the needed barrels though I guess they could still get taken.

So it's just replaying a macro? That's pretty flexible at least, even if it is a pain to setup. It still beats doing it every new game.

Y'know I know custom professions is a feature of Dwarf Therapist forever and yet I never think of using it.

I know, I had started to do that and then I got distracted and forgot about until the import failed again.




Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on July 31, 2021, 12:48:55 pm
I've been exploring how tweak do-job-now can improve the efficiency of the fort by boosting the priority of certain jobs, but it got tedious to always be boosting the same types of jobs. So I wrote a script to monitor job creation and automatically boost the priority. I'm still testing the implementation, but here's the doc I wrote for it:
Code: [Select]
prioritize
==========

The prioritize script sets the ``do_now`` flag on all of the specified types of
jobs that are currently ready to be picked up by a dwarf. This will force them
to complete the jobs as soon as possible. This script can also continue to
monitor creation of new jobs and automatically boost the priority of newly
created jobs of specific types.

This is most useful for ensuring important (but low-priority -- according to DF)
tasks don't get indefinitely ignored in busy forts. The list of monitored job
types is cleared whenever you load a new map, so you can add a line like the one
below to your onMapLoad.init file to ensure important job types are always
completed promptly in your forts::

    prioritize -a StoreItemInVehicle PullLever DestroyBuilding RemoveConstruction

Also see the ``do-job-now`` `tweak` for adding a hotkey to the jobs screen that
can toggle the priority of specific individual jobs.

Usage::

    prioritize [<options>] [<job_type> ...]

Examples:

``prioritize``
    Prints out which job types are being automatically prioritized and how many
    jobs of each type we have modified since we started watching them.

``prioritize ConstructBuilding DestroyBuilding``
    Prioritizes all current building construction and destruction jobs.

``prioritize -a StoreItemInVehicle``
    Prioritizes all current and future vehicle loading jobs.

``prioritize -d StoreItemInVehicle``
    Stops automatically prioritizing new vehicle loading jobs.

Options:

:``-a``, ``--add``:
    Prioritize all current and future new jobs of the specified job types.
:``-d``, ``--delete``:
    Stop automatically prioritizing new jobs of the specified job types.
:``-h``, ``--help``:
    Show help text.
:``-j``, ``--jobs``:
    Print out how many jobs of each type there are. This is useful for
    discovering the types of the jobs which you can prioritize right now. If any
    job types are specified, only returns the current count for those types.
:``-q``, ``--quiet``:
    Suppress informational output (error messages are still printed).
:``-r``, ``--registry``:
    Print out the full list of valid job types.

The example I put in the docs is what I intend to add to dreamfort's onMapLoad.init:

Code: [Select]
prioritize -a StoreItemInVehicle PullLever DestroyBuilding RemoveConstruction
with callouts in the checklist for when to run one-off commands like

Code: [Select]
prioritize ConstructBuilding
like when the industry level is first laid out.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 02, 2021, 11:14:54 am
I've been testing the prioritize script, and I'm really pleased with how it increases responsiveness and efficiency in a fort. I think I'll add ConstructBuilding to the recommended watch list as well since construction is such a critical part of getting a fort up and running.

I wish I had this script years ago! Such a short simple script, but it makes so much of a difference!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 06, 2021, 03:49:01 pm
Ok, I'm rescinding my recommendation for ConstructBuildilng being automatically prioritized. It causes too much strain on the dwarves when building a lot of constructions (such as when dreamfort builds the walls and roof of the surface fort). It is still sometimes useful to prioritize the ConstructBuilding jobs that are ready *right now* with just prioritize ConstructBuilding (i.e. without the -a option), but I've come to the conclusion that it's not good to have it on all the time.

My current recommended addition to onMapLoad.init:
Code: [Select]
prioritize -a StoreItemInVehicle PullLever DestroyBuilding RemoveConstruction RecoverWounded FillPond DumpItem SlaughterAnimal

In other words, these are the tasks that (seem to me to) benefit most from being completed ASAP. Did I miss anything that should be here by default? Players can always add (and/or remove) other types during gameplay at any time too.

I'm gonna say it again: this script has made a world of difference in the responsiveness of my forts. When I buy a shipment of animals from traders, it no longer takes years to slaughter them all. When I dump the equipment of a caged invading army, it now happens quickly and efficiently. I no longer have to waste dwarves by focusing them on just the "Pull Levers" labor. I don't have to suspend all my masonry jobs so my masons finally have time to build bridges and wells.

I know not everyone plays the way I do or has the problems I have, but I really hope this script can bring people as much joy as it brings me : ) If you'd like to try it before it gets merged, you can download the script here (https://github.com/DFHack/scripts/blob/b262fa3672bbff9b9143b2a51e6d9b170939bbeb/prioritize.lua).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 06, 2021, 10:33:32 pm
Ok, I'm rescinding my recommendation for ConstructBuildilng being automatically prioritized. It causes too much strain on the dwarves when building a lot of constructions (such as when dreamfort builds the walls and roof of the surface fort). It is still sometimes useful to prioritize the ConstructBuilding jobs that are ready *right now* with just prioritize ConstructBuilding (i.e. without the -a option), but I've come to the conclusion that it's not good to have it on all the time.

My current recommended addition to onMapLoad.init:
Code: [Select]
prioritize -a StoreItemInVehicle PullLever DestroyBuilding RemoveConstruction RecoverWounded FillPond DumpItem SlaughterAnimal

In other words, these are the tasks that (seem to me to) benefit most from being completed ASAP. Did I miss anything that should be here by default? Players can always add (and/or remove) other types during gameplay at any time too.

I'm gonna say it again: this script has made a world of difference in the responsiveness of my forts. When I buy a shipment of animals from traders, it no longer takes years to slaughter them all. When I dump the equipment of a caged invading army, it now happens quickly and efficiently. I no longer have to waste dwarves by focusing them on just the "Pull Levers" labor. I don't have to suspend all my masonry jobs so my masons finally have time to build bridges and wells.

I know not everyone plays the way I do or has the problems I have, but I really hope this script can bring people as much joy as it brings me : ) If you'd like to try it before it gets merged, you can download the script here (https://github.com/DFHack/scripts/blob/b262fa3672bbff9b9143b2a51e6d9b170939bbeb/prioritize.lua).

Here I thought butchering was fairly high priority. What about tan hide? Possibly haul food as well, although that might be a bit much.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 07, 2021, 02:23:30 am
Unfortunately, job types don't always map cleanly to labors. I'll have to track down what job type "Tan a hide" is. It might be "CustomReaction", which isn't helpful. Haul food is of type "StoreItemInStockpile" (or "StoreItemInBarrel"), which is far too broad to automatically prioritize.

I probably could figure out what labors are involved, though. Prioritizing hide tanning and food hauling does sound like a good idea.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 07, 2021, 06:01:32 am
Unfortunately, job types don't always map cleanly to labors. I'll have to track down what job type "Tan a hide" is. It might be "CustomReaction", which isn't helpful. Haul food is of type "StoreItemInStockpile" (or "StoreItemInBarrel"), which is far too broad to automatically prioritize.

I probably could figure out what labors are involved, though. Prioritizing hide tanning and food hauling does sound like a good idea.

Uhhh, yeah I think it is custom reaction.
Therapist might shed some light, since it splits the hauling labors?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 16, 2021, 10:01:59 pm
I spent some time investigating, but mapping job types back to labors looks very hard to do. I absolutely would like to prioritize time-sensitive tasks like tanning and food hauling, but I'm going to have to look into it more later.

I also looked into the lye and soap orders. It looks like pots can store anywhere from 1 to 7 units of lye, but always count as one "lye-containing item" (whereas buckets were deterministically one-to-one). If lye is in pots, the whole pot gets dragged to the workshop for use in making soap, so we have to be a little loose with our limits to compensate. Using pots is more space-efficient, though, and gives us room to show an "out of stock" meter for wood, so I'm fine with the change overall. I halved the size of the "miscliquids" stockpile, enabled pots. and adjusted the limits of the "make lye" and "make soap" orders so they make sense regardless of whether lye is stored in buckets or pots -- the automation orders are useful for all fort designs, not just Dreamfort. I'm targeting three lye-containing pots instead of just one to reduce the chances of cancellation spam as the pots are hauled to and from the stockpiles.

I've been doing a lot of testing, and I think Dreamfort is just about ready for the next release. Big thanks to ldog here on the forums for their help in driving Dreamfort to greater heights! Here are the changes:

Whew!

I'm still making a few more changes, especially around where the supporting files are stored. The enhancements to the orders plugin and the prioritize script are also not merged yet, so the new dreamfort version isn't quite ready for use. I'll update again once everything's ready.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 16, 2021, 10:49:49 pm
I finally realized that many of the Dreamfort checklist commands are very similar, differing only by the command (e.g. "run" vs. "orders") or the label (e.g. "quickfort orders library/dreamfort.csv -n /surface2" vs. "quickfort orders library/dreamfort.csv -n /surface3").

Now, any of these elements can be replaced with a comma-separated list, so you can run just one command instead of 2 or more. For example:

Code: [Select]
quickfort run,orders library/dreamfort.csv -n /suites2

quickfort orders library/dreamfort.csv -n "/surface2, /farming2, /surface3, /farming3, /industry2, /surface4, /services2"

This cuts the length of the command checklist roughly in half and makes it much less daunting!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 17, 2021, 09:16:50 pm
Just going through the new stuff. Very nice tweaks!

onMapLoad.init is missing:
tweak do-job-now
dwarfvet enable
soundsense (this is my own tweak just to remind myself)

Those need to be enabled every time unless you've got some other method?

I don't remember if I've ever brought it up or not, but cutting the center bedrooms along with the redundant doors is 64 less doors we need to make. It's also somewhat improved pathing (although I doubt the bedrooms are big offenders of FPS loss since they only go to sleep like once per season). That is 192 bedrooms vs 216 for the 6 floor stack. Considering I see more married couples in current version of DF I think that is still more than enough unless you are raising the pop cap? Granted, I seem to have trouble fitting in an apartment stack, caverns always in my way.

From center of wagon running quickfort run library/dreamfort.csv -n /setup I get:
quickfort: expected to be at cursor position (47, 47, 69) on screen "dwarfmode/QueryBuilding/Some/Wagon" but cursor is at (45, 45, 69); there is likely a problem with the blueprint text in cell A219: "{startnobles}{startorders}{startburrows}{startmilitary}{starthotkeys}"

Since I ran it several times from various other positions (1 of my draft animals is on the center by the way) before checking, and then finally moving it off the wagon before it executed successfully, it added several plain cloaks to the uniforms, greaves to the metal as well, all were set to over instead of replace. Also the H menu it messed up the names, like it applied them and then tried a few more times and used whatever blank characters were left. I'm assuming partial reruns of the macro and probably not much in the way of error-trapping available for that. The other things seem to have applied normally.

Doesn't seem to like the multi-orders either:
[DFHack]# quickfort orders library/dreamfort.csv -n "/surface2, /farming2, /surface3, /farming3, /industry2, /surface4,
...rtress 0.47.05/hack/scripts/internal/quickfort/parse.lua:335: attempt to call a nil value (method 'description')
stack traceback:
        ...rtress 0.47.05/hack/scripts/internal/quickfort/parse.lua:335: in function <...rtress 0.47.05/hack/scripts/internal/quickfort/parse.lua:321>
        (...tail calls...)
        [C]: in function 'dfhack.call_with_finalizer'
        ...k 0.47.05-r04\Dwarf Fortress 0.47.05\hack\lua\dfhack.lua:72: in function 'dfhack.with_finalize'
        (...tail calls...)
        ...ress 0.47.05/hack/scripts/internal/quickfort/command.lua:49: in global 'do_command_internal'
        ...ress 0.47.05/hack/scripts/internal/quickfort/command.lua:138: in function <...ress 0.47.05/hack/scripts/internal/quickfort/command.lua:134>
        [C]: in function 'dfhack.call_with_finalizer'
        ...k 0.47.05-r04\Dwarf Fortress 0.47.05\hack\lua\dfhack.lua:72: in function 'dfhack.with_finalize'
        ...ress 0.47.05/hack/scripts/internal/quickfort/command.lua:132: in field '?'
        ...05-r04\Dwarf Fortress 0.47.05/hack/scripts/quickfort.lua:231: in local 'script_code'
        ...k 0.47.05-r04\Dwarf Fortress 0.47.05\hack\lua\dfhack.lua:753: in function 'dfhack.run_script_with_env'
        (...tail calls...)
[DFHack]#
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 17, 2021, 11:27:27 pm
Added tweak do-job-now. I'll leave the others up to the discretion of the player. You can have more than one onMapLoad*.init file. In https://github.com/DFHack/dfhack/pull/1925 I'm naming the file we've been using to onMapLoad_dreamfort.init. Then players can add their own additions to onMapLoad.init. They'll both get run on map load (in alphabetical order).

Fair points about the inefficiency of the apartments layout. My thinking at the time was that the extra doors would add value to the rooms and make the dwarves happier. I do see happy thoughts from nice bedrooms, but I haven't really tested doing less, and it's absolutely true that the number of doors is onerous. I'll take a stab at an alternate layout that's not so door-heavy and see if it affects dwarf happiness.

Regarding the error message for the /setup blueprint: in this case, the error message is harmless. Everything actually does get applied correctly. Entering and leaving the (H)otkey menu tends to move the cursor around and trigger the query blueprint error detection. Long term, I plan to implement alias-level settings that will tell quickfort that it's ok for the cursor not to end up at the starting position for this particular alias. Short term, I bet if I force the wagon to the center of the screen with a simulated {F1} hotkey press then the cursor will end up in the expected position. That is, the /setup blueprint becomes:
Code: [Select]
{startnobles}{startorders}{startburrows}{startmilitary}{starthotkeys}{F1}
I hadn't done this before since it will fail if the player has redefined the F1 hotkey before running /setup, but I have tried to reinforce in several places that /setup should be run first, before any customization is done.

I just merged the multi-command handling yesterday, so you'll have to pull the most recent code for that to work.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 18, 2021, 06:40:36 pm
Hey, what happened to your guide on the custom professions? I was reading it the other day but it vanished.
Still trying to get my head around that stuff.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 18, 2021, 09:02:16 pm
Ah, sorry! I'm adding the supporting files and their documentation to be distributed with DFHack. The PR is https://github.com/DFHack/dfhack/pull/1925. the rendered docs are available at https://dfhack--1925.org.readthedocs.build/en/1925/docs/guides/examples-guide.html

The links to files in the docs won't work yet since they're not merged, but all the files themselves are in that PR.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 18, 2021, 10:50:59 pm
Thanks.
Ok, so I think I understand now with the hauling, we want lever/vehicle/remove construction hauling enabled pretty much always on everyone and let the auto-hauler handle the rest? I was using the old version that you sent me in a zip, just downloaded fresh ones
Some of the groupings I find questionable (Although I am seeing it is by work area, which is legit since it keeps them from having to travel too much), I guess eventually you'll have a better pool of skilled craftsmen at the cost of them taking longer to get there. It also gives less control over the moodable skill. The craftsmen is really a free for all lol!

You really need to cut down on tanners, it is a special skill because while it has no effect on quality it is a moodable skill. I shudder to imagine 20 legendary tanners running around my fort and all the leather artifacts that could have been good metal weapons or armor. I'd remove it from both farmers and unskilled and probably put it on the clothiers.

I'm still mulling over the rest. There certainly is a reduction of micromanagement. Later on it also adds some resiliency, since I typically might have 1 or 2 highly skilled dorfs per job and if I lose 1 it is a major disaster. Having 3 or 4 makes it less disruptive. I am certainly warming to the idea the more I think about it.

I imagine at a minimum that you restrict the mechanics shop to skilled or better. I do like the idea of the haulers resetting traps but I wouldn't want them all making mechanisms. By the way, how come they don't have all hauling labors active?I had an old version

The farmers have an awful lot of labors enabled. I'm leery. Maybe offload some of their tasks to the unskilled. Granted I don't use some of them at all (both dissection), some are used very rarely (gelding) and then of course shearing/spinning/milking/cheesing are like once per season. It's unfortunate that fisher dwarfs can't handle their own cleaning and this is the next best group to do it. I guess they might be ok. Especially running 5 or so of them.

Miner is missing alchemy. Probably all the jobs should have it? I converted the professions over to DT by hand (they're just text files) and autohauler does not care about the professions set hauling labors. I don't know if dfhack manipulator works any differently than DT since I haven't tried it yet. Actually it doesn't seem like autohauler is respecting the alchemy setting either. I'm at a loss but this is my first time trying it.

I forgot if I mentioned or not, running setup after F1 runs without error.

Animal care should be removed from Outdoorsdwarf, it will level up their doctor skills if used and we've already got the dr profession.

Move small animal disection from farmer to outdoorsdwarf, he has most of the ranger skills anyway, reduction of farmer labors. It's a minor nitpick considering how useless a skill it is but will probably play nicer with using DT optimizer (something I'm just starting to mess with as well, but # of assigned labors seems a central theme to it)

Kinda dangerous to only have a handful feeding prisoners/patients. I usually leave that on. Mixed feelings about the recovering wounded too, normally I keep the civilians on lockdown until it's clear anyway. OTOH the ones that get wounded by wild animals in the caverns...hmmm...yeah, would be better to have armed dorfs on recovery. Maybe add it to the miners too, picks are deadly.

Papermaking is considered a craftsdwarf skill, another to unload from farmer. Prefer grouping in DF categories to keep # of guilds from getting out of hand. Pottery, glazing, glassmaking are also considered craftsdwarf. Glassmaking being the only moodable out of these. Technically the textile skills are also craftsdwarf but I think they are a good split. Jeweler are also their own skills

Carpenter, bowyer, woodcutter all considered 1 group. Would probably make carpenter/bowyer its own profession or possibly roll into outdoorsdwarf. Siegecraft goes with Mechanic, although I tend to not use it anyway.

Can probably remove beekeeping from farmers, the outdoorsdwarfs are better suited being armed.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on August 19, 2021, 01:11:53 am
One quick question:

Does quickfort offer a placement mode that works similar to the way workshops are placed (I.e. with X’s, or something, to show where everything would go)?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 19, 2021, 11:01:47 am
One quick question:

Does quickfort offer a placement mode that works similar to the way workshops are placed (I.e. with X’s, or something, to show where everything would go)?

Sorta if I understand your meaning. It uses DFHack planning mode so you get to see the designations before stuff is built, and of course dig designations a vanilla thing.
For example (from Myk's checklist) we run quickfort run library/dreamfort.csv -n /perimeter to see how a spot will work out, and then run quickfort undo library/dreamfort.csv -n /perimeter to remove that. We can do it repeatedly until we find the right spot, but it is important to run the undo to cleanup or they will build it.

Any command you run can be undone, you just need to make sure to put the cursor in the same place or you'll have remnants.

Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 19, 2021, 01:49:03 pm
Just to add to that reply to A_Curious_Cat before I start debating professions:

As ldog indicated, the best quickfort currently offers is the "run", "undo" pair. I have it on my backlog to implement a true preview mode that would show a "shadow" of the blueprint that you could position interactively before applying. I don't even have a design for this feature yet, though, so don't expect it too soon. Open for contributors, though!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 19, 2021, 08:43:50 pm
Since we can adjust the uniforms. I been thinking about shields. Bucklers are just crap, never use. Also I think wood would be better than leather (for the leather armor users instead of wasting leather on shields) and of course metal still for the metal armor uniform (because shield bash is pretty potent).

Uhhh, just noticed cloak is 9 down. Got leather robes added to uniforms. The wierd thing is I swore this was working earlier.

So I made a custom DT view, a bit more in line with the actual profession groups (having read through the guide I learned about how the current default labors came into being), and somewhat tailored for your custom professions (with my edits of course):
(https://i.ibb.co/B6PRVRs/Image.png) (https://ibb.co/B6PRVRs)
Trying something a bit new for this embark skillwise. Dropped discipline/swimming from the masons and farmer. Engraving is much slower to raise than mining so I maxed that at the cost of a couple mining. Gave the outdoorsdwarfs herbalism because why not, made the farmer a cook too. Took 2nd axe and more rope at the cost of half our starting bronze & coal out of laziness.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 20, 2021, 12:04:47 am
Uhhh, just noticed cloak is 9 down. Got leather robes added to uniforms. The wierd thing is I swore this was working earlier.
ah, so it's not just me. I thought I got it working, but on my next test I got tunics added instead of cloaks. It looks like the list is non-static, which is bad news. I might have to back out that particular uniform change (the others seem to work reliably) until I can figure out a better way to do it.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 20, 2021, 03:47:44 pm
The profession definitions could definitely use some discussion, and I really should have been more transparent about my thought process (prepare yourself for a long post with lots of lists and tables). I designed them according to three principles:
I also tried to make the professions useful in general and not depend too heavily on the specifics of Dreamfort or any particular playstyle (though I do understand that *some* assumptions about playstyle have to go into the design).

Note that I did not consider guild association or distributions of moodable skills. If we can work those in without compromising too much on the other principles, it would be a net win. My approach so far is to be more laissez faire on moods, and post-mood I check to see if the dwarf's current profession benefited from the mood. If not, I consider changing the profession of the dwarf to make use of the new expertise (or sometimes I just enable that labor for that dwarf and give them an out-of-profession assignment). You're absolutely right that we at least need to be more conscious of these issues, though. More on that below.

First, I figured out which tasks are most important to be done simultaneously at different stages of fort maturity.

Starting fort

Basic fort

Advanced fort

Steady-mode fort

Then I mapped the labors to their primary workshops:

WorkshopLabor
AsheryLye Making
Bowyer's workshopBowyery
Butcher's shopButchery
Butcher's shopSmall Animal Dissection
Carpenter's workshopCarpentry
Clothier's ShopClothesmaking
Craftdwarf's workshopStonecrafting
Craftdwarf's workshopBone Carving
Craftdwarf's workshopWoodcrafting
Craftdwarf's workshopStrand Extraction
Craftdwarf's workshopBookbinding
Craftdwarf's workshopWaxworking
Dyer's ShopDyeing
Farm plotFarming
Farmer's workshopGelding
Farmer's workshopPlant Processing
Farmer's workshopMilking
Farmer's workshopCheese Making
Farmer's workshopSpinning
Farmer's workshopPaper Making
Farmer's workshopShearing
FisheryFish Cleaning
FisheryFish Dissection
Glass furnaceGlassmaking
Jeweler's workshopGem cutting
Jeweler's workshopGem setting
KennelTrapping
KilnPottery
KilnGlazing
KitchenCooking
Leather worksLeatherworking
LoomWeaving
Mason's workshopMasonry
Mechanic's workshopMechanics
Metalsmith's forgeWeaponsmithing
Metalsmith's forgeArmoring
Metalsmith's forgeBlacksmithing
Metalsmith's forgeMetalcrafting
QuernMilling
Screw pressPressing
Siege workshopSiege Engineering
SmelterFurnace Operating
Soap-maker's workshopSoaping
StillBrewing
Tanner's shopTanning
Wood furnaceWood Burning
Wood furnacePotash Making

Then I started building the professions step by step. I separated the early important labors so fort development would never be in danger of stalling. As I added labors to each group, I tried to keep labors associated with the same workshops in the same group. And whenever I added a workshop to a group, I tried to combine workshops from the same industry.

Starting fort
ProfessionWorkshopsLabors (grouped by workshop)
Profession 1nonemining
Profession 2mason(masonry)
Profession 3craftdwarf(stonecrafting)
Profession 4nonewoodcutting
Profession 5carpenter(carpentry)

Basic fort
ProfessionWorkshopsLabors (grouped by workshop)
Profession 1nonemining
Profession 2mason(masonry)
Profession 3craftdwarf(stonecrafting)
Profession 4mechanicwoodcutting, (mechanics)
Profession 5carpenter(carpentry)
Profession 6stillfarming, (brewing)

Advanced fort
ProfessionWorkshopsLabors (grouped by workshop)
Profession 1nonemining
Profession 2mason(masonry)
Profession 3craftdwarf(stonecrafting, bone carving, woodcrafting)
Profession 4mechanicwoodcutting, (mechanics)
Profession 5carpenter(carpentry)
Profession 6still, butcher, tannery, farmer'sfarming, (brewing), (butchery), (tanning), (plant processing, spinning, shearing)
Profession 7kitchen(cooking)
Profession 8bowyer, forge(bowyery), (weaponsmithing, armoring)
Profession 9clothier, dyer, leather, loom(clothesmaking), (dyeing), (leatherworking), (weaving)
Profession 10smelter(furnace operating)
Profession 11nonehauling

Steady-mode fort
ProfessionWorkshopsLabors (grouped by workshop)
Minernonemining, stone detailing
Masonmason(masonry)
Craftsdwarfcraftdwarf, jewler(stonecrafting, bone carving, woodcrafting, strand extraction, bookbinding, waxworking), (gem cutting, gem setting)
Outdoorsdwarfmechanic, kennelwoodcutting, animal training, plant gathering, beekeeping, gather wounded, (mechanics), (trapping)
(subsumed into Craftsdwarf)carpenter(carpentry)
Farmerstill, butcher, tannery, farmer's, fishery, query, screw pressfarming, (brewing), (butchery, small animal dissection), (tanning), (plant processing, spinning, shearing, gelding, milking, cheese making, paper making), (fish cleaning, fish dissection), (milling), (pressing)
Chefkitchen(cooking)
Smithbowyer, forge, glass, kiln, siege(bowyery), (weaponsmithing, armoring, blacksmithing, metalcrafting), (glassmaking), (pottery, glazing). (siege engineering)
Clothierclothier, dyer, leather, loom(clothesmaking), (dyeing), (leatherworking), (weaving)
Unskilledsmelter, ashery, soap, wood furnace(furnace operating), (lye making), (soaping), (wood burning, potash making)
Haulernonehauling, architecture
Doctornoneanimal care, suturing, surgery, setting bones, dressing wounds, diagnosis
Fisherdwarfnonefishing

I named the professions in that last table according to the themes that appeared to be emerging.

I then made some adjustments and additions:

Then, with playtesting, I figured out how many dwarves would be needed for each profession at each stage of fort development, resulting in the recommendations I made in the docs we just merged (https://dfhack--1925.org.readthedocs.build/en/1925/docs/guides/examples-guide.html#the-professions-subfolder).

Now, my interpretation of the data, my methodology, and all the decisions I made were based on my experience and my sometimes flawed, certainly incomplete understanding of the game. Feedback and improvement suggestions are very much welcomed. Let me address some of your comments:

You really need to cut down on tanners, it is a special skill because while it has no effect on quality it is a moodable skill. I shudder to imagine 20 legendary tanners running around my fort and all the leather artifacts that could have been good metal weapons or armor. I'd remove it from both farmers and unskilled and probably put it on the clothiers.
This is a good idea. I had given it to so many dwarves because it is a time-sensitive task, and the farmers (who originally were the only ones assigned) didn't always process the rawhides before they rotted. The clothiers are usually not so busy that they can't run upstairs to tan hides, and it would fit in well with their skillset. I might change my recommendation from 2 to 3 clothiers to compensate. If I can figure out how to automatically prioritize tanning jobs, I'll drop that recommendation back down to 2.

Quote
I imagine at a minimum that you restrict the mechanics shop to skilled or better. I do like the idea of the haulers resetting traps but I wouldn't want them all making mechanisms.
This is exactly what I do. I didn't document this in the dreamfort help because I didn't want newbies to get overwhelmed, but I can mention this in the professions docs.

Quote
The farmers have an awful lot of labors enabled. I'm leery. Maybe offload some of their tasks to the unskilled. Granted I don't use some of them at all (both dissection), some are used very rarely (gelding) and then of course shearing/spinning/milking/cheesing are like once per season. [...] I guess they might be ok. Especially running 5 or so of them.
Yeah, most of the Farmer's labors are rarely used, but they need somebody free to do them when they need doing. Moreover, it's useful to have 5 farmers at peak planting/harvest season, but they need something to do the rest of the time.

Quote
It's unfortunate that fisher dwarfs can't handle their own cleaning and this is the next best group to do it.
I just checked if prioritize can handle this, and it turns out it can! I'll add PrepareRawFish and ExtractFromRawFish to the "automatically prioritize" list in onMapLoad_dreamfort.init and move these labors to the fisherdwarves.

Quote
Miner is missing alchemy. [...] Animal care should be removed from Outdoorsdwarf, it will level up their doctor skills if used and we've already got the dr profession.
Those changes should already be in the most recent professions definitions, just merged. You can pick them up by pulling from the DFHack repo now, and I'll remove the old ones from the shared drive. You still have to manually copy the updated professions from hack/examples/professions/ to professions/ to use them in manipulator, though.

Quote
I forgot if I mentioned or not, running setup after F1 runs without error.
I fixed the alias in the /setup blueprint to automate that step, so it *should* run reliably now regardless of where the wagon is on your screen (as long as you don't redefine the {F1} hotkey before running the /setup blueprint).

Quote
Probably all the jobs should have [Alchemist]? I converted the professions over to DT by hand (they're just text files) and autohauler does not care about the professions set hauling labors. I don't know if dfhack manipulator works any differently than DT since I haven't tried it yet. Actually it doesn't seem like autohauler is respecting the alchemy setting either. I'm at a loss but this is my first time trying it.
I included hauling labors in the professions so they'd be useful for players regardless of whether they are using autohauler. I expect them to get overridden if autohauler is active. However, I need to double-check to make sure all the hauling labors are set correctly for each profession. Sometimes autohauler decides to change the labors just as I'm saving changes in manipulator and I don't notice.

I didn't want to automatically include Alchemist for all (skilled) professions since that would break the early game, when you need all dwarves to haul in their spare time. I say in the Hauler description: "As you accumulate enough Haulers, you can turn off hauling labors for other dwarves so they can focus on their skilled tasks.", but for players who don't read the docs, I figured it was safer to default hauling labors to on as opposed to turning them all off and letting the player manually enable them.

I did turn Alchemist on for Farmers, though, since they always need to focus. Maybe I'll give them HAUL_FOOD as well for the non-autohauler users.

n.b. you can configure autohauler to ignore the settings on certain labors. For example, my personal onMapLoad_myk.init file (which runs after onMapLoad_dreamfort.init) looks like this:
Code: [Select]
on-new-fortress buildingplan set boulders false; buildingplan set logs false

on-new-fortress enable autohauler
on-new-fortress autohauler FEED_WATER_CIVILIANS allow; autohauler RECOVER_WOUNDED allow

enable dwarfvet
dwarfvet enable

on-new-fortress autobutcher target 0 0 0 0 new
the autohauler lines let me manually manage those two labors. I'll make a note of that at the end of the professions docs.

As for why it doesn't appear to be respecting the Alchemist labor for you, I'm not sure. Do you happen to have a conflicting labor management plugin enabled, like autolabor or labormanager? autohauler can be configured to check a different labor as its "no hauling" flag, but if you haven't specifically set that up then it shouldn't apply to you.

Quote
Move small animal disection from farmer to outdoorsdwarf, he has most of the ranger skills anyway
I try to keep labors associated with a particular workshop together. I could move both butchery and small animal dissection to the Outdoorsdwarf, though... I'll have to playtest that to see how well that works. Sometimes the Outdoorsdwarves are outside chopping trees for a long time, but butchery and dissection isn't exactly super-time sensitive.

Quote
Kinda dangerous to only have a handful feeding prisoners/patients. I usually leave that on.
It's on for Doctors, Haulers, and Outdoorsdwarves. Is that not enough? Haulers might be too busy, which is why I added it specifically to the other two professions.

Quote
Mixed feelings about the recovering wounded too, normally I keep the civilians on lockdown until it's clear anyway. OTOH the ones that get wounded by wild animals in the caverns...hmmm...yeah, would be better to have armed dorfs on recovery. Maybe add it to the miners too, picks are deadly.
Yeah, it was the caverns that inspired me to only give this to armed dwarves. Good idea to include miners.

Quote
Can probably remove beekeeping from farmers, the outdoorsdwarfs are better suited being armed.
I had added this to farmers to ensure the beehive products were promptly gathered -- the beehives themselves are normally populated from outside hives at the beginning of the game. Or so I thought. After some observation, I do see dwarves continuing to go outside to repopulate drained hives, despite having two hives  inside the fort reserved for population splitting. Ok, removed from farmers.

Quote
Papermaking is considered a craftsdwarf skill, another to unload from farmer. Prefer grouping in DF categories to keep # of guilds from getting out of hand. Pottery, glazing, glassmaking are also considered craftsdwarf. Glassmaking being the only moodable out of these. Technically the textile skills are also craftsdwarf but I think they are a good split. Jeweler are also their own skills

Carpenter, bowyer, woodcutter all considered 1 group. Would probably make carpenter/bowyer its own profession or possibly roll into outdoorsdwarf. Siegecraft goes with Mechanic, although I tend to not use it anyway.
I'd be happy to reallocate labors, but we do need to ensure dwarves don't block on each other due to workshop conflict. You make a good point about guilds. The opposing issue I'm trying to balance is complexity of workshop layout and the resulting brittleness of the blueprint set:

If we split the labors that are used at a craftsdwarf's workshop, then we risk some dwarves sitting idle while another dwarf uses the workshop.

We can try to counter this by building more workshops, but manager orders are distributed to all available workshops by default, so if stonecrafting tasks are at the top of the list for all workshops, non-stonecrafting craftsdwarves are still blocked.

Finally, we can fix this by restricting the allowed general work order labors on each craftsdwarf's workshop. We can do this in a quickfort #query blueprint, but as with all building-modifying #query blueprints, it can fail or give surprising results if the player has made modifications to building settings before running the blueprint. Also, splitting the labors for a single workshop into multiple professions now requires a player to set their workshops up a certain way in order to be efficient. It is much more straightforward and less error-prone to scale by just creating more workshops and more dwarves with that workshop's profession.

So that's the trade-off I've been mentally balancing. I've tried to be very careful about introducing failure points into dreamfort. The new /setup blueprint is the exception, and you've seen how clearly I try to communicate that it must be run before any other changes are made (and you've also seen how brittle it can be anyway).

I'm not saying that we shouldn't make changes. We just need to consider the potential failure modes. DF is not an easy game to automate. Getting and keeping Dreamfort (and the supporting files) in a "it just works" state is a tricky task.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 20, 2021, 07:02:01 pm
Great post! Glad to see we're on the same page about the thought processes behind stuff. I'm always learning new things about this game too, I may be a near expert in some aspects but there are many that I am as clueless as the next urist. I think I've learned as much from you as you from me. Certainly going through and playtesting this thing over and over has been a learning experience.

The onload override helps a lot. I may give the autohauler another shot, I tried it briefly and wasn't happy, but then I was testing out the professions and found out how aggressive it actually is. No other automation, although now I wonder if I enabled autolabor by accident in that run.

That's awesome with the fisherdwarves. I may actually start using them again (especially since 2nd migrant wave just brought me 2 I was debating dumping into lava).

I agree those 3 principles must guide everything, even though I tend to forget to keep it simple sometimes. There are certain things that DT trivializes, if I was forced to use the DFHack manager instead I would tear my hair out trying to play my normal way. The start while a bit complicated does some really useful stuff so it's worth the tradeoff. BTW I'm finding I don't appoint a bookkeeper until 1st migrant wave; early on there is just too much else to do.

Fair point about the carpenter being mostly early game. Mainly because we don't use bins and we use pots instead of barrels, otherwise the carpenter probably would be more important. I'm liking it combined into the outdoorsdwarf so far though. Also 2 dorfs cutting wood right off the rip was useful, especially in my current heavily wooded embark.

Too many skills on the craftsdwarf becomes unwieldly. I absolutely wouldn't ever consider running with only 1 shop though, for several reasons. 1 as you've said is shop in use and work piling up. Urist McCrafty standing around with his thumb up his ass. Also splitting the labors or condensing them doesn't do anything to alleviate this problem. More shops does. 2 Is materials, shops should always be as close as possible to their input (especially for heavy things like stone), but here we've got all kinds of inputs and the piles in different places 3 As you've said, it's trivial to restrict the shop to the type of job that can be performed at them.

Lack of stone pots and jugs can shut the fort down, not to mention the stone is heavy. So I have 1 shop that does only stonecrafting. Cranking out bone crossbow bolts is another pretty fulltime industry (I typically run heavier on marksdorfs than you do, 2-3 squads). Then there is everything else, which I tend to not do so much of, and are mostly lighter things anyway. If there were room in the Dreamfort, I'd probably slap a 4th down in the wood area, because again xbow bolts. Once upon a time I ran a fort almost entirely on mussels (from just 1 fisher too!) and so there were fulltime shops for shell crafting. Craftsdwarves shops, generally more is better. Especially with specialization. The workshop profiles were a very powerful addition to the game and I use the hell out of them.

That being said, honestly most of the craftsdwarf jobs I am fine for letting semi-skilled peasants work at so combining them together is good. Pottery being such a niche thing (and unmoodable) I consider it for noobs, and I haven't used it since. In general I hate the way moods are implemented and they waste too much of my time, much as I wanted to scream when I saw the state of one of your 200+ dwarf lategame forts legendarys, there is a large appeal to saying "Fuckitall!". I think if they only happened when a dwarf was already legendary they would be much better and remove the randomness as well as the min-maxing, but I doubt Toady would ever go for that and I imagine the masses would come with their torches and pitchforks if it did happen. I'd settle for tanner not being a moodable at this point, but hey it could be worse, we should be thankful there are no artifact artisan cheeses! Thinking more about tanning, honestly 5 wouldn't be too much for a mature fort (5 farmers) and it also helps ensure the farmers stay farmers (if they mooded into a weaponsmith then they aren't going to stay farmers in my fort).

Glassmaking...glassmaking is generally every bit as important as the smithing skills. Does it belong with them though? I dunno. In the Dreamfort we've got them all close. In other designs I've used I often do not have them (glass and pottery) near the smelters. Their similarity starts and ends with them being furnaces. Granted when you're running magma you don't have to consider where the coke is except for steel. I used to do a lot of green glass to the jewelers for training cutting and embedding on furniture. Jewelers are another mixed bag, seems I always get lots of early migrant jewelers when it is the last thing on my mind, so they end up doing peasant stuff (can never have too many furnace operators) but I guess rolling them into general craftsdwarf is just as good.

I guessed what the startmanager was for, and gave it a try (although I stripped it down a bit), I thought it was a disaster. Normally I temporarily give everyone but the miners all the roles needed to get industry2 done and then remove them (but see above about DT). What was bad about it? It delayed farming unacceptably. That guy is just way too busy for anything once farming2 is ran. Middle of 3rd season I have him at Grower and cook 6, stonecrafter 2 and brewing/butcher/tanner 0. And I added a farmer 1st wave to pick up the slack. On the other hand, maybe letting farming wait isn't so bad. My unskilled farmer made grower 3 in just a season, and that was as the helper. Maybe a stonecrafter 5/glassworker 5 would be a more useful 7th dorf than a grower. We're not going to starve, especially with 2 herbalists (although there are annoying bugs with herbalism).

As far as keeping labors together by workshop. Sometimes it is more efficient, so less walking is involved. Other times not so much. Butcher for example. Nobody hangs out at the butcher shop. They've got to go up to the pasture to get the animal to slaughter and then go back and then they are on their way. Dissection? IIRC (been ages), They've got to go to the trap and get a vermin corpse and bring it back. Granted if alchemy were ever implemented I might care more about it. I don't think I'd move butchery, it's still important enough that I want it done in a reasonable timeframe, and herbalism can be a huge timesink. Ultimately I only added carpenter and bowyer to yours and left the rest off. Now if we could do the same kind of trickery to those skills as fishing, so we could have hunter/trapper and make them also butcher/dissect/tan that would be something. Shame tanning is being stubborn.

The unskilled...hate the name, it's what I think of haulers as. I'm torn between laborer, furnace operator or peasant.

The feeding, yeah after giving it some more thought the doctors alone are probably enough, mine are usually off playing golf getting drunk. If there are a lot of long-term patients in traction then you're probably up shits creek anyway, POW type prisoners don't usually live long enough that starving to death is a concern, and jail type prisoners have food and booze piles.

Bummer on the uniforms. Wish we had a better way to fix them.

Oh, food hauling right! Yes, I'd leave it on as many dorfs as possible. We don't want our food to rot. Most other things generally can wait but food cannot. Besides the farmers, I would also think about enabling it on others with restricted hauling profiles. Speaking of food, the cook. Considering how often I catch my dorfs munching on raw plants or even meat while lavish meals go untouched, it doesn't really matter much. Now if you are using them as your main trade good, which is very viable actually then I can see the dedicated chefs, otherwise not so much. Of course if we made 1 chef our bookkeeper and the other our manager that might work out well. CMD naturally should be the best Doctor. Broker generally goes to best suited, who it's highly possible will be the mayor as well.

The new apartments, I'd leave the extra 4 out. I don't usually do a quarry level (unless like deep marble is my only flux). As my goodies are usually in the sedimentary (upper) layers (iron, coal, flux) I tend to just mine tunnels out around the fort levels. Could go out the branch tunnels I guess, although it would be better if they were 2 wide instead of 1, but then that also makes us 2 tiles taller and I don't know if we are maxed for the 1 tile footprint.

Could stick those bedrooms on the ends of the branches too, although that would make us 2 wider, so same issue.

So I'm thinking late game mason becomes less busy, maybe pairing jeweler with mason would make sense (I still just think there's too much on the craftsdwarf, not to mention I don't like pottery & glassworking on the smiths)

Oh, and I get melee/marksdwarf for sorting purposes, but why bother with civilian skills on them? Do you deactivate them from time to time? I pretty much follow the rule of once a militiadwarf, always a militiadwarf. I used to try to rotate them on and off of active duty but it just caused too many problems with uniforms/clothing, they wouldn't stop drilling when offduty - which defeats the purpose, and once they become professional soldiers they become unhappy returning to civilian life.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 21, 2021, 07:33:25 am
So my next playtests custom professions (not going to list the hauling labors):
Spoiler (click to show/hide)
No one has more than 12 labors enabled (not counting hauling/recover/feed). I'm flipflopping on the soldiers, whether they should just have hauling or the full hauler profession (although we swap recover with feeding). I'm also still mulling over glassworking and pottery, especially since I hadn't considered quicklime (although it's kinda useless, pigtail sheets ftw) and moving the economic stone to stoneworker pile is a possible point of failure...but so far I still see more cons than pros to adding those to smiths.

Starting with the usual 2 miners, 2 masons, carpenter, mechanic. Still debating what to do with #7. I'm thinking either stonecrafter or farmer and then with or without cook. Of course possibly stonecrafter/grower but not other farming.

Choices...
So we have to have some stonecrafting to get the ball rolling. We can let the masons do it, and hopefully by 1st or 2nd wave assign someone else permanantly.
We really need to do minimal cooking or bring more food on embark. Letting the outdoorsdwarves practice herbalism early on slows fort building unacceptably. Can be done by unskilled.
Farming. Really needs to be done no later than 1st migrant wave if we don't want to be dependant upon caravan.
We'll need to do a bit of brewing, but I'd never waste points on it.
All other (not already covered) jobs do not impact 1st year fort building (I currently bring 4 rope).

We can assign 2 farmers out of 1st migrant wave without hardship seems a safe assumption. I'm also looking to avoid reassigning jobs if I don't have to (the stupid guilds always in the back of my head, which was crowded enough with moodables). Can probably put the brewing off until 1st migrant wave (need to forbid the plumpers so they don't eat them). We're probably better off having a leg up with the skilled stonecrafter because in the first 3 waves I either get none or I get 3-4 of them. Cooking is still worth considering, although I'm probably going to not put points into it. I think we will just make him a crafter and we'll add 5 glassworking. I'm a big fan of magma sooner than later so we'll be making glass pumps within the first year. This embark also has lava at 1st cavern layer.

Current test embark.
Spoiler (click to show/hide)

Major skills revamp. Besides the skill changes, we've done a bit of tweaking. The extra axe and rope. We got most of the points cutting coal and ore, which less heavy shit to haul from the surface is better anyway. I'm still not comfortable going without though, so we've got enough for some weapons/armor. I cut the geese down to 2 so as to not have to arse with getting 4 nestboxes in initially. My exotic meats were unavailable.  I am frequently not getting any leather in the 1st caravan, which is annoying as fuck. Not to mention some embarks might need some militia sooner rather than later. 5 + 2 from pack animals gives us enough to get started, without waiting for geese to mature/2nd caravan. I should probably reorder them to put the craftsdwarf on top, sometimes I go the anal retentiveness extra mile of using DT to check who is better suited for what roles and so assign the skills by hand, which results in the lack of order. I unassign everything but manager after running setup these days anyway. 1st migrant wave I go and assign CMD, bookkeeper and broker. I typically reval every migrant wave too.

This time cloaks were in the 8th slot. We're off to a great start!

I made the changes to shields. Considering the script can be unreliable I guess I'm sticking with doing it by hand. I should probably add my steel marksdorf uniform as well. The usual assign all the dogs to train for war. Carpenter and Mechanic assigned Outdoorsdwarf. Masons and Miners their profs respectively. Craftsdwarf gets craftsdwarf. No surprises here. Will do my usual job assign/unassign to get workshops built when needed.

Starting piles adjustments (typical for me) to remove some hauling. I remove all but whatever stone is found on the industry level (mudstone in this case), I don't want a bunch of shit hauled twice. I manually build a mason out of coke bar right next to wagon and I make all the quartzite into blocks right then and there via repeating order. I restrict the rest of the work orders to the surface2 mason. Remove blocks from misc, no need to haul them an extra time. Starting wood we restrict to willow only, besides what we brought I'll usually wind up cutting down a few. The rest of the wood can sit where its cut until later. I remove refuse-corpses from that pile; early surface vermin corpses not a concern. This time I'm actually going to turn on accept from links only on misc and cloth/trash because getting food into pile is priority, especially in this slimy mudhole hot swamp I am in. We're going to make the surface2 mason/crafter/mechanic take only from the stone pile too. We don't want them hauling up from below by hand. I cancel the temp depot. I know I will have the permanent one done before caravan arrives. If something goes wrong though, I'll probably wish I didn't.

Since I was too lazy to pull the new files, I have to run orders 1 by 1. I actually prefer that anyway since it seems like otherwise construction bogs down and I run into hauling issues. I remove the blocks since we're making quartzite. I will use these for workshops, track stops and bridges only -  so we don't cancel all block jobs created by orders but on a case by case basis. In general I am anal about controlling what materials are used to build what. We'll set beds to whatever local wood strikes my fancy (date palm) and the rest willow for weight. The nestboxes we'll use local stone (mudstone). We'll do the same for pretty much everything else as well. When we get a local supply of magmaproof stone we'll switch mechanisms, doors and containers over to that. Walls and floors are always magmaproof so we don't worry about them.

There was only a single tree in surface1 so I ran surface2 as well before even unpausing. I designate a few willows to chop as well. 1 final check to make sure everyone has work to do and off we go.

I queue up farming2 as well. We've got jet in the industry area, so we're going to make the pots out of it. We add that to the stone pile. We need to let them dig a little stone before digging out farming level or crafting will stall, and then construction with it.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 21, 2021, 11:50:45 am
Continuing the blow by blow.

So miners are at 5 skill (from 3) by 2-9, farming level about half dug out, industry 1/4.

I like a bigger guard dog pasture, I delete the existing and make it 5x5, removing the 2 stairwell tiles. Otherwise when we get pups it gets crowded. I know I overdo it with the dogs and the sensible thing would be to only keep a few and butcher the rest, but I can't help myself. I'll generally train them and assign them to 1st melee squad. I'll also station some at the cavern entrance(s) later. With the amount of trap avoid shit that comes in through the caverns they are indispensible.

Farms dug out on 2-16. I decide the craftsdwarf will have to do the cooking as soon as the kitchen is built. We didn't do the temporary surface thing we usually do. Enable needed skills for building on the masons and outdoorsdwarves. Disable the skills again once all is built.

I'm really not sure about the autohauler and alchemy, although it at least isn't assigning the miners any hauling jobs, it did remove their assigned ones (remove/pull lever/vehicle) from DT. Your tweak for the feed/recover works at least. I've also turned off everything but multilevel view from PyLNP and added the rest to my personal config override as needed so I am sure autolabor/labormanager isn't enabled (in fact I just doublechecked from console). Anyway, the autohauler does seem to be getting the job done for now. 2-21 and farming2 is done, as well as our first lavish meal, and as usual I am catching the little bastards eating the PH. 3 of them gone, I caught 2 more running off with them. LeSigh! At least they don't eat the seeds. I think food-hauling needs to be made high priority. Can it be done?

Farming3 is done by 3-05. The miners are at 7 skill. They might just finish industry this season.

I had some fuckup where they started using the wrong blocks on the surface floor. I suspect because I turned off global planning momentarily to do some manual construction and it lost the settings for the floors? It always has been a bit flaky, but at least it works usually. So ripping out and redesignating I also somehow fucked up and deconstructed the masons workshops on the surface, and then there are blocks blocking me from rebuilding, and still job cancellation spam. Fucking aggravation. It isn't really setting us back any though. The miners aren't going to be done before the end of the season (it's usually about a week into next season anyway). Hopefully we get all the miasma vents sealed, if not surface3 done altogether.

So we made it into summer with only about 40 blocks left to dig out for industry2, not too shabby. Miners at skill 9. I don't really know if they extra 2 levels would have made a difference or not, but it's fine. There is still surface work to be finished anyway. Surface3 needs half the roof still, which would have been done if not for the above fuckup. Again not a big deal. Of job orders, surface3 is just finishing up, so only surface4 and services2 to do. 4-3 and industry is dug out. I ripped out 3 smelters and the pottery kiln so I could just pre-channel for magma. I was going to relocate the kilns up top right, but decided the complexity of stone distribution wasn't worth it, besides I may want more masons and probably jewelers up there. Also some wierdo may come along and want a kennel to train vermin pets, and that would be the last spot left. I can still get 3 more forges and another smelter into the bottom right quad without moving the kilns. I can live with that.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 21, 2021, 02:53:43 pm
I don't want to get in the way of your research, but here are some quick responses/reactions:

- I had put glassmaking with the smiths since at that time I really didn't understand how powerful glassmaking was. I'm all for moving it to a better-suited profession.
- Agree that "Unskilled" is a terrible name. +1 for any of your other suggestions
- I have civilian skills (like mechanics) on the soldiers since it is useful to set all squads to inactive right after a siege so they can help haul cages, reset traps, and dump prisoner equipment. Then I set them back to active and start "live training" on the caged invaders. I'm considering adding my "prisoner recycling" setup to dreamfort, but I wasn't sure if it was too me-specific. I have a caged prisoner quantum stockpile in my barracks that is also a pasture. After I strip the equipment from the prisoners, I just set them all to be assigned to the pasture that the cages are already sitting on top of. Haulers come and free the caged prisoners one by one, and as soon as they are freed, all my soldiers who are training in the barracks jump on them and body parts go a'flying.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 21, 2021, 03:42:52 pm
I don't want to get in the way of your research, but here are some quick responses/reactions:

- I had put glassmaking with the smiths since at that time I really didn't understand how powerful glassmaking was. I'm all for moving it to a better-suited profession.
- Agree that "Unskilled" is a terrible name. +1 for any of your other suggestions
- I have civilian skills (like mechanics) on the soldiers since it is useful to set all squads to inactive right after a siege so they can help haul cages, reset traps, and dump prisoner equipment. Then I set them back to active and start "live training" on the caged invaders. I'm considering adding my "prisoner recycling" setup to dreamfort, but I wasn't sure if it was too me-specific. I have a caged prisoner quantum stockpile in my barracks that is also a pasture. After I strip the equipment from the prisoners, I just set them all to be assigned to the pasture that the cages are already sitting on top of. Haulers come and free the caged prisoners one by one, and as soon as they are freed, all my soldiers who are training in the barracks jump on them and body parts go a'flying.

Will see how glassworking works out on the craftsdwarf. I am going to try to stick with this save longer to see how the professions age. In general I like diluting the craftsdwarf down, because unlike say metalsmithing where we want all masterwork items, for the disposable trade goods a lot of the crafts produce we really don't want masterwork (at least trading them away doesn't cause major sadness like it used to) Nobody wants a pile full of mastercrafted wax scepters and goose skull totems!

I think I'm leaning towards furnace operator. I can't find a decent 1 word synonym, at least not in English. Hmmm. Smelter?
smelter. / (ˈsmɛltə) / noun. a person engaged in smelting
The other thing I thought of was charcoaler. Maybe smelter/charcoaler, since they are both.
Interesting thing I just learned about the furnace operator, he actually makes plaster powder and pearlash not the potter, even though it is in the kiln.

I hadn't thought of deactivating the soldiers for cleanup, such a painfully obvious good idea now that you point it out!
No, I don't think the prisoner recycling is too specific, everyone needs that. I do more or less the same. I used to do a pitting thing but I forgot where it went (or possibly was broken in newer versions).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 21, 2021, 07:31:44 pm
Both miners now lvl 10 on 4-19. I started doing a little expansion south in industry, will put 3 magma forges there. The kilns will go to the right side vacant area, 2 each (realizing late game we may still want 2 kilns not for pottery but for producing pearlash and of course 2 glass kilns is better than 1) This lets us have 6 smelters in the core area along with 4 forges. Added a small QSP for the clay.

Starting surface4. I just watched an idiot herbalist run back and forth between the plants and cookable storage repeatedly dropping plants instead of dropping all relevant plants once. I forgot how much I hate herbalism. It's an "undocumented feature" of the "newer" (the classic plants are the underground plus a short list of surface plants) more highly fucking annoying realistic plants. So like sometimes we use the root like in a potato, other times the fruit like a tomato, then there's "head" plants like lettuce, stuff where we use multiple parts, and then there are parts we don't use for anything. This makes the poor herbalists job a fucking nightmare.

5/19 services (upper) dug out. lvl 11. Surface4 construction half done. Surface5 orders just started. 40 units of booze and 7 roasts left. Do they eat more often than they used to? This makes 3 meals for some of them. I mean it's a good thing if it has, I always felt it was trivial keeping the fortress fed.

5/24 migrants at last! 8 of them. Blacksmith 10, nice. Gem setter 6, Weaponcrafter 6, Bowyer 8/furnace 13 (I just love some of the pairings...), Mason 6. 2 with level 1 militia skills.
I've certainly seen worse.

Obvious smiths are obvious. So is mason. Bowyer is going to be hmmm....I need a smelter more than I need another outdoorsdwarf right now. And that high skill is very attractive. Everyone needs a moodable skill anyway. So he'll be smelter prof + bowyer labor. Oh yeah, another plus for smelter over laborer, labor/labors are specific terms in DF, can get confusing.

2 completely unskilled peasants, they'll be our new farmers. Mason/engraver/pump/beekeeper 1. Doesn't really cry out for anything. Maon/engraver are both stoneworker but they aren't a good pairing. I think another miner would be handy about now.

The last is the gemsetter 6, with smithing/siege engineer 1, potash 3. Again doesn't fit any current needs really. I don't need an unskilled mason right now, especially with 3 decent ones, and we're not going to do any gemsetting soon. He is also a passable axedwarf 1 (fighter/disc/armor/shield/etc and 78 str, rest of his attribs a bit meh) but then I am not anywhere near ready to start the militia. What to do with him then. I could use a cook if I don't give it to the farmers. Bookkeeper too. Yeah, I chef it is. If I still want him for a soldier later, it will be easy enough to replace him. Will make him manager too, organizer skills will make him a better soldier.

One of the farmers will be our leader and broker. The weaponsmith is a lvl surturer, I guess he's as good as anybody for CMD for now. 2nd wave we'll appoint a doctor, a nice bonus of dwarfvet is it gives the doctors extra practice since the dogs are always getting themselves tore up on wild animals.

3 water buffalo and 1 cow. Meat is back on the menu boys! No pets thankfully.

We've got 1 chef, 1 craftsdwarf, 2 farmers, 3 masons, 3 miners, 2 outdoorsdwarfs, 1 smelter, 2 smiths. Everything but clothier and doctor covered. So yeah, all in all this was really a good 1st wave.

It's time to orders import basic and also...
"quickfort run,orders library/dreamfort.csv -n /surface5   # Run when all marked trees on the surface are chopped down and walls and floors have been constructed, including the roof section over the future barracks." Would have been more concise to say after surface4 is completed :P

I really need to update those files. Have to fix mead, soap, etc by hand.

!!!***!!! prioritize CustomReaction !!!***!!!
guess who that be, I mean tan a hide is the only reaction missing from the entire friggin list...you can even prioritize beat a prisoner, I love it!

Goddamn I hate keas! First warning I get 1 made off with an item, like off the screen off. Next I get 1 in the "foyer" and the dogs are on it, I lock all the doors, the thing passes out and they lose interest. Fuck you! Exterminate this. I think I hate them more than anything in the game. They are like the carp of current versions. Just pure evil. Another just swooped down and tore the head off a gosling. Savage!

We just finished surface4 going into fall, gotta get that depot built now! It was dragging along and I finally had to prioritize it to get it done. There's just too much hauling to be done. Autobutcher is a fucking disaster! It butchered everything so fast that half the shit sat and rotted, even with me manually running do now when I could. The customreaction was a lifesaver at least for hides. Got the aquaduct dug too and gated, just finishing up smoothing and we can fill the cisterns. And this seems like a good time to go to bed.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 21, 2021, 11:05:48 pm
I've started implementing some of the changes we're discussing, though I'm holding off doing too much to the professions until you've formed some more solid opinions. You can pull the updated files from:

https://github.com/DFHack/dfhack/pull/1930

Startmanager - still deciding what to do with this guy, honestly until we have someone to actually do a job do we really need their workplace built? he will never do 90% of these labors. Probably just going to dump him.
If we can cut the number of professions down, I'm for it. The potential drawback here is that a workshop that is planned but not built ties up an item with TSK. In this case, the items are likely to be blocks and they're likely to be inside the surface starter mason's workshop. I wrote guidance (https://docs.google.com/spreadsheets/d/1vlxOuDOTsjsZ5W45Ri1kJKgp3waFo8r505LfZVg5wkU/edit#gid=1864520676) on how to "safely" decommission those workshops, but for players who don't read/heed the guidance, the longer we let TSK blocks stay in those workshops, the more likely it will be that the workshop will get deconstructed, the item will get scattered, and the unbuilt workshops will get canceled and disappear. This is a bad player experience, and is really the whole reason for the StartManager to exist.

Quote
Remove blocks from misc, no need to haul them an extra time.
this is probably useful for everyone. added.

Quote
I remove refuse-corpses from that pile; early surface vermin corpses not a concern.
Is this just for this embark, or would you always remove refuse/corpses from the cloth stockpile? I believe I added it at your request : ) I'm fine with removing it or keeping it. The corpse/refuse quantum stockpile on Farming gets set up so quickly anyway.

Quote
Since I was too lazy to pull the new files, I have to run orders 1 by 1. I actually prefer that anyway since it seems like otherwise construction bogs down and I run into hauling issues.
you mean with the "preloaded" orders? I actually thought these were quite minimal. what do you think we could improve here? Maybe move orders for /services2 later?

Quote
I like a bigger guard dog pasture, I delete the existing and make it 5x5, removing the 2 stairwell tiles.
The only reason I didn't do this by default is because I use those adjacent gate control levers during sieges *a lot* and clicking on them with the mouse is the fastest way to use them. if there's a dog on top of it, a click goes to 'view dog' instead of 'query lever'.

Quote
I'm really not sure about the autohauler and alchemy, although it at least isn't assigning the miners any hauling jobs, it did remove their assigned ones (remove/pull lever/vehicle) from DT.
I expect you probably don't want vehicle hauling labors on your miners. since "store item in vehicle" jobs get their priority boosted, your miners will constantly be abandoning their mining to go put things into minecarts.

Quote
I think food-hauling needs to be made high priority. Can it be done?
it probably *can* be done, I just need to find the time to dig into it. I believe I can get a reference to the item being hauled, and if the item is a food, I can likely deduce that it's a haul food labor. I might be able to use this same technique to identify tanning jobs. Then I just need to expose this feature in the prioritize script so it doesn't look like the hacky wart I expect it to be.

Quote
I suspect because I turned off global planning momentarily to do some manual construction and it lost the settings for the floors?
buildingplan shouldn't lose material settings if you just disable and re-enable planning for floors. It *will* lose its config if you quit and reload, though. I have it on my backlog to persist materials configs across reloads. It's relatively easy to do, if anyone reading this wants a starter project.

Quote
I was going to relocate the kilns up top right, but decided the complexity of stone distribution wasn't worth it, besides I may want more masons and probably jewelers up there. Also some wierdo may come along and want a kennel to train vermin pets, and that would be the last spot left.
eep. I just did some redesign to get another two craftsdwarf's workshops in the industry level, and I ended up moving the siege workshop to the upper right. Feedback on the new layout would be appreciated.

Quote
It's time to orders import basic and also...
"quickfort run,orders library/dreamfort.csv -n /surface5   # Run when all marked trees on the surface are chopped down and walls and floors have been constructed, including the roof section over the future barracks." Would have been more concise to say after surface4 is completed :P
I might be able to trim this down a bit, but it's important to call out the roof over the barracks. If /surface5 is run before that section is complete (and it's usually the last to be completed) then the barracks beds can't get placed. the blueprint won't fail, the beds just won't show up. It's an easy mistake to make.

Quote
!!!***!!! prioritize CustomReaction !!!***!!!
guess who that be, I mean tan a hide is the only reaction missing from the entire friggin list...you can even prioritize beat a prisoner, I love it!
I should run a fort with CustomReaction just always prioritized and see how that goes. Maybe using that sledgehammer to prioritize tanning jobs is good enough.

Quote
Autobutcher is a fucking disaster! It butchered everything so fast that half the shit sat and rotted, even with me manually running do now when I could.
I've been running into this as well. Maybe this problem will go away when I figure out how to prioritize hauling food. Otherwise, we could maybe shift building the butchery until later when there are more haulers.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 22, 2021, 07:28:00 am
I've started implementing some of the changes we're discussing, though I'm holding off doing too much to the professions until you've formed some more solid opinions. You can pull the updated files from:

https://github.com/DFHack/dfhack/pull/1930 (https://github.com/DFHack/dfhack/pull/1930)

I'm just having my coffee and I suck at multi-quote anyway, so hopefully this is intelligible.
Great! Downloaded the BP so I don't have to do it myself. I'm glad we could fit it. I think it looks nicer too.

Startmanager - still deciding what to do with this guy, honestly until we have someone to actually do a job do we really need their workplace built? he will never do 90% of these labors. Probably just going to dump him.
If we can cut the number of professions down, I'm for it. The potential drawback here is that a workshop that is planned but not built ties up an item with TSK. In this case, the items are likely to be blocks and they're likely to be inside the surface starter mason's workshop. I wrote guidance (https://docs.google.com/spreadsheets/d/1vlxOuDOTsjsZ5W45Ri1kJKgp3waFo8r505LfZVg5wkU/edit#gid=1864520676) on how to "safely" decommission those workshops, but for players who don't read/heed the guidance, the longer we let TSK blocks stay in those workshops, the more likely it will be that the workshop will get deconstructed, the item will get scattered, and the unbuilt workshops will get canceled and disappear. This is a bad player experience, and is really the whole reason for the StartManager to exist.

Good point. Even knowing all this I still run into self-inflicted task cancellations lol. Could probably trim him down a bit though. I'd likely still do it by hand (DT) but I can see the need for it for others.
Quote
I remove refuse-corpses from that pile; early surface vermin corpses not a concern.
Is this just for this embark, or would you always remove refuse/corpses from the cloth stockpile? I believe I added it at your request : ) I'm fine with removing it or keeping it. The corpse/refuse quantum stockpile on Farming gets set up so quickly anyway.
I did ask for it yes, just need the useful refuse products though, in case of surface butchering (which I am probably no longer doing). The main things on surface piles are getting stuff that will rot (food) if you yoink the wagon and/or create them (butcher, cook, fish, etc) and a stone pile with wheel barrows. Everything else can probably just sit where it is until you can get it underground. Granted if you let it sit out too long a winged demon from the deepest pit of hell kea will come fly away with it *shakes fist* It's a rage-quit inducing experience when that item is your anvil! (yes, this actually has happened to me)

Quote
Since I was too lazy to pull the new files, I have to run orders 1 by 1. I actually prefer that anyway since it seems like otherwise construction bogs down and I run into hauling issues.
you mean with the "preloaded" orders? I actually thought these were quite minimal. what do you think we could improve here? Maybe move orders for /services2 later?
Yes. No, services2 is fine where it is. I like to get the hospital started sooner rather than later, since it takes some time to stock. What I usually wind up doing if I queue all those orders (which I often do anyway) is add order conditions to each set tied to the last set (usually the blocks being done) so that stuff gets done in sequence, but that is a real PITA. Still I find a hard pause in between useful, so that some hauling gets caught up on. Especially since mason cancellation spam is a near constant thing until 2nd migrant wave for me (I force workshops to get from piles). I think just chaining them individually with their run command is probably best like "quickfort run,orders library/dreamfort.csv -n /services2" although possibly chaining the next one with the prior may work in some cases. Like surface2 orders won't get done before workshops are built, the blocks are redundant at that point and I remove them, but those 2 wheelbarrows are absolute top priority. Up to surface5 I may want the orders done before designation. surface6+ I don't (they are larger and more complex and tie up significant labor at that point).

Quote
I like a bigger guard dog pasture, I delete the existing and make it 5x5, removing the 2 stairwell tiles.
The only reason I didn't do this by default is because I use those adjacent gate control levers during sieges *a lot* and clicking on them with the mouse is the fastest way to use them. if there's a dog on top of it, a click goes to 'view dog' instead of 'query lever'.
Excellent point. I'll just go back to moving the puppers to the main pasture when they are born.

Quote
I'm really not sure about the autohauler and alchemy, although it at least isn't assigning the miners any hauling jobs, it did remove their assigned ones (remove/pull lever/vehicle) from DT.
I expect you probably don't want vehicle hauling labors on your miners. since "store item in vehicle" jobs get their priority boosted, your miners will constantly be abandoning their mining to go put things into minecarts.

Well, yeah. Probably don't want deconstruction either. I want those levers pulled though. I still don't know why alchemy isn't working, when I added the farmers, their hauling labors went poof too (I added alchemy to them as well...I removed furniture/items/stone/wood hauling, left everything else)

Quote
I think food-hauling needs to be made high priority. Can it be done?
it probably *can* be done, I just need to find the time to dig into it. I believe I can get a reference to the item being hauled, and if the item is a food, I can likely deduce that it's a haul food labor. I might be able to use this same technique to identify tanning jobs. Then I just need to expose this feature in the prioritize script so it doesn't look like the hacky wart I expect it to be.
Yeah, after perusing the prioritize list, I saw how the hauling is handled. Probably going to be a lot of work. Right now I am opening up the list frequently and looking for store in cookable food orders and manually prioritizing them just to try to get it done. Oh, also saw clean self in there, might be a good idea. Infection is forever in DF, and leading cause seems to be untreated minor wounds because the dipshits won't go to hospital to get them treated.

Quote
I suspect because I turned off global planning momentarily to do some manual construction and it lost the settings for the floors?
buildingplan shouldn't lose material settings if you just disable and re-enable planning for floors. It *will* lose its config if you quit and reload, though. I have it on my backlog to persist materials configs across reloads. It's relatively easy to do, if anyone reading this wants a starter project.
I am not really sure what happened with the build orders. I know about the non-persistence, but I don't think I reloaded at that point (It was a long day so I can't say for certain). I know I did specify walls, levers, trackstops, even the ramp. It is still possible I skipped the floors I guess.

Quote
I was going to relocate the kilns up top right, but decided the complexity of stone distribution wasn't worth it, besides I may want more masons and probably jewelers up there. Also some wierdo may come along and want a kennel to train vermin pets, and that would be the last spot left.
eep. I just did some redesign to get another two craftsdwarf's workshops in the industry level, and I ended up moving the siege workshop to the upper right. Feedback on the new layout would be appreciated.
Lemme look. Yes, that works. We can just as easily put more jewelers/masons on the now vacated west side. If the kennel ever became relevant there's probably a better place than industry for it anyway. Dunno why I didn't think of moving siege. Actually, I'd add 1 more next to the dyer as the catchall. Make next to the loom bone only. So we've got stone/wood/bone/everything else. I could see paper/bookmaking becoming busier late fort (the earlier bugs with libraries being a major reason I stopped playing for a bit...the endless pick things up and put them down cycle), and possibly more instrument making. This way they don't have to contend with ammo & pots for space.

Oh, also move the quicklime pile over there on that wall. It is made at the pottery kiln and it's used for parchment in the workshop(cardinal storage rule, inputs near workstation)
Can make the lye pile smaller. Also, I'm still bewildered by why "lye" works for me but not you. In my last fort the new orders actually screwed me over, because I have like 11 lye in a barrel and "lye-containing" only sees it as 1 of course. Being as a barrel probably holds 30 (we know it holds 30 booze) that is a real problem. I haven't done any parchment making yet but I imagine it will be plagued with the same issues.

Quote
It's time to orders import basic and also...
"quickfort run,orders library/dreamfort.csv -n /surface5   # Run when all marked trees on the surface are chopped down and walls and floors have been constructed, including the roof section over the future barracks." Would have been more concise to say after surface4 is completed :P
I might be able to trim this down a bit, but it's important to call out the roof over the barracks. If /surface5 is run before that section is complete (and it's usually the last to be completed) then the barracks beds can't get placed. the blueprint won't fail, the beds just won't show up. It's an easy mistake to make.
Lol, no the job itself is fine. I was poking fun at the description. Literally it would be easier and less open for interpretation to say finish the job before queing the next one. As you have it, I start looking around and then realize by the end of reading that it all needs to be done anyway.

Quote
!!!***!!! prioritize CustomReaction !!!***!!!
guess who that be, I mean tan a hide is the only reaction missing from the entire friggin list...you can even prioritize beat a prisoner, I love it!
I should run a fort with CustomReaction just always prioritized and see how that goes. Maybe using that sledgehammer to prioritize tanning jobs is good enough.
Considering I didn't lose any of the 7 hides although I did lose a lot of food, I'd say the customreaction is working well. I added it to my config.


Quote
Autobutcher is a fucking disaster! It butchered everything so fast that half the shit sat and rotted, even with me manually running do now when I could.
I've been running into this as well. Maybe this problem will go away when I figure out how to prioritize hauling food. Otherwise, we could maybe shift building the butchery until later when there are more haulers.
I think we have to suck up and deal with it. We still want to get to butchering before 1st caravan or we are in danger of running out of meals. It was the timing for me; I got 5 large animals plus the 2 I already had. That is a ton of meat. It's also not the typical 1st or 2nd migration wave. Cookie was also busy updating stockpile records or likely would have flowed into kitchen better. In hindsight I should have temporarily disabled autobutcher and probably bookkeeping as well. They just came off migrant status when all this happened.

Oh, here https://drive.google.com/file/d/16Vk5CiORfck88wMLr-O4fQdOAf4zrLeu/view?usp=sharing (https://drive.google.com/file/d/16Vk5CiORfck88wMLr-O4fQdOAf4zrLeu/view?usp=sharing) are my current professions in DT export form.

Also, I am having issues with trees. I designate a tree to be chopped, at pri 1 and they ignore it, I know because I keep getting cancellations on beds. Sometimes they just need to be forced by turning off all their other labors. I've been using the autochop plugin for some time without incident so I don't think it is that. I want to blame herbalism, which is when I started having the trouble. Granted the 2 of them are very busy, mechanisms and spiked balls right now.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 22, 2021, 09:30:32 am
So back to it. 7-19. Caravan has arrived. Depot was done the first few days of the season so we are golden. No liason, which is odd. He has come on this embark before, although I did a fresh gen of the map as opposed to restoring a backup. It happens. He'll probably show next year. Is annoying since I can't ask for things.

We got what meat we could out of the butcher, honestly didn't lose too much, mostly organ meat but at least no big stacks of generic meat. Bridges are built, surface5 is done except we are backlogged on mechanisms. The aquaduct almost all smoothed and at least I had the foresight to get the levers done and linked for it already so we will have water soon. I went with a bridge seal and a wall grate behind it to keep fish out, it's linked to a lever for emergency access. Smoothing is a real time waster this early on but it has to be done before adding water. On the other hand there is already so much unhauled stone lying around anyway. We'll get the top and right rooms of the guildhall dug before we turn on water (what's under cisterns), otherwise the cancellation spam will annoy the fuck out of us. Might be a good suggestion to add about digging that out first, maybe even bump their dig priority to 3 in the plans (the stairs 6 above will still preserve level integrity).

Replaced our apartment dig designations. I like this look much better, the 2 tile wide corridors transition much better from the 3 wide. I think this is really good.

I remember why I abandoned this embark, the lava may be shallow but the flux is deep. Marble below 2nd cavern is our only source. We have to dig a quarry. I'll have to buy steel items and melt them to get our first steel minecarts and anvils. Parts for 2 glass pumps are made. I use the pump and dump method. We'll dump the steel minecart into lower pump output, run lower pump a second, then run upper pump to pump the lava out. Cart is hauled and dumped into the channel, rinse and repeat. 3 trips per smelter/forge but never having to worry about fuel is so worth it.

Actually the caravan brought us 4 steel anvils, how nice. We'll melt down 2 for the steel for our minecart and we can use the other 2 until we can make more. Otherwise there is a crossbow ,buckler and xbow bolts, we'd have to melt just 5 bolts. Maybe we'll do that instead. I think I have to trade for the bolts 1 by 1 though, which is going to be too much hassle. The rest of their steel stuff is too expensive to trade for right now. Ahh! Actually they have a bunch of nickel cages, cheap and magma-proof. 1 cage is 1 bar. We'll use them for a minecart and save our steel.

They actually brought us 2 bins of leather for a change. This along with what we have should tide us over until the geese start maturing (provided the kea don't murder them all). We "seem very happy about the trading" after that so we'll need to do some more trading to bring them to ecstatic! Ecstatic means larger hordes of freeloading cheesemakersmigrant waves and more useless crap goods. There's no books :( I usually like to start buying whatever written works I can so that when we establish our outhouselibrary there is some TPreading material. We'll grab some fruits and veggies to give our surface crops (and booze) some more variety. Definitely any cheap bags, full or empty. Can always use more bags. Fill out with some odds and ends like metal bars and cloth and then send them on their way. That only took 15 spiked wood balls. Not bad. I started crafting 25 sometime last season, but we came into this one with only like 10 ready. Obviously you need to get the construction stuff done first, but it's good to queue these up right after. They can be started in the fall and completed before the caravan leaves if you clear the carpenters other work.

Queueing up order surface6. So is there any real reason to wait until the bridges are linked? Oh, right, the traps. We want the bridges linked before we start building traps. We wait. Possibly I should have made the carpenter a mechanic as well, and let them both practice mechanics/carpentry. Maybe even not put points into herbalism. Mech 5/Carpenter 3 for both (I still like discipline and swimming on the miners and outdoorsdwarfs). Or maybe just 1 and the other Carp5/Mech3. Mech4/Carp4. I dunno. The shortage of haulers and labor in general early game is just not really something you can do anything about, other than making sure non-essential jobs aren't getting queued.

I remove metal furniture from the goods feeder and add it to the ore feeder; metal furniture is heavy and we want it picked up by wheel barrow. Actually most furniture in general is. We probably want to do some tweaking on this. Possibly split a strip off the goods feeder and assign 2 wheel barrows.

So juggling workshops around, I think even better would be move the bowyer up next to the wood/carpentry craftshop, put the misc craftsdwarf shop where the bowyer was (it is more central to cloth and metal piles)
Spoiler (click to show/hide)
Copy paste messed it up a bit, but you get the gist. I wouldn't place all those extra forges and kilns of course, but they're just there to show where I was going with it right now. They'll be glorious magma of course! Shifted the dye maker next to the loom too, and then we could even get 1 more craftsdwarf down below if we felt the need. And the jewelers, lol I can't stop myself. 3rd mason up top there, stone being heavier than gems. We could squeeze 2 more masons in if we really wanted, and I'd probably do a QSP encrusting pile of some sort by the jewelers. That's the reason for 2 shops, 1 for cutting, 1 for encrust. I've used a bastardized version of https://www.reddit.com/r/dwarffortress/comments/2n9p3u/mechanixms_guide_to_better_stockpiling_part_3/ (https://www.reddit.com/r/dwarffortress/comments/2n9p3u/mechanixms_guide_to_better_stockpiling_part_3/) in the past.

8-12 our 2nd wave has arrived. 8 and 2 reindeer calves (non-pet). So glad to not get pets, I really resent not being able to get rid of them being as FPS death is a thing. Although cavys have been known to spontaneously teleport into volcanos...No one impressive as a soldier, but then we're not ready still, and probably not even until 4th wave. woodcrafter 6, craftsdwarf. glassmaker 10 (FFS! always, always, always if I bring a glassmaker on embark I get a high-legendary skilled one without fail)/armor 1/fishing 3...lol...craftsdwarf. 10 bow/1 suture, not sure, he's lvl 1 axedwarf too...maybe he will be our 3rd outdoorsdwarf (can finally get those 2 fucking trees cut down). bone carver 6/glass 1/mechanic 1, craftsdwarf. That gives us 4 now. Completely unskilled but very weak...while I really need another laborer the 10 str, another farmer wouldn't hurt either...farmer. carpenter 6/bowyer 6/wood cutter 6, what is it elfday? this is the type of dorf that gives me a boner, all the skills in 1 profession group, smith 1 and strand extractor 5 too...obvious outdoorsdwarf #3. Ugh 16 str, well he will toughen up. I guess our 2nd useless fucktard bowyer will be a laborer. The 2 of them can chat about crossbows while they make soap :P Gem setter 1/butcher 1 probably laborer. Wood cutter 6...LeSigh...too much of a good thing. I think laborer too. We still need a dr and clothier. /me facepalm...I think we'll make the bowyer 10/suturer 1 the dr because I'm sure there will be injuries before the 3rd wave. Winter is coming! Not great, but not horrible. It would have been nice to get a clothier and maybe another smith but I can work with this.

And my laborer lost all it's skills. Odd. I'm seeing the custom profs lose their icon (I assigned them icons) but this is the first time I noticed skills gone. I'm waffling on the dr or another laborer. We're going to ramp metal production up real soon. Actually we're going to make that woodcrafter a Dr. I'm likely to get a steady stream of craftsdwarfs and we don't want every Tom, Dick and Urist being a craftsdwarf, only the 4 best. Elfcrafter mostly going to be making wood bolts for training and nothing else anyway. If she wasn't so weak I'd make her a miner, artifact stone furniture would be better than an artifact wood trinket. So the former dr bowyer will become smelter or miner. We need more of both right now. Smelter. We're going to make the woodcutter a miner though. Annnndddd, I think we'll make the bone carver a smelter for the same reason as the wood cutter; we really only care about bone bolts.

I think it's better to make these kinds of "sacrifices" and try as hard as possible to keep dwarves in their assigned profession. If we made them craftsdwarves and then switched them out next migrant wave, the skills they started developing only to abandon for another profession have denied the other 2 the chance of becoming more skilled and well-rounded in their profession, and given us more low quality crap valuable trade goods to get rid of.

1 Chef, 2 Craftsdwarf, 1 Doctor, 3 Farmer, 3 Mason, 4 Miner, 3 Outdoorsdwarf, 4 Laborer, 2 Smith. I'm satisfied with this.

8-14 we've breached the magma, without losing any limbs, always a plus. Marble quarry being dug out now. I've already quarried quite a bit of iron (and platinum too) while I was digging aquaducts. Pumps are being built, nickel minecart ready, channels dug and trackstops built. We are ready for magma and steel!

LMFAO! We've had our first idiot in a long while go swimming in the river. Urist McDumbass cancels install colony in hive: dangerous terrain. I find him bobbing around. I'm going to watch him for a bit to see if he recovers on his own before I teleport him out. Of course it is the new guy, and he didn't have swimming skill, but he is learning fast...hmmm...I think we are finally going to drop it from the embark profile. Discipline too for all the good it is anymore. I think it's actually broken, or maybe personality has more effect now. Some civilians don't give a fuck and they will go fisticuffs to the death, others run at first sight, doesn't seem to matter if they have discipline or not. And he got out; the river is shallow where it exits the map, on the other side. Let's see if he can get back.

8-22 and finally running surface6. The extra mechanics to do the linking while the main one keeps making mechanisms really paid off, otherwise we'd still be waiting. I'll be a lot happier to have surface defenses done. Especially before the dead of winter arrive, because I'm sure there will be necromancers.

9-15 First miner hit legendary, 2nd is not far behind. Filling the first smelter up. Walls are going up nicely. Queue orders for surface7.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 22, 2021, 05:14:02 pm
I love the playlog! I'm tweaking things as I read through.

I've made progress (that is, I've succeeded) in prioritizing just food-related StoreItemInStockpile jobs. As a by-product, I've identified a bug in the DFHack hauler_type enum value definitions. The enum was defined more than 9 years ago, so it's likely that the values have changed over the years. PR here (https://github.com/DFHack/df-structures/pull/435).

I haven't finished testing the new prioritize script, but I put it up here (https://github.com/DFHack/scripts/pull/327) if you'd like to give it a try. The command to run would be:

prioritize -a --hauler-type=Food StoreItemInStockpile

but since the enum values are incorrect, the command is currently:

prioritize -a --hauler-type=Bin StoreItemInStockpile

Once the fix is made to df-structures, hauler-type will be "Food" as expected.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 22, 2021, 05:33:10 pm
I love the playlog! I'm tweaking things as I read through.

I've made progress (that is, I've succeeded) in prioritizing just food-related StoreItemInStockpile jobs. As a by-product, I've identified a bug in the DFHack hauler_type enum value definitions. The enum was defined more than 9 years ago, so it's likely that the values have changed over the years. PR here (https://github.com/DFHack/df-structures/pull/435).

I haven't finished testing the new prioritize script, but I put it up here (https://github.com/DFHack/scripts/pull/327) if you'd like to give it a try. The command to run would be:

prioritize -a --hauler-type=Food StoreItemInStockpile

but since the enum values are incorrect, the command is currently:

prioritize -a --hauler-type=Bin StoreItemInStockpile

Once the fix is made to df-structures, hauler-type will be "Food" as expected.

Glad you're finding it useful!
Sweet! I'm testing it out now, it just prioritized 3 jobs, so so far so good. I hope that foul word (bin) is just the description lol

I also imported the new orders and whatever settings I hadn't already. Finally grabbed the PR for the orders so I don't have to futz with the mead and soap orders anymore.
More bags is good for sure. The furnace tweaks seem sensible too. I have to look at the rest.

So my current lack of a clothier is a good argument against putting tanner on them. It's a low priority profession until clothes start wearing out and/or we need leather goods for militia. Tanning on the other hand is going to be done sooner rather than later since it's not sensible to delay butchering. Wtih the prioritization tweak it is working well on the farmers, even as busy as they are with just 2-3 of them.

I still don't know WTF is wrong with tree-chopping, they still would rather do anything else right now.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 22, 2021, 07:37:11 pm
Winter. Was hoping to have our 1st magma smelter done before now, but waiting on track stop removal.
It has been very slow and painful filling, there's just too much going on in the fortress still. I should probably make a couple more carts to speed this along, but I tore out all the smelters and forges so I'll have to get the 1st magma forge up and running, but then will need time to melt the rest of the cages down anyway.
The manager needs a kick in the arse too, he isn't keeping up on validating orders. Dunno WTF he is doing. He isn't THAT busy with cooking, which is why I made him the manager/bookkeeper.

Surface6, about a dozen traps left to build. 1/3 of the blocks for surface7 are done, I guess it's time to run it. Even with whatever screw-ups, we're still right on schedule for 3rd wave. Although we're not in the greatest shape for a siege, we can hole up at least but not enough cage traps are loaded to win it.

Goblets need to be removed from the goods feeder. It's best to let them get left lying around in the booze piles and/or stored in tavern chests, otherwise a lot of drink job cancellation spam happens from mugs being scooped up. I also tend to trade out the non-masterwork ones and it creates a constant tug-o-war.

No one coming to remove the track stop despite "do now" is irritating me. Like if I had a hammerer someone would be getting the shit beat out of them irritated. I guess it doesn't matter, everyone is at least doing construction, sooner surface is done, sooner we can relax and focus on things like magma. I toggled the manager again in the nobles screen and he started working again (manage work orders is an actual job in the job list, but it wasn't showing up). Think I'll toggle wood cutter assignments while I'm at it and see if that fixes them.

10-8 First magma smelter built. 2nd miner made legendary. Manager got 5 levels from validating basic orders re-import. He's also level 4 record keeper, reminds me I should probably kick bookkeeper too.

So I turned off autohauler, set everyone back to full manual. Except the miners (lever) and the farmers (lever, food). Then I turned it off for the outdoorsmen, they still won't cut the trees. I undesignated all tree-cutting, turned off auto-chop, re-designated the ones I want done. They still won't cut the fucking trees. They are also annoying the fuck out of me now spamming unable to install colony in hive pathing issue. To fucking where I don't know. 11-5, someone finally cutting a fucking tree. 1 of the others seems stuck on gathering plant stupidity, yeah, fuck herbalism! It's a broken piece of shit still.

11-8 One of the miners mooded, at least it was a low-skill new one instead of the already legendary. I mean god forbid my weaponcrafter could mood for a change.
11-13 Magma forge completed. Getting the rest done will go slightly faster with 3 carts (or at least it will feel like it, less micro) In other news our miner made an artifact millstone...joy :P
I toggled all the hives and they started behaving again. Always something with this game. We got the trees cut so turned hauling back on, and herbalism for now, although we are done hand-designating plants. I'll leave the zones in the pasture and farming (I always create a zone for the entire farm level, for gathering once caves breached and usually sand collection). Herbalism on underground plants never seems to cause an issue at least. It's good to zone any controlled cavern areas as well as exposed soil levels you create. On deep soil embarks I like to create my own underground tree farms and pastures. Might as well import furnace orders now, will have new glassworks up soon too.

12-3 Slow but steady. Construction being done. Fucking hauling magma still slow as shit. I have never had this much trouble. I tried semi-automating part of it even, where they move the carts to piles with wheel barrows, all the construction going on is killing me though. We might as well run farming4 now, we've got lots of potash. Queing up guildhall orders too. Get some of this crap out of the way. Get some smoothing done too. We've got all the way through suites dug, and half a bedroom level (out of 2 designated, we're down to the top of cavern1 so we'll have to work out a plan for the rest).

It appears you can't dump items out of a workshop. They just sit there. So much time wasted. Going to fill the first glassworks the rest of the way (was at 2) with liquids and then next stop will be 1 shot with 3 minecarts whenever the fuckers get around to it. Really tired of this shit and it's about bedtime. Want to finish the year out.

So the year ended without any major mishaps. Surface7 construction still ongoing but at least all the blocks are done. Farming4 doors all built. Guildhall doors up next. We'll have a magma kiln in soon, so at least all services restored. We'll get suites queued up next since 3rd migrant wave will turn leader into mayor and I don't want to hear the bitching. Dorm rooms are actually fine for a while for the rest.

Status
(https://i.ibb.co/MZzFTMJ/1051.png) (https://ibb.co/xXnxvJr)
DT
(https://i.ibb.co/zbfjm57/1051-DT.png) (https://ibb.co/P4C3rY9)
Aaack! Didn't realize the stupid tooltip popped up. Anyway, nothing to see under there I swear. These are not the dwarves you're looking for.

So yeah, lessons learned. We're going to ditch herbalism, swimming and discipline across the board and have 2 mechanic/carpenter 5, miners will be miner/engraver 5, masons already mason/architect 5. Stonecrafter....I'm not sure anymore, the cook might be useful because it is a bit slow, and good cook migrants do seem rare. Considering we made only 2 pumps so far glassworking didn't really get a lot of bang for the buck. The 3 farmers can barely keep up still, which is odd because I've had it better under control with 1 starter plus an unskilled helper out of migrant wave. They are getting there though. So still debating stonecrafter/glass or stonecraft/cook (and let him be chef w/stonecrafter as opposed to craftsdwarf). Another possibility is stonecraft/grower (so farmer w/stonecrafter). Which would let us get the butchering/tanning/brewing out of the way. We could do grower/cook too....My skills recommendations are coming closer to yours. Of course if I don't bring a glassmaker I won't get one lol.

It was probably too ambitious to start the magma so early. It didn't set us back anything really, other than me being aggravated beyond belief in addition to all the other aggravation going on. So yeah, surface7 done before we worry about other stuff too much.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 23, 2021, 02:03:08 am
Quote
What I usually wind up doing if I queue all those orders (which I often do anyway) is add order conditions to each set tied to the last set (usually the blocks being done) so that stuff gets done in sequence, but that is a real PITA.
the technique I've been using is to set the mason workshop to only accept 2 orders at a time (down from the default of 5). This makes them focus on the blocks and other "long tail" orders more without having to do too much manual poking.

Quote
Oh, also saw clean self in there, might be a good idea.
added.

Quote
Actually, I'd add 1 more next to the dyer as the catchall.
done.

Quote
Oh, also move the quicklime pile over there on that wall.
That pile is milk of lime, not quicklime. Quicklime is stored in bags in the furniture stockpile, and I'm not sure we can separate them out easily.

Quote
Also, I'm still bewildered by why "lye" works for me but not you. In my last fort the new orders actually screwed me over, because I have like 11 lye in a barrel and "lye-containing" only sees it as 1 of course. Being as a barrel probably holds 30 (we know it holds 30 booze) that is a real problem.
"lye" works fine as a stop condition. I was using "lye-containing" as an assurance against potential cancellation spam (all lye in one barrel means that if it gets hauled back from the shop while the next job is starting, it's not available for the job and the job gets canceled). In my first tests, it looked like each barrel could only hold 7 lye, and I thought 3*7 = 21 wasn't so bad. My current fort shows a barrel with -- let me double check this -- *98* units of lye! I have about 200 units in those three barrels together. That's..too much.

Now I know you're very conscious of cancellation spam, and if one barrel isn't causing trouble for you, I'm probably being too pedantic about this theoretical issue. I'll adjust the orders to count lye instead of lye-containing.

Quote
maybe even bump [the guildhall sections under the cisterns] dig priority to 3 in the plans (the stairs 6 above will still preserve level integrity).
good idea. done.

Quote
I use the pump and dump method.
I'm going to give this a try. I've been growing frustrated with 100+ z-level magma pump stacks. They're finicky to build. One out of order and a whole section of the stack can deconstruct, leaving parts in inaccessible tiles. They also take a lot of power. I've built windmill farms on the roof of the surface fort and routed power down through the pasture. This last fort I built 10 dwarven water reactors. They certainly look cool, but they take forever to set up.

I didn't see a wiki article on the pump and dump method. Is there a writeup on this somewhere? Can it be automated?

Quote
So juggling workshops around, I think even better would be move the bowyer up next to the wood/carpentry craftshop, put the misc craftsdwarf shop where the bowyer was (it is more central to cloth and metal piles)
done. I also swapped the wood craftsdwarf's workshop with the soaper's so the craftsdwarf's workshop is in the "main" cluster.

Quote
Goblets need to be removed from the goods feeder.
you know, I've been doing this manually every game and I didn't think about adding it to the blueprint for some reason. done. but this required a new alias to be added to aliases-common.txt, so be sure to pull that from the PR (https://github.com/DFHack/dfhack/pull/1930) if you use the updated blueprints.

My changes to the prioritize script need retooling. I was using the wrong enum for interpreting the hauling type -- that's why "Food" mapped to "Bin". Unfortunately it's not as easy as a name replace. There's more logic that needs to be updated to get it to work with the correct enum. The version you have will work fine if you keep calling it "Bin", but I'll post here when the script is working with the correct names.

edit: new script with correct enum and where Food means Food is up (https://github.com/DFHack/scripts/pull/327)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 23, 2021, 06:37:52 am
You forgot "prioritize -a CustomReaction" I'll put it in my override for now.

Sounds good on the masons, a lot less work than what I do.

Sorry, yeah, I meant milk of lime. Quicklime being the input for that and used at the ashery it is in the right place.
Both stockpiles should be 1 tile. Having not made parchment I can only guess, but I imagine it is going to work the same as making soap and have more or less the same caveats as lye.

Actually, I just made up pump and dump (outside of it's traditional slang meaning) although it is pretty accurate.
http://dwarffortresswiki.org/index.php/DF2014:Magma#Minecarts Design 3: Minimalist magma moving. Don't bother with a magmaproof wheel barrow since there is no way to specify wheel barrow to pile I know of, just make a few extra wood (they will wear out). You need to make a stop next to each channel, obviously only add 1 to hauling route at a time. Don't fill them past 6 (since it's 2 per cartload). One of the other methods could probably be automated, but considering it is a 1 time operation I wouldn't bother. I make a pump stack for obsidian farm, but I hear ya, getting them built and powered is a pain.

Dreamfort specific the ore/clay feeder will get the empty minecarts (or was that my edit for metal furniture?). I set the pile next to the dump zone (don't forget to disable the services level dump for the time being) to take from the QSP.  So it goes: Dump cart & pump magma, once cart is filled pump magma out & unforbid cart, when cart gets hauled up reassign to hauling route, magma gets dumped/unassign, it will go back to feeder. Obviously the whole process requires babysitting at every step of the way, otherwise the pumpers will never stop pumping and the full carts will just wind up at the lower stockpile. It's tedious AF, but once it's done you don't ever have to worry about it again.

Read the discussion about the hauling. Glad you got it figured out. Grabbing the PR and script.

Updated jobs, good thing too, I have a barrel of 23 lye currently! Farming done. Placing guildhall doors & statues. Queue suites orders. Built pottery kiln. Still trying to get the other 2 minecarts out of the forge, along with some bronze weapons. I keep prioritizing the hauling jobs to those 2 piles but those items still not shown up. Maybe because there is so much stone to haul and a lot of bars too. Going to set the miners to smoothing/engraving suites in prep for building, that'll give it time to catchup.

1/23 I got tired of them dicking around with the roof so I prioritized construction jobs and it's done. Now we can focus on magma if I can get the damn carts.
Random thought, hatches on the down stairs on each level for containment. They actually can't be broken by building destroyers on the level below them.

2/1 Has brought us 21 migrants! Now we're getting somewhere. I'm not going to enumerate all of them, just the highlights and summary. Wound dresser/suturer 10 will be our doctor and the old doctor (who never saw any action or skilled) will become something else. Gem cutter/setter 8, the mason pool is full (and then some, got 2 more highly skilled masons) but I can't see wasting this guy, I kept the jeweler profession and will use it I guess, considering it seems I always get lots of jeweler migrants but they don't usually have masonry skills. I'll remove it from the masons and just assign a couple jewelers. More blacksmiths but no armorer/metalsmith and still just the 1 weaponsmith, good thing we are cross-training, it's going to be a slow road to masterwork gear. Some low-skill leatherworkers and full range clothier (1/1/1). The leatherworks will be our tailors, the other guy going to militia. An 8 grower is a nice addition to farmers. Some low level miners, etc. Nothing really exciting but enough to fill out most of our professions. They brought us a couple llamas, bunny, horse, reindeer, duck pet and kitten pet (at least he is male)

Decided 7 of them would make good soldiers based on their stats/lack of other skills. Unfortunately most of them are female. Even worse the pick of the litter (93/43/73/59/60/47 those are pretty awesome raw stats) dreams of raising a family. Which means she'll have baby meatshields for sure. I'm going to live dangerously and make her militia commander lol! 5 melee, 2 archer. That'll be a decent starting militia. The kea will pay now!

So our new count: 1 Chef, 4 Craftsdwarf, 1 Doctor, 4 Farmer, 1 Jeweler, 6 Laborer, 2 Marksdwarf, 4 Mason, 5 Meleedwarf, 7 Miner, 3 Outdoorsdwarf, 4 Smith, 2 Tailor.

Happy to report the new food hauling priority is working.
Oh, something I keep forgetting to mention, and maybe I'm the only one who runs combine-plants/combine-drinks constantly. Actually starting to think combine-plants not so smart, more jobs means more skill gains. Combine-drinks otoh, is priceless. It would be great if it could run on booze piles automagicaly.  I set "local max = 60" (from 30) in my file since we use pots. Granted it will put 60 in a barrel as well (which doesn't cause any ill effects) but the script is  too complicated for me to figure out how to distinguish barrels from pots.

Importing military and smelting orders. Replacing leather shield with wood. And of course "wood" is not a selectable trait. The crossbows I specify willow. Shields...well round lime seems like a common enough local wood here (I don't care about weight, all wooden shields are 1u IIRC anyway)

Found the secret sauce to get the minecarts out of the forge quickly; assign them to hauling.

FFS, overlooked one of the leatherworkers being a higher level mason, and guess who moods. I fucking hate this game. Always the useless twats are the first to mood. It's 3-9 or I would savescum I'm that annoyed over it.

Suites furniture done. Going to hold off on installing, need to do more smoothing before I let them engrave because of all the noobs. I wish there were a way to restrict engraving to higher skill levels.
Might as well start queueing up for apartments. Season is going to finish out pretty uneventfully I think. I'll be lucky to get 1 more smelter done.

Keas in cages. That'll learn'em. Bastards made off with a mastercrafted willow minecart from trade depot QSP, probably last season, I just noticed all the totems piling up. Soon we'll have marksdorfs to shoot them from the skies. We got an artifact hatch cover, at least that's useful, we'll put it on the roof.

Really gotta keep empty cages around, the fucking cancellation spam trying to reload trap w/o a cage. FFS shutup already! Should probably add that into basic.

1 more smelter done as the season ends. The stockpiles really aren't working out. I have done this before but I guess not with all the contention for labor going on. Leaving the stockpiles out gets it done faster, even though they have to carry them w/o wheel barrows it isn't horrendously slow, and we're not going that deep. It's also not like the old days, where they would suffer burns carrying it w/o a wheel barrow.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 23, 2021, 01:25:42 pm
So other than a major mishap dumping magma it has been a quiet spring.
Someone must have dropped something into a channel and I didn't see it, because I had cleaned and smoothed them before setting up trackstops.
If an object is destroyed by lava it will cause an explosion and kill anyone nearby. This is what happened when the cart went to this trackstop.
Completely unacceptable. If it was my fault it would have been 1 thing, and I would just roll with it (even though it was my prize future militiadwarf) , but I know it was clear when I designated it. full-heal -r to the rescue.

Otherwise spring has been fairly uneventful. Usual lack of stone spam. We aren't getting anywhere on the apt furniture, I may suspend it since I'd like to get services3 rolling and I'm using different material for it. Suites are smoothed. I still want them to get some more experience before letting them engrave so I can place the furniture.
4-26 the first of our goslings have matured. We'll start geting a steady flow of meat, hides and bone now. New dogs to train should be close behind.
Everyone's just slowly building their skills and cranking out items.

5-12 Forgotten beast in cav1. That's a first in a long time, I was just wondering if they were a thing still. I remember the days of forgotten beasts and titans (water titans the best, so scary, but you hit them and they pop like a water balloon). Hopefully he's not magma-proof or a building destroyer (the drainage pump is vulnerable to climber/flyers in theory...but it can also spray magma)

And now 2 of the minecarts are stuck with some unknown task on them. FFS! This fucking game! /facepalm
At least we've got 4 smelters, 2 forges, 1 each kiln...still to fill and build 2 smelters, 2 forges, 1 each kiln.
Slowly but surely.

6-1 The FB is having a grand old time rampaging through cavern1, but he can't get to us which is good. Started suites build. Smoothing apartments. Still waiting on furniture for apartments and service. About to get another smelter down.

6-3 Migrants. 8 + 2 children (who I think will become militia when they growup, but are haulers for now). 10 tailor. 13 engraver.  Nobody really exceptional otherwise. 13 stonecrafter but we don't need another crafter.

Chef 2, Craftsdwarf 4, Doctor 2, Farmer 5, Jeweler 1, Hauler 2 (yeah, I exploit child labor), Laborer 9, Marksdwarf 2, Mason 4, Meleedwarf 5, Miner 8, Outdoorsdwarf 3, Smith 4, Tailor 3 and 1 baby lol (we had a birth, I dunno last season maybe...one of the smiths). I'd like to activate the militia, but I don't really want to lose 8 haulers right now. Maybe when the magma is all done. The mystery tasked carts seem to be able to be manipulated at least. I've tried forbidding them, dumping them, etc. I even restarted the game. It's just wierd. If I autodump them on the track stop they will dump their contents. If I dump them in the fill, they will get lava. Maybe I'll delete the useless lower pile. That didn't work either. I'm not amused. At least 1 cart works properly. Hopefully I can smelt the others down or something.

Our new doctor was elected mayor. Interesting our old doctor at some point remembered he is suturing and wound dressing 10 (he had 0 skills when assigned) I been seeing a lot of this "remembered" skills lately, I think it is a new(er) thing. I made the 2nd chef bookkeeper, so the original is just manager now (legendary at that).

Awesome! Now all 3 carts are fucked up. I'm done. Cheating the rest of the magma in.
Giant bat was fucking the FB up, but then webbed, head bitten off and poisoned to boot. Very dead bat.

Here is our forge extension:
Spoiler (click to show/hide)

We made it til fall. Again no major incidents. FB is still rampaging through the caverns. I've designed a fortified entrance for the caverns, although I don't think I'm going to breach until that thing is gone, or at least I have squads ready.

Still facing stone shortages, so finishing up services (mostly tables & chairs) & suites (just some doors) before we throw down apartments, although I guess I could place the beds. Turning autohauler back on too since we're out of the magma nightmare.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 23, 2021, 10:09:53 pm
7-12 Caravan arrives. No liaison again. I got a bad feeling about this.

Our FB died, I'm not really sure when, sometime between now (8-2) and the caravan arrival.
I guess all the little injuries finally overwhelmed it, last thing I saw it fighting was a magma crab, which it killed.
Hmmm...little guy spit magma at him before it ripped it to shreds. The FB actually bled out on it, a bunch of ash around the vicinity.
I think he got a good 30 kills or so though (I have them wiped seasonally, only 5 for this season)

Noticing a lot of fuckery with the orders this run. Manager not working again. Other things not getting queued (like the jobs just don't ever show up in the list). Felling trees seems to be back to normal again at least. I am turning autohauler back off, I just don't trust it.

We got 2 bins of leather out of the caravan again, and then just traded for some aluminum bars and crap to make them leave happy. Had to queue up some spiked balls quick, other than that I just had some of the cheaper quality misc shit I wanted to start getting rid of, and the usual trade goods (totems and wax crap).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 24, 2021, 01:51:09 am
You forgot "prioritize -a CustomReaction" I'll put it in my override for now.
This was intentional, for now at least. I want to run a few tests to see what else gets lumped in. I added some help text to the prioritize script to explain why prioritizing CustomReaction might be a good idea, and what the caveats are.

Quote
[lye and milk of lime] stockpiles should be 1 tile.
Is this to save on the unused pot? How about if I just set the number of pots on that stockpile to 2? That has the nice side effect of creating manager orders for a few more pots when quickfort orders is run on /industry2.

Quote
http://dwarffortresswiki.org/index.php/DF2014:Magma#Minecarts Design 3: Minimalist magma moving.
Nice. I'll give this a try on my next runthrough.

Quote
Random thought, hatches on the down stairs on each level for containment. They actually can't be broken by building destroyers on the level below them.
I had that in one of my early versions, but I thought the hatch covers clogged up the early game too much. We could potentially work it into a later stage, though.

Quote
Happy to report the new food hauling priority is working.
Yay! I'm looking forward to seeing this in action.

Quote
Combine-drinks otoh, is priceless. It would be great if it could run on booze piles automagicaly.
I don't see why this can't be done. Iterate through all stockpiles and combine. Maybe file a feature request? This would be a good starter project for some aspiring new contributor.

Quote
Should probably add [cages] into basic.
I'm going to have to test this. What happens when a low-volume repeating order for an item is at a higher priority than a one-time high-volume order? Will they get in the way of each other? My fear is that the low-volume cage order in basic would take precedence, create all needed cages one per day, and then deactivate, allowing the high-volume order for 40 cages to make...40 unneeded cages. Like I said, need to test to see what actually happens.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 24, 2021, 06:38:49 am
You forgot "prioritize -a CustomReaction" I'll put it in my override for now.
This was intentional, for now at least. I want to run a few tests to see what else gets lumped in. I added some help text to the prioritize script to explain why prioritizing CustomReaction might be a good idea, and what the caveats are.
I can't imagine there are any other jobs on that, the list is so comprehensive. So far no issues, but it could still happen. Worst case though, we're talking some rare niche jobs that would it be a bad thing if they got prioritized?
Quote
[lye and milk of lime] stockpiles should be 1 tile.
Is this to save on the unused pot? How about if I just set the number of pots on that stockpile to 2? That has the nice side effect of creating manager orders for a few more pots when quickfort orders is run on /industry2.
Yes. I hate the unused pots. They were a pointless idiotic design choice that creates more problems than they solve.
Like we really only need 1 for lye, because we don't even need 60 (or even 30), let alone more. Now I have a second barrel floating around, because it was out for soap-making and more lye got made.
And that 2nd will float around yes, but a 2nd tile wouldn't alleviate this because we would still have an empty and 2 barrels. I guess a 3 tile pile would work. No real need to be bigger.
I haven't looked at what you did with it with the last move. Oh, yeah, actually you need to move it since you put the soap-maker up there. And the milk of lime on the east wall.

Quote
http://dwarffortresswiki.org/index.php/DF2014:Magma#Minecarts Design 3: Minimalist magma moving.
Nice. I'll give this a try on my next runthrough.
Curious how it works out. Hopefully you don't run into the issues I did. I have done this on many forts and never had a problem.
Quote
Random thought, hatches on the down stairs on each level for containment. They actually can't be broken by building destroyers on the level below them.
I had that in one of my early versions, but I thought the hatch covers clogged up the early game too much. We could potentially work it into a later stage, though.
It's only 2 hatches per level(4 for services because the well maintenance level) per level. It could go on the later stages for sure. They become more important when you breach the caverns or go to the circus. It can't go on the stairwell dig itself because you need an adjacent tile dug out to be able to place a hatch (they need room to work), otherwise you get no access message.
Quote
Should probably add [cages] into basic.
I'm going to have to test this. What happens when a low-volume repeating order for an item is at a higher priority than a one-time high-volume order? Will they get in the way of each other? My fear is that the low-volume cage order in basic would take precedence, create all needed cages one per day, and then deactivate, allowing the high-volume order for 40 cages to make...40 unneeded cages. Like I said, need to test to see what actually happens.
I don't think it would be an issue, the low-volume order should get finished and the high-volume order should start. It isn't going to cycle fast enough to keep going, especially if we just have it make 1 at a time. I've still got surface8 to do, so I'll let you know how it works out. I think 10 empty is a reasonable start.

***Make gypsum plaster is an issue***
Default condition not detected, neither are any of the plaster traits. Job needs to be removed until you can figure it out.

Looking through other new jobs, everything else is behaving.

Much as I like glass, I think 30 bags of sand might be excessive for only 1-2 kilns. It is a non-issue now halfway through 2nd year but earlier, I was very short on bags. Granted I had screwed up and set the clothier shop to skilled+ and the 2 tailors only knew leatherworking and we only had so much leather. It might be fine.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 24, 2021, 08:52:54 am
8-28 Migrants 7. A fairly skilled hammer/marks dwarf (his agility sucks though, so melee it is). Another doctor. Rest are useless twats. I'm starting to actually assign haulers now. An alpaca and a peacock (pet, I hate you people, it's going in the siege bait pasture).

Random thought, what about Forester instead of Outdoorsdwarf? Rolls off the tongue easier.

Annoying weasel keeps getting caught in my traps. I let it go and it winds up back in a day or two. I should probably just kill the little guy, although it is free mechanics practice.

9-3 Time to build 1st apartment level. Really past time, but most of the furniture still being made, beds all in place and everything smoothed, not going to hold off for engraving (although we will order it done for the visible areas). I prioritize the married couples (of which there are only 3) nearest the center; I reckon the double occupant rooms should have the shortest walks. Sleeping done once per season not a big deal but every little bit helps.

Cavern barracks and traps dug out and being prepped. I simply re-used the barracks designs along with a trap corridor and bridge seal. Plenty of doors and hatches too. I wanted to work a depot area in too (cavern embark intrigues me and is something I want to try someday) but decided not to bother right now, I just wanted to get it done. So there is a bridge gate then snaking corridor of 18 cage traps, anything that gets past that will go into barracks with guard dog pasture, above that is a marksdwarfs barracks, with some fortifications cut for shits n giggles. Only after passing through all that can we enter the main stairwell.

Spoiler (click to show/hide)
I'm still not really sure if there is any advantage to the training ammo pile or if it is an antiquity (ammo bugs were fixed some time ago) but it probably can't hurt. If anything it keeps additional training ammo nearby which is always a good thing.

I just noticed the nickel minecarts finally became untasked from whatever it was, maybe they will get around to melting them this year. Melt piles are way jammed up. I'm not melting the steel/bronze yet (want to get squads equipped first) but we've got a ton of iron as steel production is behind. It's fine though since with the new profession strategy they need to skill up. If we were running on coal then I'd stick with specialized smiths and probably not bother melting.

We got a petition for farmers guild hall. Also neglected to mention craftsdwarf prior. So we designate them and start smoothing and engraving, see what I need to provide for furniture after that.
Well that didn't take long at all, my engravers are getting good. Actually it provided enough value. Excellent! It wouldn't cut if for a temple but a few gold statues will take care of that when we need to.

Seeing a lot of people fucking off when there is hauling to be done. Maybe I will try autohauler again. So I have realized with the alchemy it just disables hauling altogether, I guess that is working as intended. What I had been expecting it to do was respect the job settings but I guess it can't do what it is designed to do like that. With your override for feed/recover patients it's acceptable though.
9-23, almost seasons end. Time to queue services4 orders.

A little more profession tweaking. I brought the melee and marksdwarfs into alignment with yours; while pump operator is a good way to build strength, and it makes sense to turn it on for dorfs earmarked for militia service before you actually draft them, it isn't what we want them doing when deactivated in normal use for this profession and they'll gain strength on active duty. I'll leave it on the haulers since they are mechanics anyway (engineering group) and str building for haulers is useful, and I don't think they gain strength just hauling (or do they?). So far I am satisfied with the rest. I should probably get the jewelers cutting gems or something, right now they are basically haulers. I think refuse hauling should go on farmers along with food. Besides the fact that most refuse is created on their level, if didn't have the miasma vents it would be much more important getting it done asap. 

One of the smiths just mooded, he could be either armorer or blacksmith (both 6) I'm going to be pissed if it isn't armorer.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 24, 2021, 01:48:19 pm
Winter has come. 10-4 and we have a legendary armorer! A pewter helm. Decorated with an image of...our last dwarf making an artifact lol! Nice I guess?
I realized I never specified materials for services4, just let them do wtf they want. Unusual for me, I got distracted by mooding smith, but whatevs. It's not a lot of stuff.
The statues will all be replaced later with metal anyway. Actually everything will eventually be replaced with more valuable stuff anyway, other than the blocks (because I want the surface fort homogenous) I need to just stop obsessing over this shit. It would save time, aggravation and job cancellation spam. Just need to restrict the jet for pots/jugs (because I run out frequently). I wish there were exclude filters, I could exclude my willow from being made into charcoal and xbow bolts!

Guilds! Ugh! Already I've got someone giving a spinning demonstration to a laborer. Why? Because laborers are part smith/part(mostly)farmer. While I have no issue with a dozen furnace operator/haulers, I don't think adding the 4 wood burning related labors to our 5 farmers is a great idea. In fact if not running magma, it would be a terrible idea, because they'd be busy making charcoal and not getting their farming done. Just something we have to deal with.

Running services4 build. I'm seeing just as much fucking off with autohauler on as off. I guess it's just the delay between jobs being created and assigned. I'm still not a fan, I think crafting jobs are higher priority (unless we prioritize) than hauling jobs in general anyway, so not really sure if we gain anything from this plugin. Am I missing something?

Restricting 2 forges from weapons, 2 from armor. We don't do enough smithing right now to worry about them, but I need to get more work distributed, the manager doesn't do a good job with onesies and assigning large batches of weapons/armor is somewhat impractical.

10-22. Wow! Burned through all my flux, no wonder I can't keep up on steel. Need to quarry out more marble.

11-28. Been pretty quiet I guess. I have added a melting job on repeat to each smelter until we get caught up and it cancels itself. Services is done. We've got 10 more coffins to make and 1st apt level is done. I think I will queue surface8 up and then the remaining 4 apt levels. The Dreamfort is almost all built, of course we've got lots of smoothing and engraving left to do. I think I'm going to add a surface9, ring of fortification around the upper level. Mostly to prevent climbers getting on our roof, but also as somewhere to shoot from for SnG if I feel like it.

Ok, so maybe the autohauler is worth using. Noticing my mechanisms not getting crafted without kicking the job in the ass. I shouldn't have to do this. We'll give autohaul another chance, and it did get the mechanic out of hauling. I also noticed I locked him out of carpentry, I had set a lot of the shops originally to skilled+ and forgot to change some of them back to normal (besides the mechanics). I'm kinda toying with the idea of the forester(outdoorsdwarf) not being engineer. So basicly woodworker/ranger hybrid. We've got so many mechanics with the haulers (not to mention the part-time troops), possibly just making the dedicated mechanic a hauler too isn't such a bad idea. Ehhh, but then it is really useful having 2 of them off the rip, and we'd lose that. Not to mention like you said, late carpenter not so important. Crossbowmaker really unimportant, if they made bolts and metal crossbows at least they'd be good for something. The crossbowmaker really should just be rolled into the woodcrafter skill. Anywho...yeah, maybe it is best leaving the profession as is.

12-17 surface8 walls and floors built, just waiting on traps. Run/order 2nd apt level. That will get everyone into their own room. I just realized we can smooth under existing furniture, can we engrave too? Certainly make life easier.

I want to activate the militia but I'm not ready to lose like 25% of my hauling labor right now. Maybe once all the new cage traps are loaded.

OMG! So y'know that discussion about possible unforeseen custom reactions...coke, pig iron, steel...those are custom reactions. I am loving it!
Looks like all the alloys (raw/objects/reaction_smelter.txt) soap and...a lot of stuff....hmmm...(reaction_other.txt which is where tan hide is). Lot of the newer crafting, pottery, bookbinding, etc. Not the most important stuff but not horrible, a lot of it we either don't do or wouldn't do until the fortress is mature, at which point who cares really. Brewing, milling, etc. Make mead. Bone and wax crafts. A lot of carpentry stuff, mostly crap we don't do (reaction_adv_carpenter.txt). Of course not wood cages or bone/wood bolts, mostly useless bone/wood crafts. I still think the benefits outweigh the drawbacks.

I remove exceptional from the bronze/steel meltables. I actually often do this while I am ramping up so that I can actually equip a squad while my smiths are still skilling up, right now it seems essential. I had some non-willow items slip in, like cages & buckets. The differences in weight are so minimal as to be not worth aggravating oneself over. Things like buckets/splints/crutches we are talking the difference between weighing 1u and 2u. Willow cage 11u, finger lime or round lime 17u, guava wood 18u. We probably don't want to use super heavy wood like glumprong or blood thorn, but most wood it really doesn't matter in the grander scheme of things. The same for trying to get heavier wood for bolts. Back in the day I used to make separate piles and shops and supply the shops so they could only take from the piles they were supposed to, but then assigning the jobs was a pain (this was before work orders was integrated). I been doing it out of habit and wondering why I make more work for myself.

Speaking of stockpile linking, I did link the smelters from all the relevant piles, which was a hassle but I was catching too many hauling up marble by hand. The masons and stonecrafter I already did. I should do the mechanic really but you have to link all the piles, or when you go to make traction benches you'll get cancelled.

1-24-1052 WinterSpring has been fairly uneventful so far (I somehow forgot the seasons rolled over). Surface8 cage traps slow going. So has waiting for the beds for that 2nd apt level, I think they are all in, time for next phase. Everyone's got their own room now. Flux & coal cancellation spam driving me nuts now, it's always 1 thing or another. Someday I will set up a minecart system, I thought about it, but the marble quarry was already well dug out. I also am still not sure how useful it really is by the time you get it built. Starting an archery barracks on the roof too. If we rotate squads seasonally we can prevent cava adaptation. I will likely wind up with 3, the city guard and 2 regular. Probably only cut infantry by 1 to 4 though. 

1-26, Migrants 17. None of them anything to get excited over, but still we need the warm bodies. And what is up with shitty attributes? I swear they used to be more "normalized" the numbers are all over the spectrum, although usually on the low side. I mean I have someone who looks like they'd be a decent militia and then they have 0 agility or toughness. And a bunch of useless pets, a bunny, a goat, male & female keets...I swear I am gonna teleport all these cunts into the volcano yet. You want a fucking pet? Get a dog! /facepalm

I don't know why, but I just remembered how bad the default metal uniform actually is, we want helm, gauntlets, high boots not headgear, handwear, footwear. Normally I have 2, steel melee, and steel xbow and then I go assign weapons manually anyway (because otherwise we get dumbasses who think this is fucking WWF) although I like to see what they pick sometimes. Since I'm going live and I've got a mix of iron & steel at the moment, going to go with metal instead of steel. Probably doing everyone a favor to just put a note in how to set up proper uniforms and tell them to delete the default ones. Even the leather I'm sure needs to be scrapped. Going to let the archers go without the rigid armor (bp & greaves) for now because I don't have enough.

And the game crashed and I am back to the begining of the season. I think it's time to call it a night.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 25, 2021, 08:35:39 am
1-26 again, we got 20 migrants this time, and a shit ton of pets. A few decent soldiers. We'll fill out laborers to 12 (1 more) and then the rest haulers and militia. We could use another doc and a couple miners but we'll hold those slots for migrants with actual skills. I swear DT roles are fucking worthless, outside of already skilled, which I really don't need an analysis to tell me the dwarf is suited to the skills they already have. I imported some old custom recruitment view with custom roles and professions for militia too, even supposed to let you assign them from that screen (doesn't work) again worthless. I've tried messing with custom roles too, just not getting desired results. Settled on my own custom view with the attributes that matter (because the default military screen leaves a bit to be desired, especially focus/willlpower/kinesthetic and spatial senses missing, they're actually important). Sometimes we just have to use the good old mk1 eyeball to aid us in making decisions. And we are dumping the pets in the volcano because my displeasure is that great and Armok demands sacrifices!(we'll save first because that caused our crash last night).

Found another needed profession (for DT users at least), FNG (fuckin new guy). As population grows, it becomes more a chore to see who is doing what. Traditionally I make a lot of use of the "migration wave" sort view, but since we're assigning professions now we want to see who still needs a profession. It also helps to see what professions you've already got assigned so you can see where you are lacking. Then we will probably want to switch back and forth between military and roles screens as well, and that is where it gets messy. The default professions of course will spread the migrants all over so we need to assign them a single profession that lets us know we need to reassign them. There are custom filters, you can even save them, but it is a lot of work to set them up, and I don't think the condition we would want to test for is there (traditional filters for this purpose look at things like assigned hauling/labors, to key in on the defaults, this doesn't work with auto-hauler, and it's more suited for a skills-based vs profession-based approach). So sort to migration wave, assign them all FNG profession, sort by profession and then start evaluating and assigning.

It seems we have stopped updating stockpile records. The new bookkeeper has not leveled at all. Stocks screen continues to work, it's a semi-bug I guess, I mean if it failed in between bookkeeper updates it would be useless (unless it was seasonal). I'm not sure about the auto tailor plugin though, since that event is its trigger. Manager is still working at least.

After they are all assigned we've got 7 Haulers, 10 Marksdwarves, 15 Meleedwarves. I'll let them get settled in (out of new arrival mode) before I start setting up squads. We are almost there.

Armok approved of our sacrifices this time, he revealed the adamantium to us. Pets reduced to 1 puppy and 2 kittens. Much more acceptable. Fuck you people who think livestock are acceptable pets!

So I don't get what's up with the lack of lethal combat (for civilians and dogs) these days. A marksdwarf (not activated) was out hauling in the caverns and beat the piss out of a giant olm, but lost interest after it was unconscious. The dogs constantly getting into fights with whatever I release right now (mostly falcons who keep getting caged) but besides a little scratching that's it. Same for the stupid keas that they will knock out, and then the kea will get up and steal something eventually (I let them out in the siege bait spot when the caravan came, guards took them out).

Since we started letting them use whatever stone, we ran out of jet as expected. I mean there is plenty more to mine, but we ran out of stock, which ran us out of pots again. Setting jugs back to generic (they weigh less than 1) pots I am debating. Jet pot weights 6. Going by density on wiki, for average non-economic stone we're looking at 2-3x the weight. 12-18u is still not very heavy. A rock pot full of booze is 35u. Would hauling a 47u pot be any worse? Probably not unless the dorf is very weak. There's really no more data on encumberance since speed was removed as a stat, even though it's obvious that encumberance will slow a dorf down.

Got 2nd apt assigned. We're actually 4 short (plus the babies, but I don't think they need their own rooms until they are at least children). Made sure the soldiers all have rooms so when they start flinging their clothes around there is somewhere for them to go. Cleanowned will strip the shit from them between seasons but I'd prefer it not thrown on floor to rot in between.

Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 25, 2021, 10:00:58 am
Since uniforms are so important, yet so hard to script with quickfort, I'm thinking we need some new tools. Maybe a "uniforms" plugin that can import and export JSON, like the orders plugin. Maybe also a script that can assign minecarts to routes. What other manual steps could be solved with better tools?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 25, 2021, 11:13:09 am
Since uniforms are so important, yet so hard to script with quickfort, I'm thinking we need some new tools. Maybe a "uniforms" plugin that can import and export JSON, like the orders plugin. Maybe also a script that can assign minecarts to routes. What other manual steps could be solved with better tools?

Yes, that would be pretty awesome!

Let's look through the manual things in the help sheets on each floor. Not a tool item, but services place & query jail we could add making the 3 inn rooms into dorms.
Auto pasture grazing livestock & wardogs? Sounds like a modification of the autonestbox. Probably not the dogs though, since would need to handle multiple pastures and also not pasture dogs assigned to a handler. Maybe just the grazers.

Auto-lever. Links levers to bridges/floodgates/etc with the same name?

Going through my play through. Besides what you mentioned no other highly repetitive tasks stand out. The auto combine-drinks. Especially since it would stop me from running combine-plants (I'm somewhat obsessive-compulsive going through running both scripts frequently). Along the lines of that, combine the lye and then split it in half into 2 barrels might be handy. Although lye and soap production seem to be back under control since switching to lye condition.

A utility to automate the magma-hauling process? That would be really useful, I don't know if it's feasible.

I'm thinking if the customreaction prioritize continues to work out, or if you find some way to isolate certain tasks (I really like the priority coke/pig/steel), we could take butcher & tanner from farmer and add to cook (maybe milking and cheese making too). That way we only wind up with 2 legendary tanners. It also works well with work flow. Animal is butchered, which triggers tanning & cooking (tallow and probably at least 1 meal) all of which are in the same vicinity. Then the cooks can go back to hauling/managing/not updating records/fucking off.

Y'know, besides no liason, it also dawned on me no hippies or humans caravans came either. I coulda swore I was in range of them all, and necromancers too. Nobody has come to visit us.

I'm starting to think the melt piles should be QSP too lol. It wouldn't let us get anymore magma forges in though. Actually been thinking maybe magma-forge should be it's own level. Don't have to futz with the industry level then, just shut the shops & piles down. I can even fit it in around the otherwise unused service 'tween levels. Could make it an optional bp. I'll throw something together. For now, adding wheel barrows to the ore feeder. Probably a good suggestion to say "after upgrading to magma (or just whenever you want to ramp up production), add more wheel barrows" Maybe the same for stone once we get a full load of haulers. # of wheel barrows limits # of jobs. Early on I think your #s are fine though, we don't want too many too soon.

While I'm designing this and thinking about implications to storage piles: Stone blocks should really be up in the stone QSP.  I think I've already mentioned metal furniture belonging in metal QSP. We probably don't want the bone and wood bolts down here, but that can be solved by simply removing what's needed from the industry level feeders and leaving the rest.

So the next question is how many smelters do we really want/need? I was shooting for 8. Seems like I can nicely fit 7, or 11. Maybe I will do 11.
Still 4 forges, 2 glass, 2 kiln. Could easily go 3/3 or 4/2 for the kilns but seems like overkill. Although I guess some glass mega-project 4 would be nice.
Heh, was just reading, it's only 4 magma needed not 6. I been doing an extra cart per /facepalm.
Of course a the problem becomes scaling the # of jobs to keep all the furnaces in use...I wish there was a way to spread the jobs out more without queueing so many of them in 1 shot.
We could do a magma orders, (s)melting jobs in batches of 11, weapons/armor 4 at a time. Would keep everyone busy. Probably can't make them supersede the military orders though, so we'd have to give 2 and recommend not doing 1 and/or cancelling those jobs when ready for the magma one.
Is this making it too complicated? It feels like it.

I've also concluded the bar feeder needs to be larger, even for industry3. 4 smelters can produce 32 bars in a shot (coke/some alloys). The ore feeder can be smaller, since traditionally they are sized 2x the # of wheelbarrows but really it only needs to be as big as how many wheelbarrows we use, because that is the # of hauling jobs it is going to generate.

Concluded while architect labor is indispensible, putting points into the skill is worthless (actually I've pretty much always thought that, but every so often I give everything a reval). I'll probably remove it from the masons. Maybe give them stonemason. I mean we are gonna wind up with a craftsdwarf guild no matter what anyway. Grower/cook for last guy (yeah, still tinkering with new embark profile too).

This is where I'm going with the magma forge level, fitting piles in a challenge, I'm not even sure if auto-melt will work in a QSP, although it should in theory I guess
Spoiler (click to show/hide)
I also don't like how far the forges are from the QSP, maybe I will cut the forges to 7. In theory it would be nice to have 12 what with 12 laborers and 4 smiths but I think it'd be a challenge to keep them all fed before late game, and then late game would become a challenge keeping work assigned (because demand slows and skilled workers become faster).

This is better I think. 4 Forges, 8 smelters, 4 glass, 2 pottery
Spoiler (click to show/hide)
I could squeeze 2 more smelters in each side (or just put the forges them where the forges are and move them), and then extend them back out again for the melt piles I guess (right now the space on the sides is for melt piles).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 25, 2021, 05:01:41 pm
Quote
services place & query jail we could add making the 3 inn rooms into dorms.
We could, but do we need dorms at that point? The first apartments level will have been built by the time /services4 is run. What's the benefit?

Quote
Auto pasture grazing livestock & wardogs
This might be doable with the existing zone plugin (https://docs.dfhack.org/en/latest/docs/Plugins.html#zone). I might be able to extend it by indicating a zone by name instead of numeric id. Might need some other filters as well.

Quote
Auto-lever. Links levers to bridges/floodgates/etc with the same name?
brilliant. it can scan for levers with names and ensure there is a link to all linkable buildings with the same name. it will fail if there aren't enough mechanisms, but that's ok. it can be re-run until there are no more links to make. I had thoughts in my head about a "jobplanner" plugin that will create jobs when conditions are met (like item availability) -- essentially buildingplan for jobs -- but the design for such a plugin eluded me. A more specific use case like this is more tractable.

Quote
A utility to automate the magma-hauling process? That would be really useful, I don't know if it's feasible.
Yeah, I'll have to play around with magma hauling to see if any automation ideas strike me.

Quote
or if you find some way to isolate certain tasks
I think I've found a way. For CustomReaction jobs, there is a reaction_name field that has usable data, such as "TAN_A_HIDE", "BREW_DRINK_FROM_PLANT", "PIG_IRON_MAKING", "MILL_SEEDS_NUTS_TO_PASTE", "PRESS_HONEYCOMB", "MAKE_MEAD", "PROCESS_PLANT_TO_BAG", "MAKE_WAX_CRAFTS", etc. This seems viable, though I'll need to extend the "prioritize --registry" command to list all the available reaction names. No way I'll be able to list them all in the static help text (they might change with mods anyway). Luckily, I generalized the data model when I added support for filtering StoreItemInStockpile by hauling labor, and I can copy logic from the orders plugin where it validates reaction names, so this addition won't be quite so difficult.

Quote
Probably a good suggestion to say "after upgrading to magma (or just whenever you want to ramp up production), add more wheel barrows"
Added a note to /industry_help

Quote
I'm starting to think the melt piles should be QSP too lol.
I've considered this too. I kind of like having the visual of how many items are in the "meltable queue", though..

Quote
Stone blocks should really be up in the stone QSP.  I think I've already mentioned metal furniture belonging in metal QSP. We probably don't want the bone and wood bolts down here
I agree with all of this, but I'm wary about making the industry stockpile configuration too complex. In particular, I want to avoid splitting an item category across two stockpiles. The stone/ore split is, I think, not an issue (it meets the "obviousness" test), but I don't want to make players have to think too much about where everything is stored. I'd be happy to split up the goods feeder stockpile, though, to get the furniture into wheelbarrows. We could improve it further by splitting heavy from light furniture, but that will take some alias work.

Quote
So the next question is how many smelters do we really want/need? [...] Is this making it too complicated? It feels like it.
Yeah, I think it's best to leave late-game modifications up to the player. Requirements tend to get more customized at that point, and I don't want to over-specify Dreamfort.

Quote
the bar feeder needs to be larger
agreed. done.

Ok, todo list:
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 25, 2021, 06:00:28 pm
I probably need the extra dorms. I'm behind on apartments and a lot less married couples than I expected. It's one less thing to do by hand though, because you need to make them into dorm rooms to assign them to the inn anyway don't you?

Could scan the custom reaction files and enumerate them into the help file on the fly? /me shrugs, If that's a lot of trouble just make a note that the player should peruse the files themselves for more info?

Yeah, I like being able to see the meltables stock as well. I found a way to keep it for the magma forge level, even with 12 smelters now.

Well, at least the stone blocks are in 1 sub-cat. The thing is with 4 made per craft that is a lot of hauling jobs to an already overly busy feeder. We don't want clutter in the masons or the smelters/forges.

I can understand wanting to keep the complexity down. I'll just keep it as a custom add-on on my share or something. How many do you use late game by the way? Last discussion I found about it was from like 2014, I'd start one but I think you and I are the last 2 living people who care to discuss fortress mode strategy anymore anyway.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 25, 2021, 06:20:30 pm
I expand to the empty space on the right for more magma-using furnaces, but late game I've actually been happy with just what can fit on the existing industry level.

2 masons (or 4 if I'm building something crazy on the surface)
2 forges
2 glass
6 smelters

once the initial surge of meltables dies down, I replace a few smelters with other options, depending on what I'm doing at the time.

Early game, this produces all the volume I can handle, and late game, the dwarves are so skilled that they don't need any more workshops to produce high volume.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 25, 2021, 06:49:49 pm
I expand to the empty space on the right for more magma-using furnaces, but late game I've actually been happy with just what can fit on the existing industry level.

2 masons (or 4 if I'm building something crazy on the surface)
2 forges
2 glass
6 smelters

once the initial surge of meltables dies down, I replace a few smelters with other options, depending on what I'm doing at the time.

Early game, this produces all the volume I can handle, and late game, the dwarves are so skilled that they don't need any more workshops to produce high volume.

That confirms my experiences and gut feeling. Some people said 20 smelters but I'm like that's crazy, I don't think I've ever done more than 8. Usually 4-6. 4 Forges, but then I'd give 1 to each profession.  I usually start making gold furniture and stuff late game.
I liked the 3rd mason (actually I built 5 for the hell of it it this time, but I've only got 4 dorfs) but I feel like I couldn't keep up with hauling, but then mechanic and stonecrafter there too, and only 4 wheel barrows. Outside of Dreamfort, I think I usually use only 2. And here I considered Dreamfort being "building something crazy on the surface" Surface forts usually something I do late game because I can, this is the first time in a long time I've done it as the main defenses. I used to just dump my trash in lava, never knew you could floor over a surface vent and still have it prevent miasma.

So 4-01-1052 Summer just rolled around, and off to bed. Spring had another FB, it had a 21 unit killing spree before it was taken down by a magma crab (who was kicked hard after spitting). I am seeing a pattern here. So some giant bats had worn it down quite a bit (they are pretty tough, I've caged and trained them for hunting...even though trained flyers get nerfed they are still decent fighters) and I was debating letting my fledgling militia at it.

A full squad of marksdorfs and 2 nearly full squads of melee is what we've got now. Pretty full complement of everyone else but haulers (8). We're getting there. 2nd apt still being furnished. Smoothing while waiting for that to finish before we go dig another. The militia threw fucking clothes everywhere. They really need to fix that. I had to go all through the fort looking for them and force dumping into stockpiles and still I find more rotting away.

Smithing is a mixed bag, a mooded armorer and weaponsmith, the rest are 4-1-2 for armor, 12-5-5 for weapons. I guess the armor isn't getting spread around enough still, but since we just equipped 25 militia that'll crank armor production up some more. I gotta say I am not wild about this rate of skill gain. Maybe it would be better to specialize them until later and then cross-train. When they started 2 were blacksmith 10, 1 was weaponsmith 8 I think and the armorer was like 4. One of the blacksmiths at least his weaponcrafting has overtaken his smithy, so if he moods I'll have 2 legendary weaponsmiths.

We still aren't keeping up with hauling flux and coal. I bumped wheel barrows up to 6 but maybe I was short so I queued more. Also extended the bar feeder to 15 tiles, cut ore to 10. I may go up to 10 wheel barrows. Speaking of, I have noticed that the wheel barrows get dumped into the QSPs, maybe we need to exclude them from the hauling routes. Maybe it doesn't matter.

What else. I've had to kick the manager and bookkeepers in the arse again, but the bookkeeper still doesn't seem to work (or at least gain skill anyway, I don't have time to watch his office all season).

This has been my worst Dreamfort run ever! A lot of frustration, but at least it's been a good data collection. Next run will go better because I am not going to micromanage a lot of the trivial shit I normally do. We'll play this one a bit longer though, maybe go to the circus and die in glorious battle!

So I think we need to up the batch sizes on forge/smelter jobs. There is absolutely no advantage to building extra shops without orders to take advantage of them. I would be nice if there was a way to autoscale or even just adjust #to make of an existing job. I could live with 6 smelter and 2 forge. It shouldn't cause any undue hardship on the default setup of 4 and 1. I gave up on my magma forge level since excel crashed and corrupted the file.

I'm trying new orders out, of course the manage doesn't want to work again. I swapped the manager & bookkeeper assignments to see if that would trigger a fresh response. Nope.
Looks like the bookkeeper is an undocumented feature https://www.bay12games.com/dwarves/mantisbt/view.php?id=4536 (https://www.bay12games.com/dwarves/mantisbt/view.php?id=4536) It gets done once to highest and never needs to be done again.

So this concerns me; Tailor: Whenever the bookkeeper updates stockpile records, this plugin will scan every unit in the fort, count up the number that are worn, and then order enough more made to replace all worn items.

Looking through the code, I think that is a bunch of bullshit fluff and it has nothing to do with the bookkeeper, but I could be considered a novice programmer at best. It's a bit soon to tell if it is working or not, clothes are just starting to wear (besides what the soldiers all discarded).

I am getting too much iron stuff made still. They make steel equipment until the steel runs out and then go back to iron. I think maybe instead of checking for steel bars on lower tier materials maybe we should check for iron bars and flux stones.

5-15, a FB made of fire came to the 2nd caverns, it leaves a huge trail of fire around it, truly terrifying. This is the first time I've seen something like this.

5-19, 10 migrants, a boar and a puppy. I was too slow getting more balls queued up last caravan and I only had enough crap to make them like very happy but not ecstatic. I suspect that's why my last few migrant waves were not larger. Could be worse, but we need all the warm bodies we can get. Fairly skilled animal trainer (13), 2nd one actually, but I've already got the 3 foresters. 2 low level hammerdwarves, I think I will make them militia. A few other promising candidates as well. The other 6 haulers. Oh, a bonecrafter mooded, I dunno, last month. We got an artifact bone spear.

8 keas, it felt good to give the marksdorf squad kill orders. Vengeance is mine sayeth the overseer!
There haven't been any new visitors to cavern2 but the FB is continuing to light it up.
Our giant spider left cavern1, he got into a brawl with a laborer once but otherwise just wandered about, another gorlak showed, he'll wind up in a cage like the last one.

We got fortifications around the upper deck, I'll probably make a little tower over the roof archery range so it can be a proper barracks.

The job management screen needs a search function! Could that be a script/plugin? Regular jobs screen has it. Realized melt order was from furnace not military. Maybe military could get the large order (4 or 6) and the furnace could get an order for 1. Kinda like the overlap in smelting.

So not being given specific weapon orders (I just assigned crossbow) I see all my marksdorfs using iron xbows, even though there are 13 platinum, 3 of which are masterwork. The platinum maces and warhammers are being used, but there are no alternatives crafted. I mean I could force assign pt xbows, but this should get some science.

Well fucking fantastic! I dug into the cistern, didn't even realize it, digv is a very dangerous command. Good thing I had the shutoff shut or we'd have a major flood on the lower levels.

New soapmaker location, is good closer to ashery too. You should swap the wood and liquid piles locations to go with the move.

Seasons end, our FB is still there. Not horribly aggressive, half a pack of crundles are still lurking. The gorlak is still keeping a low profile in cav1. Surface been quiet since the keas were slaughtered.
All smoothed, engraving now and a little mining. I guess we should do 3rd apt level since masons are not doing anything. Still getting caught up on steel. Militia getting trained up.

Oh and the cursed nickel carts are still there, and cursed.

Something else if you're still looking for more coding work, dig priority override for quickfort. So like I am laying out a new apt level, I want it at pri 2 instead of 4 because I've got other dig/smooth tasks assigned and I want this done now. It's a chore to go through and do it by hand. A switch to set it for the entire dig would be great.

So I thought chain mail + high boots covers legs, not according to DT (I was holding off on greaves for the archers).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 27, 2021, 10:45:06 am
So getting more FB and cyclops now on the surface, 2 in a row...but it's still a bit boring. The 2nd cook mooded into armorsmith (I had her create a piece earlier). Still having trouble with flux hauling/cancellation spam.
3rd caravan still no liaison, still no one else comes to visit us. I kinda just let that game run on auto, the militia needs to be filled out and trained better for the circus.

Trying a default world and default size embark, something I never do. Of course trying to find an embark I like might be too frustrating.
Scarce minerals makes it very hard, certainly too hard for a 2x2 embark, so we're gonna see how bad the 4x4 is these days.
Things I must have: Sand, Flux, Coal, minimum soil, Iron, Copper (really don't want to try to keep up with ammo on imported copper), strongly prefer bituminous coal, strongly prefer flux in sedimentary layer, goblins, candy spires - even on a 2x2 I normally look for 4 minimum (with highest mineral setting). Would like a magma pipe (volcano, not necessarily to surface, up to caverns will do...almost impossible to find flux other than marble though) but that can be rare on a good embark without specialized world gen settings.

So 2x miner 5/engraver 5, 2x mason 5, mechanic 5/carpenter 5, cook 5, grower 5. TLDR: After great internal debate, we dumped the chef I'm thinking we're going to be overrun with carpenter/bowcrafters sooner or later, when we only want 3 tops. Same thing for craftsdwarves of all kinds. By 3rd year we are flinging most all migrants into the military/hauling.

We're going to make 14 nestboxes, 5 beehives and likely only 10 rock pots prior to the 2nd migrant wave. Hardly worth bringing a skilled stonecrafter for. The 4 glass parts we need to make don't justify a glassmaker (and I'd still rather have an armorer). One of the masons can make the first 2 nestboxes, 1st wave we will assign at least 1 craftsdwarf who can take over from there. While grower & cook aren't the most important skills (for an advanced embark smiths are always a good way to future proof, and if we weren't doing this profession based thing I'd likely still go that route) we do need both those professions off the rip and this way we can set and forget. The grower will do 4 brewing jobs, build fields and plant, probably get a harvest or 2 in as well. Since the farms typically dug out within a month the farmer will work steadily from there on out. The cook will butcher the draft animals, tan their hides, render fat, and make a few meals. Granted it isn't a tremendous amount of work, but it is important work, and we need at least 1 dorf somewhat free for hauling. Also since the embark skill choices we're going more for speed and convenience than anything else, I can justify it somewhat. Going to just use the extra points for resources.

I know I said another mechanic would be handy, but since haulers are mechanics we wind up flush with them. I'll have the grower or maybe the chef be the 2nd woodcutter temporarily if need be. Prior to surface5 having the mechanic & carpenter be the same dorf will work, the carpenter is somewhat busy but the mechanic isn't. That means 1st wave we will need to assign another forester, but considering a carpenter/bowcrafter/wood-cutter migrant isn't unlikely and he can learn mechanics while building/linking/loading as the skilled 1 makes mechanisms it works. Any highly skilled mechanic migrants will be assigned as haulers (thinking of renaming them Engineer) "I prefer to think of myself as a Hauling Engineer"  -Urist "Ed" Norton. I'm still leaning towards removing engineering from the Forester (making it woodworker/ranger only, losing 2-3 mechanics really isn't going to be noticed) but I have to figure out starting pairings that work. We could ditch the cook and just bring extra food (or let them eat the raw meat, doesn't really seem to bother them) and hold off on butchering. I think we will ditch the cook. They will just as happily eat the raw meat. Just have to brew the PH quick (will have to dump 4 barrels of solids/combine 5 barrels of booze for emptys)

2x miner 5/engraver 5, 2x mason 5, mechanic 5, carpenter 5, grower 5. Assigned as 2 miners, 2 masons, 1 hauler, 1 forester, 1 farmer. Hauler 2nd cutter if heavily treed. Probably make him do the initial stonecrafting too. I think this is solid.

As far as optional skills, we could give the carpenter animal training (because it is slow to train, but does it make a difference? lately giant bats are my main wild tames and even 0 skill can train them...they are fucking savage too, I wish they didn't lose flight when trained) or wood-cutting (I still consider it useless, the delay in tree-felling seems more to be getting them to go do it vs how long the job takes...I could be wrong though, but it really seems to take minimal time to fell a tree) Bowcrafting? Meh! Brewing skill does absolutely fuck all (I think it's broken) and the rest of the farmers skills really aren't worth considering (gelder 5 to strike fear into the male animals?). If I actually planned on using siege engineering it would be a natural pairing for the mechanic; I don't. Migrants are always going to have free social skills and so make better brokers. Engraving is actually stoneworking (stonecrafting is not), but I don't see us pulling the masons off to smooth stone or do anything else until after the very last apartment level is furnished. The bookkeeper being semi-broken recordkeeping is worthless. Manager's gain on the job so fast once we hit the required mark (20+ dorfs) but that is 2nd wave at least. Again we don't have to be slaves to the categories nor the professions even, but trying to fully evaluate the strategy and options. After my last playtest, I think your counts for totals of each profession are spot on too.

So we beef up on raw materials with the extra points. Tetrahedrite was the only copper available, which costs 9 vs 6 so we bring some. The embark has copper but not tin and I still like to have the option to make some bronze off the rip. Hmmm...or we could just go to iron, 24 pts vs 15, although that gives us half as many bars. We'll stick with the bronze.

Wow, this was going to be a short post and it got huge!

Odd, onmapload_dreamfort.init ran. Neither pylnp nor my own did.

And most of this map is a huge open shaft, it's very interesting but fuck playing on that. The lava stops at 32, which I guess is the bottom of cavern1 sheesh! 7946 Hematite, 3013 Tetrahedrite, 1546 Candy, 272 Gold - underwhelming, which reminds me why I don't play on these settings, although I suppose it's really plenty enough, I just hate the lack of variety. The marble isn't very deep at least. Hardly any trees, the caverns have most of the wood (half wasteland but still). Aquifers all over the place, and just a really wierd pattern, probably light but still, I hate the new aquifers. I used to go for a partial (back when they were all heavy) but now I avoid them and just look for a brook/river. Yeah, so many things wrong here. So much useless space. I'd be tempted to tough it out, but I imagine a few flyers loose and FPS would tank with this crazy cave network. Actually, there isn't even enough contiguous solid space for the Dreamfort.

I might have been hasty about concluding safe feeder size. If it is full of wheel barrows, it won't generate hauling jobs. So half the size in wheel barrows is safest.

1053-10-1 (back in Kikrostogred, came back for more skill data, stayed for the FB, cyclops and titans) The world has passed into the age of heroes. Whatever that means.
Well the year almost finished out fairly quiet, we HAD a jeweler. It happened so fast the idiot went out to grab something in the caves and the wounded troll (the marksdorfs from barracks had popped a few bolts into it; overall I am really pleased with that archery range/fortification overlooking the main cavern) ripped her to shreds(you say).

All apartments done (well last of furniture going in). Finishing smoothing, starting more engraving. Troops are training.

I manually ordered steel xbows, they are being used. Will do some silver when I get a chance but expect them to not be used either, but who knows since the platinum maces/war hammers get used with orders of individual, choice melee. Hmmm, maybe I should change them from crossbows to individual choice, ranged. I specify crossbows because the last thing is I need some idiot grabbing a bow or blowgun that I can't manufacture ammo for.

I'm still not sure about this tailor plugin.

I think the ore feeder needs to go back to 5x3 and the bar feeder can be made 11x2 (move 3 to the left). That would allow 7-8 wheel barrows. I am still having trouble keeping up with demand with 5.

Auto-nestbox probably shouldn't check against babies. Like now it is telling me it needs 37 nestboxes. I don't need 37 nestboxes, I need it to STFU.
Separate zone for them if possible in your mods. Like I throw them all in the grazers pasture for lack of a better place (otherwise they wander all over the fort) and this way the ganders stay there too.
Same for puppys, I pull them out of the wardog zones until they are grown and trained.

Being I used to use mail leggings (you can wear them under greaves, but I no longer feel they are necessary) I never noticed the lack of leg cover. Suggest adding trousers to uniform as well.

I feel the init loading is flaky. Sometimes it loads in order, sometimes it loads in reverse order, sometimes it only loads some of the files. Mine should run last since it is onMapLoad_Z_Krougal.init but last load it ran 1st, then onMapLoad_dreamfort.init ran. onMapLoad_PyLNP.init I did not see the command in there although multilevel is working (that might get written to save though, it is the only command in there now). The run before that my file did not run, I have not made any changes lately.

Marksdorfs not really training armor/shield (like probably not at all, just hard to tell because some of them came with some levels) and overall militia training feels much slower than it used to be.
1053-3-6 and we've got 3 elites out of 24 melee (but those 3 started with 8+ skill) and 0 out of 14 xbow. Now I wish I had put the year on more of the earlier posts, I want to say I activated squads in early 1051. Now 2 years doesn't sound like a lot to some "realists" who used to argue it was unreasonably fast, my response to them was always "well then lets nerf skill gain across the board, because a dorf who does nothing but 1 craft continuously for 2 years will go from 0 to 20 in that time, why should the militia be any different." but maybe they got their way. Maybe I am just imagining things too, or maybe it's been closer to 1 year than 2. I had a couple crashes which always throws off my sense of time (it's good to hit ctl + s every month or so). I know there are still ways to force more aggressive training (danger rooms and the like), personally I can't be arsed with them anymore.

Considering going to leather armor, wood shields (do need some way to force wooden shields to craft job) and possibly even just copper for xbows. If they aren't going to train armor/shield/hammer not much point in weighing them down. I'd consider steel helmets at least, for when they get shot in the head through fortifications by that elite goblin archer, but then if they aren't going to train anything besides archer/marksdwarf they are semi-disposable.

Hmmm...and possibly I misremember things (old age does that). I fired up Mistemikud, 504-07-21, it's the save I have on DFFD with the obsidian generator (I really need to finish that plan) and 1st infantry are legendary, 2nd archer mostly legendary, 3rd infantry are middle of the road. The archers haven't really trained melee or armor here either. Dodge is fairly good across the board. That particular fort design though they will never be in harms way due to being immobile tanks because they are stationed inside a fortress line in a "shooting gallery".
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 28, 2021, 05:45:47 pm
New embark. I'm leaving 175 points on the table in the embark profile (what it cost for 5 more level 5 skills) for customization (or in case you have to get a steel anvil). My honey badger leather was a problem, so was malachite. So we went to goose leather. I had to use tetrahedrite in the embark, but as it is 3 points more than malachite or native copper I am not going to leave it in the profile. If one doesn't know what to do with the extra points, more materials are always good.
Spoiler (click to show/hide)

Updated the DT custom professions. https://drive.google.com/file/d/1_GY7NVR7Os5vfOfgQZyWyfauTeF-wkC8/view?usp=sharing (https://drive.google.com/file/d/1_GY7NVR7Os5vfOfgQZyWyfauTeF-wkC8/view?usp=sharing)
Main change was splitting Forester and Engineer. We added FNG to make assigning migrant waves easier. There is still a woodworker w/o the rest of the Forester role. I have a few professions in there that I probably won't use/are situational, but others may want.

So the usual, we assign professions (Farmer, Forester, Engineer, 2x Mason, 2x Miner), dogs to be trained for war. Reassign nobles. Turn alchemy off on farmer temporarily so he can haul (once we build farms we will turn it back on) Run setup. Designate surface 1. I brought 7 blocks so we aren't going to build the 2nd mason this time. We'll build a still out of the bar of coke and brew wine before the little bastards eat the PH.

Let's do a reveal, prospect and survey before we get too invested here. Soil is a bit deep. So is the fucking aquifer ffs! There wasn't supposed to be one even. Bottom left section has only 1 layer of aquifer, but not really where I want to build. Seriously, all the sedimentary layers are in water. All of the iron and coal and most of the dolomite are there. I mean WTF. And there are no sedimentary layers outside of the marshes in this world (or at least with coal AND flux).  The magma is extremely deep, over 100. 18k Galena, 5800 Tetra, 3700 Limonite, 2500 Garnierite, 2500 Sphalerite, 2300 Malachite, 1460 Adamantine, 7362 coal. Not overly generous amount of wood for a temperate marsh, although at least site will be clear fast. Yeah, I am just not feeling it. I guess I could always cheat away the aquifer if it really gets on my nerves, but we'll give wet mineral extraction a shot for the engineering challenge. Punching through light aquifer to build fort is easy enough, and there are a good solid 18 levels of dry stone before caverns, so we can build freely. The first 2 soil layers are dry too. Embark is fairly flat and there's enough space clear of ponds in the center. Not sure how we'll collect sand (sand layer is wet). We can work with it I guess. If I get fed up with this I'm going back to custom world gen (and I probably will when vampires and weres showup and trash the place, because I fucking hate them).

When there are multiple soil layers, I actually prefer moving the farm level down at least 1, it lets us not care about what happens on the surface. It just requires extending the channels. Since the 3rd layer in starts the aquifer we can only go down 1 extra, which is a lovely green peat level. Since we switched up some things here we hold off on training the dogs (hope I don't regret it 1 dog and mason already got into fight with a snapping turtle but ran it off) since I want the wheel barrows sooner than later. We remove anvil and since we brought 7 blocks the order for 2 blocks for surface2.

One does not simply dig through a 5 level aquifer. Even smoothing as we go (doesn't help first 2 levels are soil), already the water is too deep. Been too long since we did this dance. I don't think double-slit method works with light aquifer since they don't act as drains. Will liquids 0 so I can dig down to next level and then build some kind of drainage system.

Cooking being a farming labor anyway, I am just going to have the farmer cook 1 lavish meal and then turn it back off. I decide to let him be the bookkeeper and update the records before building the farms after what was recently discovered.

250-4-1 Even with the aquifer fiasco most of industry3 dug out. About the same progress as usual. Miners are lvl 9. They started at 5. 2/3 of the fields are planted. Surface3 nearly done. I didn't bother trying to micro materials (of course we've mostly dug quartzite lol) and I didn't build the 2nd mason. I think the extra hauler was more useful since once again, we are at about the same level of doneness.
Oh, and what little water seeps down from the 2 soil stairwells seems manageable, it evaporates in the industry level.

4-5 We're dug enough to build. I lowered priority on the non-essential parts of industry dig. Miners are lvl 10. 4 more fields planted so it seems lvl 5 grower can plant a field a day. Surface3 is done. We're right on schedule as usual.

4-15 Industry about wrapped up. Need to get a few more blocks made. I was debating dropping a mason from the embark (seem like mason immigrants are common too) but then realizing we are short 4 block orders I think not. We are just keeping up, and that was with the little trick about limiting orders. I get rid of the east side piles, make a 7 tile wood pile in the center, 2 tile piles for lye and milk of lime next to soap maker and respective crafter, 1 barrel each. I also redo the bar and ore feeders. Also since we've got the extra 2 wheel barrows from old surface pile I add them to the stone feeder. I again play with priority on services dig (I always do this too) to get what is needed to run the build order first (this is everything except the jail cells and about half the dining room). Saves a tiny bit of time before you can get the hospital setup, probably not going to be lifesaving, but you never know. Sure as shit when I get the nestboxes up really fast I get infertile eggs and then waiting for new eggs still. Maybe they don't fertilize by "spores" and have to spend some time together in the same pasture first, although could just be perpetual bad luck. Getting our first few harvests of plumpers just as he finished all planting. Convenient.

4-26 We get only 2 migrants. Hope the next wave is kinder to us. Gotta love the 2-3 migrant waves, they happen. Plot twist, they are both legendary miners. Not exactly what we needed right now but far from worthless. I guess they'll be eating my PH soon as the roast is gone but at least they aren't a lot of extra mouths to feed.

5-3 Services ready to build. I remove the ropes. I also set order condition on the traction benches that mechanisms and tables orders must be done first to prevent cancellation spam. Might be another helpful suggestion for help file.

Somehow the miners have trapped themselves in the wells (and got thirsty). This doesn't happen with just 2 of them. Fortunately there is 1 above who will dig them out. I guess the maintenance stairs should be higher priority. I honestly find the whole digging setup there overcomplicated (I don't think you need the 5 pri spots), but my cistern designs were bigger on the bottom and only had 1 stairwell.Yeah, I remember this conversation now, it has to be this way for several reasons. It's the fact that I messed with the prison area staircase that messed it up

Hospital zone doing that thing again, where it doesn't see the furniture. Toggling h off/on again fixes it. Might want to note that too, since it happens to me frequently.

"Dreamfort has a central stairs-based design. For all Dreamfort levels, place the cursor on the center (undug) tile of the 3x3 stairs area when you apply the blueprints for that level. The first surface blueprint will designate a column of stairs that you can use as a guide. If you need to extend the stairs down further to lower levels, run "quickfort run library/dreamfort.csv -n /central_stairs" with the cursor on the z-level below the lowest current stairs." Should be broken up so it is easier to copypasta. Google sheets leaves a lot to be desired. Probably make "If you need to extend the stairs down further to lower levels, run "quickfort run library/dreamfort.csv -n /central_stairs" with the cursor on the z-level below the lowest current stairs." it's own cell. Or better yet stick the command in the checklist with a note to run as needed.

250-7-1 Fall is here. The lack of manpower has hurt, although mining is crazy. We've only got 3 apt levels left to dig. The aquaducts ready to go, just need the stone hauled out of it. Might not be able to wait too long since the aquifer is starting to fill it slowly. First of our embark miners is legendary. Grower made 8. Surface4 orders done but construction not. Started making wood balls for trade caravan. Let's hope we get a nice fat migrant wave.

Liason showed this time. Caravan has leather and much needed food. The magma is very deep but we buy steel & nickel things anyway; need to do enough trade to make them ecstatic and we really don't need much.

7-27. Amazing 2nd migrant wave. 9 of them. clothesmaker 15, weaponsmith 15, metalcrafter 10, stonecrafter 15, glassmaker 6/woodcrafter 4. We assign them the relevant professions and then make a chef, 2 farmers, laborer of the rest. As soon as they settle in I'll run basic orders.

8-14 entire fort is dug. Smoothing begins.

9-05 Had a bunch of food rot again because I wasn't paying attention (got tied up seeing why miners weren't working, it somehow let me designate engrave, usually it doesn't let you designate it on unsmoothed stone), because we don't have a lot of surplus labor still and if I wasn't using autohaul the farmers would have done it (because they won't do ANY hauling with autohaul and alchemy) After counting it all up though, it was just 8 organ meat, hardly earthshattering. As a solution to that I'm going to add on-new-fortress autohauler PULL_LEVER allow; autohauler HAUL_FOOD allow to my init.

9-15 Mechanisms (of course jerk had to go eat before doing last 1) done so ordered linkages. I think at this point we can run surface6. In hindsight it would have been wise to assign one of the 2nd wave migrants as an engineer (would have cut 1 farmer I guess), he could have been linking as the mechanisms were made, and of course we're going to have a lot of traps to build & load soon. Hopefully we don't get a winter siege with a building destroyer, caverns breached (but sealed) so there is a chance of an FB that won't be able to get to us.

250-12-10 Winter has been fairly quiet. The river froze over so the aquaduct won't fill until spring, but I ordered all the stone dumped. Surface6 walls are done, still building traps. Time to order 7. Guildhall level about smoothed. Last game I didn't even have to furnish them, just engrave and they were good to go for petitioners. Beehives are all stocked. I'm having that issue again where the forester doesn't want to cut trees, and we are even below the auto-chop threshold so I don't know what's up with that. 1 tree was designated by me and the other by quickfort. Just after I typed this I un/redesignated them and he decided to go cut.

Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 29, 2021, 11:10:09 am
251-1-12 Spring has sprung! I decided I'm going to try something very ambitious. We're going to channel out pretty much the entire aquifer (all levels) and then at the first dry level just channel around the perimeter of the map, smooth and make fortifications so we can drain it all (or maybe I'll make a huge cistern I dunno). And this fucking cancellation spam, it isn't gonna fly. How do you disable this? I remember doing it once, maybe the events file. This is fucking bullshit and it has to go.

Found a solution, http://www.bay12forums.com/smf/index.php?topic=168607.0

A dingo man monster slayer petitioned for residence...Normally I don't want any non-dwarf residents, doubly so for freaky animal man hybrids, but this time I say WTF, why not, I'm sure he will die to some horrible FB or cyclops anyway and It'll be a minute before I can get a militia going. Man dingo whatevs. The very next day some speardwarf petitions too. The more the merrier. Akur Akir Akum.

2-4, 21 migrants. Mechanic 15, 2x Beekeeper 15 LOL, Tanner 15, Glazer 15 (DILLIGAF?), a Weaponcrafter 2 who is purple and italics...vampire? some kind of cursed, someone going into the volcano. Yeah, I know it's cheating, I don't GAF, I hate vampires (mainly because they don't drink booze, a fort full of immortal blood-sucking sober dorfs is just wrong on so many levels) and weres (because of the tantrum spirals they cause). They also take over the population. I came to play Dwarf Fortress. not Vampire Fortress, most certainly not Were-Man-Dingo Fortress. Want me to play fairly with them? Implement them in a way that doesn't suck and break the game. (I mean seriously if not for the great DFHack community, and especially Peri for maintaining the LNP I wouldn't touch this bug-ridden POS of a game with a 10' pole)
/rant :o

 8) But seriously, nice migrant wave (other than the shitty skills, and the lamest vampire I have ever seen, I mean seriously they are usually stacked with skills at least, don't get me started again). Several are lvl 3 soldiers, but right now we need haulers. We'll just teleport Urist McVampy into the magma, not dealing with his brand of BS. Mechanic is no brainer for Engineer. Tanner, might as well be 2nd chef. We designate 5 melee and 5 marks (from the skilled ones) - we wanted trap loaders, we got em, 2 weaklings to fill out our farmers. That leaves us 7, probably laborers. Really need a doctor. None of them skilled. Screw it, all laborers, 8 total now. I'd have liked more miners but I have 4 legendary, I don't think I want to throw any unskilled noobs in, will hold out for some skilled engravers at least. We have everything but doctor covered. If someone gets hurt we'll deal with it, otherwise I hold out hope for the next wave.

Actually I decided to cure the vampires curse http://www.bay12forums.com/smf/index.php?topic=173245.msg7932576#msg7932576 (http://www.bay12forums.com/smf/index.php?topic=173245.msg7932576#msg7932576) which caused her to die of old age. Never let it be said the overseer is not fair and just!

251-4-1 Summer again. I got so caught up with our digging project I didn't even watch the time. Surface7 finished...sometimes last season.
FFS like a full squad of merc, the petitions keep coming, leave me the fuck alone already. This digging project is another disaster, mostly because I should have started smaller, I have drains in but not enough. And they messed up the order somehow even though I channeled down with priorities, yeah fuck this, reloading.
Human caravan came by the way.

So I had to redo all this, even though I saved late spring, I forgot if you let the game rollover to the next season you've lost that save (only the save from the beginning of the season is kept as a backup)
We didn't get the vampire, we did get more or less the same migrants +1. I got the digging down to something that works, of course I got someone drowned on the 2nd section of drains. A 5 level aquifer fucking sucks, light or not. If it wasn't where the essentials are I'd bypass it. Probably should have set up a dwarven reactor and pumps or some shit. It's really too much of a pain in the ass. And then I need to dig 115 levels to magma. Joy.

Uhm, coins should be in metal stockpile, I mean they are metal, and they are their own category. Sheets should probably go over with the cloth since the craftsdwarf shop intended for it is over there. I like the new furniture heavy feeder.

Could use something to purge hair. If we select to not keep it from menu then we also don't get wool. While I like to have some to use for initial thread in hospital, having tons of the stuff around is a hassle, and I notice the dyers will waste dye on it. It has to go. Partial solution is to only allow sheep/llama/alpaca/troll hair in the feeder, all the rest go to the trash feeder. Supply dyer from QSP. I guess farmers workshop has to restricted for spinning (which is a fucking pain in the ass, it has a lot of suppliers to link), actually that and can skip the dyer then. I guess dyed it is useful as a trade good, can't automate getting it out of the shop though, no stockpile option for it. Only dying cloth and not thread is an option too. Separate dye jobs for different wool thread would work as well I guess. Spinning would have been easiest, but the conditions don't seem to work right. Ok, I guess there are viable solutions that don't involve modding raws.

Paper! I don't think you have this anywhere. Either basic or other stock. Seems good to keep 10 sheets and 10 scrolls around to stock a library.
Spoiler (click to show/hide)

252-1-26 I am so fucking done with this aquifer. I've dug out about an embark square. Standard density metal means I need to keep digging, not to mention I need the dolomite anyway. This is really not fun, it is a time-consuming micro-management chore and it is taking way too long. I think tomorrow I will just cheat the aquifer away.

I have come to the conclusion there is a grace period on noble skills. For instance, we all know the early manager doesn't even validate work orders, let alone need or gain any skill. Then there is the appraiser where the prices are accurate initially, but if you change brokers it will depend on their skill (it's very noticeable if you assign someone without appraiser). I believe that is where my manager troubles are stemming from, since the manager will go validate some orders, but with very low skill they will do like 1 or 2 and then you wait a month again.

I remember why I don't accept freeloaders. The monster hunters just stood around drinking my booze while a were-hamster warlord night creature (I shit you not) wreaked havok. I think he might even have been 1 of the freeloaders. After that I dumped them all in the cavern so they could get the action they came for. Now the few survivors are spamming me with starving and dehydrated. We haven't discovered magma yet or I'd dump them in it. There should be a way to evict these bums.

We had some fuckery with the cage stockpile where they decided to keep taking the wheelbarrows and dropping them on the bridge gates and spamming me with cancellation notices. I set the pile to 0, dumped all the wheelbarrows downstairs, waited a bit and then reassigned them. Seems to have fixed it.

I think I'm about on the edge of burnout again, all the bugs are really getting to me and I am getting sick of the game again.

Constant cancellation spam (If it isn't 1 thing it's another) digging pump stack: Miner cancels remove stairs/ramps: Forbidden area. WTAF!
Ok, I'm an idiot, I put them into siege lockdown (probably for the werebeast) and forgot to turn it off.


I think this might work better for the pump stack, of course the lowest layer needs to not channel under the middle of the pump, but it's probably easier to adjust that in game than the BP. Do similar on the E/W.
Spoiler (click to show/hide)

My manager troubles continue to baffle me. I don't get it. I unassigned completely, the office too. Then let it run a bit and reassigned him. I even cheated his skill up to 15 to see if that would help, it didn't. I had to do this several times before it finally worked. At least with the higher skill he did do all the jobs in 1 shot, because they were piling up. The job just doesn't get queued, it is the same thing when there is a problem with the fell tree job, when it is working an actual job gets queued in the list.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 30, 2021, 07:37:12 pm
Haha, well, you've certainly given me a lot to think about and refine this cycle! Give me some time to catch up.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 30, 2021, 07:46:06 pm
Haha, well, you've certainly given me a lot to think about and refine this cycle! Give me some time to catch up.

Was about to send out the search party lol!
I'm starting another new embark, I just can't take it anymore on that insane default world.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 30, 2021, 09:26:05 pm
I'm almost done with the modifications to prioritize (supporting specific reaction names) and I'm exploring what a uniforms plugin might look like. I also need to update the professions and the related documentation.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 30, 2021, 09:38:21 pm
I'm almost done with the modifications to prioritize (supporting specific reaction names) and I'm exploring what a uniforms plugin might look like. I also need to update the professions and the related documentation.

Oh goody! I'll hold off until tomorrow then (so I can test the prioritize), about ready for bed.
Besides importing uniforms from config files, I'd say the ability to copy an existing uniform would be useful. Oh, and export.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on August 30, 2021, 09:45:32 pm
There is actually already a script that can clone an existing uniform. See gui/clone-uniform (https://docs.dfhack.org/en/latest/docs/_auto/gui.html#gui-clone-uniform).

Ok, changes to the dreamfort blueprints, aliases, init script, professions, orders, and documentation have been merged. I need to go back through this thread and add what I missed to my backlog so I can address them in the next wave of updates. Filtering by reaction name in the prioritize script is in the PR (https://github.com/DFHack/scripts/pull/327) but hasn't been merged yet since Lethosor is still actively reviewing. It's fully covered by unit tests, though, so I'm pretty confident that the code is solid. There will be a new release of DFHack soon (for some value of "soon"), so I'm going to do one or two more runthroughs of dreamfort, but I won't make any more changes for now unless I find serious issues.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on August 31, 2021, 07:25:38 am
There is actually already a script that can clone an existing uniform. See gui/clone-uniform (https://docs.dfhack.org/en/latest/docs/_auto/gui.html#gui-clone-uniform).

Ok, changes to the dreamfort blueprints, aliases, init script, professions, orders, and documentation have been merged. I need to go back through this thread and add what I missed to my backlog so I can address them in the next wave of updates. Filtering by reaction name in the prioritize script is in the PR (https://github.com/DFHack/scripts/pull/327) but hasn't been merged yet since Lethosor is still actively reviewing. It's fully covered by unit tests, though, so I'm pretty confident that the code is solid. There will be a new release of DFHack soon (for some value of "soon"), so I'm going to do one or two more runthroughs of dreamfort, but I won't make any more changes for now unless I find serious issues.

Nice. Woulda saved me a lot of trouble when I used to make 6 different steel uniforms (1 for each weapon).

So I grabbed the config file changes off the PR but then I realized there isn't one for new prioritize yet :( Got it, thanks!

I won't go through all the gory details this time just the highlights. Speediest speedrun yet. Industry dug out on 3-19. We lost 2 wardogs to pack of boars and their own stupidity, at least it was 1 of each gender so we have a mating pair still. It will slow down my eventual "dogsplosion" so I'm not too tore up about it. My drafters are starving. Interesting. The plants are all dead here, even though the trees grow and all, I've embarked in this world before on this type of terrain, not had a problem with pasture. We will see. Only deviations this time were my changes to some stockpiles and I placed the farm level 3 levels down so the dig requires a bit more channeling.

Oh, I noticed (yesterday actually) that honey bee wax cake (used for wax crafting) is classed as a food item and winds up in the cookables stockpile.

Finally got around to trying a fisherdwarf (well, a legendary one showed up), he went and got some mussels and then he cleaned them. Very nice!

Ordering them to dump hair (from standing orders, refuse) doesn't keep the hair from being created in the butcher, so it's useless. The spinning job still triggers off a single piece of mule/yak/etc because you can spin them like 7 times per, but I don't think raising the number is the solution. Have to find a way that works to filter it to wool. Setting it to say "sheep wool" which is a valid choice, when combined with "unrotten hair/wool body part" (because sheep wool item of course won't work) turns the filter into "unrotten body parts" which I don't think is going to work. I don't have any wool handy right now. Then we also can't specify that we want to spin sheep wool anyway. It pisses me off how Toady can be so pedantic about shit but then doesn't provide the same level of detail in our control options. Let us filter hair, or let hair be made into cloth, or just get rid of the fucking hair. To add insult to injury necromantic hair scares everyone so it isn't like we can ignore the hair. Personally I don't even have hair.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on September 01, 2021, 10:30:26 pm
After some more testing, I've found that the "keep a small stock"-style manager orders do keep the larger one-time orders from ever getting scheduled in the workshops. This is bad, since it absolutely kills fort efficiency, but the fix is relatively simple. I added a "sort" command to the orders plugin. Running the command on repeat once a game day keeps things running smoothly. PR here (https://github.com/DFHack/dfhack/pull/1950)
...aaaand it's merged! Thanks lethosor!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on September 01, 2021, 10:33:36 pm
After some more testing, I've found that the "keep a small stock"-style manager orders do keep the larger one-time orders from ever getting scheduled in the workshops. This is bad, since it absolutely kills fort efficiency, but the fix is relatively simple. I added a "sort" command to the orders plugin. Running the command on repeat once a game day keeps things running smoothly. PR here (https://github.com/DFHack/dfhack/pull/1950)
...aaaand it's merged! Thanks lethosor!

Yeah, I saw the PR, was gonna mention. It doesn't happen to me because I habitually send the 1 shot orders to the top of the queue.
Glad you made the change, we really shouldn't have to fool with it by hand.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on September 03, 2021, 10:04:32 am
Made a few final adjustments to the orders, combining "otherstock" into "basic" (there were only three items, and now that we have "orders sort", they're safe to put in basic without fear of holding up other orders).

I also updated the pre-built dreamfort upload at dffd: https://dffd.bay12games.com/file.php?id=15434
I should add a link to that download in the blueprint library docs.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on September 06, 2021, 01:50:55 pm
So I see new release is out. Is there anything we were working on that didn't make it in?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on September 06, 2021, 06:07:43 pm
Many things, but there's always the next release.

I need to take a good slow read through the past few weeks of this thread, gather together the ideas, and work them into my backlog. Then I need to do a prioritization pass since there is always more work available than I have time to actually do :-)

I've been playing a long-running fort to make sure there aren't any emergent problems with our current setup. I embarked in a biome without any useful metals, getting all metals bit by bit through trading and sieges. I have to say I'm really pleased with the military manager orders you put together. They did an excellent job of automatically keeping my military equipped with the best weapons and armor that my fort could produce at any given time. Great job! I updated the dffd file (https://dffd.bay12games.com/file.php?id=15434) (again) with this fort, which was a bit "cleaner" than my last uploaded fort. I'm also much happier with the minimal magma moving/pump 'n dump approach you described. Much less frustrating than giant pump stacks. I found it goes acceptably quickly once I have enough materials to make 12 magma-proof minecarts and 5 magma-proof wheelbarrows.

The prioritize script might need a little work. I need to do some more testing, but I think the prioritized jobs might be starving other job types that would otherwise get picked up. It's not feasible to just keep on adding prioritized job types -- there will always be the "next" one we need to add. One potential idea is to have prioritize periodically pause operations, like for a day or two per week. I'll need to play with it a bit to see if that's the right approach, though. The only jobs I saw getting ignored were "Cage animal" jobs, but I'd like to find a general solution that is robust for any playstyle.

The particular items on my mind for the immediate future are:
- blueprint repetitions and rotations for quickfort
- continuing with the blueprint plugin overhaul plan (https://github.com/DFHack/dfhack/issues/1842) so generated blueprints are more useful and capture more map state
- preview (aka blueprint shadow) mode for quickfort
- special-purpose tools (e.g. prioritize, uniforms, linking levers, linking stockpiles, assigning minecarts)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on September 06, 2021, 08:03:23 pm
Glad the military orders are working well, that was a smart test to see how they all interact with each other. Oh, adding "Flux stones not more than 5" on iron weapons/armor has worked well for me. If you have iron and flux then you have steel even if you aren't keeping up with production. Them making iron gear exacerbates the problem since even more iron needs to be made for your lagging steel production.

Did you find a way to get the magma-proof wheel-barrows to be used for the magma hauling?

I haven't really noticed any issues with the job prioritization running your default settings. If there's a lot of hauling to the depot that can cause a very short backlog but other than that I can't think of anything. It being somewhat time sensitive I can accept it.
The manager and tree cutting jobs aren't actually being created for whatever reason when they give me trouble, and those are my main problem areas lately.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on September 07, 2021, 01:24:20 am
Did you find a way to get the magma-proof wheel-barrows to be used for the magma hauling?
it's fiddly, but no more than the rest of the "minimalist magma moving" procedure:

Quote
I haven't really noticed any issues with the job prioritization running your default settings.
It may be nothing. Evidence is anecdotal at this point. I need to write a monitoring script that keeps time-to-completion stats for all jobs so I can do some proper analysis.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on September 07, 2021, 12:47:01 pm
I guess that works. I just let them burn a few wooden ones, but then if I was in a treeless embark I'd probably be more inclined not to.

Oh, I updated the embark profile. The link should remain the same though, the (internal) title will have 2.0 in it.
Sanity check it for me if you get a chance.

Shell crafts could go into basic I guess (using fisher now that we've made it less obnoxious).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on September 07, 2021, 04:59:29 pm
Ok, what's next?

First, there are a few loose ends to tie up with Dreamfort and the supporting files, as well as bugs that have been getting on my nerves:

Then, I'd like to finish milestone 2 of the blueprint overhaul plan (https://github.com/DFHack/dfhack/issues/1842):

Then I'll get back to automation tools:

That's kind of a lot of work to queue up at once, so plans might change. I'd like to fit features for quickfort in there somewhere too, like preview mode and blueprint repetitions/translations. If there are requests from the community, I can bump those up in priority.

ldog: profile looks good. I like your decision to make the seventh dwarf a farmer instead of the craftsdwarf that I have. I think I'll borrow that. There is an old reference to making 4 nestboxes that I think no longer applies now that the profile only includes 2 geese.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on September 08, 2021, 08:43:21 am
Thanks for checking! Yes, the farmer as a 7th worked out much better in the last few tests than the craftsdwarf or chef.
Without the farmer I felt like I just couldn't get caught up on the farming, even when the 1st wave brought a skilled farmer.

So I am crashing constantly with the new LNP, but the save is from the last one. Although it isn't like DF versions changed in between and I had been using the experimental DFHack anyway.
I'm not sure if it is to do with the magma hauling or something else. I've noticed the jobs being a bit fussy, like if a stockpile job got a hold of the cart it won't release, even if I force cancel it and assign it to a hauling route. Instead of queueing the job to put it on the route it requeues the stockpile job.

Such a strange fall it's been. Migrants on 1st day. A necromancer siege, a cyclops and then a wave of keas.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on September 09, 2021, 08:19:12 am
I decided to add iron bolts since if we don't have copper we still need metal bolts (ran into that in that default world gen).
I made the order as a last resort rather than an upgrade, so the checks will prefer bronze>bismuth bronze>copper>iron.

I also got around to adding bismuth bronze weapons/armor, it sits between bronze and iron. It's a slight upgrade since it's a little more valuable, but more importantly it can stretch out the tin supply a little.
I left the bolts below normal bronze though.

https://drive.google.com/file/d/1fAu-lae1_HewP_DEX2hyR_dGNyUfRw18/view?usp=sharing
This is the add and changes (to bronze and copper), it also has the flux on iron. Does not have the unchanged military items.

Slurry (food, paste) should be removed from kitchen and moved to textiles misc liquids since it needs a barrel.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on September 11, 2021, 02:42:02 am
Sorry for the slow reply -- I've been working on the blueprint plugin, updating the core data structures and algorithm and doing performance testing to make sure it works on large embarks (results in the PR (https://github.com/DFHack/dfhack/pull/1965), but short version: after several rewrites, it's now twice as fast and uses half the memory).

I put up the changes I've done to dreamfort and the supporting files here (https://github.com/DFHack/dfhack/pull/1966). Thank you for the orders updates! I'll get those incorporated before I merge. I also need to do some more playtesting to double check that the recent changes all work as expected.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on September 11, 2021, 08:25:22 am
You feel comfortable with only 1 architect to start (cutting from masons)? I guess with the prioritize running it might be doable but I think surface7 6 is going to be a big issue when the mechanic is already overstretched making mechanisms, building levers, linking levers, building traps and loading traps. Although I probably should prioritize adding another engineer by 2nd wave at the latest anyway. I think industry3 might bog down too. I'm due for a new test though so will give it a try (old save still crashing frequently even several seasons gone by).

I think 20 flux is too much on the iron gear, I went with 5 in case it was being traded for or some other obscure case that I might have overlooked, otherwise I would have went with 1 honestly. I really don't want them to bother if the capability is there for steel.

The soldier professions I removed siege & pump as well as architect; off-duty I only want them hauling, reloading traps, recovering wounded. I have mixed feelings on the pumping, since it's great strength-training. Before we started doing this thing with the professions I used to enable it for everyone actually.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on September 11, 2021, 05:23:35 pm
The 1 architect is experimental -- I haven't tested any of these changes yet (which is why the PR is WIP). It's just that I noticed that dwarf 1 (the generalist) normally ends up being a hauler, so why not give him the "in-profession" skill? I'm just looking for opportunities to minimize manual fiddling with labors. We'll see if it works out.

re: number of flux: my mistake -- I had put 20 since I misremembered that as the threshold for pig iron making and I didn't want to deadlock, but it's 5. Will fix.

Good points with the soldier professions. I'll make that change too.

edit: PR (https://github.com/DFHack/dfhack/pull/1966) updated. I reordered the orders to match their priority, shifted the conditions on the bolts from bolts of other types of metals to bars (like what we do for the weapons and armor), fixed of by one errors that we've had in the conditions (that is, I switched a bunch of conditions from at most to less than), and added bismuth bronze maces, which were missing.

I also changed the thresholds of weapons to 10 of their source bar type, leaving armor at 20. That way if we run low on materials, at least we'll have a few weapons. Not sure if that is balanced correctly, though. Will have to test.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on September 12, 2021, 11:45:33 am
I meant removing architecture from the masons effectively cuts you down to 1. The engineer/hauler always had it as a job.
So it didn't really make a difference on industry level (even with only 2 migrants, 1 of whom was a child...FML), of course running surface3 first & having to wall up aquifers delayed it anyway, but I forgot it is only the furnaces & forge that need architecture at that point anyway, so it's no hardship. The prioritize jobs really shines here. Actually keeping the masons focused at this point is better anyway so it seems like a good change.

I like the light aquifer water supply you did. It's easy and works nicely. Should add it to general quickfort blueprints. Making aquifers great again!

By the way, you don't need to wall the corners of aquifers if you don't dig them out. The water only spawns on the orthogonals not the diagonals. Although it does look much neater as a full square.

2nd migrant wave was more generous and besides assigning a 2nd engineer I designated 2 melee, and really there's little excuse to not designate at least 1 more engineer by then. I'd say a craftsdwarf, chef, laborer, 2nd farmer are a must. Everything else can wait until the 3rd wave if need be.

So remember I was saying platinum crossbows weren't used with "crossbow" as assigned weapon, well "individual choice, ranged" they will prefer the platinum. There is an iron, copper and several wood and they didn't grab any of them.

Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on September 17, 2021, 03:44:40 pm
That is a good point about not having to dig and wall up the corners of aquifers. At the start of the game, that would save a non-negligible amount of time and resources. Also yay for platinum crossbows : ) I'm glad they get used without manual poking.

Until I get them properly documented and merged, here are some of my "auxiliary" blueprints that I use:

extrasetup.csv: sets up a "clearcutting area" burrow for use with autochop, sets professions of starting dwarves with dwarf manipulator (assumes the example professions are defined and nothing extra is in the list), and disassembles the starting wagon
Spoiler (click to show/hide)

aquifertap.csv: turns a light aquifer into a fresh water source for your wells
Spoiler (click to show/hide)

and my personal favorite:
prisoner.csv: adds a prisoner quantum stockpile in the dreamfort barracks, taking from the animal stockpile 5 tiles to the north. I'm considering integrating this one into dreamfort since I find it so useful, despite the extra documentation that it will require (instructions for how to unforbid all, stripcaged all, ensure soldiers are training in barracks, assign stripped prisoners to pasture, etc.)
Spoiler (click to show/hide)

Also, status update: I've been working on the blueprint plugin and the gui/blueprint script. Updating the gui script to let you select a playback start position for the generated blueprint turned out to be much trickier than I thought it would be! GUIs are never simple...

I'm also writing a job latency analysis script so I can visualize how all our automation orders are interacting and see whether there are any more important job types that should be prioritized. I'm also curious what the totals are going to be for all the different job types. For every job type, I'll be tracking:

For measuring latency, I'm defining latency buckets that we can group by. I'm thinking we'll want to know:

I figure this might translate to: 1 hour, 1 day, 1 week, and >= 1 month
Though I'll have to run some tests to see whether these latency cutoffs make sense. How long do different things take to rot?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on September 26, 2021, 03:15:31 pm
Alright, I've merged the cleanup (https://github.com/DFHack/dfhack/pull/1966) changes (https://github.com/DFHack/dfhack/pull/1969) for Dreamfort and completed all the milestone 2 tasks for the blueprint overhaul (https://github.com/DFHack/dfhack/issues/1842).

I'm still working on a tool that will measure fort efficiency so we can objectively determine whether the "efficiency" tooling we're writing is actually helping, and whether changes to those tools are making things better or worse. The challenge I've run into is figuring out whether a job was completed successfully or whether it was canceled, and if it was canceled, whether it was canceled by the player or whether it was canceled because of lack of required materials. This is important because canceled tasks are "completed" quickly, and they would make the fort appear much more efficient than it really is, from a job latency perspective.

There are also a few things I've been discussing on the Discord server that I'd like to implement:
For the API, I was thinking of this:
Code: [Select]
quickfort.apply_blueprint(params)

Applies the specified blueprint data and returns processing statistics. The
statistics structure is a map of stat ids -> {label=string, value=number}.

params is a table with the following fields:
  mode (required) - The name of the blueprint mode, e.g. 'dig', 'build', etc.
  data (required) - A sparse map populated such that data[z][y][x] yields the
      blueprint text that should be applied to the tile at map coordinate
      x, y, z.
  command - The quickfort command to execute, e.g. 'run', 'orders', etc.
      Defaults to 'run'.
  pos - A coordinate that serves as the reference point for the coordinates
      in the data map. That is, the text at data[z][y][x] will be shifted to
      be applied to coordinate pos.x + x, pos.y + y, pos.z + z. If not
      specified, defaults to {x=0, y=0, z=0}.
  aliases - a map of query blueprint aliases names to their expansions. If
      not specified, defaults to {}.
  dry_run - Just calculate statistics; don't actually apply the blueprint.
      Defaults to false.
  verbose - Output extra debugging information to the console. Defaults to
      false.

Example:

local guidm = require('gui.dwarfmode')
local quickfort = reqscript('quickfort')
-- dig a 10x10 block at the cursor position
quickfort.apply_blueprint{mode='dig', data={[0]={[0]={[0]='d(10x10)'}}},
                          pos=guidm.getCursorPos()}
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on October 04, 2021, 05:32:52 pm
Nice!
I'll have to give the burrows a try next go. I don't use them much outside of lockdown, but I was thinking of doing an underground treefarm currently (have multiple soil layers).
Already using the aquifer tap.
Prisoner dump too, although you've got it taking empty cages, I don't know if that was on purpose or an oversight. I also move it up 2 tiles, so the QSP is in the center. The troops tend to congregate more on the north end, and 2 less tiles hauling a full cage with no wheelbarrow is 2 less tiles. It could honestly go up 3 with the track stop right next to the door but I like to keep some spacing.

You could parse events from the log file for cancellation/completion (like Soundsense does).

Wipe and re-engrave would be awesome if you can pull it off!

Forgot if I mentioned, added a small (4 tiles around the metal QSP) pile for flux, because having the visual indicator saves me aggravation. I do a bronze pile too (I always wind up moving the sand anyway). Left the larger combined misc liquids pile where you have it since slurry needed to be added too, upped the max barrels to max (6).

Your apt level screenshot in guide is still old plan.

Example guide can strike "Late game, you can turn off their Architecture labor since that will be better handled by your Haulers." from Mason description since we removed it.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 16, 2022, 11:36:58 am
I just finished working on a feature request (https://github.com/DFHack/dfhack/issues/1998) to support repeating blueprints up and down z-levels. This enables me to finally include repeatable blueprints in the blueprint library.

I spent some time prepping a pump_stack blueprint set.  `repeat` makes it much much cleaner. Before, my pump_stack blueprint set had meta blueprints that included the base "pump from north" and "pump from south" blueprints various numbers of times. To apply the blueprints to your map, you'd use the largest size blueprint until you ran out of space, then the smaller sizes to fill the gaps. This was really really annoying (which is why I haven't included the blueprint in the library yet). Now with the --repeat commandline param, we just need a single 2-level blueprint and the user can specify exactly how many times to repeat it with a single command.

However, the blueprint set also had a copy of the north-south blueprints to accommodate east-west pump stacks.  I realized I could simplify the blueprints even further if we supported Euclidean transformations (rotations, reflections, translations). That way, we really only need the one north-south stack, and the user can rotate/flip it as necessary. This is even more powerful than having separate north-south and east-west blueprints since the position of the staircase can be adjusted to the user's preference.

Long story short, repeat is merged, but while I'm in this part of the code, I'm adding support for transform and shift as well.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 16, 2022, 11:45:37 am
I just finished working on a feature request (https://github.com/DFHack/dfhack/issues/1998) to support repeating blueprints up and down z-levels. This enables me to finally include repeatable blueprints in the blueprint library.

I spent some time prepping a pump_stack blueprint set.  `repeat` makes it much much cleaner. Before, my pump_stack blueprint set had meta blueprints that included the base "pump from north" and "pump from south" blueprints various numbers of times. To apply the blueprints to your map, you'd use the largest size blueprint until you ran out of space, then the smaller sizes to fill the gaps. This was really really annoying (which is why I haven't included the blueprint in the library yet). Now with the --repeat commandline param, we just need a single 2-level blueprint and the user can specify exactly how many times to repeat it with a single command.

However, the blueprint set also had a copy of the north-south blueprints to accommodate east-west pump stacks.  I realized I could simplify the blueprints even further if we supported Euclidean transformations (rotations, reflections, translations). That way, we really only need the one north-south stack, and the user can rotate/flip it as necessary. This is even more powerful than having separate north-south and east-west blueprints since the position of the staircase can be adjusted to the user's preference.

Long story short, repeat is merged, but while I'm in this part of the code, I'm adding support for transform and shift as well.

Awesome!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 18, 2022, 01:19:33 pm
I'm finishing up unit tests for the transformation code. In the meantime, here's how the pump stack blueprint turned out (lightly reformatted for posting):

Code: [Select]
#notes label(help)
A pump stack is useful for moving water or magma up through the z-levels.

To use these blueprints:

1) Measure how many z-levels the pump stack should span.

2) Position the cursor on the bottom level of the future pump stack. It should be on the z-level
  just above the liquid you want to pump. Run "quickfort run library/pump_stack.csv -n /dig2SN"
  to see where the suction hole will end up. Replace "run" with "undo" in the previous command to clean up.

3) If you need an East-West pump stack, or if you need the staircase in another spot, use the "--transform"
  commandline option to alter the blueprint to your needs. For example:
  "quickfort run library/pump_stack.csv -n /dig2SN --transform rotcw,fliph". If you use a transformation, be
  sure to use the same option for the remaining commandlines.

4) Once you have everything lined up, run "quickfort run library/pump_stack.csv -n /dig2SN --repeat up,20"
  to designate the entire pump stack for digging. Replace that last "20" with the height of your pump stack
  divided by 2 (since each repetition of /dig2SN is two z-levels high). If the height ends up being one too
  many at the top, manually undesignate the top level.

5) Since you do not need to transmit power down below the lowest level, replace the channel designation on
  the middle tile of the bottom-most pump stack level with a regular dig designation. Likewise, replace the
  Up/Down staircase designation on the lowest level with an Up staircase designation.

6) After the stack is dug out, prepare for building by setting the buildingplan plugin material filters for screw
  pumps (b-M-s-M). If you are planning to move magma, be sure to select magma-safe materials.

7) Finally, position the cursor back on the access stairs on the lowest level and run
  "quickfort run library/pump_stack.csv -n /build2SN --repeat up,20" (with 20 replaced with your desired
  repetition count and with your --transform command, if any).

Sometimes, a screw pump will spontaneously deconstruct while you are building the stack. This will reduce
the efficiency of the stack a little, but it's nothing to worry about. Just re-run the /build2SN blueprint over
the entire stack to "fix up" any broken pieces. The blueprint will harmlessly skip over any correctly-built
screw pumps.

See the wiki for more info on pump stacks: https://dwarffortresswiki.org/index.php/Screw_pump#Pump_stack

#dig label(digSN) start(2;4;on access stairs) hidden() for a pump from south level

,,,d
,,,h
,i,d,d
,,,h

#dig label(digNS) start(2;4;on access stairs) hidden() for a pump from north level

,,,h
,d,d,d
,i,,h
,,,d

#meta label(dig2SN) start(at the bottom level on the access stairs) 2 levels of pump stack - bottom level pumps from the south
/digSN
#<
/digNS
#build label(buildSN) start(2;4;on access stairs) hidden() for a pump from south level

,,,`
,,,~
,`,`,Msm
,,,`

#build label(buildNS) start(2;4;on access stairs) hidden() for a pump from north level

,,,`
,`,`,~
,`,,Msu
,,,`

#meta label(build2SN) start(at the bottom level on the access stairs) 2 levels of pump stack - bottom level pumps from the south
/buildSN
#<
/buildNS

online version of that blueprint here (https://docs.google.com/spreadsheets/d/1TP2n-W-O9f30Dtl6yoTcn6yczWQRu11iM7U6TEE9634/edit#gid=1217070605)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 19, 2022, 11:04:24 pm
I realized I never replied to your earlier post. Sorry about that!
Already using the aquifer tap.
I'm fixing this up for inclusion next. It needs a good bit of help text to describe how to set up drainage to safely dig out the tap.
Quote
Prisoner dump too, although you've got it taking empty cages, I don't know if that was on purpose or an oversight.
It takes empty cages by design. Otherwise they can fill up the stockpile north of the barracks when you "process" all the caged prisoners in the quantum stockpile.
Quote
Wipe and re-engrave would be awesome if you can pull it off!
This is merged. Quickfort now avoids designating tiles for digging/track engraving if the tiles contain masterwork engravings. The quality of engraving to protect is configurable.
Quote
Forgot if I mentioned, added a small (4 tiles around the metal QSP) pile for flux, because having the visual indicator saves me aggravation.
Good idea. I shrunk the coal stockpile and added visual indicators for flux and iron.
Quote
Your apt level screenshot in guide is still old plan.
Yeah, I need to update the screenshots for apartments and now industry too
Quote

Example guide can strike "Late game, you can turn off their Architecture labor since that will be better handled by your Haulers." from Mason description since we removed it.
Thanks! Done.

Transformations are merged and Dreamfort has been updated to take advantage of the new features. This might be the first update to Dreamfort that actually resulted in a *smaller* file size : )
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 25, 2022, 07:29:54 pm
I finished writing the help text for the aquifer tap. The walkthrough turned out longer than I would like, but hey, routing water is complicated!

Code: [Select]
#notes label(help)
This blueprint will help you get a safe, everlasting source of fresh water
from a light aquifer.

Here's the procedure:

1) Dig a tunnel from where you want the water to end up (e.g. your well
cistern) off to an unused portion of the map.

2) From the end of that tunnel, dig a staircase straight up to the z-level
just below the lowest aquifer level. Also dig the staircase down one z-level.

3) From the bottom of the staircase (the z-level below where the water
will flow to your cisterns), dig a one-tile wide tunnel to the edge of the
map. Smooth the map edge tile and carve a fortification. The water can
flow through the fortification and off the map, allowing the dwarves to dig
out the aquifer tap without drowning.

4) Place a lever-controlled floodgate in the drainage tunnel and open the
floodgate.

5) If you care about how nice things look, haul away any boulders and
smooth the tiles. You won't be able to access any of this area once it fills
up with water!

6) Apply this blueprint to the z-level above the top of the staircase, inside
the lowest aquifer level. Do not unpause until after the next step.

7) Damp stone cancels adjacent dig designations if the tile is currently
hidden, so to avoid having to re-apply this blueprint after every tile your
dwarves dig, position the cursor straight up (north) of the left-most tile
designated for digging and straight left (west) of the topmost designated
tile and run the following commands in the DFHack console:
tiletypes-command f any ; f designated 1 ; p any ; p hidden 0 ; r 23 23 1
tiletypes-here

8) Unpause and dig out the tap. If you care about appearances, haul away
any boulders and feel free to remove the ramps (d-z). The water will safely
flow down the staircase, through the open floodgate, and off the map until
you choose to close the floodgate.

9) Once everything is dug out and all dwarves are out of the waterways,
close the floodgate. Your cisterns will fill with water. Since the waterway to
your cisterns is depressurized, the cisterns will stay forever full, but will not
flood.

A diagram might be useful. Here is a vertical view through the z-levels. This
blueprint goes at the top:

j  <- center of this blueprint
i
... <- make this as tall as you need
i
i <- cistern outlet level
u <- drainage level

Good luck! If done right, this method is the safest way to supply your fort
with clean water.

Here's the online version: https://docs.google.com/spreadsheets/d/1kwuCipF9FYAHNP9C_XlMpqVseaPu4SmL9YLUSQkbW4s/edit?usp=sharing

What do you think? Is this clear? Can you visualize what you have to do from the help text? I also plan to link to https://docs.dfhack.org/en/stable/docs/guides/quickfort-library-guide.html#example-plumbing-to-fill-cisterns to show what the pressure break should look like.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on February 26, 2022, 10:24:32 am
I finished writing the help text for the aquifer tap. The walkthrough turned out longer than I would like, but hey, routing water is complicated!

Code: [Select]
#notes label(help)
This blueprint will help you get a safe, everlasting source of fresh water
from a light aquifer.

Here's the procedure:

1) Dig a tunnel from where you want the water to end up (e.g. your well
cistern) off to an unused portion of the map.

2) From the end of that tunnel, dig a staircase straight up to the z-level
just below the lowest aquifer level. Also dig the staircase down one z-level.

3) From the bottom of the staircase (the z-level below where the water
will flow to your cisterns), dig a one-tile wide tunnel to the edge of the
map. Smooth the map edge tile and carve a fortification. The water can
flow through the fortification and off the map, allowing the dwarves to dig
out the aquifer tap without drowning.

4) Place a lever-controlled floodgate in the drainage tunnel and open the
floodgate.

5) If you care about how nice things look, haul away any boulders and
smooth the tiles. You won't be able to access any of this area once it fills
up with water!

6) Apply this blueprint to the z-level above the top of the staircase, inside
the lowest aquifer level. Do not unpause until after the next step.

7) Damp stone cancels adjacent dig designations if the tile is currently
hidden, so to avoid having to re-apply this blueprint after every tile your
dwarves dig, position the cursor straight up (north) of the left-most tile
designated for digging and straight left (west) of the topmost designated
tile and run the following commands in the DFHack console:
tiletypes-command f any ; f designated 1 ; p any ; p hidden 0 ; r 23 23 1
tiletypes-here

8) Unpause and dig out the tap. If you care about appearances, haul away
any boulders and feel free to remove the ramps (d-z). The water will safely
flow down the staircase, through the open floodgate, and off the map until
you choose to close the floodgate.

9) Once everything is dug out and all dwarves are out of the waterways,
close the floodgate. Your cisterns will fill with water. Since the waterway to
your cisterns is depressurized, the cisterns will stay forever full, but will not
flood.

A diagram might be useful. Here is a vertical view through the z-levels. This
blueprint goes at the top:

j  <- center of this blueprint
i
... <- make this as tall as you need
i
i <- cistern outlet level
u <- drainage level

Good luck! If done right, this method is the safest way to supply your fort
with clean water.

Here's the online version: https://docs.google.com/spreadsheets/d/1kwuCipF9FYAHNP9C_XlMpqVseaPu4SmL9YLUSQkbW4s/edit?usp=sharing

What do you think? Is this clear? Can you visualize what you have to do from the help text? I also plan to link to https://docs.dfhack.org/en/stable/docs/guides/quickfort-library-guide.html#example-plumbing-to-fill-cisterns to show what the pressure break should look like.

Good. Yes, it is clear and even after a long hiatus from the game it gives a good picture of what is going on.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on February 26, 2022, 11:08:44 pm

Good. Yes, it is clear and even after a long hiatus from the game it gives a good picture of what is going on.

Thanks! Merged.

Next up is the prisoner processing system for Dreamfort. Integrating the blueprint into the Dreamfort blueprints was easy. Again, the help text is the hard part. It needed to be written, though. Dreamfort is designed to be highly defensible, but I never documented exactly *how* I expect players to defend it. This is what I came up with:

Quote
Sieges and Prisoner Processing:

Here are some tips and procedures for handling seiges --
including how to clean up afterwards!

- Ensure your "Inside" burrow includes only below-ground
areas and safe surface areas of your fort. In particular, don't
include the "atrium" area (where the "siege bait" zone is) or
the trapped hallways.

- When a siege begins, set the alert to "Siege" to ensure all
your civilians stay out of danger. Immediately pull the lever
to close the outer main gate. It is also wise to close the
trade depot and inner main gate as well. That way, if enemies
get past the traps, they'll have to go through the soldiers in
your barracks.

- During a siege, use the levers to control how attackers path
through the trapped corridors. If there are more enemies than
cage traps, time your lever pulling so that the inner gates snap
closed before your last cage trap is sprung. Then the remaining
attackers will have to backtrack and go through the other
trap-filled hallway.

- If your cage traps fill up, ensure your hallways are free of
uncaged attackers, then close the trap hallway outer gates
and open the inner gates. Unset the civilian alert and allow
your dwarves to reset all the traps -- make some extra cages
in preparation for this! Then re-set the civilian alert to "Siege"
and open the trap hallway outer gates.

- Once the last attacker is caged, open all the gates and unset
the civilian alert. Life is normal again!

After a siege, you can use the caged prisoners to safely train
your military. Here's how:

- Once the prisoners are hauled to the "prisoner quantum"
stockpile, run "stripcaged all" in the DFHack console.

- After all the prisoners' items have been confiscated, bring
your military dwarves to the barracks (if they aren't already
there).

- Use the zone (i) menu to assign a group prisoners to the
pasture that overlaps the prisoner quantum stockpile

- Hauler dwarves will come and release prisoners one by one.
Your military dwarves will immediately pounce on the released
prisoner and chop them to bits, saving the hauler dwarves
from being attacked. Repeat until all prisoners have been
"processed".

Is that sufficiently clear? I haven't merged these changes yet since I want to do a little more testing first. The PR is up, though: https://github.com/DFHack/dfhack/pull/2017/files

I also redid all the annotated images in a real graphics app (GIMP instead of my screenshot capture app). Since the urls didn't change, the new images should already be visible in the current blueprint library guide: https://docs.dfhack.org/en/stable/docs/guides/quickfort-library-guide.html#visual-overview
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on March 01, 2022, 08:38:57 am
Yeah, that's a handy write-up.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on March 10, 2022, 05:55:38 pm
DFHack-0.47.05-r4 (https://github.com/DFHack/dfhack/releases/tag/0.47.05-r4) is released!

Lots of quickfort and blueprint improvements, and some good updates to dreamfort (see the fancy new screenshots (https://docs.dfhack.org/en/stable/docs/guides/quickfort-library-guide.html#visual-overview)) and the blueprint library (https://docs.dfhack.org/en/stable/docs/guides/quickfort-library-guide.html#miscellaneous).

Blueprint transformations (rotations, flipping, etc.) are in this release, but they aren't accessible from gui/quickfort yet. I'm planning on providing interactive rotation support in a new preview viewscreen, which will overlay the active map with indicators for where a blueprint will make changes. I gathered my thoughts on this feature here (https://github.com/DFHack/dfhack/issues/2018), if anyone is interested in the gory technical details or wants to provide input for the design.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on March 12, 2022, 09:07:04 pm
I uploaded a new fully built dreamfort to dffd if anyone would like to play around with it without having to actually build it from scratch: https://dffd.bay12games.com/file.php?id=15434
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: MYSTICBADGER on March 24, 2022, 03:16:01 am
Hello, I'm using the blueprint gui to generate my own blueprints, but every time I generate them, I can't find them. They don't seem to be generated anywhere. My df folder is not in a system location, so I don't know why it doesn't create the files.
Any ideas for me ?


Edit : found it ! They were in my df folder, not the quickfort folder
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on March 24, 2022, 08:43:09 am
They get generated in the blueprints subdirectory in your df folder, which is the same place that quickfort looks for blueprints to run. Were you expecting them to appear in the dfhack-config/quickfort directory? I could add a note to the success message when you generate a blueprint with blueprint or gui/blueprint to make this more clear. Would that have helped?

edit: actually, I see that we already output the full (relative) path to the generated blueprint file -- it includes the "blueprint/" directory prefix.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on March 25, 2022, 11:11:18 pm
A brief update on what I've been working on.

I got basic blueprint transformation capabilities into the last DFHack release. It works great for simple blueprints. It handles the majority of library blueprints just fine. It does have a few limitations, though, that prevent it from being a complete general solution.

First, it transforms the location of a cell with expansion syntax (e.g. d(15x20)), but it doesn't transform the shape of the expanded area. For example, a 5 by 1 area rotated clockwise would properly come out as a 1 by 5 area if each cell were individually designated (e.g. d,d,d,d,d), but if you use the equivalent expansion syntax (d(5x1)), the designation would start at the correct cell, but you'd still get a 5x1 area instead of a 1x5.

Second, buildings get rotated around to the correct tiles, but if the building has a direction associated with it, like which direction a bridge opens or whether an axle is horizontal or vertical, that direction is not modified. This makes rotated versions of these building types not work as expected.

Third, quickfort supports just specifying the center tile of a building on a blueprint and it will automatically expand the footprint of the building to the building type's regular dimensions. For example, you just have to write a single wm to designate an entire 3x3 mason's workshop. Rotation doesn't change anything.. unless the building type has both a fixed size and is not a square. In the current version, these buildings get expanded in different directions depending on the rotation.

Finally, cursor movements on query blueprints don't get modified at all by transformations. If you have one stockpile configured to give to an adjacent workshop, and then you rotate the blueprint, the cursor movements will go off in the wrong direction and the blueprint will error out.

Now, none of this worked correctly in the original python-based quickfort either, but I think we can do better.

Expansion syntax handling is already implemented and merged. As a side benefit, you can now use negative numbers in expansion syntax. This means that you can designate rectangles from any corner now. This includes designations for carved tracks, so it won't be quite as complicated as before to carve track corners.

I've started on implementing rotating direction-specific buildings and footprint expansion. It turned out to be a lot more difficult than I originally expected. Each key sequence that indicates a building type on a blueprint needed an associated database for which other building key sequences it could turn into for each kind of transformation. I'm writing regression tests for my implementation right now.

I have ideas for how to automatically adjust map cursor movements on query blueprints, but I'll write more about that later once I figure out what is feasible.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on April 01, 2022, 11:28:23 pm
Ok, building rotation and query blueprint cursor rotation are merged. I was worried that I would have to require blueprint authors to use different keywords for map cursor movements, like "MapCursorUp" and "MapCursorLeft" instead of the usual "Up", "Left", etc. Luckily, I could just do a simple check for whether the map is visible before sending each key to the UI (thank you, lethosor, for the suggestion!). For the viewscreens where the map is visible, I rotate the cursor keys according to any rotation applied to the parent blueprint. Easy peasy : )

Now I can finally get back to the two larger projects I've been planning: the blueprint overhaul (https://github.com/DFHack/dfhack/issues/1842) and the interactive quickfort interface (https://github.com/DFHack/dfhack/issues/2018).

The blueprint plugin still needs a bit of work before I'm happy with it. I want it to capture a lot more map information than it is now.

And the quickfort interactive interface, that will just be really nice to be able to visually adjust the position of a blueprint before applying it. It will take a lot of the guesswork out of figuring out where to apply a blueprint.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on April 08, 2022, 10:39:46 am
Work on the UI is progressing nicely. You can load a blueprint and see a shadow on the map where the blueprint will do something, and any tiles that will not accept the changes the blueprint wants to make will flash in red. You can move the cursor around and the shadow will move with you, dynamically updating which tiles would accept the changes and which would not. Locking the position works too, allowing you to move the cursor around without moving the blueprint so you can inspect how the blueprint will be applied on different z-levels (for multi-level blueprints) or off to the sides of the current visible viewport (for very wide/tall blueprints).

I might stop here to clean up the code and get things merged. The UI is perfectly useful and usable at this point, and there were a number of bugs I fixed and behavior changes I made in the core DFHack Lua libraries that I'd like to get discussed, reviewed, and merged.

After that, the next steps for the UI are:

I wasn't sure if that last one would be necessary, but it looks like recalculating the shadow for large blueprints (like Dreamfort's /dig_all blueprint that designates digging for the entire fort) does noticeably slow the cursor down.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on May 09, 2022, 06:47:36 pm
So the new UI is in the latest release (DFHack 0.47.05-r5), but I totally forgot to add it to the release notes :! Oh well, there's more improvements to make anyway. I'll make a grand announcement for the next release ; )
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on May 10, 2022, 10:08:09 pm
So the new UI is in the latest release (DFHack 0.47.05-r5), but I totally forgot to add it to the release notes :! Oh well, there's more improvements to make anyway. I'll make a grand announcement for the next release ; )

Very cool! I love it.

Couple tweaks from playing:
Strand extraction should be done in Stonecrafter since the raw adamantine is going there and we don't want it carried halfway across the workshop by hand.
Metal thread needs to go to the bar/military feeder so that it can be used to make wafers (if locking down smelter input, see below). Will also keep it from being dyed.
I'm finding it essential to issue give orders for certain stockpiles to workshops-
Smelters, which are a pain because the list is long but metalworker quantum, ore/clay feeder, flux, coal, both melt piles to all smelters. Otherwise they haul from all over with no wheelbarrow.
Dyer from cloth/bones quantum & feeder. Also remove all refuse>hair/wool>except sheep, llama, alpaca, troll from the feeder. Add them to the trash feeder. While there seems to be no way to prevent useless hair from being woven in the farmers shop (unless you turn off all hair and forego wool) but you can at least keep it from being dyed. A bit of hair thread to get hospital started is good, after that it is a nuisance.
I've also had issues with the dye items condition being too high, 3 seems to work better since it counts bags instead of amount of dye. My issue is partially from using combine-plants, which means my dye bags have 12 units. I am starting to only use combine-drinks because of this.
Useful to put a storage pile under the dump on services level; since I have not found a way to prevent soldiers flinging their clothes all over and letting them rot, at least the stripowned will dump them here and they can be sent to trade depot and/or pulled back into feeders on industry level.

Might be others, I'm having some wierd issues again. Junk accumulating in wheel barrows. Also the cookable food pile will not use barrels. I have even deleted and recreated the pile. If I set the plants pile to take say meat, they will grab it all and put it in barrels there. 3 steel minecarts constantly being tasked but having no jobs. I've had them sitting in melt pile for some time now even since I got fed up trying to cart magma with them.

So it was exactly the wheelbarrow fuckup that was messing up the food pile, some assigned barrels were stuck in the mess. It was a huge amount of items being carted around for some reason.

Justice system is getting to be annoying as fuck. I am constantly prosecuting artifact thefts. I think it's time to add more jail cells, 2 more would fit easily on top at least.
Getting really sick of this bullshit. Lately I feel like every new feature is total crap.
I am debating the age old wisdom of the weak featherweight xbow wielding justice squad and thinking of going full hardass melee because I want these people dead. Just have to be careful watching the mandates so honest hard working dwarves don't get damaged.
On a side note, it was a lot of fun loading up one of your saves where shortly after unpausing the captain of the guard goes and rams his fist through someones head.

I'm also rethinking the overly comfy jail and other people going there to hangout, eat and drink. Mostly it's foreign scum doing long sentences; I could give a fuck less about their well-being and in fact since they don't hand over the artifacts when caught, if they end up dead then bonus. 1 room,mass chains and cages.

Guard captain's office should probably be on services level too since it is used for "interviews" , saves walking to/from noble level.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on May 19, 2022, 07:58:44 pm
Sorry for the slow reply. I've been getting more involved in the other areas of DFHack development and trying to prepare what we can for the Steam release.

Very cool! I love it.
Thanks! Once I get blueprint transformations in, gui/quickfort will be feature complete, and then I can work on performance issues for larger blueprints.

Quote
Strand extraction should be done in Stonecrafter since the raw adamantine is going there and we don't want it carried halfway across the workshop by hand.
done.

Quote
Metal thread needs to go to the bar/military feeder so that it can be used to make wafers (if locking down smelter input, see below). Will also keep it from being dyed.
done. this required an update to the common aliases file, so be sure to update that if pulling the new dreamfort.csv!

Quote
I'm finding it essential to issue give orders for certain stockpiles to workshops-
Smelters, which are a pain because the list is long but metalworker quantum, ore/clay feeder, flux, coal, both melt piles to all smelters. Otherwise they haul from all over with no wheelbarrow.
I feel your pain, but I'm going to hold off on this change for two reasons:
1) this can confuse players with cancellation spam
2) all those workshops will likely get replaced with magma versions at some point

Quote
Dyer from cloth/bones quantum & feeder.
Done. Also moved the dye from the goods quantum to the cloth quantum. Food won't rot in a refuse stockpile, just clothes and armor (according to the wiki (http://dwarffortresswiki.org/index.php/DF2014:Refuse))

Quote
Also remove all refuse>hair/wool>except sheep, llama, alpaca, troll from the feeder. Add them to the trash feeder.
I updated the "craftrefuse" alias to include this restriction for hair/wool. Thanks!

I'll address the rest in a bit. Changes are not yet checked in. I'll need to test a bit before merging.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on May 20, 2022, 11:34:41 am
I've also had issues with the dye items condition being too high, 3 seems to work better since it counts bags instead of amount of dye.
done

Quote
Useful to put a storage pile under the dump on services level
done. I kept it unconfigured, though, so the simple workflow of unforbid all and haulers will grab things still works as expected.

Quote
On a side note, it was a lot of fun loading up one of your saves where shortly after unpausing the captain of the guard goes and rams his fist through someones head.
Ha! Is this the save on dffd (https://dffd.bay12games.com/file.php?id=15434) right now? I didn't even notice that!

Quote
I think it's time to add more jail cells, 2 more would fit easily on top at least.

1 room,mass chains and cages.

Guard captain's office should probably be on services level too since it is used for "interviews" , saves walking to/from noble level.
How about combining these ideas into a room off the side of the barracks, above the hospital:
Code: [Select]
j ` ` ` j
` ` c ` `
v ` t ` v
` ` c ` `
j ` ` ` j

While I was there, I automated the creation of a tavern (residents only by default) in the grand hall and attached the rooms at the top as rented rooms. This will reduce some toil for those who want their tavern to attract visitors (they only have the restriction to change instead of having to set everything up from scratch) and will keep visitors from showing up by default so they don't overwhelm newer players.

I similarly automated the creation of a library and temple on the guildhall level, also both residents-only.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on May 22, 2022, 10:38:16 pm
Two new scripts coming in the next release: gui/quantum, which creates quantum stockpiles for you, and assign-minecarts, which assigns minecarts to routes that don't have one already assigned. I wrote assign-minecarts to cut down on the manual steps required for Dreamfort -- for every quantum stockpile Dreamfort creates, you have to go assign a minecart manually. The new script can do that for you. Now newbies who don't know or care about hauling don't have to enter that confusing section of the menus.

gui/quantum came about because I saw someone on reddit who was complaining that quantum stockpiles were too hard to set up and I thought "this is a solved problem. there should be a gui for this." Both scripts use the quickfort API under the hood. The API is turning out to be much more useful than I thought it would be!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on May 23, 2022, 07:04:34 pm
Ok, PR is up (https://github.com/DFHack/dfhack/pull/2162) for the Dreamfort improvements. Not sure if anyone wants to review, but I'll let it sit there for a few days just in case. Full list of improvements in the PR description.

Time to get some of my other PRs cleaned up and merged. I've got just a few too many open at the moment!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on May 23, 2022, 07:57:49 pm
Ok, PR is up (https://github.com/DFHack/dfhack/pull/2162) for the Dreamfort improvements. Not sure if anyone wants to review, but I'll let it sit there for a few days just in case. Full list of improvements in the PR description.

Time to get some of my other PRs cleaned up and merged. I've got just a few too many open at the moment!

All looks good. Took a break again from frustration with bugs, worst of which was a full on loyalty cascade out of nowhere.
So setting everything to no visitors would reduce the constant irritation they cause (not to mention strain on justice system)
Then the cushy jails ok I guess, although it seems like beatings are more common than incarceration for violating mandates.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on May 29, 2022, 12:11:57 am
The PR is up (https://github.com/DFHack/scripts/pull/392) for the last few missing elements of gui/quickfort: repetitions and transformations. It was tricky since there are no other scripts that do things like this, so I had to come up with new "UI concepts", which is always dangerous. You want a UI to behave in "expected" ways, and anything new risks confusing users.

For repetitions, you can toggle them on or off. If they're on, you can hit hotkeys to increment or decrement by 1 or 10 (with +-*/). Alternately, you can hit a different hotkey (R) to edit the number of repetitions directly. You might want to edit it directly if you're building a pump stack across 125 z-levels and it's much easier to hit R125{Enter} than it is to hit * 12 times and + 5 times.

However, this combination of 5 hotkeys and an edit field is unique, and I'm seeing if I can get some feedback from other devs to see if it's understandable.

Transformations, too, needed some UI innovation. You can toggle them on and off as well, and when they're on, you can hit ctrl+arrow keys to rotate and flip the blueprint around. As you apply transformations, the blueprint preview changes accordingly so you can see how it will look when applied.

Ctrl+Left rotates counterclockwise ("ccw"), Ctrl+Right rotates clockwise ("cw"), Ctrl+Up flips vertically ("flipv"), and Ctrl+Down flips horizontally ("fliph"). As you apply transformations, the list of what you've done appears on the screen next to the hotkey label, e.g. "cw, flipv"

An interesting thing about those transformations is that no matter how many you apply, an equivalent set of no more than two transformations can be found that does the same thing. For example, rotating clockwise twice and flipping horizontally (three operations) is the same as just flipping vertically (one operation).

Since there is very limited space on the UI to display the list of transformations that the user has applied, I do a quick search every time a new transformation is added to see if there is a shorter list of transformations that does the same thing. This prevents the UI from getting cluttered with 25 copies of "cw" strings and pushing the rest of the UI off the bottom of the screen. However, I'm worried that it will be confusing to users to see their transformation list being suddenly replaced with something that looks different. For example, hitting Ctrl+Right three times will show "cw", then "cw, cw", then just "ccw" (since rotating clockwise three times is the same as rotating counterclockwise once). Will people be confused? I don't know. Is there a better way? I'm open to ideas.

I considered just not putting the list on the screen at all, and letting the blueprint preview speak for itself, but I realized that users will need to know whether a transformation is being applied and what it is in case they have to apply several related blueprints with the same transformation.

I realize this whole diatribe could really use a screenshot. I'll get one up once I get back to the computer that can run the in-development script.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on May 29, 2022, 06:38:40 pm
Screenshot for the new gui/quickfort (preview is of the pump stack library blueprint repeated up 60 times (=120 levels)):

(https://user-images.githubusercontent.com/977482/170895808-a2e0d0e4-cfc6-40bf-81ba-8c455a30da95.png)

And while I'm at it, here's a screenshot for the new gui/quantum script creating a quantum stockpile that pulls from the highlighted feeder stockpile:

(https://user-images.githubusercontent.com/977482/170896229-93b3dd50-0240-49a1-b282-1a73c1f365e7.png)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on September 26, 2022, 03:18:36 pm
Just set up a blueprint for a block of ten 3x3 bedrooms using gui/blueprint and gui/quickfort.  Looking good, so far!  However, it would be nice if there was a way to apply dig blueprints made using gui/blueprint in marker only mode.  Would that be possible to add?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on September 27, 2022, 01:13:17 am
It would be better if it were a commandline parameter that you could use on the "quickfort run" commandline, but the current way to do this is to run

Code: [Select]
quickfort set force_marker_mode true
Then apply the dig blueprints you want in marker mode. Just remember to set the config value back to false when you want a non-marker mode designation again!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on September 27, 2022, 09:28:35 pm
Another quick question: if I dig out an m x n area, smooth the walls, and then channel out 1 (or more) additional levels (removing ramps, dumping stones, and smoothing walls as I go), would blueprint and quickfort be able to handle that?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on September 27, 2022, 10:49:28 pm
For the most part, yes, though since smoothing the walls will require everything to be done in a very specific order, blueprint won't help you much. Blueprint is just not designed for such nuance. You'd be better off writing the blueprint file manually. For example, you could put the following text in a file called vault.csv (m x n here is 5 x 3):

Code: [Select]
#dig step 1: dig the top level

,d(5x3)
#dig step 2: smooth the walls
s,s,s,s,s,s,s
s, , , , , ,s
s, , , , , ,s
s, , , , , ,s
s,s,s,s,s,s,s
#dig step 3: channel the floor

,h(5x3)
#dig bottom level: remove ramps

,z(5x3)
#dig bottom level: smooth walls and floor
s(7x5)

And just repeat steps 2 and 3 for each level of height that you want. Use gui/quickfort to apply the blueprints so you can more easily select the one you want from the list (the last blueprint you ran will still be selected so it's easy to choose the next one)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on September 27, 2022, 11:14:43 pm
Btw, the link labeled “quickfort command reference” at the top of the first post leads to a page that says “This page does not exist yet.”
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: lethosor on September 28, 2022, 12:01:04 am
Sorry about that - DFHack is in the middle of a documentation reorganization. https://docs.dfhack.org/en/latest/docs/tools/quickfort.html is the new page. (If you select an older documentation version, it should have the page at the old URL, like https://docs.dfhack.org/en/stable/docs/_auto/base.html#quickfort or https://docs.dfhack.org/en/0.47.05-r6/docs/_auto/base.html#quickfort)
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on September 29, 2022, 08:31:39 pm
I’ve just noticed a problem with gui/blueprint and gui/quickfort.  There’s no way to capture and play back smoothing designations.  Is there any way that this could be added?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on September 29, 2022, 09:09:29 pm
Quickfort supports smoothing, but blueprint actually ignores them by design (since it's usually not a step you want to wait for before applying the next blueprint when playing them back with quickfort), but there's no reason we can't add a flag to give you the choice. We have a similar flag for capturing/ignoring engravings (which does capture the smoothing step separately, incidentally).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on September 29, 2022, 10:45:17 pm
Also.  When I used ‘o’ to queue up the orders, it gave me rock doors.  I didn’t want that.  I wanted wooden doors like I had in the section that I used gui/blueprint on.  Is there any way to fix that?  Also, what about dumping?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on September 30, 2022, 01:00:55 pm
The blueprint code for dumping is bd on a #dig blueprint. It works the same as any other designation. The blueprint plugin, however, never generates it. Is there a way that the plugin could know that you want an area dumped? Right now you have to create dump blueprints manually.

Modifying the materials preference of the generated orders is possible with a medium amount of work. Right now the kinds of orders it generates are fixed (https://docs.dfhack.org/en/latest/docs/guides/quickfort-user-guide.html#generating-manager-orders). Let me record the feature request on GitHub and I see if I can get that in the next release (not the release going out today, the one after).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on September 30, 2022, 01:53:25 pm
Note, btw,that I don’t care what kind of wood the doors are made of (though some people might care).  I only care that they’re made out of wood.  Similarly, if I wanted rock doors, I wouldn’t really care what type of rock they were made of.  Same for metal, etc.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on September 30, 2022, 07:27:23 pm
How does something like this sound?

quickfort orders bp.csv -n/furniture --order-materials=wood,rock

Where you can specify the order of preference for materials used in the generated orders?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on September 30, 2022, 11:03:19 pm
How does something like this sound?

quickfort orders bp.csv -n/furniture --order-materials=wood,rock

Where you can specify the order of preference for materials used in the generated orders?

 Sounds good.  However, I’d like to be able to use it to set up 3x3 bedrooms with each having a wooden door, a bed, a rock coffer, and a wooden cabinet.

It’d be nice if there was a switch for blueprint to capture either exact materials or general materials (or none, defaulting to none if unspecified).

Perhaps this could be done by having blueprint create separate build blueprints for each material (or general material class).
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on October 01, 2022, 08:19:05 pm
With the current version, if you want doors or other furniture of a specific material/material class, you'd configure buildingplan before applying the blueprint. You'd have to adjust the generated orders accordingly, though.

Controlling the materials in a blueprint is something that I've been thinking about for a long time, but I've been worried about causing confusion/frustration with such a feature. It might be possible to create blueprints that are impossible to build in other fortresses due to resource differences.

I'd kind of like to keep materials assignment in buildingplan where it is now, but that's not as convenient as encoding materials in a blueprint, especially when the player has a specific pattern of materials usage in mind.

In short, I'd love to add more support for materials, but I need to think through potential usability issues.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on October 14, 2022, 07:05:01 pm
Looking at the order materials option again, how does this sound instead?
Code: [Select]
``--order-materials <spec>``
    When generating manager orders, use materials according to the given spec
    instead of the default "rock,wood,cloth,iron". Valid values are: rock, wood,
    cloth, silk, yarn, leather, glass, and the names of any metals. You can
    additionally override the materials preference for specific types of items
    by adding comma-separated elements to the spec in the format
    ``<type>=<material``. For example, ``BOX=leather`` will produce leather bags
    instead of the default rock coffers when a container is specified on a
    blueprint.

That would allow you to specify, for example,
Code: [Select]
quickfort orders myblueprint.csv --order-materials DOOR=wood,BED=wood,CABINET=wood
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: Dr. Hieronymous Alloy on December 09, 2022, 08:05:24 am
I suppose it'll be "a while" before we see this working in the steam version?

I've got so many old .csv fort plans to re-create!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on December 09, 2022, 09:09:23 am
You and me both : )

Yes, quickfort, blueprint, and all the other design tools are on my priority list to get working with the Steam version as soon as possible. Basic work on the DFHack core modules, though, will have to be completed first, and that might take, as you said, "a while".
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: Dr. Hieronymous Alloy on December 09, 2022, 07:42:32 pm
Understood, thanks for all your work. Maybe I can figure out a way to just convert these old .csv quickfort plans i have and make them work in the meanwhile.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on December 09, 2022, 08:18:38 pm
The steam version will bring some challenges that we'll need to figure out how to overcome. For example, hotkeys have changed, and not all blueprint items even *have* hotkeys anymore.

At least in the short term, I don't plan to change anything about the blueprint language. This will ensure existing blueprints continue to function. Blueprints may have to start supporting a "hotkey agnostic" language, though. for example, right now to place a nestbox, you'd write "N" in a blueprint cell. Should "ofn" now be accepted to mean nestbox? What about "nestbox"? things could get confusing quickly.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: Dr. Hieronymous Alloy on December 10, 2022, 09:59:03 am
Yeah, it might make sense to "fork" DFhack into two branches, one for steam workshop and one for Classic.

Some feature triage might also make sense -- e.g., a working quickfort function for basic functions like dig, build ramps, etc. might be achievable a lot more quickly than one that implements every furniture type in the game etc.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on December 10, 2022, 05:59:48 pm
I don't believe there will be a functional difference between Classic and Premium, at least as far as quickfort is concerned.

Good idea to break down the tasks for triage. Let me list the tasks out that I already know need to be done, organized by quickfort blueprint mode. Keep in mind that I don't know whether memory layouts have changed, and game behavior may have changed in subtle ways that we need to adjust to.

Also, fair warning (teaser?) -- I'm planning on combining gui/quickfort, gui/blueprint, gui/mass-remove, gui/stamper, and the functionality from the dig plugin (e.g. circle designations) into a unified interface called gui/designer, which will support interactive copy-paste and a host of other map design/designation tools. I might choose to not release any of those named tools and instead bring them back piece by piece as we can get it working with the steam release.

Dig


This mode is likely to work with minimal modification and can get out quickly. If nothing else, quickfort could be initially released with just digging support. The game now calls marker mode "blueprints" which is a very unfortunate clash of terminology. Not sure how we can clarify the difference between manually designated marker mode "blueprints" and quickfort blueprints (which can also be applied in marker mode).

Build


- buildingplan needs compatibility testing, needs updates if the way items are associated with unbuilt buildings has changed.

After an initial release, there are also many things that need to be done to ensure that quickfort and buildingplan are following game rules when they assign building items:
- building item mapping database in library/Lua/dfhack/buildings.lua needs to be verified
- algorithms for matching items to building filters (isSuitableItem() and friends)
- review the building metadata in internal/quickfort/build.lua

buildingplan will also need a new UI for configuring materials. The old UI was based on the sidebar, which doesn't exist in the new DF interface. Maybe the gui for buildingplan could also be integrated into gui/designer?

Place


- review stockpile metadata in internal/quickfort/place.lua
- stockpile configuration currently happens by invoking a dynamically-generated query blueprint. this will depend on query mode working, or if that proves difficult, we will need to write direct memory initialization routines

Zone


zones have been rewritten from the ground up in the new DF version. DFHack will need a corresponding new access layer for zones. This might prevent zone mode from working right away

- zone metadata in internal/quickfort/zone.lua
- underlying zone creation API in DFHack Core

Query/Config


These modes are tough since they involve actual keystroke playback. Old query and config blueprints are unlikely to work since the keys in them will simply be wrong for the current UI. If a query blueprint uses only library aliases, then it might continue to work after we update the library aliases.

- total rewrite of the blueprint alias library. we should take this opportunity to rewrite it to use interface keycodes as well and not have *any* keyboard keys. this will make the quickfort blueprint library immune to customized keybindings. this has always been a problem with quickfort, and we should solve it here before it becomes a bigger issue
- documentation in the alias guide about how to find the right keycode for the operation you need, test that they're correct, and in general, add warnings about *not* using directly keyboard symbols (e.g. letters) unless you're actually filling in a string field

Orders


Currently, generating orders from a blueprint is part of quickfort code. I'm thinking this should be moved to buildingplan so it can be used more generally. Plan a building? Get a manager order to build the pieces automatically. Buildingplan can be smarter about it than quickfort is, scanning for existing stock or in-progress manager orders and only adding a new order if needed. It would also be one fewer thing to have to do manually when applying blueprints. Orders for non-building (e.g. wheelbarrows and containers for stockpiles) could be done by default when applying the blueprint (disableable with a flag). then we can get rid of the "orders" quickfort command entirely.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on May 13, 2023, 08:46:58 am
Howdy, howdy. Hope all is well. I see you've been keeping busy.

I started playing again, still 47 though. Testing out the newer changes. I like the new sheriffs office and the more streamlined services level in general.
The traffic is interesting, I've been messing with it a bit on other levels. I don't know how much it really helps FPS anymore but it can't hurt.
The services level applies it somewhat spotty. Also I like to restrict the reservoir tunnels.
Industry level I added high traffic on every tile not a workshop (originally I restricted the workshops but I didn't like how that was working out)

So when you made the last round of changes I think you grabbed the loom instead of the dyer for the supply from feeder & QSP. It's the dyer that needs to be restricted so it doesn't dye hair and adamantine. The loom should still be free to grab adamantine from the metal QSP since that is a specific job (it won't happen by accident) also it has caused a lot of cancellation spam when I buy thread & cloth but it is still in the depot. So unless you found a reason I am unaware of the loom should be free.

After reading an interesting new science thread on weapons which my own observations support, platinum isn't worth using. Besides disappointing performance it is really heavy. I've removed it from my work orders. Also moved the silver down below steel (prior we had considered it an upgrade but now I am using it only if steel is unavailable). In short steel is the most sensible material for blunt weapons.

Replaced leather cloaks with silk. It is slightly better and trying to conserve leather, especially since civilians will grab your cloaks too. Wood shields for archers uniform. Leather isn't any worse (except for bashing, but then melees get metal shields) but again wood is generally more plentiful. And always shields, no bucklers. There is no advantage, only drawbacks, at least before Steam version (obviously I am ignorant of any differences in the new version). I've decided that either there were stealth changes with armor or my playstyle needed updating, but either way I have changed my mind about full metal archers and am going with leather, although I may give them metal helmets, I have to see how the leather works out. The full steel just slows them down too much and they don't seem to do enough sparring to build the needed skills. I bumped the work orders for leather armor up for a full squad. It's doable if you take all the leather the first few caravans bring.

Why did you add easy meals to work orders? I see no advantages (other than the cook getting more xp?) since you always get 1 meal per ingredient, so the lavish may use 4x the ingredients but that means 4x the meals. Is there something I am unaware of? There was also a ton of cancellation spam getting that first order of 150 done.

Contrary to the docs, the locations are not being set to citizen only. I was wondering why I still had visitors showing up (although monster hunters come no matter what it seems).

I think that's all I had.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on May 13, 2023, 06:36:18 pm
These are all good finds and good ideas. Thank you!

Let my itemize the changes to make sure I understand each one:

What changes would you make to the traffic designations on the services level? I remember I used to set more tiles, but I backed that change out for reasons I don't fully remember. Maybe I thought I was over-specifying?

What was worse when you restricted traffic over the workshops? Why do you think the inverse (high traffic for non-workshop tiles) is better? I believe you, I just want to understand what you saw.

Should silver crossbows also be removed from the orders list? If so, we can close out the controversy about distributing orders for items that you can't normally make in the vanilla UI. We've already separated those orders out into a military_include_artifact_materials.json file. If we can just remove that file, it makes things much easier.

For cloaks, is it worthwhile using silk if available and falling back to leather if not? Or is it better to always conserve leather and just not have cloaks until silk is available? It sounds like it might be hard to tune this for all styles of gameplay, but I think I'd be happy with just silk as you suggest. We don't want to overcomplicate these orders, especially when players might just use autoclothing to manage cloaks.

Do you already have an updated military.json I can use to update the distributed copy?

I added easy meals to workorders on the advice of a Tekkud Youtube video I watched last year. His reasoning was that when ingredients are low, you need meal quantity, not quality. And if you get cancellation spam for the easy meals, that's a warning sign that you desperately need more food. If lavish meals produce 4x the output, though, then this logic doesn't hold up. I wasn't aware of that mechanic.

I'll have to go back and check about the citizens only setting. I was pretty sure that was working. Dreamfort will have to be substantially rewritten to work in v50 (once quickfort itself is updated), but I can fix this issue on the current, v0.47.05 version.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on May 13, 2023, 09:02:31 pm
Yes, you've captured all the items.

I think your service level designations are fine. Actually it is possible I was reading off a different version than what is actually in my installation. The other levels apply their traffic designations fine.
Now one thing is it still doesn't seem to discourage them eating and drinking the prisoners supplys. I also notice children will still play in the worst places regardless of settings(like the cage trap corridors, especially on my cavern level). When I restricted the workshops they were going too far out of their way to avoid them, there are times when it makes sense for them to cut across, I just want to discourage it so this seems a little better.
I am seeing that a little goes a long way with this. Like I had made the entire surface trap corridors low traffic but once again it was too much as they were going outside and then back in the long way to place a lot of the cages. I dialed it down to just making all the bridge tiles low traffic and that seems better.
Suites level I set the doors since there are 2 in each room and this will discourage cross traffic. It probably all could use a bit more experimentation and observation.

Oh, I wasn't aware we had to put in special handling for the silver and platinum (I guess I forgot). I'd probably let it go at this point if it saves you any effort. Silver weapons aren't really any better. Keeping the archers on a short leash and not letting them melee (especially in leather armor) wood crossbows are perfectly fine really. I'm still debating whether to make the city guard my best melee. It is easy enough to protect your own people by paying a little attention to mandates and outsiders who run afoul of the law I generally want dead. I had actually started giving the squads manual kill orders last game I was getting so frustrated with all the artifact thefts. Then there was the fact that the sheriffs now seem to like to punch perps to death for "resisting arrest" anyway, regardless of what weapon they are carrying. I officially consider the weak xbow justice squad to be outdated methodology.

Y'know I hadn't even considered not having silk, but that is a perfectly valid point. I tend to trade for it, I have never had any success creating a GS farm like ever. Yeah, it is probably worth having a fallback plan since any cloak is better than no cloak. The thing I learned about leather is there is "armor grade" and there is "clothing" and for clothing leather is not superior to the others. Plant cloth is actually heavier than the rest (although it isn't that big a deal) and silk allegedly has slightly better cutting resistance so I'd fallback to yarn, then leather then pigtail. Robes or dresses might be worth adding too, other clothes I gave up using long ago because I had too many problems with them equipping everything (like socks/mittens/hoods are just asking for amputated feet/hands/heads when they don't put on a boot/gauntlet/helmet), besides the main thing here is we are adding a little face protection which is otherwise totally lacking. OTOH, we can't set a preference in the uniforms, so it's either silk cloak or just cloak. Yeah, I guess just go with the silk for uniforms. Don't forget to update the uniforms too.

https://drive.google.com/file/d/1gh3pwq9w7Tc_W1vixkFDzFHaZu9XV6C2/view?usp=share_link (https://drive.google.com/file/d/1gh3pwq9w7Tc_W1vixkFDzFHaZu9XV6C2/view?usp=share_link)
Man I forgot how much work that file is! A flag for "wood" would be really handy by the way. As it stands we just check for shields and crossbows (and of course there's other work orders it would be useful for). It just occurred to me silk gloves would be better too, since gloves are not considered armor and there's no leather gauntlets, but I didn't make the change in the file. Leather boots are actually considered armor as well as the leggings, helmet and of course the leather armor. Ok so I bumped the leather pieces to 10 or 20 as needed, removed platinum since we are no longer considering it a weapons grade material (the regular furnace order has smelting still), removed all platinum items & conditions, removed silver crossbows and silver conditions in the other xbows. Added flux/steel/etc conditions to silver mace and war hammer.

Yeah, the 5 each of 4 kinds of meat I bring on embark makes 20 lavish meals. If we made it into simple meals we'd get 20 simple meals. The only difference AFAIK is you need to have 4 different ingredients. The cancel spam is because that order is so huge, 150 meals. Generally the ingredient variety isn't an issue. Remember they only eat like once per season. Oh, and actually an easy meal uses 2 ingredients, not 1. Yeah, no real reason to make them.

It is possible that I didn't have the latest and greatest files when I began this run, it was before I pulled down the R8 files, so possibly whatever was in LNP, although I might have done intermediate updates. It's been some months since I have played. So if it was something you changed more recently it might be a false alarm. I know I did have the new services level layout since I had started a new game specifically to check out that round of changes.

I've noticed a little wierdness on the orders export, conditions not always exporting. Like I specify unused dyed silk cloth in my cloaks order, but the export just captured cloth, I manually changed it to silk cloth. I think I caught and fixed everything though.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on May 14, 2023, 09:04:46 am
I've got 3 stuck jobs for some reason, the conditions are never being re-evaluated and I realized I have over 30 each now, just going to delete them.
They are the silver war hammer, bronze crossbow and bronze pick. The first 2 were modified with the recent changes but the pick wasn't.
At first I just thought it was because my steel production wasn't ramped up (It's probably good to make a stock of steel before importing the military orders) but then I realized something was wrong, of course I've been distracted with the crashing thing, which also imparts a sense of deja vu to everything as you do it over and over and over again.

Just realized that the standard melt pile should probably exclude adamantine and the "special" metals (I have never come across any in fortressmode but who knows) otherwise you could get a nasty surprise when you start making adamantine gear.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on May 16, 2023, 04:50:48 pm
Now one thing is it still doesn't seem to discourage them eating and drinking the prisoners supplys.
Yeah, I think you're right. I thought I saw an improvement, but further testing doesn't seem to bear it out. On the plus side, those are pretty nice rooms to eat in..

Quote
Suites level I set the doors since there are 2 in each room and this will discourage cross traffic. It probably all could use a bit more experimentation and observation.
This is a good idea. I'll add it in.

Quote
Oh, I wasn't aware we had to put in special handling for the silver and platinum (I guess I forgot).
It was a more recent discussion. See here: https://github.com/DFHack/dfhack/issues/2718

Quote
[link]
Thanks! I'll get this integrated as part of https://github.com/DFHack/dfhack/issues/3367

Quote
Yeah, the 5 each of 4 kinds of meat I bring on embark makes 20 lavish meals.
Nice. Ok, easy meals are gone then.

Quote
I've noticed a little wierdness on the orders export, conditions not always exporting. Like I specify unused dyed silk cloth in my cloaks order, but the export just captured cloth, I manually changed it to silk cloth. I think I caught and fixed everything though.
I couldn't reproduce this particular problem. I created an order for a silk cloak, set the conditions to count "unused dyed silk cloth", exported, and got this, which is what I expected:
Code: [Select]
[
        {
                "amount_left" : 10,
                "amount_total" : 10,
                "frequency" : "Daily",
                "id" : 10,
                "is_active" : false,
                "is_validated" : true,
                "item_conditions" :
                [
                        {
                                "condition" : "GreaterThan",
                                "flags" :
                                [
                                        "dyed",
                                        "silk"
                                ],
                                "item_type" : "CLOTH",
                                "min_dimension" : 10000,
                                "value" : 10
                        }
                ],
                "item_subtype" : "ITEM_ARMOR_CLOAK",
                "job" : "MakeArmor",
                "material_category" :
                [
                        "silk"
                ]
        }
]

edit: I found out what the issue is here, though. Our library orders don't have the "min_dimension" attribute. That's what produces the "unused" adjective. I'll fix that where I see it.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on May 16, 2023, 06:11:48 pm
Oh, I had played around a little with the size setting on some orders (under details) but I wasn't sure if it was adding extra complexity for no good reason.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on May 16, 2023, 07:31:01 pm
Your changes looked good to me. You can see the what the final diff looked like here: https://github.com/DFHack/dfhack/pull/3385
Dreamfort changes are here: https://github.com/DFHack/dfhack/pull/3386
The changes will be in the next DFHack release, but of course Dreamfort doesn't fully apply yet in v50 until quickfort us updated (see https://github.com/DFHack/dfhack/issues/2974)

Did you learn anything more about those stuck jobs?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: ldog on May 17, 2023, 07:19:52 am
Your changes looked good to me. You can see the what the final diff looked like here: https://github.com/DFHack/dfhack/pull/3385
Dreamfort changes are here: https://github.com/DFHack/dfhack/pull/3386
The changes will be in the next DFHack release, but of course Dreamfort doesn't fully apply yet in v50 until quickfort us updated (see https://github.com/DFHack/dfhack/issues/2974)

Did you learn anything more about those stuck jobs?

No, I just deleted them and recreated them from scratch. The game is just full of aggravating bugs.

I really feel like hauling is not keeping up; I have over 40 dedicated, plus militia still not assigned to squads, the laborers, a few others I am still allowing hauling on. Shit sits in the depot a long time, although at least it is the non-perishables like leather, cloth, etc. I am also buying in bulk. We have mussels as well, which generate a lot of crafts. Granted I am using an awful lot of child labor as well, and they probably spend more time playing than working.

Steel production is just not keeping up, granted 40 is really not enough stock since it takes over 20 to fully equip 1 infantry dwarf. I have plenty of flux but of course too little is being properly hauled with wheelbarrows and the furnace operators are carrying it up by hand; I really need to lock down the supplys. One good thing I will say, the shortages manifest in the breastplates and greaves, so that part of the orders is working well. All 4 infantry squads at least have the rest of their gear even though only 1.5 squads have bp & greaves.

Drink production is barely keeping up as well, which is odd, I've never had a problem with the 1 still keeping up. I have 4 farmers assigned and generally someone is in there brewing. I was getting a lot of job cancellation spam on drinking, and I think that is related to the combine-drinks script (which I've just stopped running) but even worse I noticed a lot of puddles of spilled booze which I am not sure how that happens.

This current fort has also been a bit of a victim of its own success I suppose as I got migrant waves of 30+ and have reached max pop here in year 3. You would think with the extra manpower things would run smooth.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on May 20, 2023, 11:40:57 pm
I wrote basic stockpile support (creation and top-level category-level configuration). It will be in the next DFHack release. Still a long way to go before Dreamfort is viable, though.

I've started on zone support, which needs a full rewrite for v50. It needs a whole new syntax. I'd also like to include support for creating locations and linking zones to locations.

Here's a progression of examples that show what I'm thinking:

a 10x12 meeting hall: m(10x12)

a 10x12 hospital: m{hospital}(10x12)

a 10x12 hospital with some custom configuration: m{hospital soap=20 buckets=2}(10x12)

Two zones that make up a single hospital: m{hospital/myhospital}(5x12),,,,,m{hospital/myhospital}(5x12)

I need to find a convenient way to express visitor restrictions, since it will probably be the most common configuration that people want to specify for a location

restriction=citizens_and_long_term_residents seems a bit cumbersome. Any ideas there?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: A_Curious_Cat on May 20, 2023, 11:51:24 pm
Code: [Select]
// allowing single groups
restrict=members
restrict=citizens
restrict=residents
restrict=visitors

// allowing multiple groups
restrict=citizens+residents  // could use a different separator then ‘+’?

// allowing everyone
restrict=all

// maybe use ‘allow’ instead of ‘restrict’?
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on May 25, 2023, 02:37:44 pm
Ok, I have rewritten the Dreamfort blueprints with what I envision the new syntax will be. Remember, #query and #config blueprints are gone since the keyboard is no longer a reliable way to apply changes to the game. Their functionality has moved to other blueprint types. This actually has given us a lot more flexibility to write blueprints that dynamically adjust to their environment (at the cost, of course, of more complicated code inside of quickfort, but players don't need to worry about that : p)

First, let me note that existing #dig, #build, and #place blueprints will continue to work without changes. All this new syntax is optional, though any #query blueprints out there will need to be ported.

Existing #zone blueprints will *mostly* continue working, but fundamental changes in how zones are handled in DF will probably require #zone blueprints to be at least partially rewritten. For example, zones can only have one type at a time now, and there's no longer any such thing as a hospital zone.

I should also say that most players will never be aware of any of this, since the syntax will be generated by `gui/bluerpint` as needed. Only people who design blueprints by hand will care.

Here are some representative examples:

1. building properties are specified within curly brackets and follow immediately after the building specifier. Names of the properties are based on the actual structure field names. Examples:

hive with "install" and "gather" properties set in a #build blueprint:
~h{do_install=true do_gather=true}

7x7 sherriff's office in a #zone blueprint. This will dynamically look up the current sheriff/captain of the guard and assign the zone to them:
o{name="interrogation room" assigned_unit=sheriff}(7x7)

quantum refuse/corpse stockpile that gives to another stockpile in a #place blueprint. This will dynamically look up stockpiles named "rawhides" and set up the stockpile links:
ry{name="refuse/corpse quantum" give_to_pile="rawhides"}

2. Stockpile configuration is marked by a leading colon (:) and acts as a frontend to the stockpiles plugin to add and remove configuration elements. Identifiers in the configuration refer to previously exported stockpile configs in the DFHack stockpile config library or in the player's personal exports. Examples:

refuse feeder pile for the refuse/corpse quantum stockpile. The leading r initializes the stockpile to "all refuse", then the subtracted config elements remove specific subsets:
r:-corpserefuse-craftrefuse(2x3)

seed stockpile. this starts from a blank config (c) and adds specific subsets:
c:+seeds+linksonly(1x9)

stockpile for all finished goods (g) minus crafts and goblets, then tallow and wax from the food category are added on (and containers disabled):
g:-crafts-goblets+tallow+wax-containers(3x3)

a quantum stockpile that accepts all types (except refuse):
c:=quantum

Which is essentially shorthand for:
afunyswebhlzSgpd:-containers+linksonly

3. Routes and route stops are configured from track stops on #build blueprints. Examples:

Quantum stockpile dumper that dumps to the south and takes from a stockpile named "trade goods":
trackstopS{name="trade goods dumper" take_from="trade goods" route="trade goods quantum"}

Route stops can also be configured using the same syntax as stockpiles:
trackstopS{name="prisoner/cage dumper" take_from="prison/training" route="prisoner/cage quantum"}:+enemies

4. Locations are now specified from #zone blueprints. Examples:

A temple defined from a 9x9 meeting hall:
m{temple allow=residents}(9x9)

A tavern defined from a dining hall and a rented room (defined from a bedroom) attached to that tavern. "bigpub" is the identifier given to the tavern that other zones on the blueprint can refer to. The string won't appear in the game as a name:
h{tavern/bigpub name="grand hall"}(13x31)
b{tavern/bigpub}(1x3)



Note that all of this is in prototype form. Things might change once I start implementing. If people have thoughts/concerns/questions at this stage, though, I'd like to hear them.
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: clinodev on May 25, 2023, 04:49:37 pm
Very, very cool!
Title: Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
Post by: myk on June 01, 2023, 12:37:22 am
After several days of intense coding, I've got a prototype.

Dreamfort has been fully updated to the new syntax, and overall has become simpler (which is always a good thing).

The new blueprints are here: https://drive.google.com/drive/folders/1dsmvnzbOKsyFS3DCj0F8ibSnMhVHEjdV

I'll link those up to the DFHack docs when I update them. The quickfort blueprint creation guide is going to need some new sections!

quickfort got more than 2000 new lines of code, which is a lot. The chance that it's all bug-free is essentially zero. I'll be writing unit and integration tests as I merge the code over the next few weeks.

Our immediate plans are to release DFHack 50.08-r2 within a few days (which will not include the new quickfort or Dreamfort), along with an experimental release for the similarly experimental SDL2 version of DF.

Once those are out, I'll get these changes merged in and we'll put out an official beta (50.08-r3rc1, probably).

In the meantime, if you'd like to give the new Dreamfort a try, I put it up on our "testing" branch on Steam. Feedback is welcome! I'd especially like feedback about the new zones. Everything that was a room in pre-v50 is now a zone, and that required a bunch of changes in Dreamfort.

I also made some changes to the layout of the services level. I added a bolt recycling trough in front of the archery targets and altered the layout of the jail cell block. Also the tavern got a well because everyone likes wells. The hospital also got a few changes to make it more werecreature-proof. I'll post some screenshots after I do my next test run.