Bay 12 Games Forum

Please login or register.

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

Author Topic: How to automate Shearing/Milking?  (Read 12378 times)

Hans Lemurson

  • Bay Watcher
    • View Profile
How to automate Shearing/Milking?
« on: December 18, 2018, 05:28:42 am »

I've recently returned to DF, and wanted to try out a Ranching scenario, living off of a herd of sheep, but I have found the micromanagement involved to be a big pain.

I've looked at the new Conditions for Manager orders, and it looks really handy for automating things, but I can't figure out how to make an order that will shear all my sheep without a bunch of cancellation spam.

I tried setting up a "trigger order" that will occur just once a year that will then get the mass shearing going, but it seems like the conditions are just for starting an order, which will then continue relentlessly despite having sheared all the sheep.

Same trouble with Milk.

I can avoid this to an extent by only issuing orders for the number of Milkable/Shearable animals that I know I have, but given that you can't change the Number after an order has been issued, it seems a bit annoying to have to delete/reissue the order every time my flock changes size.

Maybe I could create a series of work orders in different powers of 2 and have an internal condition that I can easily make impossible on demand, and just use a binary code for the amount of milking I want done each month...

Any ideas/thoughts/experiences with getting Milking and Shearing automated?
Logged
Foolprooof way to penetrate aquifers of unlimited depth.  (Make sure to import at least 10 stones for mechanisms)
Toughen Dwarves by dropping stuff on them.  (Nothing too heavy though, and make sure to wear armor.)
Quote
"Urist had a little lamb
whose feet tracked blighted soot.
And into every face he saw
his sooty foot he put."

Sarmatian123

  • Bay Watcher
    • View Profile
Re: How to automate Shearing/Milking?
« Reply #1 on: December 18, 2018, 09:39:13 am »

You can't automate shearing and milking properly. It's permanently bugged.

Solution could be:
1. Every month to share 1 animal given you have 24+ grown animals. Then run 1 spinning job after.
1. Every month to milk 1 animal given you have 24+ grown female animals. Then run 1 cheese job after.
But it is more bother then worth it.

BTW, how about automated butchering job? I didn't figure out how to automatically scale down my herds to 3 males and 10 females. Is it even possible?
Logged

anewaname

  • Bay Watcher
  • The mattock... My choice for problem solving.
    • View Profile
Re: How to automate Shearing/Milking?
« Reply #2 on: December 18, 2018, 11:51:28 am »

The vanilla job manager's conditions cannot trigger based on quantity of animals, only on quantity of objects, so you cannot set up a "start job based on available shearable creatures" order...

I manually enter a "shear animal/R" at a workshop when spring arrives. This is somewhat efficient but needs the manual entry. Are you attempting to have it completely automated so you can lock the gates and let the fort run for years on its own?
Logged
How did I manage to successfully apply the lessons of The Screwtape Letters to my perceptions of big grocery stores?

PatrikLundell

  • Bay Watcher
    • View Profile
Re: How to automate Shearing/Milking?
« Reply #3 on: December 18, 2018, 01:36:05 pm »

Like anewaname, I issue a repeat shearing order and a repeat spinning order in the farmer's workshop by the pasture every spring. This results in one cancellation message for shearing, and then, later, one for spinning (the same dorf has both tasks). It works well, apart from DF being bugged with cancellation spam due to "handling of dangerous creature" if the shearer/spinner is active when the elven caravan arrives, unless the bugger is taken off the trade hauling task.

It's probably possibly to write a DFHack script that periodically goes through all units and task the ones eligible for shearing when they've got wool to shear, but I haven't bothered to try to look into it.

I don't bother with milk/cheese due to having to set up orders manually and then guess at when it's time to make new orders after the previous ones expired (with cancellation messages, of course).
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: How to automate Shearing/Milking?
« Reply #4 on: December 18, 2018, 01:58:18 pm »

Since there wont be many animals to process, for the best results id recommend using a job restricted burrow to work on particular animals set onto 'repeat' regular orders of whatever you're doing.

Sheep can be milked and sheared all the same, so can easily deserve a farmers workshop with a equal size bucket store in or near their grazing area. Pigs don't need any pasture so you can push them somewhere more industrially relevant further in the fortress to milk whenever approriate. etc etc by handling it from a burrow without pulling other milkable creatures outside over grass.
Logged

Hans Lemurson

  • Bay Watcher
    • View Profile
Re: How to automate Shearing/Milking?
« Reply #5 on: December 19, 2018, 06:13:29 am »

You can't automate shearing and milking properly. It's permanently bugged.

Solution could be:
1. Every month to share 1 animal given you have 24+ grown animals. Then run 1 spinning job after.
1. Every month to milk 1 animal given you have 24+ grown female animals. Then run 1 cheese job after.
But it is more bother then worth it.

BTW, how about automated butchering job? I didn't figure out how to automatically scale down my herds to 3 males and 10 females. Is it even possible?
Bugged?  Isn't it just a non-implemented feature?
Why do you need 24 animals just to shear one per month?  Aren't there 12 months in a year?  And can't you shear once every ~10 months?

The vanilla job manager's conditions cannot trigger based on quantity of animals, only on quantity of objects, so you cannot set up a "start job based on available shearable creatures" order...

I manually enter a "shear animal/R" at a workshop when spring arrives. This is somewhat efficient but needs the manual entry. Are you attempting to have it completely automated so you can lock the gates and let the fort run for years on its own?
I wanted to be able to work on other projects without being distracted by cancel-spam or having to keep issuing "Repeat" orders.
Maybe an annual shearing is something I could do manually.

Like anewaname, I issue a repeat shearing order and a repeat spinning order in the farmer's workshop by the pasture every spring. This results in one cancellation message for shearing, and then, later, one for spinning (the same dorf has both tasks). It works well, apart from DF being bugged with cancellation spam due to "handling of dangerous creature" if the shearer/spinner is active when the elven caravan arrives, unless the bugger is taken off the trade hauling task.

It's probably possibly to write a DFHack script that periodically goes through all units and task the ones eligible for shearing when they've got wool to shear, but I haven't bothered to try to look into it.

I don't bother with milk/cheese due to having to set up orders manually and then guess at when it's time to make new orders after the previous ones expired (with cancellation messages, of course).
I've had reasonable success in milk production with my "Toggle-able Monthly Order" plan. 
My Milk 1, Milk 2, Milk 4, and Milk 8 orders all specify that they need at least one bucket to initiate, and so to disable them I can simply scroll to them in the list and go "c-t-enter" to toggle whether said bucket has to be an "Aluminum-bearing Item".  So long as I can avoid the temptation to deliberately import aluminum and forge it into a bucket, or loot such buckets from an ambushed caravan, I think I have a decent system.  Adjust the jobs to whatever total milking I need, and the only spam I get is the calming blue "Work Order Completed" notification.
Logged
Foolprooof way to penetrate aquifers of unlimited depth.  (Make sure to import at least 10 stones for mechanisms)
Toughen Dwarves by dropping stuff on them.  (Nothing too heavy though, and make sure to wear armor.)
Quote
"Urist had a little lamb
whose feet tracked blighted soot.
And into every face he saw
his sooty foot he put."

PatrikLundell

  • Bay Watcher
    • View Profile
Re: How to automate Shearing/Milking?
« Reply #6 on: December 19, 2018, 08:57:34 am »

I don't use the manager at all, as every thing I've tried to use it for has turned out not to work at all or sort of work but produce unreasonable amounts of cancellation spam. So far I've mostly used manually introduced repeating orders (that end with a cancellation, of course), but at least the jobs end up in the right workshops. I've started experimenting with a DFHack script to cook and brew, though.
Logged

anewaname

  • Bay Watcher
  • The mattock... My choice for problem solving.
    • View Profile
Re: How to automate Shearing/Milking?
« Reply #7 on: December 19, 2018, 10:20:14 am »

For milking/cheesing, I enter repeat orders sporadically at the workshops then about 2 years in, I enter a set of orders to repeat monthly for some number less than the herd size (this usually coincides with my first mass-butchering of all common animals that are not cats, dogs, poultry, or wool-bearing). It is an inefficient milking system, but I also buy a variety of cheese from each caravan because I only seek variety of cheese, not maximum output.

Setting the binary orders is a good solution, but I wouldn't include the 1, 2, and 4, since I avoid small work orders to avoid completion spam.
Logged
How did I manage to successfully apply the lessons of The Screwtape Letters to my perceptions of big grocery stores?

Hans Lemurson

  • Bay Watcher
    • View Profile
Re: How to automate Shearing/Milking?
« Reply #8 on: December 19, 2018, 02:21:37 pm »

I only have a small number of animals for now (I am breeding a full flock of sheep from just 2 embark animals.  For reasons.), so I'll be keeping the 1,2,and 4 because that's as many as I've got!  But I can definitely imagine 1's and 2's being rather pointless and annoying once you get a large enough population.

I'm trying to get a fortress that can "Live off the Land", getting its food just from plant gathering (zones are really helpful for this) and milking my flock.
Logged
Foolprooof way to penetrate aquifers of unlimited depth.  (Make sure to import at least 10 stones for mechanisms)
Toughen Dwarves by dropping stuff on them.  (Nothing too heavy though, and make sure to wear armor.)
Quote
"Urist had a little lamb
whose feet tracked blighted soot.
And into every face he saw
his sooty foot he put."

mikekchar

  • Bay Watcher
    • View Profile
Re: How to automate Shearing/Milking?
« Reply #9 on: December 20, 2018, 01:53:43 am »

This is from my notoriously bad memory, but I think you can milk an animal every 17 days and shear them every 10 months.  You can safely set up a monthly milk job of size X for X animals.  You can set up a daily job to make cheese depending on the amount of milk you want (for example 1 cheese job if there is at least 4 milk).  For shearing you can set up a yearly job.  Again, make a daily spinning job based on the amount of wool available.  I would resist using job linked orders as they haven't worked well for me in the past.

The above will avoid most cancellation spam.  The problem is that if the job starts and can't be completed, it keeps getting restarted over and over again until it *can* be completed.  This causes your dwarf to walk to the farm workshop, discover they can't do the job and then carry on.  In the case of milking they pick up the bucket first :-P.  The next day it will happen again.  As soon as you get the spam, you have to alter the original job to get rid continual spam (cancelling the job doesn't do it, because the job is being spawned by the manager).

It is a PITA, but I still find it's worth it because cancellation is actually pretty rare.  It only happens when you either miscounted your livestock or else something weird happened.  Certainly less than once a year in my experience.   It's slightly less typing than doing repeated commands and doesn't require you to remember to do it ;-)

For shearing, I try to get up to 10 shearable livestock and then just do 1 every month.  I have to reset it a few times in the first year, but then the livestock are staggered in coat length and I don't have to worry about it.  Similarly once you get 3 milkable animals you can do 1 per week in safety (it repeats every 21 days).  Once you have 17 (if you are crazy and want to feed your entire fortress on cheese) you can do one every day :-).  I usually don't worry about milk cancellation if I am on weekly milkings because it will fix itself in a week.
Logged

Hans Lemurson

  • Bay Watcher
    • View Profile
Re: How to automate Shearing/Milking?
« Reply #10 on: December 20, 2018, 05:16:31 pm »

This is from my notoriously bad memory, but I think you can milk an animal every 17 days and shear them every 10 months.  You can safely set up a monthly milk job of size X for X animals.  You can set up a daily job to make cheese depending on the amount of milk you want (for example 1 cheese job if there is at least 4 milk).  For shearing you can set up a yearly job.  Again, make a daily spinning job based on the amount of wool available.  I would resist using job linked orders as they haven't worked well for me in the past.

The above will avoid most cancellation spam.  The problem is that if the job starts and can't be completed, it keeps getting restarted over and over again until it *can* be completed.  This causes your dwarf to walk to the farm workshop, discover they can't do the job and then carry on.  In the case of milking they pick up the bucket first :-P.  The next day it will happen again.  As soon as you get the spam, you have to alter the original job to get rid continual spam (cancelling the job doesn't do it, because the job is being spawned by the manager).

It is a PITA, but I still find it's worth it because cancellation is actually pretty rare.  It only happens when you either miscounted your livestock or else something weird happened.  Certainly less than once a year in my experience.   It's slightly less typing than doing repeated commands and doesn't require you to remember to do it ;-)

For shearing, I try to get up to 10 shearable livestock and then just do 1 every month.  I have to reset it a few times in the first year, but then the livestock are staggered in coat length and I don't have to worry about it.  Similarly once you get 3 milkable animals you can do 1 per week in safety (it repeats every 21 days).  Once you have 17 (if you are crazy and want to feed your entire fortress on cheese) you can do one every day :-).  I usually don't worry about milk cancellation if I am on weekly milkings because it will fix itself in a week.
Yeah, that's pretty much what I was facing.  How did you manage the "Once a Week" Orders, though?
Logged
Foolprooof way to penetrate aquifers of unlimited depth.  (Make sure to import at least 10 stones for mechanisms)
Toughen Dwarves by dropping stuff on them.  (Nothing too heavy though, and make sure to wear armor.)
Quote
"Urist had a little lamb
whose feet tracked blighted soot.
And into every face he saw
his sooty foot he put."

tedward1337

  • Bay Watcher
    • View Profile
Re: How to automate Shearing/Milking?
« Reply #11 on: December 21, 2018, 10:35:16 am »

A real quick way is to set the shear/milk task in the manager screen. Set to be monthly/yearly, then turn off announcements for canceled jobs and laugh as simply automation takes over, and you’ll never be bugged about it.
Logged

Hans Lemurson

  • Bay Watcher
    • View Profile
Re: How to automate Shearing/Milking?
« Reply #12 on: December 21, 2018, 12:12:33 pm »

A real quick way is to set the shear/milk task in the manager screen. Set to be monthly/yearly, then turn off announcements for canceled jobs and laugh as simply automation takes over, and you’ll never be bugged about it.
Right, but as I said you can't change the size of issued work orders, but your herd size DOES change.  How do you ensure that you get all of your animals?  Too few orders and you don't get your full yield, too many and you get cancel-spam.
Logged
Foolprooof way to penetrate aquifers of unlimited depth.  (Make sure to import at least 10 stones for mechanisms)
Toughen Dwarves by dropping stuff on them.  (Nothing too heavy though, and make sure to wear armor.)
Quote
"Urist had a little lamb
whose feet tracked blighted soot.
And into every face he saw
his sooty foot he put."

mikekchar

  • Bay Watcher
    • View Profile
Re: How to automate Shearing/Milking?
« Reply #13 on: December 21, 2018, 02:24:17 pm »

Basically I update the orders once a year or so (or not).  So, it really is a marginal gain over manually issuing orders :-).  It's also a PITA that you have to delete a perfectly good order to change the size :-P.  But basically, I try to have my herds at a steady state anyway.  Dwarfs eat at most 10 (and as little as 6) meals a year, I think.  So 3 ewes will produce enough cheese for 5-8 dwarfs a year.  If you have enough ewes to produce a reasonable amount of wool, then you have more than enough sheep cheese :-).  It's just a matter of ramping up the herd size until you are happy with wool production and keeping it there.
Logged

Sarmatian123

  • Bay Watcher
    • View Profile
Re: How to automate Shearing/Milking?
« Reply #14 on: December 21, 2018, 10:25:12 pm »

My issue with this fancy automation is how you can in unmodified vanilla DF set butchering orders in a burrow, so you keep around 3 males and 20 females non stop. As I understand this automation, which is currently does not differentiate between males and females. It checks just for amount of all animals and can leave you with 23 animal kids, which neither can be milked or sheared, but can all be males... Am I missing some setting here or we basically agreeing here for cat-explosion for sake of milk and shearing automation? Because if I have to do all this manually, so automation more or less will function, then I guess I will skip all this bother entirely.
Logged
Pages: [1] 2