Jump to content

Recommended Posts

Posted

I'm trying to set up an AA unit to toggle its ROE between weapons hold and weapons free based upon whether or not enemy units are within a trigger zone. I created two Switched Condition triggers; one turns on flag 51 when any part of the enemy coalition is in the zone, and the other turns off flag 51 when all of the enemy coalition have left the zone.

 

I've tried using the Advanced Waypoint Actions to set the two different ROEs with a conditional modifier; for Weapons Free, I selected "Is User Flag" for 51 and selected the box after "Is". For the Weapons Hold option, I did the same thing except the box after "Is" was left unmarked. The end result was that the unit never fired.

 

I then tried to put both options in the "Triggered Actions" section, with both "ROE = Weapons Hold" and "ROE = Weapons Free" being active. I then added to the Switch Condition trigger an AI Task Push to each condition; in the trigger for enemy in the zone, the Weapons Free is pushed, while in the trigger for enemy leaving the zone the "Weapon Hold" condition is pushed. This didn't work either.

 

Any ideas on what I'm doing wrong?

Posted

LUA scripting is the only way to do this? I don't want to suppress units, I just want my AA to not attack units that aren't in a trigger zone (forcibly reducing the engagement area of the AA).

Posted

I don`t say, you should take the script....

 

Make a unit (go into the Unit Trigger Action) [ DCS User Manual EN, p.126 Modal Buttons]

 

Add: Set Option / ROE / Weapon Hold

 

In Triggers

SC // something // AI TASK Push(unit/1.ROE=WEAPON HOLD)

Playing: DCS World

Intel i7-13700KF, 64GB DDR5 @5600MHz, RTX 4080 ZOTAC Trinity, WIN 11 64Bit Prof.

Squadron "Serious Uglies" / Discord-Server: https://discord.gg/2WccwBh

Ghost0815

Posted

I think you can use this function -

 function Controller.setOption(Controller self, OptionId optionId, OptionValue optionValue)

 

Option

 

AI.Option.Air.id.ROE

 

Values

 

AI.Option.Air.val.ROE.WEAPON_FREE

AI.Option.Air.val.ROE.OPEN_FIRE_WEAPON_FREE

AI.Option.Air.val.ROE.OPEN_FIRE

AI.Option.Air.val.ROE.RETURN_FIRE

AI.Option.Air.val.ROE.WEAPON_HOLD

 

 

Never used it so I'm not sure how it works, but this is how to do it with a script.

Posted
I'm trying to set up an AA unit to toggle its ROE between weapons hold and weapons free based upon whether or not enemy units are within a trigger zone. I created two Switched Condition triggers; one turns on flag 51 when any part of the enemy coalition is in the zone, and the other turns off flag 51 when all of the enemy coalition have left the zone.

 

I've tried using the Advanced Waypoint Actions to set the two different ROEs with a conditional modifier; for Weapons Free, I selected "Is User Flag" for 51 and selected the box after "Is". For the Weapons Hold option, I did the same thing except the box after "Is" was left unmarked. The end result was that the unit never fired.

 

I then tried to put both options in the "Triggered Actions" section, with both "ROE = Weapons Hold" and "ROE = Weapons Free" being active. I then added to the Switch Condition trigger an AI Task Push to each condition; in the trigger for enemy in the zone, the Weapons Free is pushed, while in the trigger for enemy leaving the zone the "Weapon Hold" condition is pushed. This didn't work either.

 

Any ideas on what I'm doing wrong?

Afaik Advanced Waypoint Actions and their corresponding conditions are only processed when the waypoint becomes active. But if I understood you correctly, the ROE change shall be performed independently from the current WP.

 

Therefor your second approach should be the correct one. At least that would be what I would be trying as well. Perhaps you want to try AI SET TASK instead of AI PUSH TASK? Could be that the unit is already performing a task (i.e. attacking your aircraft) and would execute the pushed task only after that? Probably best, you post a short example mission here so we can have a look.

Posted

post here your mission: maybe the sw condition loop is wrong but we can only check with the mission file attached.

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Posted (edited)

Never used it so I'm not sure how it works, but this is how to do it with a script.

Sadly I wouldn't know how to go about customizing that script to do what I want, which is one of the big reasons I'm trying to avoid an LUA solution. I'm surprise nobody has done this before.

 

post here your mission: maybe the sw condition loop is wrong but we can only check with the mission file attached.

Sure thing, here's a version of the mission with all extraneous items removed.

AA Trigger Test.miz

Edited by Xeno426
derp, forgot to hit the "upload" button
Posted
Sadly I wouldn't know how to go about customizing that script to do what I want, which is one of the big reasons I'm trying to avoid an LUA solution. I'm surprise nobody has done this before.

 

Here you go -

Group.getByName("groupName"):getController():setOption(AI.Option.Air.id.ROE,AI.Option.Air.val.ROE.WEAPON_HOLD)

'

 

The example above shows how to give a group with the name - groupName, the ROE command to Weapon hold.

You can change the command to whatever I put in my last post.

 

Attached is a little test mission -

1. go into the client F-15 and spectate the other flying F-15.

2. open the radio menu (\) - F10 (Other), here you have 2 options -

- WEAPON_HOLD

- OPEN_FIRE_WEAPON_FREE

 

Select first WEAPON_HOLD (as by default the f-15 will engage), you should immediately see the F-15 backing off.

Select then OPEN_FIRE_WEAPON_FREE, you should immediately see the F-15 attacking.

 

Hope this is explained good enough, good luck

test_ROE.miz

Posted

I'm just going to take there opportunity to request a getController():getOption(AI.Option.Air.id.ROE). I need this feature at the moment to record the status of ROE and ALARM_STATE for ground units.

 

These are not static behaviors so for some purposes we do need to poll the status. Perhaps even raise an event.

Posted

Try this: added flag off to the conditions. To test it, I had to move to a CA slot instead of client F-15, and deleted the AI Tasking leaving the message only to avoid F-15 to perform any kind of reactions.

 

Here it seems to work as intended.

AA Trigger Test.miz

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Posted
What's the difference between "OPEN_FIRE_WEAPON_FREE" and "WEAPON_FREE"?

 

Weapons free – engage any enemy group in contact. Target prioritization is performed automatically by the group based on the situation.

 

Open fire, Weapons free – engage any enemy groups in contact. However, the enemy group designated as the target for the action will be the primary target and engaged first. Once the primary target is destroyed, further target prioritization is performed automatically by the group based on the situation.

 

Open fire – engage only the enemy group designated as the target for the action.

Playing: DCS World

Intel i7-13700KF, 64GB DDR5 @5600MHz, RTX 4080 ZOTAC Trinity, WIN 11 64Bit Prof.

Squadron "Serious Uglies" / Discord-Server: https://discord.gg/2WccwBh

Ghost0815

Posted (edited)

Xeno426, when I read your first post I thought ... this method probably won't work.

 

The problem with ROE on AA units (particularly standalone radar based launchers) is that ROE doesn't control whether a unit will fire or not. What it controls is whether a unit will track a target.

 

ROE turns Target Tracking ON and OFF and this is stupid.

 

Seriously ED - THIS IS STUPID!

 

It means that when you give a command to FIRE the unit has to spend 15-30 seconds to find and track a new target. In 15-30 seconds a target can be gone. The FIRE command should actually be an order to FIRE at the CURRENTLY TRACKED TARGET ... but it isn't.

 

Seriously ED - THIS IS STUPID!

 

So yeah I have no idea why they did it like this but what it means is that you can't get your AA units to use more intelligent engagement UNLESS you use a very complex script.

 

The scripting system I have used doesn't fix the brokenness of the ROE system but it does hack around it by using a search radar network and a cunning vectored timing system to turn on stand-alone launchers at the right time for an ambush shot within your engagement distance parameters. It still doesn't let you do what you want but at least you don't waste missiles shooting at fighters way outside realistic engagement.

 

The dumb ROE for AA units isn't really a BUG but it is dumb.

Edited by vicx
Posted

*sigh* Well, I knew coming into this that the AA system wasn't nearly as robust as that in Falcon 4.0, where I can be ambushed by something like an S-125 site that turns on when you're within 20nm and almost instantly fires because it's been using data from a distant search radar for information.

 

The fact we can't even hack a good facsimile of that awesome system is depressing.

Posted

look for IADS script by grimes... or go back to Falcon BMS ;)

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Posted (edited)

Or learn to speak Russian and make your case to the devs directly.

 

---

 

Chrom is right though, IADS script by Grimes is pretty sweet. I also like the MSF framework which is maybe more advanced than IADS but harder to setup.

 

No easy solutions but people do get stuff done in DCS.

Edited by vicx
extra info
  • Recently Browsing   0 members

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