Jump to content

[1.12.x] DeepFreeze (v0.31.0) 12th Sep 2021


JPLRepo

Recommended Posts

1 hour ago, DStaal said:

I figured it was something like that - but I wanted to bring it up, because it makes a big decision in ship design.  Under the old behavior, as long as you had generating capacity you didn't really need much in the way of EC storage capacity - it'd get gobbled up as it was generated.  Currently, generating capacity is mostly irrelevant - all you need is storage capacity.

I was bringing it up in the context of REKT, because they are still trying to tweak a cryofreeze escape pod, and the current design works under 1.1.3, but not under 1.2.x - and it would really unbalance the pod to include 2000+ EC: It's not supposed to be able to *unfreeze* a Kerbal on it's own, and the rest of the pods only have ~50 EC.  What was being looked at was some various one-time storage options or one-time generator options.  So if the old behavior could be restored, it can have the pattern of 'one-time high-flow generator, minimal storage and a trickle maintenance generator'.  So consider this a request for that.  (I can put the request someplace else if you'd like.)

Makes sense.  I do know that @JPLRepo is on vacation at the moment.  Maybe he will have input upon his return.

Link to comment
Share on other sites

 

On 12/30/2016 at 2:08 PM, DStaal said:

I figured it was something like that - but I wanted to bring it up, because it makes a big decision in ship design.  Under the old behavior, as long as you had generating capacity you didn't really need much in the way of EC storage capacity - it'd get gobbled up as it was generated.  Currently, generating capacity is mostly irrelevant - all you need is storage capacity.

I was bringing it up in the context of REKT, because they are still trying to tweak a cryofreeze escape pod, and the current design works under 1.1.3, but not under 1.2.x - and it would really unbalance the pod to include 2000+ EC: It's not supposed to be able to *unfreeze* a Kerbal on it's own, and the rest of the pods only have ~50 EC.  What was being looked at was some various one-time storage options or one-time generator options.  So if the old behavior could be restored, it can have the pattern of 'one-time high-flow generator, minimal storage and a trickle maintenance generator'.  So consider this a request for that.  (I can put the request someplace else if you'd like.)

On 12/30/2016 at 3:17 PM, Papa_Joe said:

Makes sense.  I do know that @JPLRepo is on vacation at the moment.  Maybe he will have input upon his return.

I'll look into it.

EDIT: I looked into this. It seemed unusual at the time that you said it would store up EC as it's produced... Because it doesn't.
As the OP says, you MUST have the EC of 3000 to freeze or thaw a kerbal. I went back to very early versions - it never has done what you suggest.
What it does do is consume EC per physics step of the amount defined in the part config by the field "ChargeRate". This is defined as 30 EC units for all the DeepFreeze parts by default (of course you can change it if you so desire). As long as your vessel is generating 30 units per physics frame then it will continue to consume 30 units until the 3000 is met.

Are you saying this is not working as described above?
If so, then it is not because of DeepFreeze but probably changes to the way resources are handled in stock from 1.2 onwards.

Link to comment
Share on other sites

  • 2 weeks later...

Hm... Just encountered the reported USI bug where the first thawed kerbal consumes all the supplies that he would have consumed during the time he was frozen, leaving nothing left. Luckily I had a quicksave from just before thawing, so I'll be able to continue with the mission once there's a fix released. Really appreciate all the work that's gone into this, and into keeping it updated and compatible with other stuff, though. It's definitely become a must-have mod for me.

Link to comment
Share on other sites

1 hour ago, billybob579 said:

Hm... Just encountered the reported USI bug where the first thawed kerbal consumes all the supplies that he would have consumed during the time he was frozen, leaving nothing left. Luckily I had a quicksave from just before thawing, so I'll be able to continue with the mission once there's a fix released. Really appreciate all the work that's gone into this, and into keeping it updated and compatible with other stuff, though. It's definitely become a must-have mod for me.

I don't recall saying there was a bug in DeepFreeze or a pending fix release for DeepFreeze?
Someone also reported a similar bug back in December. But no one has supplied me with their log files or raised a report on github so I have not looked at it.

I don't personally use USI LS, for some bizarre reason (see Sig), so until someone supplies information (logs) that can be used to determine there is actually a bug in DeepFreeze that needs fixing.... If that makes sense.

Link to comment
Share on other sites

1 hour ago, JPLRepo said:

I don't recall saying there was a bug in DeepFreeze or a pending fix release for DeepFreeze?
Someone also reported a similar bug back in December. But no one has supplied me with their log files or raised a report on github so I have not looked at it.

I don't personally use USI LS, for some bizarre reason (see Sig), so until someone supplies information (logs) that can be used to determine there is actually a bug in DeepFreeze that needs fixing.... If that makes sense.

My mistake, sorry. The post from December was the one I was referring to. I didn't realize they never gave enough information to warrant a follow-up. Here's my output log, and I just recreated the events at 12:55, so searching for that timestamp should put you at the relevant section. I can create a Github issue as well if you'd like, but I didn't know if that'd be redundant now that the subject's been raised here. Please let me know if there's any more information or experimentation you want in order to figure this out.

And if helpful, the sequence of events was: put kerbals in orbit; kerbals are consuming supplies; freeze kerbals; kerbals are no longer consuming supplies, it remains constant throughout voyage; thaw kerbals, supplies are rapidly drained to zero in a matter of seconds.

Link to comment
Share on other sites

21 hours ago, billybob579 said:

My mistake, sorry. The post from December was the one I was referring to. I didn't realize they never gave enough information to warrant a follow-up. Here's my output log, and I just recreated the events at 12:55, so searching for that timestamp should put you at the relevant section. I can create a Github issue as well if you'd like, but I didn't know if that'd be redundant now that the subject's been raised here. Please let me know if there's any more information or experimentation you want in order to figure this out.

And if helpful, the sequence of events was: put kerbals in orbit; kerbals are consuming supplies; freeze kerbals; kerbals are no longer consuming supplies, it remains constant throughout voyage; thaw kerbals, supplies are rapidly drained to zero in a matter of seconds.

Thanks. There's absolutely nothing in that log indicating a problem with DeepFreeze.
Does it occur if you only thaw ONE kerbal?
I guess I have to find the time to install USI LS in an install and actually test to see if it's a DeepFreeze problem or not.
What would speed that up greatly is if you could repeat what you just did but turn DeepFreeze Debug logging ON in the settings menu before you freeze/thaw them.
Would give me more info.

EDIT: I just tried this with USI LS v0.5.16.0 and DeepFreeze v0.23.2.

Vessel with two kerbals and a 2.5M life support container. Put into orbit..Froze kerbals. timewarped off 300 days.
Thawed kerbals. No such issue....
So anyone having this issue, I will require a KSP Log with DeepFreeze Debug logging switched ON and steps to reproduce, save files even would help.

 

EDIT/UPDATE #2:
Ok, I have reproduced the problem. but it does different things for me. It seems to be when you freeze ALL kerbals on a vessel with USI LS installed.
I've raised a inter-operability issue on the USI-LS repro as this is not a DeepFreeze issue that can be fixed from the DeepFreeze side.
https://github.com/BobPalmer/USI-LS/issues/200

And I posted on the USI LS thread:

 

Link to comment
Share on other sites

Your best bet is going to be to track the Kerbal before unfreezing them (there's a public method for this) which will allow you to set things like their hab, last meal, etc. to the appropriate time.  This is something normally taken care of on launch (since on Kerbin your're immune to life support penalties, it gives it time to initialize the system).  

Link to comment
Share on other sites

5 hours ago, RoverDude said:

Your best bet is going to be to track the Kerbal before unfreezing them (there's a public method for this) which will allow you to set things like their hab, last meal, etc. to the appropriate time.  This is something normally taken care of on launch (since on Kerbin your're immune to life support penalties, it gives it time to initialize the system).  

That's a bit of work as I'd rather not have a hard reference and to achieve this would require me to create a reflection class.
I'll dig around see if I can figure out what's going on and find the easiest solution whether it's DeepFreeze or USI LS.

EDIT: I have found the issue it's in regards to how USI LS tracks vessels.
I have figured out a work-around from the DeepFreeze side so I am just testing that and will do a point release in the next few hours.

 

EDIT#2: Yeah so my work-around just won't work. Neither with RD's suggestion simply because there is a bug in USI LS.
Submitted PR to USI LS to fix bug.
https://github.com/BobPalmer/USI-LS/issues/200

Link to comment
Share on other sites

  • 3 weeks later...

@JPLRepo Would you consider adding a DF option to use stock time warp system? For example, like stock drills work, don't try to play catch up when switching back to a vessel that hasn't been the active vessel for a long time.

I'm not really interested in a background processing mod. I would like to use the harder settings of DF, but as they are now they're too inconsistent and DF will sometimes "unfairly" kill of Kerbals :)

Thanks for the great mods!

Link to comment
Share on other sites

On 2/3/2017 at 4:09 AM, MalevolentNinja said:

@JPLRepo Would you consider adding a DF option to use stock time warp system? For example, like stock drills work, don't try to play catch up when switching back to a vessel that hasn't been the active vessel for a long time.

Huh?  Stock drills *do* try to play catch up when switching back to a vessel that hasn't been the active vessel for a long time, in 6 hour increments.  If you have a drill and converter running, with enough Ore tank space for 6 hours worth of Ore production, then when you switch back to it after 100 days, you'll receive 100 days worth of converted fuel.

Link to comment
Share on other sites

1 hour ago, hab136 said:

Huh?  Stock drills *do* try to play catch up when switching back to a vessel that hasn't been the active vessel for a long time, in 6 hour increments.  If you have a drill and converter running, with enough Ore tank space for 6 hours worth of Ore production, then when you switch back to it after 100 days, you'll receive 100 days worth of converted fuel.

Yes, but they don't try to calculate all the EC they would have used and all the heat they would have produced and then apply it all to the vessel at once. That was my point.

 

Link to comment
Share on other sites

  • 2 weeks later...
On 18.1.2017 at 1:43 AM, CrushedIce said:

Is it possible to freeze Tourists? They seem to don't show up in the freeze menu. Would be quite useful for long contracts :)

I have the same problem. I have 7 tourists that would like to see an asteroid up close, and one guy who would like to see all the moons of a gas giant... To keep these guys alive would need an insane amount of supplies.

I did some googling and noticed that @JPLRepo was considering adding that possibility, but that conversation never got very far. I'd be really happy if that possibility was added. Rather sooner than later, as my first launch window is in 3 game days :wink:

Edited by Luovahulluus
Link to comment
Share on other sites

V0.23.3.0 published.
Fix Kerbalism Integration.
Freeze Tourists!
DeepFreeze stock application button is not shown in flight unless the active vessel has a DeepFreezer part.
Fixed log spam when RPM occlusion fails.
Work-around for integration issue/bug in USI LS.

I only did basic functionality testing. So if anyone finds anything please report it here.

Link to comment
Share on other sites

  • 2 weeks later...

I'm trying to build support for DeepFreeze into Kerbal Health, but I encountered an issue with the wrapper class. I use this code in FixedUpdate to check if kerbal with Name is frozen:

if (DFWrapper.APIReady && DFWrapper.DeepFreezeAPI.FrozenKerbals.ContainsKey(Name)) { /* kerbal is frozen action */ }
else { /* kerbal is not frozen */ }

However, after I freeze a kerbal, DFWrapper.DeepFreezeAPI.FrozenKerbals still contains 0 elements. I have called DFWrapper.InitDFWrapper() and this behaviour doesn't change if I wait some time after freezing.

Was there any change in API or am I doing anything wrong?

Edited by garwel
Link to comment
Share on other sites

7 hours ago, garwel said:

@JPLRepo Can you look at the question above when you have a chance?

Hey. Sorry missed your question.
Yeah - Reflection of Dictionaries across binaries in the KSP Unity environment is a bit flakey.
So what you can use is the FrozenKerbalsList instead of the Dictionary.
Grab a new copy of the wrapper here:
https://github.com/JPLRepo/DeepFreeze/blob/master/Source/APIs/DFWrapper.cs

Link to comment
Share on other sites

12 hours ago, JPLRepo said:

Hey. Sorry missed your question.
Yeah - Reflection of Dictionaries across binaries in the KSP Unity environment is a bit flakey.
So what you can use is the FrozenKerbalsList instead of the Dictionary.
Grab a new copy of the wrapper here:
https://github.com/JPLRepo/DeepFreeze/blob/master/Source/APIs/DFWrapper.cs

Thanks, will try it.

Link to comment
Share on other sites

On 3/8/2017 at 10:13 PM, JPLRepo said:

Hey. Sorry missed your question.
Yeah - Reflection of Dictionaries across binaries in the KSP Unity environment is a bit flakey.
So what you can use is the FrozenKerbalsList instead of the Dictionary.
Grab a new copy of the wrapper here:
https://github.com/JPLRepo/DeepFreeze/blob/master/Source/APIs/DFWrapper.cs

I tried using FrozenKerbalsList, but when I try to access it I get this:

InvalidCastException: Cannot cast from source type to destination type.
  at KerbalHealth.DFWrapper+DFAPI.get_FrozenKerbalsList () [0x00000] in <filename unknown>:0 
  at KerbalHealth.Core.IsKerbalFrozen (System.String name) [0x00000] in <filename unknown>:0 
  at KerbalHealth.KerbalHealthList.Update (Double interval) [0x00000] in <filename unknown>:0 
  at KerbalHealth.KerbalHealthScenario.UpdateKerbals (Boolean forced) [0x00000] in <filename unknown>:0 
  at KerbalHealth.KerbalHealthScenario.FixedUpdate () [0x00000] in <filename unknown>:0 

It happens in this expression:

foreach (KeyValuePair<string, DFWrapper.KerbalInfo> el in DFWrapper.DeepFreezeAPI.FrozenKerbalsList) { ... }

I can only assume that the reason is that FrozenKerbalsListMethod.Invoke(actualDFAPI, null) in FrozenKerbalsList property doesn't return List<KeyValuePair<string, KerbalInfo>>. But I have no idea why.

UPD: Logged the issue on Github.

Edited by garwel
Link to comment
Share on other sites

So I just ran into the funniest bug ever and didn't notice it earlier as every time I transferd the kerbals to their assigned modules, except this time, lol

Rasie is on the ship as I just thawed her after an interplanetart trip:
Nq7veOt.png

Switching over to the outpost and Rasie shows up?
3c189T2.png

Thinking to be funny and EVA her, she falls out of the ship:
Mm8dYXB.png

This is why I didn't get the Deep Freeze icon in the list onload (restarted) and only after hopping back and forth it appeared again.
This must be linked to what ever is happening with the game thinking the cryo pod is some where else.

Prolly a nullref in there related to some visual mod and I should really update IR, though when that works correctly is nearly a miracle already :D
output_log

Link to comment
Share on other sites

Thanks for the nice mod.

I have a slight problem: often (but apparently not systematically), I'm losing my frozen kerbals. They still appear in the DF window but without an associated vessel listed.

This seem to happen when I load/quickload.

I got such logs:

[LOG 10:17:35.831] 3/19/2017 10:17:35 AM,DeepFreeze,Found orphaned Frozen Kerbal Entry in Database for Cristine Kerman Deleting entry

Then a bit later:

[LOG 10:17:47.406] [KerbalStats] saving ext for Cristine Kerman
[LOG 10:17:47.406]     from kerbals
[LOG 10:17:47.936] Game State Saved as persistent
[LOG 10:17:47.936] QuickStart(QPersistent)[2.13]: OnFlightReady bfc3922f-c018-4283-a7c0-d80169bf0a7e
[LOG 10:17:48.475] Unpacking tellubase-core
[LOG 10:17:54.408] 3/19/2017 10:17:54 AM,DeepFreeze,FixedUpdate failed to update DeepFreeze Internal Vessel Memory
[LOG 10:17:54.408] 3/19/2017 10:17:54 AM,DeepFreeze,Err: System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[System.Collections.Generic.KeyValuePair`2[System.UInt32,DF.PartInfo]].get_Item (Int32 index) [0x00000] in <filename unk
nown>:0 
  at DF.DFIntMemory.UpdatePredictedVesselEC (DF.VesselInfo vesselInfo, .Vessel vessel, Double currentTime) [0x00000] in <filename unknown>:0 
  at DF.DFIntMemory.CheckVslUpdate () [0x00000] in <filename unknown>:0 
  at DF.DFIntMemory.FixedUpdate () [0x00000] in <filename unknown>:0 

The code is a bit hard to follow, but could it be simply: in DFIntMemory.cs line 930, DpFrzrActVsl.Count vs DpFrzrVsl.Count ?

Though I'm not sure, since there seems to already be some "orphaning" problem happening before.

I noticed there are a few waits (4, 5, or 6 seconds). Could it be that my heavily modded game / slow PC makes them inadequate ?

 

Edit: maybe the problem is not at load time, because in the save, I have KerbalInfo entries for my frozen kerbal, but no VesselInfo nor PartInfo.

Edited by TauPhraim
Link to comment
Share on other sites

On 3/19/2017 at 10:23 PM, TauPhraim said:

Thanks for the nice mod.

I have a slight problem: often (but apparently not systematically), I'm losing my frozen kerbals. They still appear in the DF window but without an associated vessel listed.

This seem to happen when I load/quickload.

I got such logs:


[LOG 10:17:35.831] 3/19/2017 10:17:35 AM,DeepFreeze,Found orphaned Frozen Kerbal Entry in Database for Cristine Kerman Deleting entry

Then a bit later:


[LOG 10:17:47.406] [KerbalStats] saving ext for Cristine Kerman
[LOG 10:17:47.406]     from kerbals
[LOG 10:17:47.936] Game State Saved as persistent
[LOG 10:17:47.936] QuickStart(QPersistent)[2.13]: OnFlightReady bfc3922f-c018-4283-a7c0-d80169bf0a7e
[LOG 10:17:48.475] Unpacking tellubase-core
[LOG 10:17:54.408] 3/19/2017 10:17:54 AM,DeepFreeze,FixedUpdate failed to update DeepFreeze Internal Vessel Memory
[LOG 10:17:54.408] 3/19/2017 10:17:54 AM,DeepFreeze,Err: System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[System.Collections.Generic.KeyValuePair`2[System.UInt32,DF.PartInfo]].get_Item (Int32 index) [0x00000] in <filename unk
nown>:0 
  at DF.DFIntMemory.UpdatePredictedVesselEC (DF.VesselInfo vesselInfo, .Vessel vessel, Double currentTime) [0x00000] in <filename unknown>:0 
  at DF.DFIntMemory.CheckVslUpdate () [0x00000] in <filename unknown>:0 
  at DF.DFIntMemory.FixedUpdate () [0x00000] in <filename unknown>:0 

The code is a bit hard to follow, but could it be simply: in DFIntMemory.cs line 930, DpFrzrActVsl.Count vs DpFrzrVsl.Count ?

Though I'm not sure, since there seems to already be some "orphaning" problem happening before.

I noticed there are a few waits (4, 5, or 6 seconds). Could it be that my heavily modded game / slow PC makes them inadequate ?

 

Edit: maybe the problem is not at load time, because in the save, I have KerbalInfo entries for my frozen kerbal, but no VesselInfo nor PartInfo.

Sounds like your save is the problem. How it has frozen kerbal entries and no vessel entries is a mystery.
Can you supply your save file?
Can you reproduce the problem at all?

On 3/12/2017 at 4:04 AM, Kamuchi said:

So I just ran into the funniest bug ever and didn't notice it earlier as every time I transferd the kerbals to their assigned modules, except this time, lol

Rasie is on the ship as I just thawed her after an interplanetart trip:
 

Switching over to the outpost and Rasie shows up?
 

Thinking to be funny and EVA her, she falls out of the ship:
 

This is why I didn't get the Deep Freeze icon in the list onload (restarted) and only after hopping back and forth it appeared again.
This must be linked to what ever is happening with the game thinking the cryo pod is some where else.

Prolly a nullref in there related to some visual mod and I should really update IR, though when that works correctly is nearly a miracle already :D
output_log

Can you supply a save file please? although with that long list of mods.. may be difficult for me to get any idea what is going on here.

Link to comment
Share on other sites

7 hours ago, JPLRepo said:

Can you supply a save file please? although with that long list of mods.. may be difficult for me to get any idea what is going on here.

I actually supplied a fix :) No hurry for me, since I now run on my own version, but if I understood the issue completely, it must also be impacting a lot of other users.

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