jrossignol / ContractConfigurator

A config file based solution for creating new contracts for Kerbal Space Program.
https://forum.kerbalspaceprogram.com/index.php?/topic/91625-1
Other
64 stars 67 forks source link

Request for info - maxCompletions internal variable? #649

Open GrKl30 opened 6 years ago

GrKl30 commented 6 years ago

Sorry, This is not an issue, rather a request, I dont think Github allows requests.

I'dd like to mod CC to add a functionallity: have some contracts repeatable on a yearly basis: allow contract 'x' to be repeated Y times every year. I think CC does not currently allow this.

Would anyone be able to tell me how I could access 'maxCompletions' internal variable from another mod? Or rather, the 'maxCompleted' variable for a specific contract. I've searched into the sources, but have not found what I searched.

Newbie trying to be modder here. Thanks for any help possible

GrKl30 commented 6 years ago

ok, forget that specific request, found that CC is using the ActualCompletions() to find what I was looking for. Sadly, it is not stored as is, it reads all completed contracts to find that info.

If I can be a pain: any way to find from another mod the completed date on all completed CC contracts? those seem to be the last value in the 'values' array in the save file, just not sure how to fetch that during runtime