Bay 12 Games Forum

Please login or register.

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

Author Topic: Stockflow Plugin for DFHack  (Read 14745 times)

breadman

  • Bay Watcher
    • View Profile
Stockflow Plugin for DFHack
« on: May 24, 2013, 12:12:28 am »

After using DFHack for a while, and falconne's autotrade plugin in particular, I realized that it would be able to implement my proposal from the "Manager Auto-fills stockpiles" thread.  That is, I could pretend that the Bookkeeper would add work orders to the Manager's queue, based on settings selected from the building tasks menu for my stockpiles.

Stockflow plugin 1.0 is now ready for download.  It currently requires DFHack v0.34.11-r3 for Windows or Linux.  Unzip it to your Dwarf Fortress folder, add "stockflow enable" to your dfhack.init file, and you should be good to go.

Spoiler: Screenshots (click to show/hide)

Caveat: It might be buggy.  Actually, I know that it can over-count items stored in stockpiles, but at least it ignores boulders for non-stone stockpiles, and empty bins or barrels for non-furniture stockpiles.  In addition, the job selection screen might be slightly different than the official one, particularly when mods are in effect.

Also, as I explained in the suggestion thread, the selected job is not guaranteed to match what the stockpile stores.  Your manager may well place the jobs in the wrong workshop, created items might get hauled off to some other place, and jobs might get cancelled if another reagent is unavailable.  Think of this as a proof of concept, to see whether my suggestion needs to be improved before Toady gets to it.
Logged
Quote from: Kevin Wayne, in r.g.r.n
Is a "diety" the being pictured by one of those extremely skinny aboriginal statues?

expwnent

  • Bay Watcher
    • View Profile
Re: Stockflow Plugin for DFHack
« Reply #1 on: May 24, 2013, 11:11:23 am »

Looks useful.

Is there a github page? I always compile DFHack from source.
Logged

breadman

  • Bay Watcher
    • View Profile
Re: Stockflow Plugin for DFHack
« Reply #2 on: May 24, 2013, 01:59:31 pm »

Is there a github page? I always compile DFHack from source.

Try the stockflow-clean branch of git://github.com/eswald/dfhack.git

It's not showing up on the site yet, but I've been able to pull from it.
Logged
Quote from: Kevin Wayne, in r.g.r.n
Is a "diety" the being pictured by one of those extremely skinny aboriginal statues?

expwnent

  • Bay Watcher
    • View Profile
Re: Stockflow Plugin for DFHack
« Reply #3 on: May 24, 2013, 03:01:46 pm »

Thanks.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Stockflow Plugin for DFHack
« Reply #4 on: May 25, 2013, 01:31:25 am »

Excuse the question, but what exactly does it do?
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 :::

CLA

  • Bay Watcher
    • View Profile
Re: Stockflow Plugin for DFHack
« Reply #5 on: May 25, 2013, 07:37:00 am »

Excuse the question, but what exactly does it do?
you know the eternal suggestion "standing orders"? That you can specify that your manager keeps an eye on stocks and if you have for example, less than 100 drinks, he automatically orders more to be made.

This plugin, from what I can see, does this for specific stockpiles. So you could set your barrel stockpile #3 to be always full of barrels, regardless of the actual overall amount of barrels.
Logged
CLA - an ASCII-like Graphic Pack with simplified letter-like creature graphics. The simple and clean looks of ASCII with distinct creature graphics - best of both worlds!

http://www.bay12forums.com/smf/index.php?topic=105376.0

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Stockflow Plugin for DFHack
« Reply #6 on: May 25, 2013, 10:07:29 pm »

So its workflow that makes the bookkeeper more useful and is not by workshop, but by stockpile. That does sound like a lot of people might be interested in this. :)
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 :::

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Stockflow Plugin for DFHack
« Reply #7 on: May 29, 2013, 01:18:19 pm »

Very interesting... Downloading now.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

turabeasel

  • Bay Watcher
    • View Profile
Re: Stockflow Plugin for DFHack
« Reply #8 on: June 05, 2013, 04:16:48 pm »

Is there OSX compatibility?
Logged

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Stockflow Plugin for DFHack
« Reply #9 on: June 05, 2013, 07:22:05 pm »

is this like dwarf foreman, but works directly with stockpiles/manager vs overall supply/manager (NM, i THINK I answered my own question by looking at screenshots).  Yes?
« Last Edit: June 05, 2013, 07:49:04 pm by thistleknot »
Logged

breadman

  • Bay Watcher
    • View Profile
Re: Stockflow Plugin for DFHack
« Reply #10 on: June 06, 2013, 11:01:12 pm »

Is there OSX compatibility?

In theory, yes; it just needs to be compiled.  Would you like to help?

is this like dwarf foreman, but works directly with stockpiles/manager vs overall supply/manager (NM, i THINK I answered my own question by looking at screenshots).  Yes?

Dwarf Foreman and Workflow have similar aims, but different mechanisms.  Stockflow doesn't care about total amounts, just whether the stockpile(s) have empty space.  That moves most of the complexity into things you already do.

The ability to order jobs based on inputs is also surprisingly useful.
Logged
Quote from: Kevin Wayne, in r.g.r.n
Is a "diety" the being pictured by one of those extremely skinny aboriginal statues?

Lav

  • Bay Watcher
    • View Profile
Re: Stockflow Plugin for DFHack
« Reply #11 on: June 07, 2013, 04:30:53 am »

Produce per empty space feature seems vulnerable to hauling bottlenecks. If you are producing barrels to fill the furniture stockpile, but your dwarves aren't actually hauling the barrels to the stockpile, the plugin will most likely generate an endless sequence of barrel production orders.
Logged
Seems to be the way with things on this forum; if an invention doesn't involve death by magma then you know someone's going to go out of their way to make sure it does involve death by magma... then it gets acknowledged as being a great invention.

breadman

  • Bay Watcher
    • View Profile
Re: Stockflow Plugin for DFHack
« Reply #12 on: June 07, 2013, 01:21:56 pm »

Produce per empty space feature seems vulnerable to hauling bottlenecks. If you are producing barrels to fill the furniture stockpile, but your dwarves aren't actually hauling the barrels to the stockpile, the plugin will most likely generate an endless sequence of barrel production orders.

True enough.  Granted, if it takes your dwarves longer to haul a barrel from the carpentry to the stockpile than it takes the bookkeeper to request a work order, the manager to validate the order, and the carpenter to craft a barrel, then you probably need more haulers.

In practice, the larger issue is that the bookkeeper doesn't seem to update stockpile records all that often.  That can be tweaked when and if Toady implements this properly, though, as long as the core concept proves successful.
Logged
Quote from: Kevin Wayne, in r.g.r.n
Is a "diety" the being pictured by one of those extremely skinny aboriginal statues?

Steforian

  • Bay Watcher
    • View Profile
Re: Stockflow Plugin for DFHack
« Reply #13 on: September 19, 2014, 05:15:38 pm »

This seems like a novel idea, but since my bookkeeper is at highest accuracy the job never gets que'd. Anyway to make my bookkeeper update regularly to make this work right?
Logged

breadman

  • Bay Watcher
    • View Profile
Re: Stockflow Plugin for DFHack
« Reply #14 on: September 19, 2014, 08:45:44 pm »

This seems like a novel idea, but since my bookkeeper is at highest accuracy the job never gets que'd. Anyway to make my bookkeeper update regularly to make this work right?

Not that I've found, but that's mostly because I haven't done enough active-process memory and assembly hacking to determine what exactly the bookkeeper updates.  Instead, in recent DFHack versions (0.40.08-r1 and onward), I've allowed stockflow to accept an option to update once a day instead of waiting for the bookkeeper:

Code: [Select]
stockflow fast
Logged
Quote from: Kevin Wayne, in r.g.r.n
Is a "diety" the being pictured by one of those extremely skinny aboriginal statues?
Pages: [1] 2