Jump to content

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


Snark

Recommended Posts

11 minutes ago, Snark said:

We figured it out.

You knew it had to be wrestling for control.  It was the right word that got me there.  I just had to look for the places computers might wrestle (code-wise, people).

Edited by R-T-B
Link to comment
Share on other sites

Hi all,

I've just released PlanetInfoPlus v1.2.  No major new UI-facing features, just various goodies including some bugfixes and improvements to performance, compatibility, and configurability.

New with this release:

  • Added some clever pre-calculation to reduce the momentary freezes when first going to the planetarium view.
  • Add a Kopernicus compatibility patch to deal with certain edge conditions.  Note, requires Kopernicus Release-83 or newer to work.  (Thanks to @caipi for the bug report with JNSQ compatibility, and to @R-T-B for tracking down the problem and releasing a Kopernicus update.)
  • Add config options for "approximately tidally locked", for Principia compatibility. (Thanks to @R-T-B for the suggestion.)
  • Shorter "Atmospheric Characteristics:" label, to fit on one line.  (Thanks to @flart for the suggestion.)
  • Add config options for time precision for rotation & orbit periods.  (Thanks to @flart for the suggestion.)
  • Fixed a bug where bodies with no surface would show "NaN" for max elevation. (Thanks to @flart for reporting.)

Regarding the time precision options:  @flart, not sure if this gets you exactly what you need, but it's a step in the right direction.  ;)  I notice that increasing the precision from the default 3 places to 4, still fits on one line (at least in English).

Enjoy!

Link to comment
Share on other sites

Update time once again!  :)

I've just released PlanetInfoPlus v1.3.  This one adds a new section, "Gameplay", to the panel.  It's below the "Physical Characteristics" and "Atmosphere" sections, so you'll probably have to scroll down to see it.

Duna.png

This new panel shows the following stats:

  • The height of the boundary between upper and lower atmospheres (if atmosphere is present)
  • The height of the boundary between low and high space.
  • The number of biomes present (not counting mini-biomes like the ones around KSC)
  • The "exploration status" of the body.

Like everything else, these new parameters have their own toggles in the settings dialog.  (If you turn all of them off, the "Gameplay" section goes away completely.)

options.png

 

Regarding the "Exploration" field:  It shows the "most advanced" exploration yet done for the body, be it a simple flyby or planting a flag (or "none" if you've never been there).  It uses different rules for what "most advanced" means for the homeworld versus everything else.  For example, planting a flag on Eve is more impressive than just orbiting it... but the reverse is true for Kerbin.   ;)

The rules for exactly which achievements count as "more advanced" than others are admittedly somewhat arbitrary-- e.g. should "crewed orbit" rank higher than "uncrewed landing", or not?  Since it's arbitrary, I just decided, based on how I feel from playing KSP for a while.  I realize that not everyone will necessarily agree with every one of my choices, but that knowledge is a burden I am prepared to live with.  :sticktongue:

(No, I don't plan to add config settings to allow the user to tweak the order.  Feels like overkill to me.)

Anyway, enjoy!

Shout-out to @Arrowmaster and @caipi, both of whom indicated interest in seeing some of these new parameters.

Link to comment
Share on other sites

On 2/23/2022 at 4:38 PM, Snark said:

I'm a little leery of making the substitution, mainly because I don't know in what context that tag gets used in the program.  It happens to be the case in English that substituting "Atmosphere:" for "Atmospheric Characteristics:" makes sense, but translation can be heavily context-dependent and there's a chance that it might come off sounding silly in that context in other languages.

A bit late to the party, but just know it is exactly the same in French (plus an additional space for formatting convention). It should sound just fine :)

Link to comment
Share on other sites

6 hours ago, linuxgurugamer said:

Would it be possible to have it active in the mapview for the currently planet, regardless if you are focused on it or not?  There seem to be some cases where it just isn't visible.  Not sure if this is a function of KSP or not, though

Yah, that's a built-in function of KSP.  I'm sure it would be possible to tinker with it, if one knew the correct sequence of actions... but that's getting into UX semantics and I'm fairly strongly disinclined to do that.  In general I'm happy with the way the KSP UX hangs together, not least because I have several thousand hours of muscle memory telling me how things behave and where to find them.

(Also, I wouldn't know how, anyway; I'm seriously not well-versed in tinkering with UI in this game.  For example, I'd love to adjust the height and/or width of the planet info pane, and haven't been able to figure out how to do just that one simple thing.   But in the specific case of what you're asking, I think I'd be disinclined to do that even if I knew how.)

1 hour ago, vinix said:

A bit late to the party, but just know it is exactly the same in French (plus an additional space for formatting convention). It should sound just fine :)

Thank you, good to know!  :)

Link to comment
Share on other sites

8 hours ago, linuxgurugamer said:

@SnarkGreat mod!

Would it be possible to have it active in the mapview for the currently planet, regardless if you are focused on it or not?  There seem to be some cases where it just isn't visible.  Not sure if this is a function of KSP or not, though

I don't know if this is what you are looking for, but doesn't Kerbal Engineer Redux essentially provide what you are looking/asking for? I'm not quite sure if you can use it in the Tracking Center, but when you are in in a vessel, you don't need focus the body. Unfortunately, it only shows the values for the body in whose SOI you currently are. Still, you can see it in the map view (and not just there) for the current planet and it also offers many of the values PIP is providing.

Link to comment
Share on other sites

On 2/23/2022 at 9:17 PM, alartor said:

I might be wrong here, but maybe the idea was that not only Max Elevation is displayed, but maybe include the option to also display (configurable, maybe?) the location on the celestial body surface of said Max Elevation (so that you can try to plant a flag there? Heheh)

On 2/23/2022 at 9:27 PM, Snark said:

Main reason I haven't surfaced it in the UI is that it's not a piece of information that I myself would find useful (for example, even if I knew the lat/long, I don't use any mods to make it easy to navigate to that specific place, etc.)  It wouldn't be all that hard to add, it's just my usual avoidance of "clutter" in UI.  I may add this at some point, but there are other higher-priority things to look at first.

even better also to save it in the config format, so it could be used just with the MM if necessary.

ready to go WaypointManager support looks like that:

// HighestElevations.txt
// This file is autogenerated.
// if you want to import it to the WaypointManager
// copy and rename to WaypointManager\PluginData\CustomWaypoints\HighestElevations.cfg
// and then import the file in the WaypointManager GUI settings

WAYPOINT
{
    name = Highest Elevation
    celestialName = Ike
    latitude = 12.345
    longitude = 123.456
    altitude = 12345
    icon = pressure
}

WAYPOINT
{
    name = Highest Elevation
    celestialName = Eve
    latitude = 12.345
    longitude = 123.456
    altitude = 12345
    icon = pressure
}
Edited by flart
Link to comment
Share on other sites

1 hour ago, caipi said:

I don't know if this is what you are looking for, but doesn't Kerbal Engineer Redux essentially provide what you are looking/asking for? I'm not quite sure if you can use it in the Tracking Center, but when you are in in a vessel, you don't need focus the body. Unfortunately, it only shows the values for the body in whose SOI you currently are. Still, you can see it in the map view (and not just there) for the current planet and it also offers many of the values PIP is providing.

KER is another window on the screen.  This does it in a much nicer way.

as always, there are many different ways to accomplish the same thing.

Link to comment
Share on other sites

2 hours ago, flart said:

even better also to save it in the config format, so it could be used just with the MM if necessary.

ready to go WaypointManager support looks like that:

Ah, I see what you're suggesting.  Thank you for the suggestions, I'll think about it.

I wouldn't consider it to be appropriate usability in the classic ModuleManager way, because the file wouldn't be generated until running the program, and even then there's no guarantee it would be complete (because not all planets may have had their calculations done yet, it's somewhat "on demand").  Which means a user who tried to set up usage of this config via a ModuleManager patch would have a situation in which stuff wouldn't work unless they ran KSP, mucked around in the UI until they're pretty sure everything's been covered, exited the game completely, and then restarted it, before the data would actually be usable by anything else.

On the other hand, simply exporting a text file that's basically in config format, with the expectation that anyone who wants to use it would manually copy the file somewhere and then do stuff with it-- that has a considerably lower bar and makes more sense to me.  I can imagine that a variety of different mods might conceivably want the data, so I'd be hesitant to over-specialize it specifically just for WaypointManager, but a file that would contain the requisite tuples of "celestial body, latitude, longitude, elevation" would at least have the necessary data in it, and wouldn't be difficult for someone to run through a script to wrangle it into whatever format they needed for some specific mod.

I shall think on this.

Link to comment
Share on other sites

6 hours ago, Snark said:

[...] but a file that would contain the requisite tuples of "celestial body, latitude, longitude, elevation" would at least have the necessary data in it, and wouldn't be difficult for someone to run through a script to wrangle it into whatever format they needed for some specific mod.

I shall think on this.

Or even just for opening said file in a text editor outside KSP, read it and try to reach the point "by hand", heheh. A more pedestrian approach on my side (i.e. the player), but no other mods would be needed...

And I must say it again: thanks Snark! Amazing job implementing all those features and suggestions, and in such little time!! (and thanks to all the people contributing suggestions and ideas how to implement them, too)

Link to comment
Share on other sites

Hi all,

I'm pleased to announce the release of PlanetInfoPlus 1.3.1.  :)

This one has no new user-facing features in normal gameplay for most users, but it does add two new things:

  • French localization.  Merci beaucoup à @vinix for generously supplying this! :)
  • Ability to dump planetary "max elevation" data to a file.  As has been discussed in the preceding page or so of posts on this thread.  Thanks to @flart for the suggestion.

You can access the data-dump function via the Alt+F12 debug console.  Open the console, and issue this command:

/pip dump

This will cause the mod to write a file, PlanetInfoPlusDump.cfg, into whatever folder the mod's installed in.  Here's what it looks like, for example, when I run it with the New Horizons mod installed:

Spoiler

// PlanetInfoPlusDump.cfg
// This file is auto-generated and will be overwritten. Do not hand-edit.
//
// Highest points of KSP celestial bodies, as calculated by PlanetInfoPlus
//
// 32 bodies present in file

MAX_ELEVATION
{
    name = Aptur
    elevation = 16077.4941974379
    latitude = -1.05196726682755
    longitude = 86.3388418018286
}

MAX_ELEVATION
{
    name = Arin
    elevation = 7545.89933093963
    latitude = 3.5926123289759
    longitude = 176.067793502226
}

MAX_ELEVATION
{
    name = Astid
    elevation = 13843.6335833912
    latitude = -36.554022912912
    longitude = -122.343702276544
}

MAX_ELEVATION
{
    name = Atell
    elevation = 13856.4955536686
    latitude = -62.5780546023758
    longitude = 107.578001002621
}

MAX_ELEVATION
{
    name = Bop
    elevation = 21757.6602041329
    latitude = 23.8825053620375
    longitude = -64.5673345251739
}

MAX_ELEVATION
{
    name = Derso
    elevation = 12492.4224267485
    latitude = 13.5047697568921
    longitude = 112.067186912557
}

MAX_ELEVATION
{
    name = Dres
    elevation = 5670.309878378
    latitude = -84.979263109466
    longitude = 42.6098668846923
}

MAX_ELEVATION
{
    name = Duna
    elevation = 8268.86505027115
    latitude = 20.8982062395276
    longitude = -106.800427436916
}

MAX_ELEVATION
{
    name = Eeloo
    elevation = 3868.35930906259
    latitude = 24.3404188921954
    longitude = 27.9523093799084
}

MAX_ELEVATION
{
    name = Eli
    elevation = 13352.3008717702
    latitude = 8.4883565134239
    longitude = -36.8129762037255
}

MAX_ELEVATION
{
    name = Ernus
    elevation = 8110.06572621933
    latitude = 1.93351103215481
    longitude = 179.472684756063
}

MAX_ELEVATION
{
    name = Etal
    elevation = 35040.8385682161
    latitude = -57.9940060654945
    longitude = 76.8788715879396
}

MAX_ELEVATION
{
    name = Ete
    elevation = 3023.49038124084
    latitude = 5.46760631472165E-05
    longitude = -180
}

MAX_ELEVATION
{
    name = Eve
    elevation = 7541.24574347341
    latitude = -24.994949011724
    longitude = -158.474660874084
}

MAX_ELEVATION
{
    name = Gilly
    elevation = 6400.98153515043
    latitude = -29.2433253127642
    longitude = -123.889593756272
}

MAX_ELEVATION
{
    name = Ike
    elevation = 12738.3322681647
    latitude = 25.2566390113354
    longitude = 178.289946187111
}

MAX_ELEVATION
{
    name = Kerbin
    elevation = 6768.59174087178
    latitude = 61.5966960705499
    longitude = 46.3594821624808
}

MAX_ELEVATION
{
    name = Lave
    elevation = 34063.952459989
    latitude = 0.0879033232651164
    longitude = 99.9419648613264
}

MAX_ELEVATION
{
    name = Laythe
    elevation = 6073.54642105289
    latitude = -17.5781255290504
    longitude = 172.56725421008
}

MAX_ELEVATION
{
    name = Leouch
    elevation = 9897.27287654518
    latitude = 57.0951898867443
    longitude = -122.947581896224
}

MAX_ELEVATION
{
    name = Levy
    elevation = 15166.6626653135
    latitude = 5.49855456737566
    longitude = -124.036799787317
}

MAX_ELEVATION
{
    name = Minmus
    elevation = 5724.60000000001
    latitude = -62.9394721912
    longitude = 74.7718127609952
}

MAX_ELEVATION
{
    name = Moho
    elevation = 6828.21774258424
    latitude = 54.5650702355627
    longitude = 149.573085050297
}

MAX_ELEVATION
{
    name = Mun
    elevation = 7064.47305365134
    latitude = -82.5122293995637
    longitude = -152.401805994757
}

MAX_ELEVATION
{
    name = Nolas
    elevation = 8667.53222448012
    latitude = -12.2291845203345
    longitude = 174.734317083903
}

MAX_ELEVATION
{
    name = Oree
    elevation = 11186.0880610264
    latitude = -32.0918226115234
    longitude = -123.142705328924
}

MAX_ELEVATION
{
    name = Pol
    elevation = 4891.2810274427
    latitude = -62.814479485114
    longitude = 164.565391732729
}

MAX_ELEVATION
{
    name = Serran
    elevation = 7966.47304189322
    latitude = 0.639364853575464
    longitude = 120.702936408624
}

MAX_ELEVATION
{
    name = Tidus
    elevation = 8314.40630682523
    latitude = 45.7361829270588
    longitude = 17.6990998353796
}

MAX_ELEVATION
{
    name = Titanus
    elevation = 7888.37537673255
    latitude = -4.41674733113386
    longitude = -62.7562990416902
}

MAX_ELEVATION
{
    name = Tylo
    elevation = 12904.6663088199
    latitude = -28.8813181357037
    longitude = -171.998200075779
}

MAX_ELEVATION
{
    name = Vall
    elevation = 7994.06984259601
    latitude = 25.8542849534857
    longitude = -33.9000964671635
}

Note that executing this command will force the mod to go ahead and (expensively) calculate the max elevation point of every single body in the system that isn't already pre-calculated.  So, depending on how fast your machine is and what percentage of bodies have already been pre-calculated by the time you run the command, it might lock up the game for up to several seconds.  (On my machine, fully calculating the entire New Horizons system with 32 solid planets takes around 10 seconds total, for example.)  So, if you use that command, give it a few seconds and don't think your game is crashing. ;)

Enjoy!

Link to comment
Share on other sites

11 hours ago, smushanoob said:

Question about your mod, can we add custom text with this?

Not sure what you mean by "add custom text"? Can you elaborate?

I mean, all the UI strings that the mod uses are defined in the localization file, so if you wanted to change "Max Elevation" to "Most Upness" or whatever, then yeah, you can do that. And if you wanted to change the format of the numbers displayed, then that's doable, too.

Beyond that, though, I'm not sure what you mean? What did you have in mind?

11 hours ago, smushanoob said:

 Will be using it for an upcoming mod.

Out of curiosity, do you mean "using it for" in the sense of just installing it for your gameplay when you're running some planet pack or something? Or do you mean that you're authoring a mod and were thinking of somehow incorporating this?

Link to comment
Share on other sites

8 hours ago, Snark said:

Not sure what you mean by "add custom text"? Can you elaborate?

I mean, all the UI strings that the mod uses are defined in the localization file, so if you wanted to change "Max Elevation" to "Most Upness" or whatever, then yeah, you can do that. And if you wanted to change the format of the numbers displayed, then that's doable, too.

Beyond that, though, I'm not sure what you mean? What did you have in mind?

Out of curiosity, do you mean "using it for" in the sense of just installing it for your gameplay when you're running some planet pack or something? Or do you mean that you're authoring a mod and were thinking of somehow incorporating this?

 

When I say custom text, I mean adding like extra lines of information (ex: Habitable? Colonizable?)

Also, the latter. (me & some others authoring a mod) You have a nice mod here :)

Edited by smushanoob
Link to comment
Share on other sites

On 2/26/2022 at 2:04 PM, Snark said:

Hi all,

I'm pleased to announce the release of PlanetInfoPlus 1.3.1.  :)

This one has no new user-facing features in normal gameplay for most users, but it does add two new things:

  • French localization.  Merci beaucoup à @vinix for generously supplying this! :)
  • Ability to dump planetary "max elevation" data to a file.  As has been discussed in the preceding page or so of posts on this thread.  Thanks to @flart for the suggestion.

You can access the data-dump function via the Alt+F12 debug console.  Open the console, and issue this command:

/pip dump

This will cause the mod to write a file, PlanetInfoPlusDump.cfg, into whatever folder the mod's installed in.  Here's what it looks like, for example, when I run it with the New Horizons mod installed:

  Reveal hidden contents

// PlanetInfoPlusDump.cfg
// This file is auto-generated and will be overwritten. Do not hand-edit.
//
// Highest points of KSP celestial bodies, as calculated by PlanetInfoPlus
//
// 32 bodies present in file

MAX_ELEVATION
{
    name = Aptur
    elevation = 16077.4941974379
    latitude = -1.05196726682755
    longitude = 86.3388418018286
}

MAX_ELEVATION
{
    name = Arin
    elevation = 7545.89933093963
    latitude = 3.5926123289759
    longitude = 176.067793502226
}

MAX_ELEVATION
{
    name = Astid
    elevation = 13843.6335833912
    latitude = -36.554022912912
    longitude = -122.343702276544
}

MAX_ELEVATION
{
    name = Atell
    elevation = 13856.4955536686
    latitude = -62.5780546023758
    longitude = 107.578001002621
}

MAX_ELEVATION
{
    name = Bop
    elevation = 21757.6602041329
    latitude = 23.8825053620375
    longitude = -64.5673345251739
}

MAX_ELEVATION
{
    name = Derso
    elevation = 12492.4224267485
    latitude = 13.5047697568921
    longitude = 112.067186912557
}

MAX_ELEVATION
{
    name = Dres
    elevation = 5670.309878378
    latitude = -84.979263109466
    longitude = 42.6098668846923
}

MAX_ELEVATION
{
    name = Duna
    elevation = 8268.86505027115
    latitude = 20.8982062395276
    longitude = -106.800427436916
}

MAX_ELEVATION
{
    name = Eeloo
    elevation = 3868.35930906259
    latitude = 24.3404188921954
    longitude = 27.9523093799084
}

MAX_ELEVATION
{
    name = Eli
    elevation = 13352.3008717702
    latitude = 8.4883565134239
    longitude = -36.8129762037255
}

MAX_ELEVATION
{
    name = Ernus
    elevation = 8110.06572621933
    latitude = 1.93351103215481
    longitude = 179.472684756063
}

MAX_ELEVATION
{
    name = Etal
    elevation = 35040.8385682161
    latitude = -57.9940060654945
    longitude = 76.8788715879396
}

MAX_ELEVATION
{
    name = Ete
    elevation = 3023.49038124084
    latitude = 5.46760631472165E-05
    longitude = -180
}

MAX_ELEVATION
{
    name = Eve
    elevation = 7541.24574347341
    latitude = -24.994949011724
    longitude = -158.474660874084
}

MAX_ELEVATION
{
    name = Gilly
    elevation = 6400.98153515043
    latitude = -29.2433253127642
    longitude = -123.889593756272
}

MAX_ELEVATION
{
    name = Ike
    elevation = 12738.3322681647
    latitude = 25.2566390113354
    longitude = 178.289946187111
}

MAX_ELEVATION
{
    name = Kerbin
    elevation = 6768.59174087178
    latitude = 61.5966960705499
    longitude = 46.3594821624808
}

MAX_ELEVATION
{
    name = Lave
    elevation = 34063.952459989
    latitude = 0.0879033232651164
    longitude = 99.9419648613264
}

MAX_ELEVATION
{
    name = Laythe
    elevation = 6073.54642105289
    latitude = -17.5781255290504
    longitude = 172.56725421008
}

MAX_ELEVATION
{
    name = Leouch
    elevation = 9897.27287654518
    latitude = 57.0951898867443
    longitude = -122.947581896224
}

MAX_ELEVATION
{
    name = Levy
    elevation = 15166.6626653135
    latitude = 5.49855456737566
    longitude = -124.036799787317
}

MAX_ELEVATION
{
    name = Minmus
    elevation = 5724.60000000001
    latitude = -62.9394721912
    longitude = 74.7718127609952
}

MAX_ELEVATION
{
    name = Moho
    elevation = 6828.21774258424
    latitude = 54.5650702355627
    longitude = 149.573085050297
}

MAX_ELEVATION
{
    name = Mun
    elevation = 7064.47305365134
    latitude = -82.5122293995637
    longitude = -152.401805994757
}

MAX_ELEVATION
{
    name = Nolas
    elevation = 8667.53222448012
    latitude = -12.2291845203345
    longitude = 174.734317083903
}

MAX_ELEVATION
{
    name = Oree
    elevation = 11186.0880610264
    latitude = -32.0918226115234
    longitude = -123.142705328924
}

MAX_ELEVATION
{
    name = Pol
    elevation = 4891.2810274427
    latitude = -62.814479485114
    longitude = 164.565391732729
}

MAX_ELEVATION
{
    name = Serran
    elevation = 7966.47304189322
    latitude = 0.639364853575464
    longitude = 120.702936408624
}

MAX_ELEVATION
{
    name = Tidus
    elevation = 8314.40630682523
    latitude = 45.7361829270588
    longitude = 17.6990998353796
}

MAX_ELEVATION
{
    name = Titanus
    elevation = 7888.37537673255
    latitude = -4.41674733113386
    longitude = -62.7562990416902
}

MAX_ELEVATION
{
    name = Tylo
    elevation = 12904.6663088199
    latitude = -28.8813181357037
    longitude = -171.998200075779
}

MAX_ELEVATION
{
    name = Vall
    elevation = 7994.06984259601
    latitude = 25.8542849534857
    longitude = -33.9000964671635
}

Note that executing this command will force the mod to go ahead and (expensively) calculate the max elevation point of every single body in the system that isn't already pre-calculated.  So, depending on how fast your machine is and what percentage of bodies have already been pre-calculated by the time you run the command, it might lock up the game for up to several seconds.  (On my machine, fully calculating the entire New Horizons system with 32 solid planets takes around 10 seconds total, for example.)  So, if you use that command, give it a few seconds and don't think your game is crashing. ;)

Enjoy!

Hey @Snark!

First, thank you.

Second, what does it look like when it calculates max elevation? Every 2-4 minutes, I get this in my log:

Spoiler

[PlanetInfoPlus] Read cache timestamp: 637815173177486543 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Bop: 21757.6602041329 m at lat=23.8825053620375, lon=-64.5673345251739 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Dres: 5670.309878378 m at lat=-84.979263109466, lon=42.6098668846923 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Duna: 8268.86505027115 m at lat=20.8982062395276, lon=-106.800427436916 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Eeloo: 3868.35930906259 m at lat=24.3404188921954, lon=27.9523093799084 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Eve: 7541.24574347341 m at lat=-24.994949011724, lon=-158.474660874084 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Gilly: 6400.98153515043 m at lat=-29.2433253127642, lon=-123.889593756272 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Ike: 12738.3322681647 m at lat=25.2566390113354, lon=178.289946187111 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Kerbin: 6768.59174087178 m at lat=61.5966960705499, lon=46.3594821624808 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Laythe: 6073.54642105289 m at lat=-17.5781255290504, lon=172.56725421008 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Minmus: 5724.60000000001 m at lat=-62.9394721912, lon=74.7718127609952 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Moho: 6828.21774258424 m at lat=54.5650702355627, lon=149.573085050297 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Mun: 7064.47305365134 m at lat=-82.5122293995637, lon=-152.401805994757 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Pol: 4891.2810274427 m at lat=-62.814479485114, lon=164.565391732729 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Tylo: 12904.6663088199 m at lat=-28.8813181357037, lon=-171.998200075779 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[PlanetInfoPlus] Read max elevation of Vall: 7994.06984259601 m at lat=25.8542849534857, lon=-33.9000964671635 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
 

I've noticed some minor stuttering when this is happening (I am literally playing as I type this). I am *not* trying to force recalculation or do anything other than play. If this is normal, then let me know and I will disregard. If not, I will provide a clean log and also try rolling back to 1.3 to see if there's any difference.

Thanks!

Link to comment
Share on other sites

16 hours ago, smushanoob said:

When I say custom text, I mean adding like extra lines of information (ex: Habitable? Colonizable?)

Hmm, interesting.

No, it doesn't currently support anything like that.  On the other hand, I don't think it would be difficult to make it support that sort of thing, as long as it's something from static config and not a dynamic run-time connection.  (Basically, allow it to read info from config files, and then you could use ModuleManager to patch in your own stuff.)  This seems like potentially a very powerful feature that could make PlanetInfoPlus useful to third-party mods that want to share their stuff.

No promises, but it seems like something that may be worth adding.  I shall think on this.  :)

16 hours ago, smushanoob said:

Also, the latter. (me & some others authoring a mod)

Hm, okay.  I'd be interested to hear the details, and why you'd need to bundle PlanetInfoPlus rather than just allow users to install it alongside (in my experience, the former is easy to cause headaches for all concerned, and the latter is usually preferable)-- I don't know your use case so am not in a position to judge.  If there's some simple feature I could add (such as custom text as described above) that would make the mod flexible enough that people wouldn't need to bundle it or fork it, I'd be interested in learning more about the details.

 

9 hours ago, eightiesboi said:

what does it look like when it calculates max elevation?

Not like what you're observing-- you're seeing something else.

What it looks like when it calculates max elevation is this:

  • When going to KSC view (either on initial game load when starting a new session, or when you're just switching around), it will take up to 4 seconds to do precalculations of any bodies that haven't been precalculated yet.  It only does this if all the bodies haven't yet been calculated-- after that point, it never does it again.  (Should only happen a total of two or three times in a game, unless you're playing a mod that has a lot of planets.  For example, I'm currently playing with New Horizons, with a total of 32 solid bodies in the solar system, and total calculation time for all bodies is only around 10 seconds.)
  • When focusing on a planet in the planetarium view (either in the tracking station, or in map view during flight), it will pause for up to a second or so to calculate that planet, if it hasn't already been pre-calculated before.  (Hopefully this should be relatively rare-- in the large majority of cases, I expect it will have been pre-calculated. I put a fair amount of effort into trying to prioritize pre-calculation of the bodies the player is most likely to look at first.)
9 hours ago, eightiesboi said:

Every 2-4 minutes, I get this in my log:

...

I've noticed some minor stuttering when this is happening (I am literally playing as I type this). I am *not* trying to force recalculation or do anything other than play. If this is normal, then let me know and I will disregard.

That's absolutely not normal or intentional-- clearly the mod is behaving in a way that I did not expect or intend.  There's absolutely no reason why the mod should need to do this.  This is clearly a bug; thank you for calling it to my attention, I'll need to dig into it some more.

(To be clear, the mod goes strenuously out of its way never to recalculate anything ever.  Planets don't change.  The calculation is computationally expensive, so I go out of my way to do the calculation only once, ever, and then remember that value so that it never has to be calculated again.  What's supposed to happen is that the game reads the previously calculated values from your savefile, once, at game load time.  What you're observing is that it's frequently loading them and re-loading them every 2-4 minutes, which seems stark raving silly to me and I don't know why it would do that.  The stuttering is almost certainly because it's re-reading the savefile or something to do so; it's a "pause for disk activity" sort of lag.)

Anyway, I don't expect that reverting to 1.3 would fix the problem for you.  This behavior has been around since 1.1 and hasn't changed since then.  (It may conceivably have gotten slightly more noticeable with 1.3.1, as it's now reading slightly more data than it used to, but the basic semantics haven't changed since I added "max elevation" as a feature in 1.1.)

Again, thank you for calling my attention to it, and I shall dig into it more.  I'll get to the bottom of it and fix it.

Technobabble about implementation details in spoiler, in case there are any C# modders out there who are interested, and/or may already know what dumb thing I'm doing and can point me in the right direction to save me debugging time.  ;)  I'll get it figured out on my own, but any tips would certainly make it go faster!

Spoiler

The max elevations are expensive to calculate (up to around 1 second per celestial body), and totally lock up the game when being done.  Therefore, I want to minimize them as much as possible:  in particular, I want it to be that any given planet should be calculated only once per savegame, ever, and then just save the numbers so they get re-used rather than re-calculated in the future.  And I want this to persist with the savegame, so that the information is kept across play sessions.

My understanding is that information that needs to be persisted should be done as follows:

  • If it's for an individual part -> field on a PartModule
  • If it's for a vessel as a whole -> field on a VesselModule
  • If it's for the game as a whole -> put it in a KSPScenario

What I want is the latter case, so that's what I'm using.  I've used KSPScenario once before, in my VariantPersist mod, where it works exactly as I expect and have never had any problems with it, so I figured I'd use it here, too.

Here's where I use it for PlanetInfoPlus:  PlanetInfoScenario.cs

  • It loads the planet max elevation data when OnLoad gets called
  • It saves the planet max elevation data when OnSave gets called

The behavior that eightiesboi is reporting, here ("I see this log every 2-4 minutes") makes it clear that what's happening is, OnLoad is getting called frequently, every 2-4 minutes, and is happening in the middle of gameplay (thus the noticeable stutter.)

That puzzles me, because that's not what I would have expected.  Why would it keep loading itself?

I assume that what's going on here is a combination of two things:

  • Clearly, I've been making incorrect assumptions about when OnLoad and OnSave get called for KSPScenario.  Looks like they're called more often than I expect.
  • There's probably a good chance that I'm Doing It Wrong™ in terms of how I set up and use the scenario class.

This seems like the sort of thing that shouldn't be too hard to come up with a fix for.  Until and unless I can either find some apropos documentation or else some knowledgeable and generous modder can point out to me where I've gone astray, though, it's going to be a fair amount of trial-and-error for me to track down what's going on and how to fix it.

 

Link to comment
Share on other sites

@Snark I don't know if it helps at all, but logs here: https://1drv.ms/u/s!AoyHZiRU1jT-z5F1TM6AWgE2L5oynw?e=4uejTG

I just started the game up and let it run for a few minutes with a couple of scene changes. Obviously, I am running more than a few mods but my logs are pretty clean. I can also set up a test run if it helps. The one thing I can't do is code, so I am useless for that, but let me know if there's anything else I can do to help. Thank you!

Link to comment
Share on other sites

1 hour ago, eightiesboi said:

@Snark I don't know if it helps at all, but logs here: https://1drv.ms/u/s!AoyHZiRU1jT-z5F1TM6AWgE2L5oynw?e=4uejTG

I just started the game up and let it run for a few minutes with a couple of scene changes. Obviously, I am running more than a few mods but my logs are pretty clean. I can also set up a test run if it helps. The one thing I can't do is code, so I am useless for that, but let me know if there's anything else I can do to help. Thank you!

Thank you, that's very helpful.  :)

From looking at your KSP.log, you're seeing essentially the same sequence of events that I am in my own game, which means that I now know that I can reproduce the situation, which is the main thing I need to address the matter.

(I've got a fairly simple change in mind that I effect should eliminate, or at least ameliorate, the issue-- in particular, would get rid of it entirely from the flight scene and tracking station, and hopefully make it less likely and/or intrusive in the KSC.  Will include that with the next release.)

Thank you for reporting the issue!

Link to comment
Share on other sites

I can't tell if I'm being really stupid and missing something obvious, or if this just doesn't show orbital inclination? I feel like that would be pretty good to have, to know like... the relative inclination compared to Kerbin, or something like that. To know if you'll need to change inclination to reach the body

Link to comment
Share on other sites

3 hours ago, myste_rae said:

I can't tell if I'm being really stupid and missing something obvious, or if this just doesn't show orbital inclination? I feel like that would be pretty good to have, to know like... the relative inclination compared to Kerbin, or something like that. To know if you'll need to change inclination to reach the body

Thank you, that's a reasonable suggestion. And your observation is accurate. Nope, it doesn't. ;)

I actually thought of that, but decided against it. Main thing is that the info box is very small, and real estate is at a premium. I like to avoid clutter, and I've tried to focus on providing only information that isn't otherwise available elsewhere. Inclination is one of those things that you can get just from eyeballing the planetarium view--it's graphically displayed. Not an exact degree number, sure, but in my own gameplay, I've never found myself needing to know that a particular planet is inclined 11 degrees versus 12 degrees.

Link to comment
Share on other sites

Hi all,

I'm pleased to announce the release of PlanetInfoPlus v1.4.

New in this release is a "biomes explored" field in the "gameplay" section, like this:

Aptur.png

This field indicates how many of the body's biomes you've "explored".  In this context, a biome is deemed "explored" if you've returned science from its surface (or, in the case of bodies with an atmosphere, while flying at low altitude).  Some notes about this feature:

  • Since it involves science, it's not available in sandbox games; the field won't appear.
  • It won't be displayed unless the body has biomes.
  • If the body hasn't been explored at all, then the field won't show up, either.
  • I've picked "landed, splashed, or low flight" as the viable experiment situations to count as "exploring" a biome.  But if you don't like that and would like to tweak it, there's a config setting for that.

Thank you to @goldenpeach for helping with French localization of the new feature.

The other change to this release is that I've made some tweaks to improve performance, specifically to reduce or remove the "stutter" that @eightiesboi recently reported.  Thanks for the bug report.

Enjoy!  :)

 

Link to comment
Share on other sites

I came to thank you for this great mod, and I see there is another update.
Downloading now.

I thought this was a neat idea when you released the mod.  I had no idea how much I've always needed this!

Thanks again!


Happy landings!

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