Jump to content

Damage modelling in DCS


heclak

Recommended Posts

would someone be able to explain how damage modelling works in dcs and its relation to the collision model? I know about the Damage list in the aircraft.lua but is that linked to the collision.edm? How does DCS calculate the damage? Does it use the collision.edm to check which part was hit then deduct the hit points from the damage list till critical damage occurs?

or is there some sort of debug mode in DCS or a function to extract the current damage of each part? So that we can modelling the appropriate system failures.

Link to comment
Share on other sites

DCS calculates damage from the collision model and the damage table code inside the aircraft.lua file. In this example, it would be named as "FA-18C.lua". As you mentioned, it is in the aircraft.lua. It is linked to the collision file. The "shape_table_data" variable also will handle the collision model effects once upon crashing the aircraft. Do not mix up collision/damage model from your collision shell. The collision shell is comprised of boxes and lines for:

 

  • Line_MAIN - Top view of the aircraft outlined with a Line shape, given the "collision_line" property.
  • Bounding Box - a box with the height, length and width dimensions of the object's fuselage, given the "collision_shell" property.
  • WHEEL_F - Front wheel collision box, given the "collision_shell" property.
  • WHEEL_L - Left wheel collision box, given the "collision_shell" property.
  • WHEEL_R - Right wheel collision box, given the "collision_shell" property.

 

Unfortunately, I do not remember a whole lot on this subject, but that is as much as I was able to recall. For your question on making correct systems based via damage, if you are depending on the damage of the external model you are able to check the argument number animation values to see if the damaged part appears via. argument number in an avLuaDevice setup as shown.

 

-- let us rep 300 as our damage arg number
local DAMAGE_ARG = 300
local DAMAGE_PART = get_aircraft_draw_argument_value(DAMAGE_ARG)

if DAMAGE_PART:get() == 1:
 print_message_to_user("Part is damaged!")
else
 print_message_to_user("No damage. c:")
end

 

I hope I was able to help answer your question!

Link to comment
Share on other sites

DCS calculates damage from the collision model and the damage table code inside the aircraft.lua file. In this example, it would be named as "FA-18C.lua". As you mentioned, it is in the aircraft.lua. It is linked to the collision file. The "shape_table_data" variable also will handle the collision model effects once upon crashing the aircraft. Do not mix up collision/damage model from your collision shell. The collision shell is comprised of boxes and lines for:

 

  • Line_MAIN - Top view of the aircraft outlined with a Line shape, given the "collision_line" property.
  • Bounding Box - a box with the height, length and width dimensions of the object's fuselage, given the "collision_shell" property.
  • WHEEL_F - Front wheel collision box, given the "collision_shell" property.
  • WHEEL_L - Left wheel collision box, given the "collision_shell" property.
  • WHEEL_R - Right wheel collision box, given the "collision_shell" property.

 

Unfortunately, I do not remember a whole lot on this subject, but that is as much as I was able to recall. For your question on making correct systems based via damage, if you are depending on the damage of the external model you are able to check the argument number animation values to see if the damaged part appears via. argument number in an avLuaDevice setup as shown.

 

-- let us rep 300 as our damage arg number
local DAMAGE_ARG = 300
local DAMAGE_PART = get_aircraft_draw_argument_value(DAMAGE_ARG)

if DAMAGE_PART:get() == 1:
 print_message_to_user("Part is damaged!")
else
 print_message_to_user("No damage. c:")
end

 

I hope I was able to help answer your question!

 

That's the weird thing. I've done some tests which doesn't seem to work that way. I've commented out all the parts in the damage table except for a part that isn't defined in the collision model. If the dependency is really there then I shouldn't be able to take any damage at all. So that is weird for me.

Link to comment
Share on other sites

What part are you referencing to? I assume the damage model table. I don't really know a lot about this subject and would heavily fall on the BGDAM for more information since that has a lot more documented than my bad memory. :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...