Difference between revisions of "DCS task mission"

From DCS World Wiki - Hoggitworld.com
(3 intermediate revisions by the same user not shown)
Line 26: Line 26:
 
         [1] = {  
 
         [1] = {  
 
           type = enum AI.Task.WaypointType,  
 
           type = enum AI.Task.WaypointType,  
           airdromeId = Airbase.ID,  
+
           airdromeId = Airbase.ID,
 +
          timeReFuAr = number, 
 
           helipadId = Airbase.ID,  
 
           helipadId = Airbase.ID,  
 
           action = enum AI.Task.TurnMethod,  
 
           action = enum AI.Task.TurnMethod,  
Line 38: Line 39:
 
           ETA_locked = boolean,  
 
           ETA_locked = boolean,  
 
           name = string,  
 
           name = string,  
           task = Task  
+
           task = Task,
 
         },  
 
         },  
 
         [2] = {  
 
         [2] = {  
Line 62: Line 63:
  
 
''type:'' Waypoint type. See [[DCS_enum_AI|AI enumerator page]] for more details.  
 
''type:'' Waypoint type. See [[DCS_enum_AI|AI enumerator page]] for more details.  
 +
 +
''speed:'' Speed in meters per second the group will attempt to travel at. Note each unit has its own maximum achievable speed
  
 
''action:'' Waypoint action type. See [[DCS_enum_AI|AI enumerator page]] for more details.
 
''action:'' Waypoint action type. See [[DCS_enum_AI|AI enumerator page]] for more details.
Line 69: Line 72:
 
'''Optional Parameters''':
 
'''Optional Parameters''':
  
''speed:'' Speed in meters per second the group will attempt to travel at. Note each unit has its own maximum achievable speed
+
 
.
 
 
''speed_locked:'' boolean value that will determine if units will attempt to travel at the specified speed
 
''speed_locked:'' boolean value that will determine if units will attempt to travel at the specified speed
  
Line 78: Line 80:
  
 
''alt_type:'' Altitude type; Radio or Barometric. Defaults to barometric. If specified the altitude of the waypoint can be defined as AGL or MSL. Only applies to aircraft.
 
''alt_type:'' Altitude type; Radio or Barometric. Defaults to barometric. If specified the altitude of the waypoint can be defined as AGL or MSL. Only applies to aircraft.
 +
 +
''task:'' All tasks, enroute tasks, commands, and options are defined here.
 +
 +
'''Waypoint Type Specific Parameters'''
  
 
''helipadId:'' Used only for "Land" waypoint type. Specifies the helipadId the helicopter group will attempt to land at. AI will only land if helipad is friendly. If not provided the AI will land at the nearest valid base to the coordinates.
 
''helipadId:'' Used only for "Land" waypoint type. Specifies the helipadId the helicopter group will attempt to land at. AI will only land if helipad is friendly. If not provided the AI will land at the nearest valid base to the coordinates.
Line 83: Line 89:
 
''airdromeId:'' Used only for "Land" waypoint type. Specifies the airbaseId the aircraft group will attempt to land at. AI will only land if airbase is friendly. If not provided the AI will land at the nearest valid base to the coordinates.
 
''airdromeId:'' Used only for "Land" waypoint type. Specifies the airbaseId the aircraft group will attempt to land at. AI will only land if airbase is friendly. If not provided the AI will land at the nearest valid base to the coordinates.
  
''task:'' All tasks, enroute tasks, commands, and options are defined here.
+
''timeReFuAr: '' If the waypoint type is a landReFuAr this value determines how long in minutes the unit will be stationary for.
  
 
|enum=  
 
|enum=  
Line 93: Line 99:
  
 
|notes= See article [[Mission Editor: AI Tasking]] for more information on how AI tasking is handled within DCS.  
 
|notes= See article [[Mission Editor: AI Tasking]] for more information on how AI tasking is handled within DCS.  
 +
 +
 
As of 2.5.6 a new parameter of airborne has been added to the root tasking for a flight. This is so the game knows that the aircraft group you are assigning a bunch of aircraft specific waypoint information is in fact being assigned to an aircraft group. This parameter is required if the group is assigned the task after spawn they are spawned in. This fixes a long standing bug where AI would ignore waypoint information and default to "Fly Over" waypoint type or airport Id if it was different from where it took off from.  
 
As of 2.5.6 a new parameter of airborne has been added to the root tasking for a flight. This is so the game knows that the aircraft group you are assigning a bunch of aircraft specific waypoint information is in fact being assigned to an aircraft group. This parameter is required if the group is assigned the task after spawn they are spawned in. This fixes a long standing bug where AI would ignore waypoint information and default to "Fly Over" waypoint type or airport Id if it was different from where it took off from.  
  

Revision as of 02:08, 30 September 2021


Task: mission Added with: 1.2.4
Hierarchy: Scripting Root > Tasks > Main task > mission
Tasking Type: Main task
For: Airplanes, Helicopters, Ground Vehicles, Ships
Available Under: Everything
Description: The mission task is a collection of waypoints that are assigned to a group. When you create a group in the mission editor and place a route, you are created its mission task.

For ground vehicles and ships the mission task is how you can more directly control where ground/ship forces are going.

Format: This task needs to be in the following format.
 Mission = { 
  id = 'Mission', 
  params = { 
    airborne = boolean,
    route = { 
      points = { 
        [1] = { 
          type = enum AI.Task.WaypointType, 
          airdromeId = Airbase.ID,
          timeReFuAr = number,  
          helipadId = Airbase.ID, 
          action = enum AI.Task.TurnMethod, 
          x = Distance, 
          y = Distance, 
          alt = Distance, 
          alt_type = enum AI.Task.AltitudeType, 
          speed = Distance, 
          speed_locked = boolean, 
          ETA = Time, 
          ETA_locked = boolean, 
          name = string, 
          task = Task, 
        }, 
        [2] = { 
          ... 
        }, 
        ... 
        [N]= { 
          ... 
        } 
      } 
    }, 
  } 
} 
}

Each waypoint has a number of parameters that define how the group will handle the route.

Required parameters:

x: Vec2 x coordinate waypoint will be placed at.

y: Vec2 y coordinate waypoint will be placed at. If converted from Vec3 this is the z coordinate.

type: Waypoint type. See AI enumerator page for more details.

speed: Speed in meters per second the group will attempt to travel at. Note each unit has its own maximum achievable speed

action: Waypoint action type. See AI enumerator page for more details.

alt: Altitude of waypoint. If converted from Vec3 this is the y coordinate. This item is required for Aircraft, but is optional for ground vehicles. As of 2.5.6 this value can be set to negative numbers. Specifically this will submerge submarines.

Optional Parameters:


speed_locked: boolean value that will determine if units will attempt to travel at the specified speed

eta: Time-On-Target of the waypoint. Has effect only if ETA_locked is true. AI will adjust speed to reach TOT accordingly.

eta_locked: Boolean value that will determine if AI will attempt to reach the waypoint at a specified time.

alt_type: Altitude type; Radio or Barometric. Defaults to barometric. If specified the altitude of the waypoint can be defined as AGL or MSL. Only applies to aircraft.

task: All tasks, enroute tasks, commands, and options are defined here.

Waypoint Type Specific Parameters

helipadId: Used only for "Land" waypoint type. Specifies the helipadId the helicopter group will attempt to land at. AI will only land if helipad is friendly. If not provided the AI will land at the nearest valid base to the coordinates.

airdromeId: Used only for "Land" waypoint type. Specifies the airbaseId the aircraft group will attempt to land at. AI will only land if airbase is friendly. If not provided the AI will land at the nearest valid base to the coordinates.

timeReFuAr: If the waypoint type is a landReFuAr this value determines how long in minutes the unit will be stationary for.

Enumerators: AI.Task.TurnMethod
"FLY_OVER_POINT" = "Fly Over Point"
"FIN_POINT"      = "Fin Point"

AI.Task.VehicleFormation

"VEE"           = "Vee"
"ECHELON_RIGHT" = "EchelonR"
"OFF_ROAD"      = "Off Road"
"RANK"          = "Rank"
"ECHELON_LEFT"  = "EchelonL"
"ON_ROAD"       = "On Road"
"CONE"          = "Cone"
"DIAMOND"       = "Diamond"

AI.Task.AltitudeType,

"RADIO" = "RADIO"
"BARO"  = "BARO"

AI.Task.WaypointType

"TAKEOFF"             = "TakeOff"
"TAKEOFF_PARKING"     = "TakeOffParking"
"TURNING_POINT"       = "Turning Point"
"TAKEOFF_PARKING_HOT" = "TakeOffParkingHot"
"LAND"                = "Land"
Examples:
Notes: See article Mission Editor: AI Tasking for more information on how AI tasking is handled within DCS.


As of 2.5.6 a new parameter of airborne has been added to the root tasking for a flight. This is so the game knows that the aircraft group you are assigning a bunch of aircraft specific waypoint information is in fact being assigned to an aircraft group. This parameter is required if the group is assigned the task after spawn they are spawned in. This fixes a long standing bug where AI would ignore waypoint information and default to "Fly Over" waypoint type or airport Id if it was different from where it took off from.

Task List: Task Wrappers: mission, ComboTask, ControlledTask, WrappedAction


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

En-route Tasks: 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