Two mules with same settings between same stations finding different needs
Closed this issue · 7 comments
Version 6.32
X4 4.0 H3
Here are the logs for each freighter:
starting log file
sourceStation: Solar Power Plant I
targetStation: Jupiter Warehouse
-----entering make target warehouse block
sourceProductWares: 1
targetProductWares: 0
sourceTradetWares: 0
targetTradeWares: 5
----- main station mule routine
found 3 needs and 1 supplies
sourceStation priority not set, evaluating our own priorities
needs
Silicon Carbide no other criteria met. appended to prio5
Computronic Substrate no other criteria met. appended to prio5
Metallic Microlattice no other criteria met. appended to prio5
-----after main trade logic block
loop: 1
resetting supplies list
resetting needs list
-----after main trade logic block
loop: 2
resetting supplies list
resetting needs list
-----after main trade logic block
loop: 3
resetting needs list
-----after main trade logic block
loop: 4
resetting needs list
starting log file
sourceStation: Solar Power Plant I
targetStation: Jupiter Warehouse
-----entering make target warehouse block
sourceProductWares: 1
targetProductWares: 0
sourceTradetWares: 0
targetTradeWares: 5
----- main station mule routine
found 4 needs and 1 supplies
sourceStation priority not set, evaluating our own priorities
needs
Silicon Carbide no other criteria met. appended to prio5
Energy Cells no other criteria met. appended to prio5
Computronic Substrate no other criteria met. appended to prio5
Metallic Microlattice no other criteria met. appended to prio5
sourceIsWareHouse 0
targetIsWareHouse 1
-----crazy insane logic block checking
cargoHauled 68000
allowLowVol 0
this.ship.cargo.{$supplyTarget.ware}.max / 1.25 54400
targetAmount 302876
supplyTarget owner class station
$supplyTarget.owner.cargo.{$supplyTarget.ware}.target 600000
moving 68000 Energy Cells from Solar Power Plant I to Jupiter Warehouse
-----after main trade logic block
loop: 1
resetting supplies list
resetting needs list
-----after main trade logic block
loop: 2
resetting supplies list
resetting needs list
-----after main trade logic block
loop: 3
resetting needs list
-----after main trade logic block
loop: 4
resetting needs list
One is an Okinawa, the other is a Baldric. They have the same blacklists, and started with an empty cargo hold. The Okinawa was the one that started trade.
It seemed to me that there was a quirk with
<find_buy_offer tradepartner="this.ship" buyer="$targetStation" result="$needs" excludeempty="false" multiple="true">
<match_buyer>
<match_gate_distance object="$sourceStation" min="0">
</match_gate_distance>
</match_buyer>
</find_buy_offer>
at line 244 of station_mule.xml
But I don't know why it's giving different needs
I can get the mule to operate if I uncheck assign ship to station
the extra need is energy cells and the station mule has a specific checkbox to allow them
I have it enabled for both. They only trade when they are not a subordinate. I tried other stations and wares as well, and they got stuck searching for trades while a subordinate, but perform fine when they were not assigned.
fwiw my entire empire is practically supplied by a combination of station mules assigned as subordinates and supply mules assigned as subordinates. The station mules have been working fine for about the last 24 hours of the save.
The only thing I can think of at the moment is that the Okinawa's trade reservation is causing something wonky with trade offers and budgets, that doesn't apply when you don't assign as subordinate because the mule is using your primary credit account.
Yeah I had them as subordinates for 2 days and they were fine. Sometimes the station mules just stop working and only removing assignment gets them going again.
Boy its fun fighting EgoSoft magic code
If the bug can't be reproduced feel free to close the issue.