Jump to content

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


yongedevil

Recommended Posts

Pound for pound this is THE best add on for this game. I suggest it to all my friends who play. It adds a serious amount of realism and added forethought into every mission. I am glad that you made this!

It makes me run more missions too.

Rather than just launch something and time warp till the best burn time, now I wait till the best time to burn before launching, but I can't just do nothing till then so I put up probes and space station part launches.

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.

I just see awesome all over this coding. :D

But I hope you don't mind me for asking. . . but I don't know how to place the "Activate Scrubber" buttons on other pods that aren't automatically installed with Ioncross. ;.;

Edited by intidragon
Link to comment
Share on other sites

First off the post you quoted there was for a previous version; most of the configuration changed with version 1.10. I updated the first post with documentation for the current version.

For version 1.10 things like the scrubber are defined in the IoncrossCrewSupport.cfg (in <kerbal dir>\GameData\IoncrossCrewSupport\Plugins\PluginData\IoncrossCrewSupport\) as ION_SUPPORT_POD_GENERATOR entries. These entries are added automatically to all parts that have the IonModuleCrewSupport module.

So what you probably want to do is add the IonModuleCrewSupport module to the other pods. This is most easily done though ModuleManager, but can be done manually, as outlined in the first post. All you'll really have to do is copy the syntax in ModuleManager_Squad.cfg and change the name in square brackets to the name of the new part as it appears in its part.cfg file. Here's the relevant part from the first post.

Installation

...

Adding Life Support Module to part.cfg:

This mod makes use of ialdabaoth's excellent ModuleManager plugin to modify default parts. Changes to stock parts are defined in ModuleManager.cfg located in GameData\IoncrossCrewSupport\. This can be extended to modify parts from other mods fairly easily, either in the same file or creating another .cfg file alongside it. For details on the ModuleManager syntax see the forum thread.

The crew support module can also be added manually to parts. 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
}

If you're trying to add a scrubber to a non-crewed part that is also possible but is a bit different as you'll need to override the default scrubber's rate since it is set based on the crew capacity of the part. Let me know if that's what you intended and I can provide additional information on how to do that.

Also what mod are you trying to add pods from? I'm trying to create ModuleManager configuration files for as many popular mods as I can so they'll all be automatically supported.

Link to comment
Share on other sites

it would be very very interesting if youngedevil were to make contact with those behind AMPYEAR...

as it would mean that electricity management and life suppor could be combined into a single sort of overarching mod that would overall be realistic and aesthetically pleasing.

Link to comment
Share on other sites

First off the post you quoted there was for a previous version; most of the configuration changed with version 1.10. I updated the first post with documentation for the current version.

For version 1.10 things like the scrubber are defined in the IoncrossCrewSupport.cfg (in <kerbal dir>\GameData\IoncrossCrewSupport\Plugins\PluginData\IoncrossCrewSupport\) as ION_SUPPORT_POD_GENERATOR entries. These entries are added automatically to all parts that have the IonModuleCrewSupport module.

So what you probably want to do is add the IonModuleCrewSupport module to the other pods. This is most easily done though ModuleManager, but can be done manually, as outlined in the first post. All you'll really have to do is copy the syntax in ModuleManager_Squad.cfg and change the name in square brackets to the name of the new part as it appears in its part.cfg file. Here's the relevant part from the first post.

If you're trying to add a scrubber to a non-crewed part that is also possible but is a bit different as you'll need to override the default scrubber's rate since it is set based on the crew capacity of the part. Let me know if that's what you intended and I can provide additional information on how to do that.

Also what mod are you trying to add pods from? I'm trying to create ModuleManager configuration files for as many popular mods as I can so they'll all be automatically supported.

Thanks again very much for the detailed explanation. Best of luck in your work. :D Well I was gonna try to put it on the H.O.M.E. habitation modules, and on the FusTek expansion space station parts mod pack. They work on some though, but not on all of them. I might just need to do it manually then, mustn't I?

Edited by intidragon
Link to comment
Share on other sites

Could you make an option where Kerbals without Oxygen / with too much CO2 just become uncontrollable? (Like they go into hibernation or something.)

I like the mod but at the same time it means that most of the time it's pointless to try to send a rescue mission - if something goes wrong that's it.

Also, could you add an integrated air intake to plane cockpits (or engines, or air intakes, whichever)? Or alternatively have the plugin not consume oxygen in oxygen-containing atmospheres?

Finally, you have a typo on lines 201/3/5 of IonCrewSupport.cs: resoucreReturn should be resourceReturn.

Link to comment
Share on other sites

I like the mod but at the same time it means that most of the time it's pointless to try to send a rescue mission - if something goes wrong that's it.

That's part of the reason for creating the mod in the first place. **** usually hits the fan when life support systems go down. Being able to salvage that situation should be rare or there's no longer any point in having life support. It would just be vanilla with nifty gauges that actually affect nothing.

BTW You can add the atmospheric intakes via just copying the module to whatever part(s) you want to have it. I have all my vanilla/b9 intakes working as LS intakes as well, though you do get two (enable intake) options in the GUI.

Edited by Subcidal
Link to comment
Share on other sites

That's part of the reason for creating the mod in the first place. **** usually hits the fan when life support systems go down. Being able to salvage that situation should be rare or there's no longer any point in having life support. It would just be vanilla with nifty gauges that actually affect nothing.

You'd still have to worry about life support if things became uncontrollable when life support dies. Also, I'm asking as an option, not as the default behavior. But I see your point.

BTW You can add the atmospheric intakes via just copying the module to whatever part(s) you want to have it. I have all my vanilla/b9 intakes working as LS intakes as well, though you do get two (enable intake) options in the GUI.

That's what I'm doing now. It's tedious though, as it requires doing it to each and every air intake.

Also, bug report. If you go into the escape menu, until you quickload parts don't consume resources, and rates show NaN. Perhaps a division by zero error?

Link to comment
Share on other sites

I've been wondering; is there a reason the recyclers start with only 50% oxygen supply?

That is something I decided way back, so I'm not exactly sure what my reasoning way. It was probably so the basic oxygen tanks were more competitive for some missions given the cost is currently not an issue. It could also have been to leave room for oxygen to be generated.

Could you make an option where Kerbals without Oxygen / with too much CO2 just become uncontrollable? (Like they go into hibernation or something.)

I like the mod but at the same time it means that most of the time it's pointless to try to send a rescue mission - if something goes wrong that's it.

Also, could you add an integrated air intake to plane cockpits (or engines, or air intakes, whichever)? Or alternatively have the plugin not consume oxygen in oxygen-containing atmospheres?

Finally, you have a typo on lines 201/3/5 of IonCrewSupport.cs: resoucreReturn should be resourceReturn.

You should be able to change boolCauseDeath to False and boolCauseLock to True in IoncrossCrewSupport.cfg. That will stop kerbals from dying when they run out of oxygen or fill up carbon dioxide storage and make any crewed command pods uncontrollable. It won't affect probe cores, but then those would work even if all the kerbals were dead.

I have plans to revisit the intake system eventually, and one of the things I hope to do is make it easier to not worry about oxygen when in an oxygen atmosphere. It's a ways down the list of things to do though.

And thank you for pointing out that typo. Didn't break anything but the code looks better now :)

Edited by yongedevil
typo
Link to comment
Share on other sites

That is something I decided way back, so I'm not exactly sure what my reasoning way. It was probably so the basic oxygen tanks were more competitive for some missions given the cost is currently not an issue. It could also have been to leave room for oxygen to be generated.

I, for one, would prefer if it was full of Oxygen. Maybe make it heavier and/or decrease the amount of oxygen storage to counter?

You should be able to change boolCauseDeath to False and boolCauseLock to True in IoncrossCrewSupport.cfg. That will stop kerbals from dying when they run out of oxygen or fill up carbon dioxide storage and make any crewed command pods uncontrollable. It won't affect probe cores, but then those would work even if all the kerbals were dead.

Yay! Thanks.

I have plans to revisit the intake system eventually, and one of the things I hope to do is make it easier to not worry about oxygen when in an oxygen atmosphere. It's a ways down the list of things to do though.

Easier in what way?

And thank you for pointing out that typo. Didn't break anything but the code looks better now :)

Glad to be of service!

Finally, a feature request and a part request:

It would be nice if cabin scrubbers could be assigned to action groups. (Currently the air intake and recyclers can be, but not the cabin scrubbers.)

Also, it would be nice to have a hydroponics module that is efficient and lightweight (although bulky), but requires sunlight. Picture a large cylindrical balloon with soil inside, and the top half transparent. (top half as in sliced longitudinally). Maybe even inflatable?

Link to comment
Share on other sites

So I was just testing this mod out, two big questions I'd really like answered please!

1. I fast forwarded until it killed off two out of three of my crew, then wanted to fast forward again until the last one died off as well - but it would kill time warp incessantly before I can kill him off (there's no scrubber, so I intended to kill them by CO2 emission overload). But it would just keep killing time warp. Is there anyway to turn this off, or is this a bug?

2. I put my ship into orbit (a very high one so I could time warp) and tried to kill the entire crew off again through use of CO2 overload. When I fast forward, I kill the first one but then the next few fast forwards don't kill the second but still pauses repeatedly. When I check map view, my orbit has changed. By quite a bit. Originally it was a clean 1M orbit, and now it's 1.6M by 200km. Is this normal?

Link to comment
Share on other sites

So I was just testing this mod out, two big questions I'd really like answered please!

1. I fast forwarded until it killed off two out of three of my crew, then wanted to fast forward again until the last one died off as well - but it would kill time warp incessantly before I can kill him off (there's no scrubber, so I intended to kill them by CO2 emission overload). But it would just keep killing time warp. Is there anyway to turn this off, or is this a bug?

2. I put my ship into orbit (a very high one so I could time warp) and tried to kill the entire crew off again through use of CO2 overload. When I fast forward, I kill the first one but then the next few fast forwards don't kill the second but still pauses repeatedly. When I check map view, my orbit has changed. By quite a bit. Originally it was a clean 1M orbit, and now it's 1.6M by 200km. Is this normal?

The warp kill is probably a feature so you don't accidentally lose your crew because you didn't cancel warp fast enough. Dunno about the orbit change.

Link to comment
Share on other sites

Also, bug report. If you go into the escape menu, until you quickload parts don't consume resources, and rates show NaN. Perhaps a division by zero error?

I was able confirm this bug. It is just the display though; the parts continue to consume resources fine. Fairly easy to fix. You were correct it was a divide by zero error.

I, for one, would prefer if it was full of Oxygen. Maybe make it heavier and/or decrease the amount of oxygen storage to counter?

...

Easier in what way?

...

Finally, a feature request and a part request:

It would be nice if cabin scrubbers could be assigned to action groups. (Currently the air intake and recyclers can be, but not the cabin scrubbers.)

Also, it would be nice to have a hydroponics module that is efficient and lightweight (although bulky), but requires sunlight. Picture a large cylindrical balloon with soil inside, and the top half transparent. (top half as in sliced longitudinally). Maybe even inflatable?

I plan to go over all the values for the tanks and resources at some point. Someone kindly posted some information about densities and volumes of various resources that I want to use to rebalanced things. I'll make any changes to the recyclers' storage capacities then. I am thinking of generally lowing their capacities which would kind of eliminate the need to set the starting capacity to half.

As for the intakes, I've basically been thinking of doing as you suggested The Lone Wolfling. First making all the pods able to breath in oxygen atmospheres that are thick enough. Basically you won't need any life support equipment on Kerbin at sea level, but you'll still need powered intakes at altitude. I'll probably do something similar with recyclers for non oxygen atmospheres. And with ModuleManager now I don't have a problem making use of the stock intakes like I did originally, so the current intake will probably disappear and you'll be able to just use the stock ones.

The scrubbers currently can't be assigned to action groups because they're dynamically added to the part when the game starts running and aren't actually there in the VAB. It is a messy workaround and it dose need to be fixed eventually.

For things like hydroponics pods I'm very much at the mercy of modellers to create the part. I do intend to add code to support them though when I go over the recycler systems. I think the H.O.M.E mod has a hydroponics part in it that I'd like to be able to support better.

So I was just testing this mod out, two big questions I'd really like answered please!

1. I fast forwarded until it killed off two out of three of my crew, then wanted to fast forward again until the last one died off as well - but it would kill time warp incessantly before I can kill him off (there's no scrubber, so I intended to kill them by CO2 emission overload). But it would just keep killing time warp. Is there anyway to turn this off, or is this a bug?

2. I put my ship into orbit (a very high one so I could time warp) and tried to kill the entire crew off again through use of CO2 overload. When I fast forward, I kill the first one but then the next few fast forwards don't kill the second but still pauses repeatedly. When I check map view, my orbit has changed. By quite a bit. Originally it was a clean 1M orbit, and now it's 1.6M by 200km. Is this normal?

As m4v suggest, the ending time warp is there to provide some minimal warning that your crew is in danger. It is set to end time warp every time it checks to see if the kerbals die. A better warning system is in the list of things to do. The orbit change might be a side effect of cancelling time warp suddenly. I've only tested it on the pad so I'll have to look into its effects in orbit. If it is causing side effects in orbit, I'll just remove it until I have a better system to take its place.

I love this plugin, adds so much more realism!

But its easy to forget to activate the scrubber.... at least for me (poor Kerbals) :D

Any chance to set them to ON by default!?

That's already done for the next version.

Link to comment
Share on other sites

Yeah, although keep in mind I would simply just hyperedit a single command pod into orbit (preferably into a very high one, so time warp can be high enough to deplete resources). To get rid of the time-warp kill thing for me (at least to remove the annoyance of it repeatedly going on and on) I just set the death chance to 1.

Link to comment
Share on other sites

Still in development and nothing confirmed. I need to get them to a state both me and Yongedevil are happy with before they become an official part of the mod. Very much at the IF stage, rather than the When. I've set time aside in about ten days time to get back on the modeling. Once I have them finished and polished we'll see if Yongedevil wants to make them an official part of the mod... if not I'll release as separate parts for people to add their own code to.

I am just curious. Will we see Mulbins parts in the next version?

Link to comment
Share on other sites

I'm sorry. I used the search function but I can't find a definitive answer to these questions.

1. Do the resources automatically equalise when I dock 2 or more ships/modules?

2. Is pressure and depressurisation simulated?

3. Is there some way to construct a functional airlock? I mean we have simple hatches, but that's just silly for something like a space station.

Link to comment
Share on other sites

Hi Captain,

I can't answer the other questions, but Devo is working on a "stick anywhere" airlock that I requested. It's got a Kerbal exit bug at the moment that he is fixing.

I've added the typical Ioncross coding to the cfg to give it O2/CO2 function.

And not to hi-jack this thread, but here's the link to the airlock. http://forum.kerbalspaceprogram.com/showthread.php/35506-Stick-anywhere-round-airlock-request

Fly Straight and True,

Void

Link to comment
Share on other sites

I was wondering: What about cloning the fuel line and calling it an airhose, and swapping the oxy-tanks to drain like fuel tanks do?

I feel faintly ridiculous having my Kerbals getting their air from tanks that have no visible way of transferring it over a radial decoupler gap.

Link to comment
Share on other sites

I am just curious. Will we see Mulbins parts in the next version?

That will depend on which one of us gets time to work on stuff first. I'd guess probably not though.

I'm sorry. I used the search function but I can't find a definitive answer to these questions.

1. Do the resources automatically equalise when I dock 2 or more ships/modules?

2. Is pressure and depressurisation simulated?

3. Is there some way to construct a functional airlock? I mean we have simple hatches, but that's just silly for something like a space station.

Sorry but this mod simulates resource consumption and not pressurization of a spacecraft. It is an interesting idea, but I kind of think with the game as it is now - requiring EVA to move between parts and no airlock parts - trying to model pressurization would be more trouble than it's worth.

I was wondering: What about cloning the fuel line and calling it an airhose, and swapping the oxy-tanks to drain like fuel tanks do?

I feel faintly ridiculous having my Kerbals getting their air from tanks that have no visible way of transferring it over a radial decoupler gap.

I have considered that and personally I think it would add too much complexity since you'd have oxygen flowing one way and carbon dioxide flowing the opposite direction back to the recyclers. No reason you can't change it yourself though. You just have to change flowMode = ALL_VESSEL to flowMode = STACK_PRIORITY_SEARCH in GameData\IoncrossCrewSupport\Resources\IoncrossCSResourcesBase.cfg. My guess is the default fuel lines will work for all resources so you should be able to use them.

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