Production Unit Output Calculations, is it overly complicated?

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

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

Post Reply
Dm748
Posts: 18
Joined: Fri, 15. Apr 22, 11:48

Production Unit Output Calculations, is it overly complicated?

Post by Dm748 » Tue, 3. May 22, 17:19

Just a thought but, are the mathematical calculations regarding production unit output in bases overly complicated and causing inefficient use of CPU cycles and game instability?

As I've been playing I've noticed that each output cycle for a product is calculated per individual Production Unit, easy to see if you watch the output timers for a few minutes. Would it not be much more efficient to calculate the output of a product per the entire station x by the number of production units within that station? Admittedly there would be a downside, it would cause the game to be slightly less realistic, and it may require more downstream product to be accumulated before the next phase of processing can take place, depending on the number of aggregated upstream materials needed. Also, the available worker calculations would have to be re-worked but, this should be fairly trivial to re-calculate. Overall the end result wouldn't be that much different and, if you apply this logic across all stations in the game the saving on CPU cycles would be significant, it would also alleviate the issue of the station size soft limit before the game becomes unstable. Larger stations would not be much more in terms of CPU calculations for production than smaller stations making the calculations much more scalable.

There is more to it to consider but, I won't go on, you get the gist, just thought I needed to get out of my head.

Dm748
Posts: 18
Joined: Fri, 15. Apr 22, 11:48

Re: Production Unit Output Calculations, is it overly complicated?

Post by Dm748 » Wed, 4. May 22, 10:28

Thought about this a bit more and realised that having to wait for a big enough backlog of materials before proceeding with the next stage of production doesn't actually speed things up with more production units if there is a lack of downstream materials. So, rather than a production run, times the number of production units, how about a single production run per station, per product that creates a base amount of product + worker calculations, but each production unit added decreases the production run time. The calculation would also have to produce diminishing returns per production unit added (we'll call it an administrative overhead for having to organise more production units) so as not to allow instant product production with enough added units. A slightly different slant on my original idea but still far more scalable and efficient than the current system.

Post Reply

Return to “X4: Foundations - Scripts and Modding”