LegionOfOne wrote: ↑Thu, 3. Jan 19, 21:49
After my first round of testing, I have some feedback.
Thanks for the feedback.
Overall, the scripts work absolutely great ! As you said, they do make trade runs with 0 profit when they have no better option, which is very useful, no other script will do it. Still *a little* too much idle time between runs, but light-years beyond vanilla behaviors
.
I have made max idletime depend on pilot morale, currently max morale results in idletimes from 5s to 10s, while a pilot with zero moral idles between 5s and 70s. I will reduce this for the next version.
One caveat : this maybe linked to the the vanilla behavior of station managers, but I can't get your scripts to buy up any ware that the station uses. For ex. : My station produces a lot of E-cells, and consumes a few of them. Your traders will never buy e-cells from this station ever, they'll just idle if they have no other supplier. Probably because the wares are marked by the manager as 'must store' because they are used in production, even when the storage for them is full...
That behavior was consistent on every station : wares that were used were never sold, wares not used were sold without problem. Only exception : food and meds, sold without problem even though pops consumed it.
Does the manager create sell offers for energy cells? Is the offered amount above min amount and is the sell price below max buy price? From X Rebirth I have learned not to trust managers to put up sell offers for intermediates. So if I want to have a station A to produce ware W for other stations B, C, ... I make sure that station A has no productions that use ware W as a resource.
If the sell offer is present and if the conditions are right, then that would be bug in my script. I have uploaded a new version to the experimental branch, that has option for the trader to report the offers, including amount and prices, he sees to the logbook. Might help to investigate this further.
And I say 'sold', but I noticed something strange : the stations didn't get nor spend a dime for these trades (all happening between player-owned stations). My trade station bought everything my factories made but the budget never moved a single cent, even though I was selling nothing yet, only buying.
Yes, trades between player assets do not exchange money, at least not when the player acount is involved. I hope this will be different when they are assigned to a station.
Also tried your script on a few mining ships : worked great. The only problem is that it uses resource probes, and they never worked right for me. Must have dropped 30 probes at various resource-filled spots in Nopileo's Fortune, only 3 ever gave me readings, so the other ones couldn't be used as 'vendors'. And they vastly underestimate available resources : one probe was showing almost 0 ice density, and my miner with your script was idling waiting for ice to be available at the probe. But a vanilla miner was happily mining a huge ice asteroid less than 3 km from the probe, and I saw a lot more ice around. So it would probably work a lot better if we could set a whole system as 'vendor' instead of a resource probe, as they are problematic.
Try to set min amount to 1. The current implementation, finds resources within 100km of the resource probe if the probe reports a yield of at least min amount. I'm not quite happy with the current implementation either, but finding resources anywhere within a sector feels too cheaty to me. Maybe I could have it also accept navbeacons and disable the yield check in that case.
One quality-of life request : it would be useful if the ships could get as commander the first player-owned station they find in their buyer and seller lists. That way they don't clutter the 'unassigned ships' section of the UI.
You will get an explicit option to set a home base/beacon where they will return to when there is nothing to do and an option to assign the trader to that home base.
But these scripts still THINK, check prices, idle a little, all that.
Sometimes that's what you need, but mostly I need something even simpler : a basic order loop.
Go to station A => Pick up ware => Go to station B => Drop ware => Back to station A. That's it, no idle time, no recrimination.
You can go a bit fancier :
Goto A => Check if enough ware to fill cargo => Wait until true, then pick up => Goto B => check if space in storage, then drop => Back to A.
Now the deluxe version, that's on top of my wishlist
Same as before, but with potentially several suppliers and buyers.
BUT : the script ALWAYS buys from vendor 1 if enough to fill cargo. If not, only then do you check vendor 2, then 3, etc.
Same with several customers : always sell to customer 1 if enough space to take the delivery. If not, only then do you check customer 2.
That way the script has almost no calculations involved, so can loop orders without lag, and most importantly it behaves in an
entirely deterministic manner. That would be just perfect.
As an added bonus, if those scripts can drop cargo into a station 'non-consensually', even if the station has no buy order for it, that can be enough to create a rudimentary trade station. Once you have a ware in inventory, you can set a sell offer and manage the price from the logistical overview. You then just need to keep force-feeding more wares into it, instead of having buy offers.
Computation time of my scripts is probably neglectable compared to AutoTraders. I guess the lag you see is caused by skill based idle times.
I might add a dedicated script that is optimized for internal distribution of a single ware. I still think it is safer to base it on trade offers and make it prioritize first on price then on quantity.