Following some suggestions for the manipulator plugin that proved difficult to implement in C++, I've been working on a replacement script written in Lua. It currently implements most basic functionality of the manipulator plugin, although some (particularly more recent features like batch editing and custom professions) are not yet implemented:
Performance has improved recently - although this script isn't quite as fast as the plugin, performance shouldn't be a noticeable issue (see "Notes" below). There will usually be a small delay when the script starts, but CPU usage in general should be reasonable.Usage:
* Download the latest release from GitHub
* Copy the "manipulator" folder from the archive to "hack/scripts/manipulator" in your DF folder.
* (Optional) Add a keybinding to dfhack.init (if you've already started DF, running this command in the DFHack console works as well):
keybinding add Alt-L@unitlist manipulator/main
(Alt-L can be changed to another key if you prefer.)
* On the unit list screen (u
), press the key you bound to manipulator/main
above or run manipulator/main
in the DFHack console.New features:
* Customizable columns: Columns can be added and edited in manipulator/columns.lua. (In fact, this is where the default columns are defined as well.) Columns can be reordered by pressing "C" in the main manipulator screen - their order persists until DF quits.
* The Shift key performs some additional functions in combination with the mouse - for example, reversing the skill sort order when clicking on grid headers and toggling an entire group of labors in the labor grid.Manipulator plugin features already implemented:
* Basics (scrolling, labor modification) and most grid keybindings
* Viewing and zooming to units
* Sorting by skills
* Stable sort
* Batch editsManipulator plugin features not yet implemented:
* Sorting by column values
* Format options when editing unit names (e.g. including units' ages, professions, list positions)
* Custom professionsPossible features:
* Saveable column layouts
* Allow columns to be defined in multiple scripts (for example, on a per-save basis or by dropping additional scripts into the hack/scripts/gui folder instead of editing manipulator-columns.lua)Notes:
* This script requires DFHack 0.40.24-r2 or above.
* Bugs and feature requests can be reported in this thread or on the Github issue tracker
* This script makes use of a new C++ drawing API that isn't included in DFHack 0.40.24-r3 or earlier. If it is unavailable, this script will fall back to an alternative, slower implementation written in Lua. I've only noticed a 20% difference in speed on my machine, but performance should be better in future DFHack releases.