For importing and exporting stockpile settings between saves
- Version: 0.1, for DF v0.34.11, 0.40.16, and 0.40.19
- Updated: 6 Dec, 2014
- Author: rmblr
- OS: Windows, Linux, OS X
- DOWNLOAD IT
- DOWNLOAD PRESETS
(read this documentation online)
This is a massive enhancement to the 'copystock' plugin. Now, in addition to copying settings between stockpiles in game, it can export the settings to a file in your DF folder and import them in again. This works even across worlds, saves, and operating systems.
Using this plugin you’ll save time creating your elaborate stockpile logistics flows and you can even share your masterfully crafted stockpile settings with other players.
Stockpiling behavior by players has been getting more and more complicated as the years go by. Persisting stockpile settings that are tedious to setup will make it easier for players to adopt more efficient, but complicated, stockpiling practices.
Moreover, this is an incredible improvement over macros. Macros are not only tedious but error prone and impossible to edit after the fat. Not to mention sharing them is cumbersome and fraught with other problems.
-
v0.1 (6 Dec 2014)
- Fix quality initialization bug (thanks fricy!)
- Add typing filter for loading settings
- Many new stockpile presets!
-
v0.1 beta2 (4 Dec 2014)
- Fix a few crashes
- Show user friendly error messages
-
v0.1 beta (3 Dec 2014)
- Initial release
If this plugin came with your DFHack installation, you don't need to do anything. This only applies to DFHack version 40.19 or later.
Install the plugin to your existing DFHack folder:
-
Download the plugin (see below)
-
Which version of DF/DFHack are you using? Enter that subfolder.
-
Which OS are you using? Enter that subfolder.
-
Windows: copy and paste the
hack\
folder to...\DF\hack\
(where DF is your DF folder), merge and replace all files.Linux/OS X: copy
hack/*
todf_linux/hack/*
(where DF is your DF folder), merge and replace all files.cd linux/YOUR_VERSION /bin/cp -fr hack/* ~/PATH/TO/YOUR/df_linux/hack/
First, create a folder in your DF directory called stocksettings
. This is
where the stockpile settings will be stored.
Then download the presets and place them in this folder!
Second, setup your dfhack.init. If you are using a DFHack that is distributed with this plugin (v40.19 and later), then these settings should already exist in dfhack.init-example.
# enable the stockpiles gui plugin
enable stockpiles
# q->stockpile - copy & paste stockpiles
keybinding add Alt-P copystock
# q->stockpile - load and save stockpile settings out of game
keybinding add Alt-L@dwarfmode/QueryBuilding/Some/Stockpile "gui/stockpiles -load"
keybinding add Alt-S@dwarfmode/QueryBuilding/Some/Stockpile "gui/stockpiles -save"
With the plugin installed you will see a new hotkey when in the q
menu
and a stockpile is selected.
When you press the l
(as in load) key, it will prompt you to save or load
the settings of the currently selected stockpile.
Saving
When you choose to save settings, it will ask you to type the name of the
settings so you can reference it later. Access directly with Alt-S
Loading
When you choose to load settings, it will display a list of all your saved
stockpile settings (in the stocksettings
) folder. Access directly with Alt-L
Custom Hotkeys
dfhack.init-example
has some default hotkeys I recommend to speed up the process.
Alt-P
- copystock - copy and paste stockpilesAlt-L
- load stockpile settings (like pressing l -> Load)Alt-S
- save stockpile settings (like pressing l -> Save)
These all require you to have a stockpile selected in the q
menu.
The plugin is also accessible directly from the DFHack command line. It adds two
new commands: savestock
and loadstock
Use the q
key in DF to highlight a stockpile. Then run savestock name_of_file
giving it a descriptive filename. This will create a file called name_of_file
in your DF folder that contains the settings for that stockpile.
Then, in a different (or same!) game save, you can highlight any stockpile with
q
then run the loadstock command passing it the name of that file. The
settings will be applied to that stockpile. Example: loadstock name_of_file
Notes: It saves and loads files relative to the DF folder, so put your
files there or in a subfolder for easy access. Filenames should not have
spaces. Make sure you create the stocksettings
folder if you use the
GUI feature.
Limitations: Generated materials, divine metals, etc are not saved as they are different in every world.
Before this is released with the next version of DFHack, I would appreciate some testing, especially on Windows and OS X.
If you’re on OS X, and can build dfhack from source, I could use your help building an OS X version of this plugin. Shoot me a message!