[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
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13292
Joined: Sun, 15. Feb 04, 20:12
x4

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

Post by euclid » Mon, 17. Dec 18, 00:17

NightlinerSGS wrote:
Sun, 16. Dec 18, 21:29
...............
I also saw some irregularities with the trades. My L trader didn't make anything for a while, then transferred over 7m at once (!), then made several trades with 100-200k profits and a few with 100k losses.

I also saw an M trader getting stuck on the ring... but without the trade being visible in the order window, it's impossible to see where he's supposed to go or what his actual order is. :(
Hi NightlinerSGS :-)

Are you running the latest version 0.3? I'm asking because there was a bug that could cause a temporary profit loss if you have many autotrader running. But this has been fixed in 0.3. It may also be a conflict with some other mod. And concerning ".....didn't make anything for a while....." this can have many reasons. There is a wait time (cooldown) between consecutive trades which decreases with increasing average skill of the autotrader's crew. And then there simply may be no trade available which causes another wait. This may happen rather frequently if you have set "Known" to false.

The "stuck on the ring" thing sounds interesting. Could you please provide more info?

And finally, you cannot "see" what he is doing but he will send regular reports to your player log. As long as there is a star "*" behind the captain's name the autotrader is active even if you do not see any command, no order or for many minutes no activity.

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

ranykt
Posts: 9
Joined: Mon, 27. Apr 15, 21:28
x4

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

Post by ranykt » Mon, 17. Dec 18, 00:42

ranykt wrote:
Sun, 16. Dec 18, 21:17
BUG!

Can't start autominer unless i follow these steps:
1. Comm in and tell them they can't "Know all Trade"
2. Wait 5+ seconds in the map
3. Comm in and tell them to AutoTrade

And that's if it works at first. If it doesn't, then I have to add more 5 second waits:
1. Comm in and tell them to stop AutoTrade
2. Wait 5+ seconds in the map
3. Comm in and tell them that they can "Know all Trade"
4. Wait 5+ seconds in the map
5. Comm in and tell them they can't "Know all Trade"
6. Wait 5+ seconds in the map
7. Comm in and tell them to AutoTrade

And that's if I'm lucky, because one took me 3 attempts to launch.
So in review, this only seems to work with a few miners. i was trying to set up 10 L and 20 M and it functioned like absolute crap, not to mention that after 25 it didn't work at all. I couldn't start the 26th after 20 minutes of trying the above. I sold everything and started anew after reinstalling the mod. There are still some issues with 2xG/S miners, but it's significantly faster that default.

With 25 miners, it scaled up gathering as their storage was filled. I.e., an empty vessel would gather 1-1-2-2-3-3-4-4-5-5-6-6, etc, every 10 ingame minutes. Once it was in the thousands, it would gather hundreds. But each of these are 10 ingame minutes, so it would take forever to fill.

I'm also noticing that everything seems to be based on 10 minute timers. Gathering and unload are both based on 10 minute timers. My miners will sit outside my PHQ for 10 minutes before returning to mining, and they don't always drop everything. Seems like there's a threshold, among other things. I've seen them return at 100% capacity, 50% capacity, and 40% capacity. I'm currently back up to 4 L miners for my PHQ. Is there a way to scale this timeframe down? If it transfers all/most of their inventory, why do they need to sit for so long?
Last edited by ranykt on Mon, 17. Dec 18, 00:50, edited 1 time in total.

ranykt
Posts: 9
Joined: Mon, 27. Apr 15, 21:28
x4

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

Post by ranykt » Mon, 17. Dec 18, 00:45

euclid wrote:
Mon, 17. Dec 18, 00:01
ranykt wrote:
Sun, 16. Dec 18, 21:17
BUG!

Can't start autominer unless i follow these steps:
1. Comm in and tell them they can't "Know all Trade"
2. Wait 5+ seconds in the map
3. Comm in and tell them to AutoTrade

And that's if it works at first. If it doesn't, then I have to add more 5 second waits:
1. Comm in and tell them to stop AutoTrade
2. Wait 5+ seconds in the map
3. Comm in and tell them that they can "Know all Trade"
4. Wait 5+ seconds in the map
5. Comm in and tell them they can't "Know all Trade"
6. Wait 5+ seconds in the map
7. Comm in and tell them to AutoTrade

And that's if I'm lucky, because one took me 3 attempts to launch.
Hi ranykt :-)

Except your even step numbers this is exactly how you start the AutoTrader and set the options (see OP). So I do not understand A) why you think you need to wait at least 5 seconds and B) why you think it takes "3 attempts to launch" ? How do you know "if it works"?

And this is for everyone: Please, don't get me wrong. I do appreciate bug reports/feedback but it will be very difficult for me to find the bug or change anything if the information provided is rather vague.

Cheers Euclid
You say that, but if i tried to do this faster, they would never launch. I'd sit there for 10 IRL minutes and none of them would never move. These steps are what it took to even get them started. My above post explains what I've experienced.

TearsInRain
Posts: 73
Joined: Fri, 30. Nov 18, 00:32
x4

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

Post by TearsInRain » Mon, 17. Dec 18, 02:02

just an idea here mate .... instead of the wait times built into the script to make the expert pilots better, why not try something like this

1 star pilots, ignore the top five trades that would be possible when it calculates what it should do..
2 star pilots, ignore the top four trades etc
5 star pilots, do the best trade it can do..

That stops the need for it to sit around and wait.. kicks the economy along a little, and still gives you some benefit for levelling up.

desius
Posts: 281
Joined: Mon, 21. Jun 04, 18:06
x4

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

Post by desius » Mon, 17. Dec 18, 03:46

euclid wrote:
Mon, 17. Dec 18, 00:17
The "stuck on the ring" thing sounds interesting. Could you please provide more info?
I'd love to give more details but I don't have a debug client with the ability to look at running scripts like I used to have when I beta'd X:R. This time around I'm 'just a player'. :mrgreen:
I can say that I have a friend in the exact same boat. 1.5beta + 0.3 of this script and eventually every auto(miner/trader) gets stuck circling around the superhighway/gate loop.

I can send a savefile if you want to PM me a location to mail it.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

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

Post by BlackRain » Mon, 17. Dec 18, 03:47

It's not just the miners. I have several autotraders and they constantly end up going around the superhighways non stop and not trading once they get stuck in this loop. There is definitely an issue here.

reqw
Posts: 101
Joined: Sat, 13. Jan 07, 15:23
x4

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

Post by reqw » Mon, 17. Dec 18, 07:50

Question If i set up a wing with autotraders from this mod will they independantly do trade in the wing or will they all follow the leaders trade ?

Grabowski
Posts: 5
Joined: Mon, 17. Dec 18, 10:12

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

Post by Grabowski » Mon, 17. Dec 18, 10:54

autotaders just went wild. they started makin debts to buy wares and then made profit exponential. like from a 1000 000 to -1 000 000, to 2 000 000 to -4 000 000 to 8 000 000 to -16 000 000. after like one hour im at 100 000 000 000 000 credits. traders doing single trades over billions of dollars....

even at minus 300 000 000 000 there havent been any wares in the cargospace of the traders . im confused

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 » Mon, 17. Dec 18, 14:11

euclid wrote:
Mon, 17. Dec 18, 00:17

- snip -
Yeah, I'm running 0.3, it's also the first version I had. I don't have any other mods that should do something there, only some damage/shield balance mods and Fly-by-looting I think.

Maybe the wait time is a tad bit long? Also, they got caught by police very often when carrying illegal wares as opposed to manual traders who dock faster (or at all).

I had 3 M traders running the software. One of them just flew around on the ring without exiting it, I watched him flying the full ring at least 3 times before I cancelled the autotrader.

I also saw something similar to what Grabowski described. My L trader didn't spend any money at all to buy wares, or such a small amount that I didn't notice, yet he suddenly gave me 7m credits. Which was a lot, considering I only had 14m and that was the biggest I ever had so far... :p

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

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

Post by euclid » Mon, 17. Dec 18, 16:04

New version (0.4) uploaded that adds a condition preventing autominers to harvest in enemy systems.

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

maxolina
Posts: 130
Joined: Sun, 17. Jul 11, 16:02
x4

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

Post by maxolina » Mon, 17. Dec 18, 17:58

On the first page, you replied to someone saying even the vanilla AutoTrader has a jump feature.

Could you explain that a little more in detail? As I have not seen such a thing in-game yet. How does it work and when does the vanilla game make use of it?
lol

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

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

Post by FalconGrey » Mon, 17. Dec 18, 18:08

My autotraider who is a subordinate to my powerstation (Mercury) no longer has the 'autotrader' menu under the comms menu in the new version.
It's not if we win or lose that matters, it's that we stood and faced it.

desius
Posts: 281
Joined: Mon, 21. Jun 04, 18:06
x4

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

Post by desius » Mon, 17. Dec 18, 20:49

FalconGrey wrote:
Mon, 17. Dec 18, 18:08
My autotraider who is a subordinate to my powerstation (Mercury) no longer has the 'autotrader' menu under the comms menu in the new version.
Is it docked? I noticed autotrader context doesn't appear if a ship is docked.

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

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

Post by FalconGrey » Mon, 17. Dec 18, 20:56

Nope in space. Still auto trading.
It's not if we win or lose that matters, it's that we stood and faced it.

Grabowski
Posts: 5
Joined: Mon, 17. Dec 18, 10:12

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

Post by Grabowski » Mon, 17. Dec 18, 21:27

they did the same for me @ alexaslp

can u post a list of ur mods? maybe we can figure out if its another mod or not...

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

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

Post by FalconGrey » Mon, 17. Dec 18, 22:04

Grabowski wrote:
Mon, 17. Dec 18, 21:27
they did the same for me @ alexaslp

can u post a list of ur mods? maybe we can figure out if its another mod or not...
Sure, but I think I figured it out. After I changed the freighter's "Reactions to events" to "Use Global Settings" the option returned. When I switched it back to manual settings, then it went back to not being there. So it seems to be connected though it may be linked to one of the mods conflicting.

List of mods:

AutoTraderOptions
CAS - community-created gamestarts (Installed but haven't actually used one of these starts Used the original tutorial start)
Collect Inv Wares
fix bail chance
Fix Illegal Buy
Improved Explore Behavior
More NPC
More Chaff
PHQ Warp
Various NPCs
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: 13292
Joined: Sun, 15. Feb 04, 20:12
x4

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

Post by euclid » Mon, 17. Dec 18, 22:44

Uploaded version 0.5 which removes the ability to use highways. Please see OP for details and also the newly added Q&A sections.

This will be the last update this year.

A Merry Christmas and a Happy 2019 :-)

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

o-papaya-o
Posts: 42
Joined: Sun, 29. Mar 09, 11:53
x4

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

Post by o-papaya-o » Mon, 17. Dec 18, 23:59

thank you, merry christmas and happy new year Euclid
C’est en voyant un moustique se poser sur ses coui**** que l’on s’aperçoit qu’on ne peut pas régler tous les problèmes par la violence.

desius
Posts: 281
Joined: Mon, 21. Jun 04, 18:06
x4

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

Post by desius » Tue, 18. Dec 18, 01:31

euclid wrote:
Mon, 17. Dec 18, 22:44
Uploaded version 0.5 which removes the ability to use highways. Please see OP for details and also the newly added Q&A sections.

This will be the last update this year.

A Merry Christmas and a Happy 2019 :-)

Cheers Euclid
Thanks Euclid! Merry Christmas to you too!

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 » Tue, 18. Dec 18, 02:18

Merry Christmas Euclid and Happy New Years! :D Thanks for working on this mod! :D
It's not if we win or lose that matters, it's that we stood and faced it.

Post Reply

Return to “X4: Foundations - Scripts and Modding”