v1.0.2 for X4: Foundations v1.5
This has been my white whale for a few weeks now, but I've finally got it to a point where I'm pretty happy with it. It fixes a number of the issues that have prevented vanilla Autotraders from performing as well as one would hope.
Description:
This is not a major overhaul of the vanilla script by any means. Generally, I've tried to keep changes as minimal as possible. It's intended to be a temporary fix for current problems with autotrader logic until Ego gets around to taking a closer look at them, rather than any kind of permanent "upgrade" to vanilla traders. I did have to get a little creative and make some subjective judgements to make things work in some areas, though, so I do consider it to be more of a mod than a pure "fix".
Download:
It can be found on NexusMods at: https://www.nexusmods.com/x4foundations/mods/243
Or it's available as a dropbox download: Autotrade Logic Adjustment v1.0.2
Installation: The .zip file needs to be unzipped into the extensions folder of the game directory: "..\X4 Foundations\extensions". If the "extensions" folder does not exist, then you'll need to create it.
If you really want all the gory details, you can read them in the header of the trade.find.free file in the mod itself. It seems they're a little too long to fit in a post here.
For the TLDR version:
- Player owned ships will search all zones for trade offers that the player orders them to. (No, they weren't doing that already.)
- Player owned ships will evaluate trades based on their potential profit margin, and choose the best that they can find. (No, they weren't quite doing that either.)
- If the player doesn't have enough money for the full purchase price of a trade, then only the quantity they can afford to buy will be considered in the evaluation.
- If a freighter has no cargo drones, then it will not attempt to trade with any stations that do not have cargo drones of their own.
- NPC traders will make their "best trade" determination on the basis of moving as much volume as they can at the highest price differential they can find rather than monetary profit, because they don't use money to build their ships and stations, so I figure they're more concerned with just keeping the materials flowing as best they can.
- I looked into the possibility of freighters trying to trade with stations that don't have pier modules. It doesn't happen, so that's not something to worry about.
- I'm still looking into traders trying to trade with enemy Build Storage units, as this has been reported again recently. I haven't been able to replicate on my own yet, though, and no additional measures will be taken in this mod until I've found something solid I can test the results against.
- When it comes to player owned traders visiting stations the player hasn't discovered yet, I only observed this to happen when I had a trade subscription with the faction in question, so I decided to leave it be. If you've spent the millions for a permanent trade subscription from a faction, then I don't think it's a problem that your ship's captains have information about where the stations with those trades are. (Even if you yourself haven't bothered to find them).
- Initial release
- some appropriately facepalm-worthy bugfixes
- Fixed content.xml and packaged data files in .cat format.