timmers_uk

[1.2.0][WIP, PLUGIN][0.11.9.8][30/10/2016] KeepFit - Kerbal fitness degradation

Recommended Posts

 

 

[1.2.0] KSP KeepFit 0.11.9.8 - A Kerbal In-mission Fitness Degradation and Gee Loading Addon

C4DW0LU.png

TLDR; A plugin to track kerbal fitness levels and impact their G-tolerance as a result of spending years bunged up in tiny capsules.

 

Summary of Features

- All Kerbals have a fitness level

- Each capsule has a defined 'activity level' defining the comfort, room, and built-in fitness capabilities for crew in flight.

- All Kerbals are now subscribed to a regime of calistheni caliths ... workouts whilst not on missions to recover their fitness levels.

- All Kerbals fitness levels go up or down based on their opportunities for exercise (not just active vessel).

- In-flight display of Kerbals fitness levels and Gee loading

- Kerbals in active vessel are affected by their current Gee loading

- Separate tracking of short and longer term Gee loading (1 and 5 seconds, and 1 and 5 minute aggregates), with lower tolerances for longer term Gee overload

- Fitness levels impact Gee tolerance

- Visible warning if crew experience dangerous Gee loading

- Excessive Gee May cause Untimely Death of crew!

- Per save configuration settings

- Enable or disable KeepFit without removing addon

- Crew fitness levels, settings, and Gee data saved in main game persistence file - revert friendly!

- 'WimpMode' to turn Fatal Gee into G-Loss of Consciousness (currently notification only).

- Truly Ugly full roster view in Tracking Station and VAB/SPH

- Uncounted undetected bugs!

- Special extra bonus for using Habitat Pack, as Porkworks Centrifuge part is currently the only part configured by default to bestow EXERCISE on crew on missions

 

How to add the KeepFit part module to your parts

Whilst KeepFit makes a wild stab in the dark at choosing a reasonable fitness level to apply to crewed parts, you probably want to add your own configs for your favourite parts if you feel they shouldn't be assumed to be 'cramped' (by default all crewed parts are cramped, as per the Mercury quote 'You didn't so much get into it as wear it' (though dammit I can't find the original quote now).

Using modulemanager scripts, you add the module which allows the activity level to be defined for a part, which then goes to affect how quickly your crew's fitness degrades. See below for an example. All you have to do is create a .cfg file, and replace the named parts in the example with the part name (from the part.cfg file, not its name in the parts list in the editor), and choose an activity level for strActivityLevel from the available :-

 

  1. CRAMPED
  2. COMFY
  3. NEUTRAL
  4. EXERCISING
 
// slightly better
@PART[mk2LanderCabin]
{
    MODULE
    {
        name = KeepFitPartModule
	strActivityLevel = COMFY
    }
}

// even more palatable
@PART[cupola]
{
    MODULE
    {
        name = KeepFitPartModule
	strActivityLevel = NEUTRAL
    }
}

 

Download from :-

SpaceDock

- GitHub Release

 

Source and Legal Notices

 

 

 

 

80x15.png

This work is licensed under a

 

This mod includes version checking using
. If you opt-in, it will use the internet to check whether there is a new version available. Data is only read from the internet and no personal information is sent. For a more comprehensive version checking experience, please download the
.

Changes :

0.11.9.8
- Merged fixes for assembly loading/parsing, and additional configs from Kerbas-ad-astra - many thanks.

0.11.8.7
- Rebuilt for KSP 1.2.0
- Many additional part configs courtesy of Kerbas-ad-astra. Many thanks.

0.10.8.6
- Reworked config window for more sane value editing, and to allow editing of baseline Gee tolerance levels.

0.10.7.5
- Rebuilt for KSP 1.1.3
- Didn't fix gender issue on Gee message

0.10.6.4
- Rebuilt for KSP 1.1.2
- Release build

0.10.5.4
- Rebuilt for KSP 1.1 release.
- Fixed issue with old windows remaining after switching scene (may also have held onto other resources as a result!)
- Debug build - extra logspam for debugging/error reporting uses.

0.10.4.3
- Rebuilt and fixed up for KSP 1.1 prerelease.
- Added configs for CrewTubes 1.25m airlock and 2.5m airlock stock parts (I can't even remember!) - contributed with thanks by Fraz!

0.9.4.3
- Added configs for HGR, AIES, CX parts, kindly contributed by @Fraz86, @EvilMurk, @Kerbas-ad-astra

0.8.4.3
- Fixed (again) dupe of OKS_Habring in config
- Fixed window spam issue where multiple instances of windows would appear when clicking a button for a window which is already open.

0.8.3.3
- Interopability between KeepFit and GeeEffects mod, courtesy of SerTheGreat, many thanks
- Merged in blk2007 addition of missing KeepFit config for the Akademy.
- Rebuilt against KSP 1.0.5

0.7.3.3
- Rebuilt on 1.0.4 and updated compatibility in version info

0.7.3.2
- Removed applauncher detector code (for testing purposes, shouldn't have been released)

0.7.3.1
- Recompiled for KSP 1.0.3

0.7.2.1
- Fixed bug causing CLS not to be properly detected, and exceptions thrown when using CLS support.

0.7.1.1 
- Added optional support for ConnectedLivingSpace - if CLS is installed, config can be set so that Kerbals are assumed to have access to the 'best' location for ActivityLevel in the space that is accessible to them according to CLS.
- Switched applauncher icon to DDS.
- Added activity level description to VAB/SPH parts browser

0.6.1.1 
- Added extra toggle to config - useBestPartOnVessel - if set to true KeepFit assumes Kerbals can go to the best location on the vessel to keepfit.
- Fixed persistence bug which was resulting in vessels losing their components activity levels

0.5.1.1 
- Added excellent configs for 1.0 stock additions, NearFuture and Stockalike Station Parts contributed by @FRaz86.
- Shortened the partmodule context menu label.
- Included profession in crew roster ui.[/LIST]

0.4.3.1 - Fixed Gee effects kerbal killer being enabled even when KeepFit has not been enabled for the game save! (I killed Jeb in *my own* career game!)
0.4.2.1 - 1.0.2 Compatibility rebuild, no other changes.
0.4.1.1 - 1.0.0 Compatibility rebuild
0.3.0.1 - 0.90.0 Compatibility, added minimum landed gee (default 0.05g) for landed state to imply 'exercising' - other changes see github
0.2.0.6 - MainWindow is no longer an exclusive appLauncher button, so it can be moved around and kept etc, and also hiding mainWindow via the appLauncher no longer hides all the child windows
0.2.0.5 - Reworked UI to be almost nice, and confirmed major functionality working
0.2.0.4 - Fixed lack of fitness updates whilst in spacecenter scene, changed spacecenter button behavior to show fitness roster window, de spammed the logging on the debug build somewhat, and tidied up the applaunch icon.
0.2.0.3 - Added support for ksp-avc/mini-avc, and switched to a compatible versioning scheme
0.2-alpha - Updated to use ksp 0.25 for build, removed module manager from package, switched to using app launcher,  otherwise just as broken as previously. 
1.0.43 - Removed some unnecessary debug log-spam, and enabled plugin during tracking station + space center scenes, as well as flight, as time passing in these scenes has become 'real' in 0.23.5
1.0.43 - Many cycles of pain later, appveyor is partially working again, though dumping packages always into the same destination
1.0.33rc1 - Interim manual build due to build host plosion - removed debug infinite fuel bobbins, modulemanager dll, and toolbar from distribution zip
1.0.28 - Moved modulemanager dll to the correct place in the installation bundle
1.0.27 - Scrubbed up the roster window (VAB/SPH/Tracking Station) to use the same style as the in-flight display, made crew displays a togglable dropdown for space, and added an all vessels display to in-flight, plus fixed a save bug
1.0.26 - Fixed bug resulting in parts not picking up their specified activityLevel correctly
1.0.25 - Removed egregious 'helloworld' window from KeepFitPartModule in-flight UI
1.0.17 - 1.0.24 - Battled the beast that is AppVeyor ([URL]https://ci.appveyor.com[/URL]) to get automated build + package generation
1.0.11 - 1.0.16 
- KeepFitPartModule now contains definition of activityLevel on attached part, vessel takes 'best' activity level among component parts
- Landed vessels now take activityLevel to EXERCISING
- In-flight UI inspired by/copied from (ish) Alternate Resource Panel. Now displays Gee loading breakdown + fitness of active vessel crew
- Fixed it, broke it, fixed it (repeat x99)

 

Edited by timmers_uk
0.11.9.8
  • Like 8

Share this post


Link to post
Share on other sites

Cool! I look forward to seeing the finished version :D

Share this post


Link to post
Share on other sites
Cool! I look forward to seeing the finished version :D

Good job I haven't released it yet ... I just realised I'm stomping my saved crew fitness roster every time I pass through the KSC scene!

(I also could do with adding a first-time window similar to TAC Life Support as it currently defaults to disabled.

Share this post


Link to post
Share on other sites

Nice. Im really into anything that extends the kerbal management/usefulness in the game. Porkjets centrifuge could be made to help more than other modules since it creates artificial gravity by spinning.

Share this post


Link to post
Share on other sites
Nice. Im really into anything that extends the kerbal management/usefulness in the game. Porkjets centrifuge could be made to help more than other modules since it creates artificial gravity by spinning.

It was Porkjet's centrifuge which pushed me over the edge to start writing this thing - god only knows how (if) I'll be able get it so it sets activityLevel to EXERCISING, but only when spinning, but its a nice goal to give myself.

Share this post


Link to post
Share on other sites

I had considered myself building something aiming to deal with Kerbal fitness (and some other abilities, all of them related to training of some sort), and just for lack of both time and skill I didn't yet.

That said, I will be following this mod with interest, hoping to see it realize what I wanted. Perhaps, we could exchange some thoughts or ideas about the whole subject. And, who knows, I may even try to find time and bring something useful to this project.

Share this post


Link to post
Share on other sites

Feedback

Aside from actually getting my arse in gear and finishing writing v1.0 of this, I'd like to know what people think - is this a waste of time? would anyone else be interested to use this mod? Would you want any other features implemented or existing ones done differently? I'm interested to hear anything, even if its 'meh' (as long as there's a constructive addendum to the 'meh').

Yes, please continue working on this mod. It would be really nice to have some in-game motivation for including things like habitat modules and the wetworks tanks.

Share this post


Link to post
Share on other sites

I've been wanting something like this for a long time. In fact, I've been using a modified version of TAC life support to roughly implement habitation requirements, with resources named "Health", "CabinFever", and "Deconditioning". A few brief comments regarding your implementation:

-I'd prefer that a Kerbal's comfort level be calculated entirely based on the ship as a whole, not taking into account the module in which they happen to be located. I think it should be assumed that Kerbals are taking breaks and using all available space naturally without needing to be micro-managed. Manually rotating crew members between modules so each of them gets rest/exercise on a long interplanetary voyage sounds like an unpleasant hassle.

-Exercise can only compensate for the effects of weightlessness to a limited extent. Adequate living space should be the primary concern for medium-length voyages, but fitness should continue to gradually decrease unless the Kerbals have some form of gravity (e.g., centrifuge module, continuous acceleration, or being on a planet).

  • Like 1

Share this post


Link to post
Share on other sites

I love mods like this and Final Frontier. They make me want to keep my kerbals from dying. Do you plan that when exercising it will reduce Crew G limit with Deadly Reentry? Also will there be something like they can only exercise when it a stable orbit and not doing a burn or in a suborbit?

Share this post


Link to post
Share on other sites
I've been wanting something like this for a long time. In fact, I've been using a modified version of TAC life support to roughly implement habitation requirements, with resources named "Health", "CabinFever", and "Deconditioning". A few brief comments regarding your implementation:

-I'd prefer that a Kerbal's comfort level be calculated entirely based on the ship as a whole, not taking into account the module in which they happen to be located. I think it should be assumed that Kerbals are taking breaks and using all available space naturally without needing to be micro-managed. Manually rotating crew members between modules so each of them gets rest/exercise on a long interplanetary voyage sounds like an unpleasant hassle.

-Exercise can only compensate for the effects of weightlessness to a limited extent. Adequate living space should be the primary concern for medium-length voyages, but fitness should continue to gradually decrease unless the Kerbals have some form of gravity (e.g., centrifuge module, continuous acceleration, or being on a planet).

I'm very interested in what you say about modded TAC Life Support. I'm keeping insanity based stuff out of scope for now as EnterElysium had posted that he's looking at that (and keeping scope focused is a good move), but fundamentally what I'm modelling is probably more accurately describable as deconditioning than fitness.

The whole ship thing, yep that's a good point. I particularly dislike EVAing on large craft as my machine lags out like a boss. It simplifies the calculations for available ActivityLevel on board ship too, if I can determine a single common available ActivityLevel for all crewMembers and treat it like they all get the same opportunity to take their eye out with a bungee, and not just the guy in the crew can.

I love mods like this and Final Frontier. They make me want to keep my kerbals from dying. Do you plan that when exercising it will reduce Crew G limit with Deadly Reentry? Also will there be something like they can only

exercise when it a stable orbit and not doing a burn or in a suborbit?

The plan is for crew on active duty to reducing their G tolerances, with excercise mainly being by resting your Kerbals at KSC. The intention for the mod isn't to be way over on the realism side, but right now NASA etc haven't managed to find a way to halt degradation whilst in low G environments, so I'm going for a plan where if you are on a planet, you'll probably retain your fitnessLevel, KSC is where you recover fitnessLevel, and maybe if your ship has access to a spinny wheel or other 1G(ish) living/exercise environment, then you'll either retain or recover.

(There are fancy curve based things which could allow for recovery to a certain degree based on where you are, but I'm tryng to keep it somewhat simple).

In terms of suborbital and during burn, I'm probably going to fudge that one (for now at least) and make them neutral on your fitnessLevel, as in the big scheme of things they don't account for nearly as much time as the transits (but its possible that I could later on give a maxFitness hit to a kerbal if he hits a warning G level - 'oow my spine!' kindof thing).

It'd take some negotiation and work to integrate directly into Deadly Reentry, so what I'm planning on for now is to possibly begin using some code derived from the DR G limit code, and then switch over to my own as things progress, or if that's not possible wait a bit longer and go with my own crew only G limit code from the start (DR should be able to live with this by having the crew G tolerance settings left to their original limits, as crew fitness won't ever really increase the G tolerances above the defaults on Deadly Reentry.

Longer term for the G limits I've got an interesting model I'd like to try out for separately tracking short/medium/long term mean experienced G levels and having separate tolerance levels for each - whether I'll get to that I couldn't say.

I had considered myself building something aiming to deal with Kerbal fitness (and some other abilities, all of them related to training of some sort), and just for lack of both time and skill I didn't yet.

That said, I will be following this mod with interest, hoping to see it realize what I wanted. Perhaps, we could exchange some thoughts or ideas about the whole subject. And, who knows, I may even try to find time and bring something useful to this project.

Fire away - as soon as I've got something which has ability to cause carnage to your Kerbals deliberately (G kills), I'll punt up a build, and sometime in the next few days I'll start pushing source to github.

See above on general thoughts.

Timmers

Share this post


Link to post
Share on other sites

I love this idea!

As it happens, what I do in DRE is really a hack for this. What it *should* do is decrease the crew's *health* due to G-force, and when *health* gets below a certain limit kill them. In fact, the damage levels are set for a bit more than "longest time to suffer x G force *without damgage*" rather than without death.

I don't know if you want to take this on, but what I'd love to see is for this to morph into a slightly-broaded-scoped mod that dealt with crew health. That is, microgravity would decrease health to some threshold; unable to exercise at all would decrease it more; G damage would decrease it (at a rate also proportional to existing health, so weaker Kerbals experience more damage).

It might also be worth considering tracking two stats, health and fatigue--or something to model the fact that people in microgravity don't have broken bones, even if they lose bone mass and (usually) muscle mass, whereas people who suffer crushing Gs may take internal damage.

Further, you could increase fatigue on EVAs (which are supremely tiring) and limit ability to move when a Kerbal gets too tired.

You're of course free to use any and all DRE code you like. :)

I also like your idea of separating out short vs. long-duration G exposure. That's what I tried to hack with my cumulative formula, actually, so that a long exposure to 6Gs was roughly equivalent to a short one at 12, and that having *both* is bad news. But it's a minimalistic, simple model...

Share this post


Link to post
Share on other sites
I love this idea!

As it happens, what I do in DRE is really a hack for this. What it *should* do is decrease the crew's *health* due to G-force, and when *health* gets below a certain limit kill them. In fact, the damage levels are set for a bit more than "longest time to suffer x G force *without damgage*" rather than without death.

I don't know if you want to take this on, but what I'd love to see is for this to morph into a slightly-broaded-scoped mod that dealt with crew health. That is, microgravity would decrease health to some threshold; unable to exercise at all would decrease it more; G damage would decrease it (at a rate also proportional to existing health, so weaker Kerbals experience more damage).

It might also be worth considering tracking two stats, health and fatigue--or something to model the fact that people in microgravity don't have broken bones, even if they lose bone mass and (usually) muscle mass, whereas people who suffer crushing Gs may take internal damage.

Further, you could increase fatigue on EVAs (which are supremely tiring) and limit ability to move when a Kerbal gets too tired.

You're of course free to use any and all DRE code you like. :)

edit : The link to wikipedia was more for my reference than yours, as its clear your already aware of the g tolerance science

I also like your idea of separating out short vs. long-duration G exposure. That's what I tried to hack with my cumulative formula, actually, so that a long exposure to 6Gs was roughly equivalent to a short one at 12, and that having *both* is bad news. But it's a minimalistic, simple model...

Thanks for that feedback.

I'm lucky enough to have a long commute to/from work and in the course of this a reasonably efficient way of tracking the short/medium/long term G exposure per Kerbal popped into my head, which involves keeping a stack of accumulators for each kerbal into whch their experienced G gets accumulated. Through this I should be able to track something like mean G on 5 second, 5 minutes, 5 hours timescales (http://en.wikipedia.org/wiki/G-force#Human_tolerance_of_g-force). From that I should be able to handle the consequences of going over Assuming it actually works, then I may have something which handles Kerbal G tolerance on those different intervals.

Interesting thoughts on the different aspects of Kerbal health, and has potential. Later on if it goes well to begin with I could well get into a broader health mod (I'm already thinking I ought to have called it FlightSurgeon and not KeepFit), but I'd rather not run before I can walk, so want to concentrate on doing the basic aspect in a presentable and reliable way.

Tim

edit : The wiki reference is remind me on the multi-window G tolerance stuff - you already know about it :D

Edited by timmers_uk

Share this post


Link to post
Share on other sites

A bit of progress today, but somewhat mired down in fighting the persistance system (I feel better for it though, as I've got less handcrafted fudge now to persist the crew roster etc.

I also put in some G tracking code so I can independantly track mean experienced G levels on different time windows - this is just accumulating up the gee-time and then determining the mean whenever we crossover a time boundary, so there's some potential for 'meh' because its not a rolling average, but rolling average would be a lot more data to store.

Most importantly, to make me feel I've made some actual progress, I thought I'd better hook in at least a noddy iteration on killing my crew with G effects.

Video below of a infinite fuel bodged test to prove that I'm outputting the correct messages when experienced G-levels exceed tolerances (this is all short terms so its the instantaneous 1 second mean G which is causing the warnings and ultimate death of the crew).

Next up I'll hook in the fitness level based modification of the g tolerance values and send some poor kerbal on a slow boat to jool and then see how he likes those aerobraking apples! and after that I'm going to 'address' some of the UI - I'm thinking I'll separate out the general crew fitness display from that of the active vessel crew, and will probably go with something akin to the UI of the very nifty alternate resource panel for displaying all this number-soup.

Share this post


Link to post
Share on other sites

As the newest KSC player on earth i'm not sure if i can contribute with anything else than: Looks like a must-have addon! Keep up the good work!

Share this post


Link to post
Share on other sites

See page 1 - I've had a bit more progress, moved the repo (just to be annoying), got a hosted CI build going, but not yet automatically packaging new builds, and uploaded an initial test build.

Truth be told though, its really a curiosity more than anything as yet. I still need to work much more on the UI, and from there get onto the grind of writing modulemanager config to get the various command module parts setup for their comfort levels.

Still ... it was nice to see Bill shrivel to a broken wreck of a man and then expire as soon as I lit up the LV-909 today :D

Share this post


Link to post
Share on other sites

Nice. I took a stab at a Sanity mod about a month ago, but left it 20% done, as you say.

Only thing I can suggest is having fitness levels also affect EVA performance. That is, weak Kerbals walk much slower in high gravity environments, and the like (maybe also hook in with KAS and the carrying system?)

Share this post


Link to post
Share on other sites
Nice. I took a stab at a Sanity mod about a month ago, but left it 20% done, as you say.

Only thing I can suggest is having fitness levels also affect EVA performance. That is, weak Kerbals walk much slower in high gravity environments, and the like (maybe also hook in with KAS and the carrying system?)

I'd be interested in that, along with also locking controls potentially if all your crew on board ship were out of action due to Gee issues, but I'm not sure yet what is and isn't supported by the API available to KSP plugins - I have a suspicion that control locks are possible but altering walking speed may not (though possibly I could give the Kerbal a programmatic poke to make them fall over instead of slowing them down).

Anyway ... family matters notwithstanding, I hope to wrap some nicer display around the in-flight side of things.

Share this post


Link to post
Share on other sites

This is starting to look more and more interesting. I really like how you implimented this. And so quickly!

Some questions:

Do you intend to have 0-100% comfort level stat at some point?

Perhaps a 0-100% health/fitness bar too?

Do you have plans to add mental health to the equation? There was somebody working on that but there has not been any progress as far as i can see. The effects would range from less efficient manuvering, No eva available, ship wont respond correctly to turning commands or not at all when mental health is really low. and perhaps kerbals spacing themselves (going into space without a suit) from extreme claustrophobia. This would be modified by g force and physical comfort/fitness and courage/stupidity.

The possibilities of this plugin is endless. You can perhaps eventually make skilling up kerbals a thing

* example: every kerbal has their base skills (stupidity and curage) this decides how their sub skills evolve. I suggest progressive values like classic xcom or ftl rather than skill levels like eve online etc. One value like dexterity/piloting/manuevering could effect all the reaction wheels on the ship in a positive or negative way(jebediah would ofcourse come with epic piloting:D)

I hope i didnt overwhelm you by all my suggestions (i tend to do that) i know how huge of an undertaking some of these would take. Keep up the good work and thank you for using your free time and effort to extend this great game with new features.

And sorry for my terrible english. Im norwegian and its been a while since iwe been abroad

Edited by landeTLS

Share this post


Link to post
Share on other sites

This looks pretty interesting. Can't wait to see where this goes!

Share this post


Link to post
Share on other sites

(archiving old title page)

(old text)

Background

I'm putting this thread up to kindof force myself to actually keep working on this rather than leaving it 20% done (as usual).

One of the things I've heard mentioned a few times is how some players feel uncomfortable with being able to have their Kerbals stuffed into a 1 man capsule for years at a time on long duration missions with zero consequences.

EnterElysium has elsewhere mentioned working on a plugin to cater for one aspect of the consequences of crampedness and isolation by looking into a Kerbal Insanity plugin, which is cool.

The other bit that I'm looking into is providing a mod whereby all your Kerbals start out with a base level of fitness, which can be affected by spending time on the Available roster in KSC positively, or negatively to varying degrees whilst spending on missions.

I'm not sure yet whether the ultimate degradation will be for Kerbals to be able to kark it through ill health, but it is a possibility. What I do plan for certain to include is a tiny chunk of DeadlyReentry-ness in terms of monitoring g-loading on your active kerbals, but rather than having all Kerbals share the same g tolerance, have the Kerbal's fitness level impact how well they can cope with g loading.

Whilst I'm plenty experienced in game development, this is my first crack at developing a mod/plugin for KSP, so I'm leaning heavily on the forums here for tips on how to achieve this, and looking closely at the likes of TAC Life Support and Deadly Re-entry to get a clue on how to achieve this.

Key factors being modelled by this mod:

Fitness Levels:

At the moment, the default is for newly arrived Kerbals at KSC to have a fitness level of 90, on a scale of 0-100 - whilst there don't appear to be any intelligence tests in the selection process, we do have STANDARDS!, men.

This is configurable though per-game.

Activity Levels:

Over time, each Kerbal's fitness level will changed based on the level of activity available, which are in the the following enumeration :-

CRAMPED

COMFY

NEUTRAL

EXERCISING

Activity rates are not currently configurable, but are intended to be so eventually. Right now only EXERCISING means fitness increases.

Whilst Kerbals at KSC will always be counted as EXERCISING, those on board ship will have their activity level either determined automagically by looking at whether the whole ship and the part the Kerbal is in have any available crew slots, or by inclusion of a KeepFitPartModule in the ship (or possibly the specific part) the Kerbal is in - by this, through modulemanager configs, for instance, that lovely space station ring can be of benefit to your ship's crew by allowing them to work out during their passage to Jool.

Consequences:

Consequences of a high/low level of fitness of a Kerbals are intended to mainly result in an increased or lessened g-tolerance - possibly also a total decline could result in killing off Kerbals too though.

Progress

So far, I've got a mod with :-

Settings windows and settings for each game stored in the main game persistance file, allows tweaking of min/max/initial fitness levels, and allows enabling KeepFit on a per-game basis (I really like this aspect of TAC Life Support).

A modulemanager config for testing which automatically adds a KeepFitPartModule to all CommandModules (this will eventually change as I add capability for the KeepFitPartModule to specify the activity level available in the pod).

A simple module run in all the scenes where time is passing, which periodically searches for all the Kerbals both in KSC on the available roster, and in ships (active and inactive), and determines their activity level

A roster view window showing all the detected kerbals, their current fitness level, and activity level - this roster is persisted with the game.

A simple periodical process to update the known kerbals fitness levels.

Some non-hooked in code (written before I had my head around how to get the configurations persisted) which is largely derived from DeadlyRe-entry's G tolerance code, re-written to take into account the fitness level of each Kerbal in the active vessel, and able to take similar actions to DRE (i.e. everything up to and including killing the poor Kerbal).

Plans

What I want to do next, and ... a bit further on :-

Hook in the 'negative outcomes' - i.e. the G loading code and possibly dying of ill-health.

Make the rate of decline configurable (currently I'm using hardcoded and very fast degradation when a Kerbal's activityLevel is 'TOOCRAMPEDTOMOVE', and quite fast degradation on 'CRAMPED' and 'COMFY', with a similar pretty speedy recovery of fitness when 'EXERCISING' - good for testing but not very realistic.

Add setting to KeepFitPartModule to specify the activity level the part supplies (including displaying this in the part context level).

Split apart the refresh of crew roster and the fitnesslevel update (both currently run once/second real-world-time).

Switch to a custom Blizzy toolbar icon (currently a placeholder maneouvre node icon).

Put together modulemanager config to apply KeepFitPartModules to common crew part.

Investigate efficiency improvement through hooking into game events rather than periodically scanning the whole roster and all vessels for kerbals.

Push the source onto github.

Find some keen individual who will put a Kerbal onto a workbench in IVA view

(possibly) Include average G level and planetary body location on impacts on fitness (e.g. 1g flight lessens fitness impact compared to 0g in space, and stopped, landed, on Laythe gets treated just like being at KSC as you can get out and do some pushups whenever you like ... and Minmus is bad for your fitness because its made of desserts)

<n>. Release the damn thing

Feedback

Aside from actually getting my arse in gear and finishing writing v1.0 of this, I'd like to know what people think - is this a waste of time? would anyone else be interested to use this mod? Would you want any other features implemented or existing ones done differently? I'm interested to hear anything, even if its 'meh' (as long as there's a constructive addendum to the 'meh').

Update : 30/01/2014

Rejigged data persistence

Added more info to the roster spam window

Added G tracking on 1 second, 5 second, 5 minutes, and 1 hour windows

Added per-kerbal tracking of accumulated time in each activity state

Pushed source to GitHub (https://github.com/timmersuk/KeepFit)

Pushed video of G-Loading test to youtube (yep, he's dead!) (

)

Update : 31/01/2014

Rejigged data persistence ... again ... now I'm almost happy with it!

Removed non-vesselled kerbals from the roster view whilst in flight

Color coded G loading information and made it slightly more intelligible on roster window

Added wimpmode to warn but never kill off kerbals

Renamed GitHub repo for reasons (https://github.com/timmersuk/Timmers_KSP/)

Hooked in kerbal fitness level to G-loading calculations so weak Kerbals die quicker

Failed to post a video update

Pushed not yet properly versioned 0.1-alpha build DOWNLOAD LINK

Share this post


Link to post
Share on other sites
This is starting to look more and more interesting. I really like how you implimented this. And so quickly!

Some questions:

Do you intend to have 0-100% comfort level stat at some point?

Perhaps a 0-100% health/fitness bar too?

Do you have plans to add mental health to the equation? There was somebody working on that but there has not been any progress as far as i can see. The effects would range from less efficient manuvering, No eva available, ship wont respond correctly to turning commands or not at all when mental health is really low. and perhaps kerbals spacing themselves (going into space without a suit) from extreme claustrophobia. This would be modified by g force and physical comfort/fitness and courage/stupidity.

The possibilities of this plugin is endless. You can perhaps eventually make skilling up kerbals a thing

* example: every kerbal has their base skills (stupidity and curage) this decides how their sub skills evolve. I suggest progressive values like classic xcom or ftl rather than skill levels like eve online etc. One value like dexterity/piloting/manuevering could effect all the reaction wheels on the ship in a positive or negative way(jebediah would ofcourse come with epic piloting:D)

I hope i didnt overwhelm you by all my suggestions (i tend to do that) i know how huge of an undertaking some of these would take. Keep up the good work and thank you for using your free time and effort to extend this great game with new features.

And sorry for my terrible english. Im norwegian and its been a while since iwe been abroad

Hey,

Great to hear your feedback. Things have progressed some more and I'm at a point now that it might be worth giving the plugin a poke to see what you think of it in practice (See page 1 for current prerelease build).

There's now a comfort/activityLevel which can be attached to ships crew compartments by adding a custom PartModule. The latest build of the plugin adds this plugin to the stock parts plus a couple of other from the Habitat pack. The comfort levels are pretty limited right now, running from

CRAMPED - Lose 5% fitness per day (about that 1 man capsule trip to Eeloo!)

COMFY - Lose 1% fitness per day (so many snacks, so few treadmills)

NEUTRAL - Does what it says on the tin

EXERCISE - Regain 1% fitness per day

There's a definite element of skilling up here - for starters with default settings, Kerbals don't have max fitness at initial recruitment, so you might want to power them a bit before sending them on a long mission. Similarly, after you get all the way to Jool, a rest-cure at Laythe might be a good way to recover before returning to Kerbin (if they can survive the de-orbit).

The Gee-levels and impacts of ill-health have been slightly reduced for now - rather than minmum health meaning a fly's fart would top your Kerbal, they now lose up to 50% Gee tolerance not 100%.

Erm ... that's it for now.

Next up aside from dealing with any horrific bugs, I want to see if the code can be more event driven internally and require less vessel scanning, and if I can re-use the in-flight UI for the 'general' roster (and also actuall title/caption the latest imgur)

Timmers

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now