Alpha 10 - It. #08: Updates on the Ongoing CPS Overhaul

I continuing to update the CPS, including a complete overhaul of the data structure of the non-player factions, the implementation of the expeditions and backstories, and the overhaul of the CPS itself including the objectives.

It is useless to say that all parts (and there are many) of the code concerned by these updates are a real mess, at least for now.
But the transition is ongoing, I already cleaned up the previous and deprecated colonization modes and the hardcoded CPS objectives.

I implemented the new data structures for the CPS objectives database and the in-game objectives.
Part of the CPS objectives is now contained into a new XML file and processed like any other asset of the game, like the infrastructures. It contains 3 basic data for any objective and the complete list SPM weight that can influence each objective.

As a reminder, each policy and meme of the SPM can affect a CPS objective on how it will be set and chosen during the dynamic setting of the player's objectives.
I put these data in a XML file, because it will be more convenient to update the amount of data through it than directly in the code.
This database is always loaded by default into FARC, regardless if the player set a new game or load an existing one.

The part of each objective that will be coded will be all the calulations and tests that will occur when the score of an objective will be updated. It's too complicated and not efficient to put that into a XML file.

So that's it. Since the CPS, like for many system in the game, affect other parts of the game, the whole need to be updated each time that I remove an old data or add a new one, it is a painful but necessary process in this case. You can see that as bad design but, it is often difficult to keep a long view of parts of the code, and how you will use it, on a time span of many years.

At least these ideas that I implementing are final (really! :) )

I will not make any post until this mess become a finally finished unicorn and is running. It will take again some time but I will keep you in touch for sure!
As usual I underestimated the amount of work that will be necessary, especially in the dependencies of the CPS code.

Enough ranting, have a great day and thanks for your interest!

CPS: Colonization Phase System    SPM: Socio-Political Matrix

No comments:

Post a Comment