In last month Once, there was a
5x5 tower challenge idea. I mostly liked it, but got annoyed at how one-by-one building stairs and such is and never succeeded.
Thus, constructmultiz.luaSave the code into /hack/scripts/constructmultiz.lua text file. If you want the indicator on lower right and proper designation detection after moving cursor in build menu, also get
gui/indiator-screen. Then, add constructmultiz bind into onMapLoad_extra.init file to add keybinds to call it automatically.
What can you do with this?
You can take
these materials, order
7 sets of furnishings, and then adjust how many you will build above
|
|
By either clicking to increment/decrement or by using Ctrl-A to set wholesale:
|
|
Then you can build 7 z-levels of tower in one go:
|
|
Remember to designate corners last so they'll get built first, and to leave a space for door:
|
|
And the tower is designated 7z in one go:
|
|
If you have things ordered and done in right order, it can also get built in one go:
|
|
Then you can simply do the same on first z-level with ordering the placement of furniture, add a door...
|
|
and remove the first hatch.
This, too, gets extended:
|
|
Overall result, lot quicker than doing it by default:
|
|
There are few caveats, imperfections, and probably undiscovered problems I didn't find though testing. As such, for now I consider this in
BETA: Cover your ass with backups and pre-saves, just in case.
Some caveats/quirks:
1) While individual items can be made semi-easily made possible to pick in latest version, for ease of coding in 43.03 it currently uses same item type and material for building, in a way like workshops job work rather than construction ones do.
2) The exception to above would be cases of bucket, barrel, chain, mechanism, screw, pipe, anvil (but not weapon), where material is not checked (it could be, but it isn't).
3) As such, dwarves will pick the items closest to them at the moment they take the job.
4) As such, dwarves will pick items to build one-by-one and it's possible to have all 5 designated 10x upright spears to fail when you have only 20 spears in stock.
5) For pumps, the direction is rotated 180° on every z-level for ease of designating pump stacks.
|
|
Still have to have power connections, granted, so it's pretty eh.
6) Helptext isn't quite so verbose as this post:
constructonmultiplezlevels
==========================
version 1.0 (beta)
Script to construct multiple z-levels of buildings at once.
Currently uses general seeking for matching material and type,
expect for bucket, barrel, chain, mechanism, screw, pipe, anvil.
General: Dwarf will use the matching item closest to them.
Usage:
constructmultiz x y
orders x above and y below same buildings as the last one.
constructmultiz display
Displays an indicator_screen in bottom-right for bound x and y
Also enables Ctrl+A and Ctrl+B to place bindings
constructmultiz bind
Adds keybinds to call this when building and exits
constructmultiz unbind
Removes keybinds to call this when building and exits
constructmultiz bindings
displays list of what bindings it would use and exit
7) It accomplishes on the fly calling with keybinds, and popup boxes with gui.dialogs
B@dwarfmode/Default "constructmultiz display"
D@dwarfmode/Build/Material/Groups "constructmultiz 0 0"
Enter@dwarfmode/Build/Position/FarmPlot "constructmultiz 0 0"
Enter@dwarfmode/Build/Position/RoadDirt "constructmultiz 0 0"
Enter@dwarfmode/Build/Material/Groups "constructmultiz 0 0"
Shift-Enter@dwarfmode/Build/Material/Groups "constructmultiz 0 0"
(Internal with gui) Ctrl-A@dwarfmode/Build/Type "constructmultiz display adjust height"
(Internal with gui) Ctrl-B@dwarfmode/Build/Type "constructmultiz display adjust depth"
8
) As you might surmise from the above, by default the keybinds don't work with falconne's automaterial's auto-mat select. In fact, in material choosing and construction menus, the indicator-screen hides itself in 2 seconds to allow those options to show.
I'd like if it could work together with that, but I'm not even sure where I can find if the auto-mat select is going to skip the material choices screen.
9) You might try to call constructmultiz 1 0 on a stockpile, civzone, etc. abstract. But this does not work at present and throws an error.
Calling "on" in this context means calling on the last building or construction section done, such as by default.
10) There's little safety checking before building.
If you designate something into a wall, nothing happens.
If you designate a building unapproachably into air, nobody will come and build it.
If you designate a stair on constructed floor, you build a stair on constructed floor.
If you designate a 1x7 farm plot with workshop in the middle, you get disconnected farm plot.
11) Have only tested in DFHack 43.03-r1, 43.05-r2 and 42.06-r1 and 44.09
12) It seems old/offloaded designation detection isn't quite perfect.
13) In expanded item menu while the screen is still yet up scrolling down will change cursor location; potentially placing it on another building.
Potential ideas for the future:
A) For all but 43.03, could use individual items.
B) Utilizing "Planning Mode" plugin to place/curate for quality.
C) Allow control over how specific the matching of things is.
- - -
D) Checking for minimap presence when rendering
E) Constructing in a line in any abritrary direction, working with cursor visually
F) Drawing buildings from burrows or selection; only building within a burrow.
G) Saving and loading settings.
H) Floodfill mode for building on designations
============
Changelog
bugfixed fractional designations, UpStair designations, added count of buildings to output
Bugfixes: Can change height in submenus; fixed doubling other value without gui/indicator-screen