-
Notifications
You must be signed in to change notification settings - Fork 39
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
Conversation
Unrelated, but it would be nice if https://github.com/KSP-RO/Kerbalism had an issues tab, its strange that it doesn't? |
spotted by DeltaV
It's always had one, right here? |
I said https://github.com/KSP-RO/Kerbalism, not https://github.com/KSP-RO/ROKerbalism. |
Because that's not the Kerbalism repo, it's a random and seemingly dead fork that's in KSP-RO for some reason |
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. |
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. |
Ah, that makes much more sense. Do you have any comments on my configs? |
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.
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.
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.