7.60 BUG: $station.buildstorage.wanted money ignores money owed for ware transfers - modded game

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

irilis
Posts: 7
Joined: Sun, 15. Dec 24, 08:20

7.60 BUG: $station.buildstorage.wanted money ignores money owed for ware transfers - modded game

Post by irilis »

7.60
With mods (bug is revealed by the mod and is only relevant to the mod, so I can't reproduce it in an unmodified game).
Unlimited sandbox game start.

I have a mod that automatically transfers money to/from buildstorages of my stations. Basically it transfers $station.buildstorage.wantedmoney - $station.buildstorage.money from player to buildstorage (negative difference is transferred back to player, obviously). Noticed that sometimes, if money transfer happens while there's an L ship docked to the buildstorage and that ship has brought last wares requested by that buildstorage, script transfers money from buildstorage to player that are needed to pay for wares being bought, resulting in trade amount being lowered mid-transaction and me waiting for another ship to deliver whatever wares were left unbought.

My best guess is that while L ship is executing a trade, $station.buildstorage.wantedmoney does not include money owed for wares that were already transferred but not yet paid for. In other words, $station.buildstorage.wantedmoney gets lowered before $station.buildstorage.money, and that gap in timing is visible from md scripts long enough for my station builds to get delayed multiple times in a few hours.
Alan Phipps
Moderator (English)
Moderator (English)
Posts: 31794
Joined: Fri, 16. Apr 04, 19:21
x4

Re: 7.60 BUG: $station.buildstorage.wantedmoney not includes money owed for wares being transferred from L ship

Post by Alan Phipps »

Since this is a mod-exposed issue, it probably won't be resolved here. Still, it is there if the devs did want to look at it.
A dog has a master; a cat has domestic staff.
irilis
Posts: 7
Joined: Sun, 15. Dec 24, 08:20

Re: 7.60 BUG: $station.buildstorage.wantedmoney ignores prices in reservations - modded game

Post by irilis »

It seems my guess was wrong. Noticed the same effect of under-delivering when money transfer happened a few minutes before L ship even docked at buildstorage.

New theory: based on observation on another building base, buy prices for buildstorage are lowered when there's only a small portion of initial ware requirement is left. What if this ship reserved buy offer while price was high, but by the time it got there price got lowered? L ships fly quite slow, 20+ minutes delivery time is not rare, and that ship is the last to arrive. That would mean that $station.buildstorage.wantedmoney is calculated based on the current buy price, and ignores prices frozen by reservations.

That should be reproduceable in vanilla game...

Return to “X4: Foundations - Technical Support”