Arma 3 Scripting

Arma 3: Damage Enhancement

  • Also known as Arma 3 Damage Enhancement

Topic · Markdown · JSON · original wiki page

Arma 3 Tanks brought with it an overhaul, or rather enhancement of the vehicle damage model as part of the free platform upgrade. The aim is to decrease the flaws of the current damage model and make it easier to configure. However, due to the backwards compatibility it is still based on the old one, and for more knowledge regarding that, there's already an existing guide. This guide will describe the changes which will the platform update for Tanks DLC bring.

Component system

One of the enhancements brought by this platform update is the component system, which allows to use a named selection in the FireGeometry for the hit detection. The sphere system in this damage guide might have been efficient for calculating explosive damage, however not as much for the penetration, seeing the spheres cannot cover the area efficiently. Because of that they started overlapping etc., which was bringing side effects - size and density of the spheres were affecting damage done.

Component system can be connected by adding armorComponent parameter to the hitpoint as in the example below:

// config.cpp
// ...
class HitPoints : HitPoints
{
    class HitSLAT_Left_1
    {
        simulation = "Armor_SLAT";
        armorComponent = "cage_left_1";
        name = "cage_left_1_point";
        armor = -200;
        minimalHit = 0.3;
        passThrough = 0;
        visual = "-";
        explosionShielding = 2;
        radius = 0.25;
    };
};
// ...

Parameters:

More detailed description about the hitpoint parameters can be found in this guide.

CfgArmorSimulations

A feature, which will allow distinguish between different ammo and armor types. In the platform update, there will be pre-configured three armor types and four ammo types, but none of these are hardcoded in the engine and therefore, can be expanded upon nearly infinitely.

Configuring such thing however needs an entry on three different places:

class CfgArmorSimulations
{
    /*
        Values:
        { a, b }
        { { a1, a2 }, b }
        { a, { b1, b2 } }
        { { a1, a2 }, { b1, b2 } }
        a - multiplier for when armor is undamaged
        b - multiplier for when armor is destroyed
        a1, a2 - lowest and highest value for randomization pool when armor is undamaged
        b1, b2 - lowest and highest value for randomization pool when armor is destroyed
    */

    class Armor_ERA_Heavy
    {
        class Default // when hit by ammunition without warHeadName
        {
            hit[] = { 1 };
            speed[] = { 1 };
        };

        // warheads
        class AP
        {
            hit[] = { 1 };
            speed[] = { 0.65, 1 };
        };

        class HE
        {
            hit[] = { 0.1, 1 };
            speed[] = { 1 };
        };

        class HEAT
        {
            hit[] = { 1 };
            speed[] = { 0.25, 1 };
        };

        class TandemHEAT
        {
            hit[] = { 1 };
            speed[] = { 0.65, 1 };
        };
    };
};

Please note that how the ammo will interact with the armor type is entirely dependent on the warheadName parameter, not on configuration of the ammo. This parameter can be passed as a formal label. Creating a new simulation means defining it is interaction with all available ammo types (or type Default as shown in the example above, of none is applicable)

Parameters:

Configuration: In the example above there is a short use case, which is applicable for both Hit and Speed parameters.

Quality-of-life configuration upgrades

class HitPoints
{
    class HitComTurret    { armor = 0.1; material = -1; armorComponent = "hit_com_turret";    name = "hit_com_turret_point";    visual="";    passThrough = 0; minimalHit = 0.1; explosionShielding = 1; radius = 0.15; isTurret = true; };
    class HitComGun        { armor = 0.1; material = -1; armorComponent = "hit_com_gun";        name = "hit_com_gun_point";        visual="";    passThrough = 0; minimalHit = 0.1; explosionShielding = 1; radius = 0.15; isGun = true; };
};
class HitPoints : HitPoints
{
    class HitERA_Front
    {
        type = "ARMOR_ERA"; // cannot be isTurret or isGun
        // ...

        class DestructionEffects
        {
            ammoExplosionEffect = "";

            // 2 new parameters to override engine function
            effectRadius = 1; // needed when hitpoint with convexComponentNewArmor
            ignoreFuel = true;

            class Explo
            {
                simulation = "particles";
                type = "MineExplosionParticles";
                position = "Hit_ERA_front_01_mem";
                intensity = 1;
                interval = 1;
                lifeTime = 0.01;
            };

            class Smoke : Explo
            {
                type = "ERASmoke";
                lifeTime = 0.1;
            };
        };
    };
};