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

Science/Experience not being properly attributed in VPG's #540

Closed severedsolo closed 8 years ago

severedsolo commented 8 years ago

Scenario:

Kerbal Academy Boot Camp contract sets a vessel definition when the scientist completes his science (including recovery). I then use this definition to award experience to the crew.

There are two things wrong here: 1) The contract window does not show the experiment has been completed when it's collected. 2) The scientist does not get his reward. However, if you then re-load the vessel, the VPG parameter is complete, on recovery (the second parameter) the experience is then rewarded.

So, I think what's happening is, it's looking for the VPG definition, after it's either a) checked the science, or b) awarded the experience.

jrossignol commented 8 years ago

The issue with the CollectiScience not being shown as checked is purely cosmetic, and is a side effect from a performance improvement I made a few releases back. It's fixed now.

The second issue is more difficult. The recovery processing on CollectScience happens after the vessel is recovered, due to KSP limitations. Which means using it in a VPG is a bad idea (because by the time the child parameter completes, there's no more vessel. So I'd suggest reworking the contract to remove the recovery processing (set recovery = None). That way you can complete that parameter, execute the define and then do the recovery to get the experience.