Jump to content

[1.0.5][unmaintained] kappa-ray — irradiate your Kerbals


soundnfury

Recommended Posts

Space is a harsh environment. Besides the obvious problems (cold, no air...) there's also a lot of radiation flying around.

kappa-ray models this radiation, causing solar panels to degrade, and giving unprotected Kerbals cancer or immediate radiation sickness and prompt death.

It also defines an API for other mods to integrate with; all they need to do is make their part modules implement kapparay.IKappaRayHandler to define what they should do when hit by radiation. (For an example of this, see my Kerbal Processing Unit mod, where radiation can trigger glitches.) Similarly, there is an API (kapparay.IRadiationTracker) for mods that want to emit radiation in more complicated ways than ModuleKappaRayEmitter supports.

kappa-ray models three kinds of radiation; in increasing order of energy, these are Van Allen belts, direct solar rads, and galactic cosmic rays. It gives you some parts to help shield against radiation, but you generally can't completely eliminate the danger.

Warning: This machine mod kills Kerbals.

Warning: This mod is in alpha, beware.

This mod is end-of-lifed, I am no longer working on it.

Download:

For KSP 1.0.5 (buildID 1028)

Standalone: http://jttlov.no-ip.org/tar/kapparay-0.3.4.zip

With KPU: http://jttlov.no-ip.org/tar/kpu-alpha8-kappa-0.3.3.zip

For KSP 1.0.4

Standalone: http://jttlov.no-ip.org/tar/kapparay-0.3.2.zip

With KPU: http://jttlov.no-ip.org/tar/kpu-alpha7-kappa-0.3.2.zip

Source Code:

... is on GitHub at https://github.com/ec429/kpu_mod

Edited by soundnfury
End-of-lifed.
Link to comment
Share on other sites

whoa, this is good! At last somebody implemented this feature!

But I have to ask questions. IRL there are different possibilities to get irradiated in space. Radiation spheres around the planets with magnespheres and solar wind, especially solar wind in interplanetary space. Especially during solar flares!

How do you simulate theese, or WILL you simulate theese in future updates?

Link to comment
Share on other sites

But I have to ask questions.

Of course.

IRL there are different possibilities to get irradiated in space. Radiation spheres around the planets with magnespheres and solar wind, especially solar wind in interplanetary space. Especially during solar flares!

You will be pleased to know that kappa-ray already simulates all of the following:

  • Van Allen Belts - low energy trapped radiation around planets with magnetospheres. (Eve's are the strongest, unless you count Kerbol's corona.)
  • Direct Solar - medium energy, directional (you can hide behind planets or behind parts with good shielding properties). Strength inverse-square with distance from the Sun; diminished within planetary magnetospheres.
  • Cosmic Rays - high energy rads from sources beyond the Kerbol system. These have a low intensity, and are deflected by planetary magnetic fields.
  • also, as an easter egg, Bop's rocks are radioactive and give off a low level of low-energy radiation.
  • Solar Storms. At random intervals (on average every 51 days), Kerbol's activity will rapidly increase to a peak which may be as high as 50 times normal levels (though the average is about 16), taking around two days to fall back to its usual level. This increase currently only applies to Direct Solar radiation  the Van Allen belts don't get supercharged by all the extra solar wind (yet).

For more details, see the readme.

One limitation, though: Only the active vessel gets irradiated. Because, doing physics-y things in the background is Hard.

Link to comment
Share on other sites

  • 2 weeks later...

alpha5 released - fixes a bunch of bugs, adds Keiger Counter science experiment.

Updated download link in the OP.

Note that there seems to be a bug in that killing Kerbals doesn't seem to actually kill them; they lose all their XP but remain alive and on the roster (possibly they're immediately respawning, possibly they're just not being removed from lists they need to be). Judging by the effort TAC LS goes to, it looks like it's quite a bit more complicated than just calling ProtoCrewMember.Die().

Link to comment
Share on other sites

  • 4 weeks later...
does this work with RSS?

if not would it just need config changes or code changes?

It won't work with RSS at the moment, because all the radiation parameters are hard-coded and based on the index of the planetary body. However, since I've recently started playing with RSS, there's a good chance I might get round to fixing this soon.

Link to comment
Share on other sites

Why is radiation from nuclear reactors systematically ignored? An active reactor generate more than a million times radiation than cosmic radiation. Any Kerbal on EVA past the radiation shield will receive a deadly radiation dosage in a matter of a few minutes.

Edited by FreeThinker
Link to comment
Share on other sites

Why is radiation from nuclear reactors systematically ignored? An active reactor generate more than a million times radiation than cosmic radiation.

It's not "systematically ignored", I just haven't implemented it yet.

Well, to be precise, I _have_ implemented it in a development version, but I haven't yet managed to convince myself that the raycasting source is in the right place. (If it's not, then covering your LV-N engine in shielding won't help because the radiation source will be outside the shielding. That's obviously not an acceptable bug to have.)

I hope to have this feature in the next release... no promises on when that'll be though.

Link to comment
Share on other sites

alpha6 released: implements radiation from LV-N nuclear engine (not thoroughly tested, and it's probably not chucking out nearly enough rads), and makes the planetary radiation environments configured by an external file, making configs / MM for RSS a possibility. I haven't written an RSS config for it yet though.

Updated download link in the OP.

[EDIT] Oh, and it's built for 1.0.4 now. [/EDIT]

Edited by soundnfury
KSP 1.0.4
Link to comment
Share on other sites

You say your API allows other mods to receive radiation. Do you also have integration for other mods to generate radiation, so that I can request the various nuclear reactor/nuclear drive/orion drive mod authors integrate with your mod?

Link to comment
Share on other sites

You say your API allows other mods to receive radiation. Do you also have integration for other mods to generate radiation, so that I can request the various nuclear reactor/nuclear drive/orion drive mod authors integrate with your mod?

Currently there's not an API for that as such. If all you want is an engine emitting radiation proportional to throttle setting, that can be done with ModuleKappaRayEmitter; for an example see the LV-N config included in the mod.

Anything else will need hooks adding to ModuleKappaRayEmitter (probably in the form of fooCoeff for radiation proportional to some parameter foo), or use kapparay.Core.Instance.getRT() in much the same way as ModuleKappaRayEmitter does. The latter will create tight coupling, as the RadiationTracker class doesn't have a defined API/Interface. However, an Interface could be created for it. Really I need to discuss design approaches with the authors of the other mods that might want to do this.

Link to comment
Share on other sites

It's not "systematically ignored", I just haven't implemented it yet.

Well, to be precise, I _have_ implemented it in a development version, but I haven't yet managed to convince myself that the raycasting source is in the right place. (If it's not, then covering your LV-N engine in shielding won't help because the radiation source will be outside the shielding. That's obviously not an acceptable bug to have.)

I hope to have this feature in the next release... no promises on when that'll be though.

Well, if you manage to succeed, I would love to integrate it into KSPI

Link to comment
Share on other sites

Looks great! Will RTG radiation be implemented?

I decided that RTGs put out a negligible amount of radiation. They're usually shielded pretty hard for other reasons (they have to survive, intact, if the launcher blows up or the vehicle re-enters and burns up), and the total power is usually pretty small so they don't have much radioactive material in them. (The argument of the anti-RTG crowd is based on the assumption that they'd break up on re-entry and spread fallout, which is much more bioavailable. Even then, most RTGs just don't have enough Pu in them to do much harm.)

Now, if you had an active reactor, like the Russian 'Topaz', that might be another story...

On an unrelated note, RTGs are hideously inefficient (around 4-6% iirc). I want a mod that gives me a radioisotope stirling generator.

Link to comment
Share on other sites

This sounds pretty cool. I just built a craft with wrapper tanks full of water to go to Duna, and was wishing those water tanks would actually protect kerbals from radiation. Looks like I'll have to give this a try.

Link to comment
Share on other sites

Soundnfury, this mod is sounding very interesting :) Though I'm not really into hardcore realism for KSP I do realistic approaches, will be following.

I got a questions regarding the LV-N (and NTR engines) radiation and blocking.

- Is it possible to add a "Shadow Shield" part, radiation blocking module functionality, which generates a 'cone' area above the NTR where there is 'no' radiation.

For illustrations what I mean:

http://www.projectrho.com/public_html/rocket/radiation.php#id--Radiation_Shielding--Shielding--Shadow_Shield

Link to comment
Share on other sites

I got a questions regarding the LV-N (and NTR engines) radiation and blocking.

- Is it possible to add a "Shadow Shield" part, radiation blocking module functionality, which generates a 'cone' area above the NTR where there is 'no' radiation.

Yes, if you add any kind of shielding part (two are included in the mod), it will only absorb rads which pass through it, meaning that if you have a point source in your vessel (like an NTR), it will effectively shield a cone. (Although, it won't block 100% of the radiation, because no shielding is perfect. I presume that's why you put 'no' in quotes.) Similarly, for direct solar radiation, which comes from a point sufficiently distant to be parallel rays, only parts in the shield's shadow will be shielded.

However, there is not (currently) any way to integrate shielding of this kind into the NTR itself; you have to have two separate parts, one for the engine and one for the shielding.

Link to comment
Share on other sites

or use kapparay.Core.Instance.getRT() in much the same way as ModuleKappaRayEmitter does. The latter will create tight coupling, as the RadiationTracker class doesn't have a defined API/Interface. However, an Interface could be created for it.

Having looked at some other mods (namely both Orion mods) and thought about what they might want to do, I've created an interface IRadiationTracker, which RadiationTracker implements, and which should allow for mods to emit radiation in ways not handled by ModuleKappaRayEmitter. For example, an Orion might want to call rt.IrradiateVector(lots, lots, bomb.position, rt.randomVector()) a few times each time it detonates a bomb.

This interface, along with a bunch of rejigging of shielding (by things like water tanks), and a big increase in how much radiation things like the LV-N chuck out, is in the new build, 0.3.0. (Despite the change in naming format, it's still an alpha; it's just that this release doesn't have an accompanying KPU release, and the two normally share tags.) Updated download link in the OP.

Link to comment
Share on other sites

  • 3 weeks later...

0.3.1 released - updated download link in the OP.

Fixed the handling of timewarp by using rootPart.partTransform.position (instead of vessel.CoM) as the centre of the target area. Now vessels in timewarp get irradiated like they should (as long as they're the active vessel, of course).

Added a section to the readme on risk assessment: examples of total dose for a well-run and a badly-run Mun mission, how to convert between dose and probability of death (it's not quite linear, particularly for large doses), and related advice.

Link to comment
Share on other sites

0.3.1 released - updated download link in the OP.

Fixed the handling of timewarp by using rootPart.partTransform.position (instead of vessel.CoM) as the centre of the target area. Now vessels in timewarp get irradiated like they should (as long as they're the active vessel, of course).

Added a section to the readme on risk assessment: examples of total dose for a well-run and a badly-run Mun mission, how to convert between dose and probability of death (it's not quite linear, particularly for large doses), and related advice.

nice one,

subscribed:)

Link to comment
Share on other sites

I've been away for a while, but now I'm back and want to dive into this mod with gusto.

Does the Keiger-Müller Radiation Detector actually display rad levels? I was planning on putting some living quarters with water tanks for shielding up in high Kerbin orbit, and started thinking it'd be cool to actually see the counts in the pods, especially when a solar storm rolls through.

Link to comment
Share on other sites

0.3.2 released - fixes a bunch of bugs: tanks full of resources are now actually effective as shielding; the core no longer gets confused by Unowned kerbals (i.e. rescue missions), and when the mod kills Kerbals, they stay dead.

Updated download link in the OP.

- - - Updated - - -

I've been away for a while, but now I'm back and want to dive into this mod with gusto.

Does the Keiger-Müller Radiation Detector actually display rad levels? I was planning on putting some living quarters with water tanks for shielding up in high Kerbin orbit, and started thinking it'd be cool to actually see the counts in the pods, especially when a solar storm rolls through.

It doesn't display them, but the "Kappa Ray Fluxes" window does. (You don't need a K-M detector on board to use it...)

To open that window, just click the Kappa-Ray button on the (stock) toolbar. It looks like this:

toolbar_icon.png

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