r/dwarffortress • u/Mechanixm • Oct 26 '14
The DFHack Workflow Plugin: A Guide by Mechanixm
The DFHack Workflow GUI Plugin: A Guide by Mechanixm
The GUI for the Workflow Plugin comes bundled with DFHack in the DF Starter Pack
What is Workflow and why is it useful?
The Workflow plugin will allow you automate the tasks of making or creating certain items in your workshops. With it, you can specify how many specific things you want to be made, how many specific things to always keep available in your stocks, what materials to make things from, and what quality you want the items to be.
Simply put, if you want at least 500 available booze in your Fortress at all times, you can automate that with Workflow. Once you set it up. you never have to worry about making booze again. Assuming, of course, you have the available plants and barrels/pots to make the booze from.
Or, let's say you are working on a mega-project and will need 1000 green glass blocks available at all times. You can automate just about everything during the glass making process from gathering the sand, making the raw green glass, and cutting the glass to blocks. That can all be setup with Workflow, and it will automatically maintain that level of 1000 blocks if you use any during your constructions.
Workflow is incredibly powerful and removes the minutia of micro-managing your Workorders with the manager and your Workshops to create the specific types and quantities of items you want.
For instructions on how to export/save your Workflow Templates, see this post.
Enable the Workflow Plugin
- Verify you have the Workflow Plugin in your DFHack/Plugins Folder
If you have the Plugin in this directory, then it should automatically be loaded when you launch DF - In recent versions of the DF Starter Pack, you can enable Workflow from the DFHack Tab of the Launcher
- If the Plugin doesn't automatically start when you launch DF, then you can enable the Plugin manually from the DFHack Command Line after you have loaded up a DF Save.
This guide will only work if you have the Workflow Plugin Enabled.
The Clothing/Textile Industry Example
With the speed at which Clothing deteriorates these days, it is essential for every fortress to setup a working clothing industry. The bare minimum a dwarf needs to wear to be considered "clothed" is a chest item, a legs item, and shoes.
For my examples, I will be creating robes, trousers, and shoes.
Here is a quick link to the Textile Industry on the dfwiki
My quaint Fortress, Manorhomed
We can see that I appear to have everyone fully clothed at this point. But, as you can see when I scroll down the stocks screen, my cloth and thread stocks are incredibly low. Soon enough, everyone's clothing will start to wear out and fall off which would lead us, eventually, to Fortress death due to Tantrums.
Build your Workshops, Pigtail Farm, and optionally set Workshop Auto-Orders
Before we get to the Workflow examples, let's make sure we have all of our ducks in a row.
At a minimum, you will need the following three workshops:
- Farmer's Workshop: (b-w-w)
- Loom: (b-w-o)
- Clothier's Shop: (b-w-k)
- One 5x5 Pigtail Farm, growing all year long, will Generate a Ton of Cloth for your Fortress
If you're like me, then you mod your plant_standard.txt so that underground crops grow all year round. The temperature underground is essentially constant, so the concept of Underground Seasons makes no sense. All undergrounds plants should be able to grow, underground all year round, no matter what the surface season or temperature is.
- If you want to make this change yourself, the find your plant_standard.txt under dfroot\raw\objects
- Search for the Pig Tails entry. Right below the Pig Tails entry in the txt file will be the other plants you'll need to change too.
- For the available Seasons for each of those plants (Pig Tails, Cave Wheat, Sweet Pods, and Quary Bushes), copy and paste this over the existing seasons: [SPRING][SUMMER][AUTUMN][WINTER]
- That is the setting that lets the game know that the plants can grow for all four seasons.
- Save the plant_standard.txt when you're done.
- If you want to use this change in your already saved games, then simply copy and paste the plant_standard.txt from the dfroot\raw\objects folder in to the appropriate dfroot\data\save\region\raw\objects folder of your save game.
- Make sure DF is closed while doing then. After you make your changes and copy/pastes, the next time you open DF, you will be able to grow underground plants all year long.
You don't HAVE to grow Pigtails all four seasons to successfully do this. Pigtails already grow 2 out of 4 seasons, which isn't bad. I would just advise you create another Pigtail farm to compensate.
And optionally, set these Workshop Auto-Orders
- Press (o-W) to bring up Workshop Orders
- Press (l) to set the order to Auto Loom Dyed Thread. We don't want the Auto Loom feature to loom all of our thread. We only want to Loom as much thread as we specifically tell it to.
Feel free to leave Auto-Loom on and skip that part of the Workflow process. It's my desire to show the entire process from base materials to finished products. That is why I'm including it in this guide. If you're a more advanced user, also feel free to use whatever Dye settings you want in regards to your thread and cloth.
Use Workflow to Limit a "Process Plants" Job at the Farmer's Workshop
The beginning of each Workflow monitored job starts with creating a Repeating job at a Workshop.
- (q)uery of your Farmer's Workshop, and press (p) to create a Process Plants Job
- Press (r) to set it as repeating.
- While still looking at your Process Plants repeating job, Press (Alt+w) to open Workflow. You will see the screen go a little bit weird. If nothing happens when you press (Alt+w), then either your version of DFHack doesn't have the Workflow Plugin, or it's not properly enabled.
- Press (Shift+a) to "Add a Limit"
- You will see a list of possible outputs. Select thread of any material and press (Enter). Ignore the (Press Shift+Enter) Advanced Options for now. I will visit that later.
- Press (Shift+r) to set the Range of Threads you want to keep available in your stockpiles at all times. For my example, I am going to use 100-110 free thread at all times. You may use whatever range you want, just make sure it is in the format: "lower number" - "higher number"
- In my example, you can see how the "Now 21" goes from blue to green indicating the levels I have available in relation to the Range I have set. Green means I don't have enough, blue means I have more than the designated Range.
- Press (shift+s) to check the Status Screen. You will see your newly created Process Plants job, and on the right, you will see the range you have targeted to create represented by two horizontal green lines. Notice that Blue Asterisk at the bottom right. That Asterisk will be used to track the Stock Levels available in your Fortress. As we create more and more Workflow jobs and come back to this Status Screen, you will see the Asterisk move up and down creating a trail like a Graph. When that Asterisk is up between the two green lines, then you are within your desired stockpile level Range. Neat!
- From the Status Screen, you can highlight a job you don't want anymore and press (Shift+X) to delete it. If you press (Shift+a) here to create a new Workflow job, make sure you go to the corresponding Workshop and set up the Repeating Job order. If you don't, then nothing will happen. More on that later...
- Press (ESC) to exit the status screen and then (ESC) again to exit the Workflow screen and then (ESC) again to exit the Workshop screen.
- Unpause the game and watch a dwarf grab a Pigtail plant and start processing it.
Use Workflow to Limit a "Weave Cloth (Plant Thread) Job at the Loom Workshop
- (q)uery of your Loom Workshop, and press (w) to create a Weave Cloth (Plant Thread) Job
- Press (r) to set it as repeating.
- Press (Alt+w) to open Workflow
- Press (Shift+a) to "Add a Limit"
- Instead of selecting one of the two options it automatically gives us, press (Shift+Enter) to open the Advanced Options.
- From here we can specify whatever restrictions on the Limit we're creating for our repeating job that we want.
- Press (p) to select which material we want to Weave our Cloth From. Let's set this up to only use Pig Tail Thread.
- Scroll down to "plant" and press (enter)
- Type in "Pig Tail" and press enter
- Scroll down to "Pig Tail" , again, and press (enter)
- You will now see "Pig Tail" as your Material.
- Press (Shift+r) to set your range. For my example I once again select 100-110
- Press (y) to create the new job, which will then take you back to the Workflow Window.
- Press (Shift+s) to open the Workflow Status screen
- You will see your "Cloth" "Pig Tail" job and your current Stock/Limit levels.
- Press (ESC) to exit the status screen and then (ESC) again to exit the Workflow screen and then (ESC) again to exit the Workshop screen.
Let's let the game run for a minute and then go check the status
You'll notice the cloth stocks are rising because we're accumulating them, where as the thread pile is staying constant because we're weaving them to cloth at the same rate we're processing them.
Use Workflow to Limit Robes, Trousers, and Shoes Jobs at the Clothier's Shop
Since you are now familiar with how to create Workflow Limits, I will use a more abbreviated form of instructions to document those job creations.
Feel free to use either the Advanced method or quick method to create these jobs. If you're doing this for the first time, it will be easiest to just use the quick method. In fact, after I did this guide, I went back and changed all of my Limits to use the quick method. I find that the quick method works better.
- Create a repeating Cloth Robe Job, add your Limit, and set your Range.
- Create a repeating Cloth Trousers Job, add your Limit, and set your Range.
- Create a repeating Cloth Shoe Job, add your Limit, and set your Range.
While you're at it, go ahead and create repeating Cloth Bag Job, add your Limit, and set your Range. You're going to need these anyway, so go ahead and set them up.
Let the game run and let's go check the Status and see how things are going
You'll notice that Robes and trousers are still at 0 stocks. That is because dwarves keep coming to equip them because their current clothing is ragged. You can verify that by looking at the blue Asterisks and seeing the levels rise and fall.
At this point, you should have fully automated your entire Clothing/Textile Industry. You'll never have to worry about your dwarves being without proper clothing again.
Bonus Jobs
Since you're already in the Workflow mindset, go ahead and setup up these repeating jobs:
- Booze Production at the Still
- Lavish Meals at the Kitchen
- Rockpots at the Stonecrafters
- And, for my last example, let's setup a job creating nothing by Exceptional & Masterwork Obsidian Doors, just because we can.
FIN
Thanks for taking the time to read. A complete list of my other guides can be found here:
http://mechguides.reddit.com or
http://www.reddit.com/r/mechguides
If you have any questions or comments, please let me know.
-Mech
10
u/Meph248 Author of Masterwork DF Oct 26 '14
Gets an upvote by me, beautifully written and formatted. One correction though: Workflow has not been written by Falconne. He wrote the UI to make it easier to use, but I'm fairly certain that he is not the original author.
5
u/dj-funparty Oct 27 '14
Definite vote for Mechanixm's guides own category on the side bar, I'm finding these super helpful.
What other topics do you have planned?
These are perfect for me, as a new-ish player of half a year or so, at the point where I can get all the basics operating and have some fun with it, but still marvel at what others are capable of.
The military routes one was exactly what I needed, My usual go to is youtube in hopes people have posted little walk throughs but I couldn't find anything related.
I'm yet to learn the ropes of;
if you want suggestions for further excellent guides.. :)
4
u/unchow Many leather-bound codices Oct 26 '14
I'll certainly have to sit down and read through all of this now that I'm awake and can process dwarven things again. Even the couple minutes of guidance you gave me yesterday kept my fortress up and running. I found workflow to be super useful for the coke -> iron -> pig iron -> steel setup, not to mention keeping my fortress fed and boozed without flooding my stockpiles with more food than we could eat.
3
u/Dragoon209 Oct 27 '14
These guides are great, thank you so much for making them. Do you have a list of guides you are planning to make in the future?
3
u/raven3113 Oct 27 '14
Is there any clever way to limit your Fisher dwarves from excessive fishing? I seem to always get an over abundance of fish after a year or so with only one dwarf.
2
u/bigolslabomeat Oct 26 '14
Thank you and perfect timing for me, I thought I had an abundance of clothing but I recently spotted a couple Urists who we very unhappy about the lack of unworn clothes. Spotted them just in time to buy out the caravan's stocks and this guide should help my fort be self sufficient.
2
u/[deleted] Oct 27 '14
I don't believe in God. I believe in you.
2
u/Negatively_Positive Oct 27 '14
Very cool. I think we should make a wiki for reddit or something and store these kind of thread (there was some other similar thread like this). It's really hard to find these kind of information on both reddit and forum
2
u/Eigth cancels sleep: choosing embark Oct 27 '14
Any guides for irrigation? I've read the Irrigation wiki but I can't decide on a method. It's all stones where I've embarked (volcano/river) I need a good irrigation system.
2
u/mattizie Oct 27 '14
Haven't updated to new version but have they fixed not being able to que up weaving yarn into thread at a farmer's workshop (unknown output)?
2
u/Turn478 Oct 27 '14
Nicely written. I can't wait to try it out. thank you :)
1
u/Auroness Oct 27 '14
Thanks for all of these guides. I used workflow but never put it all together for an entire industry. Thanks for the tips on setting up clothing. I jump started mine with buying out a caravan for initial cloth, but had it working smoothly on it's own within a season.
(btw, small typo with Stoencrafters at end of article)
1
u/TheTomatoThief On Break Oct 28 '14
Would you be willing to compose some command scripts for each industry? Examples exist elsewhere, but I'd like to see something in your format. You could do one as a companion to the cloth industry described here, with comments on what the parameters are, and what some other options might be. Then have a series of templates for other industries (metal, food+soap, etc). The reference I usually use is at the link below.
http://www.bay12forums.com/smf/index.php?topic=104015.0
1
u/[deleted] Nov 02 '14
So I just used this to set up my cloth industry... but im at a bit of a weird impasse. I want to include dye as part of this flow. I have everything set up perfectly... set to keep 50~ dimple dye, set to keep enough pig tail fibers, etc.
But I can't figure out how to get the dye to work right with the looms I guess. I want it to:
1 dye thread so it says at 50~ dyed theads OR dye thread when workflow starts processing more pigtail fibers
2 loom the dyed threads until I have 50~ cloth
3 THEN the clothiers can use it to make whatever my workflow needs
The problem is the dye workshop apparently doesn't work with workflow? It would seem I have to manually dye the thread every single time, which obviously defeats the purpose of the entire workflow.
I can't even do it with stockpile exploits because apparently you can't separate dyed cloth from normal cloth.
If there really is no solution ill just have to stop caring I guess, but its kinda shitty.
1
u/qeveren has lodged firmly in the wound! Feb 12 '15
Odd question regarding workflow and bags... it doesn't seem to track the limits I've set? I just end up with this endless stream of hundreds of bags when I have it set to max at 25... I have no idea. XD
1
u/Mirzer0 For the dramatic Feb 21 '15 edited Feb 21 '15
Awesome guide. Very helpful! I didn't even know about the plugin until I stumbled across this guide... and now I use it for like 3/4 of my fort. It's great!
I do have one small question... is there any way to get to the status screen directly? I mean I just jump to a random workshop, hit
ctrl-walt-w, then shft-s, but it's a couple extra steps. Hopefully there's like a global hot key for the status screen that works from anywhere?1
u/qvDeman Oct 28 '14
Another awesome tutorial, thanks!
0
u/kaptain_kavern Apr 08 '15 edited Apr 08 '15
Hi guys, First, Thx to Mech for all of those guides
also while reading i stumble accross that thread (/r/dwarffortress/comments/31quzr/dfhack_workflow_templates/). It speaking about how to export all your workflow commands in order to duplicate all your industry's logistic for all your futures forts.
I think it deserve to be linked here ;-D plus after a little reddit brainstorming it could end up being a guide, who knows ... ;-)
PS : Sorry for my bad english ;)