Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 6 7 [8] 9 10 ... 29

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

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #105 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.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

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

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #106 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
« Last Edit: December 23, 2020, 11:06:00 am by myk »
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #107 on: December 05, 2020, 07:15:21 pm »

Very nice!

FYI DFHack could enable docs previews for pull requests, if you wanted to have an online HTML version of your current draft  ;D
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #108 on: December 05, 2020, 07:53:39 pm »

Very nice!

FYI DFHack could enable docs previews for pull requests, 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.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

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

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #109 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 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
===============  ======================  ====================
« Last Edit: December 23, 2020, 11:06:13 am by myk »
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #110 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
« Last Edit: December 06, 2020, 01:09:23 pm by myk »
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #111 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 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?
Logged
Really hoping somebody puts this in their signature.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #112 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).
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

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

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #113 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!
Logged
Really hoping somebody puts this in their signature.

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #114 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!
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #115 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
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #116 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.)

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #117 on: December 23, 2020, 11:00:58 am »

Ah, sorry, that note was removed in the final draft 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.
« Last Edit: December 23, 2020, 11:07:04 am by myk »
Logged

cjhammel

  • Escaped Lunatic
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #118 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.
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack: quickfort | buildingplan | blueprint | blueprints/library
« Reply #119 on: January 21, 2021, 10:15:02 am »

Thank you for the report! I'll look into it.
Logged
Pages: 1 ... 6 7 [8] 9 10 ... 29