Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stockpile priority stacking [minor][lowPriority] #151

Open
RyTechro opened this issue Feb 10, 2019 · 1 comment
Open

Stockpile priority stacking [minor][lowPriority] #151

RyTechro opened this issue Feb 10, 2019 · 1 comment
Labels

Comments

@RyTechro
Copy link
Contributor

RyTechro commented Feb 10, 2019

Expected behavior

When delivering an item to a large stockpile it should favor the an existing pile of that same type

Actual behavior

It clutters the stockpile, see image

image

@kd7uiy kd7uiy added the bug label Feb 10, 2019
@koosemose
Copy link
Contributor

This relates to my response in #154 as ultimately they have the same root cause, so see the response there for additional details, as I wrote it first. But I will attempt to go over the relevent portions here.

The game has no concept of "big stockpile", what you have there is simply a collection of stockpiles. So each stockpile issues a job saying "I want Y number of X items" (if empty it basically asks for any item). So a crew takes the first of those job on the list (assuming no other types of jobs for simplicity sake), picks it up and delivers it. Then looks for another job, this will most likely be from a different stockpile, so it will go get something for that one. A crew will try to pick up as many items as possible, so if there's enough to fill up a stockpile, all will be fine, but if you've got something generating a few at a time, then you will end up with a scattered mess.

What we need is the concept of a big stockpile, or as they've been referred to in the past a metastockpile. A group of attached stockpiles should actually link together through some process, and be able to say something like "I can accept all these items in such and such amounts, and some number of any items", and then when the crew is returning with an item be able to ask where to put it (or perhaps be able to ask for a list of possible places to put it, so if you end up with two partial piles, due to crew using items from stacks, they can deliver it to the closest), and similarly be able to ask for a list of items in stockpiles of a certain type and get locations for multiple (or somehow be able to get the closest).

Of course, similarly crew probably shouldn't try to pick up absolutely every item when getting stuff for a stockpile but rather choose a target, get as many as they can in an area deemed "close", then return, as is, if there is 49 at the top of the map and 49 at the bottom, they will go to one, get 49, go to the other and pick up 1 (to give them a full stack of 50, assuming 50 is what the stockpile is asking for), and then deliver, then go back for the remaining 48 (this ignores multiple crew, that gets more complicated and depends on when exactly each ends up looking for a job). Of course the optimal thing would be to go get 49, deliver it, and then get the other 49... Of course this relates about as much to the Hauling task rather than stockpiles themselves, but these would tie together somewhat because stockpiles able to work together would be issuing jobs differently, and could help make this more effective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants