Jump to content
socs

How To Change Countermeasures

Recommended Posts

Hey all, I'm looking for a way to change the vanilla countermeasures into actual flares for a specific vehicle, or all of them... Is this possible? (And no the vehicle Im talking about does not have flares as a CM option). And the reason I need this is because it would be quite cool to have them illuminate the ground... Thank you for any help!

Share this post


Link to post
Share on other sites

It's a lot of work, imho. You need to create an addon modifying the parameters of the:

CMFlareAmmo  ammunition.

Probably:

timeToLive = 15; // change for 30

tracerColor[] = {0.7,0.7,0.5,0.04};  // feel free to increase the last figure

tracerColorR[] = {0.7,0.7,0.5,0.04};  // same

 

and the flareCore

probably

brightness = 2; // to be increased

 

Then, play with the ammo, magazines, weapons, vehicles classes to get inheritance. I'm not familiar with that, taking several days for me, to test something.

Share this post


Link to post
Share on other sites
2 minutes ago, pierremgi said:

It's a lot of work, imho. You need to create an addon modifying the parameters of the:

CMFlareAmmo  ammunition.

Probably:

timeToLive = 15; // change for 30

tracerColor[] = {0.7,0.7,0.5,0.04};  // feel free to increase the last figure

tracerColorR[] = {0.7,0.7,0.5,0.04};  // same

 

and the flareCore

probably

brightness = 2; // to be increased

 

Then, play with the ammo, magazines, weapons, vehicles classes to get inheritance. I'm not familiar with that, taking several days for me, to test something.

Aright, it's not worth all the trouble then lol... I appreciate the response!

Share this post


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

Aright, it's not worth all the trouble then lol... I appreciate the response!

No idea if it's even possible to attach a lightPoint to the flare projectile,

since CMFlares returns objNull on a fired eventhandler, at least last time I checked.

Made something similar for UGL or mortar/arty flares. Thread might still be worth a read.

 

Only some ugly workaround like spawning a physx object like a small can, give it appropriate movement vectors and attach the spawned lightpoint to them could probably do the trick.

Doubt it'll be performance friendly though.

 

Cheers

Share this post


Link to post
Share on other sites


 

class CounterMeasureChaff
{
    class Cmeasures1
    {
        simulation = "particles";
        type = "Cmeasures1";
        position[] = {0,0,0};
        intensity = 1;
        interval = 1;
        lifeTime = 4.5;
        qualityLevel = 2;
    };
    class Cmeasures1M
    {
        simulation = "particles";
        type = "Cmeasures1M";
        position[] = {0,0,0};
        intensity = 1;
        interval = 1;
        lifeTime = 4.5;
        qualityLevel = 1;
    };
    class Cmeasures1L
    {
        simulation = "particles";
        type = "Cmeasures1L";
        position[] = {0,0,0};
        intensity = 1;
        interval = 1;
        lifeTime = 4.5;
        qualityLevel = 0;
    };
    class Cmeasures2
    {
        simulation = "particles";
        type = "Cmeasures2";
        position[] = {0,0,0};
        intensity = 1;
        interval = 1;
        lifeTime = 3.2;
    };
    class Cmeasures3
    {
        simulation = "particles";
        type = "Cmeasures3";
        position[] = {0,0,0};
        intensity = 1;
        interval = 1;
        lifeTime = 0.05;
    };
    class Light1
    {
        simulation = "light";
        type = "CmeasuresLight";
        position[] = {0,0,0};
        intensity = 1;
        interval = 1;
        lifeTime = 3;
    };
};

class CfgLights

{
    class CmeasuresLight
    {
        color[] = {1,0.6,0.5};
        ambient[] = {0.8,0.65,0.5};
        brightness = 0.75;
        diffuse[] = {1,1,1};
        position[] = {0,0,0};
    };

};

add intensity to light i.e.

intensity = 25000;

 

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites
3 hours ago, Grumpy Old Man said:

No idea if it's even possible to attach a lightPoint to the flare projectile,

since CMFlares returns objNull on a fired eventhandler, at least last time I checked.

Made something similar for UGL or mortar/arty flares. Thread might still be worth a read.

 

Only some ugly workaround like spawning a physx object like a small can, give it appropriate movement vectors and attach the spawned lightpoint to them could probably do the trick.

Doubt it'll be performance friendly though.

 

Cheers

Yeah, I saw this in a video and I believe if I'm not mistaken it's part of exile.. I just found it pretty neat as I get quite a bit of inspiration from Frankie lol... So I thought it'd be worth a shot and see if people might've known... Thank you!

Share this post


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


 


class CounterMeasureChaff
{
    class Cmeasures1
    {
        simulation = "particles";
        type = "Cmeasures1";
        position[] = {0,0,0};
        intensity = 1;
        interval = 1;
        lifeTime = 4.5;
        qualityLevel = 2;
    };
    class Cmeasures1M
    {
        simulation = "particles";
        type = "Cmeasures1M";
        position[] = {0,0,0};
        intensity = 1;
        interval = 1;
        lifeTime = 4.5;
        qualityLevel = 1;
    };
    class Cmeasures1L
    {
        simulation = "particles";
        type = "Cmeasures1L";
        position[] = {0,0,0};
        intensity = 1;
        interval = 1;
        lifeTime = 4.5;
        qualityLevel = 0;
    };
    class Cmeasures2
    {
        simulation = "particles";
        type = "Cmeasures2";
        position[] = {0,0,0};
        intensity = 1;
        interval = 1;
        lifeTime = 3.2;
    };
    class Cmeasures3
    {
        simulation = "particles";
        type = "Cmeasures3";
        position[] = {0,0,0};
        intensity = 1;
        interval = 1;
        lifeTime = 0.05;
    };
    class Light1
    {
        simulation = "light";
        type = "CmeasuresLight";
        position[] = {0,0,0};
        intensity = 1;
        interval = 1;
        lifeTime = 3;
    };
};

class CfgLights

{
    class CmeasuresLight
    {
        color[] = {1,0.6,0.5};
        ambient[] = {0.8,0.65,0.5};
        brightness = 0.75;
        diffuse[] = {1,1,1};
        position[] = {0,0,0};
    };

};

add intensity to light i.e.

intensity = 25000;

 

Holy Cow! A BI developer responded to my thread! So this is in order right? Cmeasures1 is the default cm every helicopter/plane is set to? Appreciate the help and Ill make sure to give it a try... I dont need all the CM's to be brighter and actually illuminate the ground, just 1 set as I would like for it to eventually run out as well... Thanks a bunch!

Share this post


Link to post
Share on other sites
Just now, pierremgi said:

Wow, thanks a lot! That works from description.ext either. That's a kind of magic!

Ahh so this is to be put in description.ext?

Share this post


Link to post
Share on other sites

hmm, after tests, not sure to see the difference...lol   Disregard.

Share this post


Link to post
Share on other sites

What I posted before are particle effects that are used by default chaff/flare countermeasures

        class CMflareAmmo: BulletBase
        {
            hit = 1;
            indirectHit = 0;
            indirectHitRange = 0;
            timeToLive = 15;
            thrustTime = 2;
            airFriction = -0.01;
            simulation = "shotCM";
            effectsSmoke = "CounterMeasureFlare";
            weaponLockSystem = 2;
            model = "\A3\weapons_f\empty";
            maxControlRange = -1;
            initTime = 0;
            aiAmmoUsageFlags = 8;
        };
        class CMflare_Chaff_Ammo: CMflareAmmo
        {
            effectsSmoke = "CounterMeasureChaff"; // actually flare + chaff
            weaponLockSystem = "2 + 8";
        };

You can create your own CM or modify existing ones to just see how it works - I would recommend taking 2nd approach just so you can learn how stuff is working

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×