Adding AI only firemodes for launchers
Needs Review, Needs TriagePublic

Description

This is probably more feature than issue...

Currently AI pretty much laser beam with dumb fire AT, they seem to be able to perfectly zero AT weapons without range finders or any external assistance, if you're a static target, they'll pretty much always hit you up to the maximum effective distance of the weapon. I had a chat with oukej to see what options we had regarding this.

I first tried adding aiDispersionCoefX/Y to the launchers but it doesn't impact them (and BI leave them at 1 / 1 inherited from the base class).

oukej suggested adding an AI only firemode with increased dispersion to try and make the AI a bit less deadly with non-locking AT. I've had a quick dig around the configs but unlike the BI launchers, CUP doesn't seem to define firemodes per weapon and just inherits it from the base class.

I'm proposing adding some hidden AI firemodes to make co-op experiences a bit more fun when fighting lower geared forces (rpg18 etc).

Example:

modes[] = {"Single", "Single_AI"};
    class Single: Mode_SemiAuto
    {
        sounds[] = {"StandardSound"};
        class BaseSoundModeType
        {
        };
        class StandardSound: BaseSoundModeType
        {
            begin1[] = {"A3\Sounds_F\arsenal\weapons\Launchers\RPG32\rpg32", 1.99526, 1, 1500};
            soundBegin[] = {"begin1", 1};
            soundSetShot[] = {"Launcher_RPG7_Shot_SoundSet", "Launcher_RPG7_Tail_SoundSet"};
        };
        recoil = "recoil_single_law";
        aiRateOfFire = 7;
        aiRateOfFireDistance = 600;
        minRange = 0;
        minRangeProbab = 0.01;
        midRange = 1;
        midRangeProbab = 0.01;
        maxRange = 2;
        maxRangeProbab = 0.01;
    };
    class Single_AI: Single
    {
        aiRateOfFire = 7;
        aiRateOfFireDistance = 600;
        minRange = 10;
        minRangeProbab = 0.3;
        midRange = 400;
        midRangeProbab = 0.8;
        maxRange = 600;
        maxRangeProbab = 0.1;
        dispersion = 0.00073; //this is a random value I pulled out of my ass!
    };

I'm a bit of hack when it comes to config bits so this might not be the correct or best way to do this, perhaps you could define one firemode somewhere up the config tree and just add it to the modes[] array for each weapon without needing to define it over and over.

Let me know your thoughts etc.

Cyruz created this task.Jan 25 2018, 11:13 AM
Cyruz updated the task description. (Show Details)Jan 25 2018, 11:38 AM

There should probably be a "showToPlayer=0;" in the Single_AI class to prevent this from being used by players.

There should probably be a "showToPlayer=0;" in the Single_AI class to prevent this from being used by players.

This is why I don't do this at a competent level!