Jump to content

Recommended Posts

Posted

Hi all,

I am having many trouble to create a group of su-25T and assing a ground target to them throw mission scripting (I'm not using mist or moose, just mission scripting commands)

 

As soon as the group is created, I try to assign them the task of attacking the enemy group, but they ignore completely the target and go to the nearest ally airbase to land. I don't know what I'm doing wrong 😞

 

Please, somebody could help me?

 

This is the function that creates the group of Su-25T (it is working, and the group is created as expected)

function createAllySEADGroup(posInitialAir, distance, typeGroup)
        --trigger.action.outText("createAllySEADGroup", 3)         
        nameAllySEADGroup = getAirCallsign()
        
        local xAlly = posInitialAir.x - distance
        local yAlly = posInitialAir.y
                
        local heading = 0
        
        local _airtype = ""
        if typeGroup == 1 then
            _airtype = "Su-25T"    
        end
            
        
        local _country = country.id.GEORGIA
        local _payload = nil
        
        _payload = {
                ["pylons"] = {
                                [1] = {
                                    ["CLSID"] = "{44EE8698-89F9-48EE-AF36-5FD31896A82D}",
                                    ["num"] = 1,
                                },
                                [2] = {
                                    ["CLSID"] = "{CBC29BFE-3D24-4C64-B81D-941239D12249}",
                                    ["num"] = 2,
                                },
                                [3] = {
                                    ["CLSID"] = "{752AF1D2-EBCC-4bd7-A1E7-2357F5601C70}",
                                    ["num"] = 3,
                                },
                                [4] = {
                                    ["CLSID"] = "{752AF1D2-EBCC-4bd7-A1E7-2357F5601C70}",
                                    ["num"] = 4,
                                },
                                [5] = {
                                    ["CLSID"] = "{E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF}",
                                    ["num"] = 5,
                                },
                                [6] = {
                                    ["CLSID"] = "{0519A264-0AB6-11d6-9193-00A0249B6F00}",
                                    ["num"] = 6,
                                },
                                [7] = {
                                    ["CLSID"] = "{E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF}",
                                    ["num"] = 7,
                                },
                                [8] = {
                                    ["CLSID"] = "{752AF1D2-EBCC-4bd7-A1E7-2357F5601C70}",
                                    ["num"] = 8,
                                },
                                [9] = {
                                    ["CLSID"] = "{752AF1D2-EBCC-4bd7-A1E7-2357F5601C70}",
                                    ["num"] = 9,
                                },
                                [10] = {
                                    ["CLSID"] = "{CBC29BFE-3D24-4C64-B81D-941239D12249}",
                                    ["num"] = 10,
                                },
                                [11] = {
                                    ["CLSID"] = "{44EE8698-89F9-48EE-AF36-5FD31896A82C}",
                                    ["num"] = 11,
                                },
                            },
                ["fuel"] = "6103",
                ["flare"] = 120,
                ["chaff"] = 240,
                ["gun"] = 100,
            }
        
            
        local _allydata =     {                                
                                ["modulation"] = 0,                                
                                ["uncontrolled"] = false,
                                ["groupId"] = math.random(9999,99999),
                                ["hidden"] = false,
                                ["units"] = 
                                {
                                    [1] = 
                                    {
                                        ["alt"] = 8000,
                                        ["heading"] = heading,                                        
                                        ["type"] = _airtype,
                                        ["psi"] = 0,                                        
                                        ["y"] = yAlly,
                                        ["x"] = xAlly,
                                        ["payload"] = _payload,                                        
                                        ["name"] =  "allyAirUnit" .. math.random(9999,99999),                                        
                                        ["speed"] = 350,
                                        ["unitId"] =  math.random(9999,99999),                                        
                                        ["skill"] = "High",
                                    }, -- end of [1]
                                [2] = 
                                    {
                                        ["alt"] = 8000,
                                        ["heading"] = heading,                                        
                                        ["type"] = _airtype,
                                        ["psi"] = 0,                                        
                                        ["y"] = yAlly,
                                        ["x"] = xAlly - 50,                                        
                                        ["payload"] = _payload,
                                        ["name"] =  "allyAirUnit" .. math.random(9999,99999),                                        
                                        ["speed"] = 350,
                                        ["unitId"] =  math.random(9999,99999),                                        
                                        ["skill"] = "High",
                                    }, -- end of [1]                                
                                }, -- end of ["units"]
                                ["y"] = yAlly,
                                ["x"] = xAlly,
                                ["name"] =  nameAllySEADGroup,
                                ["communication"] = true,
                                ["start_time"] = 0,
                                ["frequency"] = 117.5,
                                ["task"] = "SEAD",
                    }    
            coalition.addGroup(_country, Group.Category.AIRPLANE, _allydata) 
            return Group.getByName(nameAllySEADGroup)
end

 

 

And this is the function that assing the task of attacking one ground target (created too throw mission scripting and passed as 2nd parameter)

 

 

 

 

function doSEAD(attackingGroup, objetiveGroup)
    trigger.action.outText("doSEAD attacker: " .. attackingGroup:getID(), 30)        -- I get Id in the screen, so this is OK    
    trigger.action.outText("doSEAD objetive: " .. objetiveGroup:getID(), 30)           -- I get Id in the screen, so this is OK                         
                    
    AttackGroup = { id = 'AttackGroup',
    params = {
                  groupId          = objetiveGroup:getID(),
                  weaponType       = 3221225470 ,
                  expend           = "Auto",
                  attackQtyLimit   = false,      
                  attackQty        = 1,
                  directionEnabled = false,
                  direction        = 0,
                  altitudeEnabled  = false,
                  altitude         = 10000,
                  groupAttack      = false,
                },
              }                
                    
    local _controller = attackingGroup:getController();
    Controller.setOption(_controller, AI.Option.Ground.id.ALARM_STATE, AI.Option.Ground.val.ALARM_STATE.RED)
                    
    _controller:setTask(AttackGroup)
    trigger.action.outText("SEAD asignado", 30)  --this appears in the screen, so the execution reach this           
end

 

Posted
21 hours ago, daemon1808 said:

Hi all,

I am having many trouble to create a group of su-25T and assing a ground target to them throw mission scripting (I'm not using mist or moose, just mission scripting commands)

 

As soon as the group is created, I try to assign them the task of attacking the enemy group, but they ignore completely the target and go to the nearest ally airbase to land. I don't know what I'm doing wrong 😞

 

Please, somebody could help me?

...

 

 

Hi, I think nothing is wrong with your script, but there seems to be an issue with the combo "SEAD"/"AttackGroup" (in theory it should work). Using your doSEAD function or the same AttackGroup function from editor or a simplified scripted function (with just targetID as parameter) has the same non working result, tried with both Su25T and F18c in SEAD config.

 

Using "CAS"/"AttackGroup" works : it makes the target visible and lead fighter/bomber to objective (with both editor function or script). But with SEAD and SAM with radar target, it doesn't make the target visible and makes the fighter RTB (if target is not initially visible - RWR spotted - of course).

 

This "issue" I think probably has to be reported.

Posted
5 hours ago, toutenglisse said:

 

Hi, I think nothing is wrong with your script, but there seems to be an issue with the combo "SEAD"/"AttackGroup" (in theory it should work). Using your doSEAD function or the same AttackGroup function from editor or a simplified scripted function (with just targetID as parameter) has the same non working result, tried with both Su25T and F18c in SEAD config.

 

Using "CAS"/"AttackGroup" works : it makes the target visible and lead fighter/bomber to objective (with both editor function or script). But with SEAD and SAM with radar target, it doesn't make the target visible and makes the fighter RTB (if target is not initially visible - RWR spotted - of course).

 

This "issue" I think probably has to be reported.

 

Thanks for your help Toutenglisse

Are you trying the scripts in v2.7 OB? I have found that I can't get the ally group to attack neither in SEAD or CAS.

In fact, I had similar scripts that worked in the pass, but now the ally groups ignore completely the targets and RTB (even using task in route and creating the group close to the targets). Haven't tried in mission editor with triggers, but this scripts worked in the pass, and now they don't 😞

 

function createAllyBombingGroup(posInitialAir, distance, typeGroup)
        local xAlly = posInitialAir.x - distance
        local yAlly = posInitialAir.y
                
        local heading = 0
        
        --trigger.action.outText("x: " .. xAlly .. "y: " .. yAlly, 10)    
        
        local _airtype = ""
        if typeGroup == 1 then
            _airtype = "A-10C"    
        end
            
        
        local _country = country.id.USA
        local _payload = nil
        

        _payload = {
                ["pylons"] =
                {    [1] =
                    {    
                    ["CLSID"] = "{DB769D48-67D7-42ED-A2BE-108D566C8B1E}",
                    }, -- end of [1]            
                    [2] =
                    {    
                    ["CLSID"] = "{DB769D48-67D7-42ED-A2BE-108D566C8B1E}",
                    }, -- end of [2]            
                    [3] =
                    {
                    ["CLSID"] = "{DB769D48-67D7-42ED-A2BE-108D566C8B1E}",
                    }, -- end of [3]            
                    [4] =
                    {
                    ["CLSID"] = "{DB769D48-67D7-42ED-A2BE-108D566C8B1E}",
                    }, -- end of [4]
                    [5] =
                    {
                    ["CLSID"] = "{DB769D48-67D7-42ED-A2BE-108D566C8B1E}",
                    }, -- end of [5]
                    [6] =
                    {
                    ["CLSID"] = "{DB769D48-67D7-42ED-A2BE-108D566C8B1E}",
                    }, -- end of [6]
                    [7] =
                    {
                    ["CLSID"] = "{DB769D48-67D7-42ED-A2BE-108D566C8B1E}",
                    }, -- end of [7]
                    [8] =
                    {
                    ["CLSID"] = "{DB769D48-67D7-42ED-A2BE-108D566C8B1E}",
                    }, -- end of [8]    
                    [9] =
                    {    
                    ["CLSID"] = "{DB769D48-67D7-42ED-A2BE-108D566C8B1E}",
                    }, -- end of [9]                            
                    [10] =
                    {
                    ["CLSID"] = "{A111396E-D3E8-4b9c-8AC9-2432489304D5}",
                    }, -- end of [10]
                    [11] =
                    {                    
                    }, -- end of [3]        
                    
                }, -- end of ["pylons"]
                ["fuel"] = "6103",
                ["flare"] = 120,
                ["chaff"] = 240,
                ["gun"] = 100,
            }
        
            
        local _allydata =     {
                                ["modulation"] = 0,
                                ["tasks"] = 
                                {
                                }, -- end of ["tasks"]
                                ["uncontrolled"] = false,
                                ["groupId"] = math.random(9999,99999),
                                ["hidden"] = false,
                                ["units"] = 
                                {
                                    [1] = 
                                    {
                                        ["alt"] = 8000,
                                        ["heading"] = heading,                                        
                                        ["type"] = _airtype,
                                        ["psi"] = 0,                                        
                                        ["y"] = yAlly,
                                        ["x"] = xAlly,
                                        ["payload"] = _payload,                                        
                                        ["name"] =  "allyAirUnit" .. math.random(9999,99999),                                        
                                        ["speed"] = 350,
                                        ["unitId"] =  math.random(9999,99999),                                        
                                        ["skill"] = "High",
                                    }, -- end of [1]
                                [2] = 
                                    {
                                        ["alt"] = 8000,
                                        ["heading"] = heading,                                        
                                        ["type"] = _airtype,
                                        ["psi"] = 0,                                        
                                        ["y"] = yAlly,
                                        ["x"] = xAlly - 50,                                        
                                        ["payload"] = _payload,
                                        ["name"] =  "allyAirUnit" .. math.random(9999,99999),                                        
                                        ["speed"] = 350,
                                        ["unitId"] =  math.random(9999,99999),                                        
                                        ["skill"] = "High",
                                    }, -- end of [1]                                
                                }, -- end of ["units"]
                                ["y"] = yAlly,
                                ["x"] = xAlly,
                                ["name"] =  nameAllyBombersGroup,
                                ["communication"] = true,
                                ["start_time"] = 0,
                                ["frequency"] = 117.5,
                                ["task"] = "CAS"
                    }
            
                    
            coalition.addGroup(_country, Group.Category.AIRPLANE, _allydata) 
            
            return Group.getByName(nameAllyBombersGroup)
end

 

 

function doGroupBombing(attackingGroup, objetiveGroup)        
        local routePoints = {}
        
        local AttackGroup = { 
          id = 'AttackGroup', 
          params = { 
            groupId = objetiveGroup:getID(),    
          } 
        }
                                     
            routePoints[1] = {
                    action = "Fly Over Point",
                    type= "Turning Point",
                    x = attackingGroup:getUnit(1):getPoint().x,
                    y = attackingGroup:getUnit(1):getPoint().z,
                    alt = 5000,
                    alt_type = "RADIO",
                    speed = 350,
                    ETA = 100,
                    ETA_locked = false,
                    name = "Starting point", 
                    task = nil,
                    }    
        
            routePoints[2] = {
                    action = "Fly Over Point",
                    type= "Turning Point",
                    x = attackingGroup:getUnit(1):getPoint().x + 100,
                    y = attackingGroup:getUnit(1):getPoint().z + 0,
                    alt = 8000,
                    alt_type = "BARO",
                    speed = 350,
                    ETA = 100,
                    ETA_locked = false,
                    name = "WP1", 
                    task = AttackGroup,
                    }
                    
        local _mission = { 
            id = 'Mission', 
            params = { 
                airborne = true,
                route = { 
                    points = routePoints
                }, 
            } 
        }
        
        local _controller = attackingGroup:getController();
        Controller.setOption(_controller, AI.Option.Ground.id.ALARM_STATE, AI.Option.Ground.val.ALARM_STATE.RED)
        _controller:setTask(_mission)    
end;

 

 

Posted
1 hour ago, daemon1808 said:

 

Thanks for your help Toutenglisse

Are you trying the scripts in v2.7 OB? I have found that I can't get the ally group to attack neither in SEAD or CAS.

In fact, I had similar scripts that worked in the pass, but now the ally groups ignore completely the targets and RTB (even using task in route and creating the group close to the targets). Haven't tried in mission editor with triggers, but this scripts worked in the pass, and now they don't 😞...

 

Yes I run 2.7 OB, and yes "attackGroup"/CAS works with both mission editor task and script task (attached .miz example with a script "attackGroup" - at 1 sec in mission the F18c starts to rejoin and attack target hidden in a valley, instead of rtb). The task makes an invisible group to become visible and attacked by the AI aircraft.

 

Just a note : I use pushTask instead of setTask (probably doesn't matter anyway), and when you do : Controller.setOption you use alarmState, but it is not supposed to work on Ai aircraft (only ground vehicles and ships, but again this should not have any impact on attackGroup task).

test-attack-group-CAS.miz

Posted

Ummm, I believe there is some kind of bug after many uses of trial-error method.

 

I am using a attacker group created dinamically (not placed in the mission, but created through lua script), and I have found these behaviours:

1. If the target group contains a radar unit: the attakers ignore the target no matter the script used.

2. If the target group doesn't have a radar unit and the target group is created dinamically through lua script: the attakers ignore the target no matter the script used.

3. If the target group doesn't have a radar unit and the target group is created in the mission editor (same units as case 2): the attakers will attack the target (same script that fails in case 1 and 2)

 

So, the problem seems to be happening only when the target unit is created through lua. O_O

 

 

Posted (edited)
5 hours ago, daemon1808 said:

...

 

So, the problem seems to be happening only when the target unit is created through lua. O_O

 

 

 

No I don't see that : here an example with everything scripted (both target and attacker plus task) and target is 1 or 2 search radar. CAS attacker does his "attackGroup" task normally.

(groups are created at T>2seconds)

 

Edit : I think the issue with SEAD+"attackGroup" (supposed to work by text...) is due to a conflict in actual AI / SEAD logic, and maybe on purpose.

 

Edit 2 : SEAD + "attackUnit" does work.

Edit 3 : bad file deleted

 

Edited by toutenglisse
Posted
2 hours ago, toutenglisse said:

 

No I don't see that : here an example with everything scripted (both target and attacker plus task) and target is 1 or 2 search radar. CAS attacker does his "attackGroup" task normally.

(groups are created at T>2seconds)

 

Edit : I think the issue with SEAD+"attackGroup" (supposed to work by text...) is due to a conflict in actual AI / SEAD logic, and maybe on purpose.

 

Edit 2 : SEAD + "attackUnit" does work.

test-attack-group-CAS-allbyscript.miz 58.57 kB · 2 downloads

 

 

I have checked it and its working because your target are tanks without active radar.

 

Just changed the type of the tanks by a SAM radar (i.e unitType = 'Kub 1S91 str') and you will see that the f5 will ignore it and land on Kobuleti 😞

You can add a couple of launchers (unitType = 'Kub 2P25 ln') to the target group and you'll see the same behavior. But as soon as you remove the Kub 1S91 str (radar unit), the F5 will attack the target again.

 

Tested with attackunit task, and it happens the same. It is like when a radar unit is present in the group, the attacker can't see them.

It is very strange!

 

test-attack-group-CAS-allbyscript_WITH_SA6.miz

 

 

 

 

 

 

 

Posted
1 hour ago, daemon1808 said:

 

I have checked it and its working because your target are tanks without active radar....

 

 

Yes I made a mistake and didn't save file with sam radar. I resaved here with 'SA-11 Buk SR 9S18M1' as target and it works. But if I use 'Kub 1S91 str' it doesn't work.

So yes there is an issue with specific units. (and probably not with task type)

 

I tested "attackUnit"/SEAD with a SA-11 Buk site (search radar + launchers) and it worked. But as I understand (not tested) it would have also work with "attackGroup" and SA-11 Buk, and would have failed with  'Kub 1S91 str', whatever the task was "attackUnit or Group".

 

test-attack-group-CAS-allbyscript.miz

Posted

No, I can't get it to work if the SA-11 is fully operational

I have changed your mission script to add a SA-11 Command Center, SA-11 radar and a SA-11 launcher (minimum fully operational SA-11 site), and the F-5 RTB.

 

Tried SEAD/CAS. And AttackGroup/AttackUnit and same result everytime.

It seems imposible to order a unit to attack a fully operational SAM site 🤧 

 

I believe that is better to find a workarround (like destroy through scripting the SAM site as soon as the "attacking" group is near enough the target)  😞

 

test-attack-group-CAS-allbyscript_FULL_SA11.miz

Posted
10 minutes ago, daemon1808 said:

No, I can't get it to work if the SA-11 is fully operational

I have changed your mission script to add a SA-11 Command Center, SA-11 radar and a SA-11 launcher (minimum fully operational SA-11 site), and the F-5 RTB.

...

 

If you tried to SEAD with the F15E of my example it won't work - it is armed with 2 GBU-31. If you replace it by a F18c with harms it works. In my example I just put a SR SA-11 so no threat to engage with bombs.

When I wrote that I tried SEAD/attackunit on a SA11 site with launchers it was with an FA18c with harms, not the F15E.

 

Usually when I do SEAD with AI I never use an "attack" task. I just lead the AI to target area and when AI gets a RWR spike it engages immediately the SAM site radars (SA-11 site including command center or any other - not tried SA-10...) - workaround is : lead your fighters to target and their SEAD main task will make them engage SAM site when RWR detected.

 

What is tricky or bugged here is the "attackUnit/Group task" that is intended to lead to and make engaging a group or unit that is not detectable/out of sensors reach.

Posted (edited)

Yeah,i'm having the same problem trying to test an Su-25TM to do SEAD tasks in the mission editor by attacking an SA-2 site and it just turns around and goes back to the air base.It does sound like a bug since the user manual does say you can attack a SAM site using the attack group/unit task.

 

Edited by Angelthunder
Posted
3 hours ago, toutenglisse said:

 

If you tried to SEAD with the F15E of my example it won't work - it is armed with 2 GBU-31. If you replace it by a F18c with harms it works. In my example I just put a SR SA-11 so no threat to engage with bombs.

When I wrote that I tried SEAD/attackunit on a SA11 site with launchers it was with an FA18c with harms, not the F15E.

 

Usually when I do SEAD with AI I never use an "attack" task. I just lead the AI to target area and when AI gets a RWR spike it engages immediately the SAM site radars (SA-11 site including command center or any other - not tried SA-10...) - workaround is : lead your fighters to target and their SEAD main task will make them engage SAM site when RWR detected.

 

What is tricky or bugged here is the "attackUnit/Group task" that is intended to lead to and make engaging a group or unit that is not detectable/out of sensors reach.

 

 

Trying hard to replicate what you said, but no success.

 

In this new version (all scripted):

- A F-18C full of HARMs is created (funct createAttacker)

- A SA-11 fully operational is created (funct  createTarget)

- waypoint near the target SAM site is created and asigned to F-18 (funct  goTarget)

- Optional: trying to use attackunit  (funct attackTarget). You can comment this part, because it do nothing in the end.

But...

- The F-18 follow the route as intended, getting close to the target.

- As soon as it reach the WP1, it RTB. Even been close to the target and been spiked by it

- I have tried to get the f-18 nearer to the target. He drop the payload, dodge the misiles and RTB O_O 

 

Or this is very bugged, or I missing something 😞

 

AngelThunder, thanks. Maybe this have been broken from the beggining. Let's wait for the developers said something 🙂

 

 

test-attack-group-CAS-allbyscript_FULL_SA11.miz

 

 

Posted
3 hours ago, daemon1808 said:

...

 

Or this is very bugged, or I missing something 😞...

 

You have to set options for sead fighter : "weapons free" and "evade fire".

Here I attach an example where target is SA-11 (launchers + SR + CC) with a Wpt between target and SEAD fighter, 30-35 km away from target, and fighter's options set (fighter engages with all weapons until target or fighter is destroyed).

test-SEAD-Wpt-script.miz

Posted
17 hours ago, toutenglisse said:

 

You have to set options for sead fighter : "weapons free" and "evade fire".

Here I attach an example where target is SA-11 (launchers + SR + CC) with a Wpt between target and SEAD fighter, 30-35 km away from target, and fighter's options set (fighter engages with all weapons until target or fighter is destroyed).

test-SEAD-Wpt-script.miz 59.6 kB · 2 downloads

 

That did the trick!!

Added weapons free and evade fire options and now the SEAD package do their job!

You're a live saver, thanks so much. 🙂

Posted (edited)
18 hours ago, toutenglisse said:

 

You have to set options for sead fighter : "weapons free" and "evade fire".

Here I attach an example where target is SA-11 (launchers + SR + CC) with a Wpt between target and SEAD fighter, 30-35 km away from target, and fighter's options set (fighter engages with all weapons until target or fighter is destroyed).

test-SEAD-Wpt-script.miz 59.6 kB · 2 downloads

OK,will it work with russian SEAD attack aircraft with Anti-Radiation missiles too.And at what waypoint do you use those actions in the AV Actions panel on between the 2nd waypoint and the target waypoint.Mines always starts with the SEAD-a designation in the panel on the second waypoint.

Edited by Angelthunder
Posted
3 hours ago, Angelthunder said:

OK,will it work with russian SEAD attack aircraft with Anti-Radiation missiles too.And at what waypoint do you use those actions in the AV Actions panel on between the 2nd waypoint and the target waypoint.Mines always starts with the SEAD-a designation in the panel on the second waypoint.

 

With mission editor is easier. Check this example with a Russian Su25T engaging a USA Hawk SAM site.

su25TSEAD.miz

Posted
On 4/22/2021 at 9:01 PM, Angelthunder said:

OK,will it work with russian SEAD attack aircraft with Anti-Radiation missiles too.And at what waypoint do you use those actions in the AV Actions panel on between the 2nd waypoint and the target waypoint.Mines always starts with the SEAD-a designation in the panel on the second waypoint.

 

 

Do some tests. But with options you usually want them to be set as soon as possible (1st Wpt - 1st line of wrapped actions).

Posted (edited)

My first waypoint starts with the SEAD task then the 2nd Reaction to Threat in the advanced actions panel and that's it.I then put the Attack Group/Unit in the third waypoint under the SEAD Task in the action panel which is the target point.I then add the Reaction to Threat/Evade Fire as the third task in the 3rd waypoint action panel then Flare as the last task.I have the SA-2 site sort of in a static position as i'm using the aircraft itself to test it's ARM missiles only.

Edited by Angelthunder
Posted

I don't think i'm doing it right.What am i supposed to do with the Starting Point,it has the SEAD-a action followed by the Reaction to Threat-Allow Abort Mission task.Then what am supposed to add next to the first waypoint  then the second target waypoint.I'm confused😟

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...