Bay 12 Games Forum

Please login or register.

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

Author Topic: Idgarad's DFHack Workload Script  (Read 23550 times)

idgarad

  • Bay Watcher
    • View Profile
Idgarad's DFHack Workload Script
« on: March 08, 2012, 04:11:16 pm »

Idgarad's DFHack Workload Script (Copy and Paste Reference)
Please post suggested command lines for various "standard" stocks for an average fortress.
I'll be updating this post as I complete entries as a reference for folks.
Lines and sections with a @ following the # are confirmed working as expected. If you care to test the line to ensure it is working please leave a reply in the thread and I will promote the line as confirmed.

Code: [Select]
# Remember to Execute 'job item-material' lines with the workshop targeted
# They cannot be blindly executed by cutting and pasting the whole script.
# job item lines are REM'ed but still need to be executed at the appropriate
# workshop

###################################################
#Clear existing workflow settings.
#Thank you Crashews
#Added autobutcher reset
###################################################
workflow clear all
autobutcher stop
autobutcher forget all

###################################################
#Autobutcher with 10 female kids, 10 male kids, 4 female adults , and 2 male adults
###################################################
autobutcher target 10 10 4 2 all
autobutcher autowatch
autobutcher start

###################################################
#@Food 200 Drink 500 +- 50
###################################################
workflow count FOOD 1000 50
workflow count DRINK 1000 50

###################################################
#@ STEEL Production
###################################################
workflow count BAR//COAL 500
workflow count BAR//IRON 100
workflow count BAR//PIG_IRON 50
workflow count BAR//STEEL 100

###################################################
# SOAP Production
###################################################
workflow count BAR//ASH 50
workflow count LIQUID_MISC//LYE 50
workflow count BAR/SOAP 50

###################################################
# Containers and Furniture
###################################################
workflow count BIN 20
workflow count BARREL 40
workflow count BED 10
workflow count CABINET/WOOD,STONE,METAL 10
workflow count BOX/CLOTH,SILK,YARN 20
workflow count BOX/WOOD,STONE,METAL 10


###################################################
# Leather Upgrades in Masterwork (via Buoyancy)
# uncomment these lines if you use Masterwork Mod
###################################################
#workflow amount TOY//BONE_STUD 90 10
#workflow amount SKIN_TANNED//ANIMAL_EXOTIC:LEATHER 90 10
#workflow amount SKIN_TANNED//ANIMAL_STUDDED:LEATHER 90 10
#workflow amount SKIN_TANNED//ANIMAL_LAMELLAR:LEATHER 90 10


###################################################
# Military 4 Sets (Assuming 3 standing squads with a full spare to sell\trade\etc)
###################################################
#Leather Armor Sets

#Iron Armor Sets

#Steel Armor Sets

#Weapons
    #Crossbows
    workflow count WEAPON:ITEM_WEAPON_CROSSBOW/WOOD,METAL 40
    #Obsidian Shortsword
    workflow count WEAPON:ITEM_WEAPON_SWORD_SHORT/STONE 40

#Ammo
    workflow amount AMMO:ITEM_AMMO_BOLTS/METAL 1000 100
    workflow amount AMMO:ITEM_AMMO_BOLTS/WOOD,BONE 200 50

###################################################
#PROCESS BASIC PLANT GOODS 50 count
###################################################
#Quarry Bush (The Seed is a Rock Nut)
# These need to be confirmed still. Not certain about the Press and Milling lines
###################################################
  # PlantProcess (via Farmer's Workshop)
workflow count LEAVES//BUSH_QUARRY 50
  # Milling (via Millstone or Quern)
#This should give us paste (via Bouyancy)
workflow count GLOB//BUSH_QUARRY 50 10
    #job item-material 1 BUSH_QUARRY
  # Brewing (via Still)
#NA
  # Cooking (Via Kitchen)
#NA
  #Pressing (Via Press, check to see if it is the seeds you are pressing rather then the plant)
#This should give us cake and OIL counts
workflow count GLOB//BUSH_QUARRY:LIQUID_MISC 50
workflow count LIQUID_MISC//BUSH_QUARRY:OIL 50
  # Soap
#This should give us Rock Nut Soap count
workflow count BAR//BUSH_QUARRY:OIL 50



###################################################
#Cave Wheat
###################################################
  # PlantProcess
  # Milling (via Bouyancy)
workflow count POWDER_MISC//GRASS_WHEAT_CAVE:MILL 100 10
#job item-material 1 GRASS_WHEAT_CAVE
  # Brewing count
workflow count DRINK//GRASS_WHEAT_CAVE 50
#job item-material 1 GRASS_WHEAT_CAVE
  # Cooking
  # Pressing

###################################################
#Plump Helmets
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
###################################################
#Pig Tail
###################################################
  # PlantProcess (via Bouyancy)
  workflow amount THREAD//GRASS_TAIL_PIG:THREAD 30 20
  #job item-material 1 GRASS_TAIL_PIG
  # Milling
  # Brewing
  # Cooking
  # Pressing
    # ONLY WITH MASTERWORK MOD (via Bouyancy)
    #   workflow amount LIQUID_MISC//GRASS_TAIL_PIG:OIL 100 10
    # job item-material 1 GRASS_TAIL_PIG
###################################################
#Sweet Pod
###################################################
  # PlantProcess (Added By Bouyancy)
    workflow count LIQUID_MISC//POD_SWEET:EXTRACT 20 10
    #job item-material 1 POD_SWEET
  # Milling
workflow count POWDER_MISC//POD_SWEET:MILL 100 10
    #job item-material 1 POD_SWEET
  # Brewing
  # Cooking
  # Pressing
###################################################
#Dimple Cup
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
###################################################
#Whip Vine
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
###################################################
#Sun Berry
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
###################################################
#Fisher Berry
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
###################################################
#Bloated Tuber
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
###################################################
#Prickle Berry
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
###################################################
#Muck Root
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
###################################################
#Wild Strawberry
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
###################################################
#Rope Read
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
###################################################
#Rat Weed
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
###################################################
#Silver Barb
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
###################################################
#Valley Herb
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
###################################################
#Kobold Bulb
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
###################################################
#Hide Root
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
###################################################
#Blade Weed
###################################################
  # PlantProcess
  # Milling
  # Brewing
  # Cooking
  # Pressing
#FIN

I will be placing #NA on sections that are not valid. Updates will be made asap for reference. (If the DFHack authors could put in a sort of Read from Config file, that would be awesome along with a clear command.) Yes actually doing a cut and paste of this script works just fine. The DFHack console ignores lines starting with a # and leading white space doesn't seem to be an issue.
« Last Edit: May 11, 2012, 09:08:17 am by idgarad »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Idgarad's DFHack Workload Script
« Reply #1 on: March 08, 2012, 04:50:42 pm »

Just a note for people not familiar with it: The workflow script allows dfhack to give work orders to all kinds of workshops till you have the intended materials done. Essentially a super-manager.
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 :::

CheatingChicken

  • Bay Watcher
    • View Profile
Re: Idgarad's DFHack Workload Script
« Reply #2 on: March 11, 2012, 10:00:27 pm »

How is this script intended to work? What file do i need to put it in, or what program is it intended to run with?
Logged

BigFatStupidHead

  • Bay Watcher
  • obscure to the point of being cryptic
    • View Profile
Re: Idgarad's DFHack Workload Script
« Reply #3 on: March 11, 2012, 10:16:21 pm »

Looks excellent, even if just from a reference standpoint. I'll check for anything useful to add to the list once I'm home.


Here's Armour
Spoiler (click to show/hide)
« Last Edit: March 21, 2012, 03:31:02 pm by BigFatStupidHead »
Logged

Crashews

  • Escaped Lunatic
    • View Profile
Re: Idgarad's DFHack Workload Script
« Reply #4 on: March 12, 2012, 12:55:35 am »

(If the DFHack authors could put in a sort of Read from Config file, that would be awesome along with a clear command.)

Looking at the code for it, loading a script from a file should be really easy to do (and this would be general, not just a part of workflow).  I'll see if I can get something working tonight.

Also can you elaborate on what you want clear to do?  Are you looking to have workflow clear the list of constraints?

Can you post an Issue (or two) with the suggested improvements to the development page at https://github.com/peterix/dfhack/issues ?

[EDIT]:  Changes are here:  https://github.com/ClaytonHughes/dfhack if you're set up to build from source.

"script filename" to load a file from disc as if it were interactive input.  Default directory is the one you launched DF from, so you'll probably want to just put the files in there (DFHack's console doesn't give you ls and cd and all that for the filesystem).

"workflow clear all" to eliminate all the workflow constraints.
« Last Edit: March 12, 2012, 02:41:36 am by Crashews »
Logged

CheatingChicken

  • Bay Watcher
    • View Profile
Re: Idgarad's DFHack Workload Script
« Reply #5 on: March 12, 2012, 08:17:43 am »

"script filename" to load a file from disc as if it were interactive input.  Default directory is the one you launched DF from, so you'll probably want to just put the files in there (DFHack's console doesn't give you ls and cd and all that for the filesystem).

"script is not a recognized command."

What am I doing wrong?
Logged

Buoyancy

  • Bay Watcher
    • View Profile
Re: Idgarad's DFHack Workload Script
« Reply #6 on: March 12, 2012, 02:59:54 pm »

I've got processing of pig tails and sweet pods at the farmer's workshop to work through
Code: [Select]
#Pig Tail
  # PlantProcess
workflow amount THREAD//GRASS_TAIL_PIG:THREAD 30 20
# job item-material 1 GRASS_TAIL_PIG
#Press Oil

#Sweet Pod
  # PlantProcess
workflow count LIQUID_MISC//POD_SWEET:EXTRACT 20 10
# job item-material 1 POD_SWEET

I haven't been able to get processing of quarry bushes to work properly it tells me that there are no jobs for quarry bushes.
Logged

idgarad

  • Bay Watcher
    • View Profile
Re: Idgarad's DFHack Workload Script
« Reply #7 on: March 17, 2012, 07:35:10 am »

I've got processing of pig tails and sweet pods at the farmer's workshop to work through
Code: [Select]
#Pig Tail
  # PlantProcess
workflow amount THREAD//GRASS_TAIL_PIG:THREAD 30 20
# job item-material 1 GRASS_TAIL_PIG
#Press Oil

#Sweet Pod
  # PlantProcess
workflow count LIQUID_MISC//POD_SWEET:EXTRACT 20 10
# job item-material 1 POD_SWEET

I haven't been able to get processing of quarry bushes to work properly it tells me that there are no jobs for quarry bushes.

I've been tinkering myself. Quarry Bushes are handled via the Process Plants to Bag. I've got a few more updates. The hard part is I have to build these as a go and my last two forts got overrun by a dozen vampires I couldn't peg down that were massacaring my army while a pair of titans were chewing through my defenses.

For those curious on the script I normally cut and paste the sections as I need them. My goal is to get the script written so it can be loaded via the tool itself so others can edit the amounts to their liking.

A: Thank you for the clear command. It will be the first line in the script to ensure there isn't anything lingering when it get's run.
B: Thank you for the load from config file. Should make things easier.

Outstanding issues: Processing plants is a messy task, lots of trial and error. Toady if you catch this can we get some low level tweaks in the future to make managing what materials are to be used easier. I know we can forbid items, what about adding to workshop jobs a "use adjacent stockpile only" option so a workshop and it's jobs are restricted to only using materials from a stockpile that is touching the workshop? *EDIT* Now that I think of it that might help clean up the code for a lot of workshops and ease path finding for non-mood work.
« Last Edit: March 17, 2012, 07:46:52 am by idgarad »
Logged

Buoyancy

  • Bay Watcher
    • View Profile
Re: Idgarad's DFHack Workload Script
« Reply #8 on: March 20, 2012, 02:06:16 pm »

I've figured out a bunch of different things for this now, including most of the standard crop reactions, and some stuff that's specific to the Masterwork mod.  Here's what I have for plants:

Code: [Select]
###################################################
#PROCESS BASIC PLANT GOODS 100 count
###################################################
#Quarry Bush (The Seed is a Rock Nut)
###################################################
  # PlantProcess (via Farmer's Workshop)
workflow count LEAVES//BUSH_QUARRY:LEAF 100 10
  # Milling (via Millstone or Quern)
#This should give us paste
workflow count GLOB//BUSH_QUARRY 100 10
#job item-material 1 BUSH_QUARRY


###################################################
#Cave Wheat
###################################################
  # Milling
workflow count POWDER_MISC//GRASS_WHEAT_CAVE:MILL 100 10
#job item-material 1 GRASS_WHEAT_CAVE
  # Pressing

###################################################
#Pig Tail
###################################################
  # PlantProcess
workflow amount THREAD//GRASS_TAIL_PIG:THREAD 100 10
# job item-material 1 GRASS_TAIL_PIG
#Press Oil ###### MasterWork######
workflow amount LIQUID_MISC//GRASS_TAIL_PIG:OIL 100 10
# job item-material 1 GRASS_TAIL_PIG

###################################################
#Sweet Pod
###################################################
  # PlantProcess
workflow count LIQUID_MISC//POD_SWEET:EXTRACT 100 10
# job item-material 1 POD_SWEET
  # Milling
workflow count POWDER_MISC//POD_SWEET:MILL 100 10
# job item-material 1 POD_SWEET

Here's some stuff to automate the production of leather upgrades in Masterwork:
Code: [Select]
#Leather
workflow amount TOY//BONE_STUD 90 10
workflow amount SKIN_TANNED//ANIMAL_EXOTIC:LEATHER 90 10
workflow amount SKIN_TANNED//ANIMAL_STUDDED:LEATHER 90 10
workflow amount SKIN_TANNED//ANIMAL_LAMELLAR:LEATHER 90 10

I've pretty much got this stuff figured out now, so let me know if there's some specific reaction that anyone would like to know the syntax for.
Logged

BigFatStupidHead

  • Bay Watcher
  • obscure to the point of being cryptic
    • View Profile
Re: Idgarad's DFHack Workload Script
« Reply #9 on: March 21, 2012, 03:58:50 pm »

I've pretty much got this stuff figured out now, so let me know if there's some specific reaction that anyone would like to know the syntax for.

How about milk?
Logged

sayke

  • Bay Watcher
    • View Profile
Re: Idgarad's DFHack Workload Script
« Reply #10 on: March 23, 2012, 11:43:40 am »

posting to follow, and because this is a very interesting project =) keep up the good work folks!
Logged
i play the incredibly awesome Masterwork DF mod - a wonderful blend of simplicity and new features that actually improves FPS!

idgarad

  • Bay Watcher
    • View Profile
Re: Idgarad's DFHack Workload Script
« Reply #11 on: March 26, 2012, 10:28:02 pm »

Just waiting for updates so I can resume. Lost last fortress to a trio of vampires and after 89 murders the fortress fell under siege and tantrum... and ghosts... Hopefully now after the last update I won't be getting vampires EVERY SINGLE MIGRATION.... grr... Might have to start building a migrant intake system to bring a migration wave in. separate them into individual rooms, and pre-check them to make sure they get hungry and thirsty before letting them in.
Logged

c4rb0nd8r

  • Escaped Lunatic
    • View Profile
Re: Idgarad's DFHack Workload Script
« Reply #12 on: April 08, 2012, 09:41:35 pm »

This list has been a ton of help, thanks for putting it together.

The only one I'm having trouble with is the constraint on cloth from pig tail thread. CLOTH//GRASS_TAIL_PIG seemed to work, but it wouldn't recognize the job. I've been using the generic cloth constraint, but I just had a tantrum episode since apparently my clothiers were only using plant cloth, so I've been trying to tighten this up.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Idgarad's DFHack Workload Script
« Reply #13 on: April 17, 2012, 08:19:24 pm »

Is this still alive, because it is kind of geared towards my mod, it wouldnt hurt to inlucde it in a way...
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 :::

Buoyancy

  • Bay Watcher
    • View Profile
Re: Idgarad's DFHack Workload Script
« Reply #14 on: April 17, 2012, 09:46:16 pm »

The only one I'm having trouble with is the constraint on cloth from pig tail thread. CLOTH//GRASS_TAIL_PIG seemed to work, but it wouldn't recognize the job. I've been using the generic cloth constraint, but I just had a tantrum episode since apparently my clothiers were only using plant cloth, so I've been trying to tighten this up.

You need to separately input the command
Code: [Select]
job item-material 1 GRASS_TAIL_PIG[/end] while you have the relevant job highlighted in the farmer's workshop for the constraint to function.  Otherwise the workflow system can't find the job.
Logged
Pages: [1] 2