@ -69,443 +69,6 @@ The following pages document all the standard DFHack scripts.
/scripts/3rdparty/*/*
/scripts/3rdparty/*/*
fix/blood-del
=============
Makes it so that future caravans won't bring barrels full of blood, ichor, or goo.
fix/build-location
==================
Fixes construction jobs that are stuck trying to build a wall while standing
on the same exact tile (bug 5991), designates the tile restricted traffic to
hopefully avoid jamming it again, and unsuspends them.
fix/dead-units
==============
Removes uninteresting dead units from the unit list. Doesn't seem to give any
noticeable performance gain, but migrants normally stop if the unit list grows
to around 3000 units, and this script reduces it back.
fix/fat-dwarves
===============
Avoids 5-10% FPS loss due to constant recalculation of insulation for dwarves at
maximum fatness, by reducing the cap from 1,000,000 to 999,999.
fix/feeding-timers
==================
Reset the GiveWater and GiveFood timers of all units as appropriate.
fix/growth-bug
==============
Fixes locally born units such that they will grow larger than their birth size.
Note that this bug was fixed in DF version 0.40.02.
fix/item-occupancy
==================
Diagnoses and fixes issues with nonexistant 'items occupying site', usually
caused by autodump bugs or other hacking mishaps.
fix/loyaltycascade
==================
Aborts loyalty cascades by fixing units whose own civ is the enemy.
fix/population-cap
==================
Run this after every migrant wave to ensure your population cap is not exceeded.
The issue with the cap is that it is compared to the population number reported
by the last caravan, so once it drops below the cap, migrants continue to come
until that number is updated again.
fix/stable-temp
===============
Instantly sets the temperature of all free-lying items to be in equilibrium with
the environment and stops temperature updates. In order to maintain this efficient
state however, use `tweak` `` stable-temp `` and `tweak` `` fast-heat `` .
fix/stuckdoors
==============
Fix doors that are stuck open due to incorrect map occupancy flags, eg due to
incorrect use of teleport.
.. _gui/advfort:
gui/advfort
===========
This script allows to perform jobs in adventure mode. For more complete help
press '?' while script is running. It's most comfortable to use this as a
keybinding. (e.g. keybinding set Ctrl-T gui/advfort). Possible arguments:
* -a or --nodfassign - uses different method to assign items.
* -i or --inventory - checks inventory for possible items to use in the job.
* -c or --cheat - relaxes item requirements for buildings (e.g. walls from bones).
implies -a
* job - selects that job (e.g. Dig or FellTree)
An example of player digging in adventure mode:
.. image :: images/advfort.png
.. admonition :: DISCLAIMER
advfort changes only persist in non procedural sites. Namely: player forts, caves, camps.
gui/advfort_items
=================
Does something with items in adventure mode jobs.
.. _gui/assign-rack:
gui/assign-rack
===============
`This script requires a binpatch <binpatches/needs-patch>` , which has not
been available since DF 0.34.11
gui/autobutcher
===============
An in-game interface for `autobutcher` .
gui/choose-weapons
==================
Bind to a key (the example config uses Ctrl-W), and activate in the Equip->View/Customize
page of the military screen.
Depending on the cursor location, it rewrites all 'individual choice weapon' entries
in the selected squad or position to use a specific weapon type matching the assigned
unit's top skill. If the cursor is in the rightmost list over a weapon entry, it rewrites
only that entry, and does it even if it is not 'individual choice'.
Rationale: individual choice seems to be unreliable when there is a weapon shortage,
and may lead to inappropriate weapons being selected.
gui/clone-uniform
=================
Bind to a key (the example config uses Ctrl-C), and activate in the Uniforms
page of the military screen with the cursor in the leftmost list.
When invoked, the script duplicates the currently selected uniform template,
and selects the newly created copy.
.. _gui/companion-order:
gui/companion-order
===================
A script to issue orders for companions. Select companions with lower case chars, issue orders with upper
case. Must be in look or talk mode to issue command on tile.
.. image :: images/companion-order.png
* move - orders selected companions to move to location. If companions are following they will move no more than 3 tiles from you.
* equip - try to equip items on the ground.
* pick-up - try to take items into hand (also wield)
* unequip - remove and drop equipment
* unwield - drop held items
* wait - temporarily remove from party
* follow - rejoin the party after "wait"
* leave - remove from party (can be rejoined by talking)
.. _gui/create-item:
gui/create-item
===============
A graphical interface for creating items.
gui/dfstatus
============
Show a quick overview of critical stock quantities, including food, drinks, wood, and various bars.
Sections can be enabled/disabled/configured by editing `` dfhack-config/dfstatus.lua `` .
.. _gui/gm-editor:
gui/gm-editor
=============
There are three ways to open this editor:
* using gui/gm-editor command/keybinding - opens editor on what is selected
or viewed (e.g. unit/item description screen)
* using gui/gm-editor <lua command> - executes lua command and opens editor on
its results (e.g. gui/gm-editor "df.global.world.items.all" shows all items)
* using gui/gm-editor dialog - shows an in game dialog to input lua command. Works
the same as version above.
.. image :: images/gm-editor.png
This editor allows to change and modify almost anything in df. Press '?' for an
in-game help.
gui/gm-unit
===========
An editor for various unit attributes.
gui/guide-path
==============
Bind to a key (the example config uses Alt-P), and activate in the Hauling menu with
the cursor over a Guide order.
.. image :: images/guide-path.png
The script displays the cached path that will be used by the order; the game
computes it when the order is executed for the first time.
.. _gui/hack-wish:
gui/hack-wish
=============
An alias for `gui/create-item` . Deprecated.
gui/hello-world
===============
A basic example for testing, or to start your own script from.
gui/liquids
===========
To use, bind to a key (the example config uses Alt-L) and activate in the 'k' mode.
.. image :: images/liquids.png
This script is a gui front-end to `liquids` and works similarly,
allowing you to add or remove water & magma, and create obsidian walls & floors.
.. warning ::
There is **no undo support** . Bugs in this plugin have been
known to create pathfinding problems and heat traps.
The `` b `` key changes how the affected area is selected. The default *Rectangle*
mode works by selecting two corners like any ordinary designation. The `` p ``
key chooses between adding water, magma, obsidian walls & floors, or just
tweaking flags.
When painting liquids, it is possible to select the desired level with `` +- `` ,
and choose between setting it exactly, only increasing or only decreasing
with `` s `` .
In addition, `` f `` allows disabling or enabling the flowing water computations
for an area, and `` r `` operates on the "permanent flow" property that makes
rivers power water wheels even when full and technically not flowing.
After setting up the desired operations using the described keys, use `` Enter `` to apply them.
gui/mechanisms
==============
To use, bind to a key (the example config uses Ctrl-M) and activate in the 'q' mode.
.. image :: images/mechanisms.png
Lists mechanisms connected to the building, and their links. Navigating the list centers
the view on the relevant linked buildings.
To exit, press ESC or Enter; ESC recenters on the original building, while Enter leaves
focus on the current one. Shift-Enter has an effect equivalent to pressing Enter, and then
re-entering the mechanisms ui.
gui/mod-manager
===============
A simple way to install and remove small mods.
It looks for specially formatted mods in df subfolder 'mods'. Mods are not
included, but some examples are `available here`_ .
.. _`available here`: https://github.com/warmist/df-mini-mods
.. image :: images/mod-manager.png
gui/no-dfhack-init
==================
Shows a warning at startup if no valid `` dfhack.init `` file is found.
.. _gui/power-meter:
gui/power-meter
===============
An in-game interface for `power-meter` .
.. _gui/rename:
gui/rename
==========
Backed by `rename` , this script allows entering the desired name
via a simple dialog in the game ui.
* `` gui/rename [building] `` in 'q' mode changes the name of a building.
.. image :: images/rename-bld.png
The selected building must be one of stockpile, workshop, furnace, trap, or siege engine.
It is also possible to rename zones from the 'i' menu.
* `` gui/rename [unit] `` with a unit selected changes the nickname.
Unlike the built-in interface, this works even on enemies and animals.
* `` gui/rename unit-profession `` changes the selected unit's custom profession name.
.. image :: images/rename-prof.png
Likewise, this can be applied to any unit, and when used on animals it overrides
their species string.
The `` building `` or `` unit `` options are automatically assumed when in relevant ui state.
The example config binds building/unit rename to Ctrl-Shift-N, and
unit profession change to Ctrl-Shift-T.
gui/room-list
=============
To use, bind to a key (the example config uses Alt-R) and activate in the 'q' mode,
either immediately or after opening the assign owner page.
.. image :: images/room-list.png
The script lists other rooms owned by the same owner, or by the unit selected in the assign
list, and allows unassigning them.
.. _gui/siege-engine:
gui/siege-engine
================
An in-game interface for `siege-engine` .
.. _gui/stockpiles:
gui/stockpiles
==============
An in-game interface for `stocksettings` , to
load and save stockpile settings from the 'q' menu.
Usage:
:gui/stockpiles -save: to save the current stockpile
:gui/stockpiles -load: to load settings into the current stockpile
:gui/stockpiles -dir <path>: set the default directory to save settings into
:gui/stockpiles -help: to see this message
Don't forget to `` enable stockpiles `` and create the `` stocksettings `` directory in
the DF folder before trying to use the GUI.
gui/unit-info-viewer
====================
Displays age, birth, maxage, shearing, milking, grazing, egg laying, body size,
and death info about a unit. Recommended keybinding Alt-I.
.. _gui/workflow:
gui/workflow
============
Bind to a key (the example config uses Alt-W), and activate with a job selected
in a workshop in the 'q' mode.
.. image :: images/workflow.png
This script provides a simple interface to constraints managed by `workflow` .
When active, it displays a list of all constraints applicable to the
current job, and their current status.
A constraint specifies a certain range to be compared against either individual
*item* or whole *stack* count, an item type and optionally a material. When the
current count is below the lower bound of the range, the job is resumed; if it
is above or equal to the top bound, it will be suspended. Within the range, the
specific constraint has no effect on the job; others may still affect it.
Pressing 'I' switches the current constraint between counting stacks or items.
Pressing 'R' lets you input the range directly; 'e', 'r', 'd', 'f' adjust the
bounds by 5, 10, or 20 depending on the direction and the 'I' setting (counting
items and expanding the range each gives a 2x bonus).
Pressing 'A' produces a list of possible outputs of this job as guessed by
workflow, and lets you create a new constraint by choosing one as template. If you
don't see the choice you want in the list, it likely means you have to adjust
the job material first using `job` `` item-material `` or `gui/workshop-job` ,
as described in `workflow` documentation. In this manner, this feature
can be used for troubleshooting jobs that don't match the right constraints.
.. image :: images/workflow-new1.png
If you select one of the outputs with Enter, the matching constraint is simply
added to the list. If you use Shift-Enter, the interface proceeds to the
next dialog, which allows you to edit the suggested constraint parameters to
suit your need, and set the item count range.
.. image :: images/workflow-new2.png
Pressing 'S' (or, with the example config, Alt-W in the 'z' stocks screen)
opens the overall status screen, which was copied from the C++ implementation
by falconne for better integration with the rest of the lua script:
.. image :: images/workflow-status.png
This screen shows all currently existing workflow constraints, and allows
monitoring and/or changing them from one screen. The constraint list can
be filtered by typing text in the field below.
The color of the stock level number indicates how "healthy" the stock level
is, based on current count and trend. Bright green is very good, green is good,
red is bad, bright red is very bad.
The limit number is also color-coded. Red means that there are currently no
workshops producing that item (i.e. no jobs). If it's yellow, that means the
production has been delayed, possibly due to lack of input materials.
The chart on the right is a plot of the last 14 days (28 half day plots) worth
of stock history for the selected item, with the rightmost point representing
the current stock value. The bright green dashed line is the target
limit (maximum) and the dark green line is that minus the gap (minimum).
.. _gui/workshop-job:
gui/workshop-job
================
Bind to a key (the example config uses Alt-A), and activate with a job selected in
a workshop in the 'q' mode.
.. image :: images/workshop-job.png
The script shows a list of the input reagents of the selected job, and allows changing
them like the `job` `` item-type `` and `job` `` item-material `` commands.
Specifically, pressing the 'i' key pops up a dialog that lets you select an item
type from a list.
.. image :: images/workshop-job-item.png
Pressing 'm', unless the item type does not allow a material,
lets you choose a material.
.. image :: images/workshop-job-material.png
Since there are a lot more materials than item types, this dialog is more complex
and uses a hierarchy of sub-menus. List choices that open a sub-menu are marked
with an arrow on the left.
.. warning ::
Due to the way input reagent matching works in DF, you must select an item type
if you select a material, or the material will be matched incorrectly in some cases.
If you press 'm' without choosing an item type, the script will auto-choose it
if there is only one valid choice, or pop up an error message box instead of the
material selection dialog.
Note that both materials and item types presented in the dialogs are filtered
by the job input flags, and even the selected item type for material selection,
or material for item type selection. Many jobs would let you select only one
input item type.
For example, if you choose a *plant* input item type for your prepare meal job,
it will only let you select cookable materials.
If you choose a *barrel* item instead (meaning things stored in barrels, like
drink or milk), it will let you select any material, since in this case the
material is matched against the barrel itself. Then, if you select, say, iron,
and then try to change the input item type, now it won't let you select *plant* ;
you have to unset the material first.
.. _modtools/add-syndrome:
.. _modtools/add-syndrome:
modtools/add-syndrome
modtools/add-syndrome
@ -620,9 +183,6 @@ modtools/transform-unit
Transforms a unit into another unit type, possibly permanently.
Transforms a unit into another unit type, possibly permanently.
=============
Other Scripts
=============
ban-cooking
ban-cooking
===========
===========