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

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

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

Post Reply
Raith_Sienar
Posts: 5
Joined: Sun, 8. Jan 12, 18:27
x3tc

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

Post by Raith_Sienar » Wed, 12. Dec 18, 22:33

I would really, really like to use this mod if only because the autotrade AI in the game is absolutely broken, but even on a brand new game with only this mod installed, upon activation of the command my trader would jump off into the universe...and then freeze and do nothing, then upon turning it off and back on he would jump off somewhere else into the universe..and freeze and do nothing. What the hell is going on?

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 » Wed, 12. Dec 18, 22:37

Raith_Sienar wrote:
Wed, 12. Dec 18, 22:33
I would really, really like to use this mod if only because the autotrade AI in the game is absolutely broken, but even on a brand new game with only this mod installed, upon activation of the command my trader would jump off into the universe...and then freeze and do nothing, then upon turning it off and back on he would jump off somewhere else into the universe..and freeze and do nothing. What the hell is going on?
There's a time delay between the trader doing stuff, depending on their skill level. Low level pilots take up to 20 min or so to do stuff between actions, high level traders can be as low as about 5 min

Kinda helps balance the fact out they literally know everything and can go anywhere at the drop of a hat XD
[ 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

Raith_Sienar
Posts: 5
Joined: Sun, 8. Jan 12, 18:27
x3tc

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

Post by Raith_Sienar » Wed, 12. Dec 18, 22:43

argon_emperor wrote:
Wed, 12. Dec 18, 22:37
Raith_Sienar wrote:
Wed, 12. Dec 18, 22:33
I would really, really like to use this mod if only because the autotrade AI in the game is absolutely broken, but even on a brand new game with only this mod installed, upon activation of the command my trader would jump off into the universe...and then freeze and do nothing, then upon turning it off and back on he would jump off somewhere else into the universe..and freeze and do nothing. What the hell is going on?
There's a time delay between the trader doing stuff, depending on their skill level. Low level pilots take up to 20 min or so to do stuff between actions, high level traders can be as low as about 5 min

Kinda helps balance the fact out they literally know everything and can go anywhere at the drop of a hat XD
So there is a time delay of 10 minutes (or even more since his waiting was cut short), aka long enough for a pirate Behemoth to get in close and annihilate my trader in a single volley because it's just sitting there over a SCP Space Weed Farm not doing anything?
I don't think the time delay should be that long, that's a bit excessive.

sdfgwrtetyryr
Posts: 6
Joined: Tue, 31. Mar 15, 10:24
xr

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

Post by sdfgwrtetyryr » Wed, 12. Dec 18, 23:20

Hello, Euclid. Just wanted to let you know, that the mod is running fine, but it seems to me that it's not suited for a huge number of auto-traders.
Thing is - I had 3 traders for quite a long time, they worked flawlessly, however I noticed that they were sometimes doing low-profit runs as well. Then I bought 4th one M trader, and this one (with 2 star pilot managed to go -2MIL at first, and then was barely able to slowly climb to positive balance. I even noticed once that 2 traders were selling stuff to a same station, so it looks like this particular universe is too small to generate a decent amount of trade offers.

So my small feature request is - to somehow make sure it never does negative profit trade runs at all, no matter how low, but at least not negative. And it would be also great to track down what exactly trader is doing right now, just to realise it's not stuck.

Thanks in advance.

User avatar
alt3rn1ty
Posts: 2399
Joined: Thu, 26. Jan 06, 19:45
x4

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

Post by alt3rn1ty » Thu, 13. Dec 18, 00:16

Hi Euclid, I did not participate much with Rebirth so forgive me if this question has been asked before :

Does your Autotrade scripting work similarly to Shimrod's OK Traders for TC / AP ?

I wonder only if you have never seen it and maybe there is something to be gained from the knowledge poured into that project that made it really good at using to replace Lucikes CAG and Universal Traders, without overly burdening the machine it is being run on when you had 10-15 traders utilising the scripting, and simultaneously carrying out multiple searches throughout all sectors whilst avoiding known bad / pirate / xenon / khaak / conflict sectors etc.
Laptop Dell G15 5510 : Win 11 x64
CPU - 10th Gen' Core I7 10870H 2.2-5.0ghz, GPU - NVidia Geforce RTX 3060, VRAM 6gb GDDR5,
RAM - 32gb (2x16gb, Dual Channel mode set in BIOS) DDR4 2933mhz Kingston Fury Impact,
SSD - Kioxia M.2 NVME 512gb (System), + Samsung M.2 NVME 970 Evo Plus 1tb (Games)

:boron: Long live Queen Polypheides and may her tentacles always be supple.
Seeker of Sohnen.

Misunderstood Wookie
Posts: 377
Joined: Mon, 15. Mar 04, 08:07
x4

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

Post by Misunderstood Wookie » Thu, 13. Dec 18, 00:29

After much internal deliberation, I have decided to use this mod regardless if ships magically teleport around. Just because I don't care much about trading and micro of traders in X4 games I usually just want to build fleets and stations and run my little operation and go around pissing off the universe.
*modified*
*X3 LiteCube User*
MOD GemFX Real Space Shaders
MOD Variety and Rebalance Overhaul Icon Pack
I lost my Hans and should not be flying Solo.
Image

jasii100
Posts: 34
Joined: Sat, 23. Jan 16, 15:26
x4

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

Post by jasii100 » Thu, 13. Dec 18, 03:28

Raith_Sienar wrote:
Wed, 12. Dec 18, 22:43
argon_emperor wrote:
Wed, 12. Dec 18, 22:37
Raith_Sienar wrote:
Wed, 12. Dec 18, 22:33
I would really, really like to use this mod if only because the autotrade AI in the game is absolutely broken, but even on a brand new game with only this mod installed, upon activation of the command my trader would jump off into the universe...and then freeze and do nothing, then upon turning it off and back on he would jump off somewhere else into the universe..and freeze and do nothing. What the hell is going on?
There's a time delay between the trader doing stuff, depending on their skill level. Low level pilots take up to 20 min or so to do stuff between actions, high level traders can be as low as about 5 min

Kinda helps balance the fact out they literally know everything and can go anywhere at the drop of a hat XD
So there is a time delay of 10 minutes (or even more since his waiting was cut short), aka long enough for a pirate Behemoth to get in close and annihilate my trader in a single volley because it's just sitting there over a SCP Space Weed Farm not doing anything?
I don't think the time delay should be that long, that's a bit excessive.
First off, love the mod - big thanks to Euclid. Second, regarding a delay for an extended period of time for balancing purposes, I totally see the point, yet also agree with the concern about one's backside hanging out in deep space for an extended period waiting for the delay to elapse. Perhaps it might be worth considering putting the delay before the jump, while the trader is still in, or very near a station, rather than having the delay after the jump? What do you think?

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13300
Joined: Sun, 15. Feb 04, 20:12
x4

Re: [MOD] AutoTrader ver. 0.2 Dec 13, 2018

Post by euclid » Thu, 13. Dec 18, 04:44

Thanks all for the feedback. I've uploaded version 0.2 which fixes some bugs (see 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

tSpecR
Posts: 84
Joined: Sun, 9. Dec 18, 15:31

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

Post by tSpecR » Thu, 13. Dec 18, 08:54

MutantDwarf wrote:
Mon, 10. Dec 18, 02:52
This is.... nice, except for the extreme cheatiness of the 'knows the entire galaxy' and especially the 'can create an anomaly' parts. Making your ships able to teleport anywhere in the game is.... not exactly balanced when compared to NPC traders.
Yeah thats really OP that bit. A good addition I think would be to set sector blacklists for each trader.

User avatar
Depleted
Posts: 49
Joined: Wed, 5. Dec 18, 06:53
x4

Re: [MOD] AutoTrader ver. 0.2 Dec 13, 2018

Post by Depleted » Thu, 13. Dec 18, 09:20

I don't know if this mod works correctly for me, i have the option for autotrade in the comm menu but there is no * behind their names once activated, and a few of the ships assigned to autotrade spend a lot of time going into hostile territory then derping out when engaged by xenon or khaak fighters, I've lost four large freighters as the ai decided a xenon defensive platform had the best wares or something.
Also i'm noticing that the profits due on the info panel does not reflect what is actually due, a freighter will spend up to 150m on a load and as they sell off bits n bobs i'll see large chunks of profit but it's not displayed at the top left.

Great mod none the less.

Misunderstood Wookie
Posts: 377
Joined: Mon, 15. Mar 04, 08:07
x4

Re: [MOD] AutoTrader ver. 0.2 Dec 13, 2018

Post by Misunderstood Wookie » Thu, 13. Dec 18, 13:34

Depleted wrote:
Thu, 13. Dec 18, 09:20
I don't know if this mod works correctly for me, i have the option for autotrade in the comm menu but there is no * behind their names once activated, and a few of the ships assigned to autotrade spend a lot of time going into hostile territory then derping out when engaged by xenon or khaak fighters, I've lost four large freighters as the ai decided a xenon defensive platform had the best wares or something.
Also i'm noticing that the profits due on the info panel does not reflect what is actually due, a freighter will spend up to 150m on a load and as they sell off bits n bobs i'll see large chunks of profit but it's not displayed at the top left.

Great mod none the less.
Check the extension is enabled in the game menu, auto trade is a thing in X4 this just replaces that feature with an arguably more superior function.
If the extension does not exist and enabled, Try making an extension folder inside the EgoSoft X4 Documents folder and placing the mod in that.
*modified*
*X3 LiteCube User*
MOD GemFX Real Space Shaders
MOD Variety and Rebalance Overhaul Icon Pack
I lost my Hans and should not be flying Solo.
Image

Senubius
Posts: 1
Joined: Mon, 10. Dec 18, 19:32

Re: [MOD] AutoTrader ver. 0.2 Dec 13, 2018

Post by Senubius » Thu, 13. Dec 18, 13:42

I have found one problem.
When you sell a trader ship and don't stop the auto trade before, the ship will trade again and again and again, in the log there are the trades, the ships I didnt find but I think the auto trader is anywhere :gruebel:

Osbot
Posts: 108
Joined: Sun, 10. Jan 10, 19:49
x4

Re: [MOD] AutoTrader ver. 0.2 Dec 13, 2018

Post by Osbot » Thu, 13. Dec 18, 17:03

Hey guys. If you want a cheat mod, do yourselves a favor.

Go to game settings. Uncompress save. Open save with notepad++

On line 6 look at money="bunchofnumbers" I recommend you select 13,000,000,000. There. You've accomplished exactly what this teleporting instant trader does, and you've saved yourself the powerbill of running the game for 3 hours to do it for you!

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13300
Joined: Sun, 15. Feb 04, 20:12
x4

Re: [MOD] AutoTrader ver. 0.2 Dec 13, 2018

Post by euclid » Thu, 13. Dec 18, 17:09

Raith_Sienar wrote:
Wed, 12. Dec 18, 22:43
.....
So there is a time delay of 10 minutes (or even more since his waiting was cut short), aka long enough for a pirate Behemoth to get in close and annihilate my trader in a single volley because it's just sitting there over a SCP Space Weed Farm not doing anything?
I don't think the time delay should be that long, that's a bit excessive.
Hi Raith_Sienar :-)
It's a trade-off: If you reduce the wait times then they do trades even faster. Also an attack can and will happen even for a vanilla trader on their long journey (as they do not jump). The waiting position for the AutoTraders is close to the station they trade with. That should provide a certain protection as "normal" (not pirates) stations will take actions when enemies show up. If you are not happy with the wait times then feel free to adjust the code to your liking. However, I will look into this and may add an interrupt for an emergency jump to a future version.

sdfgwrtetyryr wrote:
Wed, 12. Dec 18, 23:20
Hello, Euclid. Just wanted to let you know, that the mod is running fine, but it seems to me that it's not suited for a huge number of auto-traders. ....
Hi sdfgwrtetyryr :-)
Yes, you are absolute right. It is not meant to be for a huge fleet of traders and, actually, you do not need it. I just have 2 or tops 3 autotraders (Pelicans) and maybe 2 or 3 miners for minerals and gas/liquid each (Cranes). Please note that all these autotraders work the entire galaxy in contrast to the XR AutoTrader mod where you could choose the range from sector via cluster to galaxy.

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

User avatar
FalconGrey
Posts: 440
Joined: Thu, 22. Apr 04, 01:53
x4

Re: [MOD] AutoTrader ver. 0.2 Dec 13, 2018

Post by FalconGrey » Fri, 14. Dec 18, 21:51

Love this mod and the AutoTrader on my little Mercury is doing awesome! Where I'm not sure I'm understanding I sat this up right is the 'AutoMiner' part that you described.
AutoMiner: If the ship has gas or liquid storage then the captain becomes an Autominer.
AutoTrader: If the ship has container storage then the captain becomes an Autotrader.
As stated above, placed on my Mercury which was attached to my Power Station in Argon Prime. It seemed to ask me to set up what wares it wanted me to have it 'shop for' so I selected them and then let it go on its own. It seems to be doing awesome and making a fair profit for its small size.

Made the 'call' to my gas and mineral miners to start the AutoTrader Script. The ' * ' appeared after the names just as the Mercury did. Only they didn't do anything but showed 'Hold Position'. I selected 'AutoMine' manually and selected Silicon for the mineral and then Hydrogen for the gas. Both seemed to run good for a short time but now they just are sitting and doing nothing.

I have tried telling them to manually dock but that goes ignored. I've dried calling and deactivating 'AutoTrader' but again ignored. Teleported to the offending miners and manually docked them back to my HQ. Restarted the AutoTrader and they returned to where they were stuck (Same exact spots in space). Any suggestion? :gruebel:

Also, was that how the miners are supposed to be sat up?
It's not if we win or lose that matters, it's that we stood and faced it.

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13300
Joined: Sun, 15. Feb 04, 20:12
x4

Re: [MOD] AutoTrader ver. 0.2 Dec 13, 2018

Post by euclid » Sat, 15. Dec 18, 11:58

FalconGrey wrote:
Fri, 14. Dec 18, 21:51
...................
Made the 'call' to my gas and mineral miners to start the AutoTrader Script. The ' * ' appeared after the names just as the Mercury did. Only they didn't do anything but showed 'Hold Position'. I selected 'AutoMine' manually and selected Silicon for the mineral and then Hydrogen for the gas. Both seemed to run good for a short time but now they just are sitting and doing nothing.

I have tried telling them to manually dock but that goes ignored. I've dried calling and deactivating 'AutoTrader' but again ignored. Teleported to the offending miners and manually docked them back to my HQ. Restarted the AutoTrader and they returned to where they were stuck (Same exact spots in space). Any suggestion? :gruebel:

Also, was that how the miners are supposed to be sat up?
Hi FalconGrey :-)

It takes a while, depending on the average skill of the captain and the crew, until the miner or trader starts to move. There is not need to add any wares or issue any commands. In fact, there have been reports here that any additional command can cause problems.

Ideally the ship should be in space without any command (default: wait, hold position). Only then comm the captain and start the AutoTrader. Everything else is fully automatic, a miner will mine and a trader will trade. After you have done that just "forget" the ship. You can add it as subordinate to a station but it won't make a difference. The manager's orders will be ignored. The only way to interrupt the AutoTrader script is if you remove the captain or comm and then stop the autotrade (that's the clean way).

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

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13300
Joined: Sun, 15. Feb 04, 20:12
x4

Re: [MOD] AutoTrader with Options ver. 0.3 Dec 15, 2018

Post by euclid » Sat, 15. Dec 18, 19:13

New version uploaded with setup options meeting almost all requests made (see 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

User avatar
FalconGrey
Posts: 440
Joined: Thu, 22. Apr 04, 01:53
x4

Re: [MOD] AutoTrader ver. 0.2 Dec 13, 2018

Post by FalconGrey » Sat, 15. Dec 18, 19:30

euclid wrote:
Sat, 15. Dec 18, 11:58

Hi FalconGrey :-)

It takes a while, depending on the average skill of the captain and the crew, until the miner or trader starts to move. There is not need to add any wares or issue any commands. In fact, there have been reports here that any additional command can cause problems.

Ideally the ship should be in space without any command (default: wait, hold position). Only then comm the captain and start the AutoTrader. Everything else is fully automatic, a miner will mine and a trader will trade. After you have done that just "forget" the ship. You can add it as subordinate to a station but it won't make a difference. The manager's orders will be ignored. The only way to interrupt the AutoTrader script is if you remove the captain or comm and then stop the autotrade (that's the clean way).

Cheers Euclid
Thanks for the clarification! That may have been the issue. I will try the miners again with the script but will this time not issue them any commands!
It's not if we win or lose that matters, it's that we stood and faced it.

siath70
Posts: 459
Joined: Sun, 11. Jan 04, 03:03
x4

Re: [MOD] AutoTrader with Options ver. 0.3 Dec 15, 2018

Post by siath70 » Sat, 15. Dec 18, 20:41

Since you have made this great script.

Any chance you could make it so traders look at player owned properties for what is needed for building, hull parts, energy cells, claytronics… Then if a player station being built needs those ware look for a player station that makes those parts or has extra sitting in the build storage and move them to the station that needs them?

Even if said trader is a different type of trader, Build Supply Trader or something, where it might just sit around docked waiting for something that needs those parts.


Edit: Also is there a way to blacklist races, like SCA so a trader will not consider trading to them, or a way to just make them not trade with someone under say +5 rep (maybe settable in settings).

NightlinerSGS
Posts: 116
Joined: Tue, 30. Aug 05, 23:07
x4

Re: [MOD] AutoTrader with Options ver. 0.3 Dec 15, 2018

Post by NightlinerSGS » Sat, 15. Dec 18, 22:02

euclid wrote:
Sat, 15. Dec 18, 19:13
New version uploaded with setup options meeting almost all requests made (see OP for details).

Cheers Euclid
And you just made it perfect! 10/10! :D

Post Reply

Return to “X4: Foundations - Scripts and Modding”