ROMB wrote: ↑Mon, 21. Jan 19, 22:12
Hi Euclid. After some debugging I finally able to find what is the issue in your script, and why it goes into negative profits.
In Version 0.6, File: AutoTraderOptions\aiscripts\stationautotrade.xml Line: 209 you set buyoffer to new offer each time you analyze new ware. Because of this you loosing actual profitable buyoffer. I fixed this by renaming $byoffer to $byoffertmp on lines 209, 226-229, 232 and adding after line 232
I've uploaded a new version with the changes you've suggested. Please see changelog in the OP for details.
Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
There's still something awry with negative profit, and I think it's tied to pilot level. I have the "learn all the things" mod, so my pilots actually level up. After a while, and with 30+ traders running, I consistently start losing money. Replicated on more than one "new game".
Kalypzo wrote: ↑Tue, 9. Apr 19, 09:32
Noticed an issue with the traders fee.
I'll have to look closer but at current over half of my profits are unaccounted for.
E.g
Bought wares for 795,000
Sold wares for 1,950,000
Your profit is 525,000
No fee should be 1.2mil. profits. how much does he take?
And is there a way to lower his commission fee in the coding? What would I be looking for?
Kalypzo wrote: ↑Tue, 9. Apr 19, 09:32
Noticed an issue with the traders fee.
I'll have to look closer but at current over half of my profits are unaccounted for.
E.g
Bought wares for 795,000
Sold wares for 1,950,000
Your profit is 525,000
No fee should be 1.2mil. how much does he take?
And is there a way to lower his commission fee in the coding? What would I be looking for?
which means at most 22.5% of the profit. In your case the profit displayed is not right. It should be at least about 860k. I'll check the code.
Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
I've checked the code and can't see anything obvious that could cause that. Will need to do some in-game testing.
Concerning your question: Just put $Level = 0 for no fee.
Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
euclid wrote: ↑Thu, 11. Apr 19, 14:55
I've checked the code and can't see anything obvious that could cause that. Will need to do some in-game testing.
Concerning your question: Just put $Level = 0 for no fee.
Cheers Euclid
Don't mind the fee, it doesn't break the game
Thanks for the info, and well done
I wanted to stop AutoMiner, so I can upgrade its ship but every time I try comm to the AutoMiner, there's no Autotrader options in comm menu? What am I missing? My AutoMiner is still carrying on and have an asterisk by name so obviously, the mod is still working but I can't find a way to stop it for a moment.
There should be an option "Stop Auto Trade". It works in my game.
Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
Do you have any other ship on AutoTrade? If so, please try this:
Select the ship from the property menu and select "Comm". Do you see the "Auto Trade Option" ?
Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
Yeah, I have 3 or 4 on AutoTrader and all show same as the screenshot that I posted. Also, when I made a new trading ship, the AutoTrader is not even on the comm so I couldn't start AutoTrader with the new trading ship either.
I've tested it with the latest version (2.21) of X4 and it works fine with existing AutoTraders and also with new ships.
It seems you had no problems when starting the AutoTrade on your 3-4 ships initially, which mean you had the option (otherwise you could not have started them). At some point the option did not show anymore which bares the question what has changed. To narrow down the problem could you please check if any other mod you may have installed after starting up the last AutoTrader is causing this? Just disable the "other" mod(s) and see if you still cannot get the option on "Comm".
Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
euclid wrote: ↑Thu, 11. Apr 19, 14:55
I've checked the code and can't see anything obvious that could cause that. Will need to do some in-game testing.
Concerning your question: Just put $Level = 0 for no fee.
Cheers Euclid
Don't mind the fee, it doesn't break the game
Thanks for the info, and well done
I've tested it in-game with version 2.21 of X4 and found no problems. For example one of my AutoTraders bought spaceweed for Cr 114,928 and sold it for Cr 229,203 for a profit of Cr 107,398 where the commission charge of Cr 6,877 was already deducted. If you still encounter that problem please feel free to load up your saved game (for example dropbox) and let me know the link. I'm happy to take a closer look. Please also mention all other mods you are using.
Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
I went to the extensions menu in the game and noticed that there are 2x AutoTrader on the list, I'm not sure how that happened. So, I delete the mod and reinstall the mod and now it's working fine. Sorry for all of the trouble!
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
Hi Euclid,
Have you tested SETA mode with Autotrader? I'm noticing a large number of negative profit trades (substantial) when having say 10 Trader running and staying in SETA.
Do you have a recommendation how to avoid the trades at loss?
Cheers, End