KSP-RO / ContractConfigurator

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

Request: Change how vessels in VPGs are tracked when not in focus #19

Open Teykn opened 1 year ago

Teykn commented 1 year ago

Current behavior: Parameters in VPGs with vessels are only tracked when the vessel is currently controlled by the player. This works fine for parameters which can be instantly completed and kept that way, such as having crew, but does not work fine for "progressive" parameters like the Duration parameter, as they do not progress when the vessel is not in focus. VPGs with vessels tracked also seem to check the current vessel for the tracked vessel's parameters first, resulting in progressive parameters resetting and forcing the player to control the tracked vessel

Desired behavior: Parameters in VPGs with vessels tracked keep their previous states when switching away, and don't get updated when the current vessel is not the tracked vessel. Progressive parameters are able to track their progress while away from the tracked vessel, only resetting progress while in control of the vessel.

siimav commented 1 year ago

I don't believe this is entirely true. For instance the duration parameter can get tracked for multiple simultaneous vessels without getting reset. Yes, the contract window will show the values for the last visited vessel but it will restore the state after returning to another one. To be fair, many contracts in RP-1 were structured in a way where the duration always got reset after switching scenes or going to another vessel. This commit illustrates the changes needed to fix it: https://github.com/KSP-RO/RP-0/commit/939a1a5f3d683598fb865b8fc4291697180388ed

Teykn commented 1 year ago

I tested the solution done in the commit. It does track across different vessels/scenes, but the way it is set up can cause it to activate earlier than intended. Contract I tested on is set up with 5 VPGs, with the Duration parameter in the 3rd VPG, and the 1st and 3rd focusing on the same vessel. Once VPG 1 is complete, it starts the Duration in VPG 3, even though I have it set so the duration is intended to start only when crew is present, which the vessel did not have.

siimav commented 11 months ago

Yeah, the usage of All parameter as illustrated above appears to be a bad idea. Looks like with https://github.com/KSP-RO/ContractConfigurator/pull/29 we should go back to wrapping Duration inside Orbit.