thanks for the reports. I just looked into the whole script again and found some other stuff.
The main problem atm is summarizing the trades correctly in the logbook. The overall data is always correct, as far as I can see, only the display in the logbook isn't.
The biggest flaw is a trading case, which I simply forgot to consider:
Let's say I'm buying 200 E-Cells from one station, then 100 E-Cells from another. This is all shown correctly in the logbook.
Then I go ahead and sell 200 E-Cells to a station - and bam! - this is the point where the logbook gets confused. Because to merge flights (so one buy- and one sellrun into a single trade) it will look for the latest trade. If you sold less in the current sellrun than you bought in the latest buyrun, a dummy entry is created with the left-over cargo (this is what is done in the code you posted).
However if you sold more in the current sellrun than you bought in the latest buyrun this is not caught, so selling your 200 E-Cells will be related to buying 100 E-Cells, which is obiously wrong.
Unfortunately there are still the 200 E-Cells from the first buyrun floating around as an uncompleted trade. So when you now sell the remaining 100 E-Cells the logbook will again go ahead and search for an uncompleted flight. It find the 200 E-Cells, notices that this is more than we sold now (100 E-Cells), and creates a dummy entry. Thus you end up with a completely screwed up logbook...
So, this is really a problem I HAVE to solve before I upload a next version.
This is currently filtered out on purpose. Should it be configurable?I'm also trying to take into account ship upgrades in order to know exactly how much profit my MK3s does.
Yes, of course I am. Just upload them somewhere and post it here or send me a PM, so that I can add it to the main post (and of course into the download when the next version is up).BTW, I translated your t files in french language.
Ask if you're interested.
Concerning the next version:
I will not make any promises, but I hope that I can get to work on this project again in the next weeks. Please excuse the long period of inactivity with this script.
Greetings,
ScRaT