[OUTDATED] Autotrade Logic Adjustment v1.0.2

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

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

Wiesel No1
Posts: 37
Joined: Sat, 28. Feb 04, 00:14

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by Wiesel No1 »

Hi,

do I understand you right that the highway gateways are not count within the jumpgate restriction?
So when I do 5 gates it means 5 gates + all sectors connected to the highway when the highway is within 5 sectors from the starting point?

best regards
Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by Vim Razz »

Wiesel No1 wrote: Sat, 5. Jan 19, 12:39 do I understand you right that the highway gateways are not count within the jumpgate restriction?
So when I do 5 gates it means 5 gates + all sectors connected to the highway when the highway is within 5 sectors from the starting point?
No, that's not what I meant. Sorry if it was confusing. Highway gates are completely normal. It's the way the overall map is laid out in that makes makes them convenient. If you compare it to a tree, then the highway sectors are all on the trunk, while other sectors are mostly on different branches.


So, for example: Argon prime -> Ianamus Zura IV = Argon Prime -> Hatikvah's Choice I -> Silent Witness I -> Profit Center Alpha -> Bright Promise -> Ianamus Zura IV

It's only 5 gates, but it gets you almost all the way across the galaxy, because they're all on or near the highway.


On the other hand, Lasting Vengeance -> Pious Mists XI is also five gates, even though they're much "closer to each other" on the map: Lasting Vengeance -> Cardinal's Redress -> Holy Vision -> Pontifex's Claim -> Pious Mists II -> Pious Mists XI.


By starting in Trinity Sanctum VII, the Demeter first had to travel to Trinity Sanctum III before it could go anywhere else, so the overall range was basically 4 gates from TS III.
Bubonosaure
Posts: 120
Joined: Tue, 13. Nov 18, 00:26
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by Bubonosaure »

Quick question, does this affect station traders as well ? Does that mean a 5 star manager will actually do something when supplies run low ?
Another question : does the mod makes traders able to trade leftovers cargos in other to free space and resume operation ? It's a very common thing for me to find a trader specialised, for example, in smart ships and hull parts go around with 95% of its cargo bay occupied by previous unsold items and not trying to salvage its cargo before resuming trading operations.

Gonna try your mod today.
ApoxNM
Posts: 783
Joined: Wed, 5. Dec 18, 06:17
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by ApoxNM »

Bubonosaure wrote: Tue, 8. Jan 19, 17:46 Quick question, does this affect station traders as well ? Does that mean a 5 star manager will actually do something when supplies run low ?
Another question : does the mod makes traders able to trade leftovers cargos in other to free space and resume operation ? It's a very common thing for me to find a trader specialised, for example, in smart ships and hull parts go around with 95% of its cargo bay occupied by previous unsold items and not trying to salvage its cargo before resuming trading operations.

Gonna try your mod today.
While I can not answer with 100% certenty, I think they do consider their cargo hold, as I use this mod and think they do tend to sell the cargo first (since I captured ships and forgot they had cargo in them, they seem to first sell the cargo before starting to auto trade).
Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by Vim Razz »

Bubonosaure wrote: Tue, 8. Jan 19, 17:46 Quick question, does this affect station traders as well ? Does that mean a 5 star manager will actually do something when supplies run low ?
Sorry to be slow to reply. This mod does not affect station traders. They use a different script to locate trade offers with it's own particular quirks.
One approach to dealing with station traders for the time being is this mod by Simmel whic basically allows you to "lock" specific ships to particular wares.
Bubonosaure wrote: Tue, 8. Jan 19, 17:46 Another question : does the mod makes traders able to trade leftovers cargos in other to free space and resume operation ? It's a very common thing for me to find a trader specialised, for example, in smart ships and hull parts go around with 95% of its cargo bay occupied by previous unsold items and not trying to salvage its cargo before resuming trading operations.
No, but now that you mention it, I feel silly for not publishing something for that sooner, as it's a pretty quick and simple thing to do.

I put one on Nexus this evening here: https://www.nexusmods.com/x4foundations/mods/257/
It's *almost* 100% reliable on it's own, but some ships seem to get stuck in a state that interferes with it. The "back up" code if that happens to occur is in Autotrade Logic Adjustment (because the problem mostly happens to NPC traders so I've had to deal with it already).

I wont be including that stand-alone feature as a part of this mod, because hopefully Autotrade Logic Adjustment will one day be obsolete, and that one will still work on it's own.


ApoxNM wrote: Wed, 9. Jan 19, 10:14 While I can not answer with 100% certainty, I think they do consider their cargo hold, as I use this mod and think they do tend to sell the cargo first (since I captured ships and forgot they had cargo in them, they seem to first sell the cargo before starting to auto trade).
That's interesting behavior, because it's not this mod causing that. I have no idea what might be responsible. The mod linked above will do it, though.
Last edited by Vim Razz on Wed, 9. Jan 19, 13:25, edited 2 times in total.
ApoxNM
Posts: 783
Joined: Wed, 5. Dec 18, 06:17
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by ApoxNM »

Vim Razz wrote: Wed, 9. Jan 19, 10:49 That's interesting behavior, because it's not this mod causing that. I have no idea what might be responsible. The mod linked above will do it, though.
Very interesting, I do not have this mod installed, but I have a ton of mods, so no idea which one might be responsible.
User avatar
alt3rn1ty
Posts: 3518
Joined: Thu, 26. Jan 06, 19:45
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by alt3rn1ty »

Vim Razz wrote: Wed, 9. Jan 19, 10:49
Bubonosaure wrote: Tue, 8. Jan 19, 17:46 Another question : does the mod makes traders able to trade leftovers cargos in other to free space and resume operation ? It's a very common thing for me to find a trader specialised, for example, in smart ships and hull parts go around with 95% of its cargo bay occupied by previous unsold items and not trying to salvage its cargo before resuming trading operations.
No, but now that you mention it, I feel silly for not publishing something for that sooner, as it's a pretty quick and simple thing to do.

I put one on Nexus this evening here: https://www.nexusmods.com/x4foundations/mods/257/
It's *almost* 100% reliable on it's own, but some ships seem to get stuck in a state that interferes with it. The "back up" code if that happens to occur is in Autotrade Logic Adjustment (because the problem mostly happens to NPC traders so I've had to deal with it already).

I wont be including that stand-alone feature as a part of this mod, because hopefully Autotrade Logic Adjustment will one day be obsolete, and that one will still work on it's own.
Good stuff that will be another mod I will be using ..

But just a thought ; would consumables also be sold such as missiles if you had a turret with a launcher and wanted them for defense instead of goods to trade?

Did you also see the Devs have replied your Tech topic viewtopic.php?f=180&t=411849
Spec's@2025-05-17 - Laptop - Acer Predator Helios Neo 16 AI - Win 11 x64
CPU - Intel Core Ultra 9 275HX 2.7-5.4ghz, RAM - 32gb DDR5 6400(OC),
Discrete GPU - NVidia Geforce RTX 5070 Ti, VRAM 12gb GDDR7,
SSD - M.2 PCIe NVME 1Tb
, OLED WQXGA 2560x1600.
:goner: Seeker of Sohnen. Long live Queen Polypheides. :boron:
Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by Vim Razz »

alt3rn1ty wrote: Wed, 9. Jan 19, 12:56 But just a thought ; would consumables also be sold such as missiles if you had a turret with a launcher and wanted them for defense instead of goods to trade?
Only if they were bundled in containers. Not if they're in dedicated ammo storage.

I can't think of any place X4 uses that functionality right now, even though it still appears to be supported by the X4 version of the Rebirth engine. X4 stations just sell loose ammunition (or "build it on-site") rather than use ammo or drone containers....

If any mods want to make use of it, they'll probably have to do a lot of groundwork in general just to supply the containers.

alt3rn1ty wrote: Wed, 9. Jan 19, 12:56 Did you also see the Devs have replied your Tech topic viewtopic.php?f=180&t=411849
I did, thank you. Unfortunately, there isn't enough time tonight to respond to everything, so I'll have to continue tomorrow.
Last edited by Vim Razz on Wed, 9. Jan 19, 13:27, edited 1 time in total.
User avatar
alt3rn1ty
Posts: 3518
Joined: Thu, 26. Jan 06, 19:45
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by alt3rn1ty »

8) I have asked the moderators to close the duplicate in the DevNet Public Beta as its being addressed by Dev in your original topic now.
Spec's@2025-05-17 - Laptop - Acer Predator Helios Neo 16 AI - Win 11 x64
CPU - Intel Core Ultra 9 275HX 2.7-5.4ghz, RAM - 32gb DDR5 6400(OC),
Discrete GPU - NVidia Geforce RTX 5070 Ti, VRAM 12gb GDDR7,
SSD - M.2 PCIe NVME 1Tb
, OLED WQXGA 2560x1600.
:goner: Seeker of Sohnen. Long live Queen Polypheides. :boron:
Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by Vim Razz »

Great, thanks!
Bubonosaure
Posts: 120
Joined: Tue, 13. Nov 18, 00:26
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by Bubonosaure »

Please, don't apologize to me for answering slowly. You're doing us a great service by improving X4, something I'm incapable of beside writing opiniated paragraphs that devs won't ever read.

And thanks a lot for the script you put out yesterday ! Installing asap, along with Simmel's mod. Right now, the experience is ruined by so many bugs and oversight that it makes me sometimes altf4 the game out of spite. Modders are the vital heart of this broken franchise. :roll:
User avatar
alt3rn1ty
Posts: 3518
Joined: Thu, 26. Jan 06, 19:45
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by alt3rn1ty »

Bubonosaure wrote: Wed, 9. Jan 19, 14:37 Right now, the experience is ruined by so many bugs and oversight that it makes me sometimes altf4 the game out of spite. Modders are the vital heart of this broken franchise. :roll:
Hmm, you may be un-installing a mod or two soon, v1.51 beta 1 has a lot of nice fixes :)
Spec's@2025-05-17 - Laptop - Acer Predator Helios Neo 16 AI - Win 11 x64
CPU - Intel Core Ultra 9 275HX 2.7-5.4ghz, RAM - 32gb DDR5 6400(OC),
Discrete GPU - NVidia Geforce RTX 5070 Ti, VRAM 12gb GDDR7,
SSD - M.2 PCIe NVME 1Tb
, OLED WQXGA 2560x1600.
:goner: Seeker of Sohnen. Long live Queen Polypheides. :boron:
Bubonosaure
Posts: 120
Joined: Tue, 13. Nov 18, 00:26
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by Bubonosaure »

Hey Vim, is the mod still needed ? I kept your mod and it's working just fine but would appreciate feedbacks from Vanilla traders before I do anything.
Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by Vim Razz »

Bubonosaure wrote: Sun, 3. Feb 19, 11:35 Hey Vim, is the mod still needed ? I kept your mod and it's working just fine but would appreciate feedbacks from Vanilla traders before I do anything.
Yeah, unfortunately. X4 v1.6 fixed a few bugs but didn't make any changes to the basic structure -- not even enough to require me to put out a new update to this mod. Vanilla traders still stop searching as soon as they find any viable trade (however poor), and have significant bias towards certain wares. (The two biggest issues contributing to overall economic stagnation, imho.) The mod is still required if you want player-owned ships to search all sectors in their assigned range, and actually compare possible trades of different wares against each other rather than picking the first trade that doesn't get rejected.

I don't know if they're planning more significant changes in the future, or if they feel happy with where things are at that this point.
zande
Posts: 3
Joined: Thu, 15. Dec 05, 19:55
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by zande »

It seems to me that 2.0 beta has not changed the autotrade logic at all so we still need your mod. Can someone with more knowledge of the files confirm this?
Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by Vim Razz »

zande wrote: Thu, 7. Feb 19, 19:02 It seems to me that 2.0 beta has not changed the autotrade logic at all so we still need your mod. Can someone with more knowledge of the files confirm this?
As of 2.0 beta 1 HF 1, there haven't been any changes to vanilla trade logic. We'll see how things go.
User avatar
alt3rn1ty
Posts: 3518
Joined: Thu, 26. Jan 06, 19:45
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by alt3rn1ty »

Vim Razz wrote: Fri, 8. Feb 19, 21:33
zande wrote: Thu, 7. Feb 19, 19:02 It seems to me that 2.0 beta has not changed the autotrade logic at all so we still need your mod. Can someone with more knowledge of the files confirm this?
As of 2.0 beta 1 HF 1, there haven't been any changes to vanilla trade logic. We'll see how things go.
So the issue/s j.harshaw said were fixed in the topic in the Tech Support forum viewtopic.php?f=180&t=411849 .. I guess they must be further up the line waiting to be implemented in public builds.

That has surprised me because this v2 beta series is supposed to be all about Weapon and Economy balancing https://twitter.com/EGOSOFT/status/1093538776767492099

.. You would think traders scripts were an important part of the Economy balance.
Spec's@2025-05-17 - Laptop - Acer Predator Helios Neo 16 AI - Win 11 x64
CPU - Intel Core Ultra 9 275HX 2.7-5.4ghz, RAM - 32gb DDR5 6400(OC),
Discrete GPU - NVidia Geforce RTX 5070 Ti, VRAM 12gb GDDR7,
SSD - M.2 PCIe NVME 1Tb
, OLED WQXGA 2560x1600.
:goner: Seeker of Sohnen. Long live Queen Polypheides. :boron:
Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by Vim Razz »

alt3rn1ty wrote: Sat, 9. Feb 19, 19:52 So the issue/s j.harshaw said were fixed in the topic in the Tech Support forum viewtopic.php?f=180&t=411849 .. I guess they must be further up the line waiting to be implemented in public builds.

That has surprised me because this v2 beta series is supposed to be all about Weapon and Economy balancing https://twitter.com/EGOSOFT/status/1093538776767492099
(1) and (5) from that list have been addressed since then (and a and b), but that's it. I'm surprised we haven't seen more changes, too -- free traders are the weakest part of the vanilla economy right now, and X4 has so few "rabbit holes" compared with previous games that it's really important to keep stuff moving at a basic level at least.
User avatar
alt3rn1ty
Posts: 3518
Joined: Thu, 26. Jan 06, 19:45
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by alt3rn1ty »

Vim Razz wrote: Sun, 10. Feb 19, 09:24
alt3rn1ty wrote: Sat, 9. Feb 19, 19:52 So the issue/s j.harshaw said were fixed in the topic in the Tech Support forum viewtopic.php?f=180&t=411849 .. I guess they must be further up the line waiting to be implemented in public builds.

That has surprised me because this v2 beta series is supposed to be all about Weapon and Economy balancing https://twitter.com/EGOSOFT/status/1093538776767492099
(1) and (5) from that list have been addressed since then (and a and b), but that's it. I'm surprised we haven't seen more changes, too -- free traders are the weakest part of the vanilla economy right now, and X4 has so few "rabbit holes" compared with previous games that it's really important to keep stuff moving at a basic level at least.
Ah good, things are progressing better than I thought. Patch 2.00 Beta 2 has added another fix for free traders too.
Spec's@2025-05-17 - Laptop - Acer Predator Helios Neo 16 AI - Win 11 x64
CPU - Intel Core Ultra 9 275HX 2.7-5.4ghz, RAM - 32gb DDR5 6400(OC),
Discrete GPU - NVidia Geforce RTX 5070 Ti, VRAM 12gb GDDR7,
SSD - M.2 PCIe NVME 1Tb
, OLED WQXGA 2560x1600.
:goner: Seeker of Sohnen. Long live Queen Polypheides. :boron:
Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Re: [MOD/FIX] Autotrade Logic Adjustment v1.0.2

Post by Vim Razz »

alt3rn1ty wrote: Thu, 14. Feb 19, 20:26 Ah good, things are progressing better than I thought. Patch 2.00 Beta 2 has added another fix for free traders too.
The note "[Beta 2] Improved trade evaluation for free traders" looks promising to me, as do the questions in the main forum as to whether the max jump distance has changed (which may mean that player-owned vanilla traders are searching more than just one sector for trade offers now -- it's a similar sentiment to confusion expressed earlier in this thread due to traders traveling further than expected).

I wont be able to look at the current beta files until I get home, though. We'll see.

Return to “X4: Foundations - Scripts and Modding”