Page MenuHomeFeedback Tracker

AI not shotting when cannon has artillery and direct fire mode
New, NormalPublic

Description

I created a test cannon with 2 fire mode:

  • direct fire with ballistic computer to shoot on visible vehicle
  • artillery mode to be able to provide support

I can use the cannon with both fire mode with absolutely no problems. Direct fire is working fire, artillery mode is working fine. The problem is when i order an AI to use the cannon, its not doing anything even when i place an ennemy vehicle in front of it. My question is why isn't the AI able to use a cannon with artillery and direct fire mode ? I don't see anything that should prevent that...

I propose an additional logic for AI units so they can be able to use weapons with both direct fire and artillery mode.

Details

Severity
Feature
Resolution
Open
Reproducibility
Always
Operating System
Windows 11 x64
Operating System Version
23H2
Category
AI Aiming / Shooting
Steps To Reproduce

Here is my cannon:

class TEST_Cannon_76mm : mortar_155mm_AMOS {
        scope = protected;
        cursor="EmptyCursor";
        cursorAim="cannon";
        showAimCursorInternal=0;
        displayName = "Cannon (76mm)";
        selectionFireAnim = "mk45_muzzle";
        magazines[] = {"TEST_85rnd_76mm_HE_Shells_Mag", "TEST_85rnd_76mm_AP_Shells_Mag", "TEST_15rnd_76mm_DART_Shells_Mag"};
        muzzleEnd = "konec hlavne";
        muzzlePos = "Usti hlavne";    // position and direction of muzzle
        reloadTime = 0.5;
        magazineReloadTime = 10;
        ballisticsComputer="2 + 16";
        FCSMaxLeadSpeed=25;
        FCSZeroingDelay=1;
        modes[] = {"Single1", "Single2", "Single3"};
        
        class GunParticles {
            class Effect {
                effectName = "CannonFired";
                positionName = "Usti hlavne";
                directionName = "Konec hlavne";
            };
            
            class Effect1 {
                effectName = "ArtilleryFired1";
                positionName = "Usti hlavne";
                directionName = "Konec hlavne";
            };
            
            class Effect2 {
                effectName = "ArtilleryFiredL";
                positionName = "Usti hlavne";
                directionName = "Usti hlavne";
            };
            
            class Effect3 {
                effectName = "ArtilleryFiredR";
                positionName = "Usti hlavne";
                directionName = "Usti hlavne";
            };
        };
        
                class Single1 : Mode_SemiAuto {
            displayName = "Cannon";
            sounds[] = {"StandardSound"};
            
            class StandardSound {
                begin1[] = {"A3\Sounds_F\arsenal\weapons_vehicles\cannon_155mm\sochor_155mm_distant", 2.51189, 1, 1500};
                soundBegin[] = {"begin1", 1};
            };
            reloadSound[] = {"A3\sounds_f\dummysound", 1, 1, 20};
            reloadTime = 0.5;
            minRange = 0;
            midRange = 4000;
            maxRange = 8000;
            aiRateOfFire=1;
            aiRateOfFireDistance=8000;
            minRangeProbab=0.0099999998;
            midRangeProbab=0.0099999998;
            maxRangeProbab=0.0099999998;
        };
        
        class Single2 : Single1 {
            displayName = "Single - Short";
            artilleryDispersion = 0.5;
            artilleryCharge = 0.22;
            minRange = 0;
            midRange = 4000;
            maxRange = 8000;
        };
        
        /*class Single3 : Single2 {
            displayName = "Single - Medium";
            artilleryCharge = 0.3;
        };
        */
        class Single3 : Single2 {
            displayName = "Single - Long";
            minRange = 8000;
            midRange = 11000;
            maxRange = 15000;
            artilleryCharge = 0.48;
        };
    };
}

Event Timeline

XTankKiller changed Severity from None to Feature.Wed, Apr 10, 11:23 AM
XTankKiller changed Reproducibility from N/A to Always.
XTankKiller changed Operating System from Windows 10 x64 to Windows 11 x64.
XTankKiller set Operating System Version to 23H2.
XTankKiller changed Category from General to AI Aiming / Shooting.
XTankKiller renamed this task from AI not shotting when cannon has artillery and direct fire moe to AI not shotting when cannon has artillery and direct fire mode.Wed, Apr 10, 11:32 AM
XTankKiller edited Steps To Reproduce. (Show Details)
XTankKiller updated the task description. (Show Details)Wed, Apr 10, 10:15 PM