Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Quartermaster feature  (Read 1777 times)

Farmerbob

  • Bay Watcher
    • View Profile
Quartermaster feature
« on: August 12, 2011, 02:00:57 am »

Since Bookkeepers are pretty much one-shot and forget jobs, why not give bookkeepers the duty of quartermastering as well?

Build a Quartermaster's Records building (1x1) which your quartermaster would use to calculate and then record where the closest 10, 100, 200, 300, 400 rocks are from that building, depending on the bookkeeper's precision level.  They then write the location of these rocks on the building.

When dwarves need rocks, they go to the closest Quartermaster's records, then scratch out the nearest rock and go get that rock.  When the last rock is scratched out, a new job is created for the bookkeeper to come and build a new rock inventory.

I know precalculated pathing has been discussed before, but I'm not sure if it's been suggested in this way.  Incremental, in chunks, poerformed by a noble who otherwise has no job after the first couple months into a fort.
Logged
How did I miss the existence of this thread?
(Don't attempt to answer that.  Down that path lies ... well I was going to say madness but you all run towards madness as if it was made from chocolate and puppies.  Just forget I said anything.)

IT 000

  • Bay Watcher
  • Strange Mood
    • View Profile
Re: Quartermaster feature
« Reply #1 on: August 12, 2011, 06:30:14 am »

Seems rather tedious, and could easily bottleneck when more then one dwarf needs a rock. What happens then?
Logged

***CORROSION v2.14***
<<<More Than Just Zombies>>>
Back from the Dead!

Jadael

  • Bay Watcher
    • View Profile
Re: Quartermaster feature
« Reply #2 on: August 12, 2011, 07:29:12 pm »

I assume when multiple dwarfs need rocks, each one simply takes the next one on the list? THe noble wouldn't only look for and write down one rock at a time.
Logged
~ T

Farmerbob

  • Bay Watcher
    • View Profile
Re: Quartermaster feature
« Reply #3 on: August 12, 2011, 09:47:42 pm »

Exactly, Jadael

You build your craft shop or mason shop and start making things, then notice that the crafter is running 74 z levels down to get a rock when there are rocks 3 tiles away where you just mined out a wall.  So you build a Quartermaster Record facility 1x1 near the shop and set it for medium precision.  Your bookkeeper drops by a little while later and sets up shop, then builds a small lookup database for dwarves to use for determining what rocks are closest to the Quartermaster Record facility.

In order to simplify the lookup process and make sure your dwarves use it, you could link workshops to Quartermaster Records similarly to how stockpiles can be linked?

This would have the effect of creating a little order out of chaos, without needing to completely itemize the entire rock database of an entire fort with pathing data.  In fact after the bookkeeper determines what rocks are closest, there would be no need to keep that pathing data either, it's held inherently as the fastest pathing due to having been chosen based on proximity.

A couple hundred rocks at a time, and the bookkeeper refreshes it occasionally.  If the bookkeeper falls behind, dwarves revert to old gathering behavior.

Any hole-pokers out there want to help me by criticizing this and pointing out any weaknesses?
Logged
How did I miss the existence of this thread?
(Don't attempt to answer that.  Down that path lies ... well I was going to say madness but you all run towards madness as if it was made from chocolate and puppies.  Just forget I said anything.)

peskyninja

  • Bay Watcher
  • Natural de-selector
    • View Profile
Re: Quartermaster feature
« Reply #4 on: August 13, 2011, 09:12:19 am »

wow nice idea
« Last Edit: August 14, 2011, 07:25:36 am by peskyninja »
Logged
Burn the land and boil the sea. You can't take the sky from me

Thou son of a b*tch wilt not ever make subjects of Christian sons; we have no fear of your army, by land and by sea we will battle with thee, f**k thy mother.

IT 000

  • Bay Watcher
  • Strange Mood
    • View Profile
Re: Quartermaster feature
« Reply #5 on: August 13, 2011, 09:27:28 am »

Linking a stockpile to a workshop seems like a very useful idea and I wholeheartedly support. However since this job is taking place in another workshop. Wouldn't the dwarf have 2 jobs? (isn't possible currently) I like the idea of the bookkeeper being involved, but perhaps just a 'link to workshop' option in the stockpile options when you get a manager or somesuch.
Logged

***CORROSION v2.14***
<<<More Than Just Zombies>>>
Back from the Dead!

Agorp Stronden

  • Bay Watcher
  • Dead by Dawn
    • View Profile
Re: Quartermaster feature
« Reply #6 on: August 13, 2011, 09:30:57 am »

Truthfully, I find that a custom stockpile does wonders. Just designate a stockpile of a certain stone that you want the mason to use(replace material and job for what you need) in a line surrounding his shop. The dwarf should choose one of those stones. If you want to craft using a different stone, just dump the stones in the pile away and set a new stone to be stocked in the settings of the stockpile. Forbidding items has great potential ass well remember, though most designations need to be streamlined in some way. DF requires too much time in menus.
Logged

Dae

  • Bay Watcher
    • View Profile
Re: Quartermaster feature
« Reply #7 on: August 13, 2011, 09:56:38 am »

The only bad thing I can think of is the fact that dwarf would have to physically consult the records, resulting in a lot of time spent from whenever they were to where the records are. Remove that and let dwarf telepathically consult them the same way they consult job orders, and you have my approval.
Also, yes, linking a workshop to a specific stockpile has been mentionned a LOT of times. I think I remember it being on the Eternal Suggestion thread at some point.
Logged

peskyninja

  • Bay Watcher
  • Natural de-selector
    • View Profile
Re: Quartermaster feature
« Reply #8 on: August 14, 2011, 07:39:42 am »

The only bad thing I can think of is the fact that dwarf would have to physically consult the records, resulting in a lot of time spent from whenever they were to where the records are. Remove that and let dwarf telepathically consult them the same way they consult job orders, and you have my approval.
Also, yes, linking a workshop to a specific stockpile has been mentionned a LOT of times. I think I remember it being on the Eternal Suggestion thread at some point.
They don't use their minds they use their beards,that's why babys who haven't learned to speak have mustaches.
Logged
Burn the land and boil the sea. You can't take the sky from me

Thou son of a b*tch wilt not ever make subjects of Christian sons; we have no fear of your army, by land and by sea we will battle with thee, f**k thy mother.

Starver

  • Bay Watcher
    • View Profile
Re: Quartermaster feature
« Reply #9 on: August 14, 2011, 08:30:00 am »

I like the idea of quartermaster, but perhaps more as "head of stores".  The 'store' is like a more complex (and densely stacked) stockpile, needs a valid quartermaster in attendance to get anything out of.  (Also, there should be a mechanism to actually add contiguous tiles (even across Z-levels?) to zones/stockpiles/whatever-is-used, otherwise when the stores are extended it'll be a mess of deallocating the current area and re-allocating the extra space, or making an additional storeroom on the periphery.)  Noting that this is more for in-game storyline purposes than meta-game usefulness, much the same can be achieved anyway, if you really want to, without the pesky "needing someone there to unpack the thing" aspect.

We did have the Quartermaster, briefly (and of course aptly), as part of the military supplies situation.  Personally I under-used the role in those forts and things seemed to go swimmingly without one, although maybe I didn't understand the purpose of that noble's inclusion or how I could have made things better had I actually made one.  Anyway, the existence of one evaporated and I'm not sure if it's because the mechanism didn't work correctly or that it wasn't a necessary bit of flavour and got removed as part of the military overhaul.  I'm sure Toady will have said, but I don't think I've seen any relevant Words Of God on the subject.


As far as the original suggestion is concerned, if the "writing down everything that can be accessed" bit is actually meant to mean pre-store paths, then with the dynamism of fortresses (new tunnels, doors locked and unlocked, actual opening and closing barriers/bridges, removal of existing pathways through deconstruction or channelling through, etc...) it would be out of date or needing recalculation quite quickly in most fortresses.  One way or another, I'm sure it wouldn't help path calculation speed for a significant proportion of material requests, given the overhead.


If the writing is metaphorical, isn't this just adding the "go to the quartermaster" job to the start of any normal haulage job?
Logged

peskyninja

  • Bay Watcher
  • Natural de-selector
    • View Profile
Re: Quartermaster feature
« Reply #10 on: August 14, 2011, 03:08:58 pm »

I like the idea of quartermaster, but perhaps more as "head of stores".  The 'store' is like a more complex (and densely stacked) stockpile, needs a valid quartermaster in attendance to get anything out of.  (Also, there should be a mechanism to actually add contiguous tiles (even across Z-levels?) to zones/stockpiles/whatever-is-used, otherwise when the stores are extended it'll be a mess of deallocating the current area and re-allocating the extra space, or making an additional storeroom on the periphery.)  Noting that this is more for in-game storyline purposes than meta-game usefulness, much the same can be achieved anyway, if you really want to, without the pesky "needing someone there to unpack the thing" aspect.
I suppose that we will be able to asign mutiple quartermasters?(to avoid total chaos and fun involving breaks and parties)
Logged
Burn the land and boil the sea. You can't take the sky from me

Thou son of a b*tch wilt not ever make subjects of Christian sons; we have no fear of your army, by land and by sea we will battle with thee, f**k thy mother.

Farmerbob

  • Bay Watcher
    • View Profile
Re: Quartermaster feature
« Reply #11 on: August 14, 2011, 10:29:34 pm »

Starver, the actual implementation could be done any number of ways, but if you boil it down, basically I think the Bookkeper should have a job to do that is a continuous job in most forts.  Keeping up with masses of stone.

As the simplest-possible implementation I can imagive, with little to no flavor at all, you could simply add a feature to each stone-using workshop so you could tick off the option for the bookkeeper to organize shortest path calculations for the nearest <x> rocks to a workshop (or rock stockpile).  Something like designating what you want to grow in a farm.

You don't have to keep the pathing calculations in memory.  Having precalculated them, if you direct the dwarves to get a stone from a certain tile, they will know to path to that tile when that specific rock comes up in the list.  Dwarves already path relatively decently when they are told exactly what to do, it's when they choose for themselves with current algorithms that they will travel 74 z levels down, 47 south, 13 up, and 44 north to pick up a rock when there's a stockpile six tiles away.

In order to keep track of how fortress changes impact pathing, you might store one piece of additional data.  Path length.  Give location and path length for rocks, and when a dwarf consults the table and creates his path, if the path he creates is more than 20% longer than the path length recorded, the dwarf does a simple sort and puts the stone at the proper location in the lookup list based on the current path distance.  Any dwarf should be able to scribble "New Wall.  This rock now 44 distant, not 21" and move it down the list, then choose the next closest rock on the list.  The bookkeeper would create the list, and periodically add to it, but every hauler can scribble edits onto it, which should probably be a no-gainer skill like assembling constructions or you would have a fortress full of bookkeeper haulers in a short while :)

If you set a stockpile as the basis for the quartermaster's calculations, then obviously that stockpile itself should be ignored for purposes of rock collection, or you would waste a LOT of CPU cycles calculating to move rocks around inside stockpiles, which would be a pain.  Workshops should look to stockpiles as possible sources, passively.  If the stockpile is closer than rocks, any quartermaster work would actually be calculated from the stockpile instead, by cascade, that way you don't build multiple redundant lists of data.

It might sound messy being described in detail, but in it's crudest form, it's really just a real-path-distance-sorted list, with the origin either at the point of use, or at the closest stockpile, if there is an appropriate stockpile closer than appropriate stone.  I think adding a little flavor to it would be good, but it can operate in crude form too.

Only one dwarf to do the basic job of quartermastering.  Parties are designed to interrupt fort operations and force you to create organically survivable forts :)  If the quartermaster isn't doing their job, the dwarves just revert to normal behavior.
Logged
How did I miss the existence of this thread?
(Don't attempt to answer that.  Down that path lies ... well I was going to say madness but you all run towards madness as if it was made from chocolate and puppies.  Just forget I said anything.)

Starver

  • Bay Watcher
    • View Profile
Re: Quartermaster feature
« Reply #12 on: August 15, 2011, 03:15:25 am »

I'm liking the original idea less (and not too fond of my own variation, to be honest).  Not because I don't think some of the mechanics of what you say has merit, but just trying to find the Bookkeeper something to do isn't, IMO, the way to deal with this.  Nor are the improvements you mention the best way to handle the seemingly redundant noble.

It is indeed an issue that pathing needs improvement (witness the number of threads already on that subject, albeit that the three or so in which I've been personally involved aren't currently active).  I'm not sure if you intend this to be a "stone only" checklist, but if it is useful then it would be useful for everything.  Already the engine "scratches off" the availability of any rock/otheritem being wanted for work[1].

I currently keep my bookkeeper as my trader (unless someone in an early migration turns up with skills for that position superior to where the bookkeeper/trader has reached by that point, which has happened once in my whole .31 playing history) and manager (likewise, but with nobody yet substituting) and mayor (by dint of his starting social skills, and I've never had any of mine unelected and replaced), so there's a good chance my official bookkeeper is busy most of the time anyway, and when he hasn't got any bookkeeping/trading/mayoring to do he (typically) gets to become a legendary stonecrafter to keep him busy.


Perhaps if book accuracy "rusted", then the bookkeeper could be kept busier.  And if the bookkeeper was lost to some accident or other (or 'accident' or other, but I tend to make sure my proto-mayors are easily satisfied before embark) then the replacement, starting from the ground up (or near to it) would have some work cut out to gain skills fast enough to counteract the accelerating loss of book accuracy in time to not have to essentially start all over again.  That might be the solution to "what work to give the bookkeeper?" question.

The other things you mention have validity, but (totally IMO, and there's no reason to suggest that I Am One With The [DF|Player] Universe) you have better questions for the answer you have and there are better answers to the questions you give.  IYSWIM.

And, I repeat, IMO.


[1] A lot of people would actually prefer that "any orthoclase rock" or "any rock at all" or "any masterwork bed" or "any no-quality mechanism" or "any good-quality iron door" could be specified at build (much as per military equipping menus, with a little extra fussing), rather than a particular specific one which may end up either sitting around blocking while other jobs are done or turn out to be one of the least-handy items to go and when the job does get done.  (Not to mention "item misplaced", when it is moved from where it was put by some non-dwarf means or other.)  Imagine being able to specify wall building by stone type and then setting up and having hauled the stones closer to the plot even while the first few walls are being put up, rather than having to populate the stockpile with mass labour then define the walls with as many nearby stones as you can manage, rinsing and repeating as more become available.
Logged