Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Need help with manager order conditions  (Read 1147 times)

Grimwulf

  • Bay Watcher
    • View Profile
Need help with manager order conditions
« on: January 26, 2021, 05:26:39 am »

I have problems with setting some of my industries to work properly via manager orders. Would appreciate some advice.

1. Processing pig tails.

So, everything should be easy in theory. I have a separate stockpile for pig tails so that they don't get brewed. Then I give out two order via manger screen:
- If amount of unrotten processable plants is at least 100, process 50 plants, check seasonally, restart when completed;
- If amount of press_paper_mat-producing plants is at least 100, mash 50 plants into slurry, check seasonally, restart when completed.

Once the fortress harvests 100 pig tails, half of them is processed into thread, and another half into slurry. The problem is, pig tails are harvested and gathered into stacks of varying amounts, anywhere from 1 to 5. The manager counts the amount of pig tails, not the amount of stacks. Once the stock reaches 100 pig tails, he orders 100 jobs. Each job processes a single stack, not a single pig tail. This results in running out of pig tails way before the order is completed, following by job cancelation spam and the need to reset the order.

I've tried to mess with the numbers, setting the trigger to [at least 300 processable plants = process 50 plants], but that doesn't work. Sometimes we run out of pig tals regardless, and sometimes we get overflowed with unprocessed pig tails. Both scenarios require manual interruption and resetting orders, which annoys me somewhat. Same problems exists in milling jobs, pressing slurry into paper, processing quarry bushes into bags of leaves - basically anything involving stacks of varying amounts.

2. Working with bugged industries.

Gem setting and decorating with bone/shells/other body parts is currently bugged as most of you know - the manager can give out the order, but the job count never goes down. So if you have a stock of 100 sapphires and 100 shells and order to decorate with 10 shells and 10 sapphires, the order won't stop until you run out of both shells and sapphires. What makes it worse, there is no such thing as auto-gem-setting or auto-bodypart-decorating, so you have to do all that stuff manually each time. It's especially painful with gem setting due to horrendous interface of jeweler's shop. First you look up your stocks screen and find how many heliodors you have. It's fourteen. You highlight the workshop, select a specific gem, select an encrusting job (furniture, goods). Select a gem, select a job. Select a gem, select a job. Select a gem, select a job. Sel-- oh wait, can't have more than 10 jobs per workshop. You highlight the next jeweler's workshop, select a gem, select a job. Select a gem, select a job. Sel-- wait, how many heliodors I have again? Open up the stocks screen, find heliodors. It's 14. Okay. How many cutting jobs did I give out again?

There's gotta be an easier approach to all this.

3. Clothing and dyeing.

Since there is no option to set separate stockpiles for dyed/undyed cloth, my dyers and clothiers keep fighting between themselves for those cloth bins, resulting in job cancellation spam. At some point I tried playing with cloth QSP to keep cloth out of bins, but that was even worse. First, that's just too much hauling (dyers work extremely fast). Second, I can't import cloth (traders bring cloth in bins, and dwarves can't take cloth out of bins unless you order to dump it - it's the same as leather). Then I tried to sort of schedule these industries via manager (he made his order condition checks for dying and clothemaking yearly, so that dyeing happened during Summer-Autumn, and clothesmaking during Winter-Spring). That solved the problem somewhat, but not quite . Dyers fought between themselves, as well as clothiers.

Sorry for the text wall, but I don't know how to explain these nuances without delving deep into the details.

TL;DR: how do you automate plant processing, gem cutting, bone/shell decorating, clothesmaking, and dyeing?
Logged

Stadfradt

  • Bay Watcher
    • View Profile
Re: Need help with manager order conditions
« Reply #1 on: January 26, 2021, 07:41:31 am »

I'm an amateur and there will be better advice coming from someone else. In the meantime, here's my two cents:

In the stocks menu [z] go to kitchen and turn off cook & brew for pig tails. Then lower your work-order numbers to at least 10 process 1 and have them check daily. There's no build up, and storage seems to be a cause of a lot of problems. See automated industries in the first post of this thread: http://www.bay12forums.com/smf/index.php?topic=158287.0

I do my automation with low numbers and everything runs fine.

You can give more than ten jobs to specific workshops by going over them with [q] then [P] for workshop profile, then right-arrow to work orders and hit [q] to create a new work order. This is particularly helpful if you have a legendary crafter: Allow only that crafter in that shop in the workshop profile, and then set the recurring work order specifically in that shop.

For the stockpiles for cloth & dyeing, use [q] and set the "take from" and "give to" so that one stockpile takes from the clothier and gives to the dyer, and then a second stockpile takes from the dyer.

And then screw around with the settings until something that shouldn't make a difference winds up solving the problem.

Edited to add: Also check under units and look to see what they're doing. You may have to shut off hauling duties for specific dwarves, or go to (o) orders and have the dwarves all ignore specific things. E.g., I'll have them ignore wood until I want my stockpile filled; this keeps them from hauling wood when they should be doing something more productive.

Edited again because I screwed it up the first time.
« Last Edit: January 26, 2021, 07:48:24 am by Stadfradt »
Logged

Grimwulf

  • Bay Watcher
    • View Profile
Re: Need help with manager order conditions
« Reply #2 on: January 26, 2021, 08:05:10 am »

The link is really useful, thanks. There is a rather comprehensive explanation on automating pig tail processing right in the OP.

I guess I'll try messing around with low numbers, although I imagine this would lead to a never-ending work process. The rest of my industries are all set to seasonal checks, so that the dwarves have a month or two each season to do whatever they like, once the work is completed.

Separating cloth stockpiles to take from dyer/weaver and give to the clothier doesn't really work for me, because I also rely on imported cloth. So if I set a cloth stockpile to take from weaver + take from anywhere and give to the dyer - well, what if I buy a dyed piece of cloth? What if a piece of cloth I took from the weaver was made from a dyed thread, and thus is already dyed? It will just stay in that stockpile forever, not being used for anything.

As for disabling hauling, well, can't really afford that either. Some dwarves finish their seasonal tasks faster than the others, the least they could do is to help those others wrap up the production. My problem is not the lack of working hands, but rather the clumsy manager interface that doesn't allow me to set up production chains I have in mind.

Thanks a bunch once again.
Logged

Schmaven

  • Bay Watcher
  • Abiding
    • View Profile
Re: Need help with manager order conditions
« Reply #3 on: January 26, 2021, 07:10:22 pm »

I've either been getting short changed by the caravans, or I'm just not very keen on the details, but I don't remember ever seeing dyed cloth from the traders.

If you do end up with the take from anywhere stockpile getting clogged with dyed cloth however, you could set up another linked clothier's shop and just queue up an infinite order of bags until that stockpile is cleared.  Or temporarily set it to give to the dyed cloth stockpile to make some space again. 

How much cloth can be stored in a bin?  I think it's a heck of a lot more than the amount of cloth traders usually bring in bins.  In which case, you should have some decent capacity for taking on dyed cloth for a while before it clogs up the feeder stockpile for your dyers.
Logged

Grimwulf

  • Bay Watcher
    • View Profile
Re: Need help with manager order conditions
« Reply #4 on: January 27, 2021, 02:37:47 am »

As I thought, operating with low numbers (e.g. if the amount of pig tails is at least 1, process 1 pig tails, restart, check daily) is a terrible solution. The amount of work that was previously done in a matter of weeks now takes seasons to complete. Not to mention the task completion spam. What's even worse, this kind of approach defeats the purpose of having multiple work stations and 8 legendary threshers, as only 1 work order is given at a time.

Back to the drawing board. Such a pain in the butt over something so trivial...

Quote
I've either been getting short changed by the caravans, or I'm just not very keen on the details, but I don't remember ever seeing dyed cloth from the traders.
You're right, my bad. They bring only boring cloth.

Quote
If you do end up with the take from anywhere stockpile getting clogged with dyed cloth however, you could set up another linked clothier's shop and just queue up an infinite order of bags until that stockpile is cleared.  Or temporarily set it to give to the dyed cloth stockpile to make some space again.
My current 23-year-old-fortress is at the point where I'm obsessed with automating everything I can so that it would require no player input. Keeping an eye on dyer's stockpile is not really what I'm aiming for. Besides, most of the cloth that comes from the weaver is already dyed since the thread itself is dyed - I don't think there is a point of keeping that second stockpile of cloth. The problem at the moment is not dyers vs clothiers fighting, but more of a dyers vs dyers and clothiers vs clothiers infighting. Oh, well. At least they get the job done after all the cancellation spam.

I can always prevent the bin-fighting between them by simply producing more cloth, but it goes against my second goal of avoiding over-production and keeping the stocks tight and clean. The basic formula is

Harvest/Loot/Import raw materials ==> Process each and every bit of raw materials into goods ==> Sell/Gift them to the caravans ==> Repeat.

I'm not trying to set a mega-production chain that you can normally do with Workflow (keep those goods at this quantity, and these goods at this quantity, etc). The goal isn't keeping the dwarves busy. The goal is to process everything I got as fast as I can, so that everyone gets leisure time until the next caravan arrives. It's not even for the sake of profit (a single functioning industry is enough to buy anything from the caravans), it's mostly to keep those legendary skills frosty and let the dwarves scratch that "practice a craft" itch.
Logged

mightymushroom

  • Bay Watcher
    • View Profile
Re: Need help with manager order conditions
« Reply #5 on: January 27, 2021, 09:06:54 am »

What's even worse, this kind of approach defeats the purpose of having multiple work stations and 8 legendary threshers, as only 1 work order is given at a time.

In this scenario I would make the "low numbers" a bit bigger ... such as "if amount of pig tails is at least 8, process 8, etc." and/or setting an order in the workshop profile for each station "if amount of pig tails is at least 8, process 1, etc." That allows for the tasks to be distributed across your stations.

Quote
The amount of work that was previously done in a matter of weeks now takes seasons to complete.
Beyond not fully allocating your resources, the other bottleneck with low number work orders is the time between checks: your example basically process 1 pig tail per day so of course it will take a long time to get through them.

I find that even average workers can fulfill two simple processing tasks in a day, and once you get into legendary skill territory it can be be three or possibly more. So to get the most done by any given daily check you need to think about

# of tasks a worker can do per day -> multiplied by number of workers on job -> subtract a few as a margin for lunch breaks and other sundry reasons dwarfs don't work 24/7

It sounds like "low numbers" in your fortress could easily be 20-24 per day rather than 1 per day, although this risks running into the count vs. stack that you mentioned in the OP. Try setting your count "at least this many" number to be 9 higher than what you actually process; since the maximum stack size for pig tails is 9, there should thus be at least one stack of pig tails left over.
« Last Edit: January 27, 2021, 09:22:41 am by mightymushroom »
Logged

Stadfradt

  • Bay Watcher
    • View Profile
Re: Need help with manager order conditions
« Reply #6 on: January 27, 2021, 09:35:03 am »

As I thought, operating with low numbers (e.g. if the amount of pig tails is at least 1, process 1 pig tails, restart, check daily) is a terrible solution. The amount of work that was previously done in a matter of weeks now takes seasons to complete. Not to mention the task completion spam. What's even worse, this kind of approach defeats the purpose of having multiple work stations and 8 legendary threshers, as only 1 work order is given at a time.
Then bump up the numbers a little bit. I'm assuming, perhaps incorrectly, that the individual-dwarf production function is linear rather than concave, in which case it's just a matter of messing around with the settings until you've got it where you want it. As workers' skills increase, they'll get more free time every day rather than every fiscal quarter season. Given the level of complexity in the game, I wouldn't be surprised if dwarves' production functions were concave, in which case you'll get a lot more done through daily production orders once you've got it worked out. There's no sensible reason for individual production functions to be convex, i.e. their productivity increases as they get more tired from working. So, at the end of the day, small daily work orders should be, at worst, equivalent to seasonal ones once you've figured out the numbers. That fact is just simple math.

Quote
My current 23-year-old-fortress is at the point where I'm obsessed with automating everything I can so that it would require no player input. ... I don't think there is a point of keeping that second stockpile of cloth. The problem at the moment is not dyers vs clothiers fighting, but more of a dyers vs dyers and clothiers vs clothiers infighting.
That's a stockpile & location problem.

Quote
The goal isn't keeping the dwarves busy. The goal is to process everything I got as fast as I can, so that everyone gets leisure time until the next caravan arrives. It's not even for the sake of profit (a single functioning industry is enough to buy anything from the caravans), it's mostly to keep those legendary skills frosty and let the dwarves scratch that "practice a craft" itch.
Try solving one goal first. And define them more functionally. Except for construction and short-but-big hauling jobs, I want to click on the unit list and see at least about a third of the dwarves engaged in something other than work, no matter what the season, for example. It's an objective, easy to measure metric that can be addressed in real time.

In any event, nice chatting w/ you, and good luck!
 :D
Logged

Grimwulf

  • Bay Watcher
    • View Profile
Re: Need help with manager order conditions
« Reply #7 on: January 27, 2021, 10:21:44 am »

Quote
In this scenario I would make the "low numbers" a bit bigger ... such as "if amount of pig tails is at least 8, process 8, etc." and/or setting an order in the workshop profile for each station "if amount of pig tails is at least 8, process 1, etc." That allows for the tasks to be distributed across your stations.

Already tried setting "if got 1, process one, repeat" for each workstation, but that doesn't help much. Normally, if you order a large batch of pig tails processed with a single order from the manager, one or two of the threshers will approach the workshops and process everything with lightning speed, with no interruptions. But if you set a daily order for a workshop, they will come - process a single stack - then go do other jobs or socialize (in an empty tavern). Again, the goal here is to make all, or at least most of the dwarves finish their seasonal quota so that they can socialize together, and do other things like working on mega-projects.

Quote
since the maximum stack size for pig tails is 9

Pretty sure it's 5. I've never seen stacks of more than 5 units on any plant. Perhaps that only happens when you fertilize farms with potash? I don't.

Anyway, I've set milling, plant processing, plant-to-bag processing and other stack-related orders to "if amount of <plant-name> is 250, process 50 times, check monthly, repeat". Because if by any chance all stacks have a maximum of 5 units in them, that would take 50 jobs to process 250 units. Not happy with this approach, too many leftovers for my liking, plus I cannot make seasonal checks with such a low number (50 jobs is barely anything in case all stacks happen to be 1-2 units). If I increase this number, there will be even more leftovers at any given time. If I set it lower, I will have to make daily checks, and the threshers won't have any downtime at all.

It works, kind of. Doesn't give me cancellation spam and the work pace is tolerable enough. But it's a clumsy solution to a simple problem that shouldn't exist in the first place. Why can't the manager count stacks instead of units?

Quote
Try solving one goal first. And define them more functionally.

Not sure what you mean there, 'cause my goals are quite defined. Everything works like a charm as long as I micromanage orders after each harvest and caravan. Basically give out a bunch of fortress-wide perpetual orders and cancel them one-by-one as we run out of raw materials. It's not about my inability to define goals, it's about the lack of tools to fulfil them (or my inability to locate those tools).
« Last Edit: January 27, 2021, 10:49:06 am by Grimwulf »
Logged

orius

  • Bay Watcher
    • View Profile
Re: Need help with manager order conditions
« Reply #8 on: January 27, 2021, 10:31:40 am »

It looks good on the surface.   Usually though, I go with 5-10 orders at a time for all these automations which seems to run a bit smoother.   

So my textile industry more or less runs like this:

Process 5-10 plants at a dedicated Farmer's Workshop.
Dye 5-10 cloth when there's enough dye and cloth.
Then make 5 each of tunics, trousers, and socks if the total available is less than 5 and there's available cloth.  I don't worry too much if the clothier grabs dyed stuff or not.

I don't bother distinguishing among pig tails, ropes reeds or other fibers.  Pig tails are seasonal, and can only be grown for half the year, while other fibers can be grown year round.  So I have 3 2x2 plots growing rope reeds, hemp or other fibers year round to try to ensure a steady supply, especially since elves no longer bring tons of cloth and have fallen back on their offensively snotty ways.

Paper making is similar, with small yields.  A little paper seems to go a long way anyway.

I do run into occasional cancellation spam, it's usually not enough to get intolerable.

Gem setting unfortunately I haven't been able to automate well.  I've been able to run job orders to use bones for decorating.  And I have orders to produce totems 1 at a time which works okay.   (A lot of my trading industry basically takes the skulls leftover from butchering and blinging them up until they're worth a few thousand dorfbucks.)
Logged
Quote from: ThatAussieGuy
That is an insane and dangerous plan.  I approve wholeheartedly. 


Fortressdeath

mightymushroom

  • Bay Watcher
    • View Profile
Re: Need help with manager order conditions
« Reply #9 on: January 27, 2021, 12:11:09 pm »

Quote
since the maximum stack size for pig tails is 9

Pretty sure it's 5. I've never seen stacks of more than 5 units on any plant. Perhaps that only happens when you fertilize farms with potash? I don't.
Yes, max is 9 with fertilizer or 5 without. When I'm giving forum advice I prefer to err on the side of the wider margin (not knowing the setup of anyone who might come along and read it).
Logged

Thisfox

  • Bay Watcher
  • Vixen.
    • View Profile
Re: Need help with manager order conditions
« Reply #10 on: January 28, 2021, 04:44:33 am »

Quote
I've either been getting short changed by the caravans, or I'm just not very keen on the details, but I don't remember ever seeing dyed cloth from the traders.
You're right, my bad. They bring only boring cloth.

Unless your caravans are VERY different to mine, that's wrong. In any one bin from the caravan, there will be both dyed and undyed cloth. Look carefully at the prices of the cloth, then choose something expensive (70+ suns), and actually go through the process of looking at it. It will have dye on it. It will NOT be listed as dyed cloth. So if you buy a bin of cloth, it will have some dyed and some undyed cloth most of the time.
Logged
Mules gotta spleen. Dwarfs gotta eat.
Thisfox likes aquifers, olivine, Forgotten Beasts for their imagination, & dorfs for their stupidity. She prefers to consume gin & tonic. She absolutely detests Facebook.
"Urist McMason died out of pure spite to make you wonder why he was suddenly dead"
Oh god... Plump Helmet Man Mimes!