Dwarf Fortress

Dwarf Fortress

55 ratings
Multi-Hauling
2
   
Award
Favorite
Favorited
Unfavorite
qol, item
Tags: dfhack
File Size
Posted
Updated
116.783 KB
23 Jul @ 2:34am
27 Jul @ 2:18am
2 Change Notes ( view )

Subscribe to download
Multi-Hauling

Description
[This mod requires DFHack!]

This tool allows dwarves to collect several adjacent items at once when performing hauling jobs with a wheelbarrow. When enabled, new StoreItemInStockpile jobs with wheelbarrows will automatically attach nearby items so they can be hauled in a single trip.
Jobs without wheelbarrows would try to attach one if autowheelbarrows option is on.
Items claimed by another jobs or already stored in stockpiles would be ignored.
By default, up to ten additional items within 10 tiles of the original item are collected.

Warnings:
1. Destination stockpile filters are currently ignored by the job (because of DF logic). Which items qualify can be controlled with the --mode option.
2. Be careful about QSP and minecarts that accept wheelbarrows. It can go crazy.
3. autowheelbarrows would use any free wheelbarrows nearby, regardless of their connection to any stockpile.
4. Disable autowheelbarrows if you exp big fps drop.
5. Use "any" mode carefully: it could end up with unexpected things.
6. Script automaticly checks if there are any stuck jobs once in a while. But you can focre it with "multihaul unstuckjobs"


Usage
multihaul enable [<options>]
multihaul disable
multihaul status
multihaul unstuckjobs
multihaul config [<options>]
The script can also be enabled persistently with enable multihaul.

Options
--radius <tiles>
Search this many tiles around the target item for additional items. Default is 10.
--max-items <count>
Attach at most this many additional items to each hauling job. Default is 10.
--mode <any|sametype|samesubtype|identical>
Control which nearby items are attached. any collects any items nearby, even if they are not related to an original job item, sametype only matches the item type (like STONE or WOOD), samesubtype requires type and subtype to match, and identical additionally matches material. The default is sametype.
--autowheelbarrows <on|off|enable|disable>
Automatically assign wheelbarrows to jobs that lack them.
--debug <on|off|enable|disable>
Show debug messages via dfhack.gui.showAnnouncement when items are attached.

Code on github:
https://github.com/LoireLab/df_scripts/tree/multihaul

You can support me here:
https://ko-fi.com/loirelab
Popular Discussions View All (2)
0
1
23 Jul @ 12:39pm
PINNED: FAQ
L. Loire
0
23 Jul @ 4:58am
PINNED: Using this mod in an existing world/save/fortress
L. Loire
16 Comments
ProviD 6 Oct @ 7:00am 
Yeah, can confirm that something must be going on with either just DF and/or the mod script.

Ever since the last update, I've been getting some Job Cancelled notification on Forbidden and otherwise inaccessible resources. These notifications seem to come and go on their own.

On rare occasions, the dwarves have actually managed to Multihaul Forbidden items (logs in this case) to stockpile.

Of the two confirmed occasions, both were full (default?) 10-item hauls with Forbidden items being in the middle #4-#7 slots, start and finish being allowed/legit hauling targets.
Dragoon209 3 Sep @ 7:57pm 
I managed to capture it, see the image here: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3561722095

In this case there was a grouping of forbidden boulders adjacent to a few available ones. The dwarf proceeded to pick up the free boulder, and then grabbed the forbidden ones nearby. When they were dumped off in the stockpile, they remained forbidden.
L. Loire  [author] 3 Sep @ 3:51am 
Hmm, that's strange. Would test it
Dragoon209 2 Sep @ 7:31pm 
In 52.04, it it seems that after picking up the first stone, dwarves are happy to continue to then pick up multiple forbidden stones as well.
Chumpkins 27 Jul @ 9:12pm 
Heyo! I installed this mod to an existing world and I'm seeing similar issues with settings being reset to default on save load. Haven't tested it out with a fresh world but stuff like autochop, autobutcher, suspendmanager, and this mod itself either turn off completely or require tweaking things past their default settings. Other than that mod works exactly as intended. I use it on the identical setting and it's super helpful for moving large quantities of stone or wood to their intended stockpiles. Let me know if you'd like a copy of my save or any other info and I'd be happy to help.
L. Loire  [author] 27 Jul @ 5:43am 
I would need to research on that topic!
it should save itself within your save file, at least how it is supposed to work
Insulina-Sama 27 Jul @ 5:05am 
@L. Loire, Excelent, but i have a question about the mod. I installed it in a pre-existing world like you instructed, but after I installed it, DFHack settings are not being saved after exiting the game, so i have to manually adjust the settings every time i get into my saved game. Do you know why? Sorry for the long question and thank you in advance.
L. Loire  [author] 27 Jul @ 2:19am 
Reuploaded it, since update went by another steam_id :debug:
Insulina-Sama 26 Jul @ 4:39pm 
@L. Loire You are amazing mate, truly <3
L. Loire  [author] 26 Jul @ 4:35pm 
@RJ and @Insulina-Sama
Sadly that bug have appeared again :(
So I have uploaded a fix with version 1.0.1, hope that would help.