[0.17.1541] Hauling only enough to fill a stack.

Started by ReZpawner, May 17, 2017, 02:21:28 AM

Previous topic - Next topic

ReZpawner

Right now I have a fridge to stock up with potatoes, however: My colonists refuse to carry full stacks of potatoes.
They see that there's room for 15 potatoes in a prioritised stack, so that's the amount they are going to bring, rather than bringing the entire stack with them.

This isn't just a potatoe-issue, but any item.
While not gamebreaking, it's definitely infuriating.

ison

Could you please upload a savefile where this is happening? Thanks

ReZpawner

#2
Certainly, just gotta wait for summer to roll by again first. You should be easily able to recreate it yourself in the following way though:

(let's just use cooking as a good example here)

1. Set up a storage area with normal priorities for vegetables.
2. Set up a cooking stove in a neighbouring room
3. Make two storage areas next to it, for prioritised food (usually meat and veggies)
4. Start cooking
5. Try hauling from an outside source.

While cooking, the prioritised stockpile zone will slowly be depleted by 5-20 items per craft.
What happens is that they will go to haul, realise that the prioritised stockpile zone can only handle X amount of items, and only haul that. It makes total sense in a game logic kind of way.
What they SHOULD do though, is grab the whole stack, fill up the partial stack in the prioritised stockpile zone, and then drop the remainder off at the normal priority stockpile zone.

Not sure if it makes sense, but I'll upload the save in about 6 months of gametime.

Winter just came. There's white stuff all over the place, and the potatoes don't like it. (ba-dum psh).

For now, here's how it looks: http://i.imgur.com/0KdAuuC.jpg

ison

Okay, thanks. Colonists won't carry more than the available space in the single stockpile they want to carry the item to. It's a little weird but it's not a bug. Thanks for reporting.

Calahan

#4
Edit - Ah, I was 29 seconds too late :)


@ ison - Wasn't this an intentional change for A14. As this has been the behaviour for a while now, and the A14 change log contains the following line.
https://ludeon.com/rimworld/RimWorldGitLogA13toA14.txt
Fix 2426: Pawns haul more than can fit in a stockpile.

What I've noticed from playing is that if there is a stockpile with empty and partially filled tiles, then Pawns will carry a full stack, fill up a partially filled storage tile, and then haul the remaining items to an empty (or other partially filled) storage tile.

Before the above change, even if the entire stockpile could only contain 1 more of an item, Pawns would still haul a full stack of that item to it, fill up the available space, and then drop the remaining items on the ground, outside of the stockpile area. So IIUC, this change was made to prevent that behaviour / scenario.


But what ReZpawner is describing in the above reproduction steps is a setup with two stockpiles set at different priorities, but wants / expects Pawns to treat them as one stockpile. And with this able to "see" that there is, when combined, enough storage space available for said Pawn to haul a full stack of items. So in effect this would return hauling behaviour to how it was before that change I mentioned at the start

FWIW this A14 change to hauling definitely made the game more annoying (IMO), especially in terms of hauling harvested crops in. As since the change, and because I use a lot of differing priorities with by raw food storage, I regular notice Pawns hauling very small amounts of raw food from outside. Whereas before they would always haul the maximum. And from a players perspective it's really frustrating to see a Pawn haul 1 item of rice ~100 tiles across your base. 

So maybe an idea, if it's possible, is to have an "overfill" option on stockpiles. And if ticked it would make stockpiles behave like they did before the A14 change, and allow Pawns to always attempt to haul a full item stack to that stockpile, even if there's only space for 1 more of that item. With the resulting spill over left on the floor like before. This would (partially) address the bug ReZspawner is reporting, and it would reduce the frustration of players (like myself) during harvests, who use a lot of different raw food stockpile priorities.

ison

That's correct.

I'll leave this thread open for Tynan in case he wants to change this behavior, as it can indeed sometimes produce weird results where pawns carry only 1 item.

Maybe we should consider other stockpiles within a 30-cells radius? Not sure.

(relevant code: HaulAIUtility.HaulMaxNumToCellJob())

ReZpawner


Mehni

Quote from: Calahan on May 17, 2017, 04:42:14 AM
So maybe an idea, if it's possible, is to have an "overfill" option on stockpiles. And if ticked it would make stockpiles behave like they did before the A14 change, and allow Pawns to always attempt to haul a full item stack to that stockpile, even if there's only space for 1 more of that item. With the resulting spill over left on the floor like before. This would (partially) address the bug ReZspawner is reporting, and it would reduce the frustration of players (like myself) during harvests, who use a lot of different raw food stockpile priorities.

Just to give a different consideration: If that results in stockpiles overflowing into the doors of the freezer and its contents spoiling, I'll take a pass on that. This already happens fairly often, where I get a notification of rotting meat because somebody left half a stack of potatoes in the door.

Calahan

#8
Quote from: Mehni on May 17, 2017, 07:52:38 AM
Quote from: Calahan on May 17, 2017, 04:42:14 AM
So maybe an idea, if it's possible, is to have an "overfill" option on stockpiles. And if ticked it would make stockpiles behave like they did before the A14 change, and allow Pawns to always attempt to haul a full item stack to that stockpile, even if there's only space for 1 more of that item. With the resulting spill over left on the floor like before. This would (partially) address the bug ReZspawner is reporting, and it would reduce the frustration of players (like myself) during harvests, who use a lot of different raw food stockpile priorities.

Just to give a different consideration: If that results in stockpiles overflowing into the doors of the freezer and its contents spoiling, I'll take a pass on that. This already happens fairly often, where I get a notification of rotting meat because somebody left half a stack of potatoes in the door.
But as a player, you simply wouldn't tick the "overfill" option for stockpiles where that could or would happen. So the player would be responsible for your scenario happening, and not the implementation of an "overfill" option.

And the change for A14 was partly (largely?) to prevent what you are describing from happening. So if you have a game or setup where you can reliably reproduce Pawns leaving thing in doorways during hauling jobs, then please can you post a save file of it so that it can be investigated further.

zandadoum

i reported this almost a year ago in the following post (link)
it was said as being looked at and i kinda forgot about that post but never noticed it actually working as i expected and shove it into "meh, just bad AI" closet...


https://ludeon.com/forums/index.php?topic=22542.msg242381#msg242381

ymc

When a pawn is temporarily carrying more meat from a butcher table than can fit in the stockpile, and your stockpile goes right up to but does not include the door itself, said meat will trail out the door into the hallway with the door wedged open by animal bits. The only solution I've found is to actually intentionally leave some unassigned spaces in my freezer as overflow.

If a pawn is cooking in the freezer (something I do in early games when walls and coolers are uncommon), meals can cause the freezer to fill up quite inefficently and unexpectedly for a pawn already hauling stuff. If you don't use the "drop on floor" option, chefs are absolutely retarded when it comes to stacking. I have had 18 simple meals consuming 7 floor tiles in a very small 5x6 room (missing 3 spots for the stove), no exaggeration. Quite literally, every tile is never more than 5 steps for the chef and they still do it randomly.

Silver. Stupid stack logic happens ALOT with silver and large stockpiles and I can't find the pattern why it's so random. If you sell let's say 2345 worth of goods for 2345 silver, a pawn will first grab 188 (but not from the 345 stack, oh no) from the field to fill up a stockpile stack of 312. Then they'll go and grab a full stack this time of 500 from the field and put 245 of it on a stockpile stack of 255 and make a new stack of 245 somewhere. Then they'll go grab 255 and fill that stack. Then they'll go grab the 312 stack in the field they created to haul 188 the first time and pick up 188 from another full field stack and ... so forth. It's painful to watch.

Pawn stack logic seems to use a smaller radius than collecting a full stack from the field. If they can't find another stack within ... let's say ... 5 steps of the random stockpile tile they choose when they begin the haul job, they seem to just haul it to a new tile, defeating the purpose of them even stacking it in the first place.

Watching them carry a full load, drop 39 of it on 36 and make a new stack of 36 somewhere else randomly in the stockpile, which can actually end up being much farther away than another partial is a little frustrating. If they scanned the whole stockpile and found another partial to fill up, that would be cool, but they do not. Their logic seems to be "can I drop this on another stack in 5 steps or less? No? Ok, pick totally new random spot even if 27 steps away."

Suggestion, and bear with the logic errors I'm probably overlooking because I don't actually know everything they're checking or how their radii currently works. If spread to animals, this could actually allow large animals to efficiently haul ... let's say hay@200 or chemfuel@400. Totally giving the animals too much credit, I know, haha, but QoL.

  • Does product already exist in target stockpile?

    • Yes?

      • Choose random stack.
      • Reserve a stockpile tile as close as possible to chosen stack, but not stack itself.
      • Begin picking.
    • No?
      • Pick a random tile.
      • Begin picking.
  • Is this pile I just picked up a full stack?

    • No?

      • Can I physically carry more?

        • No? Carry on to haul routine
        • Yes?

          • Can I find more within my acceptable radius?

            • No? Carry on to haul routine.
            • Yes? Pick up another pile and recheck if full.
    • Yes? Carry on to haul routine.
  • Is reserved tile still empty?

    • Yes? Continue hauling.
    • No? Drop product now, but WAIT a x amount of ticks for dropped stack to register, and restart process.
  • Am I carrying a full stack?

    • No?

      • Scan for partial stacks near reserved tile.
      • Top up largest number first. Repeat until all full or pawn empty
    • Yes?

      • Don't even bother trying to stack it.
      • Start hauling to reserved tile.

Tynan

The AI could be improved, yes, but as it stands it's not a bug-bug. I believe we have this listed as a known AI derp though.

Thanks for the discussion all.
Tynan Sylvester - @TynanSylvester - Tynan's Blog