OHM Damage Module

OrbitHangar

Addon Comments
Joined
Apr 9, 2008
Messages
3,832
Reaction score
18
Points
0

Author: bigmac

An attempt to add a rudimentary damage system to orbiter, the module will destroy a vessel and generate a cloud of debris if the aerodynamic forces climb too high during reentry.

If you have any questions/ suggestions/ problems then please let me know on the forum.
Happy flying!





DOWNLOAD
 
Interesting. Does this destroy the vessel when a certain aerodynamic pressure is reached, a certain acceleration due to aerodynamic forces, or the actual force?
 
Is an SDK sample included?

I'd like to add this functionality to my own addons. (credit would be given of course :tiphat:)
 
A fantastic idea for an add-on. Can't wait to give this one a shot.

A question, be it for the developer or anyone who has tried it so far, how does this play with those vessels which already possess damage and destruction?
 
I just tested Project Outposts:
20121212011228.jpg

20121212011219.jpg

1 FPS :P.

It looks like the damage module is destroying the vessels before the build in damage simulation can do it.
 
Might help if you don't click F9 when you do that ;) :P

Going to check it out tomorrow AM.
 
Sorry for the late replys - I made the mistake of posting the addon just before going to sleep. :)

Does this destroy the vessel when a certain aerodynamic pressure is reached, a certain acceleration due to aerodynamic forces, or the actual force?
At the moment it's the acceleration due do drag, i.e. Drag/Mass. This could definitely be improved, however after some tinkering with different methods, this one seemed to give some reasonable results.

Is an SDK sample included?
Sorry, didn't include a sample, however the module is fairly simple. All it does is spawn the appropriate amount of debris, and delete the vessel - the explosion/random directions of the debris are handled by the pieces of debris themselves. To use it yourself, just create however many "Areswreck" vessels you need in place of the vessel to be destroyed. If there's anything in particular you need to know I can post the code here.

how does this play with those vessels which already possess damage and destruction?
It shouldn't interfere with them at all, as the vessel is entirely deleted on destruction.

I'll try and add a user configurable maximum amount of debris per vessel - in hindsight 50 was probably a little excessive. :)
 
I'll try and add a user configurable maximum amount of debris per vessel - in hindsight 50 was probably a little excessive. :)

It would probably help if you added an exceptions list so that DGIV and new Arrow debris doesnt break down itself-very bad FPS.

I was thinking, It would probably be better if you relate the amount of debris to original vessel mass. More accurate that way :thumbup:.
 
I haven't had the time to try it yet, but will the debris be deleted on impact (or earlier?)
 
Last edited:
It would probably help if you added an exceptions list so that DGIV and new Arrow debris doesnt break down itself-very bad FPS.
I was thinking, It would probably be better if you relate the amount of debris to original vessel mass. More accurate that way :thumbup:.
Forgot about the DGIV debris - I've added exceptions for them now.
The amount of debris was based on the mass of the vessel, but was a little over sensitive - I've reduced it to a slightly more reasonable level.

I have also included a "Lite" version of the module that limits debris to 5 pieces per vessel in case anyone still has frame rate issues.

will the debris get deleted on impact (or earlier?)
At the moment they are deleted when they hit the ground.
 
At the moment it's the acceleration due do drag, i.e. Drag/Mass. This could definitely be improved, however after some tinkering with different methods, this one seemed to give some reasonable results.

Sorry, didn't include a sample, however the module is fairly simple. All it does is spawn the appropriate amount of debris, and delete the vessel - the explosion/random directions of the debris are handled by the pieces of debris themselves. To use it yourself, just create however many "Areswreck" vessels you need in place of the vessel to be destroyed. If there's anything in particular you need to know I can post the code here.

I'd like to see your spawn function if you don't mind.

Having the "Areswreck" vessels handle the explosion/random directions of the debris is quite clever. I wouldn't of thought of that. I was planning to add a "burn up on re-entry" feature to my lunar lander would you be willing to let them be redistributed?

I'll try and add a user configurable maximum amount of debris per vessel - in hindsight 50 was probably a little excessive. :)

Oh come on now, there's really no kill like overkill. :thumbup:

As an aside, you may want to add a "mayfly" function or other user configurable option that deletes wreckage vessels after XX amount of time even if they don't impact the ground.
 
I'd like to see your spawn function if you don't mind.
This should be most of the code you'd need to for it to work with your own addon (assuming that you want to destroy the currently focused vessel):

Code:
VESSELSTATUS status;
OBJHANDLE Wreck;
int Debris=0;

OBJHANDLE Focusvessel = oapiGetFocusObject ();
VESSEL *destroyvessel = oapiGetVesselInterface(Focusvessel);
destroyvessel->GetStatus (status);

while (Debris<Maxdebris){
oapiCreateVessel ("Wreck", "AresWreck", status);
Debris++;
}

oapiDeleteVessel (Focusvessel);

Wreck=oapiGetVesselByName("Wreck");
oapiSetFocusObject(Wreck);
Just use whatever value for "Maxdebris" seems necessary - please feel free to use any of this if you would find it helpful.


As an aside, you may want to add a "mayfly" function or other user configurable option that deletes wreckage vessels after XX amount of time even if they don't impact the ground.
Done, debris will now be removed if it doesn't hit the ground after 10 minutes.
 
It shouldn't interfere with them at all, as the vessel is entirely deleted on destruction.

How about the possibility of this module destroying the vehicle before the vehicle, like the XR-2 or DGIV, says it is destroyed?

I guess one way to do it is, could it be possible to add a black list to this, and tell it to not interfere with certain vessel classes.
 
How about the possibility of this module destroying the vehicle before the vehicle, like the XR-2 or DGIV, says it is destroyed?
At the moment, the XR2/DGIV should be destroyed by their in built damage simulation long before they are by the damage module.
If anyone is having a problem with this not happening I can prevent the module from interfering with them.
 
Just wanted to post a question, & some praise for this addon.

I tried out the damage module with my new Shuttle-D addon last night & found it worked great, I especially like the fact that all debris is deleted, since this acts as a scenario "cleaner" for fairings & spent stages. Vessels attached to a Universal Cargo Deck are destroyed properly too.

My confusion is about what conditions are required for vessel destruction. When I launch the ETS Themis & Shuttle-D stack, I can manage a normal ascent, save that the fairing adapter (just a simple config file mesh placed in order to look right) is destroyed shortly into the ascent no matter what I do, while the rest of the stack is unharmed. What causes it to burn up before everything else?
 
I noticed that this destroys the cargo bay vessel of the XR-2 during takeoff (which I am not even sure what it does).

BTW, is it possible to add destruction for high G impacts on airless bodies as well?
 
I too find, it destoys things during launch.
 
I quote from the Readme file:
If the aerodynamic forces around a vessel become too great, the module will destroy the vessel, and spawn a cloud of debris. At the moment, destruction is triggered by deceleration due to aerodynamic drag, although this could do with quite a bit of refinement.

So, if I'm understanding this, the issue is with it detecting drag-induced deceleration when it shouldn't.
 
Back
Top