[7.0? - 8.0] Avarice economy may sometimes self-destruct

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

Forum rules
See full rules at Technical Support Request Rules

Required Information in all Technical Support Requests

Please ensure that you provide the following information for all questions posted in this Technical Support forum.
  • Version and language (e.g. 8.00 Hotfix 3, English, etc.).
  • Whether or not your game is modified using any third party scripts or mods (see note below).
  • The game start you originally selected for the game in which the problem occurred.
  • Exact nature of the problem, where and when it occurs and what you were doing at the time.
  • Any possibly relevant changes you have made to your game, system, or software before the issue occurred.
  • Where appropriate, additional symptoms, error messages, links to saves, screenshots and crash dump files (see this Wiki entry).
  • Your system specifications in the form of a DxDiag report and vulkaninfo (see this Wiki entry).
Failure to provide all this information will make it pretty much impossible for people to help you and may mean that it takes longer for your problem to be identified and hopefully solved. So please don't waste your own time and everyone else's by just posting something like "My game freezes. Help!!!".

If you are supplying information that will not conveniently fit into posts in this forum (approx 70,000 character limit per post), in the worst case you can split long text files across 2 consecutive posts, or ideally you can upload the data to a reputable public fileshare site (a few examples are Google Drive, DropBox or PasteBin, etc) but please don't use sites that spam advertising or require registration for downloads. Please use in your post the open public sharing link to your file(s) that will not require any account or registration for others to download.

Note: Support for third party modifications must be provided by the authors of those modifications, and any requests for such support should be posted in the appropriate thread in the Scripts and Modding forum.
Vectorial1024
Posts: 312
Joined: Mon, 30. Jul 18, 04:16
x4

[7.0? - 8.0] Avarice economy may sometimes self-destruct

Post by Vectorial1024 »

This is somewhere between a question and a bug report.

---------------------

Sometime ago when playing, I noticed the Riptide Rakers ("RIP") would self-destruct their scrap processor stations for no apparent reason. It was not the Tide which caused this, so that's very strange.

Later discussion with other modders revealed a problem with the Faction Logic (Economy) script. I walk through the script as follows:
  • The script regularly checks RIP station stock levels
  • Very often there is a strong surplus of claytronics and a strong deficit of hull parts
  • Faction Logic script decides to pause claytronics production
  • After some time, with no improvement to the situation, Faction Logic script decides to destroy the station that has paused claytronics production
  • I notice that the station is destroyed and its building materials are on sale
Is this intended? Because I can see this can lead to a vicious cycle.

The key is that Claytronics production is tied with Hull Parts production via the Scrap Recycler module. Pausing Claytronics production will also pause Hull Parts production. When shipyards run out of Hull Parts, they will stop building ships, which will further decrease Claytronics demand, which then also slows down Hull Parts production. This creates a cycle which encourages the RIP to self-destruct almost all of their stations and starve off the Avarice economy.
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!
Logistics Guidance: Manually adjust station logistics efficiency.
Imperial Good
Moderator (English)
Moderator (English)
Posts: 4967
Joined: Fri, 21. Dec 18, 18:23
x4

Re: [7.0? - 8.0] Avarice economy may sometimes self-destruct

Post by Imperial Good »

It is intentional that underused stations are deconstructed to keep the universe clean and active. However I think there should be minimum limits as to how many stations need to exist and so cannot further be removed, I am not sure.
Vectorial1024 wrote: Thu, 26. Feb 26, 12:57 The key is that Claytronics production is tied with Hull Parts production via the Scrap Recycler module. Pausing Claytronics production will also pause Hull Parts production. When shipyards run out of Hull Parts, they will stop building ships, which will further decrease Claytronics demand, which then also slows down Hull Parts production. This creates a cycle which encourages the RIP to self-destruct almost all of their stations and starve off the Avarice economy.
The module alternates production methods skipping any that have a full output. This means that once claytronics are full, the modules will constantly produce hullparts. Their economy cannot deadlock due to oversupply of 1 of the products as all production effort will then shift to the other output.

If you are saying the problem is that the NPC AI is explicitly pausing the module due to full Claytronics when it can still produce Hullparts that is probably a bug. I am not sure why such logic would even exist given that the modules automatically pause on full storage anyway so it seems kind of redundant for them to be explicitly paused.
Vectorial1024
Posts: 312
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [7.0? - 8.0] Avarice economy may sometimes self-destruct

Post by Vectorial1024 »

The script does specify the minimum number of modules to keep, but that's set to "keep at least 1 module per production", which is technically correct but not too helpful.
Imperial Good wrote: Sat, 28. Feb 26, 22:47 The module alternates production methods skipping any that have a full output.
Yes, but I'm not talking about this. I need to clarify myself.

So basically, RIP normally have only 4 to 5 Scrap Processor modules in their space. I got lucky (with some help from mods) and, through several station building missions ("preemptive defense": build me a faction admin station), gave the RIP 16 extra Scrap Processor modules, with the catch that the stations are not self-sufficient, so they have to buy energy cells and juicy scrap metal (and actually food rations and medical supplies). Very lucrative and can earn me some foreign exchange, and in theory if I do it right, I get to have an ample supply of cheap Hull Parts for future usage.

I notice the script runs a check per faction per sector, to see if any ware is in extreme surplus. With the 16 extra modules, Claytronics are in extreme surplus, and so the script decides to pause those modules, even when Claytronics storage AND Hull Parts storage are both not fully filled yet.

This is basically about "ispausedmanually" and "<set_production_paused />". Ideally the script should first check which (all) wares are actually in surplus, and then match exactly for modules that produces said ware and only said ware, but currently it just checks each ware by themselves and doesn't check strictly, which causes this self-destruct problem.

I also notice the script will unpause existing modules when the faction wants a new production module. The problem is that sometimes Hull Parts are in low supply but not that low, so it doesn't count as a real shortage and the game decided nothing can be done and tell RIP to destroy the stations. If it weren't for the extra foreign exchange from selling drugs to black market traders for me to buy back some Claytronics, my game would have softlocked itself.
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!
Logistics Guidance: Manually adjust station logistics efficiency.

Return to “X4: Foundations - Technical Support”