Jump to content

[1.0.5] TAC Life Support v0.11.2.1 [12Dec]


TaranisElsu

Recommended Posts

(I just skimmed the last several messages, so forgive me if I misunderstood anything.)

@chrisl

Try calculating the consumption over the entire time that you are away from your vessel, i.e. the entire 2 days.

I think you will find that the converters are not behind by the entire amount, but only some time less than a 24-hour day (i.e. 84600 seconds or the MaxDeltaTime). The issue you are seeing is caused by multiple independent systems interacting*, with no way to determine which runs first. So the converter could end up running first, and trying to recycle a "days worth" of CO2 exhaled by the Kerbals except the calculation for the Kerbals has not run yet! So there is no CO2 yet to be recycled. Then the Kerbal calculations run, and they breath in the Oxygen and exhale the CO2. Then the converter runs again, but it already calculated for a days-worth so it just calculates for the remaining time minus the days-worth (again limited to MaxDeltaTime).** You should never see anything get more than MaxDeltaTime seconds out of sync.

You can try changing the MaxDeltaTime in the configuration file and see how that effects everything. Just keep in mind that you can set the MaxDeltaTime too low such that it cannot keep up when time warping and it can take too long to catch up if you were away for a significant of in-game time.

  • At 100,000x time warp, 100,000 seconds pass per real-time second, or 4,000 seconds per physics frame (0.04 seconds). If MaxDeltaTime is set below 4000, then the mod will not be able to keep up with the time warp rate.
  • An in-game Kerbal year is 9,201,600 seconds long (426 days * 6 hours). The default settings (86,400 seconds per physics frame) will make it take 4.26 seconds per year to catch up. At 4000, it will take 92 seconds (~1.5 minutes) to catch up per year.

If you do change MaxDeltaTime, please share your findings with everyone.

I could fix this by making all of the calculations run from one central "controller", but that limits the ability for other people to make a part and have it "just work" with my mod. They would have to use one of my classes (TacGenericConverter) or use some complicated "registration" technique. None of the stock parts (i.e. converters or drills) would work.

BTW, DBowman pretty much answered your question on 5 Oct. Thanks DBowman and damerell and everyone else for helping answer questions! Sorry I have not been around much lately.

Also, Thank You to everyone for expressing your support for this mod. I am not abandoning it, but I will be asking for some help soon because I do not have the time to keep up.

* The other mods you are comparing to, like the fuel boil-off, only have one system to worry about and so do not have to deal with the complexity of multiple independent systems interacting.

** The opposite could also happen: the Kerbal calculations run first, so they consume O2 and generate CO2. Then the converters run, and they recycle the CO2. If you have at least a days worth of O2 for the Kerbals, then everything is fine. But if you do not, then the calculations would think the Kerbals have been deprived of oxygen and could be killed before the converter has a chance to run! (Note the Kerbals are not actually killed until the next physics frame to give the converters an extra chance to run so I don't erroneously kill the Kerbals.)

- - - Updated - - -

Can anyone explain why TAC LS's so-called Sabatier CO2 and only outputs oxygen, and why water and energy are required as an input instead of being the product? Because according to online sources, the Sabatier process is:

CO2 + 4 H2 → CH4 + 2 H2O + energy ∆H = −165.0 kJ/mol

Or,

Input carbon dioxide and molecular hydrogen, out comes methane and water and the reaction releases energy.

Out of all the life support mods, I like TAC LS most for it's attention to realism. So it strikes me as a bit incongruent, that or I'm missing something.

See my spreadsheet, especially the section about Recycling, starting at line 313: https://docs.google.com/spreadsheet/ccc?key=0Aioc9ek3XAvwdGNsRlh3OVhlbTFBR3M4RW0zLUNTRFE&usp=drive_web#gid=0

The short explanation is: to avoid dealing with intermediate resources, my recyclers combine multiple reaction steps or reverse the order.

  • Sabatier reaction: First split some water to get oxygen and hydrogen gas. Then use the hydrogen in the Sabatier reaction to recover the O2 (as water) from the CO2. This uses twice the water that it generates and generates methane gas as waste. 4H2O -> 2O2+4H2, then 4H2+CO2 -> CH4+2H2O
  • Bosch reaction: CO2 + 2H2 --> C + 2H2O, then H2O --> 2H2 + O2, C is waste

Note that in your equation, you still need to split the water to get the oxygen (for breathing).

Also note: I did not find good values for the energy required or generated by the different reactions, so the power usage may be off, but the rest of the calculation should be correct.

Link to comment
Share on other sites

In all three cases, RO is just using the existing "TacGenericConverter" which is why I assumed the problem was with the converter itself. All three have the same basic issue: they'll use or create some of the resources but not others while not focused on the craft. Everything works perfectly (from what I've seen so far, anyway) while you're focused on a craft. It's only when you switch to another craft or back to KSC, then advance time, that the converter seems to have an issue.

This sounds like an issue I ran into with stock converters, and it might have something to do with actual available space for a resource.

The full post is here, but the TL;DR version is that, if you have something where conversions go like A-->B-->C, and if you have lots of A and lots of space for C, but little or no room for B (because B is turned into C immediately), if the craft is not selected you will get no C. The engine can't find a place to put B, so it stops trying.

Does this match what you are seeing? If so, I am fairly sure it's not the TacGenericConverter so much as how the game is (currently) working, since the same thing is seen with stock modules.

Link to comment
Share on other sites

Thanks for the reply TaranisElsu. Changing "MaxDeltaTime" looks like it resolved the problem. I reset it from 86400 that RO defaults it to, down to 4000 then switched to the capsule I ran the test on to confirm that the LS values were still basically what they had been:

T+ 04:51:20, 2431 O2, 201 CO2, 242 Water, 2.99 Waste Water, 365 Food, 1.03 Waste, 42.98 LithiumHydroxide, 261 LqdOxygen, 355 LdqHydrogen

Then I switched back to KSC and advanced time for 2 days. After which I returned to the capsule and got these results:

T+ 2d, 04:51:39, 2448 O2, 216 CO2, 244 Water, 32.54 Waste Water, 330 Food, 24.17 Waste, 36.82 LithiumHydroxide, 221 LqdOxygen, 304 LqdHydrogen

Those are basically the same values I got when I advanced time by two days while focused on the ship, so reducing MaxDeltaTime seems like it is the answer.

I should point out that as soon as I jumped back to the capsule I got the "Apollo 1 - Oxygen depleted!" notice, but I'm guessing that appears before the "catch up" happens. I can live with that. :)

Link to comment
Share on other sites

My resources/stats at the start of this test are as follow:

T+ 04:51:20, 2431 O2, 201 CO2, 242 Water, 2.99 Waste Water, 365 Food, 1.03 Waste, 42.98 LithiumHydroxide, 261 LqdOxygen, 355 LdqHydrogen

While focused on the craft, I advance time for 2 days and have the following:

T+ 2d,04:51:32, 2448 O2, 216 CO2, 244 Water, 32.54 Waste Water, 330 Food, 24.17 Waste, 36.82 LithiumHydroxide, 220 LqdOxygen, 297 LdqHydrogen

Next, I reload my save, returning to the first set of values. Now if I go to KSC and advance time for 2 days, then return to the craft, I have the following resources:

T+ 2d, 04:51:39, 888 O2, 767 CO2, 232 Water, 32.54 Waste Water, 330 Food, 10.55 Waste, 41.03 LithiumHydroxide, 223 LqdOxygen, 304 LdqHydrogen

In both of the above, I had the CO2 scrubber, LOX-O2 generator and Fuel Cell running for the entire test. Just so you don't have to look them up, below I've included the Input/output values for each of the generators. Whether I advance time at KSC or while focused on the craft, the best result would be for the amount of resources used and created by these generators to be basically the same. But as you can see, that is definitely not happening and there doesn't appear to be any kind of "catch up" taking place.

As mentioned before, there definitely does appear to be some kind of "catch up" taking place - your kerbals are not dead, which they would be if the generators were not present. Additionally we can see that input resources have been consumed and waste output.

Taranis's reply explains why the result is not exactly the same. In practice, however, it doesn't matter unless you launch a mission whose endurance is limited because the generators can't quite keep up with demand rather than by input resources. If you left both examples above focussed long enough for the generators to catch up, I think you'd find they ended up with the same remaining endurance.

Link to comment
Share on other sites

As mentioned before, there definitely does appear to be some kind of "catch up" taking place - your kerbals are not dead, which they would be if the generators were not present. Additionally we can see that input resources have been consumed and waste output.

Taranis's reply explains why the result is not exactly the same. In practice, however, it doesn't matter unless you launch a mission whose endurance is limited because the generators can't quite keep up with demand rather than by input resources. If you left both examples above focussed long enough for the generators to catch up, I think you'd find they ended up with the same remaining endurance.

Actually, no. I did this test with a 2 day interval because my game could handle it and I could get reportable results. But I'd noticed this problem before when I was doing longer duration Mercury and Gemini missions. In all cases if I advanced time while at KSC, I'd return to the capsule in question to find it's CO2 basically maxed out and it's O2 nearly depleted. Sure, "catch up" was sort of occurring but I was still losing at the bulk of my available O2 and coming dangerously close to CO2 poisoning. The only saving grace was by the time I returned to a capsule, I was ready to de-orbit so the lack of resources wasn't a huge concern. But it would definitely become a concern for moon missions or interplanetary flights where I would potentially be returning to the capsule multiple times. However, as stated above and at TaranisElsu's suggestion, I reduced the MaxDeltaTime which seems to have resolved the issue. Now when I advance time while at KSC, then return to a craft, the craft's resource usage and creation is good. There's still some deviation as compared to actually advancing time while focused on the craft, but the deviation is far more acceptable.

Link to comment
Share on other sites

Actually, no. I did this test with a 2 day interval because my game could handle it and I could get reportable results. But I'd noticed this problem before when I was doing longer duration Mercury and Gemini missions. In all cases if I advanced time while at KSC, I'd return to the capsule in question to find it's CO2 basically maxed out and it's O2 nearly depleted. Sure, "catch up" was sort of occurring but I was still losing at the bulk of my available O2 and coming dangerously close to CO2 poisoning.

You aren't "losing at the bulk of my available O2"; you have more input resources remaining in proportion to the lower quantity of oxygen.

ETA: If there are consequences for a resource filling up then, yes, it may be necessary to reduce MaxDeltaTime. But the TAC converters don't, I believe, lose any resources when unfocussed.

Edited by damerell
Link to comment
Share on other sites

You aren't "losing at the bulk of my available O2"; you have more input resources remaining in proportion to the lower quantity of oxygen.

ETA: If there are consequences for a resource filling up then, yes, it may be necessary to reduce MaxDeltaTime. But the TAC converters don't, I believe, lose any resources when unfocussed.

Maybe I just haven't explained this or it's confusing because I've talking about three generators. With the exception of electricity, which I have a large surplus of anyway, the three generators do not rely on each other, so let me just focus on the LOX-O2 generator. It converts LOX to O2. And Kerbals use up O2. The kerbals use 24.66 O2/hour each. Three kerbals in the capsule so that's 73.98 O2/hour that is used. The LOX-O2 generator uses 0.85 LOX/hour and produces 74.34 O2/hour. The LOX-O2 generator is therefore creating more O2 then I'm using. Oh, and the capsule has about 12 hours worth of O2 for all three kerbals.

Let's say I advance time by 24hrs. If I do this while focused on the craft I'll find that my LOX has dropped by 20.4 and I have 36hrs (12hr per kerbal so 36hr total) available O2.

If I advance time by 24hrs while I'm at KSC or focused on a different craft (with the default MaxDeltaTime), when I return to the craft I'll find that I again used 20.4 LOX just like I should have. But I'll only have about 20 minutes worth of O2 left. So, with the default MaxDeltaTime, I have "lost" at least 36 hours worth of O2.

But as I stated, reducing the MaxDetlaTime has resolved my issue. Now when I advance time at KSC and return to the craft, I have most of the my O2 available.

Link to comment
Share on other sites

Let's say I advance time by 24hrs. If I do this while focused on the craft I'll find that my LOX has dropped by 20.4 and I have 36hrs (12hr per kerbal so 36hr total) available O2. If I advance time by 24hrs while I'm at KSC or focused on a different craft (with the default MaxDeltaTime), when I return to the craft I'll find that I again used 20.4 LOX just like I should have. But I'll only have about 20 minutes worth of O2 left. So, with the default MaxDeltaTime, I have "lost" at least 36 hours worth of O2.

This is not the case with the figures you posted. The unfocused craft has used less LOX and Lithium Hydroxide; it has generated less Waste and Water (from the fuel cell).

Link to comment
Share on other sites

Maybe I just haven't explained this or it's confusing because I've talking about three generators. With the exception of electricity, which I have a large surplus of anyway, the three generators do not rely on each other

I think the Kerbals themselves 'are' generators, using O2, ... and generating CO2, ... . (TAC uses the same (kind of?) generator code to 'run' the Kerbals)

Edited by DBowman
Link to comment
Share on other sites

This is not the case with the figures you posted. The unfocused craft has used less LOX and Lithium Hydroxide; it has generated less Waste and Water (from the fuel cell).

Huh? The focused values don't match the unfocused values when MaxDeltaTime is set to default. That's the issue I was reporting. They should match, or at least come very close. When I reset MaxDeltaTime=4000 and reran the test, the focused and unfocused values are basically the same. Yes, there is a bit of deviation (primarily in the LOX and LH2 due to boil off not working correctly when unfocused) but it's close enough to not be a concern.

Link to comment
Share on other sites

...

The short explanation is: to avoid dealing with intermediate resources, my recyclers combine multiple reaction steps or reverse the order.

Aha. So I did miss something. Shows me just how much I understand feebly grasp about life support stuff. I do hope TAC-LS remains compatible and/or updated with the upcoming updates, 1.0.5 and later 1.1. This mod is changing the way I play KSP in my present career game, and I love it.

Link to comment
Share on other sites

I've updated my declutter script to formally incorporate Interstellar Fuel Switch and TweakScale. I've also made it available on KerbalStuff (along with CKAN) and GitHub. Not sure if I should start my own topics just for the declutter script or keep updating the original post in this topic.

Link to comment
Share on other sites

Hey guys.

Due to real life issues I stopped gaming for about 3 months or so.

Back then TACLS was not supporting 1.0.4. Now when I updated all my mods via CKAN it still says it does not support 1.0.4.

Any plans or just first post is no updated?

I am addicted to that mod, because it pretty much adds another 20% of my gaming experience/pleasure. And I do not want to be stuck with 1.0.2 aero and stuff.

Link to comment
Share on other sites

Huh? The focused values don't match the unfocused values when MaxDeltaTime is set to default. That's the issue I was reporting. They should match, or at least come very close.

No, they shouldn't. They should match within (generator capacity * MaxDeltaTime). What should not happen is what you originally reported; input resources being consumed without output resources being generated, which results in an actual net loss of life support capability - and AFAICT it _doesn't_ happen.

Link to comment
Share on other sites

Hey I'm wondering about a life support mode to add to my system. And I like TAC for the fact it provides a constant challenge.

However I wonder: can water/oxygen be 'farmed' (or made close-loop) at other planets/asteroids/moons? So I could have a self supplying base somewhere? (I'm perfectly fine if such a base requires a planet/moon or whatever to be next to it, I just don't wish to keep sending missions).

Link to comment
Share on other sites

Hey I'm wondering about a life support mode to add to my system. And I like TAC for the fact it provides a constant challenge.

However I wonder: can water/oxygen be 'farmed' (or made close-loop) at other planets/asteroids/moons? So I could have a self supplying base somewhere? (I'm perfectly fine if such a base requires a planet/moon or whatever to be next to it, I just don't wish to keep sending missions).

There are no parts included in TAC-LS for something like that right now. You'd have to grab another mod that allows for extracting gasses and water vapour from atmospheres. I _think_ Karbonite allows for this. I know BioMass has a part to do it

Link to comment
Share on other sites

Hey I'm wondering about a life support mode to add to my system. And I like TAC for the fact it provides a constant challenge.

However I wonder: can water/oxygen be 'farmed' (or made close-loop) at other planets/asteroids/moons? So I could have a self supplying base somewhere? (I'm perfectly fine if such a base requires a planet/moon or whatever to be next to it, I just don't wish to keep sending missions).

You should use third party mods for it. OKS/MKS is the best one I know; it allows you to construct orbital and surface bases, mine and produce all the stuff needed to maintain life support etc.

Link to comment
Share on other sites

... then I'll shamelessly plug TAC Life Support Declutter Revised. :)

All nice and so on, BUT :

However, any craft built after the script is installed will break if you uninstall the script.

And I actually looked at it few days ago when I was installing stuff via CKAN, but that exact quote turned me down.

I pretty much just want to hide them from my VAB/SPH, but not actually remove. And at some point when I need Let's say just food one I can comment out the config file. Then when I no longer need it I can de-comment and my crafts, that have the food only container, will not be deleted.

If I simply install http://forum.kerbalspaceprogram.com/threads/64117 (MFT) will it fix itself ?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...