Skip to content

Commit ca280f2

Browse files
committed
update docs for gui "w" scripts
1 parent e6e25ea commit ca280f2

3 files changed

Lines changed: 85 additions & 82 deletions

File tree

docs/gui/workflow.rst

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,57 @@
1-
21
gui/workflow
32
============
43

54
.. dfhack-tool::
6-
:summary: todo.
5+
:summary: Manage automated item production rules.
76
:tags: fort auto jobs
87

9-
10-
Bind to a key (the example config uses Alt-W), and activate with a job selected
11-
in a workshop in :kbd:`q` mode.
8+
This tool provides a simple interface to item production constraints managed by
9+
`workflow`. When a workshop job is selected in :kbd:`q` mode and this tool is
10+
invoked, it displays the constraints applicable to the current job and their
11+
current status. It also allows you to modify existing constraints or add new
12+
ones.
1213

1314
.. image:: /docs/images/workflow.png
1415

15-
This script provides a simple interface to constraints managed by `workflow`.
16-
When active, it displays a list of all constraints applicable to the
17-
current job, and their current status.
18-
19-
A constraint specifies a certain range to be compared against either individual
20-
*item* or whole *stack* count, an item type and optionally a material. When the
21-
current count is below the lower bound of the range, the job is resumed; if it
22-
is above or equal to the top bound, it will be suspended. Within the range, the
23-
specific constraint has no effect on the job; others may still affect it.
24-
25-
Pressing :kbd:`i` switches the current constraint between counting stacks or items.
26-
Pressing :kbd:`r` lets you input the range directly;
27-
:kbd:`e`, :kbd:`r`, :kbd:`d`, :kbd:`f` adjust the
28-
bounds by 5, 10, or 20 depending on the direction and the :kbd:`i` setting (counting
29-
items and expanding the range each gives a 2x bonus).
30-
31-
Pressing :kbd:`a` produces a list of possible outputs of this job as guessed by
32-
workflow, and lets you create a new constraint by choosing one as template. If you
33-
don't see the choice you want in the list, it likely means you have to adjust
34-
the job material first using `job` ``item-material`` or `gui/workshop-job`,
35-
as described in the `workflow` documentation. In this manner, this feature
36-
can be used for troubleshooting jobs that don't match the right constraints.
16+
A constraint is a target range to be compared against either the number of
17+
individual itemis or the number of item stacks. It also includes an item type
18+
and, optionally, a material. When the current stock count is below the lower
19+
bound of the range, the job is resumed; if it is above or equal to the top
20+
bound, it will be suspended. If there are multiple constraints, being out of the
21+
range of any constraint will cause the job to be suspended.
22+
23+
Pressing :kbd:`I` switches the current constraint between counting stacks and
24+
counting individual items. Pressing :kbd:`R` lets you input the range directly,
25+
or :kbd:`e`, :kbd:`r`, :kbd:`d`, :kbd:`f` incrementally adjusts the bounds.
26+
27+
Pressing :kbd:`A` produces a list of possible outputs of this job as guessed by
28+
workflow, and lets you create a new constraint by choosing one as template. If
29+
you don't see the choice you want in the list, it likely means you have to
30+
adjust the job material first using `job item-material <job>` or
31+
`gui/workshop-job`, as described in the `workflow` documentation. In this
32+
manner, this feature can be used for troubleshooting jobs that don't match the
33+
right constraints.
3734

3835
.. image:: /docs/images/workflow-new1.png
3936

40-
If you select one of the outputs with :kbd:`Enter`, the matching constraint is simply
41-
added to the list. If you use :kbd:`Shift`:kbd:`Enter`, the interface proceeds to the
42-
next dialog, which allows you to edit the suggested constraint parameters to
43-
suit your need, and set the item count range.
37+
If you select one of the outputs with :kbd:`Enter`, the matching constraint is
38+
simply added to the list. If you use :kbd:`Shift`:kbd:`Enter`, the interface
39+
proceeds to the next dialog, which allows you to edit the suggested constraint
40+
parameters and set the item count range.
4441

4542
.. image:: /docs/images/workflow-new2.png
4643

47-
Pressing :kbd:`s` (or, with the example config, Alt-W in the :kbd:`z` stocks screen)
48-
opens the overall status screen:
44+
Pressing :kbd:`S` (or by using the hotkey in the :kbd:`z` stocks screen) opens
45+
the overall status screen where you can manage constraints for all jobs:
4946

5047
.. image:: /docs/images/workflow-status.png
5148

5249
This screen shows all currently existing workflow constraints, and allows
53-
monitoring and/or changing them from one screen. The constraint list can
54-
be filtered by typing text in the field below.
50+
monitoring and/or changing them from one screen.
5551

56-
The color of the stock level number indicates how "healthy" the stock level
57-
is, based on current count and trend. Bright green is very good, green is good,
58-
red is bad, bright red is very bad.
52+
The color of the stock level number indicates how "healthy" the stock level is,
53+
based on current count and trend. Bright green is very good, green is good, red
54+
is bad, bright red is very bad.
5955

6056
The limit number is also color-coded. Red means that there are currently no
6157
workshops producing that item (i.e. no jobs). If it's yellow, that means the
@@ -65,3 +61,11 @@ The chart on the right is a plot of the last 14 days (28 half day plots) worth
6561
of stock history for the selected item, with the rightmost point representing
6662
the current stock value. The bright green dashed line is the target
6763
limit (maximum) and the dark green line is that minus the gap (minimum).
64+
65+
Usage
66+
-----
67+
68+
``gui/workflow``
69+
View and manage constraints for the currently selected workshop job.
70+
``gui/workflow status``
71+
View and manage constraints across all `workflow` managed jobs.

docs/gui/workorder-details.rst

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
21
gui/workorder-details
32
=====================
43

54
.. dfhack-tool::
6-
:summary: todo.
5+
:summary: Adjust input materials and traits for workorders.
76
:tags: fort inspection workorders
87

8+
This tool allows you to adjust item types, materials, and/or traits for items
9+
used in manager workorders. The jobs created from those workorders will inherit
10+
the details.
911

10-
Adjust input items, material, or traits for work orders. Actual
11-
jobs created for it will inherit the details.
12-
13-
This is the equivalent of `gui/workshop-job` for work orders,
14-
with the additional possibility to set input items' traits.
12+
Invoke while on a work order's detail screen (:kbd:`j-m`, select work order,
13+
:kbd:`d`).
1514

16-
It has to be run from a work order's detail screen
17-
(:kbd:`j-m`, select work order, :kbd:`d`).
15+
Usage
16+
-----
1817

19-
For best experience add the following to your ``dfhack*.init``::
18+
::
2019

21-
keybinding add D@workquota_details gui/workorder-details
20+
gui/workorder-details

docs/gui/workshop-job.rst

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
1-
21
gui/workshop-job
32
================
43

54
.. dfhack-tool::
6-
:summary: todo.
5+
:summary: Adjust the input materials used for a job at a workshop.
76
:tags: fort inspection jobs
87

9-
10-
Run with a job selected in a workshop in the :kbd:`q` mode.
8+
This tool allows you to inspect or change the input reagents for the selected
9+
workshop job (in :kbd:`q` mode).
1110

1211
.. image:: /docs/images/workshop-job.png
1312

14-
The script shows a list of the input reagents of the selected job, and allows changing
15-
them like the `job` ``item-type`` and `job` ``item-material`` commands.
16-
17-
Specifically, pressing the :kbd:`i` key pops up a dialog that lets you select an item
18-
type from a list.
13+
Pressing :kbd:`i` shows a dialog where you can select an item type from a list.
1914

2015
.. image:: /docs/images/workshop-job-item.png
2116

22-
Pressing :kbd:`m`, unless the item type does not allow a material,
23-
lets you choose a material.
17+
Pressing :kbd:`m` (unless the item type does not allow a material) lets you
18+
choose a material.
2419

2520
.. image:: /docs/images/workshop-job-material.png
2621

27-
Since there are a lot more materials than item types, this dialog is more complex
28-
and uses a hierarchy of sub-menus. List choices that open a sub-menu are marked
29-
with an arrow on the left.
22+
Since there are a lot more materials than item types, this dialog is more
23+
complex and uses a hierarchy of sub-menus. List choices that open a sub-menu are
24+
marked with an arrow on the left.
3025

3126
.. warning::
3227

33-
Due to the way input reagent matching works in DF, you must select an item type
34-
if you select a material, or the material will be matched incorrectly in some cases.
35-
If you press :kbd:`m` without choosing an item type, the script will auto-choose
36-
if there is only one valid choice, or pop up an error message box instead of the
37-
material selection dialog.
38-
39-
Note that both materials and item types presented in the dialogs are filtered
40-
by the job input flags, and even the selected item type for material selection,
41-
or material for item type selection. Many jobs would let you select only one
42-
input item type.
43-
44-
For example, if you choose a *plant* input item type for your prepare meal job,
45-
it will only let you select cookable materials.
46-
47-
If you choose a *barrel* item instead (meaning things stored in barrels, like
48-
drink or milk), it will let you select any material, since in this case the
49-
material is matched against the barrel itself. Then, if you select, say, iron,
50-
and then try to change the input item type, now it won't let you select *plant*;
51-
you have to unset the material first.
28+
Due to the way input reagent matching works in DF, you must select an item
29+
type if you select a material or the material may be matched incorrectly. If
30+
you press :kbd:`m` without choosing an item type, the script will
31+
auto-choose if there is only one valid choice.
32+
33+
Note that the choices presented in the dialogs are constrained by the job input
34+
flags. For example, if you choose a ``plant`` input item type for your ``prepare
35+
meal`` job, it will only let you select cookable plants since the job reagent
36+
has the ``cookable`` trait.
37+
38+
As another example, if you choose a ``barrel`` item for your ``prepare meal``
39+
job (meaning things stored in barrels, like drink or milk), it will let you
40+
select any material that barrels can be made out of, since in this case the
41+
material is matched against the barrel itself. Then, if you select, say,
42+
``iron``, and then try to change the input item type, it won't let you select
43+
``plant`` because plants cannot be made of iron -- you have to unset the
44+
material first.
45+
46+
Usage
47+
-----
48+
49+
::
50+
51+
gui/workshop-job

0 commit comments

Comments
 (0)