[MOD] [OBSOLETE] Scrap Delivery Coordination (v1.01)

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

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

[MOD] [OBSOLETE] Scrap Delivery Coordination (v1.01)

Post by Vectorial1024 »

Another attempt to solve the multi scrap processor delivery problem. When delivering scrap, Manticores spread out to use all processors if possible.
Simplified Changelog
  • v0.01: Initial release
  • v1.00: Released on Steam Workshop and Nexus Mods
  • v1.01: Minor bugfixes/adjustments
  • 21 June 2024: Obsolete as of X4 7.0; the update features improved scrap delivery
Last edited by Vectorial1024 on Fri, 21. Jun 24, 16:28, edited 3 times in total.
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!
Buck
Posts: 39
Joined: Thu, 29. Jun 23, 16:10
x4

Re: [MOD] Scrap Delivery Coordination (v1.00)

Post by Buck »

Works well for me
A Big Thank You ! :mrgreen:
(30 primary scrap pods & for the first time they use them all rather than just 4 or 5)
Realspace
Posts: 1638
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [MOD] Scrap Delivery Coordination (v1.00)

Post by Realspace »

Seems very useful. Quality of life mods as these are very needed, the devil is in the details :mrgreen:
Vectorial1024
Posts: 304
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] Scrap Delivery Coordination (v1.00)

Post by Vectorial1024 »

Glad to see this mod working well!

Before anyone asks me: if EgoSoft did not update anything about recycling, then this mod will most probably also work in the new version of the game.
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!
Vectorial1024
Posts: 304
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] Scrap Delivery Coordination (v1.01)

Post by Vectorial1024 »

Everyone:

The v7.0 vanilla update (currently in beta) has improvements to scrap delivery. I haven't checked anything yet, but maybe the improvements are enough to make this mod obsolete.

Exact decisions will be made when 7.0 is generally available.
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!
Vectorial1024
Posts: 304
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] Scrap Delivery Coordination (v1.01)

Post by Vectorial1024 »

X4 7.0 was very recently released.

I had a look at the new logic, and I must say, I am very satisfied with their approach. (See the GitHub readme for more info).

Therefore, this mod is obsolete and I am discontinuing it.
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Re: [MOD] [OBSOLETE] Scrap Delivery Coordination (v1.01)

Post by Scoob »

Hi,

I read your comment on Github, but observed behaviour appears to differ slightly:


Pick up scrap cube (or sth)
Move into the zone of the destination Then, it gets complicated:

For me, I can see my Manticores picking up scrap promptly, however, they will then wait in situ until a processor is free. They do not move into the zone of the destination, by which I assume you mean return to the proximity of the station. My game was started in v7.0 Beta 1, so perhaps my save has inherited some bad behaviour, if this has indeed been fixed.

I'm currently playing totally vanilla, continuing my Beta save. Once the various mods I use are updated, I will doubtless start again.
Vectorial1024
Posts: 304
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] [OBSOLETE] Scrap Delivery Coordination (v1.01)

Post by Vectorial1024 »

Hi there

Indeed I was saying "the Manticore should fly close to the station". I was using some technical terms to be accurate; basically in X4, each station exists in their implicit, unnamed zone, and the zone is basically the "proximity" around the station.

The info in the GitHub readme was collected using the official 7.0 game code released on 21 June, so those should be up to date. Then again, depending on how the scripts were written, it is possible for old versions of the script to retain old behavior. Best would be to somehow stop and restart, e.g. use Hold Position, and then use AutoSalvage again.

But still, the doc was only trying to provide a high-level overview of how it works. Fine details might be different if e.g. your delivery targets are inside the Avarice system.
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Re: [MOD] [OBSOLETE] Scrap Delivery Coordination (v1.01)

Post by Scoob »

Thanks for the reply.

I will check my vanilla v7.0 save again. I was observing my Manticores flying to collect a wreck or scrap cube, then waiting until a Processor is free before returning. They are currently gathering from within the same sector as the scrap processors, but a good 20-30km away. Could that distance perhaps be considered close enough that they don't move? I might try to get them to gather scrap further away, and observe the behaviour.

I've actually now started a new game, and am a few hours off from setting up a scrapping operation. Let's see what doing it in a fresh save shows.

During the Beta of v7.0 I did give feedback on the state of scrapping. Generally improved, but with long delays (due to waiting for a free processor before moving) with actual deliveries. As you can imagine, if a processor is "reserved" by a tug that then takes several minutes to return, that's down time. I observed that, usually, no more than two or three of the station's five scrap processors were active at any one time, despite a long list of pending deliveries in the list. It worked, when all is said and done, but it was a bit of a brute force approach. I.e. to have two or three Processors constantly working, I needed at least five or more due to the excessive processor down-time.

I wonder if your Mod could perhaps be revived, but in a different form. I.e. it gets those Manticores to reliably return close to their station as soon as they collect a wreck / scrab cube? I will do some more testing...
Vectorial1024
Posts: 304
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] [OBSOLETE] Scrap Delivery Coordination (v1.01)

Post by Vectorial1024 »

Afaik from X Rebirth knowledge, a zone can be as large as 40km to 50km from its (0, 0, 0) origin. So Manticores hanging out at 20km - 30km seems reasonable.

Nowadays it is very easy to test Manticore performance by doing Creative Gamestarts, but still, Imma just keep it steady and do the investigations later. After all, the new vanilla script took inspiration from e.g. Scrap Delivery Coordination and added many extra stuff, will need time to fully digest the actual behavior.

Then again, Multi Scrap Processor Fix approached the problem by telling Manticores to instantly retry, but here I approached the problem by telling Manticores to spread out, which "avoids" retries so to speak.
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Re: [MOD] [OBSOLETE] Scrap Delivery Coordination (v1.01)

Post by Scoob »

I wonder if there's a way to shrink that "Zone"? For me, I build my Scrap Processing stations within the large scrap fields of sectors like Silent Witness XII. So, scrap is available close-by. My thought, initially, being that the closer the scrap, the less issue I'd have with this return delay of the Tugs. If the Scrap Processor was in another sector, I'm guessing that would absolutely be a separate "Zone" thus the Tug would return more promptly. It's crazy that they take LONGER to return from a short distance vs. potentially several sectors away.

Are "zones" a hard-coded thing in X4? Is it possible to shrink how the AI sees them, allowing "local" Tugs to return more promptly? My Tugs are currently generally travelling between 30 and 50km to collect wrecks, from what I've observed - though there are closer wrecks - and they always wait immediately after collection.
Vectorial1024
Posts: 304
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] [OBSOLETE] Scrap Delivery Coordination (v1.01)

Post by Vectorial1024 »

I don't think anyone can modify that zone because zones are managed by the game engine.

Indeed, sometimes it is wise to set up the scrap yard e.g. in the next sector, so the tugs can go into travel drive and just get there faster. Another factor is to be out-of-sector when the station is working so the tugs can fly better.
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Re: [MOD] [OBSOLETE] Scrap Delivery Coordination (v1.01)

Post by Scoob »

Vectorial1024 wrote: Sun, 30. Jun 24, 18:34 I don't think anyone can modify that zone because zones are managed by the game engine.

Indeed, sometimes it is wise to set up the scrap yard e.g. in the next sector, so the tugs can go into travel drive and just get there faster. Another factor is to be out-of-sector when the station is working so the tugs can fly better.
Ah, I suspect as much. Previously I'd often set up in the neighbouring sector, so the tugs did have to travel, they would still hang out where they collected the wreck, but that was in v6.2. However, with sunlight being slightly higher there, I build in the same sector as the scrap fields the prior two times, which should have made scrap collection faster, but has actually slowed it down lol.

I will say that scrap collection while I'm present in the sector - standing on the station - no longer seems to cause it to stall. Previously, nothing would be delivered if I was present.

Due to the return delay issue, 50% - I only have two - of the station's scrap processors are still regularly idle. So, I'll just do what I did before and add more. I.e. If I need two constantly working in order to produce sufficient scrap metal per hour, then I'll build four, or five to ensure that. The issues with Tugs not returning right away has been well documented - by me during the beta - so perhaps Egosoft will take another look at it. Ship waiting where they collected the wreck is really quite silly.

Note: we've spoken about zones, however, I sent a ship to collect a more distant wreck as a test, and it did not return right away despite being two sectors away. I'll do some more testing / observation on that.
Vectorial1024
Posts: 304
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] [OBSOLETE] Scrap Delivery Coordination (v1.01)

Post by Vectorial1024 »

I now have a basic scrap processor running, and I assigned 2 tugs: 1 can reach scrap cubes by itself, the other cannot (I give it manual command to collect scrap cubes). There is only 1 scrap processor at the moment.

The one which can reach the scrap cube left first, got the scrap cube, and flies back to the station with "Deliver Salvage" active command. The other one left later, got the scrap cube under my command, and then with no active orders in its order queue started to fly towards the station. With the only processor processing the previous scrap cube, the second tug then has "waiting for free dock" in its status. I say the 7.0 scrap recycling behavior is working very well.

My game is modded, but I am not using any AI mod that affects scrap recycing to my knowledge (eg no KUDA AI, hopefully VRO does not touch scrap recycling, etc etc)
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Re: [MOD] [OBSOLETE] Scrap Delivery Coordination (v1.01)

Post by Scoob »

Vectorial1024 wrote: Sat, 6. Jul 24, 19:28 I now have a basic scrap processor running, and I assigned 2 tugs: 1 can reach scrap cubes by itself, the other cannot (I give it manual command to collect scrap cubes). There is only 1 scrap processor at the moment.

The one which can reach the scrap cube left first, got the scrap cube, and flies back to the station with "Deliver Salvage" active command. The other one left later, got the scrap cube under my command, and then with no active orders in its order queue started to fly towards the station. With the only processor processing the previous scrap cube, the second tug then has "waiting for free dock" in its status. I say the 7.0 scrap recycling behavior is working very well.

My game is modded, but I am not using any AI mod that affects scrap recycing to my knowledge (eg no KUDA AI, hopefully VRO does not touch scrap recycling, etc etc)
That's really interesting. For me, I can clearly see all tugs waiting exactly where they initially snagged the wreck / cube until a Processor becomes free. I'm going to do some more testing. As of this moment, there are no wrecks to salvage that aren't within 40km or so of the station, and certainly none in another sector. How far away from the station was that second cube? There must be some sort of distance threshold here, i.e. in my game, tugs think they're "close enough" to just wait where they are, rather than return.

I've got three Scrap Processors now and eight Tugs. At any time most of them are sat waiting with a cube (I have a Teuta working the area) a good 30-40km from the station. I will check exact distances when I'm next in-game.
Vectorial1024
Posts: 304
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] [OBSOLETE] Scrap Delivery Coordination (v1.01)

Post by Vectorial1024 »

Scoob wrote: Tue, 9. Jul 24, 11:12 How far away from the station was that second cube?
I was playing on X4 Reemergence, but I built my scrapyard in Avarice and was collecting scrap cubes in Windfall IV Aurora's Dream (2 jumps away). Clearly, both places are in different zones. Both tugs were going to Windfall 4 to collect scrap cubes.
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Re: [MOD] [OBSOLETE] Scrap Delivery Coordination (v1.01)

Post by Scoob »

Vectorial1024 wrote: Tue, 9. Jul 24, 15:04 I was playing on X4 Reemergence, but I built my scrapyard in Avarice and was collecting scrap cubes in Windfall IV Aurora's Dream (2 jumps away). Clearly, both places are in different zones. Both tugs were going to Windfall 4 to collect scrap cubes.
Ok, that sounds like they've improved things a bit then. For me, in my prior v6.2 game - also Reemergence - some of my Tugs were travelling longer distances - one or more sectors away - and they would stay there. There was a bit of a conflict zone near a gate, so my Tugs were travelling there a long, then just hanging out there until a Processor became free.

I have a vanilla save that shows local (same sector) Tugs not returning, perhaps I should submit that in a formal bug report during the v7.1 beta phase...

Return to “X4: Foundations - Scripts and Modding”