RandomSupply
Random Supply: Randomized supplier logic for player owned stations.
I published this mod to github recently https://github.com/YuJin44/randomsupply. If somebody wants to help with some updates, like implementing the new factions, please fork and make a merge request. I can publish my other 2 mods there aswell if it is well received.
Target:
Fast algorithm for efficient supply of player owned stations (also including supply of build storages and delivery from player owned stations)
Supply stations with minimum resources, as few as possible ships should operate as many as possible stations.
Core Idea:
one ship should be able to supply not only its home station, but all player stations. Check which station needs service most at that moment and serve that one.
The random part here is that if 2 or more stations need service equally (e.g. both have 0 units left of at least one of the needed wares for production), the ship will pick one of them randomly.
This is based on my other mod "RandomTrade", the logic is similar and the general rules are same.
Here are priority rules:
1. Transport wares from player owned stations to player owned build storages.
2. Transport wares from player owned stations to player owned stations.
3. Buy wares from NPC stations for player owned build storages.
4. Now do 5 steps, each step does:
4.1. Buy wares from allowed NPC factions to supply player owned stations
4.2. Sell wares from player owned stations to npc factions.
With each step the priority reqiurement lowers, meaning, that buy offers for needing wares from player stations with few units left in station storage and sell offers for producing wares from player stations with little room left in station storage will be taken care of first. In the next step then the ship will search for offers with more units/space left in station storage.
5. If no possibilities found, the ship will wait 2-3 minutes and try again.
UI explanation:
It is based on my other mod, here are some differences:
1. Buyer and Seller: here you decide whether your ship should be delivering wares to your stations (buyer) or selling wares from your stations to npc’s (seller) or both.
2. Home and HomeBound: here you can choose a sector or station, if you toggle homebound, your supplier will serve only stations around this home (with max gate distance set in "Serve Gate Distance"). If homebound not set, your ship will look around its current position for serving instead. If you set one of your stations as home, the ship will become its subordinate and trade with its money, it will not prioritize it or similar.
For more explanations, check out my other mod.
Mass assignment:
1. Assign multiple ships to 1 ship of the same size and category (e.g. M-miner) with righclick chhoosing "[standard] defend".
2. Set up the lead ship as you want.
3. The ships assigned to defence will start copying the setting one by one from the lead ship.
PS: you can also assign the ships whenever you want to the lead ship (e.g. while it executes trade orders). For (3) to kick in you will then just have to wait untill it finishes trading and starts to search for new trades.
My other mods support mass assignment aswell.