Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4

Author Topic: DFHack tips and tricks for your everyday tasks  (Read 39036 times)

slay_mithos

  • Bay Watcher
    • View Profile
DFHack tips and tricks for your everyday tasks
« on: August 20, 2014, 08:27:29 am »

Fore note: This was made with the Masterwork V6 mod as a base.
Putnam decided that it belonged here, and even if I don't agree, I don't want this to polute a potentially helpfull thread.

HOWEVER, I still request against posting things that are specific in DFHack R5 or newer versions of the plugins/scripts unless clearly noted as such.
It was made to help learning a few helpfull tricks, because nobody cared to answer me when I asked around (Workflow thread, for example), which is why I did initially post it where I could be sure people would be using the same versions.


Hello everyone,

I think that there are many dfhack tools at our disposal, and most of us don't even know about most of them, even when they would help so much.

My plans with this post is to try (with your help) to round up most of the easy to use hacks that really change your life.
If possible, I would like to focus on the ones that offer ingame GUI at first, because they are often less confusing to use and check for most people.


* Auto Butcher:
Go to Status screen (z), select the 'Animals' option (selected by default) and hit Enter.
Hit Shift+b to open the Auto Butcher screen.
To enable Auto Butcher, you will need to hit Shift+a and Shift+w. Wait a bit, exit the screen, and go in again, you will now see the list of all your animals, by race.
Spoiler (click to show/hide)
To change the number you want to keep, you can either change it for one race (select the line and hit the appropriate key), or change all races at once with the first line.

You will see all the actions taken as messages (race added and units added to butcher list), in green, so it's quite easy to follow.


* Job Material:
If you ever wanted to make items from a specific material without going through the stockpile that 'g'ives only this material, this one is for you.
It also complement really well the Workflow that we will discuss later.

The usage is really simple:
'q'uery the workshop (ex: Distillery)
Select the queued task you want to specify the materials for (ex: Brew Drink).
Spoiler (click to show/hide)
Hit Alt+A to open the Job Material menu
You will have a list of all the materials needed for the task (ex: any distillable + any empty food_storage)
Spoiler (click to show/hide)
Select what you want to modify and hit 'm' (ex: the distillable)
Go through the menu that appears to select what you want, the arrow symbol meaning a category that will show you all the contained items. You can type letters to filter (ex: plant > strawberry plant)
Spoiler (click to show/hide)
Hit Enter to validate.
You can now edit more (ex: making the task only use stone food storrage)
You can also change the item type required with the 'i' key (ex: only barrels). This one is often less usefull, but it can be used in our example.
You can exit that menu with Escape as usual.

Note: This only changes this one specific queued task, so if not set to 'r'epeat, it will only try to run it once.

* Workflow:
WARNING: It changes how all 'r'epeat task work (not just the ones with min/max). If you want to remove any repeat task, it will suspend it. To remove the task, first toggle 'r'epeat (removes the blue R) and cancel. Do not enable it if you don't want that to happen
This one lets you set ranges for your 'r'epeat tasks, and automatically suspends/unsuspends them as needed.
While it is not usefull for everything, there are various tasks that we mostly put to always run (barrels/pots, bins, brewing, cooking meals...), and check every once in a while if it has been suspended or not.
With this, you can keep your empty rock pot stock to at least 5, and stop producing them once you reach 10 (or whatever number suits your tastes).
Note that it combines really well with the Job Material (just above) for very specific tasks (brewing strawberry alcohool in normal brewery).

It is also pretty strait forward on how to use it (in my example, I will take the task I modified above):
'q'uery your workshop (ex: Distillery)
Select your task (has to be on 'r'epeat)
Spoiler (click to show/hide)
Hit Ctrl+w. If it's the first time you use it, a small prompt will ask if you want to enable, hit 'y' to accept.
Spoiler (click to show/hide)
On the new menu, hit Shift+a to "Add limit". It will open a small window, with the options you can choose from. Hit Enter to validate your choice (ex: drink of any material, only option usually, or drink of strawberry wine from our modified task)
Spoiler (click to show/hide)
You can change the min and max with keys ('e', 'r', 'd' or 'f'), or change both numbers at once with Shift+R. The later will open a small window, where you can input the min and the max, separated with a '-' sign. Hit Enter to validate (ex: 10-25)
Spoiler (click to show/hide)
You can also choose to track items or stacks of the final product with shift+i (plants, food, drink or ammo usually come in stacks, beds don't)
Hit Escape to return to the workshop query, with your task configured.

You can always hit Ctrl+i from nearly any screen to go to the overview of all the items you are following with workflow (linked to a task or not), as well as adding new entries, to track specific things that might not have workshop tasks associated, to make your own custom stock screen, with only the relevant items shown. It is advised not to put too many entries, because it does track items, and can slightly contribute to loss of FPS (only slightly, but still good to be aware).
Th graph on the right shows the variation of the stocks over the last minutes or so.
Spoiler (click to show/hide)

Note: You will quickly find that combining Workflow with Job Matrial really eases your gameplay by a whole lot, keeping the micro management for those repetitive tasks to a minimum.


* Using tools for building:
There are many great tools to help you when trying to build, be it placing beds/doors, or making floors and walls.
You will need to make your window bigger in height (for windowed mode users) to be able to see the key prompts.
All the keys given here are only used right when you would normally move the cursor to the correct spot to build (ex:'b'-'b', before validating for materials).

Note on material selection:
On the material selection, the last option selected will keep at the top if any available, no matter the distance. Good to know when building with specific material (ex: marble block).

1/ Building Walls/Floors (and things from the 'b'-'C' menu)
- 'b' Arguably the most usefull. Lets you designate walls in the same way you would designate things from the 'd' menu, selecting two corners.
  Sub options when enabled:
    'x': shows the selected area as you move to select the second corner, normally a must-have.
    'h': makes the build order only on the edge of the box, nothing inside.
    'o': Open Placement lets you target higher areas and still be able to select materials. Great when building towers and multi stories buildings. Be carefull with potential collapses when building, as usual.

- 'a' Auto select material (needs to be enabled both here and in the material selection), skips the material selection by selecting the item on top of the list automatically.
Can be great when you have enough materials, but can also select an other material if you are lacking. Not my personnal favorite.

- 't' will put you back to the same building option after selecting the materials (ex: placing walls again, instead of going to the b-C menu and needing to select wall again). Pretty great in most cases, just hit Escape when you don't have anything to designate anymore.
Spoiler (click to show/hide)

2/ Furnitures (bed, door, table, chair...)
- Shift+p will enable to place buildings without the need of any (or enough) available.
The furniture will be placed when available.
Great to use when making the bedrooms while still making the beds/doors/cabinets.

There are a few sub-keys when enabled to filter what should be placed.
Shift+q for minimum quality required (ex: when making noble's room)
Shift+d to toggle only decorated items or any (ex: want to place only decorated furnitures)
Shift+m to open a menu to select materials to use (ex: only copper or smooth wood cabinets, disregarding possible clear glass or featherwood ones)
Spoiler (click to show/hide)


That's it from me (for now).
I hope it is usefull to many people, and that more competent people can complete and expand on all those neet tools.
« Last Edit: August 23, 2014, 11:45:45 am by slay_mithos »
Logged
For the 55 people who did download V1.5 till now:  You human race is not working.
It is ok, I'm used to that in RL so why should my game be different :p
DFHack tips and tricks for your everyday tasks

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack tips and tricks for your everyday tasks
« Reply #1 on: August 20, 2014, 08:33:00 am »

That is a great idea. :)

Quicksave and Forumdwarves need some love as well. :) And manual aiming of siege engines... I dont see reports about it anywhere, but it allows you to chuck lansmines at people. ^^
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

slay_mithos

  • Bay Watcher
    • View Profile
Re: DFHack tips and tricks for your everyday tasks
« Reply #2 on: August 20, 2014, 08:52:25 am »

Well, I can only document what I used enough to be certain I'm not misleading people.

On that note, I took screenshots while writing this, should I post them directly, or would an imgur album do the trick?
Logged
For the 55 people who did download V1.5 till now:  You human race is not working.
It is ok, I'm used to that in RL so why should my game be different :p
DFHack tips and tricks for your everyday tasks

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack tips and tricks for your everyday tasks
« Reply #3 on: August 20, 2014, 08:54:24 am »

I usually upload to imgur, but post pictures directly. Large ones into spoilers, smaller ones just like that.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

slay_mithos

  • Bay Watcher
    • View Profile
Re: DFHack tips and tricks for your everyday tasks
« Reply #4 on: August 20, 2014, 10:05:23 am »

And done, I added images where it seemed it could help.

I hope to see other people give their tips on all those nice functions that can really make things less of a chore in just a few key presses.
Logged
For the 55 people who did download V1.5 till now:  You human race is not working.
It is ok, I'm used to that in RL so why should my game be different :p
DFHack tips and tricks for your everyday tasks

arbarbonif

  • Bay Watcher
    • View Profile
Re: DFHack tips and tricks for your everyday tasks
« Reply #5 on: August 20, 2014, 03:59:03 pm »

And workflow is aware of the job material setup.  So if you setup the job material to make furniture sets (for instance) out of only obsidian blocks, you can set workflow to say 10-20 obsidian chest/bags.  Otherwise you can only say "chest/bags of any stone"

Some jobs have unexpected results when controlled this way though.  Bear in mind that if you put a workflow limit on burn wood to ash, it will include all jobs that produce ash (like burning coal to coke and the crematorium jobs).  Likewise for fish farming, if you set a limit for creating fishing poles it stops the "fish with pole" job, since it produces a fishing pole 95% of the time. 

Meph, do you know how to make the fishing pool fishing job not be controlled by workflow?  I know that the pray for metal jobs used to be (which messed up forging) but now they are not.

Oh, and you can set multiple workflow limits and it will re-enable the job if any of them get too low.  I usually setup specific drink making jobs with both drink and seed limits so I don't run out of either.  It is a pity you can't control the farmer's workshop process plant to thread with it as well.
« Last Edit: August 20, 2014, 04:02:11 pm by arbarbonif »
Logged

slay_mithos

  • Bay Watcher
    • View Profile
Re: DFHack tips and tricks for your everyday tasks
« Reply #6 on: August 20, 2014, 04:19:36 pm »

For the chest example, it's basically the same as my strawberry wine, but yeah, that's how the two work together.

As for fishing, I never made fishing poles (I usually embark near rivers), but looking at the raws, the pole doesn't take from material (no 'smooth wood fishing pole'), so I'd say that we are stuck with it, unless we mod the raws in order for the pole to take either the wood or thread for the material.
For ash, that's sadly one of those things that comes as by product for many tasks as well as primary result for others.
In the same vein, the ore purification nets you marble/limestone boulder/block too, and that can interfere with normal block making.

For the seeds, that's actually something I didn't think about, as I tend to quickly have too many seeds, but it is nice, because it means that the same could in theory apply for any multiple output recipes.
While we are on the seeds, does anyone know if seedwatch (command only) has an argument to only apply to seeds and not plants?

Anyway, glad that other people seem to have things to contribute, shows I didn't take 2 hours for nothing.
Logged
For the 55 people who did download V1.5 till now:  You human race is not working.
It is ok, I'm used to that in RL so why should my game be different :p
DFHack tips and tricks for your everyday tasks

vonsch

  • Bay Watcher
    • View Profile
Re: DFHack tips and tricks for your everyday tasks
« Reply #7 on: August 20, 2014, 05:59:59 pm »

I've been using most of these (and fighting with some of the issues with multiple outputs!  :o), but the quality control one on furniture placement I hadn't stumbled over yet. I love that one. Must learn it.

These are console commands, so not integrated into GUI as far as I know.

Cleanowned scattered gets a lot of use by me, and even cleanowned all lately (once clothing production is running) to force them to give up those well-worn clothes they squirrel away in their cabinets.

Stripcaged weapon is another I use to remove weapons from captives. I leave them in armor so they last longer in my shooting galleries.

Just used exterminate coyote in my last game too. Darned things swam into waterfall, got trapped down in a river ravine and were breeding IN THE RIVER and their numbers were getting large enough I was thinking they were contributing to fps issues! I tried exterminate aquatic coyotes first...  8)

Drybuckets is integrated into loo... (thanks, Meph!)

Oh, I am no neatnick in real life, but I hate the muss in game so clean all gets used a lot. Should be named gore-be-gone! Downside is it wipes out some !fun!. But looking at the mess just isn't fun for me, so it counterbalances.

I use the hotkey-assigned digv a lot (ctrl-v). That one gets mentioned here often since Meph uses it.

Showmood helps a lot with moody humanoids who want something obscure. Or a lot of something you have a little of. (You want how many bones?!)

I will occasionally use removebadthoughts on unhappy military humanoids who are so mostly due to the effects of the draft/undraft, activate/deactivate squad bugs. I use a lot of targeted attack commands and until they are settled into their squads they tend to consider those activation followed by deactivation and get surly (even when they are set to active in the first place!)

I've finally started using rename building a lot. Helps with stockpiles and cases of multiple workshops doing one task on workflow like three masons making different blocks (so I can get the right colors in the right places, natch!) Makes it easier to see what's doing what at the moment (if I remember to rename!) and what stockpile is SUPPOSED to have what (but is empty because I have a production-chain or extreme consumption issue.)

Yeah, once I put the dfhack manual in its own tab and left it there, I really started using it a lot. :)  But there's so much in there I tend to learn one thing at a time, then find something else... or have a need and look through it to see if there's a dfhack way. Often there is.

Oh, once you learn to use the (s)earch functionality which is added into stockpiles and a few other things, you never go back. Huge time-saver on most long lists. Just wish it worked with tallow.  :P  (they are ALL tallow, so doesn't help when you're searching for plain "tallow")






Logged

slay_mithos

  • Bay Watcher
    • View Profile
Re: DFHack tips and tricks for your everyday tasks
« Reply #8 on: August 20, 2014, 06:58:21 pm »

Yeah, tallow, scales, and other materials that are "simplified" are lost in the list.
Makes me wish for a search that accepts regular expression.

From the command you mentionned, I mostly use clean all, showmood (invaluable), cleanowned X (or x, I never remember) and digv (via the ctrl+v, saves so much time). And my own caste-fix to fix the EXP bonus after changing caste (it's somewhere near the end of the dwarf thread).

Thanks a lot for that quick and detailed description of console commands. I didn't know how to present them, it seems like a good way to go.
One thing that could help (just suggesting) would be to put them as bold, it makes more difference than italic. Makes for an even easier spotting of the actual command among the text.
« Last Edit: August 20, 2014, 07:00:24 pm by slay_mithos »
Logged
For the 55 people who did download V1.5 till now:  You human race is not working.
It is ok, I'm used to that in RL so why should my game be different :p
DFHack tips and tricks for your everyday tasks

slay_mithos

  • Bay Watcher
    • View Profile
Re: DFHack tips and tricks for your everyday tasks
« Reply #10 on: August 21, 2014, 03:55:48 am »

Is it the place I should move this topic to?

Or maybe I missed a similar thread there?

I put it here, because I am specifically using Masterwork v6 (DFHack R4), and I don't know for certain if all the keys and plugins are there for your standard R4 install.

If at least most tips we can give also applies to standard DFHack, then I'm all in favour of putting this over there (with a disclaimer that I used masterwork myself).
Logged
For the 55 people who did download V1.5 till now:  You human race is not working.
It is ok, I'm used to that in RL so why should my game be different :p
DFHack tips and tricks for your everyday tasks

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack tips and tricks for your everyday tasks
« Reply #11 on: August 21, 2014, 03:59:24 am »

Leave the thread here ;)

Most scripts in the mdf dfhack are not standard.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

dukea42

  • Bay Watcher
    • View Profile
Re: DFHack tips and tricks for your everyday tasks
« Reply #12 on: August 21, 2014, 11:53:41 am »

Here is one if my favorite:

script textfile.txt - Run many those cool items shown above with just one command line. Repeat all your favorite workflow settings for new worlds.

Some of the command line workflow settings work better than the UI.

Here's my last script file I used for warlocks (still has lot to cleanup from older masterwork versions though - and I want to expand to all race weapons/armor).

https://www.dropbox.com/s/d5ff1ylgpmp6n6a/workflowjobs-warlock.txt
Logged
My posts are probably based on Masterwork DF mod

arbarbonif

  • Bay Watcher
    • View Profile
Re: DFHack tips and tricks for your everyday tasks
« Reply #13 on: August 21, 2014, 05:00:28 pm »

For the chest example, it's basically the same as my strawberry wine, but yeah, that's how the two work together.
It is more that if you don't set the input, you can't specify the output with that level of granularity (it only lets you do "any stone" or whatever).

Prospect and prospect all are also really handy (and kind of a middle ground cheaty).  I use prospect all on embark to get an idea of where the caverns are (based on z levels for cavern plants) and how far up the magma pipes go, without doing a reveal and actually finding them precisely.  That way I can still stumble into them if I'm not careful, but I have a decent idea of where they are so I know how much room I have for my fortress.  Prospect is also handy if you just want to see if you have found anything important (especially seeing if anything nice is visible on embark), since it shows only what is visible without the 'all'.
Logged

slay_mithos

  • Bay Watcher
    • View Profile
Re: DFHack tips and tricks for your everyday tasks
« Reply #14 on: August 21, 2014, 05:54:03 pm »

Many people also don't know you can use prospect all when on the world map.
It's not 100% on the numbers, but it is super helpfull to know if there is sand, what rocks you can expect, what minerals, gems, plants and trees you'll encounter...
While it removes the surprises, you can ensure you'll be able to play how you want.
With no sand, you are basically not going to have access to glass (can shatter plans pretty well).

Oh, also, it is important to know that quickfort (when the "shortcuts" are not disabled) prevents you from using any "Alt" shortcuts (like Alt+a for the job material, or Alt+s for slabs). It took me a while to understand that I need to right click the icon in the task bar and disable shortcuts (and pause) to get my normal key react again.

And let's not forget tweak fixmigrant while either 'v'iewing him or loo'k'ing at him to make those migrants that stayed as "trader" in your migrant wave actually join, instead of just stopping the wave and getting killed later withour moving.
« Last Edit: August 21, 2014, 05:59:02 pm by slay_mithos »
Logged
For the 55 people who did download V1.5 till now:  You human race is not working.
It is ok, I'm used to that in RL so why should my game be different :p
DFHack tips and tricks for your everyday tasks
Pages: [1] 2 3 4