-
Notifications
You must be signed in to change notification settings - Fork 3
Habitat & atmosphere refactor #9
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
Comments
We have the project to rewrite the whole habitat/atmosphere/pressure thing at some point, as there are many issues with the current implementation. Changing how things currently work is just not an option, the code has zero flexibility due to the whole system being based on resources / pseudo-resources. Here are some rough notes on my ideas for this (this is in no way a definitive plan) :
Possible implementation of atmosphere contents/pressure :
This would get ride of all the habitat pseudo resources and allow things that are currently impossible, like airlocks As for processes / controlers, the idea would be to globalize the capacity of all parts in the section and allow editor configuration / in flight usage "per section" in a non-PAW dedicated UI. |
IMO, I'm not sure if that considers some of the edge cases. Optimum values are all fine and dandy, but I don't think you'd always want to stick to them. If you're running low on nitrogen, for example, it might be worthwhile to shift to a pure oxygen atmosphere, or if temperature control energy requirements are too high, it might be easier to adjust humidity till the the wet bulb temperature is comfortable. If we consider what exactly a kerbal needs from ambient atmosphere,
|
What you describe is way too complex. While a super-realistic simulation with atmo composition customization, temperature/humidity relationships, etc could seems appealing, it usually result in things being buggy, hard to understand and impossible to balance properly. Things must stay at a reasonable level of abstraction. An example of that : We are thinking removing the whole atmospheric humidity thing altogether. From the gameplay POV, this is just redundant with the other life support needs. It doesn't involve any extra resource, it doesn't introduce anything new or different. It's just an extra line in the GUI. The (currently broken) abstraction that was initially used for kerbalism's food/water cycle is as follow :
Now, the following is my own interpretation of what happened, and why humidity is a bad idea : At some point, for some obscure reasons, greenhouses were made to output "non dry food" and not output waste water for its water consumption (I think because that required to have extra water recycling capacity when you have greenhouses) . This broke the whole paradigm, causing water to magically disappear, and the answer to that was to make water reappear trough the humidity thing, which did go even further in breaking the initial abstraction. |
At the same time, also look at the greenhouse code - it too has some hardcoded values in there.
|
Get rid of the Atmosphere resource, or at least change the name to something else. See Kerbalism/Kerbalism#573 |
I can't even get greenhouses to appear in my save, I'll provide my ksp.log if needed when I get home |
So, I'm working on a habitat / gravity ring / comfort merge and rewrite.
This is still the same system as before, based on pseudo resources, but using a cleaner and more abstract implementation that allow some tricks to make the above features possible. That also mean there are some technical limitations and hard to get around issues, but hopefully that should be pretty minor. [*] : It should be possible, and a good thing to only make the depressurized hab parts surface count toward radiation protection only if there are kerbals in any of these parts. |
…on of bugs WARNING : DO NOT USE WITH EXISTING SAVES Features overview (see #480) : - Full rewrite of the habitat / gravity ring / comfort code - New partmodule : ModuleKsmHabitat - Depressurization requirement for EVA, radiation shelters, kerbals in pressure suits inside depressurized habs - More coherent behavior of pressurization/scrubbing while in atmosphere Known bugs / unfinished things : - Planner / Telemetry UI isn't properly rewired - Depressurization/deploy/rotate EC consumption isn't implemented - Can't go from/to EVA while in atmosphere - Automation UI & unloaded events aren't implemented - Mod support configs aren't updated - Emitter refactor to use the new Habitat data structure Technical changes : - Management of habitats in a VesselData.PartData persisted object - Massive refactor of the Resource sim (WIP) - This is in preparation of a planner refactor (trying to unify the codebase between loaded/unloaded/editor objects) - Implementation of virtual resources (WIP), in preparation of the thermal system - Refactor of the storm radiation raytracing code - Some file reorganization - Changed default messages font size to 14px, message duration as a function of message length, messages hidden in screenshot mode - Some tweaks here and there
The current system treats crew module atmospheres as being pure nitrogen with kerbals breathing directly from an oxygen bottle. Pressurisation is done with only nitrogen and only nitrogen is lost to space. There's also no ambient oxygen atmosphere in the capsule from which kerbals can draw if the bottled oxygen runs out, which would normally extend the time to asphyxiation by several minutes or even hours for large habs if emergency scrubbers work.
Ideally it'd be nice to see a monitor for oxygen levels like with humidity, and leakage rates for oxygen and nitrogen, but a quick fix for the leakage issue could be to simply pressurise with oxygen and treat the hab atmospheres as 100% oxygen.
The text was updated successfully, but these errors were encountered: