[MOD] Random Trader

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

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

Post Reply
language
Posts: 73
Joined: Mon, 9. Dec 13, 10:55
x4

[MOD] Random Trader

Post by language » Sat, 16. Mar 19, 13:55

Hi, i created some random trader logic, its on steam workshop and nexus:

https://www.nexusmods.com/x4foundations/mods/300/

https://steamcommunity.com/sharedfiles/ ... 1684361910

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

Re: [MOD] Random Trader

Post by Misunderstood Wookie » Tue, 19. Mar 19, 15:43

I took a look at this, (before I saw it on the forum here) had a couple of questions.
I understand this is supposed to be fine to work along-side TaterTrader, however, I use AutoTrader, any conflicts there? I also did not quite understand the purpose of this mod, be this a new trade logic option or does this replace vanilla trade logic?

I mean AutoTrader/TaterTrader both are separate orders you give a ship whichever one you choose it will add a new trade option rather then rely on the existing vanilla Trade logic but you must order the ship to use that trade logic, I presume this works the same way, however, I was not sure if I wanted to add yet another Trade logic choice, I was unsure if this was a vanilla replacement or a new option as I am really only after a mod which will improve the vanilla logic to have more smarts.
*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

language
Posts: 73
Joined: Mon, 9. Dec 13, 10:55
x4

Re: [MOD] Random Trader

Post by language » Sat, 23. Mar 19, 10:43

This is new trade logic, works same way as TaterTrader, atleast in game, you set up your ship to randomtrade, choose existing options and let it trade. In terms of algorithm though, its main purpose is to be fast, it finds trades within seconds.
Random behavior is its core feature, read the description for more info.

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

Re: [MOD] Random Trader

Post by Misunderstood Wookie » Sat, 23. Mar 19, 11:38

Oh I read the desc ;). I found this on nexus before I noticed this thread.
fast seems like something the rest of the trade logic in this game needs, I would rather everyone trade for a reasonable price and occasionally go for best profit margin and use less compute resources giving back 5-10 frames per second when near stations and ships flying around than over-complicate the Ai Trade path which frankly it seems to do a lot of thinking and still kinda bugs out, I think they process too much logic into what is a rather easier task of compare average price of items in cargo and bulk requirements, find any station which meets or exceeds the average and sell it.

This logic should be the core the trade logic in the game, with the only variance being shipped ordered to supply stations they do more thinking but just keeping the eco going with trades it could be A LOT faster like what your script does because I did take a look at it ;)
*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

g_BonE
Posts: 153
Joined: Thu, 28. Aug 03, 11:37
x4

Re: [MOD] Random Trader

Post by g_BonE » Mon, 25. Mar 19, 17:09

Hi! Thanks for the mod, its always nice to have a few more trader alternatives. The random supplier is even more helpful!

Using both mods. Also found a script bug which does not seem to affect the scripts functioning:

Code: Select all

[=ERROR=] 287362.65 extensions\randomsupply\aiscripts\randomsupply.xml(381): Error while parsing expression: ')' expected
* Input: [($amount)f*(0.25+75.0/($stockRatioToBuy)f*(1.0-($currentBuyOffer.stocklevel)f),$amount].{$stationOrBuild}
* Pos:                                                                                  ^
[=ERROR=] 287362.65 extensions\randomsupply\aiscripts\randomsupply.xml(381): Error while parsing expression: ']' expected
* Input: [($amount)f*(0.25+75.0/($stockRatioToBuy)f*(1.0-($currentBuyOffer.stocklevel)f),$amount].{$stationOrBuild}
* Pos:                                                                                  ^
[=ERROR=] 287362.65 extensions\randomtrader\aiscripts\randomtrade.xml(369): Error while parsing expression: ')' expected
* Input: [($amount)f*(0.25+75.0/($stockRatioToBuy)f*(1.0-($myCurrentBuy.stocklevel)f),$amount].{$stationOrBuild}
* Pos:                                                                               ^
[=ERROR=] 287362.65 extensions\randomtrader\aiscripts\randomtrade.xml(369): Error while parsing expression: ']' expected
* Input: [($amount)f*(0.25+75.0/($stockRatioToBuy)f*(1.0-($myCurrentBuy.stocklevel)f),$amount].{$stationOrBuild}
* Pos:       
Maybe You still want to have a gander at it? Thanks again!
(x|x) .oO[ Fenster fährt mich Nüsse !!! ]

language
Posts: 73
Joined: Mon, 9. Dec 13, 10:55
x4

Re: [MOD] Random Trader

Post by language » Tue, 26. Mar 19, 17:22

yes, fixed that, thank you

User avatar
OneOfMany
Posts: 448
Joined: Thu, 15. May 14, 14:25
x4

Re: [MOD] Random Trader

Post by OneOfMany » Wed, 6. May 20, 21:16

I think RND Trader is having issues with the new beta. It shuts the global orders screen of after a few seconds and goes back to property view.

This happens with the other windows also like stats and reputation.

User avatar
Snowfious
Posts: 45
Joined: Wed, 26. Jun 19, 00:49
x4

Re: [MOD] Random Trader

Post by Snowfious » Wed, 6. May 20, 21:21

OneOfMany wrote:
Wed, 6. May 20, 21:16
I think RND Trader is having issues with the new beta. It shuts the global orders screen of after a few seconds and goes back to property view.

This happens with the other windows also like stats and reputation.
Ah yes I've encountered this issue a few times, even before this beta, in the regular patches. Could never find out what was the culprit. It fixes itself when you restart the game.

Post Reply

Return to “X4: Foundations - Scripts and Modding”