Jump to content

[1.12.x] USI Life Support


RoverDude

Recommended Posts

My guess (without looking at the log file) is that what's happened is that USI LS has attached modules to all your existing ships to track things, and now KSP doesn't know what to do with those modules.  Two options (assuming you want to keep this save), if that's the case:

  • Go through and carefully edit the persistence file to remove the USI-LS modules.  Dangerous if you make a mistake, but the cleaner option in the long run.
  • Reinstall USI-LS and disable it.  (By disabling all of it's effects.)  It's a bit less clean in that you're keeping the module around, but it's safer and easier.
Link to comment
Share on other sites

17 hours ago, DStaal said:

My guess (without looking at the log file) is that what's happened is that USI LS has attached modules to all your existing ships to track things, and now KSP doesn't know what to do with those modules.  Two options (assuming you want to keep this save), if that's the case:

  • Go through and carefully edit the persistence file to remove the USI-LS modules.  Dangerous if you make a mistake, but the cleaner option in the long run.
  • Reinstall USI-LS and disable it.  (By disabling all of it's effects.)  It's a bit less clean in that you're keeping the module around, but it's safer and easier.

When you say "remove the USI-LS modules" - exactly what does that entail? I have no idea what I'm doing in there, but I'm familiar enough with editing documents I couldn't write myself (I edit Wordpress themes regularly with direction, without knowing PHP). What would I be looking for? All instances of Supplies, and Mulch? I never brought any of them with me ever, becuase I didn't know the mod was installed.

What am I looking for to edit?

 

 -- When I add USI LS back into the game (reinstall), the NREs persist. This might suggest that this mod isn't causing it... in which case I'm really stumped. The message gives no clue to what is causing the problem. 

Spoiler

NullReferenceException: Object reference not set to an instance of an object
  at Vessel.GetUnloadedVesselMass () [0x00000] in <filename unknown>:0
  at Vessel.GetTotalMass () [0x00000] in <filename unknown>:0
  at Vessel.CalculatePhysicsStats () [0x00000] in <filename unknown>:0
  at Vessel.FixedUpdate () [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

 

Link to comment
Share on other sites

Does the current 1.1.3 also work in backward compatibility with 1.1-1.1.1? I have 1 of those two version (don't know which),I would like not to have uninstall my game to update, yet I really want to try this mod. Also, do I need the other mods in this collection for it to run properly? Or can I just use it with stock?

Thanks!

Edited by nascarlaser1
Link to comment
Share on other sites

1 hour ago, nascarlaser1 said:

Does the current 1.1.3 also work in backward compatibility with 1.1-1.1.1? I have 1 of those two version (don't know which),I would like not to have uninstall my game to update, yet I really want to try this mod. Also, do I need the other mods in this collection for it to run properly? Or can I just use it with stock?

Thanks!

It might, but personally I wouldn't risk it.  Go to the releases page and scroll down a bit to find an older version - v0.4.2.0 appears to be the most recent that was released specifically for 1.1.x.

This mod can be used with just stock.  UKS and MKS-Lite have some nice parts to work with it, but aren't needed.  (There are also quite a few different parts packs that have some level of integration - anywhere from Greenhouses specifically designed for USI-LS, to adding in a bit of habitation.)

Link to comment
Share on other sites

5 hours ago, cantab said:

Question, is USI-LS planned to have a save-breaking update like UKS is?

Well... yes and no :P

The parts are changing (rebalance, and new capabilities) but I gave them all new names so old stuff if you choose to keep it, will not break.

Edited by RoverDude
Link to comment
Share on other sites

9 minutes ago, LordAssault said:

Will this words come true now? :D

:D I think the point really was that USI-LS ties into something Harvester said was a guideline - which was something like "no failure after the few minutes should be unrecoverable". The point being, even running out of fuel in Eeloo orbit can be saved with a sufficiently insane rescue mission, if you had the inclination to do that.

A "realistic" life support system would presumably punish you fatally with running out of supplies, whereas USI-LS (by default) does not. There's no coming back from that, and with the distances and timescales involved, this would usually work out as a loss of mission, regardless of how many hours you put into it. You can take exception with that concept (and alter it through mods or configuration files), but that does seem to be the core of many of the decisions in the stock game.

The other interpretation is in defining what "stock-like" means for KSP. I'm usually of the opinion that "stock-like" means that you still have to deal with all the same problems as in the real world, but perhaps these are abstracted or glossed over. Ion engines are sufficiently low power/high efficiency to get the point across, without requiring you to run your machine continuously for months to make use of them.

What I really appreciate from USI-LS are the habitation mechanics. Managing supplies are one thing, but ensuring that Kerbals have enough living space for transit forces you to solve a number of real-life problems with designing Duna/Mars architecture, etc.

Link to comment
Share on other sites

And you get radiation soon... plus permanent habitation (so Kerbals born on Duna are homesick for Duna...), and ways to expand your habitation timer without building a new ship.  Tho some of these will be reliant on my other mods, the hooks will be there.

Link to comment
Share on other sites

Including gravity (or centrifuges where appropriate) either into the habitation modifier, or perhaps also LS (there are certainly health benefits vs microgravity) has an added gameplay bonus of providing a rationale for planetary vs station habitation. Free gravity, which is a health and quality of life multiplier.

Link to comment
Share on other sites

1 minute ago, String Witch said:

How does homesickness work?

Kerbals have a clock, based on the best vessel they've ever been in, and this can never be restored (only extended by moving into a nicer ship).

If you had two Mk1 command pods far enough apart, if you moved a kerbal from one to the other their Hab time would reset to 30 days, but the Home time would remain at 30 days minus current mission elapsed time.

The consequences are whatever you set them to be, but they turn into a tourist by default.

Link to comment
Share on other sites

3 minutes ago, Domfluff said:

Kerbals have a clock, based on the best vessel they've ever been in, and this can never be restored (only extended by moving into a nicer ship).

If you had two Mk1 command pods far enough apart, if you moved a kerbal from one to the other their Hab time would reset to 30 days, but the Home time would remain at 30 days minus current mission elapsed time.

The consequences are whatever you set them to be, but they turn into a tourist by default.

Okay, and the comments on the settings suggest increasing hab time is based on having spare unoccupied crew capacity. Right?

Link to comment
Share on other sites

Yup, each seat is 30 days per kerbal, so a four kerbal capsule with two crew = 120 days/2 = 60 days hab time (and home time).

Some craft (dedicated hab modules, like the stock Hitchhiker pod) also add bonus months on top of that.

Some parts (dedicated quality-of-life parts, like the stock Cupola module) then add a multiplier on top of that.

All of the above are visible in the VAB.

Link to comment
Share on other sites

1 minute ago, String Witch said:

Okay, and the comments on the settings suggest increasing hab time is based on having spare unoccupied crew capacity. Right?

Yep - as a base.  Specific parts can give extra time above that, or multiply the hab time for the entire ship by some increment.

Link to comment
Share on other sites

  • 2 weeks later...

How is US ILS adding/subtracting supplies from ships that are not focused?  I'm trying to do something similar with Civilian Population, but for the life of me, I can't figure out how you're doing it.  Going through the API, it looks like the ProtoPartResourceSnapshots properties are read only while the resourceRef field is not active when the part is not loaded.  I can't find the appropriate file/section where that is being taken care of in your mod to see how you're getting around that.

Thank you!

Link to comment
Share on other sites

Thank you for the quick reply.  Now that you mention it, it makes sense that stock ISRU/mining would operate in the same way (why re-invent the wheel if you're the one who invented it to start with).  But I don't understand how stock does it, either.

Jumping into your code a little more, it looks like the ModuleLifeSupport class executes a supplyRecipe that you generated inside the class (instead of within a part's .cfg file).  This is presumably why you don't need to use Part.RequestResource(string resourceName, float demand).  Is that correct?

However, I would expect that to only run if the part is on the active vessel; parts (and therefore part modules) are not active for inactive vessels.

My hunch is that you are using the LifeSupportPersistance class to somehow store data between saves, and manipulating that data (which includes supplies info) while the crafts are unloaded.  Then when the player loads a previously unloaded craft, you have some code somewhere that reconciles the craft's on-board resources with those in your class.  Would that be right?

Link to comment
Share on other sites

2 hours ago, Tralfagar said:

Thank you for the quick reply.  Now that you mention it, it makes sense that stock ISRU/mining would operate in the same way (why re-invent the wheel if you're the one who invented it to start with).  But I don't understand how stock does it, either.

Jumping into your code a little more, it looks like the ModuleLifeSupport class executes a supplyRecipe that you generated inside the class (instead of within a part's .cfg file).  This is presumably why you don't need to use Part.RequestResource(string resourceName, float demand).  Is that correct?

However, I would expect that to only run if the part is on the active vessel; parts (and therefore part modules) are not active for inactive vessels.

My hunch is that you are using the LifeSupportPersistance class to somehow store data between saves, and manipulating that data (which includes supplies info) while the crafts are unloaded.  Then when the player loads a previously unloaded craft, you have some code somewhere that reconciles the craft's on-board resources with those in your class.  Would that be right?

The stock mechanic here has been discussed a few times - What it apparently does is once the ship is loaded it works out how long it's been since the last time the ship was loaded, breaks that into 6-hour chunks, and runs those chunks once every few frames until the ship is back to caught up.   All this is stock, and USI-LS just piggybacks off of it.

Link to comment
Share on other sites

@DStaal Wow all that's stock?  I've been "manually" editing the resource amounts using Part.RequestResource(string resourceName, float demand).  Do you know which class that is in and/or some keywords/what it's called so I can look it up?

Edited by Tralfagar
Link to comment
Share on other sites

On 19 August 2016 at 8:02 AM, Merkov said:

When you say "it still says crp is 1.1.2" do you mean KSP-AVC is telling you it is out of date? Can you confirm you have CRP version 0.5.4? The latest release of CRP is here and the associated .version file should properly flag it as for KSP 1.1.3.

Yeah, ksp avc was telling me its out of date, and says opt is also out of date, but if i removed usi-ls both warnings stopped. Reinstalled and they started again. Really weird

Link to comment
Share on other sites

  • 2 weeks later...

So I accidentally forgot to have my greenhouse active on my ship during a transfer to Duna, and now my Kerbals are stuck in tourist mode, even after I remembered to turn my greenhouse on. Is this supposed to happen? If so, how do I fix it?

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