EnzoMeertens

[1.7.0] Kerbal Krash System (0.4.7) 2018-04-26

Recommended Posts

On 1/10/2016 at 10:25 AM, EnzoMeertens said:

tions today, looks a lot better and a lot less spikey now.

Worked on repairing, seems to work properly... Mostly. (Some dents are too big and are not easily recalculated to their repaired state, I'll fix that soon).

Working on KIS (Kerbal Inventory System) integration as we speak.

Should be using .Net 3.5 https://github.com/EnzoMeertens/KerbalKrashSystem/issues/6

Share this post


Link to post
Share on other sites

Does this use any KSPField's to signify some type of damage level? Like a 0-1 (or 0-100) float for damage percentage. Something like that would allow for other mods to easily grab said value from the KKS partModule and alter a part's behavior.

Share this post


Link to post
Share on other sites

So some parts will expode if they take enough damage but for the most part just get weaker?
 

Share this post


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

Does this use any KSPField's to signify some type of damage level? Like a 0-1 (or 0-100) float for damage percentage. Something like that would allow for other mods to easily grab said value from the KKS partModule and alter a part's behavior.

Yes. That's the idea behind KKS-mods.

 

5 hours ago, rbray89 said:

Thanks!

 

2 hours ago, War Eagle 1 said:

So some parts will expode if they take enough damage but for the most part just get weaker?
 

Exactly.

Share this post


Link to post
Share on other sites
20 minutes ago, EnzoMeertens said:

Yes. That's the idea behind KKS-mods.

 

Thanks!

 

Exactly.

I also replied to your comment on github.

Share this post


Link to post
Share on other sites

Incredible proof of concept mod, congrats on the blog inclusion.

 

I'd love for Squad to take a hint from this, since "damage that isn't just some vaporizing, red pop" has been on a lot of players want list for a while. Actual, real damage as opposed to some gimmicky explosion.

Share this post


Link to post
Share on other sites

Question - can resources have negative mass?

The reason I ask is this: a piece of ship hull is full of negative mass resource, representing displaced water. The part gets damaged and begins to leak, losing the resource (simulating filling with water). It then sinks.

Alternatively or additionally, a KKS mod could directly link damage to a reduction in overall part buoyancy.

Share this post


Link to post
Share on other sites
1 hour ago, colmo said:

Question - can resources have negative mass?

The reason I ask is this: a piece of ship hull is full of negative mass resource, representing displaced water. The part gets damaged and begins to leak, losing the resource (simulating filling with water). It then sinks.

Alternatively or additionally, a KKS mod could directly link damage to a reduction in overall part buoyancy.

Your reasoning is the same path I took at first, then I found Unity/KSP cannot handle negative mass for a resource.

If you read the tutorial how to build a ship with my mod, it will become clear. Essentially they're virtual compartments filling with water unless the hull plating takes it away. Destroy the hull plate associated with that compartment -> it fills up. In the future I hope to include a reduction in efficiency instead of an explosion, and If the dev team gives us documentation on how to fine tune ModuleCoreHeat, we can even simulate fire.

Share this post


Link to post
Share on other sites
12 hours ago, colmo said:

Question - can resources have negative mass?

The reason I ask is this: a piece of ship hull is full of negative mass resource, representing displaced water. The part gets damaged and begins to leak, losing the resource (simulating filling with water). It then sinks.

Alternatively or additionally, a KKS mod could directly link damage to a reduction in overall part buoyancy.

10 hours ago, Azimech said:

Your reasoning is the same path I took at first, then I found Unity/KSP cannot handle negative mass for a resource.

If you read the tutorial how to build a ship with my mod, it will become clear. Essentially they're virtual compartments filling with water unless the hull plating takes it away. Destroy the hull plate associated with that compartment -> it fills up. In the future I hope to include a reduction in efficiency instead of an explosion, and If the dev team gives us documentation on how to fine tune ModuleCoreHeat, we can even simulate fire.

This is (or at least used to be) possible. In a buoyancy mod I made a few months ago (before Squad introduced their own buoyancy system), I didn't stop draining my tanks of water at 0.0. Which caused it to drain to a negative amount.

It's probably not possible through the use of the config-files.

 

5 hours ago, evileye.x said:

OMG, so incredible mod!

Can't beleive it's happening, super-cool!

14 hours ago, The Real Franklin said:

Incredible proof of concept mod, congrats on the blog inclusion.

I'd love for Squad to take a hint from this, since "damage that isn't just some vaporizing, red pop" has been on a lot of players want list for a while. Actual, real damage as opposed to some gimmicky explosion.

Thank you! :lol:

 

I've been working on KKS-mod for the past few hours. KKS + KIS (Kerbal Inventory System) seems to be very easy now:

IDoubtAWrenchWillDoTheTrick.jpg?raw=true

If I unequip the wrench, the repair-option will disappear. If I equip the wrench (or the screwdriver), the repair-option will appear.

 

If anyone has any idea on how to reset a model/part in Unity/KSP, please let me know.

Now I just invert my damage-calculation tot repair the models/parts, but this doesn't ensure the desired effect. Resetting would work 100% of the time.

Edited by EnzoMeertens

Share this post


Link to post
Share on other sites
On 07/01/2016 at 6:10 PM, skykooler said:

I wonder if it would be possible for impacts to move node positions - like, so if you crash then end of a three-part wing into the ground, the whole wing bends?

Second the motion. This would also provide some change to flight characteristics in a FAR world - it might still think each wing part is the shape it always was, but it can certainly tell they're not in the same orientation. It would also provide a way for purely structural parts to degrade.

Share this post


Link to post
Share on other sites
17 minutes ago, damerell said:

Second the motion. This would also provide some change to flight characteristics in a FAR world - it might still think each wing part is the shape it always was, but it can certainly tell they're not in the same orientation. It would also provide a way for purely structural parts to degrade.

I don't know how FAR works. As far as I know FAR is a massive mod, digging into their source code and trying to figure out how everything works would probably result in a few days/weeks of not working on anything else KKS-related.

This is something to look at way down the line.

 

I'll upload a new version tomorrow. 

This new version will include:

  1. Loosely coupled KIS-support (using wrenches/screwdrivers to repair damage in EVA),
  2. Disable repair from non-EVA.
  3. Refactored some parts of my code to allow for easier KKS-mods.

Share this post


Link to post
Share on other sites
13 minutes ago, EnzoMeertens said:

I don't know how FAR works. As far as I know FAR is a massive mod, digging into their source code and trying to figure out how everything works would probably result in a few days/weeks of not working on anything else KKS-related.

Right, but what I'm saying is if nodes shifted, that would both be nice (ie, annoying) in a non-FAR world and cause craft to fly oddly in a FAR world without having to understand FAR at all.

Share this post


Link to post
Share on other sites
4 hours ago, EnzoMeertens said:

If anyone has any idea on how to reset a model/part in Unity/KSP, please let me know.

Now I just invert my damage-calculation tot repair the models/parts, but this doesn't ensure the desired effect. Resetting would work 100% of the time.

Yeah I saw this in your recent upload. I was going to mention that it wouldn't quite work... the easiest way would be to iterate over the part.partInfo.partPrefab and reset all the vertices.

Share this post


Link to post
Share on other sites
33 minutes ago, rbray89 said:

Yeah I saw this in your recent upload. I was going to mention that it wouldn't quite work... the easiest way would be to iterate over the part.partInfo.partPrefab and reset all the vertices.

This is brilliant.

 

Quote

Right, but what I'm saying is if nodes shifted, that would both be nice (ie, annoying) in a non-FAR world and cause craft to fly oddly in a FAR world without having to understand FAR at all.

By nodes, do you mean attachment nodes?

Edited by EnzoMeertens

Share this post


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

I don't know how FAR works. As far as I know FAR is a massive mod, digging into their source code and trying to figure out how everything works would probably result in a few days/weeks of not working on anything else KKS-related.

This is something to look at way down the line.

 

On 09/01/2016 at 6:01 PM, monstah said:

 

@ferram4 will answer better, but AFAIK for that to work you just have to deform the colliders along with the graphical geometry

 

On 10/01/2016 at 11:16 AM, monstah said:

I don't know if this mod currently deforms them or not, I'm just saying that, if it does, it'll affect FAR aerodynamics as expected :) 

;)

Calling in @ferram4 again just to make sure I gave you the correct information.

Share this post


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

Yeah I saw this in your recent upload. I was going to mention that it wouldn't quite work... the easiest way would be to iterate over the part.partInfo.partPrefab and reset all the vertices.

This doesn't seem to work. The part.partInfo.partPrefab doesn't seem to contain a meshfilter or mesh.

Share this post


Link to post
Share on other sites
6 minutes ago, EnzoMeertens said:

This doesn't seem to work. The part.partInfo.partPrefab doesn't seem to contain a meshfilter or mesh.

you should be using MeshFilter[] meshList = part.FindModelComponents<MeshFilter>(); there is a big difference between this and the FindInChild mechanism.

Share this post


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

By nodes, do you mean attachment nodes?

Exactly, as suggested above. This would also degrade parts with only structural functions.

Share this post


Link to post
Share on other sites
12 minutes ago, rbray89 said:

you should be using MeshFilter[] meshList = part.FindModelComponents<MeshFilter>(); there is a big difference between this and the FindInChild mechanism.

Thank you. This works perfectly!

Share this post


Link to post
Share on other sites

By reading through the last posts I take it that repairing parts only takes some tool to be equiped and happens instantly. How do you feel about needing some ressource (spare parts?) for repairs as well that an engineer could salvage from other parts by breaking them (besides it coming in containers) and repairs (and salvaging) taking time? Together with some other mods (live support) this could turn a crash landing into an interesting fight for survival with decisions like "do I first fix the oxygen leak or the fuel leak?" or "do I try to get back in time with a broken air scrubber or do I salvage spare part from the engine to repair it?"

Share this post


Link to post
Share on other sites

I think that damaged engine bells should also be given a slightly off-center thrust vector.

Share this post


Link to post
Share on other sites

I think I might be record holder for damage percentage on a part.

Spoiler

gOUU2G3.png

If its too small to read the damage percentage is nearly forty thousand percent on the poor AES pod. How Jeb survived is beyond me.

Edited by FungusForge

Share this post


Link to post
Share on other sites

For damaged reaction wheels, you could lower the torque they produce, as well as for wheels, so they get less powerful.

 

(If possible, Kerbal Foundries support would awesome for that, somewhere in the distant future...)

Share this post


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.