Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HasCrewCapacity doesn't work with Kerbalism #717

Open
quetschke opened this issue Jun 20, 2022 · 5 comments
Open

HasCrewCapacity doesn't work with Kerbalism #717

quetschke opened this issue Jun 20, 2022 · 5 comments

Comments

@quetschke
Copy link

quetschke commented Jun 20, 2022

I'm having a contract from https://github.com/linuxgurugamer/KerbinSpaceStation (Launch the BODY Space Station! ) from StationCoreCombined.cfg and in there it requires the station to support 4 Kerbals with this:

        PARAMETER
        {
            name = HabModuleChild
            type = HasCrewCapacity
			title = Support 4 Kerbals
            
			minCapacity = 4
            
        } 

The picture below shows that Kerbalism is able to support the Kerbals with everything, oxygen, radiation shielding, pressure, etc., but once you the launching station crosses 2490m (corrected: 2344m, see video below) the contract turns "Support for 4 Kerbals" to red, before that it is satisfied (green).

Not sure where the problem lies, but it would be nice to get this working.

station_contract2

@caerfinon
Copy link

IF the condition is satisfied on the launch pad, but then changes after launch, then the vessel parameter group that this is part of may no longer reference your ship correctly for some reason. You would need to look at the detailed information in the persistent.sfs file for the game and look at all the data of the contract to determine why the parameter is being evaluated as false.

Again IF the parameter is green on the launch pad, then a simple solution would be to add a "disableOnStateChange = true" statement on the line following "minCapacity = 4". This will casue the parameter to be set green on the launch pad and remail green permanently as CC will stop trying to evaluate it further. This would be for future contracts of this type as the active one can only be altered by the complex editing the data in the persistent.sfs file.

An even easier solution is to complete the mission as close as you can without satisfying the CC conditions and then use the debug menu to complete the contract.

@quetschke
Copy link
Author

@caerfinon here is the parameter group for the contract from within the save file:

					PARAM
					{
						name = HasCrewCapacity
						id = HabModuleChild
						state = Failed
						disableOnStateChange = False
						values = 0,0,0,0,0
						ContractIdentifier = unknown
						title = Support 4 Kerbals
						notes = 
						completedMessage = 
						fakeFailures = True
						allowStateReset = True
						failWhenUnmet = True
						minCapacity = 4
						maxCapacity = 2147483647
					}

Looks good to me. I also just filed a Kerbalism issue, maybe someone has an idea over there.

@quetschke
Copy link
Author

The original test used two mk2 pods, but I just redid the launch with a Hitchhiker module and a PPD-12 cupola. All life support is enabled and provided. Kerbals are enjoying it. Same problem. See this recording for when the contract switches to red at 2344m altitude: https://youtu.be/Tk4AlBALAcY

@quetschke
Copy link
Author

OK, not sure who to blame, I just forced the station to re-render by switching to another ship and back, and voila! Now it supports 4 Kerbals in space.
contract3
Maybe CC needs to add some delays somewhere? Or maybe it's a feature ...

@siimav
Copy link

siimav commented Dec 9, 2022

A bit of a long shot but could be that this change fixes the issue: KSP-RO#5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants