Jump to content

[0.20] Ioncross Crew Support Plugin ([0.22] dev build)


yongedevil

Recommended Posts

Ioncross Crew Support Plugin

version: 1.10

last tested with Kerbal v0.20.2

custom textures by: zzz

ModuleManager by: ialdabaoth (ModuleManager forum thread)

Space Port Link

image4small.jpg

The Ioncross Crew Support Plugin is a simple customizable life support mod for Kerbal. It comes setup with kerbals requiring oxygen, producing carbon dioxide, and their ships require electric charge. If they run out of oxygen or their ship fills up with carbon dioxide the kerbals will be killed. If their ship runs out of electric charge the command pods will stop working.

The resources and effects they have when they run out or fill up can be edited in the configuration file.

Updates

2013-09-15

A development build for version 1.11 is available that fixes some of the time warp bugs. Version 1.11 will break saves so it is advised you update to the dev build only when you're ready to start a new game. Currently on v1.11 dev build 4.

dev build 4 notes [0.22 compatible]

dev build 3 notes

dev build 2 note

dev build 1 notes

2013-06-21 Update:

No changes to the mod but it has been repackaged with ModuleManager v1.3 and includes ModuleManager configuration files for a number of popular mods.

1.10 Update:

The mod has been updated for Kerbal version 0.20 and now uses ModuleManager to edit the stock parts without needing to overwrite the files. It also now loads resource use information from an easily editable configuration file allowing it to be setup to handle any resources. Because of the file structure any files from older versions are not needed and should be deleted.

About the Mod

Overview:

This mod adds crew support systems to Kerbal Space Program. By default it is setup for oxygen, carbon dioxide, and electric charge, but this can be easily changed in the configuration file to support any number of resources.

The mod consists of several parts:

Crew Support Module: Parts with the crew support module will consume resources based on the setting in the configuration file, the number of kerbals onboard and their crew capacity. They also have built in generators intended to collect waste produce before they fill up the ship.

Resource Storage: Simple tanks to store oxygen for your Kerbal’s to breath. Currently there are three oxygen tanks using the default RCS tank models found under utility.

Carbon Dioxide Removal/Recycling: The crew support module has a built in scrubber to remove CO2, but there are also recycling generators that will covert CO2 back into oxygen. These greatly increase the longevity of an oxygen supply. Two recyclers are included in the utility category using the RCS tanks.

Intake Systems: Atmospheric intake modules will draw in oxygen or CO2 from the atmosphere. In oxygen atmospheres intakes will draw in oxygen directly; in non-oxygen atmospheres they’ll draw in CO2 instead. One intake using the circular intake model is included with the other life support parts.

Installation

Updating From 1.03 or earlier:

If replacing a version of Ioncross Crew Support from 1.03 or earlier the folder structure of the mod has been updated to match Kerbal v0.20. You can delete all file from previous versions as none of them will be used anymore.

Normal Installation:

Copy the contents of KerbalInstallForlder into Kerbal. If you have Kerbal on Steam this will be:

<steam dir>\steamapps\common\Kerbal Space Program\

Supported Mods:

This mod comes packaged with several ModuleManager configuration files. These files add the Ioncross crew support module to the parts from popular mods. There is no effect from having config files for mods you don't have installed. The mods and versions for each file is as follows:

[table=width: 650, class: grid, align: left"]

[tr]

[td]Config file[/td]

[td]Mod[/td]

[/tr]

[tr]

[td]ModuleManager_B9.cfg[/td]

[td]B9 Aerospace Pack [R3.1][/td]

[/tr]

[tr]

[td]ModuleManager_DeepSpaceMission.cfg[/td]

[td]Deep Space Mission Pack [v1.8][/td]

[/tr]

[tr]

[td]ModuleManager_FusTekStationParts.cfg[/td]

[td]FusTek Station Parts Expansion[/td]

[/tr]

[tr]

[td]ModuleManager_GeminiMercury.cfg[/td]

[td][FASA] – Gemini and Mercury Pack[/td]

[/tr]

[tr]

[td]ModuleManager_HOME.cfg[/td]

[td]H.O.M.E. [v1.0.3][/td]

[/tr]

[tr]

[td]ModuleManager_Kosmos.cfg[/td]

[td]Kosmos Space Station Parts Pack[/td]

[/tr]

[tr]

[td]ModuleManager_NovaPunch.cfg[/td]

[td]NovaPunch Remix Pack [1.5 Beta][/td]

[/tr]

[tr]

[td]ModuleManager_STEscapePod.cfg[/td]

[td]SPACETECH – Escape Pod [v1.8][/td]

[/tr]

[/table]

Adding Ioncross to Parts:

This mod makes use of ialdabaoth's excellent ModuleManager plugin to modify default parts. Changes to stock parts are defined in ModuleManager_Squad.cfg located in GameData\IoncrossCrewSupport\. This can be extended to modify parts from other mods fairly easily. For details on the ModuleManager syntax see the ModuleManger forum thread

The crew support module can also be added manually to parts. This may be necessary with mods that add part containing spaces in their names as ModuleManager has trouble with those. Simply copy the following code into the part.cfg.

MODULE
{
name = IonModuleCrewSupport
}

RESOURCE
{
name = Oxygen
amount = 300
maxAmount = 300
//24 per day per Kerbal
}

RESOURCE
{
name = CarbonDioxide
amount = 0
maxAmount = 10
//24 per day per Kerbal
}

Known Issues and Future Plans

Known Issues:

Built in CO2 scrubbers are not saving their current state and are always off on switching back to a vessel.

Future Plans

Resource usage during EVA

Calculation for resource usage while ships are inactive

An alert window and slowing of time warp when resources reach critical levels on the active vessel

Kerbal death from excessive G forces

An expansion of generator and collector systems to allow for more flexibility in mod configuration

Mod Configuration

3.1 IoncrossCrewSupport.cfg:

This file supports three types of entries:

ION_SUPPORT_KERBAL_RESOURCE

ION_SUPPORT_POD_RESOURCE

ION_SUPPORT_POD_GENERATOR

ION_SUPPORT_KERBAL_RESOURCE entries define resource consumption by kerbals. ION_SUPPORT_POD_RESOURCE entries define the default resource consumption of parts that hold kerbals. These share a lot of the same fields so they're outlined together here:

ION_SUPPORT_KERBAL_RESOURCE/ION_SUPPORT_POD_RESOURCE
{
name: Resource name as it appears in one of the resource config files
GUIName: How the resource will be displayed when right clicking on a part

ratePerKerbal: ION_SUPPORT_KERBAL_RESOURCE only. Consumption per kerbal per second.
rateBase: ION_SUPPORT_POD_RESOURCE only. Base consumption per second for parts that have at least 1 kerbal onboard.
ratePerCapacity: ION_SUPPORT_POD_RESOURCE only. Scaled consumption per second for parts that have at least 1 kerbal onboard based on the crew capacity. Final consumption of a part = rateBase + ratePerCapacity * CrewCapacity

boolCauseLock: If true when unable to fulfil requests for this resource command modules are deactivated.
boolCauseDeath: If true when unable to fulfil requests for this resource kerbals will be killed.
killRollInterval: Time between checks to see if kerbals die. At least one interval must pass before the first check.
killChance: Chance of each kerbal being killed during at kill check.
}

ION_SUPPORT_POD_GENERATOR entries define default built in generators for parts with the IonModuleCrewSupport module.

ION_SUPPORT_POD_GENERATOR
{
generatorName: Name to identify the generator so it can be modified by a part's part.cfg file.
generatorGUIName: How the generator will be displayed when right clicking on a part. Useful if multiple generators are attached.
requiresAllInputs: Will the generator be able to produce its output if some inputs are missing
}

INPUT_RESOURCE and OUTPUT_RESOURCE entries define the input and output of the generator

ION_SUPPORT_POD_GENERATOR
{
...
INPUT_RESOURCE/OUTPUT_RESOURCE
{
name: Resource name as it appears in one of the resource config files
rateBase: Base rate
ratePerCapacity: Scaled rate based on the crew capacity. Final rate is rateBase + ratePerCapacity * CrewCapacity
}
}

3.2 part.cfg:

ION_SUPPORT_POD_RESOURCE and ION_SUPPORT_POD_GENERATOR entries can be modifed or added in the part.cfg file as well. Values in the part.cfg will override the default values in IoncrossCrewSupport.cfg. There is one difference though, for the part.cfg rateBase and ratePerCapacity are not recognized use rate instead to simply set the final rate. ION_SUPPORT_KERBAL_RESOURCE cannot be modified on part.

Example Code:

PART
{
MODULE
{
name = IonModuleCrewSupport

//This removes the ElectricCharge usage for this part
ION_SUPPORT_POD_RESOURCE
{
name = ElectricCharge
rate = 0
boolCauseLock = False
}


//This replaces the default CO2Scrubber on this part with one that consumes ElectricCharge
ION_SUPPORT_POD_GENERATOR
{
generatorName = CO2Scrubber
INPUT_RESOURCE
{
name = ElectricCharge
rate = 0.05
}

OUTPUT_RESOURCE
{
name = CarbonDioxide
rate = -0.001
}
}

//This adds a new fuel cell generator to the part
ION_SUPPORT_POD_GENERATOR
{
generatorName = FuelCell
requiresAllInputs = True

INPUT_RESOURCE
{
name = LiquidFuel
rate = 0.45
}
INPUT_RESOURCE
{
name = Oxidizer
rate = 0.55
}

OUTPUT_RESOURCE
{
name = ElectricCharge
rate = 0.5
}
}
}
}

Licence

Modified source code, compiled dll, and configuration files may be distributed provided they attribute the original work to me, yongedevil. However, I request you do not simply re-post the original mod as I prefer it control where it is hosted myself.

Textures for the parts used were done by Kerbal forum user zzz. zzz has given permission for anyone to use these as they would like.

The ModuleManager dll is by ialdabaoth. See the ModuleManger forum thread for information on it.

Edited by yongedevil
v1.11 dev build 4 available
Link to comment
Share on other sites

http://forum.kerbalspaceprogram.com/showthread.php/26446-KerbalEVA-Lifesupport-(19-1-1)-Source-Only?

Mostly for Mulbin (Who, I guess... would quote me to you XD).

I've done some experimentation with it and am okay enough to leave the hackjob in... and I pretty much released it just to show people how to do what others wanted lifesupport to have. So surprised a bit.

Link to comment
Share on other sites

http://forum.kerbalspaceprogram.com/showthread.php/26446-KerbalEVA-Lifesupport-(19-1-1)-Source-Only?

Mostly for Mulbin (Who, I guess... would quote me to you XD).

I've done some experimentation with it and am okay enough to leave the hackjob in... and I pretty much released it just to show people how to do what others wanted lifesupport to have. So surprised a bit.

Great stuff... no idea what it means but I'm sure Yongedevil will!

Link to comment
Share on other sites

Would it be possible to add a habitation module that converts carbon dioxide into oxygen at a rate dependent on the light level?

Edited by gag09
Link to comment
Share on other sites

That's some quite useful stuff Fel. Should make adding oxygen to EVA fairly simple. So I guess I don't have any excuses not to have it ready in the next version.

I also want to get the calculations of resource consumption for inactive craft in. I finally realized I don't need to have fancy warnings about inactive craft resources getting low because none of the crew can die until the craft as been active for at least an hour. So you'll only have to worry resupply missions to craft you're using. Still I want to include a flag to make inactive resource calculations toggleable.

As for food and other resources, right now the mod only supports oxygen and carbon dioxide. I chose to model them because everything else is just more consumables and waste and oxygen and carbon dioxide can represent the whole process fairly well while keeping management simpler. That said, I do plan to make the mod load consumables and waste from a configurable list so any number of resources can be added to it.

And a module to convert resources depending on light levels should be possible, but I don't have plans to include one in the mod. I can provide help if you want to do so so yourself though. I think it should even be possible to hack something in without needed to do any plugin coding.

Link to comment
Share on other sites

Can you give a little crash course on how to add the CO2 capture and O2 production modules to other parts (I have the HOME habitat modules in mind, because of the greenhouses and stuff) so a programmer wannabe like me can do it?

Link to comment
Share on other sites

Of course. I'll include information for all the modules included in the mod since I don't think I provided documentation on the available fields for any of them. This information is for the current version of the mod (1.03). These will change a as I work on making the mod easier to use but I'll include better documentation with the mod when I do that.

The following code samples are for the part.cfg files. Find the part you want to edit in <kerbal install dir>\parts\ and open the part.cfg file to edit with any text editor. The code can be added at the end of the part file. See the existing part files if you want to reference how they look.

The IonModuleLifeSupport is the base life support module that simulates Kerbals in the part consuming O2 and producing CO2. This module should be added to all parts that can hold crew.


MODULE
{
name = IonModuleLifeSupport
scrubberRate = 0
electricalRate = 0
}

name – Name of the part module. IonModuleLifeSupport.

ScrubberRate – Rate of CO2 consumption when the scrubber is turned on. If not set or left at zero the mod will set the scrubber rate to a default of 1.5x the CO2 production of the max crew the part can hold.

ElectricalRate – Rate of electrical consumption of the part when there is any crew onboard. If not set or left at zero the mod will set the rate to 31.25/h + 10.4167 * max crew for command modules and half that for non command modules.

The IonModuleLifeSupportGenerator is the module you were asking about gabmaia. It converts CO2 into O2.


MODULE
{
name = IonModuleLifeSupportGenerator
converterRateCarbonDioxide = 0.0011111111
converterEfficency = 0.5
electricalRate = 0.69444444
}

name – Name of the part module. IonModuleLifeSupportGenerator.

converterRateCarbonDioxide – Rate that CO2 is consumed. The above rate is about 4.0 per hour.

converterEfficency – Amount of O2 produced per unit CO2 consumed.

electricalRate – Rate that electrical charge is consumed. The above rate is about 41.67 per minute.

The IonModuleLifeSupportIntake is what simulates drawing in atmosphere. It'll draw in O2 if present in the atmosphere and CO2 otherwise.


MODULE
{
name = IonModuleLifeSupportIntake
area = 0.0008
intakeSpeed = 100
intakeTransformName = Intake
}

name – Name of the part module. IonModuleLifeSupportIntake.

area – area of the intake.

intakeSpeed – Base speed the intake will draw in air. The Intake rate is = intakeRate * (intakeSpeed + vessel speed along the axis of the intakeTransform) * atmosphere density

intakeTransforumName – name of the transform for the part to reference for the direction the intake is pointing.

You'll also need to add some oxygen, carbon dioxide, and electrical charge resource entries to the part.


RESOURCE
{
name = ElectricCharge
amount = 5
maxAmount = 5
}

RESOURCE
{
name = Oxygen
amount = 250
maxAmount = 500
}

RESOURCE
{
name = CarbonDioxide
amount = 0
maxAmount = 500
}

name – name of the resource. See the files in <Kerbal install dir>\resources\ for available resources.

Amount – amount of the resource the part starts with.

maxAmount – maximum amount of the resource the part can hold.

I hope that helps. Please let me know if you have further questions.

Link to comment
Share on other sites

That's some quite useful stuff Fel. Should make adding oxygen to EVA fairly simple. So I guess I don't have any excuses not to have it ready in the next version.

I released it specifically for other life-support mods, I am rather surprised at how very little others seemed interested in it. It isn't that I wanted fame, but I did something that I felt proud enough of to give to the community.

As for food and other resources, right now the mod only supports oxygen and carbon dioxide. I chose to model them because everything else is just more consumables and waste and oxygen and carbon dioxide can represent the whole process fairly well while keeping management simpler. That said, I do plan to make the mod load consumables and waste from a configurable list so any number of resources can be added to it.

That... is very interesting.

Actually, the implications are rather amazing... and the "end-user implementation" could be extremely easy with the ConfigNode system.

So a CO2 scrubber would be something like

MODULE
{
name = ICS_Module

RESOURCE
{
name = CO2
rate = 0.05
}
RESOURCE
{
name = ElectricCharge
rate = 0.05
}
OUTPUT
{
name = Oxygen
rate = 0.035
}
}

Infact, I think that is a brilliant way to implement things, you can create an extremely powerful 'core module' that handles the majority of the code; and open up the entire life support system to the end-user to tweak into whatever they want. And with code communicates across modules, you can add in other features that do not change the current implementations that people enjoy (say, non-linear rates [The more CO2 you have, the easier it is to scrub]). Those who want the features added by the update can modify their files to use the new modules without abandoning those who wish for other implementations.

Okay... I think I just changed what you said into something entirely different :sticktongue::D:sticktongue:

Link to comment
Share on other sites

Hey,

I Love this mod. is very very great.

Have only one wish to use the RCS texture is okay. But can you give the O2 tanks an recylers and other. Maybee give a other color white or an Lite blue???

Best Regards Daniel

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...