DCS option roe

From DCS World Wiki - Hoggitworld.com


Task: ROE Added with: 1.2.4
Hierarchy: Scripting Root > Tasks > Option > ROE
Tasking Type: Option
For: Airplanes, Helicopters, Ground Vehicles, Ships
Available Under: Everything
Description: Sets the groups rules of engagement. Ultimately defines whether or not the AI group is allowed to attack. This option can override all other tasking. With the 1.5 patch two of the values have different names in the mission editor. However the behavior is still exactly the same as before, its just labeled slightly different. The scripting engine still uses the previous values.

Behaviors:

Weapon Free: AI will engage any enemy group it detects. Target prioritization is based based on the threat of the target.

Open Fire, Weapons Free (Priority Designated): AI will engage any enemy group it detects, but will prioritize targets specified in the groups tasking.

Open Fire (Only Designated): AI will engage only targets specified in its taskings.

Return Fire: AI will only engage threats that shoot first.

Weapons Hold: AI will hold fire under all circumstances.

Format: All options have an option ID and Value. For more information see the article on the AI enumerator.

Option Identifier:

AI.Option.Air.id.ROE
AI.Option.Ground.id.ROE
AI.Option.Naval.id.ROE

Option Values: [type] is either Air, Ground, or Naval

AI.Option.[type].val.ROE
Enumerators: AI.Option.Air.val.ROE
WEAPON_FREE            = 0
OPEN_FIRE_WEAPON_FREE  = 1
OPEN_FIRE              = 2
RETURN_FIRE            = 3
WEAPON_HOLD            = 4

AI.Option.Ground.Val.ROE

OPEN_FIRE              = 2
RETURN_FIRE            = 3
WEAPON_HOLD            = 4

AI.Option.Naval.Val.ROE

OPEN_FIRE              = 2
RETURN_FIRE            = 3
WEAPON_HOLD            = 4
Examples: The following grabs a group and sets its ROE to hold fire and alarm state to red. Valid entries can be enumerators as shown.
 local con = Group.getByName(iadGroup.groupName):getController()
 con:setOption(0, 4) --hold fire
 con:setOption(9, 1) --radar off
Notes: See article Mission Editor: AI Tasking for more information on how AI tasking is handled within DCS.
Task List: Main Tasks: mission, AttackGroup, AttackUnit, Bombing, CarpetBombing, AttackMapObject, BombingRunway, orbit, refueling, land, follow, followBigFormation, escort, Embarking, fireAtPoint, hold, FAC_AttackGroup, EmbarkToTransport, DisembarkFromTransport, CargoTransportation, goToWaypoint

En-route Tasks: engageTargets, engageTargetsInZone, engageGroup, engageUnit, awacs, tanker, ewr, FAC_engageGroup, FAC

Commands: script, setCallsign, setFrequency, switchWaypoint, stopRoute, switchAction, setInvisible, setImmortal, activateBeacon, deactivateBeacon, eplrs, start, transmitMessage, stopTransmission

Options: ROE, Reaction To Threat, Radar Using, Flare Using, Formation, RTB On Bingo, silence, Disperse on Attack, Alarm State, RTB on Out of Ammo, ECM Using, Prohibit AA, Prohibit Jettison, Prohibit Afterburner, Prohibit AG, Missile Attack Range, Prohibit WP Pass Report, Engage Air Weapons