DCS editor AITasking

From DCS World Wiki - Hoggitworld.com
Revision as of 00:12, 12 April 2018 by Grimes (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This guide applies to using the DCS mission editor and the scripting engine.

Figure 1: Aircraft Selection Screen

Basics

The AI tasks system in DCS received a much needed and flexible overhaul between DCS Black Shark and the A-10C release. The new system allows for a great level of control over AI actions.

Task Types

There are four task categories and each behave a little differently. These categories are: Perform Task, Enroute Task, Commands, and Options.

Perform Task vs Enroute Task

Perform Task: Is a task that is assigned and executed immediately.

Enroute Task: Is a set of tasking instructions that remains active throughout a groups route.


Example of Difference. Perform Task(AttackGroup) vs Enroute Task(Engage Group). Group A is tasked with destroying Group B

There are no two tasks that are identical between perform task and enroute task, however there are tasks that end in the same result, but go about it completely differently. With the AttackGroup task GroupA will automatically detect GroupB and attack it the instant the tasking is given. This includes flying from its current location directly to GroupB's location and ignoring other targets along the way. With the Enroute Task EngageGroup, GroupB is added to a list of valid targets for GroupA. GroupA simply flies its assigned route, if at any point GroupA detects GroupB, then it will proceed to engage GroupB.

Once GroupB is destroyed, how GroupA reacts is different between the two tasks. As stated with the engageGroup tasking GroupA flew its route whereas with attackGroup it flew directly to the target. Thus once GroupB is destroyed the flight with engageGroup will continue on to its next waypoint while the flight with attackGroup will have to fly back to make up any waypoints it missed.


Enroute tasking is used as a general purpose task that allows AI to react to an evolving threat environment, where-as Perform Tasks are best suited for attacking very specific targets that may be critical to the missions objective.


Note: The escort task is effectively a combination of the two tasking types. It is assigned as a perform task to rendezvous and fly formation on an assigned group, but the act of escorting and protecting the group from the specified threats is an ongoing task that occurs throughout the escorted groups route and position.

Commands and Options

Commands: Are actions that are run on the group that don't have any overall effect on what the AI is allowed or isn't allowed to do. Commands typically dictate how a group can interact with the game world (callsign and frequencies) or are actual commands to follow.

Options: Are used to define behavior options for the AI group. These options decide what the AI is and isn't allowed to do. The options can over-ride active tasking. For instance with RTB on out of ammo the AI will return to base and abort its current mission if it runs out of a specific type of ammunition.

Both commands and options are executed immediately and take no time to run.


Aircraft selection and role

When placing an aircraft or helicopter group in the mission editor the "TASK" option is an important setting that controls a number of items. To avoid confusion it is best to think of this option as a "Role" instead of "task". This setting dictates the types of aircraft and pre-made weapons payloads available for that role. Additionally within the AI tasking different tasks are available and are filtered to correspond to the role assigned to the aircraft.

See Figure 1. The TASK (Red Arrow) filters the list of aircraft types (Blue Arrow) available to fill the role of "CAP".

AI tasking can then be executed via two different means. "Waypoint Actions" and "Triggered Actions". Each has its own specific uses.

Waypoint Actions

Waypoint actions are tasks that are tied directly to a groups route and executed upon reaching a specific waypoint. For example a mission designer may want a B-1B to bomb an runway, the designer would plan the B-1Bs route and assign the BombingRunway task on the nearest waypoint to the targeted airbase.

Pros: Tasks can be setup along a route to get consistent behavior from the AI.

Cons: Tasks can only be started once the group arrives at a waypoint. If for any reason the start conditions prevent a task from executing, then the task will never be evaluated again.

Triggered Actions

Triggered actions are a listing of tasks that can be triggered at any point for the group. These actions can be triggered via mission editor triggers or via the scripting engine. A common use is for a group of artillery to fire at a specified target during the mission. A mission designer would have a group of artillery with a triggered action task to fireAtPoint a pre-defined target once an invasion starts. A trigger that may start the invasion would also use Push AI Task to assign the artillery group its fireAtPoint tasking.

Pros: Forces a task for AI to immediately follow.

Cons: By assigning a new task it can easily "interrupt" AI in active tasks.

Task List by Category

Perform Task

AttackGroup, AttackUnit, Bombing, Strafing, CarpetBombing, AttackMapObject, BombingRunway, orbit, refueling, land, follow, followBigFormation, escort, Embarking, fireAtPoint, hold, FAC_AttackGroup, EmbarkToTransport, DisembarkFromTransport, CargoTransportation, goToWaypoint, groundEscort, RecoveryTanker

Enroute Task

engageTargets, engageTargetsInZone, engageGroup, engageUnit, awacs, tanker, ewr, FAC_engageGroup, FAC

Commands

script, setCallsign, setFrequency, setFrequencyForUnit, switchWaypoint, stopRoute, switchAction, setInvisible, setImmortal, setUnlimitedFuel, activateBeacon, deactivateBeacon, activateICLS, deactivateICLS, eplrs, start, transmitMessage, stopTransmission, smoke_on_off, ActivateLink4, deactivateLink4, activateACLS, deactivateACLS, LoadingShip

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, Option Radio Usage Contact, Option Radio Usage Engage, Option Radio Usage Kill, AC Engagement Range Restriction, jett tanks if empty, forced attack, Altitude Restriction for AAA Min, restrict targets, Altitude Restriction for AAA Max, Prefer Vertical