DFHack 0.47.05-r5
New Plugins
spectate
: "spectator mode" -- automatically follows dwarves doing things in your fort
New Scripts
devel/eventful-client
: useful for testing eventful events
New Tweaks
tweak
:partial-items
displays percentage remaining for partially-consumed items such as hospital cloth
Fixes
autofarm
: removed restriction on only planting "discovered" plantscxxrandom
: fixed exception when callingbool_distribution
devel/query
:- fixed a problem printing parents when the starting path had lua pattern special characters in it
- fixed a crash when trying to iterate over linked lists
gui/advfort
: encrust and stud jobs no longer consume reagents without actually improving the target itemluasocket
: return correct status code when closing socket connections so clients can know when to retryquickfort
: contructions and bridges are now properly placed over natural rampssetfps
: keep internal ratio of processing FPS to graphics FPS in sync when updating FPS
Misc Improvements
autochop
:- only designate the amount of trees required to reach
max_logs
- preferably designate larger trees over smaller ones
- only designate the amount of trees required to reach
autonick
:- now displays help instead of modifying dwarf nicknames when run without parameters. use
autonick all
to rename all dwarves. - added
--quiet
and--help
options
- now displays help instead of modifying dwarf nicknames when run without parameters. use
blueprint
:track
phase renamed tocarve
- carved fortifications and (optionally) engravings are now captured in generated blueprints
cursecheck
: new option,--ids
prints creature and race IDs of the cursed creaturedebug
:- DFHack log messages now have configurable headers (e.g. timestamp, origin plugin name, etc.) via the
debugfilter
command of thedebug
plugin - script execution log messages (e.g. "Loading script: dfhack_extras.init" can now be controlled with the
debugfilter
command. To hide the messages, add this line to yourdfhack.init
file:debugfilter set Warning core script
- DFHack log messages now have configurable headers (e.g. timestamp, origin plugin name, etc.) via the
dfhack-examples-guide
:- add mugs to
basic
manager orders onMapLoad_dreamfort.init
remove "cheaty" commands and new tweaks that are now in the defaultdfhack.init-example
file
- add mugs to
dig-now
: handle fortification carvingEventManager
:- add new event type
JOB_STARTED
, triggered when a job first gains a worker - add new event type
UNIT_NEW_ACTIVE
, triggered when a new unit appears on the active list
- add new event type
gui/blueprint
: support newblueprint
options and phasesgui/create-item
: Added "(chain)" annotation text for armours with the [CHAIN_METAL_TEXT] flag setmanipulator
: tweak colors to make the cursor easier to locatequickfort
:- support transformations for blueprints that use expansion syntax
- adjust direction affinity when transforming buildings (e.g. bridges that open to the north now open to the south when rotated 180 degrees)
- automatically adjust cursor movements on the map screen in
#query
and#config
modes when the blueprint is transformed. e.g.{Up}
will be played back as{Right}
when the blueprint is rotated clockwise and the direction key would move the map cursor - new blueprint mode:
#config
; for playing back key sequences that don't involve the map cursor (like configuring hotkeys, changing standing orders, or modifying military uniforms) - API function
apply_blueprint
can now takedata
parameters that are simple strings instead of coordinate maps. This allows easier application of blueprints that are just one cell.
stocks
: allow search terms to match the full item label, even when the label is truncated for lengthtweak
:stable-cursor
now keeps the cursor stable even when the viewport moves a small amountdfhack.init-example
: recently-added tweaks added to exampledfhack.init
file
API
- add functions reverse-engineered from ambushing unit code:
Units::isHidden()
,Units::isFortControlled()
,Units::getOuterContainerRef()
,Items::getOuterContainerRef()
Lua
custom-raw-tokens
: library for accessing tokens added to raws by modsdfhack.units
: Lua wrappers for functions reverse-engineered from ambushing unit code:isHidden(unit)
,isFortControlled(unit)
,getOuterContainerRef(unit)
,getOuterContainerRef(item)
dialogs
:show*
functions now return a reference to the created dialogdwarfmode.enterSidebarMode()
: passingdf.ui_sidebar_mode.DesignateMine
now always results in you enteringDesignateMine
mode and notDesignateChopTrees
, even when you looking at the surface (where the default designation mode isDesignateChopTrees
)dwarfmode.MenuOverlay
:- if
sidebar_mode
attribute is set, automatically manage entering a specific sidebar mode on show and restoring the previous sidebar mode on dismiss - new class function
renderMapOverlay
to assist with painting tiles over the visible map
- if
ensure_key
: new global function for retrieving or dynamically creating Lua table mappingssafe_index
: now properly handles lua sparse tables that are indexed by numbersstring
: new functionescape_pattern()
escapes regex special characters within a stringwidgets
:- unset values in
frame_inset
table default to0
FilteredList
class now allows all punctuation to be typed into the filter and can match search keys that start with punctuation- minimum height of
ListBox
dialog is now calculated correctly when there are no items in the list (e.g. when a filter doesn't match anything) - if
autoarrange_subviews
is set,Panel
\s will now automatically lay out widgets vertically according to their current height. This allows you to have widgets dynamically change height or become visible/hidden and you don't have to worry about recalculating frame layouts - new class
ResizingPanel
(subclass ofPanel
) automatically recalculates its own frame height based on the size, position, and visibility of its subviews - new class
HotkeyLabel
(subclass ofLabel
) that displays and reacts to hotkeys - new class
CycleHotkeyLabel
(subclass ofLabel
) allows users to cycle through a list of options by pressing a hotkey - new class
ToggleHotkeyLabel
(subclass ofCycleHotkeyLabel
) toggles betweenOn
andOff
states - new class
WrappedLabel
(subclass ofLabel
) provides autowrapping of text - new class
TooltipLabel
(subclass ofWrappedLabel
) provides tooltip-like behavior
- unset values in
Structures
adventure_optionst
: add missinggetUnitContainer
vmethodhistorical_figure.T_skills
: addaccount_balance
fieldjob
: addimprovement
field (union withhist_figure_id
andrace
)report_init.flags
: renamesparring
flag tohostile_combat
viewscreen_loadgamest
: add missingLoadingImageSets
andLoadingDivinationSets
enum values tocur_step
field
Documentation
- add more examples to the plugin example skeleton files so they are more informative for a newbie
- update download link and installation instructions for Visual C++ 2015 build tools on Windows
- update information regarding obtaining a compatible Windows build environment
confirm
: correct the command name in the plugin help textcxxrandom
: added usage exampleslua-string
: document DFHack string extensions (startswith()
,endswith()
,split()
,trim()
,wrap()
, andescape_pattern()
)quickfort-blueprint-guide
: added screenshots to the Dreamfort case study and overall clarified textremote-client-libs
: add new Rust client libraryLua API.rst
: addedisHidden(unit)
,isFortControlled(unit)
,getOuterContainerRef(unit)
,getOuterContainerRef(item)