Caravan formation problems while unloading and forming caravan simultaneously

Started by Anbalsilfer, December 17, 2016, 12:23:39 PM

Previous topic - Next topic

Anbalsilfer

[Alpha 16 unstable build]

Someone else already brought up the chaos that ensues when you try to prepare a caravan with just a single pawn but a lot of goods, causing animals and the pawns in question to starve themselves and/or eventually collapse from exhaustion because the caravan preparation is simply taking too long (and all assigned caravan pawns and animals ignore all other activities during the preparation).

I just noticed another problem that is exacerbating the problem: namely, your haulers. You'd think during caravan preparation they'd be nice chaps and actually help load your muffalo, right? Well, wrong. They do the exact opposite, instead unloading stuff from the pack muffalo your diligent caravaneer is trying to load, bringing everything back to their stockpiles.

I seems like a good way to fix both these issues, although I've no idea how hard it would be to implement, would be to make the game consider the pack animal itself a stockpile for the items it should carry, of even higher priority than "critical". That way haulers would actually help caravaneers to load the pack animals instead of undermining their efforts.

Another thing I noticed is that it can make a huge difference in preparation time where your pack animal decides to park itself for loading during preparation. If your muffalo decides to park right in your stockpile preparation will be done in no time, whereas if stops on the other side of your colony, your caravan will be doomed before it even has a chance to depart because loading will take forever. A workaround for this would of course be to simply move your stockpile to the muffalo, but it seems like a better solution would be to let the player designate a pack animal loading spot, in the same way we can currently designate a marriage or party spot.

Illusion Distort

The muffalos could be forced to follow the colonists leaving with the caravan, that way the muffalos will always be within a certain range of someone to prepare them for the caravan. (optimization needed)

ison

If I understood correctly the bug is: after entering a map with one of your caravans, if you immediately try to form a new caravan colonists will try to unload items from the muffalos and load new ones at the same time. We should check the Pawn_InventoryTracker.unloadEverything (I don't remember the exact name) field, and if it's true then just do not load new items.

Anbalsilfer

No, this happened when I tried to send out my second trading caravan from my starting location. The first caravan I sent out seemed to work OK, at least I didn't notice any haulers unloading the muffalo while the caravan leader was trying to pack them, but on the second try I noticed haulers removing stuff from the muffalo even as the caravan pawn was loading it. It's possible the problem only occurs when trying to send out a second caravan after a first one has successfully returned from trading.

Is there a flag that is set when a trading caravan returns to cause haulers to help with unloading the pack animals, maybe? If so the problem might be that this flag is not cleared properly once unloading is done, causing haulers to keep unloading while another caravan is being prepared.

Anbalsilfer

I think I might have figured out what causes this (problem is still present in the final Alpha 16 release). The bug seems to be triggered by the player manually dumping gear brought back by a caravan from the pack animals. In other words, the precise steps to reproduce are:


  • Send out a trading caravan, wait for it to complete and come back
  • When the pack animals arrive, instead of letting your haulers unload them, unload them manually by clicking the animals, choosing the "Gear" tab and pressing the drop button on everything they carry, thus dumping it on the ground.
  • Put together another trading caravan with pack animals, with enough items to require the animals. Make sure not all active haulers are assigned to the caravan.
  • Watch as your caravan leaders attempt to load the pack animals while the haulers simultaneously try to unload them.

Apparently there is some sort of "unload pack animals" flag that is set on your haulers when a caravan returns to the base, and is cleared when the pack animals are empty. This doesn't happen if the player gets impatient and simply dumps everything from the pack animals manually, however, causing the haulers to enter a faulty state where they will try to unload any pack animal with items, even during preparation of another caravan.

Tynan

Tynan Sylvester - @TynanSylvester - Tynan's Blog

ison