Jump to content

[1.12.x] PlanetInfoPlus v1.4.3: Better info in the planetarium, with configurable display.


Snark

Recommended Posts

Hi,
I finally got some time to get back to playing a bit of KSP and try out the PlanetInfoPlus functionality, and I love it! And having all this info in the Map view, not just the Tracking Station, is the icing on the cake! Thanks Snark!

I did notice a small bug, though. The Near Space Alt. entry is specified in meters, but the units are written as "km". It's no biggie, as anyone paying a little attention (or none at all) will probably just interpret it correctly without even noticing, but I'm just mentioning it in case you want to fix that in a possible future release (but most probably not worth a release just for this, heh). I also took a quick look at the .cfg files in the PIP mod folder, but didn't see anywhere I could (or knew how to) apply a quick workaround...

Again, thank you very much for a really useful mod! Cheers!

Link to comment
Share on other sites

  • 1 month later...

@Snark

Just tried starting a new Sandbox game using New Horizons, getting the following error:

Spoiler
166125 [PlanetInfoPlus] App activated for Kerbin 
166128 Exception handling event onPlanetariumTargetChange in class KnowledgeBase:System.NullReferenceException: Object reference not set to an instance of an object
166129   at PlanetInfoPlus.ExplorationProgress+<>c.<.cctor>b__23_9 (KSPAchievements.CelestialBodySubtree a) [0x00000] in <8c582eff09e948b699e4e53232ab4524>:0 
166130   at PlanetInfoPlus.ExplorationProgress.For (CelestialBody body) [0x00020] in <8c582eff09e948b699e4e53232ab4524>:0 
166131   at PlanetInfoPlus.CelestialBodyExtensions.ExplorationDescription (CelestialBody body) [0x00000] in <8c582eff09e948b699e4e53232ab4524>:0 
166132   at PlanetInfoPlus.PlanetInfoPlus.CreateParam_Exploration (KSP.UI.Screens.KbApp_PlanetParameters app) [0x00000] in <8c582eff09e948b699e4e53232ab4524>:0 
166133   at PlanetInfoPlus.PlanetInfoPlus.CreateGameplayCharacteristics (KSP.UI.Screens.KbApp_PlanetParameters app) [0x000b3] in <8c582eff09e948b699e4e53232ab4524>:0 
166134   at PlanetInfoPlus.PlanetInfoPlus.OnAppActivated (KSP.UI.Screens.KbApp_PlanetParameters app, MapObject target) [0x00139] in <8c582eff09e948b699e4e53232ab4524>:0 
166135   at KSP.UI.Screens.KbApp_PlanetParameters.ActivateApp (MapObject target) [0x00172] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0 
166136   at KSP.UI.Screens.KnowledgeBase.ActivateApps (KSP.UI.Screens.KnowledgeBase+KbTargetType targetType, MapObject target) [0x000fa] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0 
166137   at KSP.UI.Screens.KnowledgeBase.OnMapFocusChange (MapObject target) [0x000f4] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0 
166138   at EventData`1[T].Fire (T data) [0x000b0] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0  
166141 Uploading Crash Report
166142 NullReferenceException: Object reference not set to an instance of an object
166143   at PlanetInfoPlus.ExplorationProgress+<>c.<.cctor>b__23_9 (KSPAchievements.CelestialBodySubtree a) [0x00000] in <8c582eff09e948b699e4e53232ab4524>:0 
166144   at PlanetInfoPlus.ExplorationProgress.For (CelestialBody body) [0x00020] in <8c582eff09e948b699e4e53232ab4524>:0 
166145   at PlanetInfoPlus.CelestialBodyExtensions.ExplorationDescription (CelestialBody body) [0x00000] in <8c582eff09e948b699e4e53232ab4524>:0 
166146   at PlanetInfoPlus.PlanetInfoPlus.CreateParam_Exploration (KSP.UI.Screens.KbApp_PlanetParameters app) [0x00000] in <8c582eff09e948b699e4e53232ab4524>:0 
166147   at PlanetInfoPlus.PlanetInfoPlus.CreateGameplayCharacteristics (KSP.UI.Screens.KbApp_PlanetParameters app) [0x000b3] in <8c582eff09e948b699e4e53232ab4524>:0 
166148   at PlanetInfoPlus.PlanetInfoPlus.OnAppActivated (KSP.UI.Screens.KbApp_PlanetParameters app, MapObject target) [0x00139] in <8c582eff09e948b699e4e53232ab4524>:0 
166149   at KSP.UI.Screens.KbApp_PlanetParameters.ActivateApp (MapObject target) [0x00172] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0 
166150   at KSP.UI.Screens.KnowledgeBase.ActivateApps (KSP.UI.Screens.KnowledgeBase+KbTargetType targetType, MapObject target) [0x000fa] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0 
166151   at KSP.UI.Screens.KnowledgeBase.OnMapFocusChange (MapObject target) [0x000f4] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0 
166152   at EventData`1[T].Fire (T data) [0x000b0] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0 

 

Full logs, including Player.log, KSP.log, all files in the Logs directory and the ModuleManager.configcache  available here: https://www.dropbox.com/s/woqg1tzone1x55k/PlanetInfo_NH_Logs.zip?dl=0

 

Edit:  Uploaded bug report generated by KSP Bug Report mod, here:  https://oshi.at/Qwvv/KSPBugReport_2022-06-28_133214.zip

 

Edited by linuxgurugamer
Link to comment
Share on other sites

6 hours ago, linuxgurugamer said:

Just tried starting a new Sandbox game using New Horizons, getting the following error:

Thanks for the report!  I'll have a look as soon as I get a chance.

It's kind of interesting that you're hitting the error with New Horizons... because it was starting a New Horizons KSP game that prompted me to write PlanetInfoPlus in the first place.  ;)

So clearly it basically works with New Horizons itself-- at least, when I was playing, I didn't run into any such error.  I wonder if it has to do with your playing a sandbox game (which I didn't test as much, since my own gameplay is generally all career mode).  I'll see if I can reproduce this.

Link to comment
Share on other sites

15 minutes ago, Snark said:

Thanks for the report!  I'll have a look as soon as I get a chance.

It's kind of interesting that you're hitting the error with New Horizons... because it was starting a New Horizons KSP game that prompted me to write PlanetInfoPlus in the first place.  ;)

So clearly it basically works with New Horizons itself-- at least, when I was playing, I didn't run into any such error.  I wonder if it has to do with your playing a sandbox game (which I didn't test as much, since my own gameplay is generally all career mode).  I'll see if I can reproduce this.

I tested in both sandbox and career, same problem

Link to comment
Share on other sites

49 minutes ago, linuxgurugamer said:

I tested in both sandbox and career, same problem

That's... really odd. I wrote PIP and then used it for a couple of months while playing a New Horizons career game, with nary a problem. I'll need to dig into this.

Link to comment
Share on other sites

Hi all,

I've released PlanetInfoPlus 1.4.2, which includes the following bug fixes:

  • Now correctly says "meters" instead of "kilometers" for near space height.  (Thanks to @alartor for the bug report.)
  • No longer gets NullReferenceException when used in a new game.  :blush:  (Thanks to @linuxgurugamer for the bug report.)

 

(For the curious:  The reason LGG was seeing this bug and I wasn't, was that it's a thing that happens when you've started a new game and haven't explored much, yet.  There are some data structures that aren't actually initialized yet and are null.  I never noticed it because even though I was running the same solar system mod as LGG, I had already been playing for a bit when I wrote & installed PlanetInfoPlus, so I never experienced "run the mod from the very start of a new game".  Live and learn, I suppose!)

Link to comment
Share on other sites

  • 3 months later...
On 6/28/2022 at 5:47 PM, Snark said:

Hi all,

I've released PlanetInfoPlus 1.4.2, which includes the following bug fixes:

  • Now correctly says "meters" instead of "kilometers" for near space height.  (Thanks to @alartor for the bug report.)
  • No longer gets NullReferenceException when used in a new game.  :blush:  (Thanks to @linuxgurugamer for the bug report.)

 

(For the curious:  The reason LGG was seeing this bug and I wasn't, was that it's a thing that happens when you've started a new game and haven't explored much, yet.  There are some data structures that aren't actually initialized yet and are null.  I never noticed it because even though I was running the same solar system mod as LGG, I had already been playing for a bit when I wrote & installed PlanetInfoPlus, so I never experienced "run the mod from the very start of a new game".  Live and learn, I suppose!)

Hi Snark - first off, this is a wonderful mod that I love very much. I'd like to respectfully request if it's possible, (and if you have time and motivation) can you please add "Distance" (i.e. Semi-major axis) to the list?

Also, would it be possible to display the orbital period in days? The default in KSP is to display the orbital period in the most convenient unit - Kerbin shows as "1y", for example. Which works great in most cases unless one is playing in another scale, and one doesn't know (and is trying to find out) the year length in days at that scale.

If you have no desire to, that's cool, and I respect that. I just figured it definitely ain't happening if I don't ask. ;-)

Link to comment
Share on other sites

Great, glad you like it!  :)

1 hour ago, panarchist said:

I'd like to respectfully request if it's possible, (and if you have time and motivation) can you please add "Distance" (i.e. Semi-major axis) to the list?

That's not a bad idea.  No promises, but I'll have a look-- thanks for the suggestions!  :)

1 hour ago, panarchist said:

Also, would it be possible to display the orbital period in days? The default in KSP is to display the orbital period in the most convenient unit - Kerbin shows as "1y", for example. Which works great in most cases unless one is playing in another scale, and one doesn't know (and is trying to find out) the year length in days at that scale.

Hm.  That one's a bit niche (would involve a fair amount of special-casing of how things are displayed).  I'll give some thought as to whether there's some reasonable way to support it via config or something.  There's already a config setting that decides how much precision is displayed (e.g. "years / days / hours" versus just "years / days" or what-have-you), so there's that.  But having it show "just days" instead of "years and days" is a bit different.  Need to think on this one a bit.

Link to comment
Share on other sites

55 minutes ago, Snark said:

Great, glad you like it!  :)

That's not a bad idea.  No promises, but I'll have a look-- thanks for the suggestions!  :)

Hm.  That one's a bit niche (would involve a fair amount of special-casing of how things are displayed).  I'll give some thought as to whether there's some reasonable way to support it via config or something.  There's already a config setting that decides how much precision is displayed (e.g. "years / days / hours" versus just "years / days" or what-have-you), so there's that.  But having it show "just days" instead of "years and days" is a bit different.  Need to think on this one a bit.

Cool, thanks!

I looked briefly at your code, (I can read code ok, I just suck at writing it) and you're already pulling SMA in CelestialBodyExtensions.cs (line 49), so hopefully it's not difficult to add that as an optional display item.

If you can't do the other, that's ok - having the SMA would let me calculate the orbital period.

Link to comment
Share on other sites

  • 3 weeks later...

If I wanted to create a geosynchronous comnet, is there a way to calculate a specific apoapsis and periapsis (depending on the number of satellites launched into orbit) so that I can evenly space out my satellites in geosync orbit? I know this was a lot but I would use Resonant Orbit Calculator for this but it doesn’t work with rescale mods. 

Link to comment
Share on other sites

  • 1 month later...

can someone help reproduce this since I'm not sure if this mod cause it? If you have Kcalbeloh System Planet Pack + planetinfoplus +eve + scatterer  at the same  time, the ram usage would spike to from 4 gb (without planetinfoplus) to 12 gb if you load save 2nd time or go into flight view then back into space center view, and also loading time would be significantly increased.

Edited by ssd21345
Link to comment
Share on other sites

2 hours ago, ssd21345 said:

can someone help reproduce this since I'm not sure if this mod cause it? If you have Kcalbeloh System Planet Pack + planetinfoplus +eve + scatterer  at the same  time, the ram usage would spike to from 4 gb (without planetinfoplus) to 12 gb if you load save 2nd time or go into flight view then back into space center view, and also loading time would be significantly increased.

I've also had a major increase in RAM usage and the other things you mention, such as very long loading time, when using this (great) mod.

Was using opm, mpe as planet packs. Also eve.

Link to comment
Share on other sites

8 hours ago, ssd21345 said:

can someone help reproduce this since I'm not sure if this mod cause it? If you have Kcalbeloh System Planet Pack + planetinfoplus +eve + scatterer  at the same  time, the ram usage would spike to from 4 gb (without planetinfoplus) to 12 gb if you load save 2nd time or go into flight view then back into space center view, and also loading time would be significantly increased.

6 hours ago, modus said:

I've also had a major increase in RAM usage and the other things you mention, such as very long loading time, when using this (great) mod.

Was using opm, mpe as planet packs. Also eve.

Did you see anything interesting in your KSP log file?   For example, a long series of a bajillion error messages, or something. 

Of particular interest is any spew from PlanetInfoPlus itself.  (It's pretty good about putting [PlanetInfoPlus] in front of everything it logs.)

 

Link to comment
Share on other sites

10 hours ago, Snark said:

Did you see anything interesting in your KSP log file?   For example, a long series of a bajillion error messages, or something. 

Of particular interest is any spew from PlanetInfoPlus itself.  (It's pretty good about putting [PlanetInfoPlus] in front of everything it logs.)

 

Nothing interesting. The planetinfoplus was calculating the max ground height.

here's the log (I cannot load pass to space center so I closed the game after some mins):

https://drive.google.com/drive/folders/1GExFk78n-NajlVezY_FPSvRXGKTeSrqI?usp=share_link

 

Edited by ssd21345
Link to comment
Share on other sites

Does that keep happening, or was it a one-time thing? If I'm not mistaken, the first time the mod is "loaded", it will calculate some stats, like the max elevation point in every planet, and store it in a file, which would explain the RAM usage and load time - this is supposed to happen just one time per "save", as the data will already be available after this...

Link to comment
Share on other sites

1 minute ago, alartor said:

Does that keep happening, or was it a one-time thing? If I'm not mistaken, the first time the mod is "loaded", it will calculate some stats, like the max elevation point in every planet, and store it in a file, which would explain the RAM usage and load time - this is supposed to happen just one time per "save", as the data will already be available after this...

keep happening, that's why it is very annoying

Edited by ssd21345
Link to comment
Share on other sites

15 hours ago, ssd21345 said:

Nothing interesting. The planetinfoplus was calculating the max ground height.

here's the log (I cannot load pass to space center so I closed the game after some mins):

https://drive.google.com/drive/folders/1GExFk78n-NajlVezY_FPSvRXGKTeSrqI?usp=share_link

8 hours ago, modus said:

Yup, it's every time.

Thanks for the info (and the log file).  It's not clear yet exactly what's causing it, but as I kinda suspected, the culprit is in the code that calculates max elevation on celestial bodies.  (That's the only part of PlanetInfoPlus that does any significant computation at all-- the rest of it is very lightweight.)

I'll need to do some more digging into exactly what's going on, but based on what I've observed from the log file, it's very probably something about the specific planets in the planet pack you're using that's tickling PIP's max-elevation calculation algorithm in a sensitive spot.  ;)  (For example, from the log file, I can see that it's calculating the elevations from the stock planets just fine, but appears to be getting stuck when it's calculating for others, I assume the ones in your planet pack-- I don't actually know, because it's getting stuck so badly it's not even logging what it's doing, beyond "I'm calculating now...")

Clearly, there's a "hole" in the algorithm I'm using that can get stuck if the planet is designed in a certain way, and I never came across it before because none of the planet packs I use happen to trigger this particular problem.  So I need to do some investigation to figure out where the hole is, and fix the algorithm so it can't get stuck like that.

In the meantime, as a workaround, my suggestion is to go into the mod's settings and turn off the display of maximum elevation.  If elevation display is turned off, then the mod won't try to calculate it, which in turn should avoid whatever calculation pit it's falling into.

Link to comment
Share on other sites

On 11/4/2022 at 1:52 AM, lucius57 said:

If I wanted to create a geosynchronous comnet, is there a way to calculate a specific apoapsis and periapsis (depending on the number of satellites launched into orbit) so that I can evenly space out my satellites in geosync orbit? I know this was a lot but I would use Resonant Orbit Calculator for this but it doesn’t work with rescale mods. 

Yes, but this mod isn't really the way to do it. ;)

If I may offer a suggestion, have you tried BetterBurnTime?  It has a "synchrony tracker" feature that makes it pretty easy to get a satellite into a geosynchronous orbit (or into an orbit that synchronizes with a target).

(If you have questions about this, the BetterBurnTime thread would be the best place for them.)

Link to comment
Share on other sites

Hi all,

I'm pleased to announce the release of PlanetInfoPlus 1.4.3, which includes the following changes:

  • Add the (optional) display of semimajor axis.  Off by default, but you can turn on via the options dialog.  Thanks to @panarchist for the feature suggestion!
  • Fix a bug that would cause the mod to blow up (hang forever, suck up tons of RAM) for certain planet packs.  Thanks to @ssd21345 for the bug report, and to @modus for confirming.

Enjoy! :)

Technobabble explanation of the bug, for anyone who's curious, in spoiler.

Spoiler

So, it turns out that the algorithm I was using for finding the max elevation on a celestial body has a weak spot:  it gets stuck in an infinite loop if the body's max elevation is too close to the poles.  That's bad enough-- it causes the mod to lock up forever-- except that it's also consuming memory in that infinite loop, which makes it considerably worse.  :rolleyes:

This issue doesn't occur with the stock solar system, or with any of the planet packs that I myself use, since none of them have a max elevation by the pole.

However, in the case of Kcalbeloh System Planet Pack, for example, there are couple of bodies in the system (WH3141A and WH3141B) that appear to have something funky going on with their elevation maps, like the entire surface of the planet is at -9999 meters or something.  Anyway, the result is that both of those bodies were poison pills, as far as PlanetInfoPlus was concerned.

I fixed the problem by adding some boundary checking around the poles, so that the mod now correctly handles this situation.

 

Link to comment
Share on other sites

2 minutes ago, Snark said:

This issue doesn't occur with the stock solar system, or with any of the planet packs that I myself use, since none of them have a max elevation by the pole.

However, in the case of Kcalbeloh System Planet Pack, for example, there are couple of bodies in the system (WH3141A and WH3141B) that appear to have something funky going on with their elevation maps, like the entire surface of the planet is at -9999 meters or something.  Anyway, the result is that both of those bodies were poison pills, as far as PlanetInfoPlus was concerned.

I fixed the problem by adding some boundary checking around the poles, so that the mod now correctly handles this situation.

Wait, this is great!

I was running into issues getting PlanetInfoPlus to work with Whirligig World: every time I focused view on Imterril, the game would crash. I thought it was due to Imterril not having a heightmap file, but since Imterril's entire solid surface is at -10000 meters, it was probably the same issue as with Kcalbeloh. This means the problem should be fixed now!

Link to comment
Share on other sites

11 hours ago, Snark said:

Hi all,

I'm pleased to announce the release of PlanetInfoPlus 1.4.3, which includes the following changes:

  • Add the (optional) display of semimajor axis.  Off by default, but you can turn on via the options dialog.  Thanks to @panarchist for the feature suggestion!
  • Fix a bug that would cause the mod to blow up (hang forever, suck up tons of RAM) for certain planet packs.  Thanks to @ssd21345 for the bug report, and to @modus for confirming.

Enjoy! :)

Thanks, now I can see where science border are without my memory blow up! lol

Link to comment
Share on other sites

On 12/21/2022 at 11:38 AM, Snark said:

Hi all,

I'm pleased to announce the release of PlanetInfoPlus 1.4.3, which includes the following changes:

  • Add the (optional) display of semimajor axis.  Off by default, but you can turn on via the options dialog.  Thanks to @panarchist for the feature suggestion!

Thank you very much for adding SMa!

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