[MOD] AutoTrader with Options ver. 0.8 Jan. 20, 2023

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

argon_emperor
Posts: 1225
Joined: Mon, 12. Dec 05, 07:41
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by argon_emperor »

Maxybo13 wrote: Tue, 11. Dec 18, 18:58 Mod working well, thanks.

I do have a question around the trader logs, it seems to be putting a prefix number before the amount of profit made, for example.....

Total profit I made for you, Sir: Cr. 64,908,706

The profit from this trade was 4,908,706 so it has a preceding 6, as i look back in the log I can see this on every log entry but the number started at 1 and has been increasing over time.

Apologies if this is something simple i have overlooked.
Pretty sure the total profit it's listing there is the total profit since they started working as an autotrader. So it was probably just 60mil on the previous update, and this one gets 64mil because, as you said, the profit was 4mil for that trade
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
drhay53
Posts: 71
Joined: Fri, 7. Dec 18, 00:38
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by drhay53 »

argon_emperor wrote: Tue, 11. Dec 18, 22:43
Maxybo13 wrote: Tue, 11. Dec 18, 18:58 Mod working well, thanks.

I do have a question around the trader logs, it seems to be putting a prefix number before the amount of profit made, for example.....

Total profit I made for you, Sir: Cr. 64,908,706

The profit from this trade was 4,908,706 so it has a preceding 6, as i look back in the log I can see this on every log entry but the number started at 1 and has been increasing over time.

Apologies if this is something simple i have overlooked.
Pretty sure the total profit it's listing there is the total profit since they started working as an autotrader. So it was probably just 60mil on the previous update, and this one gets 64mil because, as you said, the profit was 4mil for that trade
Seems really unlikely that the profit was previously exactly 60 million.

I wonder if this is related to people ending up with ludicrous amounts of money? Honestly that’s why I haven’t installed the mod yet, plus the claims of negative trades.
Maxybo13
Posts: 3
Joined: Tue, 13. Nov 18, 11:12
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by Maxybo13 »

argon_emperor wrote: Tue, 11. Dec 18, 22:43
Maxybo13 wrote: Tue, 11. Dec 18, 18:58 Mod working well, thanks.

I do have a question around the trader logs, it seems to be putting a prefix number before the amount of profit made, for example.....

Total profit I made for you, Sir: Cr. 64,908,706

The profit from this trade was 4,908,706 so it has a preceding 6, as i look back in the log I can see this on every log entry but the number started at 1 and has been increasing over time.

Apologies if this is something simple i have overlooked.
Pretty sure the total profit it's listing there is the total profit since they started working as an autotrader. So it was probably just 60mil on the previous update, and this one gets 64mil because, as you said, the profit was 4mil for that trade
Ah yes you're right, it is a rolling total profit, I have been trying to read it as a profit per trade, i knew it would be something simple, thanks :)
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13489
Joined: Sun, 15. Feb 04, 20:12
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by euclid »

XTC0R wrote: Tue, 11. Dec 18, 22:24 I have an issue with shipyards / wharfes are not producing ships because total storage is full but still one resource is missing. Could the AT be responsible for this?
See my thread here
viewtopic.php?t=407412
Hi XTCOR :-)

The short answer is no. Shipsyards and wharves not producing ships was a bug fixed with the current update (version 1.32 revision 324221).

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
XTC0R
Posts: 401
Joined: Sat, 1. Dec 18, 19:58
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by XTC0R »

euclid wrote: Tue, 11. Dec 18, 23:52
XTC0R wrote: Tue, 11. Dec 18, 22:24 I have an issue with shipyards / wharfes are not producing ships because total storage is full but still one resource is missing. Could the AT be responsible for this?
See my thread here
viewtopic.php?t=407412
Hi XTCOR :-)

The short answer is no. Shipsyards and wharves not producing ships was a bug fixed with the current update (version 1.32 revision 324221).

Cheers Euclid
Hi Euclid,

I'm aware of the 1.32 changes. It is an issue which I also see in 1.32. Somebody wrote stations usually don't fill up their storage to 100%. That's why I wanted to double check if not the AT might overwrite/ignores this. Not sure if you had time to read the thread I linked.
But sure it is more probably a X4 Vanilla issue.
Lakz
Posts: 127
Joined: Tue, 19. Feb 13, 04:20

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by Lakz »

Great mod, brings me back to the X3 uni-traders.

HOWEVER, like it's been said before, please remove the teleport feature or at least make it optional.

Thanks for you work!
TheGreatGooglyMoogly
Posts: 8
Joined: Sun, 18. Sep 05, 23:36
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by TheGreatGooglyMoogly »

I didn't see it mentioned before but would it be possible to mention the ship ID in log messages. I've not gotten around to renaming all my ships yet.
Kamuchi_
Posts: 174
Joined: Fri, 7. Dec 18, 05:04
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by Kamuchi_ »

Got it to work but will wait untill the non-cheat version as they jump directly into the station dock :roll:
Last edited by Kamuchi_ on Wed, 12. Dec 18, 08:58, edited 1 time in total.
sandalle
Posts: 177
Joined: Wed, 18. Jul 12, 20:17
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by sandalle »

euclid wrote: Tue, 11. Dec 18, 18:23 Hi sandalle :-)

Thanks for the feedback. I strongly doubt that the AutoTrader has anything to do with the negative profit. I'm running the same version and double checked all the trades and credit transfers. It is likely that the losses are due to a conflict with another mod you are running.

Cheers Euclid
Hi Euclid, a follow-up report here (now on 1.32). :) So I removed all mods except AutoTrader v0.1, loaded up my save, removed all orders from my traders (I may have missed this step in my last attempt, at least for two of them), then set them to AutoTrade (one M Miner, 5 M Freighters, and 1 S Freighter (Osprey)). I noted that they were all making pretty good money this time around with no negative trades being reported. :) I then saved, re-added all of my prior mods, and loaded up the current save, and AutoTrade appears to be still working with no negative trades being reported...perhaps it was a bug from not removing all prior orders before asking the Captains to use the AutoTrade script? I've now gone from ~20mil credits to ~40mil credits in about 45 minutes, mostly due to AutoTrader functioning. :)

List of mods:
  • AutoTrader.zip-92-v0-1-1544407068
  • Better Scan Colors 1.1-38-1-1-1544138283
  • Capital weapon gains (cat)-94-1-00-1544435368
  • CrystalFinder-66-1-20-1544358018
  • FixBailChance-87-1-0-1544413343
  • FixIllegalBuy-71-1-01-1544364638
  • learningallthethings_v0_4-8-0-4-1544382117
  • Longer Ship Build Times Mod-67-1-0-1544225758
  • More NPC-96-1-1-1544476603
  • NoRCSSFX-10-1-00-1543730769
  • NoStardust-16-1-1543793003
  • quiet Egosoft logo-33-1-0-1543934688
  • recyclestation_v0_1-72-0-1-1544277931
  • research_take_time.zip-98-001-1544491034
  • sectorsatellites_v0_7_1-4-0-7-1-1544230156
  • Shield Gains (cat)-69-1-02-1544397584
  • Signal_Leak_Hunter_v100.zip-51-1-0-1544080133
  • Trade Ship Buy Logbook Entry-26-020-1543966455
  • Turret gains (cat)-61-1-04-1544427456
  • VariousNPCs-27-0-23-1544071437
None of those should conflict with AutoTrader...the only two I can think of that might are Sector Satellites and Trade Ship Buy Logbook Entry.

The only differences that I can recall from this working attempt and my earlier attempt with negative trades are:
  • I specifically removed all orders from the ship before issuing orders to use the AutoTrade script
  • I loaded AutoTrade by itself (no other mods) and issued the AutoTrade commands and gave them time to start working, only then did I save and reload with all of my listed mods enabled.
  • I'm also running 1.32 now.
argon_emperor
Posts: 1225
Joined: Mon, 12. Dec 05, 07:41
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by argon_emperor »

Would it be possible to implement a check for the trader to make sure a trade will fill at least 75% of his cargobay? Currently have an autotrader constantly doing Spaceweed runs between Hewa's Twin and Eighteen Billion.... With a grand total of 200 spaceweed in his cargobay... For a whopping 100k per run (65k profit as it costs 35k to buy that). And I run a mod that makes all cargo take 1 m3 volume per unit of ware, so he can *definitely* carry more than that. Just feel it's a waste to have a M freighter doing a run an S scout can pull off easily.
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
Meescha
Posts: 9
Joined: Sun, 9. Dec 18, 00:10
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by Meescha »

I can confirm i am loosing money, i had 200m last night and this morning i have 16m left, and according the logs, the auto trade ships say they made -20 ish mil profits, since i ahve multiple trade ships all my money is gone.

https://i.imgur.com/CfWkI04.png


{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}
Meescha
Posts: 9
Joined: Sun, 9. Dec 18, 00:10
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by Meescha »

and now im way in the negativce, im waiting to see if the trader will give me the money back or if im screwed lol

https://i.imgur.com/jsDkrrD.png


{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}
Meescha
Posts: 9
Joined: Sun, 9. Dec 18, 00:10
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by Meescha »

well i guess i did make a huge profit im at 13b now, and last night i was at 200m, the auto trader kept going into the negative and it seems i make the money back but, going from 200m to 13b in a day?
Beyondfubar
Posts: 41
Joined: Thu, 21. Nov 13, 23:03
x3ap

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by Beyondfubar »

euclid wrote: Tue, 11. Dec 18, 18:25
Beyondfubar wrote: Tue, 11. Dec 18, 04:37 ......
I figured it out!
Hi Beyondfubar :-)

If you don't mind sharing your findings? Other player seem to have the same problem.

Cheers Euclid
Ahh I meant I figured out how to post an image of the negative trades being executed by the autotrader. I could take a look at the code I suppose, after my programming final today that is. But as that statement shows I have limited experience with such things, and next to zero with X games. I believe the first step in the right direction for diagnosis would be to give the autotrader more logging information, this spams the user to oblivion but would give some insight on what was occurring. My knee jerk(and likely incorrect) assumption is that it has something to do with my massive trade complex, perhaps the trader is selling products for less than the complex would have but still technically a 'profit'. It would explain my net increase and the double camp of users reporting nothing and other reporting losses. Also it coincides with approximately my typical sells, as well as my particular complex having more product then any non-L size freighter could sell in 10 times the time it takes to build that stock level.

Which raises the question, if there is *always* product to sell at a POS will the autotrader ever do anything but trade for my station?

Back to studying for now, however!
Oderint Dum Metuant
Meescha
Posts: 9
Joined: Sun, 9. Dec 18, 00:10
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by Meescha »

Beyondfubar wrote: Wed, 12. Dec 18, 15:03
euclid wrote: Tue, 11. Dec 18, 18:25
Beyondfubar wrote: Tue, 11. Dec 18, 04:37 ......
I figured it out!
Hi Beyondfubar :-)

If you don't mind sharing your findings? Other player seem to have the same problem.

Cheers Euclid
Ahh I meant I figured out how to post an image of the negative trades being executed by the autotrader. I could take a look at the code I suppose, after my programming final today that is. But as that statement shows I have limited experience with such things, and next to zero with X games. I believe the first step in the right direction for diagnosis would be to give the autotrader more logging information, this spams the user to oblivion but would give some insight on what was occurring. My knee jerk(and likely incorrect) assumption is that it has something to do with my massive trade complex, perhaps the trader is selling products for less than the complex would have but still technically a 'profit'. It would explain my net increase and the double camp of users reporting nothing and other reporting losses. Also it coincides with approximately my typical sells, as well as my particular complex having more product then any non-L size freighter could sell in 10 times the time it takes to build that stock level.

Which raises the question, if there is *always* product to sell at a POS will the autotrader ever do anything but trade for my station?

Back to studying for now, however!

it seems the trader came through in the end and gave me the money back and basically doubles, it took 13b and took me into the negative and then the trader sold its wares and im up to a bil, i honestly dontt understand what my trader could have traded that it worth that much.
Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by Requiemfang »

Makes me wish I could allocate traders their own wallet from my own funds and keep them limited to a certain amount and any extra gets sent to the players account like in prior games with trader mods.
drhay53
Posts: 71
Joined: Fri, 7. Dec 18, 00:38
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by drhay53 »

honestly it seems to me like something is definitely bugged.
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13489
Joined: Sun, 15. Feb 04, 20:12
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by euclid »

I'm running this version for over 90 hours without any problems. However, I have only two traders and four miners going.

There is a condition on the player money that prevents a purchase that would result in a debt. It is possible that a small fleet of auto traders, say more than 5, could cause the problem as the money is taken from the player only when the wares are bought. If another (or several others) auto trader are about to buy wares then they might get the wrong player money info resulting in a temporary debt and a wrong profit info.

I'll look into that.

Thanks all for the feedback :-)

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
drhay53
Posts: 71
Joined: Fri, 7. Dec 18, 00:38
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by drhay53 »

euclid wrote: Wed, 12. Dec 18, 17:10 I'm running this version for over 90 hours without any problems. However, I have only two traders and four miners going.

There is a condition on the player money that prevents a purchase that would result in a debt. It is possible that a small fleet of auto traders, say more than 5, could cause the problem as the money is taken from the player only when the wares are bought. If another (or several others) auto trader are about to buy wares then they might get the wrong player money info resulting in a temporary debt and a wrong profit info.

I'll look into that.

Thanks all for the feedback :-)

Cheers Euclid
Do you have any idea about people getting insane cash really quickly? Like the person who went from 200m to 12b really quickly. I'm curious if it's a bug or simply because the trader can find the biggest profits and teleport to them instantly. The people reporting insane cash worry me a lot as well. Just makes something feel fishy, you know? Some weird negatives, some weird positives, just makes it feel like something is "off".

I haven't tested it myself yet. I've been sick for the past few days.
Cybertrigger
Posts: 67
Joined: Fri, 5. Nov 04, 04:40
x4

Re: [MOD] AutoTrader ver. 0.1 Dec 10, 2018

Post by Cybertrigger »

drhay53 wrote: Wed, 12. Dec 18, 17:24 Do you have any idea about people getting insane cash really quickly? Like the person who went from 200m to 12b really quickly. I'm curious if it's a bug or simply because the trader can find the biggest profits and teleport to them instantly.
I would like to know that also, if its a a bug i personally wouldnt use it since i want to keep my game legit and not kinda cheat money.

Additionaly i would like to ask is it already possible to deactivate that jump ( anomaly ) using already?
it seems kinda like cheating when the base game doesnt has it or elseway it should consume some kind of resource maybe antimatter a specific amount for lets say each 100 km as a fuel.
atleast in older X games you needed energy cells to make the jumps and the traders needed to have them stocked all the time to be able to jump.
also maybe the trader should just use that feature if its really far away but needs to compare if it uses the "fuel" if it would loose money on the trade then.

Personally i would like to have em getting better at trading get the statistics of profits but no cheating part.
the base game trading is kinda stupid and harder to oversee if they make profits.
i see money getting deducted and later from traders they got X amount for there wares but dunno which amount one trader specificly took from my account.

Return to “X4: Foundations - Scripts and Modding”