Stavell

[Release][V3.2][KSP 1.2] Interstellar Flight Inc. - Kerbal Life Support Mod

Recommended Posts

Release - IFI Life Support.

10-2-2016 : Release VER 3,21  for 1.2 (on Curse of Github) (ModuleManager no longer required for this Mod)

or

Project Page on curse

Source Code available at GitHub Released Under GPL3 License.

Author : Stavell

Bugs can be submitted in this thread or at GitHub.

If plug-in seems not to be working right you can enable Debugging log entries via the right click menu on any pod (recommended to be left off unless you are experiencing problems.)

Released Under GPL3 License.

I know that there are a few Life support mods in development. They are too intense for my tastes. SO I designed my own.

GOALS I have for my plug-in:

  1. Tracks life support use even when ships are not loaded into scene.
  2. Based on Realistic Life Support values on use and weight. based on information from Life Support Systems at wiki.org
  3. Low overhead and play-ability with KSP.
  4. Life support tracked and used on EVA.
  5. Use only one new resource to simulate O2-Food-CO2 Scrubbers and recyclers, and emergency power ( LS resource use figures in Waste recycling based on Tech tree advances)

 

Currently the MOD is working with no game breaking bugs found yet.

  1. therealcrow999 - Thank you for contributing the nice Logo and Flag for Interstellar Flight Inc.
  2. Universal Storage - Has Created a wedge that holds Interstellar Flight Life Support Resource more info can be found here
  3. spiritplumber - Has created a Part cfg for using a greenhouse part for use with the system Can be found here
  4. Sandworm - Created Modmanager file for HGR Parts -Thread is here
  5. Akinesis - Created more tanks for use with the mod Thread is here
  6. maxrsp

    - Has made a video featuring IFILS, thank you. Video Here

Current Working Features:

  • Kerbal going on Eva takes Life Support from pod/vessel.
  • Boarding a pod returns unused Life support to pod/vessel.
  • Running out of Life Support  can kill crew
  • All pods have LS Resource and plug-in installed using Module Manager.

 

 2 Custom parts a radial and a inline tank for Life-support resource storage. Universal Storage has created a wedge to hold Life-support giving you 3 options for extra LS storage.

Plug-in Operation Info:

Currently there are several Status LS system can be in:

  • Pod Standby - No demand for LS and no resources consumed. Life Support tag for days / hours of LS remaining is hidden.
  • Active - Demand for LS and resources consumed. Life Support tag for days / hours of LS remaining will read how long LS will last for whole vessel.
  • Visor - Kerbal on EVA breathing outside air decreased Resource consumption. Life Support tag for days / hours of LS remaining will read how much LS remains once active again (fixing).
  •  Intake Air - Pod using air intakes to provide O2 to crew - decreased Resource consumption. Life Support tag for days / hours of LS remaining will read how much LS remains once active again.
  •  CAUTION - Less than 2 days pod or 1 hour EVA of LS remaining. Life Support tag for days / hours of LS remaining will read how long LS will last for whole vessel.
  • Warning! - LS  at 0. Kerbals will start dying if immediate action not taken. Life Support tag for days / hours of LS remaining will read 0.

Each unit of Life-Support should provide 1 Kerbin Day (6 hours) of Life support for 1 Kerbal. In Career and Scince game modes this goes up and down based on Tech tree.

Mod uses the time as set in settings menu so it will track 6 or 24 hour days depending on setting in main menu. Days remaining on RT click menu are accurate based on this setting. Only change in mod is that if not using kerbin time each Kerbal requires 4 units of LS per day.

Screen Shots

Crew Pod Life Support

Interface.jpg

Eva Life Support:

eva.jpg

Parts for system

Tanks.jpg

Edited by Stavell
1.2 tag

Share this post


Link to post
Share on other sites

Hello, thanks for that Stavell, i've used your mod since the first dev release, now i can't play without it :)

I've wait so many time a good and easy life support :)

Edited by Malah

Share this post


Link to post
Share on other sites
Life Support and Electric is used even if not the active vessel.

How did you deal with variable EC for solar panels while not the active vessel? Any chance you could release this part as stand-alone?

Share this post


Link to post
Share on other sites
How did you deal with variable EC for solar panels while not the active vessel? Any chance you could release this part as stand-alone?

I am still working on code for tracking the solar panels when the vessels comes back into focus (Basically I look at amount of time ship has been dormant find all deployed Panels x Generation rate x amount of time unfocused then I subtract electric use for Life-support. I take this number and use it to request electric charge from vessel so a negative number adds Electric and a Positive number uses electric.) This is not active in the release version as I'm testing it for the 1.09 release. I've ran 12 Vessels through the current code and all behaved as expected.

At this time when coming back in focus I don't kill kerbals if electric runs out until the next request for LS runs. Gives solar panels a chance to add Electric Charge.

When it makes it into the release you'll be able to see the code on Github I do not have plans to separate but I'm sure someone that finds it useful might make their own plugin by editing my code for LS.

Here is the code I'm currently testing and is working well.

                double resourceReturn = active.rootPart.RequestResource("LifeSupport", resourceRequest);
double ElectricReturn;
if (TTtest >= 2200) //TTtest is the number of seconds since I last requested LS higher than 1801 means the vehicle has been unfucoused.
{// This is a check for Solar Power after vehicle comes back active
int CountSP = 0;
foreach (ModuleDeployableSolarPanel PP in active.FindPartModulesImplementing<ModuleDeployableSolarPanel>().ToList())
{
// Count Extended unbroken Panels-
if (PP && PP.stateString == "EXTENDED") { CountSP += 1; }
}
IFIDebug.IFIMess(" POD Active Solar Panel count is == " + Convert.ToString(CountSP));
double SolarPower = CountSP * 0.51;
SolarPower = SolarPower * TTtest;
ElectricRequest = SolarPower - ElectricRequest;
ElectricReturn = active.rootPart.RequestResource("ElectricCharge", ElectricRequest);
if (ElectricRequest >= 0 && ElectricReturn <= 0) {ElectricReturn = 0 - 1;} else {ElectricReturn = 1;} // Tell System if Electric need was met.
}
else
{ // This is the normal electric use while vehicle is active
ElectricReturn = active.rootPart.RequestResource("ElectricCharge", ElectricRequest);
}
IFIDebug.IFIMess(" POD resource Avalible == " + Convert.ToString(ResourceAval));
IFIDebug.IFIMess(" POD LS Resource Return == " + Convert.ToString(resourceReturn));
IFIDebug.IFIMess(" POD Elect Resource Return == " + Convert.ToString(ElectricReturn));

I want to use the flow rate from each panel - problem that concerns me (testing atm) is if you focus on a vessel after 6 months and it happens to be on the dark side of a planet the system would get 0 and panels would not provide EC for the whole 6 months. (so I went with a straight count of panels and a flat rate to simulate partial dark time per panel.)

Edited by Stavell
Explanation

Share this post


Link to post
Share on other sites

Just for my own reference:

Snacks = Simple food (not sure about the active ship issue), no air/water, no deaths, no waste products.

TAC = Food, water, air, all the time, even not in focus, can cause death, generates waste.

This one (Interstellar) = Life Support (ignore subcategories) all the time, can cause death, no waste?

Share this post


Link to post
Share on other sites
Just for my own reference:

Snacks = Simple food (not sure about the active ship issue), no air/water, no deaths, no waste products.

TAC = Food, water, air, all the time, even not in focus, can cause death, generates waste.

This one (Interstellar) = Life Support (ignore subcategories) all the time, can cause death, no waste?

You're correct.

Lifesupport resource represents O2, Dehydrated food, CO2 filters, and ECLSS consumable parts.

Electriccharge - keeps system running , IE waste recyclers - scrubbers - heating and cooling.

either one runs out Kerbals are in danger

waste recycling is figured into the mass per unit of the Lifesupport resource. Without black and grey water and CO2 scrubbing - MASS and volume of LS units would be 10x higher.

- My opinion is although separate Food, water, air, and CO2 resources are cool they do not add to the playability of KSP except by increasing the cpu load - and the size of RT Click menus. Again this is my opinion and is the reason for my mod.

Share this post


Link to post
Share on other sites

Not objecting, just making sure I understood the differences to each, they each seem to fit a niche. Hopefully each can be supported by mods that support one of them.

Share this post


Link to post
Share on other sites

No problem - I was just explaining more for additional info for the community on my thinking and where I came up with my MOD.

I'd have to say without TAC I would not have found out how much I enjoyed using a Life Support mod to play KSP. And where the balance was for me between Playability and to much clutter to the game.

Share this post


Link to post
Share on other sites

Ah. So looks like you just averaged the solar efficiency to .51 for non focused vessels. That's the question I was getting at. Reason I asked is it gets complicated for ships that are in deep space, unfocused for short times, have eccentric orbit, ect. I was in some debates about this several months ago, but I do think even just simplifying it like you did is better than having no EC drain at all while unfocused. Perhaps could you make a variable for efficiency_while_unfocused be tweakable?

Thanks for the detailed response.

Share this post


Link to post
Share on other sites

NP - I do plan to add a CFG file for tweaks most likely in 1.12 or so.

Also I think I'm going to look a checking SOI - if around sun almost always have sun. with Planets you'll almost always be 50/50 or so sun dark. Then even look a distance from sun and lower the amount of EC made the further out.

Share this post


Link to post
Share on other sites

So....let me see if I got this straight. Electric charge generates Life Support. Lack of charge means the backup system kicks in and starts to run out. Give it more power and the kerbals can survive near indefinitely? Or do I need to dock ships and transfer life support into the needy ship?

Share this post


Link to post
Share on other sites

Electric charge and Lifesupport are both required and are used up at same time - either run out and kerbals can die. you'll have to dock and transfer Lifesupport to a ship that is low.

Share this post


Link to post
Share on other sites

We've just released the Universal Storage IFI pack

This small pack adds a Life Support wedge, containing 21 days of supplies. As well as modifying the EVAx in the KAS pack to include Life Support resources.

You'll need the Universal Storage Core pack for this to work. Downloads and instructions are available at www.kingtiger.co.uk

Tutorial videos to follow.

Share this post


Link to post
Share on other sites

Status update - Finishing up testing of Solar Panel code - if all goes well I hope to release VER 1.09 on the 20th.

Share this post


Link to post
Share on other sites

Hi Stavell, I'm not sure what your roadmap is for this mod but do you have a greeenhouse anywhere in your future?

I think that is the one missing part that would really round out the mod and allow life support generation instead of just resupply which would make colonies a bit more managable. Not only would it fit perfectly with your whole concept of an abstracted life support unit by taking only sunlight (or electricity) in and life support out, but it actually solves the conservation of mass criticism that usually comes from the realism advocates. Without the need for us to manage all the detailed mechanics, it allows for the notion of waste, air and water recycling to occur in the greenhouse behind the scenes.

Still loving it and looking forward to your future updates.

Edited by maxrsp
typo

Share this post


Link to post
Share on other sites

Yes I have considered a Greenhouse - I'm still running ideas through my head on how to implement it. One idea is Sunlight or electric charge + 1 unit od Lifesupport creates 2 units of Lifesupport. Not sure on time for generation but formula would scale depending on size of then Biodome. using Lifesupport to Generate Lifesupport would simulate the biomass needed to generate food air and such.. Just one idea I'm tossing around.

Share this post


Link to post
Share on other sites

This is great news, can't wait :)

Obviously as the person doing all the work, how you impliment it is completely your perogotive, but if I could offer up a suggestion I would say stay inline with your current minimalist approach and keep it dead simple. If the 1 LS in and 2 LS out is really just an analogue for a biomass exchange then I would say its unnecessary.

As your mod currently stands, all waste management is abstracted (have I mentioned I love that simplicity?) so I would continue with that. Let the biomass exchange and other conservation of mass mechanisms be implied and beneath the surface just as waste management is today. What the greenhouse adds is a tangible indicator that those things are occuring (unseen), rather than it being complete black magic.

Thanks!

Share this post


Link to post
Share on other sites

Download link has been updated to VERSION 1.09 release.

9-22-2014 : Release VER 1.09 - IFILifesupportPlugin109.zip

or

GitHub IFI Life Support Releases

or

Project Page on curse

Changes:


Added code to track solar-panel charging while vessel is unfocused.
Fixed attach nodes on inline tank
Fixed hatch on inline tank
Adjusted LS Values on custom parts

Up-coming:

 Cfg file for consumption rates.
internal view for inline tank.

Share this post


Link to post
Share on other sites
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.