Jump to content

[1.8+] Kerbal Health 1.6.8 (2024-01-22)


garwel

Recommended Posts

  • 2 weeks later...

So I finally started a new career, and of course Kerbal Health was on my must-have list.

One very small irk though, and that's kerbals getting ill at the space centre. I get that it's meant to encourage a deeper roster, but it doesn't strike me as massively realistic, especially when it's the same kerbal getting ill over and over*. It's also a bit annoying how the message queue gets filled with messages about it. Perhaps just reduce the frequency? Or once a kerbal has been cured of something, significantly decrease the probability of them getting ill again for a while?

*I get ill less than once per year on average, and I'm not especially fit or healthy, unlike an astronaut, and yet these kerbals seem to come down with something twice per month!

Link to comment
Share on other sites

1 hour ago, cyberpunkdreams said:

So I finally started a new career, and of course Kerbal Health was on my must-have list.

One very small irk though, and that's kerbals getting ill at the space centre. I get that it's meant to encourage a deeper roster, but it doesn't strike me as massively realistic, especially when it's the same kerbal getting ill over and over*. It's also a bit annoying how the message queue gets filled with messages about it. Perhaps just reduce the frequency? Or once a kerbal has been cured of something, significantly decrease the probability of them getting ill again for a while?

*I get ill less than once per year on average, and I'm not especially fit or healthy, unlike an astronaut, and yet these kerbals seem to come down with something twice per month!

In fact, you can adjust this yourself: increase the average time before a kerbal gets sick at the KSC, increase average duration of post-disease immunity, disable messages (but note that it will also disable messages for all other health-related things, only on-screen notifications will show) or disable sickness altogether. This is all done in Difficulty Settings.

Perhaps, I will fine tune the defaults in a next release. Have fun!

Edited by garwel
Link to comment
Share on other sites

I am currently working on something similar but more immersive: lifetime radiation. The kerbals will accumulate it during missions and it will gradually reduce their maximum health. It's a whole new system though, so it's going to take some time.

Link to comment
Share on other sites

1 hour ago, garwel said:

In fact, you can adjust this yourself: increase the average time before a kerbal gets sick at the KSC, increase average duration of post-disease immunity, disable messages (but note that it will also disable messages for all other health-related things, only on-screen notifications will show) or disable sickness altogether. This is all done in Difficulty Settings.

Perhaps, I will fine tune the defaults in a next release. Have fun!

Thanks, I'll have a look at that. The sickness mechanic is fine overall, it just felt over the top in the space centre. I'll tweak those figures though!

Link to comment
Share on other sites

Hello.

First thanks to you all develeoping this mod, it's really cool.

So I thought on having some kind of "hospital" to raise a kerbal's health so they can become active again. I tought on using huge amounts of EC to make the health go up. It should only work for kerbals inside that habitat, and should be some kind of last resort. It's suposed ti be something you send to a failed mision or that you have it installed in a station and use only when needed. This is what I'm thinking, any thought or advice?. Do you think this should work? Would that be too much or too few EC?:

MODULE
    {
        name = ModuleKerbalHealth
        resourceConsumptionPerKerbal = 10
        isActive = False
        hpMarginalChangePerDay = 20
        crewCap = 1
        partCrewOnly = true
    }

I'm not sure about the EC used and the multiplier. Will it be enought to raise a Kerbal's health so it can go on duty again in exchange of a huge chunk of your stored EC? This should be some kind of hospital or ER habitat.

Also, having some kind of resource to be used in the process could be cool, but that is more a suggestion than asking for advice, wich is what I need.

Thanks in advance for you answers and time.

Edit: Did some testing. This one looks like it works but not sure. Any advice? Can it be done?

Edited by Elkram
Link to comment
Share on other sites

52 minutes ago, Elkram said:

Hello.

First thanks to you all develeoping this mod, it's really cool.

So I thought on having some kind of "hospital" to raise a kerbal's health so they can become active again. I tought on using huge amounts of EC to make the health go up. It should only work for kerbals inside that habitat, and should be some kind of last resort. It's suposed ti be something you send to a failed mision or that you have it installed in a station and use only when needed. This is what I'm thinking, any thought or advice?. Do you think this should work? Would that be too much or too few EC?:

MODULE
    {
        name = ModuleKerbalHealth
        resourceConsumptionPerKerbal = 10
        isActive = False
        multiplier = 20
        crewCap = 1
        partCrewOnly = true
    }

I'm not sure about the EC used and the multiplier. Will it be enought to raise a Kerbal's health so it can go on duty again in exchange of a huge chunk of your stored EC? This should be some kind of hospital or ER habitat.

Also, having some kind of resource to be used in the process could be cool, but that is more a suggestion than asking for advice, wich is what I need.

Thanks in advance for you answers and time.

Edit: multiplier 5 looks like doesnt work, Im going to try 20 and see what happens.

The multiplier only works for a certain health factor (e.g., Microgravity), but most of them are negative, so multiplication won't heal anything. You should better use hpMarginalChangePerDay; something like 3% is quite good already, means up to 4.5 HP/day. You may also use hpChangePerDay, which gives a flat bonus regardless of any other factors, but it's a bit cheaty.

Link to comment
Share on other sites

1 hour ago, garwel said:

The multiplier only works for a certain health factor (e.g., Microgravity), but most of them are negative, so multiplication won't heal anything. You should better use hpMarginalChangePerDay; something like 3% is quite good already, means up to 4.5 HP/day. You may also use hpChangePerDay, which gives a flat bonus regardless of any other factors, but it's a bit cheaty.

Awesome!. Im going to start tinkering with those 2 and see how i like it, thanks.

 

Link to comment
Share on other sites

Hi @garwel

Thank you so much for making this mod!. Kerbal Health and SpaceAge are my two new favorite mods of late. :) 

I gave KH a whirl in a separate save, checked the mechanics and loved it and have immediately added it to my career game. Best thing that happened in testing is that in the 100-odd days of checking out the mod stuff, Jeb (the clutz) had two different accidents on different missions and figured that's par the for course for him. :D:D

 

I abandoned all LifeSupport mods a month ago as I was a bit bogged down with juggling various resources and hab timers. I was using USI-LS and tried to switch to snacks. I ended up just going cold turkey on LS and installed LGG's Crew R&R instead. 

But no more! This Kerbal Health mod is awesome and lets me look after my Kerbal without having to worry too much about things. The sickness event is a great gameplay element to add some variety to just ensuring the crew keep positive HP. Oh and thank you for add a no death option. I do play with no respawn turned on, but much rather my Kerbals die due to my piloting than lack of attention to life support.

 

I had a few questions / suggestions for you.

In the settings, the "Avg. Untreated Sickness Duration" is defaulted to 10 and "Sickness" loss is -5. Do I read this correctly as a sick Kerbal (on average) will lose 50HP if they get sick for the average 10 day period? I was trying to see how long Kerbal would get sick for, but even with duration set to 20 and no scientist onboard, the worst I got was 11 days of sickness over an 100 day period

Just curious as to what is the min/max period for sickness? Is there a rare possibility that a sick kerbal will be sick for 20 days? ie 20*-5 =all a lvl 0 kerbal health?

Very minor suggestions (ignore any and all if no good):
Could the sickness value (-HP while sick) be a selectable range to add a bit of variety? The idea would be so sick Kerbals are given a value between those values for when they get sick.

Example: I might set the sickness difficulty range set to -1 to -10. Val might get sick and randomly rolled a -1. (mild cold maybe), but when the infection makes Bob get sick, he rolled a -9 (Typical male-Kerbflu) resulting is different HP reduction levels applied to different Kerbals. Understand that it's much easier as a single value and you might want to keep it that way, just putting the idea out there. :) 

For the Health Monitor screen, is it possible to change the condition text to red if sick / blue if exhausted?.With both 'OK' and 'Sick' being short and ending in 'K' it's sometimes not easy to pick up in a quick glance.

Would is be possible to add the mechanic (and config sliders) for the amount of :rep: rep your program loses when a Kerbal is exhausted and a separate number for when they reach zero/die?

I'm not sure what's possible with the messaging system, but it is possible to add a different custom health icons (like what you have in SpaceAge) that might be contextual to the alert, so that the return to work msgs appear different to someone being sick / accident? Or are you stuck with the exclamation point / what is available in stock?

Link to comment
Share on other sites

3 hours ago, wile1411 said:

I had a few questions / suggestions for you.

In the settings, the "Avg. Untreated Sickness Duration" is defaulted to 10 and "Sickness" loss is -5. Do I read this correctly as a sick Kerbal (on average) will lose 50HP if they get sick for the average 10 day period? I was trying to see how long Kerbal would get sick for, but even with duration set to 20 and no scientist onboard, the worst I got was 11 days of sickness over an 100 day period

Just curious as to what is the min/max period for sickness? Is there a rare possibility that a sick kerbal will be sick for 20 days? ie 20*-5 =all a lvl 0 kerbal Hey

Hey @wile1411, thanks for the good words. It's this kind of thing I'm making my mods for.

All the sickness-related mechanics is based on random events. Basically, on average, every day (the period is also random, can be more or less) the mod checks chances that a kerbal gets sick, cures the sickness or loses immunity, depending on their current state. The chances are determined by the sliders: e.g., the Avg. Untreated Sickness Duration slider set to 10 days means that, every day, there is a 10% chance of the sickness being healed. TBH, it's not really an accurate estimate based on the theory of probabilities (the actual average sickness duration is a bit shorter than that), but it's easier for the player and for me. So, TL;DR: there is no min or max duration of sickness, depending on your luck it can heal in a day or go on for months.

3 hours ago, wile1411 said:

Very minor suggestions (ignore any and all if no good):
Could the sickness value (-HP while sick) be a selectable range to add a bit of variety? The idea would be so sick Kerbals are given a value between those values for when they get sick.

Example: I might set the sickness difficulty range set to -1 to -10. Val might get sick and randomly rolled a -1. (mild cold maybe), but when the infection makes Bob get sick, he rolled a -9 (Typical male-Kerbflu) resulting is different HP reduction levels applied to different Kerbals. Understand that it's much easier as a single value and you might want to keep it that way, just putting the idea out there. :) 

Yes, I'm going to add disease severity levels (mild/normal/severe) and/or different diseases at some point. But given that sickness is already quite rare and there is enough randomness to it as it is, it's not of high priority.

3 hours ago, wile1411 said:

For the Health Monitor screen, is it possible to change the condition text to red if sick / blue if exhausted?.With both 'OK' and 'Sick' being short and ending in 'K' it's sometimes not easy to pick up in a quick glance.

I'm still learning KSP's UI, so if I find how to manipulate individual labels, I'll do all kinds of decorations. So far I only learned to change all fonts at once. Not pretty.

3 hours ago, wile1411 said:

Would is be possible to add the mechanic (and config sliders) for the amount of :rep: rep your program loses when a Kerbal is exhausted and a separate number for when they reach zero/die?

It shouldn't be hard. I'll think how to handle it well. On the other hand, I guess there are already mods out there that punish you for killing kerbals.

3 hours ago, wile1411 said:

I'm not sure what's possible with the messaging system, but it is possible to add a different custom health icons (like what you have in SpaceAge) that might be contextual to the alert, so that the return to work msgs appear different to someone being sick / accident? Or are you stuck with the exclamation point / what is available in stock?

As far as I understand, I can't create my own icons for messages, but I might pick another one or change its color. Will look at it.

Link to comment
Share on other sites

For those of you who like this mod and want to help with bug hunting and balancing, you may try the pre-release of Kerbal Health 1.0. It features numerous improvements, changes, and fixes. The most important are:

  • Radiation, which permanently reduces kerbals' maximum HP, depends on the location and on presence of radioactive parts (reactors and atomic engines), and can be reduced by shielding the vessel with heat shields and panels
  • Detailed view in Health Monitor displays more stats including individual factors for loaded kerbals
  • Support (radiation-wise only) for Deadly Reentry, Kerbal Atomics, KSP-IE, SpaceY
  • Difficulty presets (Hard difficulty recommended)
  • EC consumption of all health modules reduced by 50%

I am looking for bug reports, balance suggestions or any ideas for improvement.

You may download the pre-release here.

Edited by garwel
Link to comment
Share on other sites

Wont be able to look until end of week, but very curious how the shielding of radiation work? how much shilding of 1 heat shield sitting of nuke engine provide?  Is it based on ablator amount? or maybe number of parts between crew container and nuke source?

Edited by wile1411
Link to comment
Share on other sites

24 minutes ago, wile1411 said:

Wont be able to look until end of week, but very curious how the shielding of radiation work? how much shilding of 1 heat shield sitting of nuke engine provide?  Is it based on ablator amount? or maybe number of parts between crew container and nuke source?

Shielding is measured in half-thicknesses, which means that every additional unit of shielding reduces received radiation (in the mod, it's called Exposure and is measured in %) by half. Shielding values of all relevant parts in the vessel simply add up. It doesn't depend on the actual location on the part, so it's somewhat abstracted. The higher the vessel's crew capacity, the more shielding you will need.

The main formulas are:

  • Radiation = Exposure x (LocationCoefficient x (SolarRadiation + GalacticRadiation) + PartRadiation)
  • Exposure = 2 ^ (- Shielding x CrewCapacity ^ (-2/3))
  • SolarRadiation = NominalSolarRadiation x SunDistance ^ (-2), where SunDistance is measured in AU

For example, a simple 1-man pod with a 1.25m heat shield will have a shielding rating of 1 and an exposure of 50%. It means that 50% of radiation (both cosmic and artificial) will reach the kerbal inside. A shielding rating of 7 will bring this value to about 1% (because 2^-7=0.0078125). But a 2-seat vessel will require a shielding rating of 11 to achieve the same exposure. These figures are shown in the Health Report window in the Editor.

Amount or even presence of ablator is insignificant, only the shield base is important. It is both easier to code and perhaps more realistic (real-life ablators are low-Z materials that have bad radiation shielding capabilities). However, I may add resource shielding (and resource radiation) in the future, so that amount of specific resources on the vessel will affect its radiation-related properties.

Edited by garwel
Link to comment
Share on other sites

I've not tried it all yet, but I'm really liking the idea of all the new stuff!

One quick idea -- have you considered having the distance between the radiation generating devices and the kerbals as a factor? If it would be too difficult to calculate that per tick, you could just do a rough average distance between all the living spaces and all the reactors or something. It's just that having the nuclear engines at the end of a long truss, away from the living spaces of a ship, is a pretty common trope in SF and it would be great to have a reason to build something like that.

Link to comment
Share on other sites

3 hours ago, wile1411 said:

Might be more of a Dev thread topic, but would you do that per ticket or just once onload or on dock/undock/damage? It's not as it the ship structure changes from tick to tick.

Health and radiation data is updated every 10 seconds (when not on time wrap), otherwise it would be a slideshow. Still, it can cause hiccups, especially when many kerbals are in physics range. I plan to do optimization as soon as all main systems are in place, which is about now.

4 hours ago, cyberpunkdreams said:

I've not tried it all yet, but I'm really liking the idea of all the new stuff!

One quick idea -- have you considered having the distance between the radiation generating devices and the kerbals as a factor? If it would be too difficult to calculate that per tick, you could just do a rough average distance between all the living spaces and all the reactors or something. It's just that having the nuclear engines at the end of a long truss, away from the living spaces of a ship, is a pretty common trope in SF and it would be great to have a reason to build something like that.

I've thought about it, but it's harder than it may sound. First, AFAIK, there is no simple way to get the distance between parts in one vessel. I'd have to calculate it myself, and it would require lots of coding (you'd have to pass the ship's part tree, find the distance between connected nodes, take parts orientation into consideration, etc.) for a rather small benefit. For the vast majority of vessels, cosmic radiation will still be a much bigger threat than their reactors. And it can also cause massive lag, at least until I do the optimization pass I mention above.

I could find a simpler approach: e.g. require that radioactive parts didn't touch crew parts directly; calculate the number of parts, not the linear distance, between the crew module and the nuclear reactor/engine; or give trusses a special property of shielding against vessel radiation.

Link to comment
Share on other sites

is there are part equivilant function like the function that gets the distance between two crafts? I remember something that uses the center of a part as it's point location and might be able to be used to compare to another parts point locations. The downside is orientation isnt taken into account.

Link to comment
Share on other sites

Yeah, likewise, I thought you might be able to fetch the centre of each part from the craft and do some trig to get the distances you needed from that. But fair enough, it was just a thought. Some of your other ideas could work well though.

Yet another though -- instead of (or as well as) using heat shields, you could use Module Manager to add a "shielding" module to the radioactive parts themselves, with an appropriate config slider in the VAB for the parts. Increasing shielding would increase cost and weight (perhaps very significantly). It would just help to keep the part count down on craft.

Link to comment
Share on other sites

4 minutes ago, cyberpunkdreams said:

Yeah, likewise, I thought you might be able to fetch the centre of each part from the craft and do some trig to get the distances you needed from that. But fair enough, it was just a thought. Some of your other ideas could work well though.

I'll try to do that; just about to test some code that uses this data.

5 minutes ago, cyberpunkdreams said:

Yet another though -- instead of (or as well as) using heat shields, you could use Module Manager to add a "shielding" module to the radioactive parts themselves, with an appropriate config slider in the VAB for the parts. Increasing shielding would increase cost and weight (perhaps very significantly). It would just help to keep the part count down on craft.

Shielding is needed not just for the radioactive parts, but most importantly for cosmic radiation, which is usually of greater concern than artificial. E.g., in interplanetary space just outside Kerbin SOI you get 10,000 banana equivalent doses/day from cosmic rays and only 250 from a NERV engine. There are some truly powerful reactors (mostly in KSP-IE) that produce great amounts of radiation, but most "normal" parts are much less dangerous. So you still need shielding even if you have a completely nuke-free vessel in deep space.

But I like your idea of having a shielding slider for some parts; I may add it in the future when (if) I implement resource shielding. Maybe make it a feature of manned parts?

Link to comment
Share on other sites

5 minutes ago, cyberpunkdreams said:

Yes, shielding the crew compartments instead of the reactors makes more sense. I don't think you really need shielding as a resource though? I don't think it depletes in real life, does it?

Well, it may deplete (e.g. water may become contaminated after some time), but it's not the point here. What I have in mind is to allow some resources to provide additional Shielding when present on board because they have good shielding properties IRL (e.g., Water and Lead) or because they are supposed to contain medicine and such (e.g. USI Colony Supplies). In this case, I could also add an abstract resource called RadiationShielding to crew parts. This would use the same code and would be easy for the player to control.

Besides, I've added a page on Radiation to the Kerbal Health wiki with some explanations of the new mechanics. Some figures there differ from the pre-release version, because I've already tinkered with them, but most stuff is correct.

Link to comment
Share on other sites

Just wondering what your rough plan is for the max rate a Kerbal max HP will decrease? Eg unshielded with a NERV engine at other end of ship.

Do you plan for a way to get max HP back, or will it be limited to just the kerbal 5x level increase amounts as set in the config? It initially feels a bit weird to get HP back after radiation poisoning, but hey, they're little green men and what would I know of their biology. Happy with either choice you make for the mod.

Edited by wile1411
Link to comment
Share on other sites

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