[#1631]Manticore does not work correctly when delivering wrecks to a recycling station when OOS - Improvement coming.

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

Moderator: Moderators for English X Forum

Valhalla_Awaits
Posts: 42
Joined: Sun, 24. Apr 22, 04:07
x4

[#1631]Manticore does not work correctly when delivering wrecks to a recycling station when OOS - Improvement coming.

Post by Valhalla_Awaits » Fri, 29. Apr 22, 21:36

Can 100% confirm this bug with numerous other people, and it's being mass reported on the steam forums as well.

Basically having a scrap recycling station with 3 or more tugs assigned to it will completely break the delivery A.I. when the player is out of the sector. They will just fly around the station and never deliver the wrecks. Soon as the player re-enters the sector, they suddenly start working again. Repeatedly re-created this bug with a 100% chance of happening.

Not sure how the devs missed this one in testing... I mean it seems that literally everyone would have this happen, unless your only assigning two or fewer tugs to a station.

PS: Honestly the delivery A.I. works like garbage even in the sector, especially when I have 5 tugs trying to deliver to the same station, even with multiple drop off points. This definitely needs improvement.

Manawydn
Posts: 262
Joined: Sun, 26. Jan 20, 06:54
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when your out of sector.

Post by Manawydn » Sat, 30. Apr 22, 01:48

Please supply an unmodified savegame so that the devs can take a look. Without it, not a whole lot can really be done with regards to isolating and solving the issue.

siath70
Posts: 459
Joined: Sun, 11. Jan 04, 03:03
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when your out of sector.

Post by siath70 » Wed, 11. May 22, 20:50

The thing I see is the Tug's are not releasing the trade order and clearing to go on another run. They sit around the processor and do nothing with their orders saying trading.

It has happened ever since I have played I have to baby sit tugs and clear their orders manually to get them to do anything. This occasionally even happens to the AI where the tugs just sit around a processor.

Stuck on executing trade, cancel the deliver order and they go out again.

So it's not clearing the orders all the time, sometimes it does other times not. Also noticed sometimes they get what they're hauling stuck under structures and such when trying to deliver too.

One last thing, they say they can hold 10k in processing, however they never accept more than one cube or so at a time, about 1k (unless the cube is bigger), they should be accepting wrecks until they're full I would think.

Chef_de_Loup
Posts: 24
Joined: Mon, 28. Nov 05, 09:20
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when your out of sector.

Post by Chef_de_Loup » Sun, 11. Dec 22, 18:53

I've got the same issue here with current gameversion 5.10 (479084). It doesn't matter if the tugs work directly for the station or do it by special order.
I add a savegame were one of my mantis is stucked after droppeing the wreck.
https://www.mediafire.com/file/u69ioihs ... ml.gz/file

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4750
Joined: Fri, 21. Dec 18, 18:23
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when your out of sector.

Post by Imperial Good » Sun, 11. Dec 22, 22:18

They fixate on a single processor, selected at time of arrival, until they deliver. Which processor they choose I do not know, but it is probably random.

If your station does not have enough raw scrap due to this issue, the solution is to add more manticores to it so that the likely hood of one of the processors being idle is reduced.

So far all the cases of this report I have encountered were solved by adding more manticores to salvage for the station.

Chef_de_Loup
Posts: 24
Joined: Mon, 28. Nov 05, 09:20
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when your out of sector.

Post by Chef_de_Loup » Mon, 12. Dec 22, 11:34

Ok, so I remove 3 of the 4 processors and it's still buggy. I increased the amount of manticores and it is still buggy. I thought that the tugs will be released when another tug grabs a wreck and starts moving to the processor but that's not the case. So currently I can't figure out what needs to happen for releasing a tug on the processor. Sometimes a tug came in and moved on as suggested but that quite rarely happens.
Added the new savegame with one processor and nine tugs running. Two tugs are already stucked.
https://www.mediafire.com/file/7qxpisrm ... ml.gz/file

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

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when your out of sector.

Post by Alan Phipps » Mon, 12. Dec 22, 17:51

Just a question to perhaps help the devs, does that single processor have enough energy stored for the *next* production run at the time that the Manticore drops off the wreck?
A dog has a master; a cat has domestic staff.

Chef_de_Loup
Posts: 24
Joined: Mon, 28. Nov 05, 09:20
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when your out of sector.

Post by Chef_de_Loup » Tue, 13. Dec 22, 17:12

It's possible that it has not enough energy at that time. I will check If I can reproduce it by managing the energy.

Chef_de_Loup
Posts: 24
Joined: Mon, 28. Nov 05, 09:20
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when your out of sector.

Post by Chef_de_Loup » Sun, 18. Dec 22, 12:32

Ok, that's seems to be the source of the issue. The wreck is dropped by the manticore but the processor can't work as the energy is too low. The Manticore will stick on the processor as long as the system thinks, the wreck is still waiting. Even when the energy is good again, the system is stucked as the wreck is already gone.You have to skip the order for the manticore manually to clear the system.

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4750
Joined: Fri, 21. Dec 18, 18:23
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when your out of sector.

Post by Imperial Good » Sun, 18. Dec 22, 21:58

I recommend providing a not modified save, with clear reproduction instructions, that can be used to recreate this issue so the developers can debug it. Preferably before the Manticores become stuck but are in a condition that will soon lead them to be stuck so the developers might more easily find what is going wrong.

Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when your out of sector.

Post by Scoob » Mon, 19. Dec 22, 14:23

When you have a lot of Manticores attempting to offload scrap they do seem to bottleneck quite badly, even if there is plenty of Energy available to readily process sad scrap. Building extra drop-off points, oddly, does little to alleviate the issue. Adding more Tugs makes it worse.

When observing in sector, and out of sector though it's less clear, returning tugs seem to faf about a lot, rather than simply heading to the drop-off point by the most direct route and releasing their towed scrap. Even with just ONE tug incoming, this behaviour can often be observed. A tug will return, towing scrap, and *appearing* to be heading for the drop-off point. It'll then fly right past it, bumble around the station for several minutes before finally returning to drop off. It's like it's trying to approach the drop-off point from the wrong direction, rather than the obviously open direction based on the module's design, and getting confused by other station structures (IS).

Note: I ALWAYS leave a good, clear approach to such drop-off points, but the tugs still approach, over-shoot and faf around before actually returning to drop off. When there are multiple tugs doing this, the effect is exaggerated. I've had stations starving for scrap, yet energy rich, with many scrap-laden tugs just buzzing around, failing to drop-ff. There might be 10+ Tugs incoming, all close to the station, but I see one actually docking every couple of minutes.

For this to seemingly occur Out of Sector too, when collision avoidance isn't such a big deal, does suggest the pathing to this specific Module isn't right. It's like the approach vector to these scrap drop-off points needs looking at, as Tug simply do not approach the drop-off point in a logical manner. Similar perhaps to how S and M-Class ships coming in to dock, occasionally try to approach the dock from *underneath* and not above.

Don't have Scrap processing set up in my current game, but hopefully someone can provide a vanilla save that shows this issue. Looks like OP was limited by insufficient Energy Cells, but I've seen the issue with ample Energy available - the tugs are simply very very slow to drop off scrap.

Query: what impact does the Pilot level of the Manticore Tug potentially have? I've observed zero star pilots struggle with a simple "fly and wait" command, taking several minutes whereas a one star pilot with the same order does it in 30 seconds. My Tugs generally have one or two star pilots, so they shouldn't be quite that dumb.


Nico07091980
Posts: 79
Joined: Thu, 9. Sep 10, 18:05
x3tc

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when your out of sector.

Post by Nico07091980 » Sat, 13. Jan 24, 11:07

Hello,

Maybe I have the Problem. I noticed it seems to just happen when the Manticores try to deliver an item called "Wreck". No named ship wrecks, no scrab cubes just "Wreck".
I have 10 Manticors, 2 Scrap Processors, plenty of unfilled Solid Storage and more than 2 million Energy Cells on station.
As soon as I teleport to that station the Manticores go on and deliver the wrecks. After I leave the sector it takes a while till all of them hanging around the processors again with wrecks attached to them. Before that happens they deliver named ship wrecks without a noticable issue.

Cheers

Vectorial1024
Posts: 222
Joined: Mon, 30. Jul 18, 04:16
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when your out of sector.

Post by Vectorial1024 » Sun, 28. Jan 24, 17:53

Hi all, I am the creator of the mod Scrap Delivery Coordination, and I want to share some insights from when I was dealing with an "incompatibility" with another mod Fast Manticores. This will hopefully provide the much needed bridge between user frustration and dev confusion.

Even if this might look like some modding offtracking, I promise this is a very relevant and important update; I hope others may help bump this for more dev attention, and even provide some unmodified savefiles for dev action.

01: A User Complains
Some time in the past, users kept mentioning how Scrap Delivery Coordination "does not work". This was impossible, I thought to myself, because I literally spent hours upon hours doing static analysis to make sure my Mission Director scripts worked as intended. And yet reports still came in. Me also using Fast Manticores at that time, I could also confirm this. This is strange.

Eventually someone pointed out how Scrap Delivery Coordination "does not work" when used together with Fast Manticores. This is very strange; Scrap Delivery Coordination modified the AI script, and Fast Manticores modified the ship components, how come both cannot work together?

This set off a deep study on how scrap delivery works.

02: Code Review
The problem persists even when my play-testing scrap station have very enough energy cells. Very very strange. A code review on scrap delivery is required.

Essentially, scrap delivery AI script works like this:

Pick up the scrap, move towards a scrap processor; if the scrap cube is close enough, then drop the scrap and finish; else, we retry the approach.

This looks quite innocent to me, but surely, the tugs keep failing to deliver scrap when I am OOS. Every time I have some free time to teleport back IS, strangely, the tugs can deliver scraps correctly. Surely, being permanently IS is NOT the solution that I want, and it is very strange it only happens OOS.

So I modified my mod locally and force the game to print some values.

03: Suspicious Behavior
It took a few days, but I finally noticed a pattern of the problem.

The AI script is perfectly correct, the flow is clear and its intent is also clear. What is happening is even stranger.

So, the game kept saying "the processor is too far away, I gotta retry the approach". What? I looked at the minimap, surely, the tugs were literally right next to the processors, what did it mean by "too far away"? I then looked at the next number:

The game thought the scrap cubes were 10km away from the processor. What??? They were literally within 200m of each other???

04: Become the Ostrich
As the bureaucrats often do, when facing a problem, run from it and pretend it didn't happen. If I had a problem with Fast Manticores, then perhaps I could just not use Fast Manticores?

So I disabled Fast Manticores, and I made sure my tugs were using the slowest engines available, and reloaded the game.

The scrap cubes were immediately all "in range", the tugs immediately correctly delivered the scrap, the scrap processors started working, and very quickly I realized my station was not able to handle the many scrap cubes that the many tugs were scheduled to deliver.

05: "Not My Problem!"
So, this is beyond what a modder can do, because modders cannot modify the internal game engine.

A summary:
  • Scrap delivery AI script is correct
  • Game engine gives suspicious OOS scrap cube distances when tugs are too fast
  • This causes an infinite loop of tugs failing the scrap delivery with no obvious reason
Actionable items:
  • Devs should look at why the OOS distances are wonky
  • Users can provide an unmodified save game containing an otherwise-working recycling station with failing Manticores
06: Call to Action
There are too many confused posts about scrap delivery already, and some of us will get tired of it. Perhaps it is time to put this problem to rest once and for all. And for that, we will need you to help bump this/help provide an unmodified save (see above) so the devs can take a look again.

Let's make this happen!
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

TheDeliveryMan
Posts: 688
Joined: Sat, 10. Dec 11, 03:10
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when your out of sector.

Post by TheDeliveryMan » Mon, 29. Jan 24, 21:42

Vectorial1024 wrote:
Sun, 28. Jan 24, 17:53
There are too many confused posts about scrap delivery already, and some of us will get tired of it. Perhaps it is time to put this problem to rest once and for all. And for that, we will need you to help bump this/help provide an unmodified save (see above) so the devs can take a look again.
Your post made me look a little bit closer at my vanilla scrap processing station. It has a single Scrap Processor, 4 Solar Panels (200% sunlight), S Container storage, S Solid storage and a Dock. 4 Manticores are running a repeat order to salvage and deliver wrecks. Most of the time, during a Deliver Salvage command, they idle because the processor is currently busy processing a wreck. This idling is to be expected. When the processor is out of raw scrap, one or more tugs approach the drop off point and one usually succeeds to deliver its wreck. Sometimes they just fail for no apparent reason, this might be the issue you are describing. But occasionally two or even tree tugs manage to deliver their wrecks within a short time frame (a few seconds), kind of negating the effect of the previous issue.

So, I think I have save that demonstrates the issue. I still need to find time to write a thorough report that will convince the devs.

User avatar
BurnIt!
EGOSOFT
EGOSOFT
Posts: 5066
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when your out of sector.

Post by BurnIt! » Thu, 1. Feb 24, 11:15

We've seen the various reports about inefficiencies and sometimes plain stupidity of the scrap delivery process.
The observation that the distance between the towed object and the opening of the furnace of the scrap processor is causing issues (especially when tugs approach at high speed) is one we've made as well. The tugs are finishing their movement when they are close to the desired position (roughly 2 seconds before arriving) which will be further away from the target the faster they were going, this can result in them being more than 1km away from the furnace opening. They then try to move to a safe position which depending on station geometry and other ships in the area could be quite far away resulting in a failure to deliver.
This can happen IS as well and there it's partly caused by the tractor beam being "elastic" so the faster the tug goes the more it stretches and the further behind the towed object will be so when a tug arrives at the drop-off point the towed object may be quite far away still.

As you say the scrap delivery script does a nice enough job of letting a Manticore bring scrap to a simple recycling station - but that's just for a simple scenario. However it starts to fail the more processors there are on a station and the more Manticores are being used to deliver material.
The idea of letting the tug basically fly straight ahead past the opening the bring the wreck/cube closer was nice in principle but depending on the station layout the Manticore might simply not be able to fly that way (at least not IS), breaking the delivery as well.

I've spent the last couple of days looking into various problems with the process and 7.0 will bring major changes to the script that will greatly improve the reliability of scrap deliveries. It'll feature a queuing system and coordination between delivering tugs - partly inspired by the various mods that exist to achieve something similar (though it won't need to use MD to do it) - and it will also use a more robust movement pattern.
Once 7.0 is ready for a public beta (no ETA yet) this will be one of the areas we'll want feedback on. (I'm afraid the script changes are so extensive that they are highly likely to break the existing mods, though they should hopefully also not be necessary anymore)
BurnIt!
In der Ruhe liegt die Kraft. / In peace lies strength.

Vectorial1024
Posts: 222
Joined: Mon, 30. Jul 18, 04:16
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when OOS - Improvement coming.

Post by Vectorial1024 » Thu, 1. Feb 24, 19:30

Good to hear that the problem was separately observed by the devs.

It did strike me as weird how come there was no ability to check whether a processor was available, whether via Lua scripts or via MD, and that the delivery destination processor could not persist through a saveload (component id is refreshed/nulled during the saveload). But good that we will have a greatly improved system for 7.0.

Betas gonna break mods anyways, as long as the scrap delivery fix is good then I dont need to worry too much about it breaking scrap delivery mods.
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

User avatar
BurnIt!
EGOSOFT
EGOSOFT
Posts: 5066
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when OOS - Improvement coming.

Post by BurnIt! » Fri, 2. Feb 24, 08:31

Vectorial1024 wrote:
Thu, 1. Feb 24, 19:30
It did strike me as weird how come there was no ability to check whether a processor was available, whether via Lua scripts or via MD
Actually it is possible to check if a processor is available for delivery using this script action:

Code: Select all

<can_process_recyclable_object module="$processingmodule" object="$towedobject" result="$canbeprocessed" trade="$tradedeal"/>
However in the 6.x codebase this doesn't catch the case where a wreck has been dropped off already and is currently being moved into the furnace so there's a period of time where the processor will report that it is available and yet there already is something en-route and it will be unavailable again very soon.
Vectorial1024 wrote:
Thu, 1. Feb 24, 19:30
the delivery destination processor could not persist through a saveload
It does - yes, all component IDs are changing when loading a save but they are converted internally on load so that they still point to the same objects.
BurnIt!
In der Ruhe liegt die Kraft. / In peace lies strength.

Vectorial1024
Posts: 222
Joined: Mon, 30. Jul 18, 04:16
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when OOS - Improvement coming.

Post by Vectorial1024 » Fri, 2. Feb 24, 09:55

Basically, the list of pain points when making a delivery workaround mod:
  • No reservation system (tbd in 7.0)
  • Wonky OOS distances (tbd in 7.0)
  • "Can process scrap" is equivalent to the moment when the IS graphics would show a "no entry" sign, doesn't cover the critical state
  • Cannot find where in the MD files does it handle the player "press F to drop scrap" event
  • I chose to store the processor component ID in MD global variable for reference; turns out, apparently component IDs will get reassigned when doing a saveload, so the reference is effectively gone after save load
Good that there will be proper support for scrap deliveries.

(It is interesting to see how the game basically always spawns single-processor stations for RIP but players like me go for a mega processor setups, eg 8-processors or more, and then the 5.0/6.0 script is sufficient to handle only the game-spawned processor stations, but not player mega processors.)
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

User avatar
BurnIt!
EGOSOFT
EGOSOFT
Posts: 5066
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Tug/Manticore does not work correctly when delivering wrecks to a recycling station when OOS - Improvement coming.

Post by BurnIt! » Fri, 2. Feb 24, 10:06

Vectorial1024 wrote:
Fri, 2. Feb 24, 09:55
Cannot find where in the MD files does it handle the player "press F to drop scrap" event
Try md/notifications.xml near the end of the file, cue "RecyclableNearFurnace"
BurnIt!
In der Ruhe liegt die Kraft. / In peace lies strength.

Post Reply

Return to “X4: Foundations - Technical Support”