Jump to content

[1.12.x] Kerbal Launch Failure Revived


linuxgurugamer

Recommended Posts

1 minute ago, linuxgurugamer said:

Science reward isn't really the aim.  If there's interest, I could add it

Great thinking that the rest is already implemented.

I think getting some science is a great reward and incentive to not revert to launch. "Damn that sucked... but at least I got 10 science out of it" or something along those lines. The amount of science could be proportional to the launch cost (and top out at a maximum). So your $200,000 fuel launcher might blow up spectacularly, but hey, 12 science! Kaching! :)

Link to comment
Share on other sites

8 minutes ago, Kerbart said:
11 minutes ago, linuxgurugamer said:

Science reward isn't really the aim.  If there's interest, I could add it

Great thinking that the rest is already implemented.

I think getting some science is a great reward and incentive to not revert to launch. "Damn that sucked... but at least I got 10 science out of it" or something along those lines. The amount of science could be proportional to the launch cost (and top out at a maximum). So your $200,000 fuel launcher might blow up spectacularly, but hey, 12 science! Kaching!

After thinking about it, great idea.

I'm implementing it now, any suggestions for how much science to generate in the event of a failure?

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

After thinking about it, great idea.

I'm implementing it now, any suggestions for how much science to generate in the event of a failure?

If you can find out the value of the vessel, I'd use that as a proportion. That might not be “realistic” (because we’re all about realism in a game that is about sending cartoonish green bug-eyed aliens into space) but it provides the best incentive for “allowing” big vessels to explode (without reverting) without abusing it to get disproportionate science returns from small ships.

Also, and this goes almost without a saying, there's a chance of 1:50 (or whatever the chances are) every launch to go boom, or is it literally once every 50? Just because I do like the unpredictability.

Link to comment
Share on other sites

1 minute ago, Kerbart said:

If you can find out the value of the vessel, I'd use that as a proportion. That might not be “realistic” (because we’re all about realism in a game that is about sending cartoonish green bug-eyed aliens into space) but it provides the best incentive for “allowing” big vessels to explode (without reverting) without abusing it to get disproportionate science returns from small ships.

Also, and this goes almost without a saying, there's a chance of 1:50 (or whatever the chances are) every launch to go boom, or is it literally once every 50? Just because I do like the unpredictability.

Value of vessel is easy, I'm also trying to link it to the science costof the failing part.

So for example, something I'm toying with is:

sci = science cost of node part is in

cost = vessel cost (excluding fuel)

scienceAwarded = sci /10 * cost /100

I'm not sure of the numbers yet, I still haven't yet figured out how to get the science cost of a part in the flight scene

It is a chance of 1:50 (ie:  2% chance of failure every fligh), not exactly once every 50.

 

Link to comment
Share on other sites

Sounds good to me.

Here's a thought to add more excitement. If in Career mode, and the part is not unlocked (meaning you're using a part that is listed in a test contract), increase the chances of failure significant. To maybe 1:10 or something like that. After all, it's a new experimental part! :)

Link to comment
Share on other sites

21 minutes ago, Kerbart said:

Sounds good to me.

Here's a thought to add more excitement. If in Career mode, and the part is not unlocked (meaning you're using a part that is listed in a test contract), increase the chances of failure significant. To maybe 1:10 or something like that. After all, it's a new experimental part! :)

Me likes!!!!!!!

Link to comment
Share on other sites

1 hour ago, Kerbart said:

Sounds good to me.

Here's a thought to add more excitement. If in Career mode, and the part is not unlocked (meaning you're using a part that is listed in a test contract), increase the chances of failure significant. To maybe 1:10 or something like that. After all, it's a new experimental part! :)

So, if there is one (or more) experimental parts on the craft, how much should the odds change for those parts?

Link to comment
Share on other sites

26 minutes ago, linuxgurugamer said:

So, if there is one (or more) experimental parts on the craft, how much should the odds change for those parts?

I'd make them 1:10. That's pretty severe but it adds a good amount of excitement :D
But somehow increase the science we get from that failure compared to regular ones. It's SCIENCE! after all!

Edited by Kerbart
Link to comment
Share on other sites

1 hour ago, Kerbart said:

I'd make them 1:10. That's pretty severe but it adds a good amount of excitement :D
But somehow increase the science we get from that failure compared to regular ones. It's SCIENCE! after all!

Reasonable, but if the setting is already above 10%, I'll double the chances for that part, I think.  But if someone is playing at those levels, they are probably gluttens for punishment

4 minutes ago, linuxgurugamer said:

Reasonable, but if the setting is already above 10%, I'll double the chances for that part, I think.  But if someone is playing at those levels, they are probably gluttens for punishment

I think I'll add a setting for the chance for an experimental part to fail

Link to comment
Share on other sites

H'mm,

KSP - AVC is showing that 0.1 is current and that 0.3 is available.

The version file shows 0300.

Is there some reason (format?) that ksp-avc is confused with this latest version?

Cheers,

Found problem.

Seems there was an installation error resulting from a problem located between keyboard and chair.

Cheers.

Edited by drtedastro
found reason for version issue
Link to comment
Share on other sites

Version 0.3.0 is failing to fail.  Repeated attempts show no failures occurring, even though failure rates are set to 100%.

 

Checked the logs, and found this when the vehicle launches:

[ERR 00:24:00.196] Exception handling event onLaunch in class KerbalLaunchFailureController:System.NullReferenceException: Object reference not set to an instance of an object
  at KerbalLaunchFailure.KLFUtils.PartIsRadialDecoupler (.Part part, Boolean techRequired) [0x00000] in <filename unknown>:0 
  at KerbalLaunchFailure.KLFUtils+<>c.<ExperimentalPartsPresentAndActive>b__10_1 (.Part o) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[Part].MoveNext () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.List`1[Part].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.List`1[Part]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.ToList[Part] (IEnumerable`1 source) [0x00000] in <filename unknown>:0 
  at KerbalLaunchFailure.KLFUtils.ExperimentalPartsPresentAndActive () [0x00000] in <filename unknown>:0 
  at KerbalLaunchFailure.Failure.Occurs () [0x00000] in <filename unknown>:0 
  at KerbalLaunchFailure.KerbalLaunchFailureController.FailureStartHandler (.EventReport eventReport) [0x00000] in <filename unknown>:0 
  at EventData`1[EventReport].Fire (.EventReport data) [0x00000] in <filename unknown>:0 

[EXC 00:24:00.209] NullReferenceException: Object reference not set to an instance of an object
	KerbalLaunchFailure.KLFUtils.PartIsRadialDecoupler (.Part part, Boolean techRequired)
	KerbalLaunchFailure.KLFUtils+<>c.<ExperimentalPartsPresentAndActive>b__10_1 (.Part o)
	System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[Part].MoveNext ()
	System.Collections.Generic.List`1[Part].AddEnumerable (IEnumerable`1 enumerable)
	System.Collections.Generic.List`1[Part]..ctor (IEnumerable`1 collection)
	System.Linq.Enumerable.ToList[Part] (IEnumerable`1 source)
	KerbalLaunchFailure.KLFUtils.ExperimentalPartsPresentAndActive ()
	KerbalLaunchFailure.Failure.Occurs ()
	KerbalLaunchFailure.KerbalLaunchFailureController.FailureStartHandler (.EventReport eventReport)
	EventData`1[EventReport].Fire (.EventReport data)
	UnityEngine.Debug:LogException(Exception)
	EventData`1:Fire(EventReport)
	KSP.UI.Screens.StageManager:ActivateStage(Int32)
	KSP.UI.Screens.StageManager:ActivateNextStage()
	FlightInputHandler:Update()

Let me know if you need more information from me.

Link to comment
Share on other sites

7 hours ago, razark said:

Version 0.3.0 is failing to fail.  Repeated attempts show no failures occurring, even though failure rates are set to 100%.

It seems like it happens on any vessel without experimental parts. Have same issue. 0.2 still works.

But I managed to hit something else: I was testing it on Ravenspear MkI (stock) and I've got DivisionByZero while Panther jet engine was failing. So I tried to test it in isolated environment in clean install with craft assembly containing only one Panther, Fuel tanks, Intake and Mk1Inline Cockpit. And it repeats:

[EXC 15:41:51.734] InvalidOperationException: Operation is not valid due to the current state of the object
        System.Linq.Enumerable.Single[ModuleEngines] (IEnumerable`1 source)
        KerbalLaunchFailure.Failure.PrepareStartingPart ()
        KerbalLaunchFailure.Failure.Run ()
        KerbalLaunchFailure.KerbalLaunchFailureController.RunFailure ()
        KerbalLaunchFailure.KerbalLaunchFailureController.FixedUpdate ()
[EXC 15:41:56.801] DivideByZeroException: Division by zero
        KerbalLaunchFailure.Failure.CauseStartingPartFailure ()
        KerbalLaunchFailure.Failure.Run ()
        KerbalLaunchFailure.KerbalLaunchFailureController.RunFailure ()
        KerbalLaunchFailure.KerbalLaunchFailureController.FixedUpdate ()

...

(looks like happens in a loop, so more messages like this)

Digging into the code, blaming ModuleEnginesFX instead of ModuleEngines used in this part.

 

Btw, is there is a way to disable audible and/or visual alarm before failure?

Edited by ThirdOfSeven
formatting, but it is not working anyway
Link to comment
Share on other sites

Great Mod, and Thank You for all ur involvement linuxgurugamer !

Currently testing ver. 0.3.1 ...

I can see so much potential for expanding this mod, wish I knew how to program, might learn in order to implement what I seek.

... Have a Master Warning and/or Master Caution light/button that illuminates with a failure, and have it extinguish and disable the audible alarm when pressed...

     (Definitely need a way to cancel the audible alarm!)

...Disable the text so you don't know what failure is occurring, requiring checking the instruments. (Ravien's Critical Temperature Gauge, NanoGauges)

...Slower the Engine Overheating and Reduced Thrust actions to buy some time to analyze the failure that occurred, and/or have corresponding warning lights.

 

Thanks for all the work making a Kerbals life more dangerously interesting. :) 

 

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

So as I understand it, if there are NOT any experimental parts on, it fails to fail.

If there are, it does

Please confirm

My experience has mostly been testing in sandbox, with a number of other mods installed, so I cannot confirm.

I've got a clean install with only this mod in which I have observed the same failure to fail.  I'll go poke at a career game on that one and see what I can find.

 

On 11/4/2016 at 2:43 AM, Dentar said:

(Definitely need a way to cancel the audible alarm!)

I'd also like to second this request.  Either a limit to the sound length, or a button to cancel it.

Edited by razark
Link to comment
Share on other sites

1 hour ago, razark said:

My experience has mostly been testing in sandbox, with a number of other mods installed, so I cannot confirm.

I've got a clean install with only this mod in which I have observed the same failure to fail.  I'll go poke at a career game on that one and see what I can find.

 

I'd also like to second this request.  Either a limit to the sound length, or a button to cancel it.

I'll add a button to stop the alarm.

In the meantime, until I get back home, if people could post  (if you haventalready) specific instances of failure, along with log files, that would be helpful

On 11/4/2016 at 3:43 AM, Dentar said:

Great Mod, and Thank You for all ur involvement linuxgurugamer !

Currently testing ver. 0.3.1 ...

I can see so much potential for expanding this mod, wish I knew how to program, might learn in order to implement what I seek.

... Have a Master Warning and/or Master Caution light/button that illuminates with a failure, and have it extinguish and disable the audible alarm when pressed...

     (Definitely need a way to cancel the audible alarm!)

...Disable the text so you don't know what failure is occurring, requiring checking the instruments. (Ravien's Critical Temperature Gauge, NanoGauges)

...Slower the Engine Overheating and Reduced Thrust actions to buy some time to analyze the failure that occurred, and/or have corresponding warning lights.

 

Thanks for all the work making a Kerbals life more dangerously interesting. :) 

 

Please add these as individual issues on github, other than a way to mute the alarm

Edit:  I didn't realize that the issues were disabled on github, they are now enabled

Edited by linuxgurugamer
Link to comment
Share on other sites

3 hours ago, linuxgurugamer said:

So as I understand it, if there are NOT any experimental parts on, it fails to fail.

If there are, it does

Please confirm

The failure rate was set to 100% for all these tests:

No failures or errors in Career without experimental part.  (Log 1)
No failures, but error shows in log in Sandbox. (Log 2)
No failures or errors in Career with experimental part. (Log 3)
Failure in Career without experimental part.  (Log 4)

 

I'm guessing the error I saw is related to sandbox mode.  The results of 1 and 3 may just be due to the fact the failure didn't have time to occur, due to altitude and time constraints.

Link to comment
Share on other sites

3 minutes ago, razark said:

The failure rate was set to 100% for all these tests:

No failures or errors in Career without experimental part.  (Log 1)
No failures, but error shows in log in Sandbox. (Log 2)
No failures or errors in Career with experimental part. (Log 3)
Failure in Career without experimental part.  (Log 4)

 

I'm guessing the error I saw is related to sandbox mode.  The results of 1 and 3 may just be due to the fact the failure didn't have time to occur, due to altitude and time constraints.

Yes, that pretty much confirms what I just (2 minutes) found.  It has to do with tech availability not being relevent in sandbox mod, yet the mod was checking.

I have it working, but before I release, i want to see if i can get a way to silence the alarm

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