Jump to content

[WIP] [Dev thread] Dang it! A random failures mod


Ippo

Recommended Posts

Yes, they are just a normal resource like any other, except that it cannot flow.

As such, it can be config'd into any part you like: I still didn't think about how, just that one day there will be containers.

Just a little ago I saw this, tell me it isn't the perfect container :)

LOL yep that container would fit very nice.

Link to comment
Share on other sites

I downloaded the mod yesterday and learned that if a fuel tank get ruptured, you can neither take fuel out of it(making it unusable for engines) nor putting fuel in it.

I don't think that realistic: even if a tank is ruptured, you can still take fuel out of it and put fuel in it: you would still lose fuel though.

(also, I can't wait for my first failure with this mod :D)

Link to comment
Share on other sites

I downloaded the mod yesterday and learned that if a fuel tank get ruptured, you can neither take fuel out of it(making it unusable for engines) nor putting fuel in it.

I don't think that realistic: even if a tank is ruptured, you can still take fuel out of it and put fuel in it: you would still lose fuel though.

(also, I can't wait for my first failure with this mod :D)

You might be able to put fuel into it, but taking fuel out would be difficult, since all tanks (even for turbopump-fed rather than pressure-fed engines) keep their contents under a fair amount of pressure. And a ruptured tank would lack that pressure.

Link to comment
Share on other sites

You might be able to put fuel into it, but taking fuel out would be difficult, since all tanks (even for turbopump-fed rather than pressure-fed engines) keep their contents under a fair amount of pressure. And a ruptured tank would lack that pressure.

I'm trusting your your judgement here... what do I do? Lock both, lock none, or lock out?

Link to comment
Share on other sites

Request for comment: inspections and intelligence.

After an inspection, you should be safe for a little while. So I was thinking that I could set a time (say, 60 seconds) during which the failure chance goes from 0 to 100% of its normal value. More technically, I want to multiply the failure chance for the function:

f(t) = t if 0 < t < T, 1 otherwise

where of course t is the time since the inspection and T is the duration of the inspection bonus.

Regarding intelligence: I was thinking that the intelligence of the kerbal should give you a bonus in the number of spares that are used to repair the part. So for example, I could take a random percentage between 0 and the kerbal's intelligence and discount the repair cost by that percentage. In formula,

NewRepairCost = ceil( RepairCost * (1 - Random(0, intelligence)) )

I'm not sure if it's ok to set a minimum intelligence to repair some parts, because then you might find yourself on Eeloo with the wrong crew and you are basically screwed. Also, as it was pointed out before, real repairs are executed in communication with the space center, so it seems somewhat unrealistic that a stupid kerbal cannot repair something even if an antenna is present.

Maybe this can be a model for later? Setting an intelligence requirement, but bypass it if you have an antenna?

Link to comment
Share on other sites

HI, first I've got to say congrats for attempting to make a workable failure sytem, a feature thats been a regular request ssince the early days of KSP. Next well by trade I'm a multi skilled engineer, as such part of me hates this mod and part of me loves it. I'm sure other engineering types have come across the wierd, if you stand and watch it, it'll perform faultlessly, but the moment you turn your back it all turns to %$£^.

Now back on topic in my job many machine and vessel operators have basic skills to repair their faulty machinery, But and it's a big but, it's not the same level of repair in most cases that can be performed by an experienced and trained specialist, and planned preventative maintenance is a part of every engineers life.

so if it's possible within the confines of your code, perhaps the average dumb kerbal could wrap a broken antenna with gaffer tape or apply a composite patch to a damaged tank, as such such repairs would restore functionallity, a get you home type bodge, but these repairs would be of a lower standard with less durability than a Jeb style fix, even with communication the standard of repair would be restricted within that kerbals understanding of the sytems or structures involved.

I know this as I have many times diagnosed faults on vessels at sea while I was sitting in front of a PC in the office, and in reality sometimes you just can't win, the parts to repair aren't available on site to carry out the repair or the repair is way above the comfort zone of the operator (this is the part of this mod that I hate btw) so they just limp on at 5knots emergency speed until an engineer can get to the site.

Now I've laid this out , it may be fiendishly difficult to accomplish, and brings us back to the believable or realsitic discussion, is it believable that average kerbal can bodge anything, yes, but 100% repair? nope, it's not really believable or anywhere close to reality . Which is of course why space agencies have specialists.

Hope i've not rambled on too much and you get the general idea of what i'm on about.

Spanner.

Link to comment
Share on other sites

Just a quick devnote to keep you guys up to date.

Right now my code is going through a deep rewrite / inspection, because I had been handling the plugin's lifecycle wrong regarding the persistence.

The persistence layer, by the way, is really getting on my nerves: for some reason, it has now decided that it doesn't feel like writing some fields to the persistence file, so of course when I reload it everything falls apart. -.-

(Specifically, it is refusing to write a bool and a string. A bool, I could believe it, but the string!? EVERYTHING gets written as a string in there!)

Update: moving forwards! In addition to the huge pile of bugs, now also the parts aren't aging anymore for some reason. .-.

Edited by Ippo
Link to comment
Share on other sites

Added a poll: I want to know what you think about timewarp handling.

Also, on the brink of a nervous collapse. Oxider leaks, LiquidFuel doesn't. And Reaction wheel for some reason don't get loaded, but I find no error in the logs. :mad:

Updated update: using computer science's most advanced tools and theorems, I was able to track both problems and solve them.

Edited by Ippo
Link to comment
Share on other sites

Hey Ippo! ('-')/

I'm IRnifty, the developer of the Kerbal Mechanics mod, which went into an accidental coma. I see you've made some interesting progress on your mod that I haven't thought of before! Do you think we could talk a bit? I think we could make a great mod if we pulled our ideas together.

Link to comment
Share on other sites

how about a 'vessel scan' thing - basically, it gives a readout of the things most likely to break in the next few hours/days whatever (like, things that have over a 70% of breaking) so preventative action can be taken. I mean, if you don't look after a car, it'll break down - you can fix problems when they arise, but the best thing is to service it every year.

So if something has an 80% chance of breaking soon, I can go out and lubricate it if it should be moving, or tape it down if it shouldn't. Same actions, but they won't catch you out if you're preparing to do something important.

I don't think this would ruin the mod because A, things under a certain % failure aren't listed so they still might fail and B, you might only have enough spare parts/time to fix a certain amount of things.

That's my thoughts, at least.

So yeah, regarding pre-emptive fixing (or general maintenance), as I mentioned, things that are below the set threshold aren't listed (if things that are 70% likely to break are listed, then things that are 69% likely to break have pretty much the same likelihood, but won't be shown) and you might not have enough parts or time to fix things to your satisfaction.

Another way to deal with stopping it from being OP is the vessel scan could come from a specific part. And, as is the point of this mod, parts can fail... see what I mean? :P It could give false readings, basically. It's all very well having a light tell you if an engine is failing in real life, but if the light fails...

Link to comment
Share on other sites

So yeah, regarding pre-emptive fixing (or general maintenance), as I mentioned, things that are below the set threshold aren't listed (if things that are 70% likely to break are listed, then things that are 69% likely to break have pretty much the same likelihood, but won't be shown) and you might not have enough parts or time to fix things to your satisfaction.

Another way to deal with stopping it from being OP is the vessel scan could come from a specific part. And, as is the point of this mod, parts can fail... see what I mean? :P It could give false readings, basically. It's all very well having a light tell you if an engine is failing in real life, but if the light fails...

You know what? That's an interesting idea, but I'd call it a detailed systems report more so than a scan. And how about this: If the report contains false info, the report could also "glitch" in random characters, replacing others within the false entry containing the bad part, every second or few, such that with vigilance, the false report could be spotted and something done about it.

Link to comment
Share on other sites

You know what? That's an interesting idea, but I'd call it a detailed systems report more so than a scan. And how about this: If the report contains false info, the report could also "glitch" in random characters, replacing others within the false entry containing the bad part, every second or few, such that with vigilance, the false report could be spotted and something done about it.

A very good idea, I think. the systems report could just not scan the scanner (because reasons) and instead of

Controlsurface1 chance of failure: 76%

there'd be:

Con#~olsu^fa_e1 c??nc  f fai*"]e: 70%

That would indicate the systems report part is badly in need of repair. If it was just one character glitched out, that would still be pretty reliable, but the worse it got, the more wrong the numbers (either false positive or negative - it tells you to fix the engine gimbal but you really needed to fix the SAS, which wasn't listed).

I've no idea how doable that is though, if even at all. But that's probably how I'd do it if I could.

Link to comment
Share on other sites

I've no idea how doable that is though, if even at all. But that's probably how I'd do it if I could.

It isn't the hardest thing to do, but it would take some work... I'm sure I could achieve something decent given time. I'm actually trying to start talks with Ippo. I'm going to see if we can't share our ideas and make our mods better, or even merge them.

Link to comment
Share on other sites

These ideas are very good for an interface, and I'll consider them.

However, I'm more interested in how to model the effects on reliability :)

My idea now would be twofold (I really hope it is an actual word):

- temporary, partial immunity to failure: as I describe above, for a short time after the inspection the failure chance will be reduced, increasing linearly back to its normal value;

- permanent discount on the age: for the maintenance to have any actual effect on the part, we need to reduce its age. In fact, in the current model, the failure chance is only a function of the age. I was thinking that I could subtract from the age a percentage of the time that has passed since the last inspection.

Let's say that you have a tank that is 1 year old and was last inspected 6 months ago: for example, inspecting it now would remove 2 months from the part's age (or another fraction of those 6 months) thus making it more reliable from this point on. If I perform a new inspection 3 weeks from now, I only discount 1 week.

On the other hand, we might discount a percentage of the total age of the part. This model is simpler, but has 2 BIG problems:

- because of the non-linearity in the aging function (well, actually in the failure chance function) inspecting earlier is a lot more profitable than inspecting later;

- also, I might just start spamming the inspection and effectively force the part's age to (almost) 0. This can actually be mitigated by having the inspection require the use of spare parts, so that spamming inspections actually becomes more dangerous than just risking it.

Any thoughts? Because otherwise, I'm rooting for the second option.

(as you might be guessing from my obsession with exponentials and formulaes, I'm an engineer IRL)

Edited by Ippo
Link to comment
Share on other sites

...

Hey, sorry, I forgot to answer to you :)

Of course you are absolutely right, any kerbal doing anything is definitely a little OP.

There is one problem with parts only functioning partially: I have no idea how to do that, because the KSP objects were not really meant for this. Some of them are even very hard to disable at all: for reaction wheels, you only need to set one flag; for lights, you need to completely rip the light module from the part so that it technically isn't a light anymore.

What you posted is something that I'd like to do further down along the road... but it might get pushed up if you tell us more about diagnosing ships at sea, this looks like one hell of a job :D

Link to comment
Share on other sites

These are great ideas, and it may be simpler than you think. Take a rocket with an age of x. Make the effect of an inspection, or what I'd simply call maintenance, produce a reduction that is proportional to the age and also proportional to the time since the last inspection. Such that the lower the age, the lower the benefit; the lower the time since the last maintenance, the lower the benefit.

Link to comment
Share on other sites

These are great ideas, and it may be simpler than you think. Take a rocket with an age of x. Make the effect of an inspection, or what I'd simply call maintenance, produce a reduction that is proportional to the age and also proportional to the time since the last inspection. Such that the lower the age, the lower the benefit; the lower the time since the last maintenance, the lower the benefit.

So basically, discount = a*age + b*inspection? I like this :D

Link to comment
Share on other sites

Also, another "feature" could be to allow two type of inspection: the first one is the one described in the previous posts; this type of inspection would consume some resource(the spare parts).

The other type of inspection would use no resources at all: it would simply indicate you the reliability of the part: is the part has any failure(for silent failures)? Is the part reliable enough to attempt a landing?

A way to give an idea of the reliablity could be a text saying like, if the part is not reliable at all, "you inspect the part and think that using it is suicidal. You actually consider yourself lucky that it didn't failed sooner."

Also, I find a "bug". Actually it's not really a bug(and it don't change anything to the mod): When a tank leak, the failure should be announced like this: a tank of [resource] is leaking!

However, it's actually shown like this: a tank of[resource]is leaking! (without space)

yeah, this is why I put "bug" with the brackets

My small experience in programming remind me of all the little mistake like this we all do when programming(of by one errors and such)! :wink:

Link to comment
Share on other sites

Also, another "feature" could be to allow two type of inspection: the first one is the one described in the previous posts; this type of inspection would consume some resource(the spare parts).

The other type of inspection would use no resources at all: it would simply indicate you the reliability of the part: is the part has any failure(for silent failures)? Is the part reliable enough to attempt a landing?

A way to give an idea of the reliablity could be a text saying like, if the part is not reliable at all, "you inspect the part and think that using it is suicidal. You actually consider yourself lucky that it didn't failed sooner."

We were previously discussing a "detailed status report" which would provide the reliabilities of the various parts, but could be subject to failure itself.

Link to comment
Share on other sites

We were previously discussing a "detailed status report" which would provide the reliabilities of the various parts, but could be subject to failure itself.

oops... forgive me for that, I had read the previous pages fast and though that the inspection would provide a reliability bonus. :/

Also, I found a bug(a real one this time :P).

searching for bugs is funnier than I though ;)

You know the little button you can use to lock a resource from being used(the one in the GUI that appear when you click on a part)?

Well, if you use that button to lock a resource when there is a leak, the fuel stop leaking.

EDIT Another bug: the RSC tank of the tree kerbal capsule(MK1-2 command pod) don't lose fuel even though it should be leaking.

when I told you I find bug searching amusing!

Edited by goldenpeach
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...