Alpha 10 -iteration #05: Some Details about the Changes

There are some changes into the data concerning the infrastructures and the production matrix of each colony.

I simplified the process on how the production modes (PM) are managed.

As a reminder; each production infrastructure, like a factory, can have one or more than one production mode. These modes act like a sort of template to define the production of products, based on arrays of specific data. A PM can have in output one or more than one products, according to the specificities of the mode itself.
The colonies have a production matrix (called CPM or Colony Production Matrix) that, for the sake of simplicity, regroup the production flow of all the PMs that are enabled for a colony.

Until now, these PM could have been disabled/enabled individually, and the input requirements were based unto what was available in the CPM.
That generated three problems:
  1. since it was planned that the player could enable/disable PMs himself/herself that wasn't, in the context of a game, something realistically bearable. Just imagine if the player had to browse a group of 500 factories for one colony, to disable one PM...
  2. the input requirements couldn't technically take into account the special case when a PM had more than one input product spread through multiples others linked PMs. Imagine the nightmare to code the requirement test to see if the PM has enough material to run one 1 hour (in game time) production run. 
  3. the products stored into a colony's reserves weren't simply taken into account... don't ask me why I even coded the system this way. It is one the weird mystery when you are back working on an old part of the code you haven't seen for more than one year...
So now, I overhaul how these PMs are managed to put their output requirement related to the colony's reserves and not the CPM.
PMs since yesterday cannot be enabled / disabled individually anymore, it is now at the level of the infrastructure itself, so in clear; if a production infrastructure is enabled, its PMs are considered enabled.
And even if one PM haven't enough resources in input for one production run, but have some,  a prorata will be calculated related to the lowest input value. Of course these tests will be done globally at the level of the CPM and not for each infrastructures.

I don't know if this post is clear but yep, in short simplify the processes :)
I also do that because it would be impossible to inform the player clearly of why he/she doesn't have a full production for such and such product.
By this new way, it is now possible and with even by a detailed form with ratios in %.

Anyway a small update, there is a lot of work under the hood yet before to finally update the interface...

Stay tuned.

Comments