Arma 3 Scripting

Arma 3: Jets Hitpoint Configuration

  • Also known as Arma 3 Jets Hitpoint Configuration

Topic · Markdown · JSON · original wiki page

One of the features for the Jets DLC being created was overhaul of our own planes being released, including new hitpoints. Previous state was quite binary - you fly, or you die. However, this update bring more possibilities due to the engine support and i'll try to shed some light into it. This applies for the hitpoints in general, as there is no proper documentation explaining the parameters as far as I'm aware.

There is already one existing guide explaining how the damage model works, and knowledge of this is useful for actual hitpoint configuration and setting the parameters. This guide is focused more on the creation and configuration of the hitzones, however it will scratch the surface of damage model as well.

Hitpoint Parameters

The HitPoints class itself has several parameters, which will be explained in this guide. However there are also two important config parameters, which heavily affect the HitPoints class. Both are in the root of the vehicle class (in other words, they are not part of a subclass such as HitPoints or AnimationSources).

// config.cpp
// ...
class HitPoints : HitPoints
{
    class HitHull : HitHull            { armor = 3;    explosionShielding = 5; name = "Hull_hit";        passThrough = 0.5; visual = ""; radius = 0.3;    minimalHit = 0.02; material = -1; };
    class HitEngine : HitHull        { armor = 1.5;    explosionShielding = 2;    name = "engine_1_hit";    passThrough = 0.5; visual = ""; radius = 0.55;    minimalHit = 0.1; };
    class HitEngine2 : HitEngine    { armor = 1.5;    explosionShielding = 2;    name = "engine_2_hit";    passThrough = 0.5; visual = ""; radius = 0.55;    minimalHit = 0.1; };
    // ...
};
// ...

List of Engine-Supported Hit Zones for Planes

With the development of Jets DLC, the planes have got gotten much more intricate damage, divided to several categories in UI:

The categories will be explained, together with the newly introduced hitpoints for Jets DLC and their gameplay functionality.

HULL

Unsurprisingly, contains one hitpoint category, which is already widely known:

There is not much to explain here, reflects the state of the hull.

ENG

Stands for engine, and there are two hitpoint categories supported by the engine.

Damaging the engine hitpoint reduces the jet's thrust, and therefore, overall performance. The categories above allow to distinguish the single- and twin-engined jets. The thrust reduction is modified accordingly depending on the amount of engines configured (destroying HitEngine will reduce the thrust only to half in case HitEngine2 exists).

FUEL

Fuel hitpoints, and as with the engine, there are two of them engine supported:

Damaging these hitpoints will cause fuel leaks - jet will be continuously losing the fuel. Similarily as with the engine hitpoints, it also depends on the amount of hitpoints configured (with destroyed HitFuel the jet will be losing fuel quickly only to the half of total amount, in case HitFuel2 exists). Fuel will be depleting toll reaching level of HitFuel damage.

CTRL

This category is for the control surfaces of the jets, and engine supports 6 hitpoints in total:

Damaging these hitpoints will be affecting the flight model and hamper the jets ability to change direction. However, to also visually reflect this change, the current animation sources for the flight controls do not reflect any damage, therefore they'll have to be changed for the newly introduced ones:

Note: aileronT and aileronB damage sources were used mainly on the air brakes on A-10 (Wipeout). As the air brakes are located its ailerons, damage versions have been created for better visual representation, however their functionality remains unaffected.

Above are listed all available / supported hitpoints and animation sources. However, not all of them need to be used for every plane - depends on the plane's composition. Not all planes have all of the control surfaces paired. The purpose of animation sources listed above is better visual representation - one the control surface is damaged, it gets stuck (won't move anymore), which adds to authenticity when the flight model gets affected by the new damage model.

INST

This category is reserved for electronic systems in the plane (MFDs, HMDs, HUDs). There is currently only one hitpoint category:

Damaging avionics will disable any HMD or HUD on the jet. However, to disable MFD as well, the animation needs to be manually configured via hide animations dependent on user defined source:

// config.cpp
class AnimationSources : AnimationSources { class HitAvionics { source = "Hit"; hitpoint = "HitAvionics"; raw = 1; }; };

For the animation itself, there are several possible approaches:

  1. Duplicating the selection for turned off displays (display_off), which is hidden at the start and unhidden at certain level of damage. The selection is duplicated, because the original one also uses hide animation on a different source.

    // model.cfg
    class Avionics_damage
    {
        type = hide;
        source = "HitAvionics";
        selection = "Display_off_dmg";
        minValue = 0;
        maxValue = 1;
        hideValue = 0;
        unHideValue = 0.9;
    };
    
  2. Create a selection for certain elements in MFDs (best solution might be to make it virtual parent bone) to simulate partial functionality and hide important data

    // model.cfg
    class MFD_Damage_Hide
    {
        type = hide;
        minValue = 0;
        maxValue = 1;
        hideValue = 0.5;
        source = "HitAvionics";
        selection = "MFD_Damage_Hide";
    };
    

GEAR

There have been many questions regarding this category, so hopefully this guide will clear it: there is no "HitGear" hitpoint. Gear is handled fully by the engine, based on physX wheels configured on the plane. If the landing is too rough, they get destroyed. However, no hitpoint configuration is needed.

Recommendations for Hitpoints in p3d

This guide has been explaining hitpoint parameters and how to do extended damage model for planes. However, there is small part which this guide didn't touch yet: the model. This part will attempt to give some recommendations and good practices when creating the hitpoint LOD for any vehicle. The previously mentioned community guide shows several ways to go it. It might be difficult to pick the right one, but the approach which has been established provides following advice:

  1. Create hitpoints to be within the fire geometry - previous approach often used some vertices from the surface of visual LOD and spheres are created around that. Spheres are then quite exposed to any hit and even more so to the explosive damage. Direct hit needs to pass through FireGeometry and hitpoint sphere alike to deal damage, while explosive damage needs to reach only the sphere. Hitpoints withing FireGeometry will prove more durable and more accurate. This approach also consumes less vertices - instead of a ring around surface, there can be simply one vertex inside. Adjust the sphere size accordingly.
  2. Don't use too many vertices - if the geometry is thick, is it not necessary to have 3x3x9 vertices of radius 0.2 for the engine, for example. 1x1x3 vertices of radius 0.5 will cover it just as well. Less vertices means more performance friendly. If the geometry is too thin (wings, control surfaces), there is also no sense to try and fit it within the geometry, and cover it with huge number small spheres. Such thin geometry is exposed either way so instead of covering it by 4x15 vertices with 0.05 radius, a row 1x5 with 0.2 radius will be enough.