DFHack 0.47.05-r2
New Scripts
clear-webs
: removes all webs on the map and/or frees any webbed creaturesdevel/block-borders
: overlay that displays map block bordersdevel/luacov
: generate code test coverage reports for script development. Define theDFHACK_ENABLE_LUACOV=1
environment variable to start gathering coverage metrics.fix/drop-webs
: causes floating webs to fall to the groundgui/blueprint
: interactive frontend for theblueprint
plugin (with mouse support!)gui/mass-remove
: mass removal/suspension tool for buildings and constructionsreveal-hidden-sites
: exposes all undiscovered sitesset-timeskip-duration
: changes the duration of the "Updating World" process preceding the start of a new game, enabling you to jump in earlier or later than usual
Fixes
- Fixed an issue preventing some external scripts from creating zones and other abstract buildings (see note about room definitions under "Internals")
- Fixed an issue where scrollable text in Lua-based screens could prevent other widgets from scrolling
bodyswap
:- stopped prior party members from tagging along after bodyswapping and reloading the map
- made companions of bodyswapping targets get added to the adventurer party - they can now be viewed using the in-game party system
buildingplan
:- fixed an issue where planned constructions designated with DF's sizing keys (
umkh
) would sometimes be larger than requested - fixed an issue preventing other plugins like
automaterial
from planning constructions if the "enable all" buildingplan setting was turned on - made navigation keys work properly in the materials selection screen when alternate keybindings are used
- fixed an issue where planned constructions designated with DF's sizing keys (
color-schemes
: fixed an error in theregister
subcommand when the DF path contains certain punctuation characterscommand-prompt
: fixed issues where overlays created by running certain commands (e.g.gui/liquids
,gui/teleport
) would not update the parent screen correctlydwarfvet
: fixed a crash that could occur with hospitals overlapping with other buildings in certain waysembark-assistant
: fixed faulty early exit in first search attempt when searching for waterfallsgui/advfort
: fixed an issue where starting a workshop job while not standing at the center of the workshop required advancing time manuallygui/unit-info-viewer
: fixed size description displaying unrelated values instead of sizeorders
: fixed crash when importing orders with malformed IDsquickfort
:- comments in blueprint cells no longer prevent the rest of the row from being read. A cell with a single '#' marker in it, though, will still stop the parser from reading further in the row.
- fixed an off-by-one line number accounting in blueprints with implicit
#dig
modelines - changed to properly detect and report an error on sub-alias params with no values instead of just failing to apply the alias later (if you really want an empty value, use
{Empty}
instead) - improved handling of non-rectangular and non-solid extent-based structures (like fancy-shaped stockpiles and farm plots)
- fixed conversion of numbers to DF keycodes in
#query
blueprints - fixed various errors with cropping across the map edge
- properly reset config to default values in
quickfort reset
even if if thedfhack-config/quickfort/quickfort.txt
config file doesn't mention all config vars. Also now works even if the config file doesn't exist.
stonesense
: fixed a crash that could occur when ctrl+scrolling or closing the Stonesense windowquickfortress.csv
blueprint: fixed refuse stockpile config and prevented stockpiles from covering stairways
Misc Improvements
- Added adjectives to item selection dialogs, used in tools like
gui/create-item
- this makes it possible to differentiate between different types of high/low boots, shields, etc. (some of which are procedurally generated) blueprint
:- made
depth
andname
parameters optional.depth
now defaults to1
(current level only) andname
defaults to "blueprint" depth
can now be negative, which will result in the blueprints being written from the highest z-level to the lowest. Before, blueprints were always written from the lowest z-level to the highest.- added the
--cursor
option to set the starting coordinate for the generated blueprints. A game cursor is no longer necessary if this option is used.
- made
devel/annc-monitor
: addedreport enable|disable
subcommand to filter combat reportsembark-assistant
: slightly improved performance of surveying and improved code a littlegui/advfort
: added workshop name to workshop UIquickfort
:- the Dreamfort blueprint set can now be comfortably built in a 1x1 embark
- added the
--cursor
option for running a blueprint at specific coordinates instead of starting at the game cursor position - added more helpful error messages for invalid modeline markers
- added support for extra space characters in blueprints
- added a warning when an invalid alias is encountered instead of silently ignoring it
- made more quiet when the
--quiet
parameter is specified
setfps
: improved error handlingstonesense
: sped up startup timetweak
hide-priority: changed so that priorities stay hidden (or visible) when exiting and re-entering the designations menuunretire-anyone
: the historical figure selection list now includes theSYN_NAME
(necromancer, vampire, etc) of figures where applicable
API
- Added
dfhack.maps.getPlantAtTile(x, y, z)
anddfhack.maps.getPlantAtTile(pos)
, and updateddfhack.gui.getSelectedPlant()
to use it - Added
dfhack.units.teleport(unit, pos)
Internals
- Room definitions and extents are now created for abstract buildings so callers don't have to initialize the room structure themselves
- The DFHack test harness is now much easier to use for iterative development. Configuration can now be specified on the commandline, there are more test filter options, and the test harness can now easily rerun tests that have been run before.
- The
test/main
command to invoke the test harness has been renamed to justtest
- Unit tests can now use
delay_until(predicate_fn, timeout_frames)
to delay until a condition is met - Unit tests must now match any output expected to be printed via
dfhack.printerr()
- Unit tests now support fortress mode (allowing tests that require a fortress map to be loaded) - note that these tests are skipped by continuous integration for now, pending a suitable test fortress
Lua
- new library:
argparse
is a collection of commandline argument processing functions - new string utility functions:
string:wrap(width)
wraps a string at space-separated word boundariesstring:trim()
removes whitespace characters from the beginning and end of the stringstring:split(delimiter, plain)
splits a string with the given delimiter and returns a table of substrings. ifplain
is specified and set totrue
,delimiter
is interpreted as a literal string instead of as a pattern (the default)
- new utility function:
utils.normalizePath()
: normalizes directory slashes across platoforms to/
and coaleses adjacent directory separators reveal
: now exposesunhideFlood(pos)
functionality to Luaxlsxreader
: added Lua class wrappers for the xlsxreader plugin APIargparse.processArgsGetopt()
(previouslyutils.processArgsGetopt()
):- now returns negative numbers (e.g.
-10
) in the list of positional parameters instead of treating it as an option string equivalent to-1 -0
- now properly handles
--
like GNUgetopt
as a marker to treat all further parameters as non-options - now detects when required arguments to long-form options are missing
- now returns negative numbers (e.g.
gui.dwarfmode
: new function:enterSidebarMode(sidebar_mode, max_esc)
which uses keypresses to get into the specified sidebar mode from whatever the current screen isgui.Painter
: fixed error when callingviewport()
method
Structures
- Identified remaining rhythm beat enum values
ui_advmode.interactions
: identified some fields related to party membersui_advmode_menu
: identified several enum itemsui_advmode
:- idenfitied several fields
- renamed
wait
torest_mode
and changed to an enum with correct values
viewscreen_legendsst.cur_page
: added missingBooks
enum item, which fixes some other values
Documentation
- Added more client library implementations to the remote interface docs