[WIP][Mod]TaterTrader v4- An Autotrade Alternative

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

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

ludsoe
Posts: 21
Joined: Fri, 13. Nov 09, 03:12
x4

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by ludsoe »

argon_emperor wrote: Thu, 20. Dec 18, 12:04 Are these traders regularly meant to take breaks? I had two going (one Mercury, one Helios), on all legal wares, and they at first did nothing for quite a while... Then they did a few runs each, now they're back to doing nothing again. I tried changing the Mercury to just handle E Cells (want to eventually get a few going for each product group), but still doing nothing :/
Depending on your settings, they could be searching for deals. Ill see if i can find a way to display that to stop any misconceptions.

The traders work by scanning every single wares trade deals in range to find the most profitable run, this takes time depending on the ware and scan size. Energy cells for example are used by every station which results in them taking forever to search for. I could also try optimizing deal searcher further, in a attempt to trim speed the process up.
argon_emperor
Posts: 1225
Joined: Mon, 12. Dec 05, 07:41
x4

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by argon_emperor »

ludsoe wrote: Thu, 20. Dec 18, 12:30
argon_emperor wrote: Thu, 20. Dec 18, 12:04 Are these traders regularly meant to take breaks? I had two going (one Mercury, one Helios), on all legal wares, and they at first did nothing for quite a while... Then they did a few runs each, now they're back to doing nothing again. I tried changing the Mercury to just handle E Cells (want to eventually get a few going for each product group), but still doing nothing :/
Depending on your settings, they could be searching for deals. Ill see if i can find a way to display that to stop any misconceptions.

The traders work by scanning every single wares trade deals in range to find the most profitable run, this takes time depending on the ware and scan size. Energy cells for example are used by every station which results in them taking forever to search for. I could also try optimizing deal searcher further, in a attempt to trim speed the process up.
A notification that it's doing something would be awesome :) Not overly bothered by how long it takes, as long as I know it's actually doing something XD

Might restrict the range on it a bit then, currently have both buy and sell set to 30
[ 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
Invasion
Posts: 212
Joined: Tue, 11. Dec 18, 10:14

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by Invasion »

This WIP mod already works really well. Thank you!
I won't ask for anything more, but in case you are looking to give us even more control, you can try this:

Image

You can ignore the "Home sector" and option to travel home, as it already exists in your mod.
Its basically from a mod request I put up a while ago. Because I was a looking for a way to absolutely confine my traders to my own stations.
<Blunt Threadslayer>
Making you sweat today, so you won't have to bleed tomorrow
mellimell
Posts: 31
Joined: Wed, 30. Mar 16, 18:28
x4

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by mellimell »

argon_emperor wrote: Thu, 20. Dec 18, 12:04 Are these traders regularly meant to take breaks? I had two going (one Mercury, one Helios), on all legal wares, and they at first did nothing for quite a while... Then they did a few runs each, now they're back to doing nothing again. I tried changing the Mercury to just handle E Cells (want to eventually get a few going for each product group), but still doing nothing :/
Same here. Always seems to stop working after a while...or sometimes even right from the start.
reqw
Posts: 101
Joined: Sat, 13. Jan 07, 15:23
x4

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by reqw »

Seting em up to only trade betwine my stations dont seam to work . atleast not for me
User avatar
Paddyy
Posts: 141
Joined: Sun, 12. Feb 06, 19:25
x3ap

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by Paddyy »

I lost 2 (vanilla) traders in my game because they kept trading with a pirate station. I hope this mod or the game will offer an option at some point to restrict traders from visiting certain sectors and/or factions.
siath70
Posts: 459
Joined: Sun, 11. Jan 04, 03:03
x4

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by siath70 »

Paddyy wrote: Thu, 20. Dec 18, 20:15 I lost 2 (vanilla) traders in my game because they kept trading with a pirate station. I hope this mod or the game will offer an option at some point to restrict traders from visiting certain sectors and/or factions.
He is working on that, I think.
morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by morbideth »

ludsoe wrote: Thu, 20. Dec 18, 12:30 Depending on your settings, they could be searching for deals. Ill see if i can find a way to display that to stop any misconceptions.
Try: <set_command_action commandaction="commandaction.calculating"/>
CaptainLocke
Posts: 4
Joined: Mon, 17. Dec 18, 23:56

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by CaptainLocke »

Ok, so for universe auto trading, this script is running perefectly and I love you for it.

However, I'm trying to sell my silicon wafers from my factory so I set Max sell to Max and Buy range to 0. I also set Owned Station Buy mod to 0, and Owned Station Sell to 200 because I was to sell my wafers, not buy new ones.

No matter what I do, my transport beelines for the nearest silicon refinery to buy wafers and sell to my station. In the logbook it claims it is buying wafers for 269 (it's actually buying at 261) and selling to my station for 329 (my station's buy order is for 269). This does not change no matter what I set the Owned Order sliders

*EDIT*
After further testing, if I throw station buy mod up to 200, it will stop trying to sell to my station. However, even if I set station sell mod to 0, it refuses to buy from my station, instead buying from any other silicon refinery nearby.
ludsoe
Posts: 21
Joined: Fri, 13. Nov 09, 03:12
x4

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by ludsoe »

CaptainLocke 's Quote
Show
CaptainLocke wrote: Fri, 21. Dec 18, 06:10 Ok, so for universe auto trading, this script is running perefectly and I love you for it.

However, I'm trying to sell my silicon wafers from my factory so I set Max sell to Max and Buy range to 0. I also set Owned Station Buy mod to 0, and Owned Station Sell to 200 because I was to sell my wafers, not buy new ones.

No matter what I do, my transport beelines for the nearest silicon refinery to buy wafers and sell to my station. In the logbook it claims it is buying wafers for 269 (it's actually buying at 261) and selling to my station for 329 (my station's buy order is for 269). This does not change no matter what I set the Owned Order sliders

*EDIT*
After further testing, if I throw station buy mod up to 200, it will stop trying to sell to my station. However, even if I set station sell mod to 0, it refuses to buy from my station, instead buying from any other silicon refinery nearby.
That's rather peculiar that the trader is ignoring your station, would it by chance be faction restricted? If that's the case try enabling freetrade. Also the trader doesn't actually transfer money when buying or selling to your stations, and see's the trade deals of player stations always at the average price. (Unless you use the trade value modifiers)
Paddyy 's Quote
Show
Paddyy wrote: Thu, 20. Dec 18, 20:15 I lost 2 (vanilla) traders in my game because they kept trading with a pirate station. I hope this mod or the game will offer an option at some point to restrict traders from visiting certain sectors and/or factions.
This is something I'm looking into, SCA have been blowing up my energy cell export ships as they try to supply energy to their stations.
reqw 's Quote
Show
reqw wrote: Thu, 20. Dec 18, 20:05 Seting em up to only trade betwine my stations dont seam to work . atleast not for me
That's not entirely officially supported currently, but you can try cranking the sell mod to 0 and boosting buy to 200. It should make the deals between player stations appear to be very profitable.
There seems to be a demand for locking the traders to supplying exclusively player owned stations, so I may include a setting for that in the next version.
CaptainLocke
Posts: 4
Joined: Mon, 17. Dec 18, 23:56

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by CaptainLocke »

My station isn't faction restricted, however I did turn on freetrader anyway. no change sadly. It's perfectly willing to sell to my station, but absolutely refuses to buy from.
CaptainLocke
Posts: 4
Joined: Mon, 17. Dec 18, 23:56

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by CaptainLocke »

Curiouser and Curiouser. I took silicon wafers out of the ware basket and added microchips. (it's a silicon > wafer > microchip factory) It sees the microchips as a $0 buy order and will snatch them up ASAP. However, for whatever reason it won't touch the wafers, even though there are buyers. When set to the wafers, it would prefer to buy them at a nearby refinery for 270 instead of my station which should be 0.

*EDIT* I bet it has something to do with the fact there's actually a buy AND sell order at my station for silicon wafers. Seems the script is only seeing one of them. Either that or it's a completely unrelated egosoft thing, because NPCs aren't buying my wafers either. Though they were before. Won't sell the energy cells, either.


*FINAL EDIT* It's an ego soft thing. Just looked at the trade offers my station has. Only buy orders for Wafers and Energy cells. It's not selling them, even though I have them set to sell!
Kamuchi_
Posts: 174
Joined: Fri, 7. Dec 18, 05:04
x4

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by Kamuchi_ »

CaptainLocke wrote: Fri, 21. Dec 18, 06:10 Ok, so for universe auto trading, this script is running perefectly and I love you for it.

However, I'm trying to sell my silicon wafers from my factory so I set Max sell to Max and Buy range to 0. I also set Owned Station Buy mod to 0, and Owned Station Sell to 200 because I was to sell my wafers, not buy new ones.

No matter what I do, my transport beelines for the nearest silicon refinery to buy wafers and sell to my station. In the logbook it claims it is buying wafers for 269 (it's actually buying at 261) and selling to my station for 329 (my station's buy order is for 269). This does not change no matter what I set the Owned Order sliders

*EDIT*
After further testing, if I throw station buy mod up to 200, it will stop trying to sell to my station. However, even if I set station sell mod to 0, it refuses to buy from my station, instead buying from any other silicon refinery nearby.
CaptainLocke.
Set buy price to 0: the trader wil see it gets it for free.
Set the sell price to 0: Trader will see it's not making any money and will find better trades from npc stations.

https://i.imgur.com/1wXbu4B.png

I have this running for 15 traders on 1 station and it works great :)

CaptainLocke wrote: Fri, 21. Dec 18, 07:18*FINAL EDIT* It's an ego soft thing. Just looked at the trade offers my station has. Only buy orders for Wafers and Energy cells. It's not selling them, even though I have them set to sell!
If it's a small inventory that you are seeing with no sell order then I'm seeing this aswel.
I think the station keeps a small reserve in stock for production befor it sets a sell order at the maximum price, something of a buffer incase it takes a while befor the next trader/miner arrives and in that case it makes sense thankfully lol
Invasion
Posts: 212
Joined: Tue, 11. Dec 18, 10:14

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by Invasion »

Its just the bewildering station AI that is causing all the buy/sell issues especially with assigned ships. It seems to prefer putting up sell offers for wares that is most plentiful, yet automatically adjusts down the sell price when its got lots to sell.
<Blunt Threadslayer>
Making you sweat today, so you won't have to bleed tomorrow
daego
Posts: 36
Joined: Tue, 2. Sep 08, 20:07
x4

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by daego »

is it possible to add a button like "Add all Trade Wares" ?
maybe in the wares list, a button top of it, colored maybe red or green ?

or a checkbox under Freetrade
- Trade all Wares
- Trade all but only Legal

i hate it to klick 72 times for a standard sektor trader :evil:
User avatar
OneOfMany
Posts: 448
Joined: Thu, 15. May 14, 14:25
x4

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by OneOfMany »

Wonderful addition to the game.

As the trader finds a run he logs a msg regarding potential profit from the 2 trades lined up Any chance you could colour either the msg or the title in the log. Just to make it easier to pick out.
Elephant42
Posts: 23
Joined: Tue, 11. Dec 18, 06:39

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by Elephant42 »

Using this mod nicely, thanks for sharing.

Noob question: what do the options "Owned Station Buy Mod:" and "Owned Station Sell Mod:" do?
mellimell
Posts: 31
Joined: Wed, 30. Mar 16, 18:28
x4

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by mellimell »

I can get 3 or 4 traders to work but any additional stay around doing nothing....
ludsoe
Posts: 21
Joined: Fri, 13. Nov 09, 03:12
x4

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by ludsoe »

OneOfMany wrote: Sat, 22. Dec 18, 22:43 Wonderful addition to the game.

As the trader finds a run he logs a msg regarding potential profit from the 2 trades lined up Any chance you could colour either the msg or the title in the log. Just to make it easier to pick out.
I don't believe I can color the log, unless you know of a example somewhere I can peek at.

Elephant42 wrote: Sun, 23. Dec 18, 01:27 Using this mod nicely, thanks for sharing.

Noob question: what do the options "Owned Station Buy Mod:" and "Owned Station Sell Mod:" do?
Those affect the prices the traders see at player owned stations.

mellimell wrote: Sun, 23. Dec 18, 01:28 I can get 3 or 4 traders to work but any additional stay around doing nothing....
What kind of settings are you using? If you have large search ranges and a lot of enabled wares it can take time to calculate trade routes. But it seems you're problem is more in the realm that your first 3/4 traders might be snatching up all the deals before the others can react.
mellimell
Posts: 31
Joined: Wed, 30. Mar 16, 18:28
x4

Re: [WIP][Mod]TaterTrader v2- An Autotrade Alternative

Post by mellimell »

ludsoe wrote: Sun, 23. Dec 18, 02:21
mellimell wrote: Sun, 23. Dec 18, 01:28 I can get 3 or 4 traders to work but any additional stay around doing nothing....
What kind of settings are you using? If you have large search ranges and a lot of enabled wares it can take time to calculate trade routes. But it seems you're problem is more in the realm that your first 3/4 traders might be snatching up all the deals before the others can react.
I'm using them all on max buy/sell distance and 'all wares'.

I have about 30 trade vessels and most of them use the regular auto trade (all wares + max distance).

Return to “X4: Foundations - Scripts and Modding”