Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Autolabor  (Read 6425 times)

FukkenSaved

  • Bay Watcher
    • View Profile
Autolabor
« on: January 19, 2015, 05:59:16 pm »

After a while I realized that the best way to control it is using autolabor to control haulers, and disable it for everything else using Dwarf Therapist instead. I also put together a separate hotkey that will disable hauling completely that can be used periodically to force some haulers into real jobs. I'd only run that for maybe 500-1000 frames at a time, then press ctrl+alt+A again to reset it. Here's the new script:

Code: [Select]
SetKeyDelay, 0 ; Without this it will take ~40 seconds, with it's down to ~3

; Disable all autolabor tasks, except haulers
; Ctrl + alt + A defines hotkey
^!a::

; Wood related
Send autolabor MINE disable{Enter}
Send autolabor CARPENTER disable{Enter}
Send autolabor BOWYER disable{Enter}
Send autolabor CUTWOOD disable{Enter}
Send autolabor WOOD_CRAFT disable{Enter}

; Stone related
Send autolabor MASON disable{Enter}
Send autolabor DETAIL disable{Enter}
Send autolabor STONE_CRAFT disable{Enter}

; Animals
Send autolabor ANIMALCARE disable{Enter}
Send autolabor ANIMALTRAIN disable{Enter}
Send autolabor HUNT disable{Enter}
Send autolabor TRAPPER disable{Enter}
Send autolabor DISSECT_VERMIN disable{Enter}
Send autolabor GELD disable{Enter}

; Medical
Send autolabor DIAGNOSE disable{Enter}
Send autolabor SURGERY disable{Enter}
Send autolabor BONE_SETTING disable{Enter}
Send autolabor SUTURING disable{Enter}
Send autolabor DRESSING_WOUNDS disable{Enter}

; Unskilled medical
Send autolabor FEED_WATER_CIVILIANS disable{Enter} ; imo these should be high priority
Send autolabor RECOVER_WOUNDED disable{Enter} ; Should be everyone

; Farming
Send autolabor PLANT disable{Enter}
Send autolabor SOAP_MAKER disable{Enter}
Send autolabor BURN_WOOD disable{Enter}
Send autolabor POTASH_MAKING disable{Enter}
Send autolabor LYE_MAKING disable{Enter}
Send autolabor MILLER disable{Enter}
Send autolabor PRESSING disable{Enter}

Send autolabor HERBALIST disable{Enter}
Send autolabor PROCESS_PLANT disable{Enter}
Send autolabor BREWER disable{Enter}
Send autolabor COOK disable{Enter}
Send autolabor MILK disable{Enter}
Send autolabor MAKE_CHEESE disable{Enter}

; Animal products
Send autolabor BUTCHER disable{Enter}
Send autolabor TANNER disable{Enter}
Send autolabor LEATHER disable{Enter}
Send autolabor BONE_CARVE disable{Enter}

; Fish
Send autolabor FISH disable{Enter} ; Default deny
Send autolabor CLEAN_FISH disable{Enter}
Send autolabor DISSECT_FISH disable{Enter}

; Metalworking
Send autolabor SMELT disable{Enter}
Send autolabor FORGE_WEAPON disable{Enter}
Send autolabor FORGE_ARMOR disable{Enter}
Send autolabor FORGE_FURNITURE disable{Enter}
Send autolabor METAL_CRAFT disable{Enter}

; Gems
Send autolabor CUT_GEM disable{Enter}
Send autolabor ENCRUST_GEM disable{Enter}

; Glass
Send autolabor GLASSMAKER disable{Enter}

; Textile Industry
Send autolabor SHEARER disable{Enter}
Send autolabor SPINNER disable{Enter}
Send autolabor WEAVER disable{Enter}
Send autolabor CLOTHESMAKER disable{Enter}
Send autolabor DYER disable{Enter}
Send autolabor EXTRACT_STRAND disable{Enter}

; Pottery
Send autolabor POTTERY disable{Enter}
Send autolabor GLAZING disable{Enter}

; Engineering
Send autolabor MECHANIC disable{Enter}
Send autolabor ARCHITECT disable{Enter}
Send autolabor SIEGECRAFT disable{Enter}
Send autolabor SIEGEOPERATE disable{Enter}

; Pumps
Send autolabor OPERATE_PUMP disable{Enter}

; Bees
Send autolabor BEEKEEPING disable{Enter}
Send autolabor WAX_WORKING disable{Enter}

; Hauling and cleaning
Send autolabor HAUL_ANIMALS haulers{Enter}
Send autolabor HAUL_BODY haulers{Enter}
Send autolabor HAUL_FOOD haulers{Enter}
Send autolabor HAUL_FURNITURE haulers{Enter}
Send autolabor HAUL_ITEM haulers{Enter}
Send autolabor HANDLE_VEHICLES haulers{Enter}
Send autolabor HAUL_REFUSE haulers{Enter}
Send autolabor HAUL_STONE haulers{Enter}
Send autolabor HAUL_TRADE haulers{Enter}
Send autolabor HAUL_WATER haulers{Enter}
Send autolabor HAUL_WOOD haulers{Enter}
Send autolabor CLEAN haulers{Enter}

; Levers
Send autolabor PULL_LEVER disable{Enter} ; Should be everyone

; Alchemy
Send autolabor ALCHEMIST disable{Enter}

; Construction
Send autolabor BUILD_ROAD haulers{Enter}{Enter}
Send autolabor BUILD_CONSTRUCTION haulers{Enter}
Send autolabor REMOVE_CONSTRUCTION haulers{Enter}

; End macro definition
return

; Disable haulers
; Ctrl + alt + D defines hotkey
^!d::

Send autolabor HAUL_ANIMALS 0 0 0{Enter}
Send autolabor HAUL_BODY 0 0 0{Enter}
Send autolabor HAUL_FOOD 0 0 0{Enter}
Send autolabor HAUL_FURNITURE 0 0 0{Enter}
Send autolabor HAUL_ITEM 0 0 0{Enter}
Send autolabor HANDLE_VEHICLES 0 0 0{Enter}
Send autolabor HAUL_REFUSE 0 0 0{Enter}
Send autolabor HAUL_STONE 0 0 0{Enter}
Send autolabor HAUL_TRADE 0 0 0{Enter}
Send autolabor HAUL_WATER 0 0 0{Enter}
Send autolabor HAUL_WOOD 0 0 0{Enter}
Send autolabor CLEAN 0 0 0{Enter}
Send autolabor BUILD_ROAD 0 0 0{Enter}{Enter}
Send autolabor BUILD_CONSTRUCTION 0 0 0{Enter}
Send autolabor REMOVE_CONSTRUCTION 0 0 0{Enter}

; End macro definition
return

Anyone that has idlers all the time has failed their fortress macroeconomically. It just means that they need to create jobs for the dwarves. 90-95% of the time the only dwarves standing in the meeting area should be just kids and dwarves on break.

Zero idlers (Raise interest rates):
ctrl+alt+d to force dwarves into non-hauling jobs
Set hauling options to ignore things your fortress has enough of
Cancel jobs that provide something you have a surplus of

Too many idlers (Lower interest rates):
ctrl+alt+d to make more hauling jobs available indirectly for unskilled dwarves, by matching skilled dwarves with respective jobs
Construction
Mining
More workshops + dwarves with enabled skill. Maybe training workshops for unskilled dwarves
Military Keynesianism
Create intermediate stockpiles that give to main stockpiles, to encourage more hauling in the short term

Of course there are bottlenecks that can prevent dwarves from taking these jobs:
Anvils (weapons, armor) - You want at least two so you can have separate workshops for your armorsmith and weaponsmith
Picks (mining)
Bags (sand, milling, also prevents seed clutter) - You need a lot more cloth than the default config makes available
Axes (wood - rarely a problem)

If you can't get what you want then you'll just have to find some other profitable industry so you can trade for it.

It's not a complete solution but it still lets you maintain full employment with small periods of idlers. In Dwarf Therapist I had every skill with exactly 1 dwarf except the ones I needed more of. The "total assigned skilled labors" feature in DT helps a lot as you can move jobs from highly active dwarves to less active dwarves. Autolabor also does not have a mechanism to select the best unskilled dwarves, the "roles" tab in DT.

Stockpiles:
You can get better performance from stockpiles with bins by splitting them up into more specific stockpiles. To start, the bars/blocks pile should be split up into a rock pile, a metal pile, and a fuel pile. Incidentally the ore should have a different stockpile if only just to separate the functionality of metalsmiths and masons.
Thread and unprepared fish don't function properly unless they're in no-container stockpiles. Disable unprepared fish from your food stockpile and put them in the butcherable corpse stockpile instead.
You want a separate stockpile for your unwanted refuse (the first three) and the economic stuff (the rest) - bones, shells, etc.

Other stuff:
The hunting labor is more effective archery training so I assign that to archers who have the archer rating the most below their discipline rating.
From my Black and White experience the best way to manage a forest is to cut down the trees that are the least distance apart. Also in a pasture all of them should be cut down (and the animals fenced in) because I've found animals to have an annoying habit of getting stuck in trees.
All "automatic" workshop activity provided by DFHack doesn't repeat, so to be more efficient you're better off just having that job in repeat at the workshop.
Logged