dfhack/docs/plugins/buildingplan.rst

190 lines
8.9 KiB
ReStructuredText

buildingplan
============
2022-07-20 00:11:02 -06:00
.. dfhack-tool::
2023-02-26 11:53:30 -07:00
:summary: Plan building layouts with or without materials.
2023-03-11 14:56:55 -07:00
:tags: fort design productivity buildings
2023-02-26 11:53:30 -07:00
Buildingplan allows you to place furniture, constructions, and other buildings,
regardless of whether the required materials are available. This allows you to
focus purely on design elements when you are laying out your fort, and defers
item production concerns to a more convenient time.
2023-03-06 01:20:02 -07:00
Buildingplan is an alternative to the vanilla building placement UI. It appears
after you have selected the type of building, furniture, or construction that
you want to place in the vanilla build menu. Buildingplan then takes over for
the actual placement step. If the placed building requires materials that
aren't available yet, it will be created in a suspended state. Buildingplan will
periodically scan for appropriate items and attach them to the planned
building. Once all items are attached, the construction job will be unsuspended
and a dwarf will come and build the building. If you have the `unsuspend`
overlay enabled (it is enabled by default), then buildingplan-suspended
buildings will appear with a ``P`` marker on the main map, as opposed to the
usual ``x`` marker for "regular" suspended buildings. If you have
`suspendmanager` running, then buildings will be left suspended when their
items are all attached and ``suspendmanager`` will unsuspend them for
construction when it is safe to do so.
2023-02-26 11:53:30 -07:00
If you want to impose restrictions on which items are chosen for the buildings,
2023-03-06 01:20:02 -07:00
buildingplan has full support for quality and material filters (see `below
<Setting quality and material filters>`_). This lets you create layouts with a
consistent color, if that is part of your design.
2023-02-26 11:53:30 -07:00
If you just care about the heat sensitivity of the building, you can set the
2023-03-06 01:20:02 -07:00
building to be fire- or magma-proof in the placement UI screen. This makes it
very easy to ensure that your pump stacks and floodgates, for example, are
magma-safe.
2023-02-26 11:53:30 -07:00
2023-03-06 01:20:02 -07:00
Buildingplan works well in conjuction with other design tools like
2023-03-06 01:00:25 -07:00
`gui/quickfort`, which allow you to apply a building layout from a blueprint.
You can apply very large, complicated layouts, and the buildings will simply be
built when your dwarves get around to producing the needed materials. If you
set filters in the buildingplan UI before applying the blueprint, the filters
will be applied to the blueprint buildings, just as if you had planned them
from the buildingplan placement UI.
2023-02-26 11:53:30 -07:00
One way to integrate buildingplan into your gameplay is to create manager
workorders to ensure you always have a few blocks/doors/beds/etc. available. You
can then place as many of each building as you like. Produced items will be used
2023-03-06 01:00:25 -07:00
to build the planned buildings as they are produced, with minimal space
2023-03-06 01:20:02 -07:00
dedicated to stockpiles. The DFHack `orders` library can help with setting
these manager workorders up for you.
2023-02-26 11:53:30 -07:00
2023-03-18 01:48:39 -06:00
If you don't want to use the ``buildingplan`` interface for the building you're
currently trying to place, you can hit :kbd:`Alt`:kbd:`M` or click on the
2023-03-18 01:48:39 -06:00
minimize toggle in the upper right corner of the panel. If you do not wish to
ever use the ``buildingplan`` interface, you can turn off the
2023-03-06 01:20:02 -07:00
``buildingplan.planner`` overlay in `gui/control-panel` (on the "Overlays"
tab). Be sure to keep the ``buildingplan`` "System service" itself enabled in
`gui/control-panel` since if you turn it off, existing planned buildings in
saved forts will stop functioning.
2022-08-17 23:42:02 -06:00
Usage
-----
::
buildingplan [status]
2023-02-26 11:53:30 -07:00
buildingplan set <setting> (true|false)
buildingplan reset
2023-02-26 11:53:30 -07:00
Examples
--------
``buildingplan``
Print a report of current settings, which kinds of buildings are planned,
and what kinds of materials the buildings are waiting for.
2023-03-06 01:20:02 -07:00
``buildingplan set boulders false``
When finding items to satisfy "building materials" requirements, don't
select boulders. Use blocks or logs (if enabled) instead.
``buildingplan reset``
Reset all settings and filters to their defaults. This command does not affect
existing planned buildings.
.. _buildingplan-settings:
Global settings
---------------
The buildingplan plugin has several global settings that affect what materials
can be chosen when attaching items to planned buildings:
2022-07-18 17:58:01 -06:00
``blocks``, ``boulders``, ``logs``, ``bars`` (defaults: true, true, true, false)
2022-07-18 17:58:01 -06:00
Allow blocks, boulders, logs, or bars to be matched for generic "building
material" items.
These settings are saved with your fort, so you only have to set them once and
they will be persisted in your save.
2022-07-18 17:58:01 -06:00
If you normally embark with some blocks on hand for early workshops, you might
want to add this line to your ``dfhack-config/init/onMapLoad.init`` file to
always configure `buildingplan` to just use blocks for buildings and
2022-07-18 17:58:01 -06:00
constructions::
2023-02-26 11:53:30 -07:00
on-new-fortress buildingplan set boulders false
on-new-fortress buildingplan set logs false
2023-03-06 01:00:25 -07:00
Building placement
------------------
Once you have selected a building type to build in the vanilla build menu, the
`buildingplan` placement UI appears as an `overlay` widget, covering the
vanilla building placement panel.
For basic usage, you don't need to change any settings. Just click to place
buildings of the selected type and right click to exit building mode. Any
buildings that require materials that you don't have on hand will be suspended
and built when the items are available.
When building constructions, you'll get a few extra options, like whether the
construction area should be hollow or what types of stairs you'd like at the
top and bottom of a stairwell. Also, unlike other buildings, it is ok if some
tiles selected in the construction area are not appropriate for building. For
example, if you want to fill an area with flooring, you can select the entire
area, and any tiles with existing buildings or walls will simply be skipped.
For weapon and spike traps, you can choose how many weapons will be included
on this panel.
2023-03-06 01:00:25 -07:00
Setting quality and material filters
++++++++++++++++++++++++++++++++++++
If you want to set restrictions on the items chosen to complete the planned
building, you can click on the "filter" button next to the item name or select
the item with the :kbd:`*` and :kbd:`/` keys and hit :kbd:`f` to bring up the
filter dialog.
You can select whether the item must be decorated, and you can drag the ends of
the "Item quality" slider to set your desired quality range. Note that blocks,
2023-03-06 01:20:02 -07:00
boulders, logs, and bars don't have a quality, and the quality options are
2023-03-06 01:00:25 -07:00
disabled for those types. As you change the quality settings, the number of
2023-03-06 01:20:02 -07:00
currently available matched items of each material is adjusted in the materials
2023-03-06 01:00:25 -07:00
list.
You can click on specific materials to allow only items of those materials when
building the current type of building. You can also allow or disallow entire
categories of materials by clicking on the "Type" options on the left. Note
2023-03-06 01:20:02 -07:00
that it is perfectly fine to choose materials that currently show zero quantity.
2023-03-06 01:00:25 -07:00
`buildingplan` will patiently watch for items made of materials you have
selected.
Choosing specific items
+++++++++++++++++++++++
If you want to choose specific items, click on the "Choose from items" toggle
or hit :kbd:`i` before placing the building. When you click to place the
building, a dialog will come up that allows you choose which items to use. The
list is sorted by most recently used materials for that building type by
default, but you can change to sort by name or by available quantity by
2023-03-14 23:28:27 -06:00
clicking on the "Sort by" selector or hitting :kbd:`R`. The configuration for
whether you would like to choose specific items is saved per building type and
will be restored when you plan more of that building type.
2023-03-06 01:00:25 -07:00
You can select the maximum quantity of a specified item by clicking on the item
name or selecting it with the arrow keys and hitting :kbd:`Enter`. You can
instead select items one at a time by Ctrl-clicking (:kbd:`Shift`:kbd:`Right`)
to increment or Ctrl-Shift-clicking (:kbd:`Shift`:kbd:`Left`) to decrement.
Once you are satisfied with your choices, click on the "Confirm" button or hit
:kbd:`C` to continue building. Note that you don't have to select all the items
2023-03-06 01:00:25 -07:00
that the building needs. Any remaining items will be automatically chosen from
other available items (or future items if not all items are available yet). If
there are multiple item types to choose for the current building, one dialog
will appear per item type.
Building status
---------------
When viewing a planned building, a separate `overlay` widget appears on the
building info sheet, showing you which items have been attached and which items
2023-03-06 01:20:02 -07:00
are still pending. For a pending item, you can see its position in the
2023-03-06 01:00:25 -07:00
fulfillment queue. If there is a particular building that you need built ASAP,
you can click on the "make top priority" button (or hit :kbd:`Ctrl`:kbd:`T`) to
bump the items for this building to the front of their respective queues.
Note that each item type and filter configuration has its own queue, so even if
an item is in queue position 1, there may be other queues that snag the needed
item first.