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

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

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

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

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

Post by argon_emperor » Fri, 4. Jan 19, 01:42

ludsoe wrote:
Fri, 4. Jan 19, 01:27

Speaking of V4's Beta, dunno who noticed. But Ive been throwing beta's secretly up on the nexus site. And I just put up the third beta release. (Hopefully its good enough to move as a full release. But I probably missed something again.)
V4 Setting CheatSheet
Show
Image
Been waiting to find out what changes were made with v4, saw the betas but had no idea what you'd changed in them XD

I like idea of restricting trade from factions, will make it easier to control where they go 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

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

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

Post by BlackRain » Fri, 4. Jan 19, 04:16

ludsoe wrote:
Fri, 4. Jan 19, 01:27
LegionOfOne 's Post
Show
LegionOfOne wrote:
Thu, 3. Jan 19, 20:18
Your scripts work great when trading from one system to another, with at least 1 jump involved. And they bring a massive improvement over vanilla behavior, so well done !

But : I can't get them to work at all when I try in-system trade, with no jumps involved. Also, the homebound option always puts my ships in an endless loop of docking-undocking.
Scenarios that don't work
Show
I have a station that uses raw resources, with plenty of these resources in the same system. Stores are empty so prices are at max.
I take a mining ship (currently idling in the same sector) and task it to mine with your script, affecting it to the station,setting the jump ranges to more than 0 and setting price mod to 200% for my stations.
The mining ship should sell to my station, since the price is at max and has 200% modifier on top.

Yet the mining ship will only sell to clients at least 1 jump away. If I set the jump range to 0, or to 1 but blacklist every neighbouring sector, the mining ship will just idle.

But whatever I did, I could never, EVER, get it to sell to my station...

Same thing basically with trading ships : if they buy in one sector, they HAVE to sell in a different sector or they will just idle.

As for homebound, every ship I ever tried it on got stuck in a look of docking-undocking orders. Most of them never actually undocked, just lost their dock order, and got it back before they had time to undock.

If you can fix these issues, your scripts will be absolute must-haves, to the point where I will look into making the Ai stop using vanilla trade as well.
That sounds odd, what version are you using? The same sector trading should work, what settings are you using? As for the homebound re-docking issue, that's the trader not finding a deal and returning home. (Except its already home.) So Ill have to setup some sort of check to prevent this behavior.

Also, what do you mean you put TaterTrader on a mining ship? Wouldn't that cancel the mining default behavior?
BlackRain 's Post
Show
BlackRain wrote:
Tue, 1. Jan 19, 03:17
There are a couple of errors in the script for this mod which is why exclude sector and possibly some other things are not working correctly. They are very minor errors which I already fixed in the files I have.

If anyone is interested, just copy and paste the code into their tatertrade script in the mod folder. Need to overwrite the whole thing.
I snipped the code bit out, you can look back at their original post for it.
I'm going to look at the changes you did, some of the issues you fixed might be in the V4 beta since I started doing that before i saw this.


Speaking of V4's Beta, dunno who noticed. But Ive been throwing beta's secretly up on the nexus site. And I just put up the third beta release. (Hopefully its good enough to move as a full release. But I probably missed something again.)
V4 Setting CheatSheet
Show
Image
I dont even know if what I did truly fixed anything, one mistake was just a space you missed and the others not sure if it worked but i no longer got the errors. I switched to your beta version already but didnt have time to look for errors

LegionOfOne
Posts: 122
Joined: Sun, 16. Dec 18, 13:16
x4

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

Post by LegionOfOne » Fri, 4. Jan 19, 15:08

ludsoe wrote:
Fri, 4. Jan 19, 01:27
That sounds odd, what version are you using?
Yeah, sorry, pretty sure it was one of your beta versions (I did notice !). Zip file says 3.5, but there's no 3.5 version listed anywhere, so you tell me :)
Anyway, disregard the bug report for now. I grabbed the latest beta, I'll be back after some tests.
Also : the addition of 'Station trader', 'Station smuggler', 'Check distance', 'Scan speed'... All great ideas, if you can get all that to WAD this script will be amazing !

Thanks for your efforts !

Cabraca
Posts: 2
Joined: Sat, 5. Jan 19, 11:42

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

Post by Cabraca » Sat, 5. Jan 19, 11:51

first let me say thanks for that great mod. finally my maja dust trader is working.

for people like me, that parse their savegame and analyze the playerlog it would be cool to find the ship id and not only the ship name (because id is unique, name is not)
and even for people that dont parse the log a better distinction what ship is trading would be of much help.

maybe a public github repository would be cool, so people can submit their changes

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

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

Post by ludsoe » Sat, 5. Jan 19, 14:26

Cabraca 's Post
Show
Cabraca wrote:
Sat, 5. Jan 19, 11:51
first let me say thanks for that great mod. finally my maja dust trader is working.

for people like me, that parse their savegame and analyze the playerlog it would be cool to find the ship id and not only the ship name (because id is unique, name is not)
and even for people that dont parse the log a better distinction what ship is trading would be of much help.

maybe a public github repository would be cool, so people can submit their changes
Ive been toying with the idea of adding the ship id to the log, but I suppose I should just get around and do it now.

Also Ill have to think about a public code repository, would it be a way for people to suggest fix's and improvements?
My biggest concern is my weird coding style of throwing code at the wall till it works, I tend to go through many changes internally before I reach a stage where i consider it a new release version.

Buzz2005
Posts: 2193
Joined: Sat, 26. Feb 05, 01:47
x4

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

Post by Buzz2005 » Sat, 5. Jan 19, 16:06

can I make a suggestion for V4, make a preset for highway circle sectors
Fixed ships getting spawned away from ship configuration menu at resupply ships from automatically getting deployables.

Chebz
Posts: 25
Joined: Wed, 26. Dec 18, 08:21

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

Post by Chebz » Sun, 6. Jan 19, 00:15

eventus wrote:
Mon, 31. Dec 18, 15:28
Chebz wrote:
Mon, 31. Dec 18, 00:22
Seems that excluded sectors functionality isn't working. I've excluded couple pirate sectors but my traders still going there all the time.
It's stated in documentation, that path finding is not adaptable without major rewriting.
Therefore you traders should only fly through those sectors and buy e.g a sector behind.

If they are still buying and selling in such sectory please specify - this would be unintended per my undestanding.
I've excluded specific sector Nopileous' Fortune II, I still see them going there all the time to sell and dying to pirates :/

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

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

Post by ludsoe » Sun, 6. Jan 19, 02:57

Chebz wrote:
Sun, 6. Jan 19, 00:15
eventus wrote:
Mon, 31. Dec 18, 15:28
Chebz wrote:
Mon, 31. Dec 18, 00:22
Seems that excluded sectors functionality isn't working. I've excluded couple pirate sectors but my traders still going there all the time.
It's stated in documentation, that path finding is not adaptable without major rewriting.
Therefore you traders should only fly through those sectors and buy e.g a sector behind.

If they are still buying and selling in such sectory please specify - this would be unintended per my undestanding.
I've excluded specific sector Nopileous' Fortune II, I still see them going there all the time to sell and dying to pirates :/
Are you on the beta or v3? V3 has a bug preventing exclusion from working. Should be working on the beta.

Chebz
Posts: 25
Joined: Wed, 26. Dec 18, 08:21

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

Post by Chebz » Sun, 6. Jan 19, 06:21

I was on v3, just updated thanks.

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

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

Post by ludsoe » Sun, 6. Jan 19, 08:45

Chebz wrote:
Sun, 6. Jan 19, 06:21
I was on v3, just updated thanks.
Before you report back, I just found out that the problem persisted into V4 beta. I sat down and hunted it down though, so the next release/beta whatever I do will have it fixed.
If you want the fix now, Its on the git-hub version.

Cabraca
Posts: 2
Joined: Sat, 5. Jan 19, 11:42

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

Post by Cabraca » Sun, 6. Jan 19, 12:14

ludsoe wrote:
Sat, 5. Jan 19, 14:26
My biggest concern is my weird coding style of throwing code at the wall till it works, I tend to go through many changes internally before I reach a stage where i consider it a new release version.
nothing to be ashamed of ... thats how everyone does it ...
ludsoe wrote:
Sat, 5. Jan 19, 14:26
Also Ill have to think about a public code repository, would it be a way for people to suggest fix's and improvements?
not just suggest them, they can even submit fixes so you just have to test and merge them (if you want).
with the integrated ticket system you can better keep track of bugs or discuss possible changes.

XTC0R
Posts: 401
Joined: Sat, 1. Dec 18, 19:58
x4

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

Post by XTC0R » Wed, 9. Jan 19, 20:59

I tested v4 of TT and wanted to setup a freighter to deliver smart-chips to a Teladi wharf and always consider my mega complex in Argon prime as possible buy option for smart-chips. So I set it up like this: (Sorry I play in german)

Spoiler
Show
Image
But instead the freighter bought "Raumsprit" (Spacefuel). I noticed this two times in a row, now posting here :)
Spoiler
Show
Image
The wharf I choosed as home sector / station is completly empty of smart-chips.
Spoiler
Show
Image
Is something wrong how I did set it up?

TeiwazVIE
Posts: 4
Joined: Wed, 26. Dec 18, 13:49
x4

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

Post by TeiwazVIE » Wed, 9. Jan 19, 22:48

What's the "Check distance" option for? It's missing in the options description.

User avatar
TDuke
Posts: 11
Joined: Fri, 4. Jan 19, 22:13
x4

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

Post by TDuke » Wed, 9. Jan 19, 23:10

TeiwazVIE wrote:
Wed, 9. Jan 19, 22:48
What's the "Check distance" option for? It's missing in the options description.
If turned on that checks th eamount of gates/jumps the trader would have to do. Can't tell you if it increases the search time as i dont turn it on.
Help costs nothing. Neither does kindness. Spread it.
Death to Xenon and Paranids! :?

~Beginner Modder~

TeiwazVIE
Posts: 4
Joined: Wed, 26. Dec 18, 13:49
x4

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

Post by TeiwazVIE » Wed, 9. Jan 19, 23:23

TDuke wrote:
Wed, 9. Jan 19, 23:10
If turned on that checks th eamount of gates/jumps the trader would have to do. Can't tell you if it increases the search time as i dont turn it on.
And the trader does what exactly with that info? Does it favor lesser profit for f.e. 20% less jumps?
Thx for the info anyways ;-)

User avatar
TDuke
Posts: 11
Joined: Fri, 4. Jan 19, 22:13
x4

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

Post by TDuke » Wed, 9. Jan 19, 23:37

TeiwazVIE wrote:
Wed, 9. Jan 19, 23:23
TDuke wrote:
Wed, 9. Jan 19, 23:10
If turned on that checks th eamount of gates/jumps the trader would have to do. Can't tell you if it increases the search time as i dont turn it on.
And the trader does what exactly with that info? Does it favor lesser profit for f.e. 20% less jumps?
Thx for the info anyways ;-)
No clue, as said i don't run it on it might affect the logbook, as far as i can think of. If maximed profit isn't the goal turn freetrade on. Will take alot less time to find orders. But in extent your profit won't be the highest. I suggest SETA.. And watch the universe become yours. You're welcome hopefully i didn't mistake anything for wrong otherwise, people are free to correct me. :)
Help costs nothing. Neither does kindness. Spread it.
Death to Xenon and Paranids! :?

~Beginner Modder~

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

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

Post by ludsoe » Thu, 10. Jan 19, 03:13

XTC0R 's Post
Show
XTC0R wrote:
Wed, 9. Jan 19, 20:59
I tested v4 of TT and wanted to setup a freighter to deliver smart-chips to a Teladi wharf and always consider my mega complex in Argon prime as possible buy option for smart-chips. So I set it up like this: (Sorry I play in german)

Spoiler
Show
Image
But instead the freighter bought "Raumsprit" (Spacefuel). I noticed this two times in a row, now posting here :)
Spoiler
Show
Image
The wharf I choosed as home sector / station is completly empty of smart-chips.
Spoiler
Show
Image
Is something wrong how I did set it up?
That's.... Actually really odd. Are Station Trader/Station Smuggler enabled?
If you have Station Trader enabled it should of ignored illegal wares, unless you have license to sell them.

If station trader and station smuggler are disabled, and its still acting like this. Then there's a major issue somewhere.
TDuke 's Post
Show
TDuke wrote:
Wed, 9. Jan 19, 23:37
TeiwazVIE wrote:
Wed, 9. Jan 19, 23:23
TDuke wrote:
Wed, 9. Jan 19, 23:10
If turned on that checks th eamount of gates/jumps the trader would have to do. Can't tell you if it increases the search time as i dont turn it on.
And the trader does what exactly with that info? Does it favor lesser profit for f.e. 20% less jumps?
Thx for the info anyways ;-)
No clue, as said i don't run it on it might affect the logbook, as far as i can think of. If maximed profit isn't the goal turn freetrade on. Will take alot less time to find orders. But in extent your profit won't be the highest. I suggest SETA.. And watch the universe become yours. You're welcome hopefully i didn't mistake anything for wrong otherwise, people are free to correct me. :)
I'm sure you mean, 'FastTrade' as that's the one that trims the calculation times down. The names pretty similar so that's an easy mistake.

Also 'Check Distance' takes the distance between the trader, and the two stations its trading with. Then basically subtracts 2% from the deals rating for each jump it has to do.
And No, enabling it doesn't affect calculation time. Hope that clears up any questions.

On a side note, I may expose the penalty per jump as a configurable slider to allow people to control how aggressively they want to trim based on distance.

User avatar
TDuke
Posts: 11
Joined: Fri, 4. Jan 19, 22:13
x4

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

Post by TDuke » Thu, 10. Jan 19, 03:28

ludsoe wrote:
Thu, 10. Jan 19, 03:13
XTC0R 's Post
Show
XTC0R wrote:
Wed, 9. Jan 19, 20:59
I tested v4 of TT and wanted to setup a freighter to deliver smart-chips to a Teladi wharf and always consider my mega complex in Argon prime as possible buy option for smart-chips. So I set it up like this: (Sorry I play in german)

Spoiler
Show
Image
But instead the freighter bought "Raumsprit" (Spacefuel). I noticed this two times in a row, now posting here :)
Spoiler
Show
Image
The wharf I choosed as home sector / station is completly empty of smart-chips.
Spoiler
Show
Image
Is something wrong how I did set it up?
That's.... Actually really odd. Are Station Trader/Station Smuggler enabled?
If you have Station Trader enabled it should of ignored illegal wares, unless you have license to sell them.

If station trader and station smuggler are disabled, and its still acting like this. Then there's a major issue somewhere.
TDuke 's Post
Show
TDuke wrote:
Wed, 9. Jan 19, 23:37
TeiwazVIE wrote:
Wed, 9. Jan 19, 23:23


And the trader does what exactly with that info? Does it favor lesser profit for f.e. 20% less jumps?
Thx for the info anyways ;-)
No clue, as said i don't run it on it might affect the logbook, as far as i can think of. If maximed profit isn't the goal turn freetrade on. Will take alot less time to find orders. But in extent your profit won't be the highest. I suggest SETA.. And watch the universe become yours. You're welcome hopefully i didn't mistake anything for wrong otherwise, people are free to correct me. :)
I'm sure you mean, 'FastTrade' as that's the one that trims the calculation times down. The names pretty similar so that's an easy mistake.

Also 'Check Distance' takes the distance between the trader, and the two stations its trading with. Then basically subtracts 2% from the deals rating for each jump it has to do.
And No, enabling it doesn't affect calculation time. Hope that clears up any questions.

On a side note, I may expose the penalty per jump as a configurable slider to allow people to control how aggressively they want to trim based on distance.

Crystal clear, wasn't at my pc at the time so indeed got freetrade and fasttrade mixed up. Loving what you did to the beta V4. So much to costumize and an easy copy paste for other ships.
I do have one question if i enable trade ban and select for example Argon. I don't trade with Argon or does activating player trade ban something else entirely. Or is it needed for the script to recognize that i marked Argon Federation .

Anyhow much appreciated for the answers. On one sidenote i haven't ran into laggy situations yet with around 19 ships on 15 speed to calculate. Have been running one playthrough for 1day and 21 hours with this on now. One side thing i found is when assigning Large trade ships to a station they do exactly as told trade and make it their home station. But they won't show up as subordinates. They stay in the unassigned ships section. Small detail which may be due to my perticular station lacking a 3point dock.

Running medium graphics. GTX 1060 16GB ram and a 8700K at 4.5ghz. And i can't tell any difference in performance. As to removing the mod. Amazing mod. Keep up the good work and an amazing thanks to you.
Help costs nothing. Neither does kindness. Spread it.
Death to Xenon and Paranids! :?

~Beginner Modder~

XTC0R
Posts: 401
Joined: Sat, 1. Dec 18, 19:58
x4

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

Post by XTC0R » Thu, 10. Jan 19, 08:30

ludsoe wrote:
Thu, 10. Jan 19, 03:13
XTC0R 's Post
Show
XTC0R wrote:
Wed, 9. Jan 19, 20:59
I tested v4 of TT and wanted to setup a freighter to deliver smart-chips to a Teladi wharf and always consider my mega complex in Argon prime as possible buy option for smart-chips. So I set it up like this: (Sorry I play in german)

Spoiler
Show
Image
But instead the freighter bought "Raumsprit" (Spacefuel). I noticed this two times in a row, now posting here :)
Spoiler
Show
Image
The wharf I choosed as home sector / station is completly empty of smart-chips.
Spoiler
Show
Image
Is something wrong how I did set it up?
That's.... Actually really odd. Are Station Trader/Station Smuggler enabled?
If you have Station Trader enabled it should of ignored illegal wares, unless you have license to sell them.

If station trader and station smuggler are disabled, and its still acting like this. Then there's a major issue somewhere.
It's excatly setup like in my screenshot. So station trader and station smuggler is disabled and only smart-chips added to tradeable wares. I can provide the savegame if needed.

ApoxNM
Posts: 777
Joined: Wed, 5. Dec 18, 06:17
x4

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

Post by ApoxNM » Thu, 10. Jan 19, 08:37

I think the mod is buggy, when I set up the trader to trade specific wares and I add them, the trader resets all wares to all and starts buying and selling random wares.

Chosing wares does not matter as it resets to all wares.

Post Reply

Return to “X4: Foundations - Scripts and Modding”