Jump to content

[1.9.x, 1.10.x] Kerbal Launch Failure Revived


Recommended Posts

On 10/14/2016 at 11:42 AM, kingosci said:

More ideas:

Accidentally activate the next stage's engines, like the Nedelin disaster (although this happens pretty often when I mess up the staging order)

Rocket engine gimbal hard-over. From what I've read this and other control system failures were relatively common in the earlier days of rocketry.

I just remembered the Proton launch failure in 2013 where the gyroscopes were installed upside down, so I guess that still happens sometimes.

Video in case someone hasn't seen it:

  Hide contents

 

 

Beautiful  in the most destructive way possible.

Link to post
Share on other sites
2 hours ago, linuxgurugamer said:

Thats a lot of mods.

Ill need a log file

Here is the log file. Hope it helps.

btw, what does this mod count as launch? First staging? Liftoff? Is it possible to have an engine failure 5 seconds (minimum possible setting) after ignition, before liftoff?

Link to post
Share on other sites
On ‎6‎/‎30‎/‎2017 at 3:58 PM, genericeventhandler said:

Maybe, more cycles more chance for it to fail?

 maybe instead of checking on each update you add a real time elapse into the code before checking again. 

And that also means that I need to check the specs of my daughters machine and see what I can upgrade ;-)

----   Added: as I've just seen this in KLF utils,

private static System.Random rng = new System.Random();

this will always give the same random number sequence on any machine. 

you need to seed it to the current clock ticks of the processor. 

Here is a stackoverflow article on how to make random random. 

https://stackoverflow.com/questions/10903613/using-clock-ticks-as-random-number-seed

Hth

GEH

 

Hi linuxgurugamer,

Was this implemented in KLF? I too have had the problem of consistent failures on a high end machine.\

Thanks,

eightiesboi

 

 

 

Link to post
Share on other sites
2 hours ago, eightiesboi said:

Hi linuxgurugamer,

Was this implemented in KLF? I too have had the problem of consistent failures on a high end machine.\

Thanks,

eightiesboi

 

 

 

Good catch.

No, it hasn't been (yet).

but, quoting that same article:

Also you are kinda re-inventing the wheel: the default constructor of the Random class already uses the current clock time as default seed.

There are also at least two different random number generators being used by KLF.  When I get to it, I'll clean that up and make sure it's random (or as random as it can be).

Edited by linuxgurugamer
Link to post
Share on other sites
2 hours ago, linuxgurugamer said:

Good catch.

No, it hasn't been (yet).

but, quoting that same article:

Also you are kinda re-inventing the wheel: the default constructor of the Random class already uses the current clock time as default seed.

There are also at least two different random number generators being used by KLF.  When I get to it, I'll clean that up and make sure it's random (or as random as it can be).

Thank you! You are a god among gamers...

Link to post
Share on other sites
13 hours ago, linuxgurugamer said:

Good catch.

No, it hasn't been (yet).

but, quoting that same article:

Also you are kinda re-inventing the wheel: the default constructor of the Random class already uses the current clock time as default seed.

There are also at least two different random number generators being used by KLF.  When I get to it, I'll clean that up and make sure it's random (or as random as it can be).

The problem is more to do with the static constructor,  I'm guessing that it's passing in the ticks since the application started and not the number of ticks since 1970, the static constructor will always fire at the same time, unless module manager is slow for a while. 

I work with a developer who loves to put Random in unit tests,  all his tests work on his machine, but don't work on the server.

Link to post
Share on other sites
8 hours ago, genericeventhandler said:

The problem is more to do with the static constructor,  I'm guessing that it's passing in the ticks since the application started and not the number of ticks since 1970, the static constructor will always fire at the same time, unless module manager is slow for a while. 

I work with a developer who loves to put Random in unit tests,  all his tests work on his machine, but don't work on the server.

According to Microsoft:

Quote
  • The Random() constructor uses the system clock to provide a seed value. This is the most common way of instantiating the random number generator.

New release:  0.4.6

  • Added explicit seed for random number generator
  • Moved two calls which used the UnityEngine.Random to using the System.Random
  • shortened option descriptions to avoid wrapping
  • Moved all random calls to wrapper functions in KLFUtils 
  • Added debug mode to print data to log fil
On 5/5/2017 at 4:38 PM, doggonemess said:

Greetings,

I love this mod, and hope to see it continue. One thing I'm not to fond of is the warning icon. So I remade mine, and wanted to share in case anyone else would like to replace theirs, too.

Thanks to linuxgurugamer for all of your hard work in the KSP modding community! I don't know how you keep on top of so many projects.

EDIT AGAIN: So it 'forgot' my image url and I gave up and uploaded them to my own webserver. I also found a "part failed" indicator that I made before, but I'm not that fond of it.

warning.pngwarning2.pngfailed.png

Jamie

Will be in the next release (0.4.7)

Thanks

Link to post
Share on other sites
45 minutes ago, Euer_Hochwuergen said:

Quick Question, im using KOS via stage command for my launches, does this trigger the onLaunch event, or do i also have to press the spacebar physically to fire the first stage and initialize the onLaunch event?

Thx in advance.

I have absolutely no idea, I do not use Kos. I look forward to hearing your report as to whether it works or not.

Link to post
Share on other sites
3 hours ago, Euer_Hochwuergen said:

Quick Question, im using KOS via stage command for my launches, does this trigger the onLaunch event, or do i also have to press the spacebar physically to fire the first stage and initialize the onLaunch event?

Thx in advance.

kOS's stage command invokes the KSP API StageManager.ActivateNextStage() call.  Which does fire off an onLaunch event provided an onLaunch event hasn't already been fired for this "scene" instance.

 

Link to post
Share on other sites
  • 2 weeks later...
On 9/23/2017 at 1:35 PM, HaydenTheKing said:

I've looked into the failure thing a little more.  It doesn't seem to be working when i use on a existing save.  It only works on a new save for me.

 

Mod list https://imgur.com/a/R4LbN

Log https://www.dropbox.com/s/labu3v45kw4wh5e/output_log4.txt?dl=0

Thanks.

I'm a bit busy right now, but I'll take a look at this sometime this week.

Link to post
Share on other sites
  • 2 weeks later...

I mean it's probably intentional, but is there any way to disable launch failure on aircraft. It's very silly for the aircraft to fail, and very annoying with mods like KCT because unlike rockets you can reuse them, is there maybe an option to disable theese for any vehicle launched from the SPH. Thanks in advance.

Link to post
Share on other sites
  • 1 month later...

Gah! [said in a Skippers voice ala Gilligan] @linuxgurugamer!!!!
I go to the trouble of putting together an interesting satellite, and think myself clever with sticking with an OK fuel budget. I was proud of my efforts as I'm a really crappy craft designer and this was a rare moment of prettiness using random parts.
Oh, I say "interesting" as I thought it looked nice with two small maneuvering engines either size of the craft. They were there as I planned to use them for the 2nd half of the Mun transfer and final scanner altitude circularization. 

Launch... all good
Circularize the orbit around Kerbin,... all good
Plotted the node for the burn to the Mun.. fine!
Execute the burnfor the Mun... all good until your...  ummm ok.. nice words...   "MOD" goes and takes one of those little engines and gives it a failure that constantly various the trust limiter.

IT WAS AWESOME! :D I haven't have such an engaging trial that required that much effort to get something small and trivial to the Mun. I was fighting that blasted broken thruster for whole of the Munar transfer and went over budget. After adjusting the limiter of the good engine to 50% to help my effort using only the ration wheel of an OCTO core, I pushed on and completed the other 2 burns and I loved every minute of it all. Finally got into a 250km orbit with only 20m/s left. I was supposed to have 400m/s left for post scanning activities.

Thanks for this piece of work. I'm pretty sure it will be a standard for all my career games in the future.

 I look forward to the next "issue", but I hope it waits until I have an escape system for my Kerbals. They're been relying of crossed fingers until this point as I've only just unlocked my first 300 Science Node and it wasn't the one with the LES.

Link to post
Share on other sites
5 hours ago, wile1411 said:

Gah! [said in a Skippers voice ala Gilligan] @linuxgurugamer!!!!
I go to the trouble of putting together an interesting satellite, and think myself clever with sticking with an OK fuel budget. I was proud of my efforts as I'm a really crappy craft designer and this was a rare moment of prettiness using random parts.
Oh, I say "interesting" as I thought it looked nice with two small maneuvering engines either size of the craft. They were there as I planned to use them for the 2nd half of the Mun transfer and final scanner altitude circularization. 

Launch... all good
Circularize the orbit around Kerbin,... all good
Plotted the node for the burn to the Mun.. fine!
Execute the burnfor the Mun... all good until your...  ummm ok.. nice words...   "MOD" goes and takes one of those little engines and gives it a failure that constantly various the trust limiter.

IT WAS AWESOME! :D I haven't have such an engaging trial that required that much effort to get something small and trivial to the Mun. I was fighting that blasted broken thruster for whole of the Munar transfer and went over budget. After adjusting the limiter of the good engine to 50% to help my effort using only the ration wheel of an OCTO core, I pushed on and completed the other 2 burns and I loved every minute of it all. Finally got into a 250km orbit with only 20m/s left. I was supposed to have 400m/s left for post scanning activities.

Thanks for this piece of work. I'm pretty sure it will be a standard for all my career games in the future.

 I look forward to the next "issue", but I hope it waits until I have an escape system for my Kerbals. They're been relying of crossed fingers until this point as I've only just unlocked my first 300 Science Node and it wasn't the one with the LES.

Are you sure it was Kerbal Launch Failure and not Dang It!  ?  KLF doesn't do anything after launch.

Link to post
Share on other sites

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