Dev Update: CPS Objectives + New Objective's Interface (w/ Screenshot)

  • Colonies / Storage:
    • [New: DONE] now, each time that a product is updated, the CSM calls the CPS to see if the product is used by a current CPS objective.
  • Colonization Phase System (CPS):
    • [New: DONE] the CPS now can keep track if a product, used by an objective, is updated. In the positive case, the linked scores are calculated.
    • [New: WIP] the system update certain objectives over the time, when their design request it. It is the case for PROVIRSRC which needs to keep track when its next period will end. 
  • Colonization Phase System (CPS) / Objectives:
    • [New: WIP] Ensures the Survivability of the Population (ASURPOP): special initialization of the objective with its rules, calculations and specific data.
    • [NOT DEV] Be Energy Efficient (ENERGEFF): special initialization of the objective with its rules, calculations and specific data.
    • [NOT DEV] Keeps the Usage of Line of Credit at Lowest (KEEPLOC): special initialization of the objective with its rules, calculations and specific data.
    • [NOT DEV] Keeps Alive #Percent of the Population at End Of Year (KEEPALIVE): special initialization of the objective with its rules, calculations and specific data.
    • [NOT DEV] Keeps an Acceptable Level of Mortality (KEEPMORT): special initialization of the objective with its rules, calculations and specific data.
    • [NOT DEV] Reachs a certain Level of Quality of Life (REACHQOL): special initialization of the objective with its rules, calculations and specific data.
    • [NOT DEV] Keeps Security at a the Allegiance Level (KEEPSECALL): special initialization of the objective with its rules, calculations and specific data.
  • Interface - Colonization Phase System (CPS):
    • [New: DONE] the old panel used to display the list of each objective and their score is now totally deprecated.
    • [New: WIP] the list of objectives is now displayed in the OpenGL view. It includes the score of each objectives and also specific data, if they have any.
  • Interface - Orbital Object / Colony / Energy:
    • [New: DONE] fix: if more than 100% of energy is used, it is now displayed.
  • Messages:
    • [New: DONE] Colonization: fix; name and full location are fully stored into the data structure of the message. Since a space unit can be remove by the end of the mission, if it is a colonization pod, it induced some errors in the informations of the message.
The implementation of the "Provide A#Resource for #Period (PROVIRSRC)" objective is finally nearly done, I just need to implement the rule and calculations when the end of the current period of time of the objective is reach.

Finally I changed the hardcoded data of the colonization pod to give them the ability to generate power outside of photonic energy, in other terms I equipped them with fission nuclear reactors.
The reason is that before, I only tested colonies on the same and one orbital object, Epsilon Eridani 2, which is pretty near from its star and lit but, once it given starting planets well farther than this one, star light is dim which in term of power generation .
The calculation of energy generation via photonic power take into account the illumination from the star, modifed by the distance, albedo and so on.

I also started the work on the interface, to display the objectives, by ditching the old CPS panel and integrating the display as HUD elements in the 3D view.
The not-so impressive work-in-progress is illustrated in the screenshot below:

FYI the third objective is the unfamous one I'm working on. It's title change according to the type of resource to produce and the period of delivery (each month, quarter or the full year).

I flushed many bugs here and here, many of them from the colonization mission itself. Also there were a problem with the removal of space units and the process of their tasks, it is fixed now.
Two big bugs stay for now, it is the loading of a game (from the Load Saved Game window) which is totally not working (certainly because of the changes with backstories and CPS) so I need to review the code. The second bug is when I start a new game when a actual game is ongoing.
Starting a new game from scratch, or continue the last one works, so it shouldn't be difficult to fix.

That's all for now.

No comments:

Post a Comment