Dwarf Fortress > DF Modding
DFHack 0.34.11 r3
peterix:
DFHack is an attempt to unite the various ways hack tools access DF memory and allow for easier development of new tools (and of course, make the game more enjoyable for players). It comes with some useful tools that can fix your fort and make things easier to handle. DFHack integrates with Dwarf Fortress and extends it with plugins, a command console and a way to bind hotkeys to the commands.
Continued development of DFHack would be impossible without its contributors and definitely isn't a one man show. Check this out!
Some command examples:
'reveal' - reveals the map or portions of it.
'prospect' - counts available raw materials - mostly minerals.
'clean' - removes nasty bloodstains and other such materials from the map, items and creatures.
'cleanowned' - removes ownership of claimed items, solving problems with worn clothing and military starving out the fort.
'stonesense' - an embedded version of the Stonesense isometric visualizer, ready for use.
'dfusion' - an embedded version of DFusion
And many more...
How to install DFHack:
* First, get the archive meant for your system. Extract the contents into your DF folder.
* On Windows, you're ready to use DFHack. An extra command line window should appear when you run DF.
* On Linux, use the 'dfhack' script from a terminal to run DF with DFHack. If you have stonesense problems, you might have to get your own allegro 5 libraries and delete the ones in stonesense/deplibs.
How to uninstall DFHack:
* Remove 'stonesense', 'hack' and 'dfusion' folders from your DF.
* On Windows, remove SDL.dll and rename SDLreal.dll to SDL.dll
* On Linux, remove the dfhack script.
Read the Readme for the full list of commands, their usage and installation instructions :)
Stonesense has a README file too. Check it out if you don't know all the keys yet.
DFHack for DF 0.34.11 (release 3) (Current):
Windows version
Linux version
OSX version
What's new
* Internals
* support for displaying active keybindings properly.
* support for reusable widgets in lua screen library.
* Maps::canStepBetween: returns whether you can walk between two tiles in one step.
* EventManager: monitors various in game events centrally so that individual plugins don't have to monitor the same things redundantly.
* Now works with OSX 10.6.8
* Notable bugfixes
* autobutcher can be re-enabled again after being stopped.
* stopped Dwarf Manipulator from unmasking vampires.
* Stonesense is now fixed on OSX
* Misc improvements
* fastdwarf: new mode using debug flags, and some internal consistency fixes.
* added a small stand-alone utility for applying and removing binary patches.
* removebadthoughts: add --dry-run option.
* superdwarf: work in adventure mode too.
* tweak stable-cursor: carries cursor location from/to Build menu.
* deathcause: allow selection from the unitlist screen.
* slayrace: allow targetting undeads.
* New tweaks
* tweak military-training: speed up melee squad training up to 10x (normally 3-5x).
* New scripts
* binpatch: the same as the stand-alone binpatch.exe, but works at runtime.
* region-pops: displays animal populations of the region and allows tweaking them.
* lua: lua interpreter front-end converted to a script from a native command.
* dfusion: misc scripts with a text based menu.
* embark: lets you embark anywhere.
* lever: list and pull fort levers from the dfhack console.
* stripcaged: mark items inside cages for dumping, eg caged goblin weapons.
* soundsense-season: writes the correct season to gamelog.txt on world load.
* create-items: spawn items
* fix/cloth-stockpile: fixes bug 5739; needs to be run after savegame load every time.
* New GUI scripts
* gui/guide-path: displays the cached path for minecart Guide orders.
* gui/workshop-job: displays inputs of a workshop job and allows tweaking them.
* gui/workflow: a front-end for the workflow plugin (part inspired by falconne).
* gui/assign-rack: works together with a binary patch to fix weapon racks.
* gui/gm-editor: an universal editor for lots of dfhack things.
* gui/companion-order: a adventure mode command interface for your companions.
* gui/advfort: a way to do jobs with your adventurer (e.g. build fort).
* New binary patches (for use with binpatch)
* armorstand-capacity: doubles the capacity of armor stands.
* custom-reagent-size: lets custom reactions use small amounts of inputs.
* deconstruct-heapfall: stops some items still falling on head when deconstructing.
* deconstruct-teleport: stops items from 16x16 block teleporting when deconstructing.
* hospital-overstocking: stops hospital overstocking with supplies.
* training-ammo: lets dwarves with quiver full of combat-only ammo train.
* weaponrack-unassign: fixes bug that negates work done by gui/assign-rack.
* Workflow plugin
* properly considers minecarts assigned to routes busy.
* code for deducing job outputs rewritten in lua for flexibility.
* logic fix: collecting webs produces silk, and ungathered webs are not thread.
* items assigned to squads are considered busy, even if not in inventory.
* shearing and milking jobs are supported, but only with generic MILK or YARN outputs.
* workflow announces when the stock level gets very low once a season.
* New Fix Armory plugin
* Together with a couple of binary patches and the gui/assign-rack script,
this plugin makes weapon racks, armor stands, chests and cabinets in
properly designated barracks be used again for storage of squad equipment.
* New Search plugin by falconne
* Adds an incremental search function to the Stocks, Trading, Stockpile and Unit List screens.
* New AutoMaterial plugin by falconne
* Makes building constructions (walls, floors, fortifications, etc) a little bit easier by
saving you from having to trawl through long lists of materials each time you place one.
* Dfusion plugin
* Reworked to make use of lua modules, now all the scripts can be used from other scripts.
* New Eventful plugin
* A collection of lua events, that will allow new ways to interact with df world.
* Auto syndrome plugin
* A way of automatically applying boiling rock syndromes and calling dfhack commands controlled by raws.
* Infinite sky plugin
* Create new z-levels automatically or on request.
* True transformation plugin
* A better way of doing permanent transformations that allows later transformations.
* Work now plugin
* Makes the game assign jobs every time you pause.
DFHack for DF 0.34.08 - 0.34.11 (release 2) (older):
Spoiler (click to show/hide)Windows version
Linux version
OSX version
What's new
* Internals
* full support for Mac OS X.
* a plugin that adds scripting in ruby.
* support for interposing virtual methods in DF from C++ plugins.
* support for creating new interface screens from C++ and lua.
* added various other API functions.
* Notable bugfixes
* better terminal reset after exit on linux.
* seedwatch now works on reclaim.
* the sort plugin won't crash on cages anymore.
* Misc improvements
* autodump: can move items to any walkable tile, not just floors.
* stripcaged: by default keep armor, new dumparmor option.
* zone: allow non-domesticated birds in nestboxes.
* workflow: quality range in constraints.
* cleanplants: new command to remove rain water from plants.
* liquids: can paint permaflow, i.e. what makes rivers power water wheels.
* prospect: pre-embark prospector accounts for caves & magma sea in its estimate.
* rename: supports renaming stockpiles, workshops, traps, siege engines.
* fastdwarf: now has an additional option to make dwarves teleport to their destination.
* New commands
* misery: multiplies every negative thought gained (2x by default).
* digtype: designates every tile of the same type of vein on the map for 'digging' (any dig designation).
* New tweaks
* tweak stable-cursor: keeps exact cursor position between d/k/t/q/v etc menus.
* tweak patrol-duty: makes Train orders reduce patrol timer, like the binary patch does.
* tweak readable-build-plate: fix unreadable truncation in unit pressure plate build ui.
* tweak stable-temp: fixes bug 6012; may improve FPS by 50-100% on a slow item-heavy fort.
* tweak fast-heat: speeds up item heating & cooling, thus making stable-temp act faster.
* tweak fix-dimensions: fixes subtracting small amounts from stacked liquids etc.
* tweak advmode-contained: fixes UI bug in custom reactions with container inputs in advmode.
* tweak fast-trade: Shift-Enter for selecting items quckly in Trade and Move to Depot screens.
* tweak military-stable-assign: Stop rightmost list of military->Positions from jumping to top.
* tweak military-color-assigned: In same list, color already assigned units in brown & green.
* New scripts
* fixnaked: removes thoughts about nakedness.
* setfps: set FPS cap at runtime, in case you want slow motion or speed-up.
* siren: wakes up units, stops breaks and parties - but causes bad thoughts.
* fix/population-cap: run after every migrant wave to prevent exceeding the cap.
* fix/stable-temp: counts items with temperature updates; does instant one-shot stable-temp.
* fix/loyaltycascade: fix units allegiance, eg after ordering a dwarf merchant kill.
* deathcause: shows the circumstances of death for a given body.
* digfort: designate areas to dig from a csv file.
* drainaquifer: remove aquifers from the map.
* growcrops: cheat to make farm crops instantly grow.
* magmasource: continuously spawn magma from any map tile.
* removebadthoughts: delete all negative thoughts from your dwarves.
* slayrace: instakill all units of a given race, optionally with magma.
* superdwarf: per-creature fastdwarf.
* New GUI scripts
* gui/mechanisms: browse mechanism links of the current building.
* gui/room-list: browse other rooms owned by the unit when assigning one.
* gui/liquids: a GUI front-end for the liquids plugin.
* gui/rename: renaming stockpiles, workshops and units via an in-game dialog.
* gui/power-meter: front-end for the Power Meter plugin.
* gui/siege-engine: front-end for the Siege Engine plugin.
* gui/choose-weapons: auto-choose matching weapons in the military equip screen.
* Autolabor plugin
* can set nonidle hauler percentage.
* broker excluded from all labors when needed at depot.
* likewise, anybody with a scheduled diplomat meeting.
* New Dwarf Manipulator plugin
Open the unit list, and press 'l' to access a Dwarf Therapist like UI in the game.
* New Steam Engine plugin
Dwarven Water Reactors don't make any sense whatsoever and cause lag, so this may be
a replacement for those concerned by it. The plugin detects if a workshop with a
certain name is in the raws used by the current world, and provides the necessary
behavior. See hack/raw/*_steam_engine.txt for the necessary raw definitions.
Note: Stuff like animal treadmills might be more period, but absolutely can't be
done with tools dfhack has access to.
* New Power Meter plugin
When activated, implements a pressure plate modification that detects power in gear
boxes built on the four adjacent N/S/W/E tiles. The gui/power-meter script implements
the necessary build configuration UI.
* New Siege Engine plugin
When enabled and configured via gui/siege-engine, allows aiming siege engines
at a designated rectangular area with 360 degree fire range and across Z levels;
this works by rewriting the projectile trajectory immediately after it appears.
Also supports loading catapults with non-boulder projectiles, taking from a stockpile,
and restricting operator skill range like with ordinary workshops.
Disclaimer: not in any way to undermine the future siege update from Toady, but
the aiming logic of existing engines hasn't been updated since 2D, and is almost
useless above ground :(. Again, things like making siegers bring their own engines
is totally out of the scope of dfhack and can only be done by Toady.
* New Add Spatter plugin
Detects reactions with certain names in the raws, and changes them from adding
improvements to adding item contaminants. This allows directly covering items
with poisons. The added spatters are immune both to water and 'clean items'.
Intended to give some use to all those giant cave spider poison barrels brought
by the caravans.
DFHack for DF 0.34.08 - 0.34.11 (release 1) (older):
Spoiler (click to show/hide)Windows version (with Stonesense and DFusion)
Linux version (with Stonesense)
* Support for 0.34.11 added.
* TEXT mode should now be properly detected and handled on Linux.
* Work has started on an OSX port - for real this time!
* Many bugfixes and improvements to the existing tools and plugins.
Possible problems:
* Stonesense lacks graphics for the many new track tiles.
DFHack for DF 0.34.08, 0.34.09 and 0.34.10 (older):
Spoiler (click to show/hide)Release 1:
Windows version (with Stonesense and DFusion)
Linux version (with Stonesense)
* Support for 0.34.08 - 0.34.10 added, older removed.
* More work on LUA scripting support - you can now:
* Write DFHack plugins in LUA - see examples
* Write scripts to extend functionality of some plugins. See the info on that.
* 'quicksave' plugin allows ... quicksave!
* 'putontable' lets you put items on tables.
* sort plugin allows sorting in-game lists - LUA extensible, so you can define your own sort order ;)
* More of the DFHack API is exposed to LUA now.
* Bugfixes for liquids and autodump (fixing pathfinding and building obstruction flags)
* ...
* PROFIT! And many other changes.
DFHack for DF 0.34.06 and 0.34.07 (older):
Spoiler (click to show/hide)Release 2:
Windows version (with Stonesense and DFusion)
Linux version (with Stonesense)
* DFusion got a major facelift and now can access pretty much anything that DFHack can. Check the API document for awesome.
* Added/changed plugins:
* autobutcher - automatically butcher excess animals (you can set the limits)
* autonestbox - automatically assigns animals to nest boxes
* burrow - allows messing with burrows - mass designation changes, mass assigning, automatic expansion while digging.
* catsplosion - makes cats just multiply.
* regrass command is back, this time working with the new grass types Toady added
* tiletypes-here - the tiletypes tool now saves its settings and this command lets you apply them from a hotkey/keybind
* tiletypes-command - give internal command to tiletypes
* tiletypes-here-point - apply tiletypes settings to a single tile (ignoring brush)
* zone - tool for managing activity zones, allowing pitting/penning creatures, slaughter on command and assigning to cages.
* unified the names of various dig commands:
* digv - old vdig
* digvx - old vdig -x (crossing z-levels)
* digl - the equivalent of digv, but for layer stones
* diglx - digs layer stones while crossing z-levels
* digexp - exploratory digger (expdig previously)
* digcircle - is the same as before :)
* This puts them next to each other in the 'ls' output
* Countless bug fixes (please re-check anything you've reported in this thread since release 1)
* And all the other things I've missed, as usual ;)
Release 1:
Windows version (with Stonesense and DFusion)
Linux version (with Stonesense)
* Support for 0.34.06 and 0.34.07 - preferably use 0.34.07 ;)
* DFusion is back for Windows!
* Added commands/plugins:
* changelayer - allows changing materials of geological layers.
* changeitem - allows changing the quality and materials of items.
* cursecheck - tool that checks for any cursed creatures (were-creatures, vampires, the undead, etc.)
* feature - a tool for managing and manipulating map features: allows things like making magma forges available by marking the magma layer 'discovered', marking caverns 'hidden' to prevent cavern plant spread and so on.
* liquids-here - the liquids tool now saves its settings and this command lets you apply them from a hotkey/keybind
* revforget - reveal normally saves the info about which tiles were revealed (and prevents you from unrevealing on a different map). This command removes the reveal data.
* lair - marks the whole map as monster lair, preventing item spread on reclaim. You can revert the action with 'lair reset'.
* autolabor - automatically assigns labors to dwarves, making them work more. It's magic ;)
* workflow now works with crafts properly
* Stonesense can now draw what creatures wear and what's laying on the floor. See the stonesense thread for awesome screenshots :)
* DFHack now includes a new binary - 'dfhack-run'. You can use it to send commands to a running DFHack instance from a normal terminal, not the DFHack console.
Example: 'dfhack-run prospect all > prospect.txt' will save the prospect information in a text file.
This only works with commands that aren't interactive - liquids and tiletypes won't work.
* Work has started on an external API, using sockets for transport and google protobuf for the protocol specification.
* And all the other things I've missed ;)
DFHack for DF 0.34.05 (older):
Spoiler (click to show/hide)Windows version (with Stonesense)
Linux version (with Stonesense)
Changes:
* Support for 0.34.05.
* DF2Minecraft is back, receiving the minimum of changes needed for it to be built. Use with care, may explode.
* Still no DFusion.
* The 'tweak' plugin was added, which contains a command that can force 'missing' creatures to be seen as 'dead' (see readme)
* Stonesense received some improvements and bug fixes (several crashers too)
* Reveal can be used in adventure mode - it will show the revealed map until you move.
* Linux builds are now done in a virtual machine, please report any oddities you run into.
DFHack for DF 0.34.03 and 0.34.04 (older):
Spoiler (click to show/hide)Windows version (with Stonesense)
Linux version (with Stonesense)
Changes:
* Support for 34.04 and 34.03. DO NOT USE WITH 34.02!
* Still no DFusion and DF2Minecraft.
* Some new, exciting plugins:
* Changing mineral vein materials(changevein)
* Listing party equip in adventure mode (advtools)
* Taking control over your companions as if they were you (adv-bodyswap).
* Random minor fixes...
DFHack for DF 0.34.02 (older):
Spoiler (click to show/hide)Windows version (with Stonesense)
Linux version (with Stonesense)
Changes:
* Support for 34.02. 34.01 was skipped.
* The DFusion plugin isn't present in this release because it need more work to be ready. I know warmist is working on it, so stay tuned for more.
* DF2Minecraft isn't present either - mostly due to bugginess. It will come back once it's updated to the new Minecraft map format and debugged/rewritten for performance.
* A new follow plugin that allows you to make the game follow a particular creature with the view automatically. It's like magic :D
* Some minor tweaks to existing plugins.
* Some of the fix* plugins might not make sense anymore. Don't run them unless you think you need them.
DFHack for DF 0.31.25 (older):
Spoiler (click to show/hide)Windows version (with Stonesense and DFusion) r9a
Linux version (with Stonesense) r9b
Changes:
* Massive internal overhaul of everything forever ;) Seriously. It's just too much to type.
* New patterns for exploratory digger
* prospector tool now works in the embark screen
* Added commands/plugins:
* fixveins - fixes veins mangled by map editing
* fixwagons - adds wagons back into the game
* fixmerchants - adds guild representatives back to the game
* fixdiplomats - elves will come and demand cutting less wood
* showmood - lists materials required for the current strange mood
* regrass - fixes grass in pre-31.19 forts
* dwarfexport - export dwarves to RuneSmith-compatible XML (for use with dwarf guidance counsellor).
* mapexport - exports the currently loaded map into a file, which should be (eventually) loadable by various visualizers.
* copystock - copies the parameters of the currently selected stockpile to the custom stockpile settings. Copy&paste those stockpiles!
* job, job-material, job-duplicate - job query and modification tools, allowing setting what materials to use for jobs that normally don't allow such specificity (only obsidian mugs? YES.)
* workflow - tool similar in function to dwarf foreman, only with less GUI. You just have to set up repeat jobs in your buildings, set upper and lower limits on resources and let it manage the jobs for you.
* keybinding - allows binding any command to any key combo. For example, you can bind 'revtoggle' to a key and not bother with the console for reveal.
* And plenty of other things I forgot :)Hotfix r9a:
* Added keybind command to 'ls' output.
* Fixed type error in DFusion.Hotfix r9b:
* Fixed tidlers command
DFHack for DF 40dxx (ancient):
See the thread for legacy DFHack: here.
Bugs should be reported here: Issues tracker.
There's an IRC channel on freenode: #dfhack (irc://irc.freenode.net/dfhack or web client)
The source code is available from github, please read the Compile document before building.
Full list of downloadable versions can be found here: http://dethware.org/dfhack/download/
peterix:
History:
Spoiler (click to show/hide)0.31.25 r8a:
Windows version (with Stonesense and DFusion)
Linux version (with Stonesense)
* Added the DF to Minecraft map converter (command 'df2minecraft'). It is still experimental and can crash, but have fun with it :) (All OS)
* Added 'nopause' command to force the game to not pause. (All OS)
* Merged the contribution to the tiletypes tool and added some fixes to it - it should behave better now. (All OS)
* Fixed problem with console shutting down after using stonesense. (Linux)
* Fixed fastdwarf. (Windows)
* Initialization is now more error-resistant - you should get a sensible error message if something fails (All OS)
* All errors are now properly logged into stderr.log (All OS)
* General hardening and simplified DF version checks. (Linux)
* Fixed some cleanowned command options. (All OS)
* DFHack now uses a different (public domain) MD5 implementation. (Linux)0.31.25 r7:
Windows version (with Stonesense and DFusion)
Linux version (with Stonesense)
* Stonesense gained the full map screenshot feature back.
* DFHack now has good support for items. DF's own functions are called instead of the previous convoluted scheme.
* Much better support for the material system - fully mapping many of the RAW data structures.
* Old cleanmap command is now the brand new and shiny clean command, and can also clean units and items. Major FPS savings are possible to achieve in old forts with dirty dwarves.
* Spotclean command for removing material coverings from single map tiles - ideally combined with hotkeys :)
* Drybuckets command that removes all water from buckets.
* Fastdwarf command that acts pretty much like setting the SPEED tag for dwarves to 0 on the fly (all citizen jobs are effectively shortened to 1 tick).
* Filltraffic and tiletraffic commands for flood fill (within room) and 'full map' traffic designations.
* Getplants command that can designate plants and trees for gathering based on type (for example gathering just strawberry bushes)
* The reveal commands gained a 'demon' option due to people asking for it - this won't force pause and reveal hell. Enjoy the !!FUN!! ;)
* Prospector tool will now specify on what range of z-levels you can find each material.
* Support for material cook/brew settings (currently focused on plants, but simple to extend).
* Seedwatch tool that watches the amounts of seeds for selected plants and enables/disables cooking for them automatically.
* Many bug fixes.
Japa:
Wootwoot!
DJDD:
Love your work Peterix, as always. ;)
Artanis00:
Looking good. First time looking at this.
One minor quibble, though: better plugin loading error messages. I can't try to fix it if I don't even know whats going wrong.
$ ./dfhack
dfhack: hooking successful
Dynamically loading the OpenAL library failed, disabling sound
Initializing OpenAL failed, no sound will be played
Loading bindings from data/init/interface.txt
New window size: 640x300
Font size: 8x12
Resizing grid to 80x25
Resizing font to 8x12
Resetting textures
Can't load plugin ./hack/plugins/stonesense.plug.so
DFHack is ready. Have a nice day!
Type in '?' or 'help' for general help, 'ls' to see all commands.
[DFHack]#
It looks like allegro 5 doesn't have Debian packages at the moment (if I'm wrong, disregard and let me know), which means it's probably dependency problems. The build process for allegro seems easy enough... cmake is not seeing libxcursor, why?
For now, README should probably note that it's not in the package manager.
Navigation
[0] Message Index
[#] Next page
Go to full version