Jump to content

[1.12.x] BetterBurnTime v1.10: Provides extra burn-time indicators on the navball for suicide burns & target rendezvous.


Snark

Recommended Posts

Hi everyone,

I've posted an updated experimental version of BBT, 1.6.X02:

https://github.com/KSPSnark/BetterBurnTime/raw/experimental/experimental/BetterBurnTime-1.6.X02.zip

Hopefully, this fixes the NRE that @Rodger experienced.  Rodger:  I haven't been able to reproduce the NRE that you've been observing.  However, your log file was very helpful in pointing the finger at where the problem was happening.  Since I can't reproduce it, I can't know for sure exactly what's going on... but from looking at the code, I think I see only one way that an NRE could happen in the place that your log file says it does.  So I've made a tweak that (hopefully) addresses the problem.

Rodger, could you try out the new build and let me know whether it solves the problem?  Thanks!

Link to comment
Share on other sites

Hi

Very useful mod but, in some cases, the text is difficult to read because the color is confused with the background.
 
Would it be possible to add an acoustic signal to the last 4 dots? Something like this. Useful even when you are distracted to activate the solar panel or something else forgotten (and to me, it often happens :blush: ) and lose the moment.

Thanks
Edited by Simog
Link to comment
Share on other sites

So after I decided to start from scratch with different mods I now have issues with BBT.

No more RSS but RR (EVE, scatterer etc.pp.):

Issue - log spam with:

[BetterBurnTime] (NullReferenceException) Object reference not set to an instance of an object:   at BetterBurnTime.AtmosphereTracker.CalculateExitTime (.Vessel vessel, System.String& verb) [0x00000] in <filename unknown>:0 
  at BetterBurnTime.AtmosphereTracker.CalculateTimeAtTransition (.Vessel vessel, System.String& verb) [0x00000] in <filename unknown>:0 
  at BetterBurnTime.AtmosphereTracker.Recalculate () [0x00000] in <filename unknown>:0 
  at BetterBurnTime.AtmosphereTracker.LateUpdate () [0x00000] in <filename unknown>:0 
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

in flight scene. I used an USI Sounding Rocket, first launch.

Log:
https://www.dropbox.com/s/reop4oxqvmpaqww/2017-07-03-1 KSP.log.zip?dl=1

Link to comment
Share on other sites

7 hours ago, Simog said:

Very useful mod but, in some cases, the text is difficult to read because the color is confused with the background.

Yep, you're not the first person to observe this.  Another user recently had a useful suggestion:

...basically the idea being to put some sort of a dark background behind the text, to make it readable against any background.  I like the idea, but haven't gotten around to doing it, for two main reasons:

  1. Because it's not any worse than the stock game
  2. Because it would be hard for me

#1 is, of course, a cop-out non-answer.  If I were 100% happy with the stock game's behavior, after all, I wouldn't have written BetterBurnTime in the first place.  :)  And I absolutely would love to provide a better visual experience, if it can be done non-intrusively.  I merely mention it in passing, as a factor that it's not so bad that I can't stand it and feel obliged to fix it quickly.  In my own games, when I get into a hard-to-read-it situation, I just rotate the camera until I've got some black sky behind the display.

The real reason here is #2.  I've got zero knowledge and practical experience building screen UI elements in Unity.  What little interacting with it I've done is to just clone the stock maneuver node burn-time indicator so I can make BBT work, and even that near-trivial manipulation took me a ridiculous amount of head-scratching and trial-and-error debugging and tearing my hair out and endless cycles of "why the dickens isn't this working."  If even that trivial tweak caused me this much grief, I'm extremely hesitant to take on any project that would require me to figure out how to actually construct new UI, even if that new UI is something as simple as "create a semitransparent black rectangle behind some text."

7 hours ago, Simog said:

Would it be possible to add an acoustic signal to the last 4 dots? Something like this. Useful even when you are distracted to activate the solar panel or something else forgotten (and to me, it often happens :blush: ) and lose the moment.

Also not a bad idea.  :)  Adding some sound for the countdown could be nice, particularly if it comes with a config setting so people can turn it off if they don't care for it.  If I ever did something like this, I think my personal favorite sound would be the sort of "bip... bip... bip... BINNNNNNNGGGGGG" kind of sound (with the "BING" at the zero mark).  Sorry, not good at describing the sound, but it's not unlike the final countdown sound for drag races.

Main reason I've never pursued that is that I wouldn't use it in my own game, since I generally play KSP with the sound turned completely off, for various reasons (not least of which is that I've never found KSP's sound design to be particularly compelling).  I'm a lot less likely to work on a mod feature if it's one that I myself would never use, since my primary motivating factor in modding is to have more fun myself.  If a few thousand of my closest friends can also get benefit from that, so much the better.  :wink:

 

1 hour ago, Gordon Dry said:

Issue - log spam

Yep, sounds like exactly the same issue that @Rodger was reporting.  This is what I was attempting to fix with the 1.6.X02 release.  Which BBT release are you getting this with?  1.6.X01, or 1.6.X02?  If it's the former, could you try the latter and see whether it fixes the problem?

Link to comment
Share on other sites

11 minutes ago, Snark said:

The real reason here is #2.  I've got zero knowledge and practical experience building screen UI elements in Unity.  What little interacting with it I've done is to just clone the stock maneuver node burn-time indicator so I can make BBT work, and even that near-trivial manipulation took me a ridiculous amount of head-scratching and trial-and-error debugging and tearing my hair out and endless cycles of "why the dickens isn't this working."  If even that trivial tweak caused me this much grief, I'm extremely hesitant to take on any project that would require me to figure out how to actually construct new UI, even if that new UI is something as simple as "create a semitransparent black rectangle behind some text."

I'll be the first to admit I know nothing about mod development but, why would you reinvent the wheel when it's already been done before?  If you were going to have a try at incorporating this feature, @cybutek already has already done it for KER, perhaps he would be willing to share parts of his code or give you some pointers?

Link to comment
Share on other sites

26 minutes ago, captainb said:

I'll be the first to admit I know nothing about mod development but, why would you reinvent the wheel when it's already been done before?  If you were going to have a try at incorporating this feature, @cybutek already has already done it for KER, perhaps he would be willing to share parts of his code or give you some pointers?

That's probably a pretty good suggestion, and thank you.  The weaseling with which I'm about to respond to it is no reflection on the aptness of your idea.  :)

Anyway:  KER is huge, daunting, and has major UI in it.  Just to find out what it has that I might re-use would require me to install it and figure it out, which I've never done and am not especially interested in doing.  (Nothing against KER, it's an amazing mod by all accounts, it's simply not my personal cup of tea.)  Also, I don't want dialog boxes, I just want to draw a small enhancements to existing UI elements.

The main thing I'm bumping up against is a lack of motivation, I suppose-- I've gotten so used to just rotating the camera to put the text against the black sky that it's become total second nature to me and I simply haven't found the "poor visibility against a light background" issue to be much of a problem for me.

Thank you for the suggestion, though, and someday I may act on it (no promises).  My motivation to tinker waxes and wanes unpredictably.  Someday I may feel a spurt of ambition, and if the time comes, I'll take a look there.  :)

3 minutes ago, Gordon Dry said:

It was still 1.6.X01 - just recognized now there is a new build...

Whew.  :)  Anyway, give 1.6.X02 a try, let me know whether that clears up the problem.

Link to comment
Share on other sites

Unfortunately the 1.6.X02 got the same issue:

[BetterBurnTime] (NullReferenceException) Object reference not set to an instance of an object:   at BetterBurnTime.AtmosphereTracker.CalculateExitTime (.Vessel vessel, System.String& verb) [0x00000] in <filename unknown>:0 
  at BetterBurnTime.AtmosphereTracker.CalculateTimeAtTransition (.Vessel vessel, System.String& verb) [0x00000] in <filename unknown>:0 
  at BetterBurnTime.AtmosphereTracker.Recalculate () [0x00000] in <filename unknown>:0 
  at BetterBurnTime.AtmosphereTracker.LateUpdate () [0x00000] in <filename unknown>:0 
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Log:
https://www.dropbox.com/s/472ezr3ggbj32sy/2017-07-03-3 KSP.log.zip?dl=1

This happens after reentry. After leaving the atmosphere it's working...

Edited by Gordon Dry
Link to comment
Share on other sites

2 hours ago, Snark said:

That's probably a pretty good suggestion, and thank you.  The weaseling with which I'm about to respond to it is no reflection on the aptness of your idea.  :)

<snip>

I guess just something to keep in mind for later then :)

Link to comment
Share on other sites

2 hours ago, Gordon Dry said:

Unfortunately the 1.6.X02 got the same issue:

Thanks!  I've posted a new version here:

https://github.com/KSPSnark/BetterBurnTime/raw/experimental/experimental/BetterBurnTime-1.6.X03.zip

...basically I'm coding by blind reckoning here, since I can't reproduce the problem myself and therefore can't pinpoint the exact line of code where it's happening.  I'm basically just guessing and adding various precautions.

@Rodger, @Gordon Dry, give this version a whirl and see if this fixes the problem?

(...sorry it's taking so many go-rounds, but man am I glad now that I decided to do an experimental release first...)

Link to comment
Share on other sites

The only part of KER that uses the new UI is the window that pips out from the toolbar. The HUD and all of the other readout use the old UI.

For BBT the Text Mesh Pro object used to display text supports text outlines. You can set The outline width and color so that it stands out from the background (SCANsat does this a lot). I'm not sure how easily it would be to set it when working only from stock assets, but it might be worth looking into.

http://digitalnativestudios.com/textmeshpro/docs/shaders/

 

Link to comment
Share on other sites

24 minutes ago, DMagic said:

For BBT the Text Mesh Pro object used to display text supports text outlines. You can set The outline width and color so that it stands out from the background (SCANsat does this a lot). I'm not sure how easily it would be to set it when working only from stock assets, but it might be worth looking into.

http://digitalnativestudios.com/textmeshpro/docs/shaders/

Ooo, interesting!  Thank you.  :)

Still scratching my head, though.  That documentation seems to assume I'm looking at some sort of Unity asset manager or the like, i.e. as though I were a designer working with a UI.  But I'm not-- I'm interacting purely programmatically, and darned if I can figure out how to access this via an API.

I've got this TextMeshProUGUI object, and I'm lost in a bewildering maze of object references.  The only method it has on it that has the word "shader" on it at all is SetShaderDepth(), which is almost certainly not what I want.  Presumably I can get to some sort of shader object from the TextMeshProUGUI, but I am in a maze of twisty passages, all alike.   I have no idea if I should be hunting up the tree (to the TMP_Text it inherits from), or down the tree (to the TMP_SubMeshUI objects it owns), and likely sideways into some kind of property that I may have to downcast into something else (because that seems to be how Unity rolls).  Nice to know that it's presumably doable somewhere, but gosh this is an impenetrable object model if one doesn't already know what to look for.

I'll try posting over in the plugin development forum, maybe there will be an answer somewhere.

Link to comment
Share on other sites

37 minutes ago, Gordon Dry said:

It works now.

Woot!  :)

36 minutes ago, Gordon Dry said:

btw is this obscure arrow that's visible in flight some times coming from BBT?

screenshot?  No idea what you're referring to.  Certainly I haven't put any "arrows" into BBT.

Link to comment
Share on other sites

10 hours ago, Gordon Dry said:

btw is this obscure arrow that's visible in flight some times coming from BBT?
It's new.

In FAR I didn't enable any in-flight arrows to be shown...

Did you hit any of the F-keys and activate some stock indicators?

Link to comment
Share on other sites

Perhaps go ask in the Trajectories thread, then?

The one thing I can assure you is that it's not BetterBurnTime.  BBT has basically zero graphical presence.  There are no graphical features, at all.  There's not even any UI, other than those little text items next to the navball, and those are as minimalistic as I can possibly make them.  (Both because, as a player, I loathe UI and want as little of it as possible; and also because, as a developer, anything that requires me to work with Unity's UI gives me the slithering creeps and I try to avoid it whenever humanly possible.)

Link to comment
Share on other sites

  • 2 weeks later...

Hi all,

I've released v1.6 of BetterBurnTime.  This is the "official" release of the atmosphere-tracker feature that I already gave a sneak peek of in the experimental branch.  It's had a couple of weeks to bake now, I figure that's long enough.

For anyone who hasn't been following along up to this point, what it does is to give you an indicator when you're imminently about to enter or exit atmosphere.

JYBvhm7.png

It's configurable via config.xml.  You can turn the feature completely off, if you don't care for it.  It also has config settings for "max time to atmosphere exit" and "max time to atmosphere entry", controlling how far in advance the indicator should show up.  (It defaults to 15 minutes to entry and 5 minutes to exit.)

Note that the "time to atmosphere exit" is necessarily approximate, because it does not take drag into account at all when projecting your trajectory-- it just assumes a ballistic path.  This will be pretty accurate if you're very high up in the atmosphere where drag is minimal, but if you're hitting suborbital speeds while still deep in the soup, it'll be off quite a bit to start with.

Note that unlike the maneuver-node, impact, and closest-approach trackers, there's no "burn time" displayed.  That's because there's generally no particular reason why someone would especially want to do a burn right at atmosphere transition.  Therefore, no burn time display, and no countdown dots.  It's simply a time display until the transition into or out of the atmosphere.

Thanks to the folks who helped out by reporting bugs in the experimental release.  :)

Enjoy!

Link to comment
Share on other sites

  • 2 weeks later...

I love this mod but I miss the old big dot symbol in the countdown. Is there a reason it doesn't display anymore if the font contains the glyph?

Is there a way I can see all symbols working to substitute my own character for that large bulletpoint?

Link to comment
Share on other sites

9 minutes ago, SleweD said:

I love this mod but I miss the old big dot symbol in the countdown. Is there a reason it doesn't display anymore if the font contains the glyph?

Is there a way I can see all symbols working to substitute my own character for that large bulletpoint?

The embedded version of the font in KSP *doesn't* contain the glyph.  That's why it was changed.

And the only way I can think of to see all the symbols would be to feed them to something in KSP and have it show you.  It'd be a long trial-and-error process, but you could do it.  (There might be a way to pull the embedded font out of KSP, but I don't see it easily.)

Link to comment
Share on other sites

17 hours ago, SleweD said:

I miss the old big dot symbol in the countdown.

Yeah, me too.  ;.;

17 hours ago, SleweD said:

Is there a reason it doesn't display anymore if the font contains the glyph?

Because KSP 1.3 broke it and it's not in the font anymore, which is why I had to settle on the ʘ character.  Not because I'm thrilled with it (I'm not), but because it was the least-ugly thing I could find.  The new KSP 1.3 font is missing a lot of characters-- it's not just the original that went poof.  I tried lots of characters that I would have preferred to ʘ, except none of them worked, either.  See discussion here.

The new font in KSP 1.3 is... well... :mad:.  I find it kind of ironic that the KSP update that added support for Russian and Japanese and Chinese, with all those characters, took away a bunch of characters that were already available... sigh.

 

17 hours ago, SleweD said:

Is there a way I can see all symbols working to substitute my own character for that large bulletpoint?

Yep.  You can do what I had to do when I went on my long and unsatisfying search for a replacement.  Tedious, frustrating trial and error.

 

16 hours ago, DStaal said:

The embedded version of the font in KSP *doesn't* contain the glyph.  That's why it was changed.

And the only way I can think of to see all the symbols would be to feed them to something in KSP and have it show you.  It'd be a long trial-and-error process, but you could do it.

^ This.

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