[BUG] Any sell order for the ship will get cancelled within 2 seconds??

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

Moderator: Moderators for English X Forum

Post Reply
User avatar
xuancong
Posts: 92
Joined: Sun, 24. May 15, 14:08

[BUG] Any sell order for the ship will get cancelled within 2 seconds??

Post by xuancong » Fri, 26. Jun 20, 16:58

This is definitely another bug.

Uploaded save file at https://srv-file6.gofile.io/download/zl ... ell.xml.gz
My phoenix trade ship FCTrade4 suddenly cannot sell anything. Any sell order will cancel itself within 2 seconds.

So far I have digged enough into the game and I know why. Would you fix the bug in version 3.30 update? Thanks a lot! :lol:

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30435
Joined: Fri, 16. Apr 04, 19:21
x4

Re: [BUG] Any sell order for the ship will get cancelled within 2 seconds??

Post by Alan Phipps » Fri, 26. Jun 20, 17:38

"So far I have digged enough into the game and I know why." So are you going to share that knowledge? It might speed things up.
A dog has a master; a cat has domestic staff.

User avatar
xuancong
Posts: 92
Joined: Sun, 24. May 15, 14:08

Re: [BUG] Any sell order for the ship will get cancelled within 2 seconds??

Post by xuancong » Sat, 27. Jun 20, 05:25

I initially thought letting your developers figure out the cause may help them get more familiar with the game logic. :lol:
But since you requested, I will go straight to the root cause.

The cause lies in the subordinate management logic, that the extent of state change is not handled properly. For example, when a ship gets destroyed, all its belongings (drones, docked ships, etc.), will also be destroyed, this one you have done correctly (but you decided to keep launched cargo drones alive). However, when a ship is captured by boarding, some affiliated/subordinate units such as launched cargo drones, do not change ownership. So it ends up with a Phoenix Vanguard which belongs to the player, having 2 cargo drones which belong to SCA. Then, since the cargo drones are outside, so they are marked as "active" in the loadout menu, but they belong to SCA so they never fly back to the ship. As a result, the ship has 2 unusable cargo drones, so cannot sell goods.

Similar logic also applies to units-in-gravity, when the host enters/leaves highway, gateway, accelerator, etc, all units in gravity should also change movement state. If you hide in the spacesuit chamber repairing a ship, or repair drones are flying around, when the ship enters highway, gateway, accelerator, etc., the player in spacesuit will be thrown out, the units-in-gravity will be separated, and all launched drones get lost. I have reported this issue in another post.

In general, you need to manage the 3 situations:
  • When a unit gets destroyed, what happens to its subordinates/consumables, both docked and launched?
  • When a unit changes owner, what happens to its subordinates/consumables, both docked and launched?
  • When a unit is teleported (entering or leaving highway, gateway, accelerator, etc), what happens to its subordinates/consumables, both docked and launched?
If you do not want to destroy launched drones, you need to think about where can they go afterwards, because their host has already been destroyed or changed owner :?:
My suggestion is that if a ship is destroyed, all consumables (both docked or launched) should also be destroyed, dropping all their cargoes if holding. If a ship is captured, all consumables (both docked and launched) should also change ownership, dropping all their cargoes if holding. This should also apply to launched defence drones.

Post Reply

Return to “X4: Foundations - Technical Support”