X4 1.6 unoffical station trader fix feedback topic.

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

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

Post Reply

how well do station traders perform?

vanilla bad, fix bad
1
8%
vanilla bad, fix medium
7
58%
vanilla bad, fix good
3
25%
vanilla medium, fix bad
0
No votes
vanilla medium, fix medium
1
8%
vanilla medium, fix good
0
No votes
vanilla good, fix bad
0
No votes
vanilla good, fix medium
0
No votes
vanilla good, fix good
0
No votes
 
Total votes: 12

User avatar
ubuntufreakdragon
Posts: 5195
Joined: Thu, 23. Jun 11, 14:57
x4

X4 1.6 unoffical station trader fix feedback topic.

Post by ubuntufreakdragon » Wed, 30. Jan 19, 03:12

I made a fix for the trade.find.commander script.
it arose the need for a dedicated feedback-topic.

There wher some changes fom X:Rebirth to X4 which made the old stationtrader insufficient.

Issues:
X4 Stations tend to have much more Products than XR stations and there products which tend to overfill even when sold massively so chosing the product to sell needs to be more involved. 4,3
with workforce X4 got static cost that have to be supplied even if there are enough products to sell (or the workforce dies). 1,2
There are wares which should be sold above average price 2,3,4
Freighters tended to deliver quite small amounts. 3 <this is not fully fixed as one cause in NPC stations having quite small storages for masswares like energycells>

the Changes:
1Randomisation of buy and sell priority, so if both are possible both will be considered, the chance of buyfirst is given by the lowest supplied resource.
2consequently the below averageprice limit for sell actions was deleted.
3the is a minimal limit of the used cargo realised by a limit for the relative price for buyoffers to be considered<NPC stations having quite small storages for masswares>
4The Priority sorting of the stations selloffers was improved to take the price of the wares in question as offset(max 0.25) in to account in a tie now a ware with high profit will be sold.[/size]

I fixed all issue myself via these changes link: https://www.dropbox.com/s/hg2cf15p8760m ... er.7z?dl=1

public beta topic: viewtopic.php?f=192&t=412352
original german topic: viewtopic.php?p=4817064#p4817064
Last edited by ubuntufreakdragon on Wed, 30. Jan 19, 22:43, edited 1 time in total.
My X3 Mods

XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist

User avatar
Baconnaise
Posts: 619
Joined: Sat, 23. Nov 13, 15:50
x4

Re: X4 1.6 unoffical station trader fix feedback topic.

Post by Baconnaise » Wed, 30. Jan 19, 15:07

The poll options confuse me. Is this just feedback over your mod?

zande
Posts: 3
Joined: Thu, 15. Dec 05, 19:55
x4

Re: X4 1.6 unoffical station trader fix feedback topic.

Post by zande » Wed, 30. Jan 19, 22:35

link is broken. I downloaded from the beta section and it works for sure better than vanilla but I still see ships (couriers more often) with 2 electric cells. Station trader don't obey to "don't trade with other factions" option, too

User avatar
ubuntufreakdragon
Posts: 5195
Joined: Thu, 23. Jun 11, 14:57
x4

Re: X4 1.6 unoffical station trader fix feedback topic.

Post by ubuntufreakdragon » Wed, 30. Jan 19, 22:51

The poll is there to gather information about how good this fix is to make a port to vanilla which is my declared goal more likely.
link repaired.
I will look up trade restrictions when I fell better, I also resently got an idea to improve the no energy cells code.(which has to work in gerneral without a direkt ban (as there are solarpowerplants))
My X3 Mods

XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist

User avatar
ubuntufreakdragon
Posts: 5195
Joined: Thu, 23. Jun 11, 14:57
x4

Re: X4 2.2 unoffical station trader fix feedback topic.

Post by ubuntufreakdragon » Tue, 5. Mar 19, 04:51

new version
ported the changes from beta 2.2 and more improvements by weighted randomisation.
My X3 Mods

XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: X4 1.6 unoffical station trader fix feedback topic.

Post by DeadAirRT » Sun, 10. Mar 19, 18:00

So i understand that this mostly fixes station traders correct? Do you know what controls the pricing for buy orders at npc shipyard/wharfs?

User avatar
ubuntufreakdragon
Posts: 5195
Joined: Thu, 23. Jun 11, 14:57
x4

Re: X4 1.6 unoffical station trader fix feedback topic.

Post by ubuntufreakdragon » Mon, 11. Mar 19, 15:10

I know it's not an .xml

Fix updated
My X3 Mods

XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist

Lazerath
Posts: 860
Joined: Tue, 22. Mar 05, 06:31
x4

temp

Post by Lazerath » Mon, 10. Jun 19, 21:41

@OP

What is the compatibility like with this mod, will it break my game if Egosoft makes your recommended changes in an update (and your mod is then removed)?

I assume your changes take into account if habitat modules are built on a station or not. I have stopped adding them to stations with the 2.5 release version because during the beta Right after adding them to stations I had built my universe started to be over populated with food stations and food traders. No issue this time around with out the habitats in my new play through.

By not having habitats though, will it mess up your fixes?

I am so tired of seeing my station traders load 20 to 80 units of Energy or other goods instead of full loads.

I forgot to mention I add Energy Cell Modules to all my stations to supply energy. Is that somehow part of the issue?

Great work by the way!

Cheers!
COMPUTER SPECS
[Mobo] SABERTOOTH 990FX R2.0
[CPU] AMD FX-9370 8 Cores 4.4 - 4.7GHZ 16MB DDR3-1866
[Cooling] Corsair Hydro Series H80I CPU Cooler System
[Video] Evga 970 GTX SC 3.5Gb Ram ==> [Ram] G-Skills Ripjaws X 16GB
[Harddrive] (2) x Samsung 850 Evo 250GB SSD
[Harddrive] Samsung 840 Series 120GB SSD ==> [Harddrive] WD BLACK 1TB 64MB 7200RPM
[Disc Player] LG 14X BLU-RAY BURNER ==> [Case] Thermaltake A71 Chaser [Windows 7 Pro]

User avatar
ubuntufreakdragon
Posts: 5195
Joined: Thu, 23. Jun 11, 14:57
x4

Re: X4 1.6 unoffical station trader fix feedback topic.

Post by ubuntufreakdragon » Tue, 11. Jun 19, 18:33

If egosoft implements the fix, just disable this and you should be fine.
My X3 Mods

XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist

omgoshlol
Posts: 6
Joined: Wed, 15. May 19, 23:43

Re: X4 1.6 unoffical station trader fix feedback topic.

Post by omgoshlol » Fri, 14. Jun 19, 02:21

Freighters tended to deliver quite small amounts
There's a big issue with station traders that needs fixing that causes this:

A trader who has its trade order interrupted will keep its wares and never sell them or offload them. Station traders need to get rid of their stale wares, either by dumping them at the nearest station that uses them (regardless if they are full or the investment loss), returning them, selling them with their next shipment, or outright dropping them into space. They will continue trading forever with a partially full storage. I believe this is the cause for 90%+ of all small trade orders in 2.5

Example:
Trader queued up to buy and sell 200 energy cells
The station cancels the order for whatever reason (module build canceled, module gets attacked, storage is full)
Trader gets queued to buy and sell 300 energy cells
Fix: Trader should go back, buy 100 energy cells and sell 300

Example 2:
Trader queued up to buy and sell 200 food rations
Station cancels the order
Trader gets queued to buy and sell 300 medical supplies, the station has room for food rations
Fix: Trader should return, buy medical supplies, sell both food rations and medical supplies

Example 3:
Trader queued up to buy and sell 200 food rations
Station cancels the order
Trader gets queued to buy and sell 300 medical supplies, the station has no need for rations
Fix: Trader should return, sell or drop food rations, then buy and sell medical supplies

magictrip
Posts: 247
Joined: Tue, 25. Dec 18, 01:04

Re: X4 1.6 unoffical station trader fix feedback topic.

Post by magictrip » Fri, 14. Jun 19, 23:53

omgoshlol wrote:
Fri, 14. Jun 19, 02:21
There's a big issue with station traders that needs fixing that causes this:

A trader who has its trade order interrupted will keep its wares and never sell them or offload them. Station traders need to get rid of their stale wares, either by dumping them at the nearest station that uses them (regardless if they are full or the investment loss), returning them, selling them with their next shipment, or outright dropping them into space. They will continue trading forever with a partially full storage. I believe this is the cause for 90%+ of all small trade orders in 2.5

Example:
Trader queued up to buy and sell 200 energy cells
The station cancels the order for whatever reason (module build canceled, module gets attacked, storage is full)
Trader gets queued to buy and sell 300 energy cells
Fix: Trader should go back, buy 100 energy cells and sell 300

Example 2:
Trader queued up to buy and sell 200 food rations
Station cancels the order
Trader gets queued to buy and sell 300 medical supplies, the station has room for food rations
Fix: Trader should return, buy medical supplies, sell both food rations and medical supplies

Example 3:
Trader queued up to buy and sell 200 food rations
Station cancels the order
Trader gets queued to buy and sell 300 medical supplies, the station has no need for rations
Fix: Trader should return, sell or drop food rations, then buy and sell medical supplies
That is why I always wanted for them to implement a "Deposit Station" or an actual "Trade Station" like the NPCs have. In case your trader is full of wares and do not have a sell order (because it was canceled) it would just go to that station and dump the wares there. And when buying the ware if there's any stock of the ware in teh trade station it would pick there first and them buy the remaining, if that is necessary.

The trader associated with that station could be programmed to find good deals, for example, every time a ware in the trade station list gets listed with a small price, the trader would go there, pick the material and then put it to be sold as a higher price.

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

Re: X4 1.6 unoffical station trader fix feedback topic.

Post by LegionOfOne » Sun, 16. Jun 19, 00:45

magictrip wrote:
Fri, 14. Jun 19, 23:53
That is why I always wanted for them to implement a "Deposit Station" or an actual "Trade Station" like the NPCs have.
I only posted it a week ago, and only added the ability to create trade stations mid-week, so I'll keep suggesting it in various threads, especially when I see people crying out for the features I can bring :D :

My Mules and Warehouses mod !

I'm sure you'll love it so much you will stop using vanilla traders entirely 8)

magictrip
Posts: 247
Joined: Tue, 25. Dec 18, 01:04

Re: X4 1.6 unoffical station trader fix feedback topic.

Post by magictrip » Tue, 18. Jun 19, 19:24

LegionOfOne wrote:
Sun, 16. Jun 19, 00:45
I only posted it a week ago, and only added the ability to create trade stations mid-week, so I'll keep suggesting it in various threads, especially when I see people crying out for the features I can bring :D :

My Mules and Warehouses mod !

I'm sure you'll love it so much you will stop using vanilla traders entirely 8)
Thanks for the tip. It's just weird that, although they already have them for NPCs, they couldn't release them for us as well. It's the same as Nividium, a resource that has no consumption and is so expensive, very weird in a game that tries to have a more realistic economy.

Also, it's weird that they never thought that a functionality like been able to move wares from one station to another would be important ... figures.

Btw, to me they should be more aggressive with expansions as well, I think they should add one at least each 6 months or so.

User avatar
MakerLinux
Posts: 234
Joined: Tue, 14. Nov 17, 13:10
x4

Re: X4 1.6 unoffical station trader fix feedback topic.

Post by MakerLinux » Fri, 21. Jun 19, 07:11

magictrip wrote:
Tue, 18. Jun 19, 19:24
Thanks for the tip. It's just weird that, although they already have them for NPCs, they couldn't release them for us as well. It's the same as Nividium, a resource that has no consumption and is so expensive, very weird in a game that tries to have a more realistic economy.

Also, it's weird that they never thought that a functionality like been able to move wares from one station to another would be important ... figures.
Yeah, some decisions from Egosoft are quite puzzling, seemingly illogical and contradictory. I even took some time to write about them, seemingly to no impact or response. The fact that they use Ventures as a disincentive for modding the game is another really glaring contradiction which affects this forum board in particular, and they won't reconsider it, it seems.
magictrip wrote:
Tue, 18. Jun 19, 19:24
Btw, to me they should be more aggressive with expansions as well, I think they should add one at least each 6 months or so.
You know, I'd be happy if Egosoft took the path other game companies did with lots of DLCs full of real content for their single-player simulations, like Euro Truck Simulator or Cities Skylines. They help to increase the longevity of the game and sponsor the continuous core game development and fixes, something they urgently need. They would have to hire more personnel and possibly restructure some stuff in the company to prevent that dissonance I mentioned, which would otherwise only worsen with scale. This would also greatly increase their steam scores, something they also greatly need for commercial success. I, for one, would definitely buy all their DLCs at release, regardless of ratings (which I don't trust anymore) and with no exception, just as I bought the Collector's Edition on day 1 of the linux beta.
Brazilian Linux-only user living in Poland, https://steamcommunity.com/id/patolinux on Steam. PC I use for playing: Ryzen 7 7800X3D with 64 GB 6GHz DDR5 CL30, AMD Radeon RX 7900 XTX, ArchLinux
Controllers: steam controller via Steam Input or HOTAS set: TSaitek X52 Pro + MFD F-16 + G29 pedals.
VR headset: Valve Index & Meta Quest 2. My other PC: Steam Deck OLD with nReal AIR AR headset

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

Re: X4 1.6 unoffical station trader fix feedback topic.

Post by Buzz2005 » Fri, 21. Jun 19, 10:32

MakerLinux wrote:
Fri, 21. Jun 19, 07:11
magictrip wrote:
Tue, 18. Jun 19, 19:24
Thanks for the tip. It's just weird that, although they already have them for NPCs, they couldn't release them for us as well. It's the same as Nividium, a resource that has no consumption and is so expensive, very weird in a game that tries to have a more realistic economy.

Also, it's weird that they never thought that a functionality like been able to move wares from one station to another would be important ... figures.
Yeah, some decisions from Egosoft are quite puzzling, seemingly illogical and contradictory. I even took some time to write about them, seemingly to no impact or response. The fact that they use Ventures as a disincentive for modding the game is another really glaring contradiction which affects this forum board in particular, and they won't reconsider it, it seems.
magictrip wrote:
Tue, 18. Jun 19, 19:24
Btw, to me they should be more aggressive with expansions as well, I think they should add one at least each 6 months or so.
You know, I'd be happy if Egosoft took the path other game companies did with lots of DLCs full of real content for their single-player simulations, like Euro Truck Simulator or Cities Skylines. They help to increase the longevity of the game and sponsor the continuous core game development and fixes, something they urgently need. They would have to hire more personnel and possibly restructure some stuff in the company to prevent that dissonance I mentioned, which would otherwise only worsen with scale. This would also greatly increase their steam scores, something they also greatly need for commercial success. I, for one, would definitely buy all their DLCs at release, regardless of ratings (which I don't trust anymore) and with no exception, just as I bought the Collector's Edition on day 1 of the linux beta.
Even though I have every DLC for Cities Skyline the game is unbelievably good and comfy, it feels kind of too much, and its not that cheap to buy them all

In the end I guess its the same thing if they went the other way with less DLCs but packed with much more stuff and bigger price (like putting parks, industries and campus in one DLC)

I will always buy everything from EGO, they have my undying support

I always wonder what they would do if they got Bethesda or Rockstar kind of money :gruebel:
Fixed ships getting spawned away from ship configuration menu at resupply ships from automatically getting deployables.

Lazerath
Posts: 860
Joined: Tue, 22. Mar 05, 06:31
x4

Re: X4 1.6 unoffical station trader fix feedback topic.

Post by Lazerath » Mon, 24. Jun 19, 02:13

Buzz2005 wrote:
Fri, 21. Jun 19, 10:32
I will always buy everything from EGO, they have my undying support

I always wonder what they would do if they got Bethesda or Rockstar kind of money :gruebel:
They would probably release a game that was full of bugs, missing content, broken combat system and then have people complaining about spending even more money for the game the the previously released game by Egosoft and end up with the same result at launch as the other games....

Then there would be people rushing to their defence saying but they are a small studio and it would go back and forth like that.

That is just speculation on my part. However, I have been supporting this company since X2: The Threat and each release has gotten worse since then (No idea about the couple games that released before X2). I do like their games though when they are finished :) (And of course all the awesome mods that add to it). Otherwise I would not have purchased X4: Collectors Edition (pre-order).

@OP
I have some On-topic questions for O.P. I have applied your fix to my game and I noticed my traders for a mega complex (self supporting claytronics factory) will sit for long periods with out doing trade runs. Once the deliver the goods to the station buying them the stop doing anything and just sit there.

From your experience are complex’s bad (do traders work better for a station that has only one product being created at it vs a complex like I have)?

It’s driving me nuts having to micro manage the traders all the time for the complex (all they have to do is sell the finished goods, not buy anything). Your thoughts would be appreciated (or anyone else who understands the trade scripts).

I had 6 M traders set to trade for the station and each ship had a 3 or 4 star Captain. I am not using any mods that affect trade scripts but I am using some mods that add ships, paint jobs for sale, trader bought notifications and secret stash. I have since removed all traders except 1 from the complex.

Cheers!
COMPUTER SPECS
[Mobo] SABERTOOTH 990FX R2.0
[CPU] AMD FX-9370 8 Cores 4.4 - 4.7GHZ 16MB DDR3-1866
[Cooling] Corsair Hydro Series H80I CPU Cooler System
[Video] Evga 970 GTX SC 3.5Gb Ram ==> [Ram] G-Skills Ripjaws X 16GB
[Harddrive] (2) x Samsung 850 Evo 250GB SSD
[Harddrive] Samsung 840 Series 120GB SSD ==> [Harddrive] WD BLACK 1TB 64MB 7200RPM
[Disc Player] LG 14X BLU-RAY BURNER ==> [Case] Thermaltake A71 Chaser [Windows 7 Pro]

Post Reply

Return to “X4: Foundations - Scripts and Modding”