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

Fix the volumes and surface areas of several habitats #168

Merged
merged 5 commits into from
Jan 11, 2025

Conversation

Clayell
Copy link
Contributor

@Clayell Clayell commented Dec 25, 2024

For some reason, when a part has its habitat defined in https://github.com/KSP-RO/Kerbalism/blob/7e279c3bccae30eff1ab6612b2b69e78214f4983/GameData/KerbalismConfig/System/Habitat.cfg but NOT in https://github.com/KSP-RO/ROKerbalism/blob/0ae007bf2789abf136ff05367a42e366ecd6dd62/GameData/KerbalismConfig/System/Habitat.cfg, there is a strange bug that massively multiplies that parts volume and surface area by a seemingly random amount.

For example, according to https://github.com/KSP-RO/Kerbalism/blob/7e279c3bccae30eff1ab6612b2b69e78214f4983/GameData/KerbalismConfig/System/Habitat.cfg#L59, landerCabinSmall is supposed to have a volume of 2.1m^3, when it actually has 10.37m^3 ingame.

image

Another example, according to https://github.com/KSP-RO/Kerbalism/blob/7e279c3bccae30eff1ab6612b2b69e78214f4983/GameData/KerbalismConfig/System/Habitat.cfg#L91. cupola is supposed to have a volume of 4.1m^3, when it actually has 18.77m^3 ingame.
image

I have 0 idea where these values are coming from, as searching them up in the KSP-RO org gives no results, so I think its either a KSP bug or a kerbalism bug.
There was a substantial difference between the volumes and surfaces areas in Kerbalism vs ROKerbalism, so I had to manually calculate the volume/sa of the cylinders of each of these parts, and then scale them according to how landerCabinSmall scaled. It's a bit arbitrary, but it does give decent results.
This pull adds habitats for the following parts, all of which were defined in Kerbalism but not in ROKerbalism, giving them wacky values:
landerCabinSmall (just sets it to the same as landerCabinMedium, because they have the exact same shape and having them different is confusing for the player)
mk2LanderCabin_v2
crewCabin
cupola
mk2Cockpit_Standard
mk2Cockpit_Inline
mk3CrewCabin
Mark1-2Pod
mk2LanderCabin

Additionally, it also changes the habitat for mk3Cockpit_Shuttle to be a bit more reasonable when combined with the new mk3CrewCabin.

@Clayell
Copy link
Contributor Author

Clayell commented Dec 25, 2024

Unrelated, but it would be nice if https://github.com/KSP-RO/Kerbalism had an issues tab, its strange that it doesn't?

@Capkirk123
Copy link
Member

It's always had one, right here?

@Clayell
Copy link
Contributor Author

Clayell commented Jan 7, 2025

It's always had one, right here?

I said https://github.com/KSP-RO/Kerbalism, not https://github.com/KSP-RO/ROKerbalism.

@Capkirk123
Copy link
Member

Because that's not the Kerbalism repo, it's a random and seemingly dead fork that's in KSP-RO for some reason

@Clayell
Copy link
Contributor Author

Clayell commented Jan 7, 2025

Oh, strange. I didn't check the actual Kerbalism repo, but I'd assume that the same thing persists, where all of the parts defined in Kerbalism but not in ROKerbalism have these weird surface areas and volumes.

@Capkirk123
Copy link
Member

The kerbalism configs are a bit difficult to understand for sure.

What's happening here is the default kerbalism configs are only applied if the default kerbalism profile is present, which it is not in an RP-1 install because the ROKerbalism profile is being used. This means Kerbalism will fall back on attempting to automatically calculate the area of the parts based on their colliders. Since a lot of parts (including stock ones) can have some sketchy colliders, this generally results in pretty absurd volumes being applied.

No bug here, just bad configs.

@Clayell
Copy link
Contributor Author

Clayell commented Jan 7, 2025

Ah, that makes much more sense. Do you have any comments on my configs?

@Capkirk123 Capkirk123 merged commit 650df76 into KSP-RO:master Jan 11, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants