Jump to content

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


Stavell

Recommended Posts

I've looked at all the life support plug-ins and mods for KSP, I like yours because of the simplicity and low overhead approach, which still nevertheless simulates life support limitations fairly well.

Question : on CURSE this mod is indicated as "Supports: 0.23.5" - is this correct? I noticed you just released a new file, is the compatibility now verified with 0.24.2?

Link to comment
Share on other sites

I've built a greenhouse, it uses the greenhouse part at http://forum.kerbalspaceprogram.com/threads/37408-The-greenhouse-module for the model.

Here's the code:



RESOURCE_DEFINITION
{
name = Photosynthesis
density = 0.000001
flowMode = NO_FLOW
transfer = NONE
}

RESOURCE_DEFINITION
{
name = BioMass
density = 0.000001
flowMode = NO_FLOW
transfer = NONE
}

// Kerbal Space Program - Part Config
// made By Z moded by Me

PART{

// --- general parameters ---
name = greenhouse
module = Part
author = z

// --- asset parameters ---
mesh = model.mu
// entries missing ?


// --- node definitions ---
node_stack_top = 0.0, 1.61, 0.0, 0.0, 1.0, 0.0, 2
node_stack_bottom = 0.0, -1.61, 0.0, 0.0, 1.0, 0.0, 2
node_attach = 1.25, 0.0, 0.0, 1.0, 0.0, 0.0, 1


// --- editor parameters ---
TechRequired = spaceExploration
entryCost = 10400
cost = 4000
category = Science
subcategory = 0
title = GreenHouse
manufacturer = Jeb Co. Light Industreals
description = Garden in a Can kit, assembled and ready to use. Can be used to generate small amounts of power, but its main purpose is sustenance. One greenhouse should be enough for two to four kerbals.

PhysicsSignificance = 1


// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,1,1,1,0

// --- standard part parameters ---
mass = 4.5
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.3
angularDrag = 2
crashTolerance = 6
breakingForce = 200
breakingTorque = 200
maxTemp = 2900

fuelCrossFeed = True


// ---resources and xtras

MODULE
{
name = ModuleDeployableSolarPanel
sunTracking = true
animationName = door
raycastTransformName = glass
pivotName = glass
isBreakable = false
resourceName = Photosynthesis
chargeRate = 1

powerCurve
{
key = 206000000000 0 0 0
key = 13599840256 1 0 0
key = 68773560320 0.5 0 0
key = 0 10 0 0
}
}

//MODULE
//{
//name = ModuleAnimateGeneric
//animationName = door
//startEventGUIName = Remove Shutters
//endEventGUIName = Close Shutters
//}

MODULE
{
name = ModuleScienceExperiment
experimentID = GreenhouseScience

experimentActionName = Observe Botany Experiment
resetActionName = Reset Botany Experiment

useStaging = False
useActionGroups = True
hideUIwhenUnavailable = True
//animationName = door

xmitDataScalar = 0.4

FxModules = 0

dataIsCollectable = True
collectActionName = Collect Botany Data
interactionRange = 2.4
}


RESOURCE
{
name = Photosynthesis
amount = 0
maxAmount = 1
}

RESOURCE
{
name = BioMass
amount = 0
maxAmount = 1
}
RESOURCE
{
name = LifeSupport
amount = 0
maxAmount = 1
}
RESOURCE
{
name = ElectricCharge
amount = 0
maxAmount = 1
isTweakable = false
hideFlow = true
}
MODULE
{
name = ModuleGenerator
requiresAllInputs = true
isAlwaysActive = true
INPUT_RESOURCE
{
name = Photosynthesis
rate = 0.001
}
INPUT_RESOURCE
{
name = Photosynthesis
rate = 0.001
}
OUTPUT_RESOURCE
{
name = BioMass
rate = 0.01
}
}
MODULE
{
name = ModuleGenerator
requiresAllInputs = true
isAlwaysActive = true
INPUT_RESOURCE
{
name = BioMass
rate = 0.005
}
INPUT_RESOURCE
{
name = BioMass
rate = 0.004
}
OUTPUT_RESOURCE
{
name = LifeSupport
rate = 0.01
}
}

MODULE
{
name = ModuleGenerator
isAlwaysActive = false
activateGUIName = Gasifier ON
shutdownGUIName = Gasifier OFF
INPUT_RESOURCE
{
name = BioMass
rate = 0.025
}
INPUT_RESOURCE
{
name = LifeSupport
rate = 0.015
}
OUTPUT_RESOURCE
{
name = ElectricCharge
rate = 1.0
}
}

}

Link to comment
Share on other sites

I've built a greenhouse, it uses the greenhouse part at http://forum.kerbalspaceprogram.com/threads/37408-The-greenhouse-module for the model.

Here's the code:

Sorry for the dumb question but is this code for a new part.cfg file? Also what are the Photosynthesis and Biomass resources for? Are they needed? I like this mod over others because it only uses the one new unit (Life Support).

Regardless, if I can get this working I owe you a big THANKS!

Link to comment
Share on other sites

On the thought of Greenhouses I'm trying to figure a balance between fact and SCI-Fiction and playability. very good article about it here http://settlement.arc.nasa.gov/Contest/Results/96/winner/seis.html.

Stuff that is important to note root vegetables have the shortest grow time 20-25 days which if you spaced out planting you could have food each day. and having a composting section return nutrients to the system (with constant electric needed and if lost electric or sun for a short time. You'd lose the whole greenhouse with no way to recover except by bringing in new supplies)

also it takes about 20 trees or 10-15 thousand leaves to generate o2 and scrub co2 per person.

Now with technology I'm sure this will be worked out. (Biosphere 1 and 2 they admitted after a month they had to scrub the air for CO2 to keep it viable and the had 3.15 acres of plants growing)

Now on to game play how to I keep it simple and add the challenge of managing the Biosphere/greenhouse and not make my system more complex - that is what is going on in my head now.

Until I figure it out I like spiritplumber's part mod does a good job, as it works without new code.

Thanks for all the support

Link to comment
Share on other sites

Thank you spiritplumber for getting us a great interim greenhouse while Stavell works on solidifying his plans for one.

My minimalist OCD kicked in however and I revised / simplified the part.cfg code so that it only produces the Life Support resource (no Photosynthesis or Biomass). I also removed the Botany Experiment and Gasifier functions while adding an Ultraviolet Light so that the greenhouse continues to produce Life Support at the cost of electricity when the sun is not visible (or the shutters are closed). Because I removed the Botany Experiment, it no longer made sense to be in the Science part category so I moved it to Utility.

Here is the revised code if anyone else is interested:


PART{
name = greenhouse
module = Part
author = z

// --- asset parameters ---
mesh = model.mu
// --- node definitions ---
node_stack_top = 0.0, 1.61, 0.0, 0.0, 1.0, 0.0, 2
node_stack_bottom = 0.0, -1.61, 0.0, 0.0, 1.0, 0.0, 2
node_attach = 1.25, 0.0, 0.0, 1.0, 0.0, 0.0, 1

// --- editor parameters ---
TechRequired = spaceExploration
entryCost = 10400
cost = 4000
category = Utility
subcategory = 0
title = GreenHouse
manufacturer = Jeb Co. Light Industrials
description = Garden in a Can kit, assembled and ready to use.
PhysicsSignificance = 1

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,1,1,1,0

// --- standard part parameters ---
mass = 4.0
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.3
angularDrag = 2
crashTolerance = 6
breakingForce = 200
breakingTorque = 200
maxTemp = 2900
fuelCrossFeed = True

MODULE
{
name = ModuleDeployableSolarPanel
animationName = door
sunTracking = true
raycastTransformName = glass
pivotName = glass
isBreakable = false
resourceName = LifeSupport
chargeRate = 0.0005

powerCurve
{
key = 206000000000 0 0 0
key = 13599840256 1 0 0
key = 68773560320 0.5 0 0
key = 0 10 0 0
}
}

MODULE
{
name = ModuleGenerator
requiresAllInputs = true
isAlwaysActive = false
activateGUIName = UV Lights ON
shutdownGUIName = UV Lights OFF
INPUT_RESOURCE
{
name = ElectricCharge
rate = 4
}
OUTPUT_RESOURCE
{
name = LifeSupport
rate = 0.000093
}
}

RESOURCE
{
name = LifeSupport
amount = 0
maxAmount = 10

}
}

EDIT: In UV Light mode with shutters closed it produces a constant 2 units of Life Support per day. With the shutters open the rate of generation varies by all the same factors a solar panel does when generating electricity. I can't figure out how to automatically shut off the UV light when the on-board Life Support capacity of 10 is full... if anyone knows if this can be done please let me know. Thanks!

EDIT#2: Oops, forgot to active suntracking in the code above... fixed.

Edited by maxrsp
Link to comment
Share on other sites

How do you mean real life values? This mod rolls all lifesupport into a single resource for simplicity purposes, it is designed to be representative of lifesupport requirements, if you want realism then you should really be using one of the other mods TAC, ECLSS and I believe someone is running IronCross too.

Link to comment
Share on other sites

I understand what he means if RSS are pods model after real life counter parts. He wants the values in days to reflect them example the Lunar module in Apollo missions carried 3-5 days of life support for 2 astronauts which would be 10 units in my Mod. Other Gemini capsules could carry up-to 14 days of life support for 2 astronauts or 28 units in my mod.

Now I'm not using RSS - but if given a link I will look into it and come up with values for you.

Link to comment
Share on other sites

He wants the values in days to reflect them example the Lunar module in Apollo missions carried 3-5 days of life support for 2 astronauts which would be 10 units in my Mod.

Exactly :)

Now I'm not using RSS - but if given a link I will look into it and come up with values for you.

I thought that you might already have real values in days - it would be easier. But if so, it will not be a problem to do it by myself, just need to search web a bit longer. Thanks :)

Link to comment
Share on other sites

Hey Stavell, if I could make a quick suggestion for your OP (knowing a lot of people only read the OP before moving on) you may want to highlight and link the Universal Storage addon for your mod as well as maybe a link to spiritplumbers page 3 greenhouse post.

Don't be afraid to show-off the full scope of this great little mod so far :)

Link to comment
Share on other sites

This is an MM file I did that adds the resource to any part that has a crew capacity.


@PART[*]:HAS[#CrewCapacity[1]]:Final
{
MODULE
{
name = IFILifeSupport
}
RESOURCE
{
name = LifeSupport
amount = 6
maxAmount = 6
}
}

@PART[*]:HAS[#CrewCapacity[2]]:Final
{
MODULE
{
name = IFILifeSupport
}
RESOURCE
{
name = LifeSupport
amount = 12
maxAmount = 12
}
}

@PART[*]:HAS[#CrewCapacity[3]]:Final
{
MODULE
{
name = IFILifeSupport
}
RESOURCE
{
name = LifeSupport
amount = 18
maxAmount = 18
}
}

@PART[*]:HAS[#CrewCapacity[4]]:Final
{
MODULE
{
name = IFILifeSupport
}
RESOURCE
{
name = LifeSupport
amount = 24
maxAmount = 24
}
}

@PART[*]:HAS[#CrewCapacity[5]]:Final
{
MODULE
{
name = IFILifeSupport
}
RESOURCE
{
name = LifeSupport
amount = 30
maxAmount = 30
}
}

@PART[*]:HAS[#CrewCapacity[6]]:Final
{
MODULE
{
name = IFILifeSupport
}
RESOURCE
{
name = LifeSupport
amount = 36
maxAmount = 36
}
}

@PART[*]:HAS[#CrewCapacity[7]]:Final
{
MODULE
{
name = IFILifeSupport
}
RESOURCE
{
name = LifeSupport
amount = 42
maxAmount = 42
}
}

Additionally, here is a tank for Procedural Parts.


PART
{
RequiresAssembly = IFILifeSupport

// --- general parameters ---
name = proceduralTankIFIL
module = Part
author = AncientGammoner, NathanKell, Swamp Ig, OtherBarry

// --- asset parameters ---
MODEL
{
model = ProceduralParts/Parts/cylinderTank
scale = 1,1,1
}
scale = 1
rescaleFactor = 1

// --- node definitions ---
node_stack_top=0,0.5,0,0,1,0,1
node_stack_bottom=0,-0.5,0,0,-1,0,1
node_attach=0,0,0.5,0,0,-1,1

// --- editor parameters ---
cost = 4000
TechRequired = survivability
entryCost = 4000
category = Utility
subcategory = 0
title = Procedural Life Support Tank
manufacturer = Kerbchem Industries
description = Made from viscoelastic nanopolymers (which were discovered by accident... growing in the back of the office mini-fridge) this fuel tank can be stretched to accommodate life support in a range of sizes and shapes. Hardens to a rigid structure before launch!

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,1,1,1,0

// --- standard part parameters ---
mass = 1.2
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 1
crashTolerance = 12
breakingForce = 500
breakingTorque = 500
maxTemp = 3200


MODULE
{
name = ProceduralPart
textureSet = PlainWhite

TECHLIMIT {
name = survivability
diameterMin = 0.1
diameterMax = 1.5
lengthMin = 0.1
lengthMax = 0.5
volumeMin = 0.1
volumeMax = 1.0
}

TECHLIMIT {
name = heavyRocketry
diameterMax = 3.0
volumeMax = 3.0
lengthMax = 1.0
}

TECHLIMIT {
// Make everything unlimited for metaMaterials
name = metaMaterials
diameterMin = 0.01
diameterMax = Infinity
lengthMin = 0.01
lengthMax = Infinity
volumeMin = 0.01
volumeMax = Infinity
}
}
MODULE
{
name = ProceduralShapeCylinder
displayName = Cylinder
TechRequired = start
TechObsolete = advConstruction

length = 0.25
diameter = 1.25
}
MODULE
{
name = ProceduralShapeCone
displayName = Cone
TechRequired = generalConstruction
TechObsolete = advConstruction

length = 1.0
topDiameter = 0.625
bottomDiameter = 1.25
}
MODULE
{
name = ProceduralShapePill
displayName = Fillet Cylinder
TechRequired = advConstruction

length = 1.0
diameter = 1.25
fillet = 0.25
}
MODULE
{
name = ProceduralShapeBezierCone
displayName = Smooth Cone
TechRequired = advConstruction

length = 1.0
topDiameter = 0.625
bottomDiameter = 1.25
}
MODULE
{
name = TankContentSwitcher
useVolume = true


TANK_TYPE_OPTION
{
name = IFILifeSupport
// This is the dry mass of the tank per kL of volume.
dryDensity = 0.25
RESOURCE
{
name = LifeSupport
unitsPerT = 64.8
}
}
}
}

Edited by GeoPhizzix
Link to comment
Share on other sites

This is an MM file I did that adds the resource to any part that has a crew capacity.


@PART[*]:HAS[#CrewCapacity[1]]:Final
{
MODULE
{
name = IFILifeSupport
}
RESOURCE
{
name = LifeSupport
amount = 6
maxAmount = 6
}
}

@PART[*]:HAS[#CrewCapacity[2]]:Final
{
MODULE
{
name = IFILifeSupport
}
RESOURCE
{
name = LifeSupport
amount = 12
maxAmount = 12
}
}

@PART[*]:HAS[#CrewCapacity[3]]:Final
{
MODULE
{
name = IFILifeSupport
}
RESOURCE
{
name = LifeSupport
amount = 18
maxAmount = 18
}
}

@PART[*]:HAS[#CrewCapacity[4]]:Final
{
MODULE
{
name = IFILifeSupport
}
RESOURCE
{
name = LifeSupport
amount = 24
maxAmount = 24
}
}

@PART[*]:HAS[#CrewCapacity[5]]:Final
{
MODULE
{
name = IFILifeSupport
}
RESOURCE
{
name = LifeSupport
amount = 30
maxAmount = 30
}
}

@PART[*]:HAS[#CrewCapacity[6]]:Final
{
MODULE
{
name = IFILifeSupport
}
RESOURCE
{
name = LifeSupport
amount = 36
maxAmount = 36
}
}

@PART[*]:HAS[#CrewCapacity[7]]:Final
{
MODULE
{
name = IFILifeSupport
}
RESOURCE
{
name = LifeSupport
amount = 42
maxAmount = 42
}
}

Additionally, here is a tank for Procedural Parts.


PART
{
RequiresAssembly = IFILifeSupport

// --- general parameters ---
name = proceduralTankIFIL
module = Part
author = AncientGammoner, NathanKell, Swamp Ig, OtherBarry

// --- asset parameters ---
MODEL
{
model = ProceduralParts/Parts/cylinderTank
scale = 1,1,1
}
scale = 1
rescaleFactor = 1

// --- node definitions ---
node_stack_top=0,0.5,0,0,1,0,1
node_stack_bottom=0,-0.5,0,0,-1,0,1
node_attach=0,0,0.5,0,0,-1,1

// --- editor parameters ---
cost = 4000
TechRequired = survivability
entryCost = 4000
category = Utility
subcategory = 0
title = Procedural Life Support Tank
manufacturer = Kerbchem Industries
description = Made from viscoelastic nanopolymers (which were discovered by accident... growing in the back of the office mini-fridge) this fuel tank can be stretched to accommodate life support in a range of sizes and shapes. Hardens to a rigid structure before launch!

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,1,1,1,0

// --- standard part parameters ---
mass = 1.2
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 1
crashTolerance = 12
breakingForce = 500
breakingTorque = 500
maxTemp = 3200


MODULE
{
name = ProceduralPart
textureSet = PlainWhite

TECHLIMIT {
name = survivability
diameterMin = 0.1
diameterMax = 1.5
lengthMin = 0.1
lengthMax = 0.5
volumeMin = 0.1
volumeMax = 1.0
}

TECHLIMIT {
name = heavyRocketry
diameterMax = 3.0
volumeMax = 3.0
lengthMax = 1.0
}

TECHLIMIT {
// Make everything unlimited for metaMaterials
name = metaMaterials
diameterMin = 0.01
diameterMax = Infinity
lengthMin = 0.01
lengthMax = Infinity
volumeMin = 0.01
volumeMax = Infinity
}
}
MODULE
{
name = ProceduralShapeCylinder
displayName = Cylinder
TechRequired = start
TechObsolete = advConstruction

length = 0.25
diameter = 1.25
}
MODULE
{
name = ProceduralShapeCone
displayName = Cone
TechRequired = generalConstruction
TechObsolete = advConstruction

length = 1.0
topDiameter = 0.625
bottomDiameter = 1.25
}
MODULE
{
name = ProceduralShapePill
displayName = Fillet Cylinder
TechRequired = advConstruction

length = 1.0
diameter = 1.25
fillet = 0.25
}
MODULE
{
name = ProceduralShapeBezierCone
displayName = Smooth Cone
TechRequired = advConstruction

length = 1.0
topDiameter = 0.625
bottomDiameter = 1.25
}
MODULE
{
name = TankContentSwitcher
useVolume = true


TANK_TYPE_OPTION
{
name = IFILifeSupport
// This is the dry mass of the tank per kL of volume.
dryDensity = 0.25
RESOURCE
{
name = LifeSupport
unitsPerT = 64.8
}
}
}
}

Thanks I will use this or go off it for my own game. I think the only thing I might add is only has crew and a command module.

Link to comment
Share on other sites

Thanks I will use this or go off it for my own game. I think the only thing I might add is only has crew and a command module.

Yeah, that makes sense as well. My thinking in adding to all, was for science modules and station parts that were not command oriented containing some sort of life support within them. Glad I could help :)

Link to comment
Share on other sites

Yeah, that makes sense as well. My thinking in adding to all, was for science modules and station parts that were not command oriented containing some sort of life support within them. Glad I could help :)

Yeah a player could go either way, makes use of the LS parts more to use this type:

@PART[*]:HAS[@MODULE[ModuleCommand],#CrewCapacity[1]]

How did you come up with these numbers:

1 crew = 6 LS

2 crew = 12 LS

3 crew = 18 LS

The general idea going up by 4's. It makes more sense to have something so common and someone like me who is OCD is happy.

The ModuleManager_Squad.cfg didn't make sense to me, if it did I would of made the universal MM config myself.

1 crew = 7 LS

2 crew = 12 LS

3 crew = 14 LS

I pretty much deleted ModuleManager_Squad.cfg and used yours, I like simplicity, comes with OCD, lol.

EDIT:

I see why you used those numbers it keeps with the 6.04 days of Life Support. So even if you have a 1 crew man pod, it will have the same amount of LS days as a 3 man pod. This config should be really used in replacement of the other ModuleManager_Squad.cfg, since everyone these day use a multitude of different mods.

Edited by therealcrow999
Link to comment
Share on other sites

Yeah, that makes sense as well. My thinking in adding to all, was for science modules and station parts that were not command oriented containing some sort of life support within them. Glad I could help :)

I think I will use your config file. Makes sense with science modules and station parts.

Link to comment
Share on other sites

How did you come up with these numbers...

EDIT:

I see why you used those numbers it keeps with the 6.04 days of Life Support. So even if you have a 1 crew man pod, it will have the same amount of LS days as a 3 man pod. This config should be really used in replacement of the other ModuleManager_Squad.cfg, since everyone these day use a multitude of different mods.

That really all I did, I saw the trending value of 6 and ran with it. With the PP tank, the Unit/Ton, just happened to fall into the 6.4 by happenstance. Like you, my OCD and need to streamline/simplify kicked in :D

Link to comment
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.

×
×
  • Create New...