RandomMine

If you liked this item, please rate it up on Steam Workshop page.

Author: Andro

Last revision: 14 Apr, 2023 at 19:51 UTC

File size: 77.82 KB

On Steam Workshop

Description:

Random Mine: Randomized Miner logic.

Target:
Fast algorithm for efficient supply of player owned stations with minerals.
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 minerals most at that moment and serve that one.
The random part here is that if 2 or more stations need minerals equally (e.g. both have 0 units left of at least one of the needed mineral for production), the ship will pick one of them randomly.

This is based on my other two mods “RandomTrade” and “RandomSupply”, the logic is similar and the general rules are same.
Here are some features of this mod:
1. It will pick a position in a sector randomly in a circular area with the middle being the mean of the jumpgates’ and highwaygates’ positions; and the radius being half of the sectors size.
2. It will prioritize the sectors to mine in based on the jump gate distance, the most prioritized sector will be the sector in which the ship currently is; the second most prioritized sector is the sector in which your station, that needs minerals is (if supplier mode).

Supplier and free miner logic:
If supplier, the ship will check for buy offers of your stations and then search for minerals to mine, if found it will immediately create both orders, the mining and the trading one.
If free miner mode, the ship will search for nearby minerals and create only the mining order. When the cargo gets full, the order will disappear and the script will start from beginning. There the ship will try to get rid of the ware from cargo with the logic described in my other mod.

UI explanations:
Supplier and free miner: here you choose whether your ship should do supply, free mine, or both.
Home: If you want the ship to be the subordinate of one of your stations, set that station as home, it has no effect on priority. (Edit: changed in V 1.10, check patch log)
The other UI elements should be self-explanatory, check out my other mods for more in-depth description.