Bay 12 Games Forum

Please login or register.

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

Author Topic: The Quantum Stockpile  (Read 4615 times)

LeoLeonardoIII

  • Bay Watcher
  • Plump Helmet McWhiskey
    • View Profile
The Quantum Stockpile
« on: June 24, 2008, 06:33:56 pm »

I decided to try pushing the limits of the quantum stockpile on my next fortress. Here are my results.

The stockpile trick, in case you don't know, is to place your only dump activity zone in one tile, and put a stockpile square under that. Usually I have a stone stockpile, which means anything I dump does to the dump zone but when I unforbid it the dwarves automatically haul off the non-stone items to their respective stockpiles throughout my fortress. This time, I made the quantum stockpile accept all items except rottable ones. This way, nothing would be re-stocked from the quantum stockpile.

First, I quickly realized it involves more micromanagement. I decided to cheat a little and make a booze stockpile and a food stockpile, and next to my farm I put a seed stockpile allowing zero barrels. This made my life a lot easier. (I set my food stockpiles to Take From the quantum stockpile, just so it would move them away and into the food stockpiles).

Second, I noticed that workshops had nowhere to put their produce. I just periodically rounded on all the workshops with T and dumped all their items. Masterwork furniture didn't get dumped, instead I would immediately go build it somewhere.

Third, because my single stockpile square was 6 tiles from my depot, I could send everything there really fast and bring things in really fast as well. Of note was that items left in the depot after trading were not brought back in unless I marked them for dumping, but they were ejected and left zero distance from it. Which meant when I traded next I didn't have to haul the same goods back out.
(I sold off all my non-masterwork furniture as time went on, since it was just sitting on the depot ready to go anyway)

Fourth, dwarves did not do the entrance dance, because they had nowhere to put things. Only if I marked objects outside for dumping did they try to bring them in. Theoretically I'd need to watch out for slain traders dropping food/booze/seeds, because I do have those stockpiles, but it hasn't happened yet. My traders on this fort enter within one screen of my fort entrance and the invaders tend to enter from much farther away (lucky me).

Fifth, when I chop wood I need to dump it to get dwarves to go get it. Again, this works for me because I don't get dwarves entrance-dancing for lumber. But you might get a little irritated by it.

Sixth, my production went through the roof. I realized that my dwarves who were grabbing materials were always running to my quantum stockpile, and when a hauler cloud cleared out a workshop they didn't have to go very far at all to drop it off.

Seven. You need to Designate->Claim your stockpile frequently.

Eight. I never run out of food or booze stockpile space. If I don't have enough room in the food stockpile for example, the haulers dump plump helmets and prepared meals into the quantum stockpile and then have nowhere to move it to. But they're still in a Food stockpile. The dwarves don't appear to dump food into barrels, though when it gets moved into the food stockpile they of course do put them into barrels. This might cause degradation because the exposed food is stepped on a lot. I haven't paid attention to that.
But if it bothers you, just dump a bunch of your full barrels from your food stockpile. They'll be tossed in the quantum stockpile, leaving space for new food to be put into the food stockpile. Dwarves come and put down a barrel in the empty space in the food stockpile, fill it with food, and get another barrel. The next time you Designate->Claim on the quantum stockpile, the food barrels you moved into it become available again.


My conclusion: It's a cheap way to get around the game rules. And it involves more micromanagement of your workshops. But it allows you to loot selectively, trade easily, and it quashes the entrance dance. It also gives a significant productivity boost.

---


My current fort has 14 or so skilled workers who have all hauling turned off, and they are the only ones who get beds in the communal bedroom. All the other dwarven haulers have Plant Gathering, Fishing, Architecture (roads), and Woodcutting turned on. They bring in all the dangerous-to-get items and if some die, it's okay because I haven't worked their skills to legendary. Occasionally one will get a mood and become a legendary crafter or something, and I bring him in and give him a bed.

Unfortunately, you need to keep dumping things to keep these outside dwarves busy, or they just stand around making friends. But my population stays down because goblins are starting to attack now and I tend to lose a couple haulers every time. But these haulers, because of their multiple skills, tend to be fairly strong and agile. They also all carry axes because they have Woodcutting turned on.

I back this up with traps. I don't have a military, but I do have a few separate squads standing around in locked rooms dying of thirst. Too many dwarves? Nah, I needed the skulls anyway.
Logged
The Expedition Map
Basement Stuck
Treebanned
Haunter of Birthday Cakes, Bearded Hamburger, Intensely Off-Topic

Narushima

  • Bay Watcher
    • View Profile
Re: The Quantum Stockpile
« Reply #1 on: June 24, 2008, 06:54:45 pm »

Isn't it easier to just arrange stockpile in a practical way than to have to dump every single thing you create or obtain, really ?

LeoLeonardoIII

  • Bay Watcher
  • Plump Helmet McWhiskey
    • View Profile
Re: The Quantum Stockpile
« Reply #2 on: June 24, 2008, 07:03:34 pm »

I have 12,000 stones and 2,000 other items in my stockpile right now. I could arrange a 25x25 stockpile across 20 z-levels, sure. But I decided to try doing it with just one. And it works pretty well. But like I said, it is a little more work.
Logged
The Expedition Map
Basement Stuck
Treebanned
Haunter of Birthday Cakes, Bearded Hamburger, Intensely Off-Topic

Narushima

  • Bay Watcher
    • View Profile
Re: The Quantum Stockpile
« Reply #3 on: June 24, 2008, 08:41:35 pm »

Well, you do as you wish, and I do the same for stone, but other items, I think it's better to have them always near where they're needed, like in workshops, farm plots, soldiers, etc...

Doppel

  • Bay Watcher
    • View Profile
Re: The Quantum Stockpile
« Reply #4 on: June 24, 2008, 08:44:37 pm »

I'm sorry but, i once decided to dump a 1000 mechanisms near a trade depot, and i'm still recovering. Its still way to much work for way to little production gain. Just making tons of bins and barrels and bags is good enough for me. About stone, i just keep it lying about and make crafts workshops everywhere, who needs stone anyways?
Logged
Doppel has been ecstatic lately. He took joy in playing DF lately. He slept on a rough cave keyboard recently.
He is a member of the Dwarf Fortress Forums.
Doppel likes the color Dark Blue, cats for their aloofness and girls for their silky soft brea beards.
He appreciates art and natural beauty.

Narushima

  • Bay Watcher
    • View Profile
Re: The Quantum Stockpile
« Reply #5 on: June 24, 2008, 11:01:13 pm »

I personally  don't like it at all when there are boulders everywhere, so that's the only thing I take time to manually dump. It's a blessing that next version will allow (d)esignation of dumping !

BurnedToast

  • Bay Watcher
  • Personal Text
    • View Profile
Re: The Quantum Stockpile
« Reply #6 on: June 24, 2008, 11:34:04 pm »

If you don't mind cheating it's a good idea, if a bit annoying.

I just worry about overflowing a variable or array or something somewhere and bringing the whole universe to a screeching halt. Probably not a problem, I suppose, but it would kind of stink.
Logged
An ambush! curse all friends of nature!

Quift

  • Bay Watcher
    • View Profile
Re: The Quantum Stockpile
« Reply #7 on: June 25, 2008, 05:27:38 am »

interesting. I imagine tat it would give an enormous production boost not to mention how much if should facilitate the layour of teh fortress.
might try this sometime.
Logged

loser

  • Bay Watcher
    • View Profile
Re: The Quantum Stockpile
« Reply #8 on: June 25, 2008, 10:08:25 am »

If you don't mind cheating it's a good idea, if a bit annoying.

I just worry about overflowing a variable or array or something somewhere and bringing the whole universe to a screeching halt. Probably not a problem, I suppose, but it would kind of stink.
Toady has talked about how much memory each tile takes up.  Based on what he has said and the game's footprint, there wouldn't be room for such a massive array for each tile.

Goblins retain their location when captured.  We know this because there is currently or was recently a bug where exposing a goblin cage to magma resulted in the goblin remains showing up where the goblin was captured. 

That is, the goblin data structure still identified itself with the coordinates it last held in the gameworld, but is out of the gameworld while in the cage.  When the cage is opened normally a function must run that sets the goblin's coordinates to the coordinates of the cage.  This function was not being run when the cage burned.

(It is also possible that a function is run on objects when they are placed in a cage that allows them to match the cage coordinates later if the cage is deconstructed, but this function was not being run by the traps.  The result is the same for the purposes of my point.)

So it seems that contained items behave as though they are in a linked list and items keep track of their own coordinates.  If this is true then when you look at a tile the game composes a list of all in-gameworld objects that have three-axis coordinates that match that tile.

It's possible that the list of objects with the given coordinates is composed in an array at the point of display.  But the fact that we can see this list easily vary between 1 and 10,000 objects argues that it is a dynamically allocated data structure of some sort.

Of course, I could be wrong.
Logged
ΘπÆ┼
What are you doing in my home?
It's a difficult question to answer.

iskurthi

  • Bay Watcher
    • View Profile
Re: The Quantum Stockpile
« Reply #9 on: June 25, 2008, 10:18:40 am »

Goblins retain their location when captured.  We know this because there is currently or was recently a bug where exposing a goblin cage to magma resulted in the goblin remains showing up where the goblin was captured.

That one royally confused me. I mean, there I am, executing caged goblins in the magma chamber and... and... where is that smoke coming from? How is there fire there?! That's on the other side of the-- OH ARMOK EVERYTHING IS ON FIRE
Logged

LeoLeonardoIII

  • Bay Watcher
  • Plump Helmet McWhiskey
    • View Profile
Re: The Quantum Stockpile
« Reply #10 on: June 25, 2008, 10:43:09 am »

there wouldn't be room for such a massive array for each tile.

Well I'm doing it. I haven't actually counted how many items are in the pile. But I know that almost everything I have is in it, minus what little is in each of six or so workshops. And I'm not doing room-mining yet, just strips to find my cave river and magma, which I caught pretty quickly. And as I said, I've been keeping my haulers busy by moving stone up from the mines, so they're pretty well clear right now. That means if I look at my stocks and I see 12,900 stones I can be pretty sure at least 12,000 of that is in my quantum stockpile.

Oh. I haven't considered that I might be losing items to an overflowing array. But I'm steadily growing my food supply on the stocks menu, and new items are being dropped in and still exist. So if it is losing items, it'd be the first ones I put in, right? Not just random ones?

Oh and I have a special treasure room with constructed gold walls and floor, that I use to store artifact-quality goodies. Constructible ones, I build, of course, but other artifacts get their own whole tile each.

All two of them :/
I need to mine more.
Logged
The Expedition Map
Basement Stuck
Treebanned
Haunter of Birthday Cakes, Bearded Hamburger, Intensely Off-Topic

Sergius

  • Bay Watcher
    • View Profile
Re: The Quantum Stockpile
« Reply #11 on: June 25, 2008, 11:14:58 am »

I don't know if this sounds too obsessive, but I like to create one quantum stockpile for each type of rock, and place it right next to a mason (not all stockpiles need to be in the same room but it helps), that way if I want "obsidian statues" I can just forbid all the other piles.

What I do, is zone a tile for Garbage, then go to the stock screen and look for whatever stone is at the top, then just hold DOWN and tap D constantly until I get them all. Then I do the same with the next kind of rock, I zone a different tile, etc. I normally don't do this until I got at least 20 dwarves or so.

EDIT: Oh yeah, for actual goods, I just prefer to use regular stockpiles and let them use them freely and I only step in when I notice a problem (stockpile gets full). It helps with the work-flow. I only really dump stone and wood, because it's bulky as hell. Sometimes I dump furniture but that's usually temporary to move it out of the way before I decide what to do with it.
« Last Edit: June 25, 2008, 11:20:19 am by Sergius »
Logged

Derakon

  • Bay Watcher
    • View Profile
Re: The Quantum Stockpile
« Reply #12 on: June 25, 2008, 12:14:11 pm »

I would hope that Toady didn't use a fixed-size array to store items in grids. Assuming it's dynamically-allocated memory (e.g. using a linked list), you shouldn't lose items. However, finding the items might take a very long time, depending on how he's implemented things.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

Narushima

  • Bay Watcher
    • View Profile
Re: The Quantum Stockpile
« Reply #13 on: June 25, 2008, 02:32:28 pm »

I don't know if this sounds too obsessive, but I like to create one quantum stockpile for each type of rock, and place it right next to a mason (not all stockpiles need to be in the same room but it helps), that way if I want "obsidian statues" I can just forbid all the other piles.
That sounds like a good idea to me. I'll try in my next fortress, I think. It's not too much hassle and it looks quite practical.

Skanky

  • Bay Watcher
  • I'm building a wagon!
    • View Profile
Re: The Quantum Stockpile
« Reply #14 on: June 25, 2008, 06:57:25 pm »

I tried that, but found it was too difficult clearing out all the rock from my recent excavations if I had to wait for all currently dumped rocks to finish being dumped and then change over to another type of rock to be dumped. I make custom stockpiles above / below workshops and have locked doors if I require a certain type of rock to be used.
Logged
"Quickly now, the goblins are more devious these days." - Captain Mayday
Pages: [1] 2