[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

Lakz
Posts: 127
Joined: Tue, 19. Feb 13, 04:20

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by Lakz » Tue, 18. Dec 18, 22:17

Could someone explain which file and lines should be altered to deactivate the jump feature?

Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by Requiemfang » Tue, 18. Dec 18, 23:18

Lakz wrote:
Tue, 18. Dec 18, 22:17
Could someone explain which file and lines should be altered to deactivate the jump feature?
No need to remove that, when you start an autotrader through the comm, choose the setup before you start the auto trader. changing the settings you will get a log in your ingame log which shows what's active or not. 0 = true, 1 = false. The jump feature can be turned off this way.

Lakz
Posts: 127
Joined: Tue, 19. Feb 13, 04:20

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by Lakz » Wed, 19. Dec 18, 16:26

Thanks ^

Very happy with this Auto-trader!

What would be great to see in the future :
- option to have the ships dock instead of the current transfer mechanics
- a way to set fleet-wide settings
- limit the jumps per trade

Galadon
Posts: 10
Joined: Fri, 25. Nov 05, 22:27
x4

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by Galadon » Thu, 20. Dec 18, 14:10

Happy Holidays Euclid and thanks for this great mod!

I'm not sure if this is intended behavior or not, but after I started my traders and miners using the mod, they stopped reporting to statistics page (i.e. number of trades, profit from trades, trade rank, etc.). Other than that, the mod has worked flawlessly for me :) :D

daego
Posts: 36
Joined: Tue, 2. Sep 08, 20:07
x4

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by daego » Fri, 21. Dec 18, 03:59

i use some Argon Drill Miner but they do not jump and dont use travel speed ?!

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

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by alt3rn1ty » Fri, 21. Dec 18, 22:31

Does AutoTrader clear away any stocks that did not get sold in time ?

X4 vanilla traders have an unfortunate issue of sometimes not selling wares because the trader was pipped at the post by another trader, and so the ship can slowly get clogged up with wares that never get sold ..

.. Would that scenario ever happen with AutoTrader, or does AutoTrader have the ability to sell wares that are left in limbo ?
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.

korvyr
Posts: 6
Joined: Fri, 7. Dec 18, 23:20
x4

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by korvyr » Sat, 22. Dec 18, 06:55

Could you add the means to modify the default settings? I did so by modifying the scripts a hair, but not everyone is capable of that.

E.g. Jump defaults to 0, and Know All Trades defaults to 0.

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

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by FalconGrey » Sat, 22. Dec 18, 17:48

alt3rn1ty wrote:
Fri, 21. Dec 18, 22:31
Does AutoTrader clear away any stocks that did not get sold in time ?

X4 vanilla traders have an unfortunate issue of sometimes not selling wares because the trader was pipped at the post by another trader, and so the ship can slowly get clogged up with wares that never get sold ..

.. Would that scenario ever happen with AutoTrader, or does AutoTrader have the ability to sell wares that are left in limbo ?
From the time I've run it, I've seen it sell even what the vanilla autotrader left behind so I'm going to say a tentative 'yes' to this...
It's not if we win or lose that matters, it's that we stood and faced it.

TZER
Posts: 30
Joined: Sun, 29. Nov 09, 20:34
x4

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by TZER » Sun, 23. Dec 18, 02:01

[Suggestion] I'd for one would love to be able to blacklist sectors from trade/mining to avoid needless slaughter of ships, it's really irritating when traders run into sectors that are obviously no longer safe. :)

mellimell
Posts: 31
Joined: Wed, 30. Mar 16, 18:28
x4

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by mellimell » Sun, 23. Dec 18, 10:18

korvyr wrote:
Sat, 22. Dec 18, 06:55
Could you add the means to modify the default settings? I did so by modifying the scripts a hair, but not everyone is capable of that.

E.g. Jump defaults to 0, and Know All Trades defaults to 0.
Care to share your personal mod? I'd be highly interested in your modified defaults.

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

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by euclid » Sun, 30. Dec 18, 14:30

Was close korvyr ;-)

To modify the default settings to non-cheat you need to change all "true" in lines 43 to 67 of EuclidsAutoTraderAlt.xml to "false".

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

Endeavour79
Posts: 287
Joined: Fri, 29. Nov 13, 23:14
x4

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by Endeavour79 » Wed, 9. Jan 19, 10:46

@Euclid, Could you rework your mod to make it less spammy in the logbook and provide little more clear and usable information about trades and performance?
I love the mod, already did in XR, but the log is been flooded with a little useless info right now.

Cheers!

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

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by euclid » Wed, 9. Jan 19, 13:36

Hi Endeavour79 :-)

I'm not happy about the current report myself but it's a trade-off. It is possible to add info on the last finalized trade, like "bought x wares form y for z credits and sold them to p for q credits for a total profit of w credits". However, this would lead to even more spam in the player's logbook. I'll think about adding an option to enable/disable detailed trade reports. What kind of "information about trades and performance" would you like to see?

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

Endeavour79
Posts: 287
Joined: Fri, 29. Nov 13, 23:14
x4

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by Endeavour79 » Wed, 9. Jan 19, 18:46

Thanks for the quick response.

I could see a few ways for reporting:

1. Regular status update in Log
- Classified as Upkeep or Squad or something "not general", for easier filtering
- Providing overall info like profit total, average time on a trade, distance travelled, AT config option values, top 3 goods sold most

2. Detailed report - ad hoc - via comms menu
- All of the above
- Plus what you mentioned for current trade
- Status of current task/activity

Lastly, a whole analytics and charting UI for the AT performance would be awesome but I'd think that's likely a whole new project itself :)

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

Re: [MOD] AutoTrader with Options ver. 0.5 Dec 17, 2018

Post by euclid » Thu, 10. Jan 19, 17:43

Thanks for the feedback Endeavour79 :-)

The current periodic info is already submitted to the "Upkeep" tab of the player's logbook. I've added info on the last trade to it (just one or two more lines). Testing it atm and will hopefully upload an update soon™ ;-)

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

Midge690
Posts: 2
Joined: Sat, 8. Dec 18, 12:02
x4

Re: [MOD] AutoTrader with Options ver. 0.6 Jan. 11, 2019

Post by Midge690 » Sat, 12. Jan 19, 19:19

doesnt seem to be working on the 1.51 beta

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

Re: [MOD] AutoTrader with Options ver. 0.6 Jan. 11, 2019

Post by euclid » Sun, 13. Jan 19, 14:18

Midge690 wrote:
Sat, 12. Jan 19, 19:19
doesnt seem to be working on the 1.51 beta
It works fine for me. What exactly is the problem?

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

ROMB
Posts: 5
Joined: Mon, 9. Mar 09, 09:41
x4

Re: [MOD] AutoTrader with Options ver. 0.6 Jan. 11, 2019

Post by ROMB » 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

Code: Select all

<set_value name="$buyoffer" exact="$buyoffertmp" />
Hope that helps :)

SyNTHETyC3456
Posts: 1
Joined: Fri, 11. Jan 19, 06:04
x4

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

Post by SyNTHETyC3456 » Wed, 6. Feb 19, 01:07

Kadatherion wrote:
Mon, 10. Dec 18, 19:15
Hey Euclid, you should add the other language ids to the content.xml.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<content id="AuT" name="AutoTrader" description="A Fire-and-Forget Trader or Miner" author="Euclid" version="0.1" date="2018-10-12" save="0" enabled="1">
  <text language="7" name="AutoTrader" description="The Universe Trader is back with a Vengeance" author="Euclid" />
  <text language="33" name="AutoTrader" description="The Universe Trader is back with a Vengeance" author="Euclid" />
  <text language="34" name="AutoTrader" description="The Universe Trader is back with a Vengeance" author="Euclid" />
  <text language="39" name="AutoTrader" description="The Universe Trader is back with a Vengeance" author="Euclid" />
  <text language="44" name="AutoTrader" description="The Universe Trader is back with a Vengeance" author="Euclid" />
  <text language="49" name="AutoTrader" description="The Universe Trader is back with a Vengeance" author="Euclid" />
  <text language="86" name="AutoTrader" description="The Universe Trader is back with a Vengeance" author="Euclid" />
  <text language="88" name="AutoTrader" description="The Universe Trader is back with a Vengeance" author="Euclid" />
 </content>
Otherwise, as it happens for all mods, the game crashes/freezes on load for those who don't have the game installed on English Steam (not sure if the same happens to GoG users). This is from the root game dir. If you install mods without the dummy language ids under /documents, the game loads, but it's also been reported that while the game interface recognizes the mods as active, they often won't work / don't work as intended.

On the Nexus, on the sector satellites mod first but on other ones too, it also seems to have been confirmed that new game content (not the case of this mod, but I've seen they reported something like this for your jump/anomaly mod) indeed needs to be placed into .cat files, as loose files will cause the game to crash on load for Win7 users. That's a behavior that isn't as confirmed as the language ids one, so it might not be 100% sure yet, but as a Win7 user myself I can testify it indeed seems to work like that for me.
This. All of this. Resolved the issues with the game locking up on launch with certain mods. Using Win 7 as well.

Endeavour79
Posts: 287
Joined: Fri, 29. Nov 13, 23:14
x4

Re: [MOD] AutoTrader with Options ver. 0.6 Jan. 11, 2019

Post by Endeavour79 » Wed, 13. Feb 19, 06:48

Hi Euclid, any chance we could get an updated version that eliminates the negative profit trades?

Post Reply

Return to “X4: Foundations - Scripts and Modding”