Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Merchants endlessly "unloading goods" because one pack camel refuses to unload  (Read 1636 times)

Rafal99

  • Bay Watcher
    • View Profile

Ok so here is the situation:
- first autumn, dwarven caravan came, consisting of 2 wagons, pack horse and pack camel
- wagons entered the map from the north, pack animals for the south
- both wagons and pack horse reached the depot fast and unloaded the goods
- but while the last pack camel was moving to Depot, there was a fight between my dwarves and a wild animal nearby
- I assume the merchant soldier rushed to help the fight, while the camel was scared away, because they got separated somehow
- noone of them actually took part in the combat, there are no reports for them, and they have no wounds
- camel in now prone and slowly moving to depot by itself, while carrying his goods
- camel reaches depot not long after, but never unloads any goods, he keeps carrying them all in "inventory", and he doesn't actually stay in the depot, but occasionally keeps wandering around it
- the attempt to trade at depot gives "sorry, we are still unloading goods" - when running game further it never finishes, not allowing me to trade, and caravan eventually leaves after a month

Ok so obviously this is a bug, and I heard similar situations mentioned before.
Anyone knows any workaround that helps in this situation?

I tried so far:
- hurting/killing the problematic camel - whole caravan leaves afterwards
- dumping the goods from the camel - unfortunately dwarves wont touch them
- building a new Depot, then forbidding the old one - all merchants move to the new depot, but the camel still doesn't unload there
« Last Edit: June 06, 2022, 08:14:48 am by Rafal99 »
Logged
The spinning Tantrum Spiral strikes The Fortress in the meeting hall!
It explodes in gore!
The Fortress has been struck down.

RLS0812

  • Bay Watcher
  • ~ Cancels Everything ~
    • View Profile

Deconstructing the old depot while the merchants are still in it fix the issue ? ( don't forget to use the "unforbid all" command afterwards )
  Placing your curser on the problem and using the DFhack command "exterminate this" may also fix the issue.

 I've personally had bugged-out caravans simply vanish on me before, when a unit has gotten stuck.
« Last Edit: June 06, 2022, 10:39:06 am by RLS0812 »
Logged
Have you experienced the joys of a dwarven tantrum chain yet ?

Rafal99

  • Bay Watcher
    • View Profile

Deconstructing the old depot while the merchants are still in it fix the issue ?

Well they were in it when I did the deconstruction, they all left their items there, except that one camel that kept carrying them on himself.
« Last Edit: June 06, 2022, 11:59:46 am by Rafal99 »
Logged
The spinning Tantrum Spiral strikes The Fortress in the meeting hall!
It explodes in gore!
The Fortress has been struck down.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions

- wagons entered the map from the north, pack animals for the south
Not to derail, but are you sure that's what happened? Because it's been known since older versions that restricting the wagon entrypoint applies to the entire caravan, and it even applies to wagonless traders too. I even checked decompiled code for the caravan arrival function in 0.47.05 and it only selects one entrypoint for both wagons and pack animals.

I have to assume what actually happened is that the liaison entered the map from the south while the caravan entered from the north, since that's definitely a thing that can (and frequently does) happen.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Rafal99

  • Bay Watcher
    • View Profile

- wagons entered the map from the north, pack animals for the south
Not to derail, but are you sure that's what happened?

Actually now that you ask, I don't know.
Wagons definitely came from the north because I saw it. Liason came from north-east.
One pack horse ended in the depot together with the wagons.
But the pack camel and the merchant leading it somehow ended south of depot. It had no other reason to be there, so I assumed it walked from the south.
The depot is outside, at the center of the map, easily accessible from all sides. So I have no idea how the pack camel ended south of the depot (about 20 tiles from it) if it came from the north. Maybe some animal scared it to move there.

I have a save right before the camel and the merchant separate and the camel goes prone.
I am now examining it by writing DFHack lua script, maybe I come with something.
Now while you are here @Quietust, maybe you would know:
What is the meaning, when a unit has several records in unit.actions vector, but all of them with type=None?
« Last Edit: June 07, 2022, 04:48:27 pm by Rafal99 »
Logged
The spinning Tantrum Spiral strikes The Fortress in the meeting hall!
It explodes in gore!
The Fortress has been struck down.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions

What is the meaning, when a unit has several records in unit.actions vector, but all of them with type=None?
Records in unit.actions which are done are kept around for future reuse, because having to allocate/free memory every time the unit takes a step would result in severe performance penalties. A similar thing is done with flows such as miasma and smoke.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Rafal99

  • Bay Watcher
    • View Profile

What is the meaning, when a unit has several records in unit.actions vector, but all of them with type=None?
Records in unit.actions which are done are kept around for future reuse, because having to allocate/free memory every time the unit takes a step would result in severe performance penalties. A similar thing is done with flows such as miasma and smoke.

Oh nice!
I thought these would be moved to/from some global object pool, but this is even better.

I am analyzing the bug, and have some promising results.
All dwarf merchants (and only merchants, not animals) moving to the depot have a single "Talk" action, with reference to "Conversation" activity. But its meaning seems to be not to talk but to go to the depot and unload.
Once they reach the depot, they lose "Talk" action, transfer items to the depot, and go prone (both merchant and following animal), not idea about exact order.
Now if that "Talk" action gets interrupted before they reach the Depot, they go prone too, but the items stay on the animal, and then they don't get another "Talk" action, only "Move" action into the depot, but Move doesn't unload items once they reach the depot.

I will try if it is possible to artically add "Talk" action that could help the situation.

Luckily I have a save just a few frames before the Merchant gets interrupted, and the interruption is preventable by using DFHack-teleport, so it is a good base for some analysis. I can share the save if anyone wants.

« Last Edit: June 07, 2022, 06:55:18 pm by Rafal99 »
Logged
The spinning Tantrum Spiral strikes The Fortress in the meeting hall!
It explodes in gore!
The Fortress has been struck down.

FantasticDorf

  • Bay Watcher
    • View Profile

Hate to steal your thunder, but normally i just make the animal stand up again by force using gui-editor, then they get moving again but i definitely think its somewhat related to what you're talking about.

The front and back of the caravan might be sequenced, each wagon and animal arrives and stands up in the order of which they arrived, leaving the liason for last, but if they arent entering the same direction, the camel or animal in question misses its cue but is still ready to go in a stuck prone position.
« Last Edit: June 09, 2022, 01:55:08 am by FantasticDorf »
Logged

anewaname

  • Bay Watcher
  • The mattock... My choice for problem solving.
    • View Profile

There is a relationship between the merchant and the camel that was broken. They are a combined unit, linked like a wagon is linked to its animals.

Something once observed... an elf merchant was on frozen ocean while their pack animal was on land, the ice thawed and the elf merchant stopped moving. The elf was above the water without falling and the animal was on land. Once a floor was built under the elf, they continued to the depot and unloaded.

Logged
Quote from: dragdeler
There is something to be said about, if the stakes are as high, maybe reconsider your certitudes. One has to be aggressively allistic to feel entitled to be able to trust. But it won't happen to me, my bit doesn't count etc etc... Just saying, after my recent experiences I couldn't trust the public if I wanted to. People got their risk assessment neurons rotten and replaced with game theory. Folks walk around like fat turkeys taunting the world to slaughter them.

Rafal99

  • Bay Watcher
    • View Profile

I managed to figure it out using DFHack gui/gm-editor.
Indeed it was an issue with broken relationship between pack animal and its owner.
I made a DFHack script that restored the missing relationship ids, and then the animal unloaded goods normally.
The script was added to DFHack, and will be available in next version.
Logged
The spinning Tantrum Spiral strikes The Fortress in the meeting hall!
It explodes in gore!
The Fortress has been struck down.

Quarque

  • Bay Watcher
    • View Profile

Well done!
Logged