Jump to content

[1.12.x] USI Life Support


RoverDude

Recommended Posts

On 2/22/2016 at 4:41 AM, mikegarrison said:

When I have a ship with a science lab and it's doing life support recycling, any time I move the focus away from that ship and then come back the life support status reads "inactive". But the switch is still on. If I turn the switch off and then turn it on again, then the life support status switches to "operative".

Is this just a display bug, or is this an actual problem?

Were they in different capsules? Perhaps it has to do with which capsule they were in.

Yes. It was originally an unmanned station/ship. Sent up two interface vehicles with three kerbels each, who moved around a lot in the station. Flew around the Kerbin sphere of influence for a long long time with it. Ran out of supplies on the return voyage. Separated the interface vehicles and returned them to Kerbin. That's the gist of it, but it was a lot more involved.

As I couldn't reproduce it in simple tests, I'm assuming at this point it was somehow user error.

Link to comment
Share on other sites

Has there been any progress on Rescue EVA kerbals? It sucks that if I land next to the kerbal, I can't switch back and forth, or else they become tourists. Not impossible right now, just more annoying. The reason is the EVA surface rescue contract kerbals are counting down their life support timer, something that doesn't happen to kerbals waiting for rescue inside pods.

Edited by sardia
Link to comment
Share on other sites

As I was driving my 200 tons test rover back to KSP, to reclaim it, I noticed that Bill in the rovers seat wasn't creating a life support entry, but my little rover, also on Kerbin, was creating an entry. No idea if I'm reporting that one Kerbin Rover shows up or that another is missing, kinda lost track of how life support is working on Kerbin.

 

I've moved most of my Kerbals to my Kerbin Space Station, that creates a rather lengthy list of names and unfortunately it get sorted at the top, resulting in having to scroll the list all the time. Would it be possible to only show individual Kerbals for the loaded vehicle, but everything if the window is opened at the space center or at least sort the list so the loaded vehicle is at the top and sure to be visible?

Link to comment
Share on other sites

@Cawdeen & @mikegarrison reported recently some issues with crew transferring to different vessels, docking, etc. I left a lander (LEM) in orbit of minmus with no crew. When the next crew arrive to re-use the lander I am finding that they immediately consume all the supplies left on the lander and all the supplies in their own (CSM) vessel as well. It seems like LS is assuming that the crew have been in the lander vessel the whole time it was left in minmus orbit and now it does a catch up, resulting in sup: = -49 days.

@RoverDude, I have a lot of mods installed and the vessels are non stock but I have saved the quicksave and player.log if you want them.

Edited by Kaa253
Link to comment
Share on other sites

8 minutes ago, Kaa253 said:

@Cawdeen & @mikegarrison reported recently some issues with crew transferring to different vessels, docking, etc. I left a lander (LEM) in orbit of minmus with no crew. When the next crew arrive to re-use the lander I am finding that they immediately consume all the supplies left on the lander and all the supplies in their own (CSM) vessel as well. It seems like LS is assuming that the crew have been in the lander vessel the whole time it was left in minmus orbit and now it does a catch up, resulting in sup: = -49 days.

@RoverDude, I have a lot of mods installed and the vessels are non stock but I have saved the quicksave and player.log if you want them.

Interesting. It's clear that the LS clocks are based on the ship, not the kerbal. Also, there is always strange stock funkiness with unfocused ships that either consume or create resources.

If you have the right saves to try it, it would be interesting to see what would happen if you moved your focus to the empty ship when you were, say, a day out. Let it "catch up" to the main game clock. Then make your rendezvous and see if they only much down on a day's worth of supplies.

Edited by mikegarrison
Link to comment
Share on other sites

I know nothing about coding for KSP. But ... I'm looking at a save file anyway. And some of my guesses about how LS work seem to be wrong.

There is a "Scenario" for Life Support that tracks LS data by Kerbal. It says when the Kerbal last ate a meal, when the kerbal was last on kerbin, etc.

			STATUS_DATA
			{
				KerbalName = Mirsan Kerman
				LastMeal = 25564382.191148
				LastOnKerbin = 24179431.4976173
				MaxOffKerbinTime = 996179431.497617
				LastVesselId = 9f2c1eac-df49-463c-90ea-ec5dcf691a83
				TimeEnteredVessel = 24179431.4976173
				IsGrouchy = False
				OldTrait = Engineer
				LastUpdate = 25564382.191148
			}

I think the problem happens when kerbals switch ships (including going EVA). The ship you dock with, board, or KIS-attach is always, by necessity, unfocused when you join it. I think the code must be doing some kind of "catch up when receives focus" action. But ideally it should do that for the unfocused ship just BEFORE the joining action. However, it seems like the catchup calculations are done AFTER the join, and so they affect the new kerbals.

Also, it is clear that "LastOnKerbin" is not set correctly. It is supposed to be independent from "TimeEnteredVessel", but it's not. When I send a Kerbin on EVA and it comes back inside, it resets the "LastOnKerbin" number, thus explaining why EVAs can give infinite hab time.

Link to comment
Share on other sites

12 hours ago, Kaa253 said:

@Cawdeen & @mikegarrison reported recently some issues with crew transferring to different vessels, docking, etc. I left a lander (LEM) in orbit of minmus with no crew. When the next crew arrive to re-use the lander I am finding that they immediately consume all the supplies left on the lander and all the supplies in their own (CSM) vessel as well. It seems like LS is assuming that the crew have been in the lander vessel the whole time it was left in minmus orbit and now it does a catch up, resulting in sup: = -49 days.

@RoverDude, I have a lot of mods installed and the vessels are non stock but I have saved the quicksave and player.log if you want them.

I also have a lot of mods installed but I dont know enough to troubleshoot the problem. Right now any kind of space station/long term mission is basically impossible because this seems to be happening with all ships I leave orbiting something for an extended period of time, essentially defeating the purpose of using LS. Im torn, because I feel like without LS the game is lacking, but with it all my missions become failures half way through when this issue kicks in.

Link to comment
Share on other sites

I did some experimenting with a clean install and USI LS.  It appears that going on EVA calls the untrack method.  When the kerbal reenters the vessel, all of the timers are reset as if he just left Kerbin.  I also found that undocking randomly untracks kerbals for a moment. The undocking issue may be due to USI LS updating before KSP has everything sorted out from the undocking.  

Link to comment
Share on other sites

Bug report or am I doing something wrong?

What I am running:
- USI LS 0.3.12
- Command pod with 6 kerbals
- 4x Nom-o-matic 5000 (all four full of suplies and fertilizer at launch)
- 0.625m reactor, 4 small solar panels, 2600 Ec battery

If the ship is left out of focus, mulch is produced but no supplies are generated even though the agroponics are turned on for all Noms units. Fertilizer is around 99.9%, so not used.

If I keep the ship focused and timewarp, it will create supplies without issue: supplies increase, fertilizer decreases.

Link to comment
Share on other sites

Possible bug report:

- Used HyperEdit to increase Supplies and decrease Mulch. Both are now frozen (as in stopped increasing/decreasing respectively) in time, and the clock on the in vessel usi-ls monitor has stopped, presumably at the time when supplies would have run out (or maybe when I used HyperEdit, not sure). Clocks off the vessel (back at HQ) are still ticking, and record that the kerbal in question has gone 40+ minutes without supplies, even though he technically have a full stock of supplies.

I'll admit, this is a pretty fringe case, but given my propensity for using HyperEdit on things...are you really telling me I can't use it to increase my food supply? That's just...cruel.:o

As an aside, my favorite feature (I only just downloaded the mod), is the fact that you gave the Veterans the possibility of having unique responses to low supplies. That really adds some unique opportunities!

Cheers.

Link to comment
Share on other sites

2 hours ago, Jimbodiah said:

Bug report or am I doing something wrong?

What I am running:
- USI LS 0.3.12
- Command pod with 6 kerbals
- 4x Nom-o-matic 5000 (all four full of suplies and fertilizer at launch)
- 0.625m reactor, 4 small solar panels, 2600 Ec battery

If the ship is left out of focus, mulch is produced but no supplies are generated even though the agroponics are turned on for all Noms units. Fertilizer is around 99.9%, so not used.

If I keep the ship focused and timewarp, it will create supplies without issue: supplies increase, fertilizer decreases.

It's not you. There are issues with supplies and mulch.

When a ship or base is unfocused it will create mulch and not use it to create new supplies. When you focus on the ship, it will start making new supplies and using up that mulch. But because most parts have very limited mulch storage, I'm not sure what happens when you leave the ship unfocused for too long. I think you start losing mulch (and therefore the raw materials for making more supplies), but I'm not certain.

Link to comment
Share on other sites

Bummer.

Mulch is always maxed, so as long as there is a bit a mulch you get more than 1 supplies, so as long as agroponics can keep up with the number of kerbals, you have a fool-proof setup as long as you have fertilizer. I made some ships with big mulch containers to save everything, but it's not needed, hence the very small mulch capacity on all the LS containers.

Link to comment
Share on other sites

On 2/28/2016 at 11:04 AM, PocketBrotector said:

Expanded the wiki again with pages on habitation, FAQ, configuration, etc. If people are directed there it should now hopefully be able to answer most of their questions about how to use the mod.

PocketBrotector, wanted to say thanks again for your work on the wiki. I've found it all incredibly useful. I've got a few more questions, for you or anyone else, that I haven't seen answered yet. I figure they might point out a few more things that would be helpful on the wiki. I tend to overthin problems, and I like to understand EVERYTHING that's going on... So maybe most people don't have the same questions... But for what it's worth:

1) Can you explain how multiple recyclers work, and how they play together with crew capacity?

I assume that anyone above the crew capacity consumes at the normal rate. So 6 Kerbals with a Science Lab eat at a rate of: 5*16.2*0.3+1*16.2=40.5. Five get the discounted rate and the sixth doesn't. If I add a second Science Lab, the 6th guy (and up to 4 more) would also get the discount. So the idea is that you start with the most efficient recycler and hand out discounts until the crew capacity runs out. Then you move to the next recycler and so on until you run out of crew capacity on recyclers or until all Kerbals are getting the best discount possible. The wording of "their effects are cumulative" makes me doubt this understanding a bit though... To me that would imply that two recyclers can somehow combine to give an even better discount. Just wanted some clarification.

2) How does Habitation work with EVAs?

I know they get a timer as soon as they go out the door. What happens when that timer runs out? From the settings it looks like they turn into a Tourist by default... Does he teleport to a nearby vessel? Otherwise I don't see how you'd save an EVA Kerbal that you can't control. And is their Habitation clock ticking while they're out or is it put on pause?

3) Can you talk a bit more about how Habitation works? Particularly, what's the deal with the habitation clock attached to a particular vessel?

Say I've got a ship with enough habitation or 10 months, and Bob is on board. He will last for 10 months before turning into a Tourist. But what happens if Jeb stops by after 5/10 months have passed? I imagine this cuts Bob's time remaining down to 2.5 months, because he had the whole thing to himself for 5 but now he has to share the last five with Jeb. But how does Jeb's timer work? He only gets 2.5 months because Bob has "used the space up"? I don't think that's the case, because I haven't noticed any ships becoming "worn out" like this. But I can't think how else you would determine how long Jeb can last. It all makes sense to me when we talk about confining a set number of Kerbals to a certain ship. But I'm really confused how the math works out when you start adding fresh Kerbals or new parts to the ship.

4) Lastly, a more specific question that I've had...

I've got a station with a Science Lab and the Nom-O-Matic 5000. Both are active and I never run out of Electric Charge. I've got +1000 units of Mulch and Fertilizer. And I've got 3 Kerbals on board. So with the Science Lab their consumption comes down to 3*16.2*0.3=14.6 supplies/day. And that's what the USI-LS window is telling me. The Nom-O-Matic should be producing 27.54 supplies/day. Again, it's turned on and I've got plenty of Mulch, Fertilizer, and Electric Charge. If I EVA all three Kerbals I can see that it's producing Supplies. However, my Supplies are CONSTANTLY drained down to zero, and the USI-LS window always shows them with negative time remaining. If they EVA and come back in, it resets to 0. And if I go to another ship and come back it resets. But otherwise it just keeps counting down. And by my calculation the Fertilizer isn't being used up as fast as it should be. I checked the part.cfg and everything looks right... Am I just completely missing something? If it might be a bug, what do I post and where?

Link to comment
Share on other sites

@jofwu, those are all good questions - unfortunately I don't have any of the answers yet!

Multipler recyclers should be "cumulative," but I don't really know more about the details other than that the total recycle rate is capped by the best recycler. I'm not sure if everything is working as intended - see my issue report here. Until that is addressed I'm reluctant to venture a guess about expected behavior.

I haven't experimented with how EVA interacts with USI-LS, so I would just say - try it out and let us know what you learn :)

For question (3), I haven't tried this myself so I can't make any guarantees; but I think Jeb would last for five months. It's a good question about how the hab timer changes when kerbals are added or removed to a vessel, and so on, but I haven't considered it in detail yet.

Your last question definitely sounds like a bug. I would put together some screenshots of the vessel, plus logs, save file, etc., so that RoverDude and company can investigate. You can post your follow-up either here or on Github.

 

Link to comment
Share on other sites

4 hours ago, jofwu said:

I tend to overthin problems, and I like to understand EVERYTHING that's going on... 

Usually I'd say this is a good thing, but in the case of USI-LS, things are a bit... messy. Change happens very sudden, fast, undocumented and buggy. What's true today might change tomorrow. Unless you are willing to do some serious alpha-testing and are able to accept that things are not perfect, you might wanna gloss over the details.

 

4 hours ago, jofwu said:

1) Can you explain how multiple recyclers work, and how they play together with crew capacity?

I assume that anyone above the crew capacity consumes at the normal rate. So 6 Kerbals with a Science Lab eat at a rate of: 5*16.2*0.3+1*16.2=40.5. Five get the discounted rate and the sixth doesn't. If I add a second Science Lab, the 6th guy (and up to 4 more) would also get the discount. So the idea is that you start with the most efficient recycler and hand out discounts until the crew capacity runs out. Then you move to the next recycler and so on until you run out of crew capacity on recyclers or until all Kerbals are getting the best discount possible.

From personal experiments, I'd say this is exactly how it works.

 

4 hours ago, jofwu said:

The wording of "their effects are cumulative" makes me doubt this understanding a bit though... To me that would imply that two recyclers can somehow combine to give an even better discount. Just wanted some clarification.

2) How does Habitation work with EVAs?

I know they get a timer as soon as they go out the door. What happens when that timer runs out? From the settings it looks like they turn into a Tourist by default... Does he teleport to a nearby vessel? Otherwise I don't see how you'd save an EVA Kerbal that you can't control. And is their Habitation clock ticking while they're out or is it put on pause?

I don't know what happens when they run out. I think they are still controlable until you board a vessel, then they turn tourist.

The clock not only not ticking, it actually resets. That can be used as a cheat at the moment, but RoverDude mentioned that he'd fix this.

 

4 hours ago, jofwu said:

3) Can you talk a bit more about how Habitation works? Particularly, what's the deal with the habitation clock attached to a particular vessel?

Say I've got a ship with enough habitation or 10 months, and Bob is on board. He will last for 10 months before turning into a Tourist. But what happens if Jeb stops by after 5/10 months have passed? I imagine this cuts Bob's time remaining down to 2.5 months, because he had the whole thing to himself for 5 but now he has to share the last five with Jeb. But how does Jeb's timer work? He only gets 2.5 months because Bob has "used the space up"? I don't think that's the case, because I haven't noticed any ships becoming "worn out" like this. But I can't think how else you would determine how long Jeb can last. It all makes sense to me when we talk about confining a set number of Kerbals to a certain ship. But I'm really confused how the math works out when you start adding fresh Kerbals or new parts to the ship.

You have some good questions. Do the experiments and report back!

 

4 hours ago, jofwu said:

4) Lastly, a more specific question that I've had...

However, my Supplies are CONSTANTLY drained down to zero, and the USI-LS window always shows them with negative time remaining. If they EVA and come back in, it resets to 0. And if I go to another ship and come back it resets. But otherwise it just keeps counting down. And by my calculation the Fertilizer isn't being used up as fast as it should be. I checked the part.cfg and everything looks right... Am I just completely missing something? If it might be a bug, what do I post and where?

Yeah, all of that is still kinda buggy. Vessels do not handle docking and EVA very well, often the Kerbals munch away everything. The consumption catch-up happens after the production catch-up, so when during production the vessel gets full, it stops, then the kerbals munch everything away. Could you, however, check out what happens when you replace your USILifeSupport.dll with thise one: https://dl.dropboxusercontent.com/u/1414175/ksp/usi-ls/pr-87/USILifeSupport.dll? Don't forget to back up your save file and your old version of the DLL.

Check out these bug reports: #86 #73

If your bug is different from those, please create a new bug report. That sounds easier than it is though! You have to take some time and put some work into it.

- Reproduce the issue in stock
- Find the smalles vessels that produce the bug
- Reproduce the issue in a new savegame
- Find the smallest amount of steps to reproduce it
- provide all the necessary information

 

 

4 hours ago, PocketBrotector said:

@jofwu, those are all good questions - unfortunately I don't have any of the answers yet!

Multipler recyclers should be "cumulative," but I don't really know more about the details other than that the total recycle rate is capped by the best recycler. I'm not sure if everything is working as intended - see my issue report here. Until that is addressed I'm reluctant to venture a guess about expected behavior.

Your screenshot is from a disconnected base, and the disconnected mechanics work slightly differently. Could you try to reproduce your issue in one single vessel?

 

 

Link to comment
Share on other sites

On 28.2.2016 at 5:12 AM, Kaa253 said:

@Cawdeen & @mikegarrison reported recently some issues with crew transferring to different vessels, docking, etc. I left a lander (LEM) in orbit of minmus with no crew. When the next crew arrive to re-use the lander I am finding that they immediately consume all the supplies left on the lander and all the supplies in their own (CSM) vessel as well. It seems like LS is assuming that the crew have been in the lander vessel the whole time it was left in minmus orbit and now it does a catch up, resulting in sup: = -49 days.

@RoverDude, I have a lot of mods installed and the vessels are non stock but I have saved the quicksave and player.log if you want them.

On 28.2.2016 at 5:20 AM, mikegarrison said:

Interesting. It's clear that the LS clocks are based on the ship, not the kerbal. Also, there is always strange stock funkiness with unfocused ships that either consume or create resources.

If you have the right saves to try it, it would be interesting to see what would happen if you moved your focus to the empty ship when you were, say, a day out. Let it "catch up" to the main game clock. Then make your rendezvous and see if they only much down on a day's worth of supplies.

Okay, @Cawdeen @mikegarriso @Kaa253 it seems I have been able to create concise steps to reproduce either your issues, or something very similar to it:

https://github.com/BobPalmer/USI-LS/issues/89

 

Link to comment
Share on other sites

7 hours ago, Kobymaru said:

Okay, @Cawdeen @mikegarriso @Kaa253 it seems I have been able to create concise steps to reproduce either your issues, or something very similar to it:

https://github.com/BobPalmer/USI-LS/issues/89

 

I've made a change to have life support consumption calculated from the values stored per-kerbal instead of by values stored per-vessel. It's a pretty straight-forward change, but I'm still testing it (although it seems to work fine so far). See the branch here and the commit here. Feel free to compile it and help me test it out (just remember to back-up your save). :)

If I don't find any issues I'll put it into a pull request to see if RoverDude wants to incorporate it.

For those interested in implementation details: RoverDude already stores a "LastMeal" (timestamp) per-kerbal, but also stores a "lastUpdateTime" on each part with a life-support module. Actual consumption is currently keyed solely on the lastUpdateTime, so when vessels dock, kerbals are transferred, etc, there's room for weirdness. I changed the consumption to be calculated from the kerbals' LastMeal values.

Link to comment
Share on other sites

10 hours ago, nathan1 said:

I've made a change to have life support consumption calculated from the values stored per-kerbal instead of by values stored per-vessel. It's a pretty straight-forward change, but I'm still testing it (although it seems to work fine so far). See the branch here and the commit here. Feel free to compile it and help me test it out (just remember to back-up your save). :)

If I don't find any issues I'll put it into a pull request to see if RoverDude wants to incorporate it.

For those interested in implementation details: RoverDude already stores a "LastMeal" (timestamp) per-kerbal, but also stores a "lastUpdateTime" on each part with a life-support module. Actual consumption is currently keyed solely on the lastUpdateTime, so when vessels dock, kerbals are transferred, etc, there's room for weirdness. I changed the consumption to be calculated from the kerbals' LastMeal values.

Thanks a lot! I'm gonna check out the changes when I get home, and to some testing. A note though, RoverDude likes his changes against the DEVELOP branch for some reason (I gotta ask him why, some time...). Could you rebase it?

While we're at it, what if we compile a suite of tests ranging from something as easy as "timewarp focused vessel and check if consumption is correct" to all of the docking/undocking business?

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