0 of 0

File information

Last updated

Original upload

Created by

WVlad

Uploaded by

vbprogr

Virus scan

Safe to use

Tags for this mod

About this mod

Overhaul of "Mules Supply and Warehouses Extended" mod for X4 3.1. Improved performance and features (mostly SupplyMule and TravelMule). Mostly save-compatible with original mod, but MAKE BACKUPS. This mod can be safely added or removed from your existing save game. Original mod source maintained by Misunderstood Wookiee & drhay53.

Permissions and credits
Mirrors
Donations
A fork of Mules and warehouses extended (which is distributed under GNU GPL license so why not). I made this mod because the original mod had some issues or missing features. While fixing things I had many cool ideas on how to improve the mod so I implemented my ideas. Because there are so many changes I doubt that original mod maintainers will be able to properly review and accept my changes, taking them would mean to take my code and just replace all theirs code but it's their project so...

What it does (the original mod description)
The Travelling Salesman Mule
AKA Travel Mule
This Mule is the ONLY one to care at all about prices and profits! It is the
one you will use to sell from your warehouses to every other faction.

The Station Supply Mule
AKA Station Mule
These Mules were the first in the Family and should be your most numerous ones.
They can handle all the supply between your factories, construction sites, and shipyards.
These are the ONLY ones who can create Warehouse Stations for centralized storage and distribution centres.

The Supply Mule
AKA Supply Mule
This Mule acts as a dedicated fetch mule for all own stations ware needs (or
when assigned to a particular single station), for times when you just
want to supply stations and nothing more. It does a job the Station Mule
is capable to do only this is the only purpose. He will try to serve
your builder first to get the station up and running, buys from player
known stations if available.
He will serve ALL your stations in a sector, unless you assign him to a particular station, starting with the
most needed wares it requires. He WILL NEVER serve AI stations unless assigned to one. He will server AI stations in sector only if it has no other deals for its assigned station or player stations in sector.

The Ware Distribution Mule

AKA Distribute Mule
This simple Mule is meant to distribute wares between your warehouses so
that every warehouse has at least some of everything. That way you can
use a network of warehouses to supply factories in various systems
instead of directly supplying your station via multiple production
stations.


Changes list

Added multiple modes to TravelMule that run in priority order:
  • sell from source station to player stations in jump range
  • sell from source station to AI stations in jump range (this single mode was in the original mod)
  • if not "Serve source only" - from source sector player stations to player stations in jump range (all legal wares if wares not locked)
  • if not "Serve source only" - from source sector player stations to AI stations in jump range (all legal wares if wares not locked)

Priorities are not exclusive to each other. If there is enough cargo space after adding trade orders for current priority tasks, it will proceed to lower priority tasks to fill up cargo even more.
SupplyMule already had these and more other priorities but they were exclusive to each other, I removed that exclusivity. Also some priorities were not used under certain conditions though they make sense - I fixed that. Now SupplyMule assigned to AI station, if no suitable deals for this station available and not in "Serve source only" mode, will also try to serve player stations in the sector before serving other ai stations in the sector.

Improved support of making multiple orders in one go for SupplyMule and TravelMule (e.g. buy from here and there and bring all the stuff to the source station). This allows them to more effectively use their cargo. SupplyMule now correctly calculates available spendable money when doing multiple trades in one go so more and bigger trade orders can be created. They also ensure to haul at least 50% of max cargo size in total, regardless of cargo size per single trade order. You can specify min cargo size per 1 trade order for TravelMule so max trade orders count will be max cargo/min trade order size. For SupplyMule you can specify max trade orders count, min cargo size per order is calculated in opposite way. This is inconvenient but I tried to avoid changing order parameters.
If a mule does nothing try to lower min cargo size per 1 trade order (or up max trade orders) so that it can make those 50% of cargo from several smaller orders instead of waiting for a bigger one.

Other improvements:
  • Mules now obey your faction restrictions set in the station logistics screen.
  • SupplyMule now correctly obeys specified max jump distance.
  • SupplyMule and TravelMule now take into account gate jump distance (-2% of profit per jump).
  • SupplyMule doesn't take into account player station prices when trading with npc. It peeks the best offer profit but now it can be < 0. Npc vs npc trades are still ensured to have positive profit.
  • When trading between your own stations (player<->player) SupplyMule doesn't take into account prices at all and instead uses total hauled volume as a profit indicator. But profits in logbook are still calculated from prices.
  • Improved logging in case you want to debug.
  • Default parameter values are tweaked to work best with all the changes.
  • TravelMule allows to specify up to 30 gates jump distance so the magical number of 15 jumps is removed to clean up code.
  • Many other small changes and fixes I can't remember now.

Tip: If you assign a mule to a station, ensure that the station has money in its account (not build storage account but station account).

I optimized it FPS-wise so mod can take longer to create orders than the original though it doesn't freeze whole game anymore. Also significant optimizations to make it easier for cpu.

v1.1
Added an experimental possibility to choose a sector as a home for Supply and Travel mules. It will serve all stations inside the sector (player stations first). This works same way as if you would assign it to a station that requires nothing to supply with "Serve source only" = off.

Smarter choosing of multiple trades. Mules will not peek trades from stations where it needs to travel through home sector several times.

Fixed bad performance when trying to change a mule settings when paused.
Fixed incorrect profit calculation for player to player trades (the bug was introduced in v1).
Hopely fixed build storage being not supplied when only small amounts are required to finish building (the bug was introduced in v1).

Comparison with Mules beta

After making all these changed I realized the there is a beta branch in the original mod repository. So I'm here to help to choose between that beta and this overhaul mod.

Use this overhaul mod:
  • If you don't like to use the Mules beta version.
  • If you want to use the new TravelMule modes listed above, though you can just replace their TravelMule file with my version. It should work!
    TravelMule pull request to the original mod: https://github.com/Misunderstood-Wookiee/Mules-and-Warehouses-Extended/pull/71
  • If you don't like the beta performance or have issues with the Mules beta try this overhaul mod instead.
  • If SupplyMule changes listed above are critical for you.

The SupplyMule from the Mules beta is somewhat hard to compare to my SupplyMule version. The beta doesn't have many of my SupplyMule improvements listed above but they might be not so critical for you, the beta have much cleaner code which means some fixes and some new bugs,  and it has the same factions restrictions feature implemented but in a more complex way. I still continue to use my version because all these  changes are important to me and it just works good enough with no issues. Porting my SupplyMule changes over beta code is another day or two of hard not payed work, I don't want that.

The StationMule and DistribMule were not changed in the beta so you can just copy these mules files from my version over their version to have FPS improvements and other changes (there are only few of them).

For 3.2 use the Mules beta.

Installation

If you have the original Mules installed - remove it before installation.
Just unpack into your Documents\Egosoft\X4\extensions folder so it the files will be in Documents\Egosoft\X4\extensions\mules_and_warehouses_extended.

Contributing


This is a fire and forget release. I developed it for myself but I don't like to maintain and support it especially for a long time. If you want to become a maintainer let me know. I provide only minimal support here. If something is broken fix it yourself if you want. Or make your own fork.
Don't ask, I'm not going to port to 3.2. You can take sources and do it yourself.

GitHub

I'm not planning to release to Steam Workshop (for now). You are free to copy and release it there.

LICENSE: GNU GPL because of original mod license. You are free to do what you want with this mod if it's not against the license so don't ask me if you want to copy-paste something into your mod.

FOR MORE INFORMATION CHECK OUT THESE MODS
Mules Extension
Mules & Warehouses V4
Mules and warehouses extended