diff --git a/Moose Development/Moose/AI/AI_RAT.lua b/Moose Development/Moose/Functional/RAT.lua similarity index 95% rename from Moose Development/Moose/AI/AI_RAT.lua rename to Moose Development/Moose/Functional/RAT.lua index 8e944b35a..2194704de 100644 --- a/Moose Development/Moose/AI/AI_RAT.lua +++ b/Moose Development/Moose/Functional/RAT.lua @@ -1,7 +1,37 @@ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - ---- ** AI ** --- @module AI_RAT +--- **Functional** -- Create random airtraffic in your missions. +-- +-- ![Banner Image](..\Presentations\RAT\RAT.png) +-- +-- ==== +-- +-- The documentation of the RAT class can be found further in this document. +-- +-- ==== +-- +-- # Demo Missions +-- +-- ### [RAT Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/SPA%20-%20Spawning) +-- +-- ### [RAT Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/SPA%20-%20Spawning) +-- +-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases) +-- +-- ==== +-- +-- # YouTube Channel +-- +-- ### [RAT YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl1jirWIo4t4YxqN-HxjqRkL) +-- +-- === +-- ==== +-- +-- ### Author: **[funkyfranky](https://forums.eagle.ru/member.php?u=115026)** +-- +-- ### Contributions: **Sven Van de Velde ([FlightControl](https://forums.eagle.ru/member.php?u=89536))** +-- +-- ==== +-- @module Rat ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -11,7 +41,7 @@ --- RAT class -- @type RAT --- @field #string ClassName +-- @field #string ClassName Name of the Class -- @field #boolean debug -- @field #number spawndelay -- @field #number spawninterval @@ -54,6 +84,11 @@ -- @field #table RAT -- @extends Functional.Spawn#SPAWN +--- # RAT class, extends @{Spawn#SPAWN} +-- +-- The RAT class allows to easily create random air traffic in your missions. +-- + --- RAT class -- @field #RAT RAT @@ -102,16 +137,16 @@ RAT={ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---- RAT categories. +--- Categories of the RAT class. -- @field #RAT cat RAT.cat={ plane="plane", - heli="heli" + heli="heli", } ---- RAT takeoff style. --- @field #RAT waypoint -RAT.waypoint={ +--- RAT waypoint type. +-- @field #RAT wp +RAT.wp={ coldorhot=0, air=1, runway=2, @@ -148,7 +183,7 @@ RAT.unit={ } --- RAT rules of engagement. --- @field #RAT ROT +-- @field #RAT ROE RAT.ROE={ weaponhold="hold", weaponfree="free", @@ -200,6 +235,12 @@ myid="RAT | " --TODO: Add respawn limit. --DONE: Make takeoff method random between cold and hot start. --TODO: Check out uncontrolled spawning. +--TODO: Check aircraft spawning in air at Sochi after third aircraft was spawned. +--TODO: Improve despawn after stationary. Might lead to despawning if many aircraft spawn at the same time. +--TODO: Check why birth event is not handled. +--TODO: Improve behaviour when no destination or departure airports were found. Leads to crash, e.g. 1184: attempt to get length of local 'destinations' (a nil value) +--TODO: Check cases where aircraft get shot down. Respawn? +--TODO: Handle the case where more than 10 RAT objects are spawned. Likewise, more than 10 groups of one object. Causes problems with the number of menu items! ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -217,7 +258,7 @@ function RAT:New(groupname) -- Inherit SPAWN clase. local self=BASE:Inherit(self, SPAWN:New(groupname)) -- #RAT - -- Get template group defined in the mission editor. + -- Get template group defined in the mission editor. local DCSgroup=Group.getByName(groupname) -- Check the group actually exists. @@ -307,7 +348,7 @@ function RAT:Spawn(naircraft) local Tstart=self.spawndelay local dt=self.spawninterval -- Ensure that interval is >= 180 seconds if spawn at runway is chosen. Aircraft need time to takeoff or the runway gets jammed. - if self.takeoff==RAT.waypoint.runway then + if self.takeoff==RAT.wp.runway then dt=math.max(dt, 180) end local Tstop=Tstart+dt*(naircraft-1) @@ -317,7 +358,7 @@ function RAT:Spawn(naircraft) SCHEDULER:New(nil, self.Status, {self}, Tstart+1, self.statusinterval) -- Handle events. - self:HandleEvent(EVENTS.Birth, self._OnBirthDay) + self:HandleEvent(EVENTS.Birth, self._OnBirth) self:HandleEvent(EVENTS.EngineStartup, self._EngineStartup) self:HandleEvent(EVENTS.Takeoff, self._OnTakeoff) self:HandleEvent(EVENTS.Land, self._OnLand) @@ -369,15 +410,15 @@ function RAT:SetTakeoff(type) local _Type if type:lower()=="takeoff-cold" or type:lower()=="cold" then - _Type=RAT.waypoint.cold + _Type=RAT.wp.cold elseif type:lower()=="takeoff-hot" or type:lower()=="hot" then - _Type=RAT.waypoint.hot + _Type=RAT.wp.hot elseif type:lower()=="takeoff-runway" or type:lower()=="runway" then - _Type=RAT.waypoint.runway + _Type=RAT.wp.runway elseif type:lower()=="air" then - _Type=RAT.waypoint.air + _Type=RAT.wp.air else - _Type=RAT.waypoint.coldorhot + _Type=RAT.wp.coldorhot end self.takeoff=_Type @@ -698,11 +739,12 @@ function RAT:_SpawnWithRoute(_departure, _destination) -- Set takeoff type. local _takeoff=self.takeoff - if self.takeoff==RAT.waypoint.coldorhot then - local temp={RAT.waypoint.cold, RAT.waypoint.hot} + if self.takeoff==RAT.wp.coldorhot then + local temp={RAT.wp.cold, RAT.wp.hot} _takeoff=temp[math.random(2)] env.info(myid.."Random takeoff type: ".._takeoff) end + env.info(myid.."Takeoff type: ".._takeoff) -- Set flight plan. local departure, destination, waypoints = self:_SetRoute(_takeoff, _departure, _destination) @@ -750,12 +792,12 @@ function RAT:_SpawnWithRoute(_departure, _destination) local name=self.aircraft.type.." ID "..tostring(self.SpawnIndex) -- F10/RAT//Group X self.Menu[self.SubMenuName].groups[self.SpawnIndex]=MENU_MISSION:New(name, self.Menu[self.SubMenuName].groups) - -- F10/RAT//Group X/ROT + -- F10/RAT//Group X/Set ROE self.Menu[self.SubMenuName].groups[self.SpawnIndex]["roe"]=MENU_MISSION:New("Set ROE", self.Menu[self.SubMenuName].groups[self.SpawnIndex]) MENU_MISSION_COMMAND:New("Weapons hold", self.Menu[self.SubMenuName].groups[self.SpawnIndex]["roe"], self._SetROE, self, group, RAT.ROE.weaponhold) MENU_MISSION_COMMAND:New("Weapons free", self.Menu[self.SubMenuName].groups[self.SpawnIndex]["roe"], self._SetROE, self, group, RAT.ROE.weaponfree) MENU_MISSION_COMMAND:New("Return fire", self.Menu[self.SubMenuName].groups[self.SpawnIndex]["roe"], self._SetROE, self, group, RAT.ROE.returnfire) - -- F10/RAT//Group X/ROT + -- F10/RAT//Group X/Set ROT self.Menu[self.SubMenuName].groups[self.SpawnIndex]["rot"]=MENU_MISSION:New("Set ROT", self.Menu[self.SubMenuName].groups[self.SpawnIndex]) MENU_MISSION_COMMAND:New("No reaction", self.Menu[self.SubMenuName].groups[self.SpawnIndex]["rot"], self._SetROT, self, group, RAT.ROT.noreaction) MENU_MISSION_COMMAND:New("Passive defense", self.Menu[self.SubMenuName].groups[self.SpawnIndex]["rot"], self._SetROT, self, group, RAT.ROT.passive) @@ -806,13 +848,15 @@ end --- Set the route of the AI plane. Due to DCS landing bug, this has to be done before the unit is spawned. -- @param #RAT self --- @param takeoff #RAT.waypoint Takeoff type. +-- @param takeoff #RAT.wp Takeoff type. -- @param Wrapper.Airport#AIRBASE _departure (Optional) Departure airbase. -- @param Wrapper.Airport#AIRBASE _destination (Optional) Destination airbase. -- @return Wrapper.Airport#AIRBASE Departure airbase. -- @return Wrapper.Airport#AIRBASE Destination airbase. -- @return #table Table of flight plan waypoints. function RAT:_SetRoute(takeoff, _departure, _destination) + + env.info(myid.."takeoff in _setroute: "..takeoff) -- Min cruise speed 70% of Vmax or 600 km/h whichever is lower. local VxCruiseMin = math.min(self.aircraft.Vmax*0.70, 166) @@ -856,7 +900,7 @@ function RAT:_SetRoute(takeoff, _departure, _destination) -- Coordinates of departure point. local Pdeparture - if takeoff==RAT.waypoint.air then + if takeoff==RAT.wp.air then -- For an air start, we take a random point within the spawn zone. local vec2=departure:GetRandomVec2() --Pdeparture=COORDINATE:New(vec2.x, self.aircraft.FLcruise, vec2.y) @@ -867,7 +911,7 @@ function RAT:_SetRoute(takeoff, _departure, _destination) -- Height ASL of departure point. local H_departure - if takeoff==RAT.waypoint.air then + if takeoff==RAT.wp.air then -- Departure altitude is 70% of default cruise with 30% variation and limited to 1000 m AGL (50 m for helos). local Hmin if self.category==RAT.cat.plane then @@ -1061,12 +1105,12 @@ function RAT:_SetRoute(takeoff, _departure, _destination) --Convert coordinates into route waypoints. local wp0=self:_Waypoint(takeoff, c0, VxClimb, H_departure, departure) - local wp1=self:_Waypoint(RAT.waypoint.climb, c1, VxClimb, H_departure+(FLcruise-H_departure)/2) - local wp2=self:_Waypoint(RAT.waypoint.cruise, c2, VxCruise, FLcruise) - local wp3=self:_Waypoint(RAT.waypoint.cruise, c3, VxCruise, FLcruise) - local wp4=self:_Waypoint(RAT.waypoint.descent, c4, VxDescent, FLcruise-(FLcruise-(h_holding+H_holding))/2) - local wp5=self:_Waypoint(RAT.waypoint.holding, c5, VxHolding, H_holding+h_holding) - local wp6=self:_Waypoint(RAT.waypoint.landing, c6, VxFinal, H_destination, destination) + local wp1=self:_Waypoint(RAT.wp.climb, c1, VxClimb, H_departure+(FLcruise-H_departure)/2) + local wp2=self:_Waypoint(RAT.wp.cruise, c2, VxCruise, FLcruise) + local wp3=self:_Waypoint(RAT.wp.cruise, c3, VxCruise, FLcruise) + local wp4=self:_Waypoint(RAT.wp.descent, c4, VxDescent, FLcruise-(FLcruise-(h_holding+H_holding))/2) + local wp5=self:_Waypoint(RAT.wp.holding, c5, VxHolding, H_holding+h_holding) + local wp6=self:_Waypoint(RAT.wp.landing, c6, VxFinal, H_destination, destination) -- set waypoints local waypoints = {wp0, wp1, wp2, wp3, wp4, wp5, wp6} @@ -1097,7 +1141,7 @@ function RAT:_PickDeparture(takeoff) -- Array of possible departure airports or zones. local departures={} - if takeoff==RAT.waypoint.air then + if takeoff==RAT.wp.air then if self.random_departure then @@ -1142,7 +1186,7 @@ function RAT:_PickDeparture(takeoff) local departure=departures[math.random(#departures)] local text - if takeoff==RAT.waypoint.air then + if takeoff==RAT.wp.air then text="Chosen departure zone: "..departure:GetName() else text="Chosen departure airport: "..departure:GetName().." (ID "..departure:GetID()..")" @@ -1466,7 +1510,7 @@ end --- Function is executed when a unit is spawned. -- @param #RAT self -function RAT:_OnBirthDay(EventData) +function RAT:_OnBirth(EventData) env.info(myid.."It's a birthday!") @@ -1743,7 +1787,7 @@ end --- Create a waypoint that can be used with the Route command. -- @param #RAT self --- @param #string Type Type of waypoint. takeoff-cold, takeoff-hot, takeoff-runway, climb, cruise, descent, holding, land, landing. +-- @param #number Type Type of waypoint. -- @param Core.Point#COORDINATE Coord 3D coordinate of the waypoint. -- @param #number Speed Speed in m/s. -- @param #number Altitude Altitude in m. @@ -1751,6 +1795,8 @@ end -- @return #table Waypoints for DCS task route or spawn template. function RAT:_Waypoint(Type, Coord, Speed, Altitude, Airport) + env.info(myid.."takeoff in _waypoint: "..Type) + -- Altitude of input parameter or y-component of 3D-coordinate. local _Altitude=Altitude or Coord.y @@ -1763,53 +1809,53 @@ function RAT:_Waypoint(Type, Coord, Speed, Altitude, Airport) local _alttype="RADIO" local _AID=nil - if Type==RAT.waypoint.cold then + if Type==RAT.wp.cold then -- take-off with engine off _Type="TakeOffParking" _Action="From Parking Area" _Altitude = 2 _alttype="RADIO" _AID = Airport:GetID() - elseif Type==RAT.waypoint.hot then + elseif Type==RAT.wp.hot then -- take-off with engine on _Type="TakeOffParkingHot" _Action="From Parking Area Hot" _Altitude = 2 _alttype="RADIO" _AID = Airport:GetID() - elseif Type==RAT.waypoint.runway then + elseif Type==RAT.wp.runway then -- take-off from runway _Type="TakeOff" _Action="From Parking Area" _Altitude = 2 _alttype="RADIO" _AID = Airport:GetID() - elseif Type==RAT.waypoint.air then + elseif Type==RAT.wp.air then -- air start _Type="Turning Point" _Action="Turning Point" _alttype="BARO" - elseif Type==RAT.waypoint.climb then + elseif Type==RAT.wp.climb then _Type="Turning Point" _Action="Turning Point" --_Action="Fly Over Point" _alttype="BARO" - elseif Type==RAT.waypoint.cruise then + elseif Type==RAT.wp.cruise then _Type="Turning Point" _Action="Turning Point" --_Action="Fly Over Point" _alttype="BARO" - elseif Type==RAT.waypoint.descent then + elseif Type==RAT.wp.descent then _Type="Turning Point" _Action="Turning Point" --_Action="Fly Over Point" _alttype="BARO" - elseif Type==RAT.waypoint.holding then + elseif Type==RAT.wp.holding then _Type="Turning Point" _Action="Turning Point" --_Action="Fly Over Point" _alttype="BARO" - elseif Type==RAT.waypoint.landing then + elseif Type==RAT.wp.landing then _Type="Land" _Action="Landing" _Altitude = 2 @@ -1832,7 +1878,7 @@ function RAT:_Waypoint(Type, Coord, Speed, Altitude, Airport) text=text..string.format("Land = %6.1f m ASL\n", Hland) text=text..string.format("Altitude = %6.1f m (%s)\n", _Altitude, _alttype) if Airport then - if Type==RAT.waypoint.air then + if Type==RAT.wp.air then text=text..string.format("Zone = %s\n", Airport:GetName()) else text=text..string.format("Airport = %s with ID %i\n", Airport:GetName(), Airport:GetID()) @@ -1876,7 +1922,7 @@ function RAT:_Waypoint(Type, Coord, Speed, Altitude, Airport) ["steer"] = 2, } -- task - if Type==RAT.waypoint.holding then + if Type==RAT.wp.holding then -- Duration of holing. Between 10 and 170 seconds. local Duration=self:_Randomize(90,0.9) RoutePoint.task=self:_TaskHolding({x=Coord.x, y=Coord.z}, Altitude, Speed, Duration) @@ -2233,9 +2279,9 @@ end function RAT:_SetMarker(text, wp) RAT.markerid=RAT.markerid+1 table.insert(self.markerids,RAT.markerid) - if self.debug then - env.info(myid.."Placing marker with ID "..RAT.markerid..": "..text) - end + --if self.debug then + env.info(myid..self.SpawnTemplatePrefix..": placing marker with ID "..RAT.markerid..": "..text) + --end -- Convert to coordinate. local vec={x=wp.x, y=wp.alt, z=wp.y} -- Place maker visible for all on the F10 map. @@ -2248,10 +2294,12 @@ end function RAT:_DeleteMarkers(ids) if ids then for k,v in pairs(ids) do - trigger.action.removeMark(k) + env.info("Deleting maker id v= "..v) + trigger.action.removeMark(v) end else for i=1,RAT.markerid do + env.info("Deleting maker id i= "..i) trigger.action.removeMark(i) end end diff --git a/Moose Mission Setup/Moose.files b/Moose Mission Setup/Moose.files index 1794a4ff2..b50c54d88 100644 --- a/Moose Mission Setup/Moose.files +++ b/Moose Mission Setup/Moose.files @@ -40,6 +40,7 @@ Functional/MissileTrainer.lua Functional/AirbasePolice.lua Functional/Detection.lua Functional/Designate.lua +Functional/RAT.lua AI/AI_Balancer.lua AI/AI_A2A.lua @@ -52,7 +53,6 @@ AI/AI_Cap.lua AI/AI_Cas.lua AI/AI_Bai.lua AI/AI_Formation.lua -AI/AI_RAT.lua Actions/Act_Assign.lua Actions/Act_Route.lua diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua index 0365ba7b0..314c98d50 100644 --- a/Moose Mission Setup/Moose.lua +++ b/Moose Mission Setup/Moose.lua @@ -1,5 +1,5 @@ env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20170811_0800 funkyfranky' ) +env.info( 'Moose Generation Timestamp: 20170909_1801' ) local base = _G @@ -60,6 +60,7 @@ __Moose.Include( 'Functional/MissileTrainer.lua' ) __Moose.Include( 'Functional/AirbasePolice.lua' ) __Moose.Include( 'Functional/Detection.lua' ) __Moose.Include( 'Functional/Designate.lua' ) +__Moose.Include( 'Functional/RAT.lua' ) __Moose.Include( 'AI/AI_Balancer.lua' ) __Moose.Include( 'AI/AI_A2A.lua' ) __Moose.Include( 'AI/AI_A2A_Patrol.lua' ) @@ -70,7 +71,6 @@ __Moose.Include( 'AI/AI_Patrol.lua' ) __Moose.Include( 'AI/AI_Cap.lua' ) __Moose.Include( 'AI/AI_Cas.lua' ) __Moose.Include( 'AI/AI_Bai.lua' ) -__Moose.Include( 'AI/AI_RAT.lua' ) __Moose.Include( 'AI/AI_Formation.lua' ) __Moose.Include( 'Actions/Act_Assign.lua' ) __Moose.Include( 'Actions/Act_Route.lua' ) diff --git a/docs/Documentation/AI_A2A.html b/docs/Documentation/AI_A2A.html index 6d716e063..f8b56c8f1 100644 --- a/docs/Documentation/AI_A2A.html +++ b/docs/Documentation/AI_A2A.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/AI_A2A_Cap.html b/docs/Documentation/AI_A2A_Cap.html index b93320257..e8e8a353b 100644 --- a/docs/Documentation/AI_A2A_Cap.html +++ b/docs/Documentation/AI_A2A_Cap.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/AI_A2A_Dispatcher.html b/docs/Documentation/AI_A2A_Dispatcher.html index 703bc7751..90b339863 100644 --- a/docs/Documentation/AI_A2A_Dispatcher.html +++ b/docs/Documentation/AI_A2A_Dispatcher.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • @@ -341,13 +342,13 @@ Per one, two, three, four?

    - AI_A2A_DISPATCHER:CountDefendersEngaged(Target) + AI_A2A_DISPATCHER:CountDefendersEngaged(AttackerDetection) - AI_A2A_DISPATCHER:CountDefendersToBeEngaged(DetectedItem, DefenderCount) + AI_A2A_DISPATCHER:CountDefendersToBeEngaged(AttackerDetection, DefenderCount) @@ -719,7 +720,7 @@ Per one, two, three, four?

    - AI_A2A_DISPATCHER:SetDefenderTaskTarget(AIGroup, Defender, Target) + AI_A2A_DISPATCHER:SetDefenderTaskTarget(AIGroup, Defender, AttackerDetection) @@ -905,13 +906,13 @@ Per one, two, three, four?

    - AI_A2A_DISPATCHER:onafterENGAGE(From, Event, To, Target, Defenders) + AI_A2A_DISPATCHER:onafterENGAGE(From, Event, To, AttackerDetection, Defenders) - AI_A2A_DISPATCHER:onafterGCI(From, Event, To, DetectedItem, DefendersMissing, Friendlies) + AI_A2A_DISPATCHER:onafterGCI(From, Event, To, AttackerDetection, DefendersMissing, DefenderFriendlies) @@ -2104,7 +2105,7 @@ DefenderSquadron

    -AI_A2A_DISPATCHER:CountDefendersEngaged(Target) +AI_A2A_DISPATCHER:CountDefendersEngaged(AttackerDetection)
    @@ -2115,7 +2116,7 @@ DefenderSquadron

    • -

      Target :

      +

      AttackerDetection :

    @@ -2125,7 +2126,7 @@ DefenderSquadron

    -AI_A2A_DISPATCHER:CountDefendersToBeEngaged(DetectedItem, DefenderCount) +AI_A2A_DISPATCHER:CountDefendersToBeEngaged(AttackerDetection, DefenderCount)
    @@ -2136,7 +2137,7 @@ DefenderSquadron

    @@ -5222,7 +5223,7 @@ Provide a value of true to display every 30 seconds a tactical
    -AI_A2A_DISPATCHER:onafterENGAGE(From, Event, To, Target, Defenders) +AI_A2A_DISPATCHER:onafterENGAGE(From, Event, To, AttackerDetection, Defenders)
    @@ -5248,7 +5249,7 @@ Provide a value of true to display every 30 seconds a tactical
  • -

    Target :

    +

    AttackerDetection :

  • @@ -5263,7 +5264,7 @@ Provide a value of true to display every 30 seconds a tactical
    -AI_A2A_DISPATCHER:onafterGCI(From, Event, To, DetectedItem, DefendersMissing, Friendlies) +AI_A2A_DISPATCHER:onafterGCI(From, Event, To, AttackerDetection, DefendersMissing, DefenderFriendlies)
    @@ -5289,7 +5290,7 @@ Provide a value of true to display every 30 seconds a tactical
  • -

    DetectedItem :

    +

    AttackerDetection :

  • @@ -5299,7 +5300,7 @@ Provide a value of true to display every 30 seconds a tactical
  • -

    Friendlies :

    +

    DefenderFriendlies :

  • diff --git a/docs/Documentation/AI_A2A_GCI.html b/docs/Documentation/AI_A2A_GCI.html index 7a6e7ed7b..c4d7a8305 100644 --- a/docs/Documentation/AI_A2A_GCI.html +++ b/docs/Documentation/AI_A2A_GCI.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/AI_A2A_Patrol.html b/docs/Documentation/AI_A2A_Patrol.html index 3e8626ebe..cbc75a2d6 100644 --- a/docs/Documentation/AI_A2A_Patrol.html +++ b/docs/Documentation/AI_A2A_Patrol.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/AI_BAI.html b/docs/Documentation/AI_BAI.html index afa707ccf..51f70c756 100644 --- a/docs/Documentation/AI_BAI.html +++ b/docs/Documentation/AI_BAI.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/AI_Balancer.html b/docs/Documentation/AI_Balancer.html index 2f53c4846..bd6e5997f 100644 --- a/docs/Documentation/AI_Balancer.html +++ b/docs/Documentation/AI_Balancer.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/AI_Cap.html b/docs/Documentation/AI_Cap.html index 715305e43..5973240c4 100644 --- a/docs/Documentation/AI_Cap.html +++ b/docs/Documentation/AI_Cap.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/AI_Cas.html b/docs/Documentation/AI_Cas.html index 068b80a80..4e763f512 100644 --- a/docs/Documentation/AI_Cas.html +++ b/docs/Documentation/AI_Cas.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/AI_Formation.html b/docs/Documentation/AI_Formation.html index 76e0fbc33..9de78a5e8 100644 --- a/docs/Documentation/AI_Formation.html +++ b/docs/Documentation/AI_Formation.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html index 0892b0b07..5b64ef359 100644 --- a/docs/Documentation/AI_Patrol.html +++ b/docs/Documentation/AI_Patrol.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/AI_RAT.html b/docs/Documentation/AI_RAT.html new file mode 100644 index 000000000..96a34ce57 --- /dev/null +++ b/docs/Documentation/AI_RAT.html @@ -0,0 +1,3196 @@ + + + + + + +
    +
    + +
    +
    +
    +
    + +
    +

    Module AI_RAT

    + +
      +
    • Functional -- Create random airtraffic in your missions.
    • +
    + + +

    +Banner Image

    + +
    + +

    The documentation of the SPAWN class can be found further in this document.

    + +
    + +

    Global(s)

    + + + + + + + + + +
    RAT +

    RAT class

    +
    myid +

    Some ID to identify where we are

    +

    string myid

    +
    +

    Type RAT

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    RAT.AlphaDescent + +
    RAT.ClassName + +
    RAT:Commute(switch) +

    Aircraft will commute between their departure and destination airports.

    +
    RAT:ContinueJourney(switch) +

    Aircraft will continue their journey from their destination.

    +
    RAT.FLmaxuser + +
    RAT.FLminuser + +
    RAT.FLuser + +
    RAT.Menu + +
    RAT.MenuF10 +

    Main F10 menu.

    +
    RAT:New(groupname) +

    Create a new RAT object.

    +
    RAT:PlaceMarkers(switch) +

    Place markers of waypoints on the F10 map.

    +
    RAT.RAT + +
    RAT.ROE +

    RAT rules of engagement.

    +
    RAT.ROT +

    RAT reaction to threat.

    +
    RAT:RespawnAfterLanding(delay) +

    Make aircraft respawn the moment they land rather than at engine shut down.

    +
    RAT:SetClimbRate(rate) +

    Set the climb rate.

    +
    RAT:SetCoalition(friendly) +

    Set the friendly coalitions from which the airports can be used as departure or destination.

    +
    RAT:SetDeparture(names) +

    Set possible departure ports.

    +
    RAT:SetDescentAngle(angle) +

    Set the angle of descent.

    +
    RAT:SetDestination(names) +

    Set name of destination airport for the AI aircraft.

    +
    RAT:SetFL(height) +

    Set flight level.

    +
    RAT:SetFLcruise(height) +

    Set flight level of cruising part.

    +
    RAT:SetFLmax(height) +

    Set max flight level.

    +
    RAT:SetFLmin(height) +

    Set min flight level.

    +
    RAT:SetMaxCruiseSpeed(speed) +

    Set the maximum cruise speed of the aircraft.

    +
    RAT:SetMaxDistance(dist) +

    Set maximum distance between departure and destination.

    +
    RAT:SetMinDistance(dist) +

    Set minimum distance between departure and destination.

    +
    RAT:SetROE(roe) +

    Set rules of engagement (ROE).

    +
    RAT:SetROT(rot) +

    Set reaction to threat (ROT).

    +
    RAT:SetSpawnDelay(delay) +

    Set the delay before first group is spawned.

    +
    RAT:SetSpawnInterval(interval) +

    Set the interval between spawnings of the template group.

    +
    RAT:SetTakeoff(type) +

    Set takeoff type.

    +
    RAT:Spawn(naircraft) +

    Triggers the spawning of AI aircraft.

    +
    RAT:Status(message, forID) +

    Report status of RAT groups.

    +
    RAT:StatusReports(switch) +

    Aircraft report status messages.

    +
    RAT.SubMenuName + +
    RAT.Vclimb + +
    RAT.Vcruisemax + +
    RAT:_AirportExists(name) +

    Test if an airport exists on the current map.

    +
    RAT:_Course(a, b) +

    Determine the heading from point a to point b.

    +
    RAT:_Debug(switch) +

    Turn debug messages on or off.

    +
    RAT:_DeleteMarkers(ids) +

    Delete all markers on F10 map.

    +
    RAT:_Despawn(group) +

    Despawn unit.

    +
    RAT:_EngineStartup(EventData) +

    Function is executed when a unit starts its engines.

    +
    RAT:_FLmax(alpha, beta, d, phi, h0) +

    Calculate the max flight level for a given distance and fixed climb and descent rates.

    +
    RAT:_GetAirportsOfCoalition() +

    Get all "friendly" airports of the current map.

    +
    RAT:_GetAirportsOfMap() +

    Get all airports of the current map.

    +
    RAT:_GetDestinations(q, minrange, maxrange) +

    Get all possible destination airports depending on departure position.

    +
    RAT:_GetLife(group) +

    Get (relative) life of first unit of a group.

    +
    RAT:_InitAircraft(DCSgroup) +

    Initialize basic parameters of the aircraft based on its (template) group in the mission editor.

    +
    RAT:_ModifySpawnTemplate(waypoints) +

    Modifies the template of the group to be spawned.

    +
    RAT:_OnBirth(EventData) +

    Function is executed when a unit is spawned.

    +
    RAT:_OnCrash(EventData) +

    Function is executed when a unit crashes.

    +
    RAT:_OnDead(EventData) +

    Function is executed when a unit is dead.

    +
    RAT:_OnEngineShutdown(EventData) +

    Function is executed when a unit shuts down its engines.

    +
    RAT:_OnLand(EventData) +

    Function is executed when a unit lands.

    +
    RAT:_OnTakeoff(EventData) +

    Function is executed when a unit takes off.

    +
    RAT:_PickDeparture(takeoff) +

    Set the departure airport of the AI.

    +
    RAT:_PickDestination(destinations, _random) +

    Set the destination airport of the AI.

    +
    RAT:_PlaceMarkers(waypoints) +

    Place markers of the waypoints.

    +
    RAT:_Randomize(value, fac, lower, upper) +

    Randomize a value by a certain amount.

    +
    RAT:_Respawn(group) +

    Respawn a group.

    +
    RAT:_Routeinfo(waypoints, comment) +

    Provide information about the assigned flightplan.

    +
    RAT:_SetCoalitionTable() +

    Create a table with the valid coalitions for departure and destination airports.

    +
    RAT:_SetMarker(text, wp) +

    Set a marker visible for all on the F10 map.

    +
    RAT:_SetROE(group, roe) +

    Set ROE for a group.

    +
    RAT:_SetROT(group, rot) +

    Set ROT for a group.

    +
    RAT:_SetRoute(Takeoff, _departure, _destination, takeoff) +

    Set the route of the AI plane.

    +
    RAT:_SetStatus(group, status) +

    Set status of group.

    +
    RAT:_SpawnWithRoute(_departure, _destination) +

    Spawn the AI aircraft with a route.

    +
    RAT:_TaskHolding(P1, Altitude, Speed, Duration) +

    Orbit at a specified position at a specified alititude with a specified speed.

    +
    RAT:_Waypoint(Type, Coord, Speed, Altitude, Airport) +

    Create a waypoint that can be used with the Route command.

    +
    RAT.aircraft + +
    RAT.airports + +
    RAT.airports_map + +
    RAT.alive + +
    RAT.cat +

    RAT categories.

    +
    RAT.category + +
    RAT.coal +

    RAT friendly coalitions.

    +
    RAT.coalition + +
    RAT.commute + +
    RAT.continuejourney + +
    RAT.ctable + +
    RAT.debug + +
    RAT.departure_ports + +
    RAT.departure_zones + +
    RAT.destination_ports + +
    RAT.f10menu + +
    RAT.friendly + +
    RAT.markerid +

    Running number of placed markers on the F10 map.

    +
    RAT.markerids + +
    RAT.maxdist + +
    RAT.mindist + +
    RAT.placemarkers + +
    RAT.random_departure + +
    RAT.random_destination + +
    RAT.ratcraft + +
    RAT.reportstatus + +
    RAT.respawn_after_landing + +
    RAT.respawn_delay + +
    RAT.roe + +
    RAT.rot + +
    RAT.spawndelay + +
    RAT.spawninterval + +
    RAT.statusinterval + +
    RAT.takeoff + +
    RAT.unit +

    RAT unit conversions.

    +
    RAT.wp +

    RAT waypoint type.

    +
    + +

    Global(s)

    +
    +
    + + #RAT + +RAT + +
    +
    + +

    RAT class

    + +
    +
    +
    +
    + + #string + +myid + +
    +
    + +

    Some ID to identify where we are

    +

    string myid

    + +
    +
    +

    Type AI_RAT

    + +

    Type RAT

    + +

    RAT class

    + +

    Field(s)

    +
    +
    + + #number + +RAT.AlphaDescent + +
    +
    + + + +
    +
    +
    +
    + + #string + +RAT.ClassName + +
    +
    + + + +
    +
    +
    +
    + + +RAT:Commute(switch) + +
    +
    + +

    Aircraft will commute between their departure and destination airports.

    + + +

    Note, this option is not available if aircraft are spawned in air since they don't have a valid departure airport to fly back to.

    + +

    Parameter

    +
      +
    • + +

      #boolean switch : +Turn commute on=true or off=false. If no value is given switch=true.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:ContinueJourney(switch) + +
    +
    + +

    Aircraft will continue their journey from their destination.

    + + +

    This means they are respawned at their destination and get a new random destination.

    + +

    Parameter

    +
      +
    • + +

      #boolean switch : +Turn journey on=true or off=false. If no value is given switch=true.

      + +
    • +
    +
    +
    +
    +
    + + #number + +RAT.FLmaxuser + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.FLminuser + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.FLuser + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.Menu + +
    +
    + + + +
    +
    +
    +
    + + #RAT + +RAT.MenuF10 + +
    +
    + +

    Main F10 menu.

    + +
    +
    +
    +
    + + +RAT:New(groupname) + +
    +
    + +

    Create a new RAT object.

    + +

    Parameter

    +
      +
    • + +

      #string groupname : +Name of the group as defined in the mission editor. This group is serving as a template for all spawned units.

      + +
    • +
    +

    Return values

    +
      +
    1. + +

      #RAT: +Object of RAT class.

      + +
    2. +
    3. + +

      #nil: +If the group does not exist in the mission editor.

      + +
    4. +
    +

    Usage:

    +
    yak:RAT("RAT_YAK") will create a RAT object called "yak". The template group in the mission editor must have the name "RAT_YAK".
    + +
    +
    +
    +
    + + +RAT:PlaceMarkers(switch) + +
    +
    + +

    Place markers of waypoints on the F10 map.

    + + +

    Default is off.

    + +

    Parameter

    +
      +
    • + +

      #boolean switch : +true=yes, false=no.

      + +
    • +
    +
    +
    +
    +
    + + #table + +RAT.RAT + +
    +
    + + + +
    +
    +
    +
    + + #RAT + +RAT.ROE + +
    +
    + +

    RAT rules of engagement.

    + +
    +
    +
    +
    + + #RAT + +RAT.ROT + +
    +
    + +

    RAT reaction to threat.

    + +
    +
    +
    +
    + + +RAT:RespawnAfterLanding(delay) + +
    +
    + +

    Make aircraft respawn the moment they land rather than at engine shut down.

    + +

    Parameter

    +
      +
    • + +

      #number delay : +(Optional) Delay in seconds until respawn happens after landing. Default is 180 seconds.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetClimbRate(rate) + +
    +
    + +

    Set the climb rate.

    + + +

    Default is 1500 ft/min. This automatically sets the climb angle.

    + +

    Parameter

    +
      +
    • + +

      #number rate : +Climb rate in ft/min.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetCoalition(friendly) + +
    +
    + +

    Set the friendly coalitions from which the airports can be used as departure or destination.

    + +

    Parameter

    +
      +
    • + +

      #string friendly : +"same"=own coalition+neutral (default), "all"=neutral+red+blue", "sameonly"=own coalition only, "blue"=blue+neutral, "blueonly"=blue, "red"=red+neutral, "redonly"=red, "neutral"=neutral. +Default is "same", so aircraft will use airports of the coalition their spawn template has plus all neutral airports.

      + +
    • +
    +

    Usages:

    +
      +
    • yak:SetCoalition("all") will spawn aircraft randomly on airports of any coaliton, i.e. red, blue and neutral, regardless of its own coalition.
    • +
    • yak:SetCoalition("redonly") will spawn aircraft randomly on airports belonging to the red coalition _only_.
    • +
    + +
    +
    +
    +
    + + +RAT:SetDeparture(names) + +
    +
    + +

    Set possible departure ports.

    + + +

    This can be an airport or a zone defined in the mission editor.

    + +

    Parameter

    +
      +
    • + +

      #string names : +Name or table of names of departure airports or zones.

      + +
    • +
    +

    Usages:

    +
      +
    • RAT:SetDeparture("Sochi-Adler") will spawn RAT objects at Sochi-Adler airport.
    • +
    • RAT:SetDeparture({"Sochi-Adler", "Gudauta"}) will spawn RAT aircraft radomly at Sochi-Adler or Gudauta airport.
    • +
    • RAT:SetDeparture({"Zone A", "Gudauta"}) will spawn RAT aircraft in air randomly within Zone A, which has to be defined in the mission editor, or within a zone around Gudauta airport. Note that this also requires RAT:takeoff("air") to be set.
    • +
    + +
    +
    +
    +
    + + +RAT:SetDescentAngle(angle) + +
    +
    + +

    Set the angle of descent.

    + + +

    Default is 3.6 degrees, which corresponds to 3000 ft descent after one mile of travel.

    + +

    Parameter

    +
      +
    • + +

      #number angle : +Angle of descent in degrees.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetDestination(names) + +
    +
    + +

    Set name of destination airport for the AI aircraft.

    + + +

    If no name is given an airport from the friendly coalition(s) is chosen randomly.

    + +

    Parameter

    +
      +
    • + +

      #string names : +Name of the destination airport or table of destination airports.

      + +
    • +
    +

    Usage:

    +
    RAT:SetDestination("Krymsk") makes all aircraft of this RAT oject fly to Krymsk airport.
    + +
    +
    +
    +
    + + +RAT:SetFL(height) + +
    +
    + +

    Set flight level.

    + + +

    Setting this value will overrule all other logic. Aircraft will try to fly at this height regardless.

    + +

    Parameter

    +
      +
    • + +

      #number height : +FL in hundrets of feet. E.g. FL200 = 20000 ft ASL.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetFLcruise(height) + +
    +
    + +

    Set flight level of cruising part.

    + + +

    This is still be checked for consitancy with selected route and prone to radomization. +Default is FL200 for planes and FL005 for helicopters.

    + +

    Parameter

    +
      +
    • + +

      #number height : +FL in hundrets of feet. E.g. FL200 = 20000 ft ASL.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetFLmax(height) + +
    +
    + +

    Set max flight level.

    + + +

    Setting this value will overrule all other logic. Aircraft will try to fly at less than this FL regardless.

    + +

    Parameter

    +
      +
    • + +

      #number height : +Maximum FL in hundrets of feet.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetFLmin(height) + +
    +
    + +

    Set min flight level.

    + + +

    Setting this value will overrule all other logic. Aircraft will try to fly at higher than this FL regardless.

    + +

    Parameter

    +
      +
    • + +

      #number height : +Maximum FL in hundrets of feet.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetMaxCruiseSpeed(speed) + +
    +
    + +

    Set the maximum cruise speed of the aircraft.

    + +

    Parameter

    +
      +
    • + +

      #number speed : +Speed in km/h.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetMaxDistance(dist) + +
    +
    + +

    Set maximum distance between departure and destination.

    + + +

    Default is 5000 km but aircarft range is also taken into account automatically.

    + +

    Parameter

    +
      +
    • + +

      #number dist : +Distance in km.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetMinDistance(dist) + +
    +
    + +

    Set minimum distance between departure and destination.

    + + +

    Default is 5 km. +Minimum distance should not be smaller than ~500(?) meters to ensure that departure and destination are different.

    + +

    Parameter

    +
      +
    • + +

      #number dist : +Distance in km.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetROE(roe) + +
    +
    + +

    Set rules of engagement (ROE).

    + + +

    Default is weapon hold. This is a peaceful class.

    + +

    Parameter

    +
      +
    • + +

      #string roe : +"hold" = weapon hold, "return" = return fire, "free" = weapons free.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetROT(rot) + +
    +
    + +

    Set reaction to threat (ROT).

    + + +

    Default is no reaction, i.e. aircraft will simply ignore all enemies.

    + +

    Parameter

    +
      +
    • + +

      #string rot : +"noreaction = no reactino, "passive" = passive defence, "evade" = weapons free.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetSpawnDelay(delay) + +
    +
    + +

    Set the delay before first group is spawned.

    + + +

    Minimum delay is 0.5 seconds.

    + +

    Parameter

    +
      +
    • + +

      #number delay : +Delay in seconds.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetSpawnInterval(interval) + +
    +
    + +

    Set the interval between spawnings of the template group.

    + + +

    Minimum interval is 0.5 seconds.

    + +

    Parameter

    +
      +
    • + +

      #number interval : +Interval in seconds.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetTakeoff(type) + +
    +
    + +

    Set takeoff type.

    + + +

    Starting cold at airport, starting hot at airport, starting at runway, starting in the air. +Default is "takeoff-hot" for a start at airport with engines already running.

    + +

    Parameter

    +
      +
    • + +

      #string type : +Type can be "takeoff-cold" or "cold", "takeoff-hot" or "hot", "takeoff-runway" or "runway", "air".

      + +
    • +
    +

    Usages:

    +
      +
    • RAT:Takeoff("hot") will spawn RAT objects at airports with engines started.
    • +
    • RAT:Takeoff("cold") will spawn RAT objects at airports with engines off.
    • +
    • RAT:Takeoff("air") will spawn RAT objects in air over random airports or within pre-defined zones. 
    • +
    + +
    +
    +
    +
    + + +RAT:Spawn(naircraft) + +
    +
    + +

    Triggers the spawning of AI aircraft.

    + + +

    Note that all additional options should be set before giving the spawn command.

    + +

    Parameter

    +
      +
    • + +

      #number naircraft : +(Optional) Number of aircraft to spawn. Default is one aircraft.

      + +
    • +
    +

    Usage:

    +
    yak:Spawn(5) will spawn five aircraft. By default aircraft will spawn at neutral and red airports if the template group is part of the red coaliton.
    + +
    +
    +
    +
    + + +RAT:Status(message, forID) + +
    +
    + +

    Report status of RAT groups.

    + +

    Parameters

    +
      +
    • + +

      #boolean message : +(Optional) Send message if true.

      + +
    • +
    • + +

      #number forID : +(Optional) Send message only for this ID.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:StatusReports(switch) + +
    +
    + +

    Aircraft report status messages.

    + + +

    Default is off.

    + +

    Parameter

    +
      +
    • + +

      #boolean switch : +true=on, false=off.

      + +
    • +
    +
    +
    +
    +
    + + #string + +RAT.SubMenuName + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.Vclimb + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.Vcruisemax + +
    +
    + + + +
    +
    +
    +
    + + +RAT:_AirportExists(name) + +
    +
    + +

    Test if an airport exists on the current map.

    + +

    Parameter

    +
      +
    • + +

      #string name :

      + +
    • +
    +

    Return value

    + +

    #boolean: +True if airport exsits, false otherwise.

    + +
    +
    +
    +
    + + +RAT:_Course(a, b) + +
    +
    + +

    Determine the heading from point a to point b.

    + +

    Parameters

    + +

    Return value

    + +

    #number: +Heading/angle in degrees.

    + +
    +
    +
    +
    + + +RAT:_Debug(switch) + +
    +
    + +

    Turn debug messages on or off.

    + + +

    Default is off.

    + +

    Parameter

    +
      +
    • + +

      #boolean switch : +true turn messages on, false=off.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_DeleteMarkers(ids) + +
    +
    + +

    Delete all markers on F10 map.

    + +

    Parameter

    +
      +
    • + +

      #table ids : +(Optional) Table holding the marker IDs to be deleted.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_Despawn(group) + +
    +
    + +

    Despawn unit.

    + + +

    Unit gets destoyed and group is set to nil. +Index of ratcraft array is taken from spawned group name.

    + +

    Parameter

    + +
    +
    +
    +
    + + +RAT:_EngineStartup(EventData) + +
    +
    + +

    Function is executed when a unit starts its engines.

    + +

    Parameter

    +
      +
    • + +

      EventData :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_FLmax(alpha, beta, d, phi, h0) + +
    +
    + +

    Calculate the max flight level for a given distance and fixed climb and descent rates.

    + + +

    In other words we have a distance between two airports and want to know how high we +can climb before we must descent again to arrive at the destination without any level/cruising part.

    + +

    Parameters

    +
      +
    • + +

      #number alpha : +Angle of climb [rad].

      + +
    • +
    • + +

      #number beta : +Angle of descent [rad].

      + +
    • +
    • + +

      #number d : +Distance between the two airports [m].

      + +
    • +
    • + +

      #number phi : +Angle between departure and destination [rad].

      + +
    • +
    • + +

      #number h0 : +Height [m] of departure airport. Note we implicitly assume that the height difference between departure and destination is negligible.

      + +
    • +
    +

    Return value

    + +

    #number: + Maximal flight level in meters.

    + +
    +
    +
    +
    + + +RAT:_GetAirportsOfCoalition() + +
    +
    + +

    Get all "friendly" airports of the current map.

    + +
    +
    +
    +
    + + +RAT:_GetAirportsOfMap() + +
    +
    + +

    Get all airports of the current map.

    + +
    +
    +
    +
    + + +RAT:_GetDestinations(q, minrange, maxrange) + +
    +
    + +

    Get all possible destination airports depending on departure position.

    + + +

    The list is sorted w.r.t. distance to departure position.

    + +

    Parameters

    +
      +
    • + +

      Core.Point#COORDINATE q : +Coordinate of the departure point.

      + +
    • +
    • + +

      #number minrange : +Minimum range to q in meters.

      + +
    • +
    • + +

      #number maxrange : +Maximum range to q in meters.

      + +
    • +
    +

    Return values

    +
      +
    1. + +

      #table: +Table with possible destination airports.

      + +
    2. +
    3. + +

      #nil: +If no airports could be found.

      + +
    4. +
    +
    +
    +
    +
    + + +RAT:_GetLife(group) + +
    +
    + +

    Get (relative) life of first unit of a group.

    + +

    Parameter

    + +

    Return value

    + +

    #number: +Life of unit in percent.

    + +
    +
    +
    +
    + + +RAT:_InitAircraft(DCSgroup) + +
    +
    + +

    Initialize basic parameters of the aircraft based on its (template) group in the mission editor.

    + +

    Parameter

    + +
    +
    +
    +
    + + +RAT:_ModifySpawnTemplate(waypoints) + +
    +
    + +

    Modifies the template of the group to be spawned.

    + + +

    In particular, the waypoints of the group's flight plan are copied into the spawn template. +This allows to spawn at airports and also land at other airports, i.e. circumventing the DCS "landing bug".

    + +

    Parameter

    +
      +
    • + +

      #table waypoints : +The waypoints of the AI flight plan.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_OnBirth(EventData) + +
    +
    + +

    Function is executed when a unit is spawned.

    + +

    Parameter

    +
      +
    • + +

      EventData :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_OnCrash(EventData) + +
    +
    + +

    Function is executed when a unit crashes.

    + +

    Parameter

    +
      +
    • + +

      EventData :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_OnDead(EventData) + +
    +
    + +

    Function is executed when a unit is dead.

    + +

    Parameter

    +
      +
    • + +

      EventData :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_OnEngineShutdown(EventData) + +
    +
    + +

    Function is executed when a unit shuts down its engines.

    + +

    Parameter

    +
      +
    • + +

      EventData :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_OnLand(EventData) + +
    +
    + +

    Function is executed when a unit lands.

    + +

    Parameter

    +
      +
    • + +

      EventData :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_OnTakeoff(EventData) + +
    +
    + +

    Function is executed when a unit takes off.

    + +

    Parameter

    +
      +
    • + +

      EventData :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_PickDeparture(takeoff) + +
    +
    + +

    Set the departure airport of the AI.

    + + +

    If no airport name is given explicitly an airport from the coalition is chosen randomly. +If takeoff style is set to "air", we use zones around the airports or the zones specified by user input.

    + +

    Parameter

    +
      +
    • + +

      #number takeoff : +Takeoff type.

      + +
    • +
    +

    Return values

    +
      +
    1. + +

      Wrapper.Airbase#AIRBASE: +Departure airport if spawning at airport.

      + +
    2. +
    3. + +

      Coore.Zone#ZONE: +Departure zone if spawning in air.

      + +
    4. +
    +
    +
    +
    +
    + + +RAT:_PickDestination(destinations, _random) + +
    +
    + +

    Set the destination airport of the AI.

    + + +

    If no airport name is given an airport from the coalition is chosen randomly.

    + +

    Parameters

    +
      +
    • + +

      #table destinations : +Table with destination airports.

      + +
    • +
    • + +

      #boolean _random : +Optional switch to activate a random selection of airports.

      + +
    • +
    +

    Return value

    + +

    Wrapper.Airbase#AIRBASE: +Destination airport.

    + +
    +
    +
    +
    + + +RAT:_PlaceMarkers(waypoints) + +
    +
    + +

    Place markers of the waypoints.

    + + +

    Note we assume a very specific number and type of waypoints here.

    + +

    Parameter

    +
      +
    • + +

      #table waypoints : +Table with waypoints.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_Randomize(value, fac, lower, upper) + +
    +
    + +

    Randomize a value by a certain amount.

    + +

    Parameters

    +
      +
    • + +

      #number value : +The value which should be randomized

      + +
    • +
    • + +

      #number fac : +Randomization factor.

      + +
    • +
    • + +

      #number lower : +(Optional) Lower limit of the returned value.

      + +
    • +
    • + +

      #number upper : +(Optional) Upper limit of the returned value.

      + +
    • +
    +

    Return value

    + +

    #number: +Randomized value.

    + +

    Usages:

    +
      +
    • _Randomize(100, 0.1) returns a value between 90 and 110, i.e. a plus/minus ten percent variation.
    • +
    • _Randomize(100, 0.5, nil, 120) returns a value between 50 and 120, i.e. a plus/minus fivty percent variation with upper bound 120.
    • +
    + +
    +
    +
    +
    + + +RAT:_Respawn(group) + +
    +
    + +

    Respawn a group.

    + +

    Parameter

    + +
    +
    +
    +
    + + +RAT:_Routeinfo(waypoints, comment) + +
    +
    + +

    Provide information about the assigned flightplan.

    + +

    Parameters

    +
      +
    • + +

      #table waypoints : +Waypoints of the flight plan.

      + +
    • +
    • + +

      #string comment : +Some comment to identify the provided information.

      + +
    • +
    +

    Return value

    + +

    #number: +total Total route length in meters.

    + +
    +
    +
    +
    + + +RAT:_SetCoalitionTable() + +
    +
    + +

    Create a table with the valid coalitions for departure and destination airports.

    + +
    +
    +
    +
    + + +RAT:_SetMarker(text, wp) + +
    +
    + +

    Set a marker visible for all on the F10 map.

    + +

    Parameters

    +
      +
    • + +

      #string text : +Info text displayed at maker.

      + +
    • +
    • + +

      #table wp : +Position of marker coming in as waypoint, i.e. has x, y and alt components.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_SetROE(group, roe) + +
    +
    + +

    Set ROE for a group.

    + +

    Parameters

    +
      +
    • + +

      Wrapper.Group#GROUP group : +Group for which the ROE is set.

      + +
    • +
    • + +

      #string roe : +ROE of group.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_SetROT(group, rot) + +
    +
    + +

    Set ROT for a group.

    + +

    Parameters

    +
      +
    • + +

      Wrapper.Group#GROUP group : +Group for which the ROT is set.

      + +
    • +
    • + +

      #string rot : +ROT of group.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_SetRoute(Takeoff, _departure, _destination, takeoff) + +
    +
    + +

    Set the route of the AI plane.

    + + +

    Due to DCS landing bug, this has to be done before the unit is spawned.

    + +

    Parameters

    + +

    Return values

    +
      +
    1. + +

      Wrapper.Airport#AIRBASE: +Departure airbase.

      + +
    2. +
    3. + +

      Wrapper.Airport#AIRBASE: +Destination airbase.

      + +
    4. +
    5. + +

      #table: +Table of flight plan waypoints.

      + +
    6. +
    +
    +
    +
    +
    + + +RAT:_SetStatus(group, status) + +
    +
    + +

    Set status of group.

    + +

    Parameters

    +
      +
    • + +

      group :

      + +
    • +
    • + +

      status :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_SpawnWithRoute(_departure, _destination) + +
    +
    + +

    Spawn the AI aircraft with a route.

    + + +

    Sets the departure and destination airports and waypoints. +Modifies the spawn template. +Sets ROE/ROT. +Initializes the ratcraft array and group menu.

    + +

    Parameters

    +
      +
    • + +

      #string _departure : +(Optional) Name of departure airbase.

      + +
    • +
    • + +

      #string _destination : +(Optional) Name of destination airbase.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_TaskHolding(P1, Altitude, Speed, Duration) + +
    +
    + +

    Orbit at a specified position at a specified alititude with a specified speed.

    + +

    Parameters

    +
      +
    • + +

      Dcs.DCSTypes#Vec2 P1 : +The point to hold the position.

      + +
    • +
    • + +

      #number Altitude : +The altitude ASL at which to hold the position.

      + +
    • +
    • + +

      #number Speed : +The speed flying when holding the position in m/s.

      + +
    • +
    • + +

      #number Duration : +Duration of holding pattern in seconds.

      + +
    • +
    +

    Return value

    + +

    Dcs.DCSTasking.Task#Task: +DCSTask

    + +
    +
    +
    +
    + + +RAT:_Waypoint(Type, Coord, Speed, Altitude, Airport) + +
    +
    + +

    Create a waypoint that can be used with the Route command.

    + +

    Parameters

    +
      +
    • + +

      #number Type : +Type of waypoint.

      + +
    • +
    • + +

      Core.Point#COORDINATE Coord : +3D coordinate of the waypoint.

      + +
    • +
    • + +

      #number Speed : +Speed in m/s.

      + +
    • +
    • + +

      #number Altitude : +Altitude in m.

      + +
    • +
    • + +

      Wrapper.Airbase#AIRBASE Airport : +Airport of object to spawn.

      + +
    • +
    +

    Return value

    + +

    #table: +Waypoints for DCS task route or spawn template.

    + +
    +
    +
    +
    + + #table + +RAT.aircraft + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.airports + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.airports_map + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.alive + +
    +
    + + + +
    +
    +
    +
    + + #RAT + +RAT.cat + +
    +
    + +

    RAT categories.

    + +
    +
    +
    +
    + + #string + +RAT.category + +
    +
    + + + +
    +
    +
    +
    + + #RAT + +RAT.coal + +
    +
    + +

    RAT friendly coalitions.

    + +
    +
    +
    +
    + + #number + +RAT.coalition + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.commute + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.continuejourney + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.ctable + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.debug + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.departure_ports + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.departure_zones + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.destination_ports + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.f10menu + +
    +
    + + + +
    +
    +
    +
    + + #string + +RAT.friendly + +
    +
    + + + +
    +
    +
    +
    + + #RAT + +RAT.markerid + +
    +
    + +

    Running number of placed markers on the F10 map.

    + +
    +
    +
    +
    + + #table + +RAT.markerids + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.maxdist + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.mindist + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.placemarkers + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.random_departure + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.random_destination + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.ratcraft + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.reportstatus + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.respawn_after_landing + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.respawn_delay + +
    +
    + + + +
    +
    +
    +
    + + #string + +RAT.roe + +
    +
    + + + +
    +
    +
    +
    + + #string + +RAT.rot + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.spawndelay + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.spawninterval + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.statusinterval + +
    +
    + + + +
    +
    +
    +
    + + #string + +RAT.takeoff + +
    +
    + + + +
    +
    +
    +
    + + #RAT + +RAT.unit + +
    +
    + +

    RAT unit conversions.

    + +
    +
    +
    +
    + + #RAT + +RAT.wp + +
    +
    + +

    RAT waypoint type.

    + +
    +
    + +

    Type list

    + +
    + +
    + + diff --git a/docs/Documentation/Account.html b/docs/Documentation/Account.html index 03560ecf6..24ae8f028 100644 --- a/docs/Documentation/Account.html +++ b/docs/Documentation/Account.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Airbase.html b/docs/Documentation/Airbase.html index d176bb9fc..8a7fde74a 100644 --- a/docs/Documentation/Airbase.html +++ b/docs/Documentation/Airbase.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/AirbasePolice.html b/docs/Documentation/AirbasePolice.html index 218a7d247..e8e042854 100644 --- a/docs/Documentation/AirbasePolice.html +++ b/docs/Documentation/AirbasePolice.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Assign.html b/docs/Documentation/Assign.html index d96b1fe01..6c594c093 100644 --- a/docs/Documentation/Assign.html +++ b/docs/Documentation/Assign.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Base.html b/docs/Documentation/Base.html index 01653547f..6432b71a8 100644 --- a/docs/Documentation/Base.html +++ b/docs/Documentation/Base.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Cargo.html b/docs/Documentation/Cargo.html index a11fd4dba..decbb908e 100644 --- a/docs/Documentation/Cargo.html +++ b/docs/Documentation/Cargo.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • @@ -3417,7 +3418,6 @@ The range till cargo will board.

    - CARGO_UNIT.CargoCarrier diff --git a/docs/Documentation/CleanUp.html b/docs/Documentation/CleanUp.html index 42bd588ce..4fd8e2211 100644 --- a/docs/Documentation/CleanUp.html +++ b/docs/Documentation/CleanUp.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Client.html b/docs/Documentation/Client.html index 357ccad2a..d32ac3da4 100644 --- a/docs/Documentation/Client.html +++ b/docs/Documentation/Client.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/CommandCenter.html b/docs/Documentation/CommandCenter.html index c707cb7f5..8ea876d0f 100644 --- a/docs/Documentation/CommandCenter.html +++ b/docs/Documentation/CommandCenter.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Controllable.html b/docs/Documentation/Controllable.html index 2d5323c07..e0dc7cf43 100644 --- a/docs/Documentation/Controllable.html +++ b/docs/Documentation/Controllable.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCSAirbase.html b/docs/Documentation/DCSAirbase.html index dcf1f5e56..93e67e7ed 100644 --- a/docs/Documentation/DCSAirbase.html +++ b/docs/Documentation/DCSAirbase.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCSCoalitionObject.html b/docs/Documentation/DCSCoalitionObject.html index 4a748c821..2c94fdb31 100644 --- a/docs/Documentation/DCSCoalitionObject.html +++ b/docs/Documentation/DCSCoalitionObject.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCSCommand.html b/docs/Documentation/DCSCommand.html index 0d24f3eea..d07008eea 100644 --- a/docs/Documentation/DCSCommand.html +++ b/docs/Documentation/DCSCommand.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCSController.html b/docs/Documentation/DCSController.html index e9d27f273..890a42f82 100644 --- a/docs/Documentation/DCSController.html +++ b/docs/Documentation/DCSController.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCSGroup.html b/docs/Documentation/DCSGroup.html index d2d97a479..d3cba7a00 100644 --- a/docs/Documentation/DCSGroup.html +++ b/docs/Documentation/DCSGroup.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCSObject.html b/docs/Documentation/DCSObject.html index 5d492f76a..3bba8d8c8 100644 --- a/docs/Documentation/DCSObject.html +++ b/docs/Documentation/DCSObject.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCSTask.html b/docs/Documentation/DCSTask.html index 38a572b55..6cfda94a4 100644 --- a/docs/Documentation/DCSTask.html +++ b/docs/Documentation/DCSTask.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCSTypes.html b/docs/Documentation/DCSTypes.html index fb39414e4..c66abe0ae 100644 --- a/docs/Documentation/DCSTypes.html +++ b/docs/Documentation/DCSTypes.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCSUnit.html b/docs/Documentation/DCSUnit.html index a1a88b247..22e5611cb 100644 --- a/docs/Documentation/DCSUnit.html +++ b/docs/Documentation/DCSUnit.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCSVec3.html b/docs/Documentation/DCSVec3.html index e02fde38d..64bf19193 100644 --- a/docs/Documentation/DCSVec3.html +++ b/docs/Documentation/DCSVec3.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCSWorld.html b/docs/Documentation/DCSWorld.html index a7269c14c..06b71260d 100644 --- a/docs/Documentation/DCSWorld.html +++ b/docs/Documentation/DCSWorld.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCSZone.html b/docs/Documentation/DCSZone.html index e659fd90f..b836990d3 100644 --- a/docs/Documentation/DCSZone.html +++ b/docs/Documentation/DCSZone.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCScountry.html b/docs/Documentation/DCScountry.html index 799258ab2..af9c6bd2a 100644 --- a/docs/Documentation/DCScountry.html +++ b/docs/Documentation/DCScountry.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCStimer.html b/docs/Documentation/DCStimer.html index 6063a6ed1..26e194aff 100644 --- a/docs/Documentation/DCStimer.html +++ b/docs/Documentation/DCStimer.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/DCStrigger.html b/docs/Documentation/DCStrigger.html index 363311917..f665a8946 100644 --- a/docs/Documentation/DCStrigger.html +++ b/docs/Documentation/DCStrigger.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Database.html b/docs/Documentation/Database.html index 38a7a8f78..f8fc32284 100644 --- a/docs/Documentation/Database.html +++ b/docs/Documentation/Database.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Designate.html b/docs/Documentation/Designate.html index 31210aea8..8ecc57ea8 100644 --- a/docs/Documentation/Designate.html +++ b/docs/Documentation/Designate.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • @@ -257,6 +258,12 @@ each detected set of potential targets can be lased or smoked...

    DESIGNATE:LaseOn()

    LaseOn Trigger for DESIGNATE

    + + + + DESIGNATE.LaseStart + + @@ -1130,6 +1137,21 @@ function below will use the range 1-7 just in case

    + + +DESIGNATE.LaseStart + +
    +
    + + + +
    +
    +
    +
    + + DESIGNATE.LaserCodes diff --git a/docs/Documentation/Detection.html b/docs/Documentation/Detection.html index e055abe7c..aeb5bd4fe 100644 --- a/docs/Documentation/Detection.html +++ b/docs/Documentation/Detection.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • @@ -4055,7 +4056,7 @@ Return false to cancel Transition.

    - #number + DETECTION_BASE.RefreshTimeInterval diff --git a/docs/Documentation/DetectionManager.html b/docs/Documentation/DetectionManager.html index f6ee82ce5..fada6894a 100644 --- a/docs/Documentation/DetectionManager.html +++ b/docs/Documentation/DetectionManager.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Escort.html b/docs/Documentation/Escort.html index ebf59fcc1..a3777ce98 100644 --- a/docs/Documentation/Escort.html +++ b/docs/Documentation/Escort.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Event.html b/docs/Documentation/Event.html index 64b4bf9a0..94bc6481f 100644 --- a/docs/Documentation/Event.html +++ b/docs/Documentation/Event.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Fsm.html b/docs/Documentation/Fsm.html index 177f34281..dc67c7520 100644 --- a/docs/Documentation/Fsm.html +++ b/docs/Documentation/Fsm.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • @@ -1598,7 +1599,7 @@ A string defining the start state.

    - #string + FSM._StartState @@ -1897,6 +1898,7 @@ A string defining the start state.

    + FSM.current diff --git a/docs/Documentation/Group.html b/docs/Documentation/Group.html index 7a3c2368b..99d00c1ce 100644 --- a/docs/Documentation/Group.html +++ b/docs/Documentation/Group.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Identifiable.html b/docs/Documentation/Identifiable.html index bb4e93bce..9ff17c120 100644 --- a/docs/Documentation/Identifiable.html +++ b/docs/Documentation/Identifiable.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Menu.html b/docs/Documentation/Menu.html index edded7fd7..be629eda7 100644 --- a/docs/Documentation/Menu.html +++ b/docs/Documentation/Menu.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Message.html b/docs/Documentation/Message.html index d4364cb07..d88a100d0 100644 --- a/docs/Documentation/Message.html +++ b/docs/Documentation/Message.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/MissileTrainer.html b/docs/Documentation/MissileTrainer.html index 17e2909ef..0b8a44d5b 100644 --- a/docs/Documentation/MissileTrainer.html +++ b/docs/Documentation/MissileTrainer.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Mission.html b/docs/Documentation/Mission.html index ce693c0a0..97e6fddff 100644 --- a/docs/Documentation/Mission.html +++ b/docs/Documentation/Mission.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Movement.html b/docs/Documentation/Movement.html index be5ce073c..3123488df 100644 --- a/docs/Documentation/Movement.html +++ b/docs/Documentation/Movement.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Object.html b/docs/Documentation/Object.html index e70b8ecd1..24a71b22c 100644 --- a/docs/Documentation/Object.html +++ b/docs/Documentation/Object.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Point.html b/docs/Documentation/Point.html index 4c79fc8f9..6cff25508 100644 --- a/docs/Documentation/Point.html +++ b/docs/Documentation/Point.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Positionable.html b/docs/Documentation/Positionable.html index f5b1c4a9e..b5c697006 100644 --- a/docs/Documentation/Positionable.html +++ b/docs/Documentation/Positionable.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • @@ -1836,7 +1837,6 @@ The height in meters to add to the altitude of the positionable.

    - Core.Spot#SPOT POSITIONABLE.Spot diff --git a/docs/Documentation/Process_JTAC.html b/docs/Documentation/Process_JTAC.html index 666b88494..98ccc6058 100644 --- a/docs/Documentation/Process_JTAC.html +++ b/docs/Documentation/Process_JTAC.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Process_Pickup.html b/docs/Documentation/Process_Pickup.html index a74b64401..4b9a003fc 100644 --- a/docs/Documentation/Process_Pickup.html +++ b/docs/Documentation/Process_Pickup.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/RAT.html b/docs/Documentation/RAT.html new file mode 100644 index 000000000..c3bbbb336 --- /dev/null +++ b/docs/Documentation/RAT.html @@ -0,0 +1,3219 @@ + + + + + + +
    +
    + +
    +
    +
    +
    + +
    +

    Module Rat

    + +
      +
    • Functional -- Create random airtraffic in your missions.
    • +
    + + +

    +Banner Image

    + +
    + +

    The documentation of the RAT class can be found further in this document.

    + +
    + +

    Demo Missions

    + +

    RAT Demo Missions source code

    + +

    RAT Demo Missions, only for beta testers

    + +

    ALL Demo Missions pack of the last release

    + +
    + +

    YouTube Channel

    + +

    RAT YouTube Channel

    + +
    +
    + +

    Author: funkyfranky

    + +

    Contributions: Sven Van de Velde (FlightControl)

    + +
    + +

    Global(s)

    + + + + + + + + + +
    RAT +

    RAT class

    +
    myid +

    Some ID to identify where we are

    +

    string myid

    +
    +

    Type RAT

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    RAT.AlphaDescent + +
    RAT.ClassName +

    Name of the Class

    +
    RAT:Commute(switch) +

    Aircraft will commute between their departure and destination airports.

    +
    RAT:ContinueJourney(switch) +

    Aircraft will continue their journey from their destination.

    +
    RAT.FLmaxuser + +
    RAT.FLminuser + +
    RAT.FLuser + +
    RAT.Menu + +
    RAT.MenuF10 +

    Main F10 menu.

    +
    RAT:New(groupname) +

    Create a new RAT object.

    +
    RAT:PlaceMarkers(switch) +

    Place markers of waypoints on the F10 map.

    +
    RAT.RAT + +
    RAT.ROE +

    RAT rules of engagement.

    +
    RAT.ROT +

    RAT reaction to threat.

    +
    RAT:RespawnAfterLanding(delay) +

    Make aircraft respawn the moment they land rather than at engine shut down.

    +
    RAT:SetClimbRate(rate) +

    Set the climb rate.

    +
    RAT:SetCoalition(friendly) +

    Set the friendly coalitions from which the airports can be used as departure or destination.

    +
    RAT:SetDeparture(names) +

    Set possible departure ports.

    +
    RAT:SetDescentAngle(angle) +

    Set the angle of descent.

    +
    RAT:SetDestination(names) +

    Set name of destination airport for the AI aircraft.

    +
    RAT:SetFL(height) +

    Set flight level.

    +
    RAT:SetFLcruise(height) +

    Set flight level of cruising part.

    +
    RAT:SetFLmax(height) +

    Set max flight level.

    +
    RAT:SetFLmin(height) +

    Set min flight level.

    +
    RAT:SetMaxCruiseSpeed(speed) +

    Set the maximum cruise speed of the aircraft.

    +
    RAT:SetMaxDistance(dist) +

    Set maximum distance between departure and destination.

    +
    RAT:SetMinDistance(dist) +

    Set minimum distance between departure and destination.

    +
    RAT:SetROE(roe) +

    Set rules of engagement (ROE).

    +
    RAT:SetROT(rot) +

    Set reaction to threat (ROT).

    +
    RAT:SetSpawnDelay(delay) +

    Set the delay before first group is spawned.

    +
    RAT:SetSpawnInterval(interval) +

    Set the interval between spawnings of the template group.

    +
    RAT:SetTakeoff(type) +

    Set takeoff type.

    +
    RAT:Spawn(naircraft) +

    Triggers the spawning of AI aircraft.

    +
    RAT:Status(message, forID) +

    Report status of RAT groups.

    +
    RAT:StatusReports(switch) +

    Aircraft report status messages.

    +
    RAT.SubMenuName + +
    RAT.Vclimb + +
    RAT.Vcruisemax + +
    RAT:_AirportExists(name) +

    Test if an airport exists on the current map.

    +
    RAT:_Course(a, b) +

    Determine the heading from point a to point b.

    +
    RAT:_Debug(switch) +

    Turn debug messages on or off.

    +
    RAT:_DeleteMarkers(ids) +

    Delete all markers on F10 map.

    +
    RAT:_Despawn(group) +

    Despawn unit.

    +
    RAT:_EngineStartup(EventData) +

    Function is executed when a unit starts its engines.

    +
    RAT:_FLmax(alpha, beta, d, phi, h0) +

    Calculate the max flight level for a given distance and fixed climb and descent rates.

    +
    RAT:_GetAirportsOfCoalition() +

    Get all "friendly" airports of the current map.

    +
    RAT:_GetAirportsOfMap() +

    Get all airports of the current map.

    +
    RAT:_GetDestinations(q, minrange, maxrange) +

    Get all possible destination airports depending on departure position.

    +
    RAT:_GetLife(group) +

    Get (relative) life of first unit of a group.

    +
    RAT:_InitAircraft(DCSgroup) +

    Initialize basic parameters of the aircraft based on its (template) group in the mission editor.

    +
    RAT:_ModifySpawnTemplate(waypoints) +

    Modifies the template of the group to be spawned.

    +
    RAT:_OnBirth(EventData) +

    Function is executed when a unit is spawned.

    +
    RAT:_OnCrash(EventData) +

    Function is executed when a unit crashes.

    +
    RAT:_OnDead(EventData) +

    Function is executed when a unit is dead.

    +
    RAT:_OnEngineShutdown(EventData) +

    Function is executed when a unit shuts down its engines.

    +
    RAT:_OnLand(EventData) +

    Function is executed when a unit lands.

    +
    RAT:_OnTakeoff(EventData) +

    Function is executed when a unit takes off.

    +
    RAT:_PickDeparture(takeoff) +

    Set the departure airport of the AI.

    +
    RAT:_PickDestination(destinations, _random) +

    Set the destination airport of the AI.

    +
    RAT:_PlaceMarkers(waypoints) +

    Place markers of the waypoints.

    +
    RAT:_Randomize(value, fac, lower, upper) +

    Randomize a value by a certain amount.

    +
    RAT:_Respawn(group) +

    Respawn a group.

    +
    RAT:_Routeinfo(waypoints, comment) +

    Provide information about the assigned flightplan.

    +
    RAT:_SetCoalitionTable() +

    Create a table with the valid coalitions for departure and destination airports.

    +
    RAT:_SetMarker(text, wp) +

    Set a marker visible for all on the F10 map.

    +
    RAT:_SetROE(group, roe) +

    Set ROE for a group.

    +
    RAT:_SetROT(group, rot) +

    Set ROT for a group.

    +
    RAT:_SetRoute(Takeoff, _departure, _destination, takeoff) +

    Set the route of the AI plane.

    +
    RAT:_SetStatus(group, status) +

    Set status of group.

    +
    RAT:_SpawnWithRoute(_departure, _destination) +

    Spawn the AI aircraft with a route.

    +
    RAT:_TaskHolding(P1, Altitude, Speed, Duration) +

    Orbit at a specified position at a specified alititude with a specified speed.

    +
    RAT:_Waypoint(Type, Coord, Speed, Altitude, Airport) +

    Create a waypoint that can be used with the Route command.

    +
    RAT.aircraft + +
    RAT.airports + +
    RAT.airports_map + +
    RAT.alive + +
    RAT.cat +

    RAT categories.

    +
    RAT.category + +
    RAT.coal +

    RAT friendly coalitions.

    +
    RAT.coalition + +
    RAT.commute + +
    RAT.continuejourney + +
    RAT.ctable + +
    RAT.debug + +
    RAT.departure_ports + +
    RAT.departure_zones + +
    RAT.destination_ports + +
    RAT.f10menu + +
    RAT.friendly + +
    RAT.markerid +

    Running number of placed markers on the F10 map.

    +
    RAT.markerids + +
    RAT.maxdist + +
    RAT.mindist + +
    RAT.placemarkers + +
    RAT.random_departure + +
    RAT.random_destination + +
    RAT.ratcraft + +
    RAT.reportstatus + +
    RAT.respawn_after_landing + +
    RAT.respawn_delay + +
    RAT.roe + +
    RAT.rot + +
    RAT.spawndelay + +
    RAT.spawninterval + +
    RAT.statusinterval + +
    RAT.takeoff + +
    RAT.unit +

    RAT unit conversions.

    +
    RAT.wp +

    RAT waypoint type.

    +
    + +

    Global(s)

    +
    +
    + + #RAT + +RAT + +
    +
    + +

    RAT class

    + +
    +
    +
    +
    + + #string + +myid + +
    +
    + +

    Some ID to identify where we are

    +

    string myid

    + +
    +
    +

    Type Rat

    + +

    Type RAT

    + +

    RAT class

    + +

    Field(s)

    +
    +
    + + #number + +RAT.AlphaDescent + +
    +
    + + + +
    +
    +
    +
    + + #string + +RAT.ClassName + +
    +
    + +

    Name of the Class

    + +
    +
    +
    +
    + + +RAT:Commute(switch) + +
    +
    + +

    Aircraft will commute between their departure and destination airports.

    + + +

    Note, this option is not available if aircraft are spawned in air since they don't have a valid departure airport to fly back to.

    + +

    Parameter

    +
      +
    • + +

      #boolean switch : +Turn commute on=true or off=false. If no value is given switch=true.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:ContinueJourney(switch) + +
    +
    + +

    Aircraft will continue their journey from their destination.

    + + +

    This means they are respawned at their destination and get a new random destination.

    + +

    Parameter

    +
      +
    • + +

      #boolean switch : +Turn journey on=true or off=false. If no value is given switch=true.

      + +
    • +
    +
    +
    +
    +
    + + #number + +RAT.FLmaxuser + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.FLminuser + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.FLuser + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.Menu + +
    +
    + + + +
    +
    +
    +
    + + #RAT + +RAT.MenuF10 + +
    +
    + +

    Main F10 menu.

    + +
    +
    +
    +
    + + +RAT:New(groupname) + +
    +
    + +

    Create a new RAT object.

    + +

    Parameter

    +
      +
    • + +

      #string groupname : +Name of the group as defined in the mission editor. This group is serving as a template for all spawned units.

      + +
    • +
    +

    Return values

    +
      +
    1. + +

      #RAT: +Object of RAT class.

      + +
    2. +
    3. + +

      #nil: +If the group does not exist in the mission editor.

      + +
    4. +
    +

    Usage:

    +
    yak:RAT("RAT_YAK") will create a RAT object called "yak". The template group in the mission editor must have the name "RAT_YAK".
    + +
    +
    +
    +
    + + +RAT:PlaceMarkers(switch) + +
    +
    + +

    Place markers of waypoints on the F10 map.

    + + +

    Default is off.

    + +

    Parameter

    +
      +
    • + +

      #boolean switch : +true=yes, false=no.

      + +
    • +
    +
    +
    +
    +
    + + #table + +RAT.RAT + +
    +
    + + + +
    +
    +
    +
    + + #RAT + +RAT.ROE + +
    +
    + +

    RAT rules of engagement.

    + +
    +
    +
    +
    + + #RAT + +RAT.ROT + +
    +
    + +

    RAT reaction to threat.

    + +
    +
    +
    +
    + + +RAT:RespawnAfterLanding(delay) + +
    +
    + +

    Make aircraft respawn the moment they land rather than at engine shut down.

    + +

    Parameter

    +
      +
    • + +

      #number delay : +(Optional) Delay in seconds until respawn happens after landing. Default is 180 seconds.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetClimbRate(rate) + +
    +
    + +

    Set the climb rate.

    + + +

    Default is 1500 ft/min. This automatically sets the climb angle.

    + +

    Parameter

    +
      +
    • + +

      #number rate : +Climb rate in ft/min.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetCoalition(friendly) + +
    +
    + +

    Set the friendly coalitions from which the airports can be used as departure or destination.

    + +

    Parameter

    +
      +
    • + +

      #string friendly : +"same"=own coalition+neutral (default), "all"=neutral+red+blue", "sameonly"=own coalition only, "blue"=blue+neutral, "blueonly"=blue, "red"=red+neutral, "redonly"=red, "neutral"=neutral. +Default is "same", so aircraft will use airports of the coalition their spawn template has plus all neutral airports.

      + +
    • +
    +

    Usages:

    +
      +
    • yak:SetCoalition("all") will spawn aircraft randomly on airports of any coaliton, i.e. red, blue and neutral, regardless of its own coalition.
    • +
    • yak:SetCoalition("redonly") will spawn aircraft randomly on airports belonging to the red coalition _only_.
    • +
    + +
    +
    +
    +
    + + +RAT:SetDeparture(names) + +
    +
    + +

    Set possible departure ports.

    + + +

    This can be an airport or a zone defined in the mission editor.

    + +

    Parameter

    +
      +
    • + +

      #string names : +Name or table of names of departure airports or zones.

      + +
    • +
    +

    Usages:

    +
      +
    • RAT:SetDeparture("Sochi-Adler") will spawn RAT objects at Sochi-Adler airport.
    • +
    • RAT:SetDeparture({"Sochi-Adler", "Gudauta"}) will spawn RAT aircraft radomly at Sochi-Adler or Gudauta airport.
    • +
    • RAT:SetDeparture({"Zone A", "Gudauta"}) will spawn RAT aircraft in air randomly within Zone A, which has to be defined in the mission editor, or within a zone around Gudauta airport. Note that this also requires RAT:takeoff("air") to be set.
    • +
    + +
    +
    +
    +
    + + +RAT:SetDescentAngle(angle) + +
    +
    + +

    Set the angle of descent.

    + + +

    Default is 3.6 degrees, which corresponds to 3000 ft descent after one mile of travel.

    + +

    Parameter

    +
      +
    • + +

      #number angle : +Angle of descent in degrees.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetDestination(names) + +
    +
    + +

    Set name of destination airport for the AI aircraft.

    + + +

    If no name is given an airport from the friendly coalition(s) is chosen randomly.

    + +

    Parameter

    +
      +
    • + +

      #string names : +Name of the destination airport or table of destination airports.

      + +
    • +
    +

    Usage:

    +
    RAT:SetDestination("Krymsk") makes all aircraft of this RAT oject fly to Krymsk airport.
    + +
    +
    +
    +
    + + +RAT:SetFL(height) + +
    +
    + +

    Set flight level.

    + + +

    Setting this value will overrule all other logic. Aircraft will try to fly at this height regardless.

    + +

    Parameter

    +
      +
    • + +

      #number height : +FL in hundrets of feet. E.g. FL200 = 20000 ft ASL.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetFLcruise(height) + +
    +
    + +

    Set flight level of cruising part.

    + + +

    This is still be checked for consitancy with selected route and prone to radomization. +Default is FL200 for planes and FL005 for helicopters.

    + +

    Parameter

    +
      +
    • + +

      #number height : +FL in hundrets of feet. E.g. FL200 = 20000 ft ASL.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetFLmax(height) + +
    +
    + +

    Set max flight level.

    + + +

    Setting this value will overrule all other logic. Aircraft will try to fly at less than this FL regardless.

    + +

    Parameter

    +
      +
    • + +

      #number height : +Maximum FL in hundrets of feet.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetFLmin(height) + +
    +
    + +

    Set min flight level.

    + + +

    Setting this value will overrule all other logic. Aircraft will try to fly at higher than this FL regardless.

    + +

    Parameter

    +
      +
    • + +

      #number height : +Maximum FL in hundrets of feet.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetMaxCruiseSpeed(speed) + +
    +
    + +

    Set the maximum cruise speed of the aircraft.

    + +

    Parameter

    +
      +
    • + +

      #number speed : +Speed in km/h.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetMaxDistance(dist) + +
    +
    + +

    Set maximum distance between departure and destination.

    + + +

    Default is 5000 km but aircarft range is also taken into account automatically.

    + +

    Parameter

    +
      +
    • + +

      #number dist : +Distance in km.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetMinDistance(dist) + +
    +
    + +

    Set minimum distance between departure and destination.

    + + +

    Default is 5 km. +Minimum distance should not be smaller than ~500(?) meters to ensure that departure and destination are different.

    + +

    Parameter

    +
      +
    • + +

      #number dist : +Distance in km.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetROE(roe) + +
    +
    + +

    Set rules of engagement (ROE).

    + + +

    Default is weapon hold. This is a peaceful class.

    + +

    Parameter

    +
      +
    • + +

      #string roe : +"hold" = weapon hold, "return" = return fire, "free" = weapons free.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetROT(rot) + +
    +
    + +

    Set reaction to threat (ROT).

    + + +

    Default is no reaction, i.e. aircraft will simply ignore all enemies.

    + +

    Parameter

    +
      +
    • + +

      #string rot : +"noreaction = no reactino, "passive" = passive defence, "evade" = weapons free.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetSpawnDelay(delay) + +
    +
    + +

    Set the delay before first group is spawned.

    + + +

    Minimum delay is 0.5 seconds.

    + +

    Parameter

    +
      +
    • + +

      #number delay : +Delay in seconds.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetSpawnInterval(interval) + +
    +
    + +

    Set the interval between spawnings of the template group.

    + + +

    Minimum interval is 0.5 seconds.

    + +

    Parameter

    +
      +
    • + +

      #number interval : +Interval in seconds.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:SetTakeoff(type) + +
    +
    + +

    Set takeoff type.

    + + +

    Starting cold at airport, starting hot at airport, starting at runway, starting in the air. +Default is "takeoff-hot" for a start at airport with engines already running.

    + +

    Parameter

    +
      +
    • + +

      #string type : +Type can be "takeoff-cold" or "cold", "takeoff-hot" or "hot", "takeoff-runway" or "runway", "air".

      + +
    • +
    +

    Usages:

    +
      +
    • RAT:Takeoff("hot") will spawn RAT objects at airports with engines started.
    • +
    • RAT:Takeoff("cold") will spawn RAT objects at airports with engines off.
    • +
    • RAT:Takeoff("air") will spawn RAT objects in air over random airports or within pre-defined zones. 
    • +
    + +
    +
    +
    +
    + + +RAT:Spawn(naircraft) + +
    +
    + +

    Triggers the spawning of AI aircraft.

    + + +

    Note that all additional options should be set before giving the spawn command.

    + +

    Parameter

    +
      +
    • + +

      #number naircraft : +(Optional) Number of aircraft to spawn. Default is one aircraft.

      + +
    • +
    +

    Usage:

    +
    yak:Spawn(5) will spawn five aircraft. By default aircraft will spawn at neutral and red airports if the template group is part of the red coaliton.
    + +
    +
    +
    +
    + + +RAT:Status(message, forID) + +
    +
    + +

    Report status of RAT groups.

    + +

    Parameters

    +
      +
    • + +

      #boolean message : +(Optional) Send message if true.

      + +
    • +
    • + +

      #number forID : +(Optional) Send message only for this ID.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:StatusReports(switch) + +
    +
    + +

    Aircraft report status messages.

    + + +

    Default is off.

    + +

    Parameter

    +
      +
    • + +

      #boolean switch : +true=on, false=off.

      + +
    • +
    +
    +
    +
    +
    + + #string + +RAT.SubMenuName + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.Vclimb + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.Vcruisemax + +
    +
    + + + +
    +
    +
    +
    + + +RAT:_AirportExists(name) + +
    +
    + +

    Test if an airport exists on the current map.

    + +

    Parameter

    +
      +
    • + +

      #string name :

      + +
    • +
    +

    Return value

    + +

    #boolean: +True if airport exsits, false otherwise.

    + +
    +
    +
    +
    + + +RAT:_Course(a, b) + +
    +
    + +

    Determine the heading from point a to point b.

    + +

    Parameters

    + +

    Return value

    + +

    #number: +Heading/angle in degrees.

    + +
    +
    +
    +
    + + +RAT:_Debug(switch) + +
    +
    + +

    Turn debug messages on or off.

    + + +

    Default is off.

    + +

    Parameter

    +
      +
    • + +

      #boolean switch : +true turn messages on, false=off.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_DeleteMarkers(ids) + +
    +
    + +

    Delete all markers on F10 map.

    + +

    Parameter

    +
      +
    • + +

      #table ids : +(Optional) Table holding the marker IDs to be deleted.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_Despawn(group) + +
    +
    + +

    Despawn unit.

    + + +

    Unit gets destoyed and group is set to nil. +Index of ratcraft array is taken from spawned group name.

    + +

    Parameter

    + +
    +
    +
    +
    + + +RAT:_EngineStartup(EventData) + +
    +
    + +

    Function is executed when a unit starts its engines.

    + +

    Parameter

    +
      +
    • + +

      EventData :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_FLmax(alpha, beta, d, phi, h0) + +
    +
    + +

    Calculate the max flight level for a given distance and fixed climb and descent rates.

    + + +

    In other words we have a distance between two airports and want to know how high we +can climb before we must descent again to arrive at the destination without any level/cruising part.

    + +

    Parameters

    +
      +
    • + +

      #number alpha : +Angle of climb [rad].

      + +
    • +
    • + +

      #number beta : +Angle of descent [rad].

      + +
    • +
    • + +

      #number d : +Distance between the two airports [m].

      + +
    • +
    • + +

      #number phi : +Angle between departure and destination [rad].

      + +
    • +
    • + +

      #number h0 : +Height [m] of departure airport. Note we implicitly assume that the height difference between departure and destination is negligible.

      + +
    • +
    +

    Return value

    + +

    #number: + Maximal flight level in meters.

    + +
    +
    +
    +
    + + +RAT:_GetAirportsOfCoalition() + +
    +
    + +

    Get all "friendly" airports of the current map.

    + +
    +
    +
    +
    + + +RAT:_GetAirportsOfMap() + +
    +
    + +

    Get all airports of the current map.

    + +
    +
    +
    +
    + + +RAT:_GetDestinations(q, minrange, maxrange) + +
    +
    + +

    Get all possible destination airports depending on departure position.

    + + +

    The list is sorted w.r.t. distance to departure position.

    + +

    Parameters

    +
      +
    • + +

      Core.Point#COORDINATE q : +Coordinate of the departure point.

      + +
    • +
    • + +

      #number minrange : +Minimum range to q in meters.

      + +
    • +
    • + +

      #number maxrange : +Maximum range to q in meters.

      + +
    • +
    +

    Return values

    +
      +
    1. + +

      #table: +Table with possible destination airports.

      + +
    2. +
    3. + +

      #nil: +If no airports could be found.

      + +
    4. +
    +
    +
    +
    +
    + + +RAT:_GetLife(group) + +
    +
    + +

    Get (relative) life of first unit of a group.

    + +

    Parameter

    + +

    Return value

    + +

    #number: +Life of unit in percent.

    + +
    +
    +
    +
    + + +RAT:_InitAircraft(DCSgroup) + +
    +
    + +

    Initialize basic parameters of the aircraft based on its (template) group in the mission editor.

    + +

    Parameter

    + +
    +
    +
    +
    + + +RAT:_ModifySpawnTemplate(waypoints) + +
    +
    + +

    Modifies the template of the group to be spawned.

    + + +

    In particular, the waypoints of the group's flight plan are copied into the spawn template. +This allows to spawn at airports and also land at other airports, i.e. circumventing the DCS "landing bug".

    + +

    Parameter

    +
      +
    • + +

      #table waypoints : +The waypoints of the AI flight plan.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_OnBirth(EventData) + +
    +
    + +

    Function is executed when a unit is spawned.

    + +

    Parameter

    +
      +
    • + +

      EventData :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_OnCrash(EventData) + +
    +
    + +

    Function is executed when a unit crashes.

    + +

    Parameter

    +
      +
    • + +

      EventData :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_OnDead(EventData) + +
    +
    + +

    Function is executed when a unit is dead.

    + +

    Parameter

    +
      +
    • + +

      EventData :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_OnEngineShutdown(EventData) + +
    +
    + +

    Function is executed when a unit shuts down its engines.

    + +

    Parameter

    +
      +
    • + +

      EventData :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_OnLand(EventData) + +
    +
    + +

    Function is executed when a unit lands.

    + +

    Parameter

    +
      +
    • + +

      EventData :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_OnTakeoff(EventData) + +
    +
    + +

    Function is executed when a unit takes off.

    + +

    Parameter

    +
      +
    • + +

      EventData :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_PickDeparture(takeoff) + +
    +
    + +

    Set the departure airport of the AI.

    + + +

    If no airport name is given explicitly an airport from the coalition is chosen randomly. +If takeoff style is set to "air", we use zones around the airports or the zones specified by user input.

    + +

    Parameter

    +
      +
    • + +

      #number takeoff : +Takeoff type.

      + +
    • +
    +

    Return values

    +
      +
    1. + +

      Wrapper.Airbase#AIRBASE: +Departure airport if spawning at airport.

      + +
    2. +
    3. + +

      Coore.Zone#ZONE: +Departure zone if spawning in air.

      + +
    4. +
    +
    +
    +
    +
    + + +RAT:_PickDestination(destinations, _random) + +
    +
    + +

    Set the destination airport of the AI.

    + + +

    If no airport name is given an airport from the coalition is chosen randomly.

    + +

    Parameters

    +
      +
    • + +

      #table destinations : +Table with destination airports.

      + +
    • +
    • + +

      #boolean _random : +Optional switch to activate a random selection of airports.

      + +
    • +
    +

    Return value

    + +

    Wrapper.Airbase#AIRBASE: +Destination airport.

    + +
    +
    +
    +
    + + +RAT:_PlaceMarkers(waypoints) + +
    +
    + +

    Place markers of the waypoints.

    + + +

    Note we assume a very specific number and type of waypoints here.

    + +

    Parameter

    +
      +
    • + +

      #table waypoints : +Table with waypoints.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_Randomize(value, fac, lower, upper) + +
    +
    + +

    Randomize a value by a certain amount.

    + +

    Parameters

    +
      +
    • + +

      #number value : +The value which should be randomized

      + +
    • +
    • + +

      #number fac : +Randomization factor.

      + +
    • +
    • + +

      #number lower : +(Optional) Lower limit of the returned value.

      + +
    • +
    • + +

      #number upper : +(Optional) Upper limit of the returned value.

      + +
    • +
    +

    Return value

    + +

    #number: +Randomized value.

    + +

    Usages:

    +
      +
    • _Randomize(100, 0.1) returns a value between 90 and 110, i.e. a plus/minus ten percent variation.
    • +
    • _Randomize(100, 0.5, nil, 120) returns a value between 50 and 120, i.e. a plus/minus fivty percent variation with upper bound 120.
    • +
    + +
    +
    +
    +
    + + +RAT:_Respawn(group) + +
    +
    + +

    Respawn a group.

    + +

    Parameter

    + +
    +
    +
    +
    + + +RAT:_Routeinfo(waypoints, comment) + +
    +
    + +

    Provide information about the assigned flightplan.

    + +

    Parameters

    +
      +
    • + +

      #table waypoints : +Waypoints of the flight plan.

      + +
    • +
    • + +

      #string comment : +Some comment to identify the provided information.

      + +
    • +
    +

    Return value

    + +

    #number: +total Total route length in meters.

    + +
    +
    +
    +
    + + +RAT:_SetCoalitionTable() + +
    +
    + +

    Create a table with the valid coalitions for departure and destination airports.

    + +
    +
    +
    +
    + + +RAT:_SetMarker(text, wp) + +
    +
    + +

    Set a marker visible for all on the F10 map.

    + +

    Parameters

    +
      +
    • + +

      #string text : +Info text displayed at maker.

      + +
    • +
    • + +

      #table wp : +Position of marker coming in as waypoint, i.e. has x, y and alt components.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_SetROE(group, roe) + +
    +
    + +

    Set ROE for a group.

    + +

    Parameters

    +
      +
    • + +

      Wrapper.Group#GROUP group : +Group for which the ROE is set.

      + +
    • +
    • + +

      #string roe : +ROE of group.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_SetROT(group, rot) + +
    +
    + +

    Set ROT for a group.

    + +

    Parameters

    +
      +
    • + +

      Wrapper.Group#GROUP group : +Group for which the ROT is set.

      + +
    • +
    • + +

      #string rot : +ROT of group.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_SetRoute(Takeoff, _departure, _destination, takeoff) + +
    +
    + +

    Set the route of the AI plane.

    + + +

    Due to DCS landing bug, this has to be done before the unit is spawned.

    + +

    Parameters

    + +

    Return values

    +
      +
    1. + +

      Wrapper.Airport#AIRBASE: +Departure airbase.

      + +
    2. +
    3. + +

      Wrapper.Airport#AIRBASE: +Destination airbase.

      + +
    4. +
    5. + +

      #table: +Table of flight plan waypoints.

      + +
    6. +
    +
    +
    +
    +
    + + +RAT:_SetStatus(group, status) + +
    +
    + +

    Set status of group.

    + +

    Parameters

    +
      +
    • + +

      group :

      + +
    • +
    • + +

      status :

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_SpawnWithRoute(_departure, _destination) + +
    +
    + +

    Spawn the AI aircraft with a route.

    + + +

    Sets the departure and destination airports and waypoints. +Modifies the spawn template. +Sets ROE/ROT. +Initializes the ratcraft array and group menu.

    + +

    Parameters

    +
      +
    • + +

      #string _departure : +(Optional) Name of departure airbase.

      + +
    • +
    • + +

      #string _destination : +(Optional) Name of destination airbase.

      + +
    • +
    +
    +
    +
    +
    + + +RAT:_TaskHolding(P1, Altitude, Speed, Duration) + +
    +
    + +

    Orbit at a specified position at a specified alititude with a specified speed.

    + +

    Parameters

    +
      +
    • + +

      Dcs.DCSTypes#Vec2 P1 : +The point to hold the position.

      + +
    • +
    • + +

      #number Altitude : +The altitude ASL at which to hold the position.

      + +
    • +
    • + +

      #number Speed : +The speed flying when holding the position in m/s.

      + +
    • +
    • + +

      #number Duration : +Duration of holding pattern in seconds.

      + +
    • +
    +

    Return value

    + +

    Dcs.DCSTasking.Task#Task: +DCSTask

    + +
    +
    +
    +
    + + +RAT:_Waypoint(Type, Coord, Speed, Altitude, Airport) + +
    +
    + +

    Create a waypoint that can be used with the Route command.

    + +

    Parameters

    +
      +
    • + +

      #number Type : +Type of waypoint.

      + +
    • +
    • + +

      Core.Point#COORDINATE Coord : +3D coordinate of the waypoint.

      + +
    • +
    • + +

      #number Speed : +Speed in m/s.

      + +
    • +
    • + +

      #number Altitude : +Altitude in m.

      + +
    • +
    • + +

      Wrapper.Airbase#AIRBASE Airport : +Airport of object to spawn.

      + +
    • +
    +

    Return value

    + +

    #table: +Waypoints for DCS task route or spawn template.

    + +
    +
    +
    +
    + + #table + +RAT.aircraft + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.airports + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.airports_map + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.alive + +
    +
    + + + +
    +
    +
    +
    + + #RAT + +RAT.cat + +
    +
    + +

    RAT categories.

    + +
    +
    +
    +
    + + #string + +RAT.category + +
    +
    + + + +
    +
    +
    +
    + + #RAT + +RAT.coal + +
    +
    + +

    RAT friendly coalitions.

    + +
    +
    +
    +
    + + #number + +RAT.coalition + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.commute + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.continuejourney + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.ctable + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.debug + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.departure_ports + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.departure_zones + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.destination_ports + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.f10menu + +
    +
    + + + +
    +
    +
    +
    + + #string + +RAT.friendly + +
    +
    + + + +
    +
    +
    +
    + + #RAT + +RAT.markerid + +
    +
    + +

    Running number of placed markers on the F10 map.

    + +
    +
    +
    +
    + + #table + +RAT.markerids + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.maxdist + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.mindist + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.placemarkers + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.random_departure + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.random_destination + +
    +
    + + + +
    +
    +
    +
    + + #table + +RAT.ratcraft + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.reportstatus + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +RAT.respawn_after_landing + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.respawn_delay + +
    +
    + + + +
    +
    +
    +
    + + #string + +RAT.roe + +
    +
    + + + +
    +
    +
    +
    + + #string + +RAT.rot + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.spawndelay + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.spawninterval + +
    +
    + + + +
    +
    +
    +
    + + #number + +RAT.statusinterval + +
    +
    + + + +
    +
    +
    +
    + + #string + +RAT.takeoff + +
    +
    + + + +
    +
    +
    +
    + + #RAT + +RAT.unit + +
    +
    + +

    RAT unit conversions.

    + +
    +
    +
    +
    + + #RAT + +RAT.wp + +
    +
    + +

    RAT waypoint type.

    + +
    +
    + +

    Type list

    + +
    + +
    + + diff --git a/docs/Documentation/Radio.html b/docs/Documentation/Radio.html index dd150fc26..5fc5b4646 100644 --- a/docs/Documentation/Radio.html +++ b/docs/Documentation/Radio.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Route.html b/docs/Documentation/Route.html index d562152e5..7b9c61985 100644 --- a/docs/Documentation/Route.html +++ b/docs/Documentation/Route.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Scenery.html b/docs/Documentation/Scenery.html index 964ec5530..4529c2db6 100644 --- a/docs/Documentation/Scenery.html +++ b/docs/Documentation/Scenery.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/ScheduleDispatcher.html b/docs/Documentation/ScheduleDispatcher.html index 65a168015..a9155213d 100644 --- a/docs/Documentation/ScheduleDispatcher.html +++ b/docs/Documentation/ScheduleDispatcher.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Scheduler.html b/docs/Documentation/Scheduler.html index e3681deff..ec5dfe8b4 100644 --- a/docs/Documentation/Scheduler.html +++ b/docs/Documentation/Scheduler.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Scoring.html b/docs/Documentation/Scoring.html index 3bf1d6c90..91b76b720 100644 --- a/docs/Documentation/Scoring.html +++ b/docs/Documentation/Scoring.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Sead.html b/docs/Documentation/Sead.html index a1ac3dd2e..409f76d29 100644 --- a/docs/Documentation/Sead.html +++ b/docs/Documentation/Sead.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Set.html b/docs/Documentation/Set.html index 7b343aea0..5ea5133ca 100644 --- a/docs/Documentation/Set.html +++ b/docs/Documentation/Set.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Settings.html b/docs/Documentation/Settings.html index 992d1808d..25ed412c2 100644 --- a/docs/Documentation/Settings.html +++ b/docs/Documentation/Settings.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Smoke.html b/docs/Documentation/Smoke.html index 230977c2e..14e4cd382 100644 --- a/docs/Documentation/Smoke.html +++ b/docs/Documentation/Smoke.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html index 3c14d9de6..89e15cae9 100644 --- a/docs/Documentation/Spawn.html +++ b/docs/Documentation/Spawn.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • @@ -822,6 +823,12 @@ and any spaces before and after the resulting name are removed.

    SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle) + + + + SPAWN.uncontrolled + + @@ -2194,9 +2201,6 @@ The group that was spawned. You can use this group for further actions.

    - -

    Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.

    -
    @@ -2735,6 +2739,9 @@ when nothing was spawned.

    + +

    Overwrite unit names by default with group name.

    +
    @@ -2749,6 +2756,9 @@ when nothing was spawned.

    + +

    By default, no InitLimit

    +
    @@ -2784,7 +2794,7 @@ when nothing was spawned.

    - + #number SPAWN.SpawnMaxGroups @@ -2801,7 +2811,7 @@ when nothing was spawned.

    - + #number SPAWN.SpawnMaxUnitsAlive @@ -3153,7 +3163,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 ) -

    Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.

    +

    When the first Spawn executes, all the Groups need to be made visible before start.

    @@ -3733,6 +3743,20 @@ True = Continue Scheduler

    + +
    +
    +
    + + + +SPAWN.uncontrolled + +
    +
    + + +
    diff --git a/docs/Documentation/SpawnStatic.html b/docs/Documentation/SpawnStatic.html index bc91b9624..487563b09 100644 --- a/docs/Documentation/SpawnStatic.html +++ b/docs/Documentation/SpawnStatic.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Spot.html b/docs/Documentation/Spot.html index 5fdc3b305..f7f4e87fa 100644 --- a/docs/Documentation/Spot.html +++ b/docs/Documentation/Spot.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • @@ -765,7 +766,6 @@ true if it is lasing

    - SPOT.ScheduleID @@ -779,7 +779,6 @@ true if it is lasing

    - SPOT.SpotIR @@ -793,7 +792,6 @@ true if it is lasing

    - SPOT.SpotLaser @@ -807,7 +805,6 @@ true if it is lasing

    - SPOT.Target diff --git a/docs/Documentation/Static.html b/docs/Documentation/Static.html index efa72665c..04a72d991 100644 --- a/docs/Documentation/Static.html +++ b/docs/Documentation/Static.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/StaticObject.html b/docs/Documentation/StaticObject.html index 6ff504920..963e6ded9 100644 --- a/docs/Documentation/StaticObject.html +++ b/docs/Documentation/StaticObject.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Task.html b/docs/Documentation/Task.html index dd18375a7..1314757f2 100644 --- a/docs/Documentation/Task.html +++ b/docs/Documentation/Task.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Task_A2A.html b/docs/Documentation/Task_A2A.html index 53005ee57..da59f25d5 100644 --- a/docs/Documentation/Task_A2A.html +++ b/docs/Documentation/Task_A2A.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Task_A2A_Dispatcher.html b/docs/Documentation/Task_A2A_Dispatcher.html index 6c6029eb9..10cbbda64 100644 --- a/docs/Documentation/Task_A2A_Dispatcher.html +++ b/docs/Documentation/Task_A2A_Dispatcher.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Task_A2G.html b/docs/Documentation/Task_A2G.html index 841460bca..014905fb4 100644 --- a/docs/Documentation/Task_A2G.html +++ b/docs/Documentation/Task_A2G.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Task_A2G_Dispatcher.html b/docs/Documentation/Task_A2G_Dispatcher.html index 19f576d02..4c9ff113b 100644 --- a/docs/Documentation/Task_A2G_Dispatcher.html +++ b/docs/Documentation/Task_A2G_Dispatcher.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Task_Cargo.html b/docs/Documentation/Task_Cargo.html index 743615651..c7e689347 100644 --- a/docs/Documentation/Task_Cargo.html +++ b/docs/Documentation/Task_Cargo.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • @@ -552,7 +553,7 @@ based on the tasking capabilities defined in Task#TA
    - + Core.Cargo#CARGO FSM_PROCESS.Cargo @@ -630,7 +631,7 @@ based on the tasking capabilities defined in Task#TA
    - #number + TASK_CARGO.CargoLimit diff --git a/docs/Documentation/Task_PICKUP.html b/docs/Documentation/Task_PICKUP.html index 327fe472e..01f437f36 100644 --- a/docs/Documentation/Task_PICKUP.html +++ b/docs/Documentation/Task_PICKUP.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Unit.html b/docs/Documentation/Unit.html index 2185df762..4dc9e6940 100644 --- a/docs/Documentation/Unit.html +++ b/docs/Documentation/Unit.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Utils.html b/docs/Documentation/Utils.html index 13adb0b4a..802122f5e 100644 --- a/docs/Documentation/Utils.html +++ b/docs/Documentation/Utils.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/Zone.html b/docs/Documentation/Zone.html index 67e25dafa..4525f8bc0 100644 --- a/docs/Documentation/Zone.html +++ b/docs/Documentation/Zone.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/env.html b/docs/Documentation/env.html index 09dbbfcd0..a88348417 100644 --- a/docs/Documentation/env.html +++ b/docs/Documentation/env.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/index.html b/docs/Documentation/index.html index 25dd9ab34..7e76677a3 100644 --- a/docs/Documentation/index.html +++ b/docs/Documentation/index.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • @@ -520,6 +521,14 @@ are design patterns allowing efficient (long-lasting) processes and workflows.Radio

    Core -- The RADIO Module is responsible for everything that is related to radio transmission and you can hear in DCS, be it TACAN beacons, Radio transmissions...

    + + + + Rat + +
      +
    • Functional -- Create random airtraffic in your missions.
    • +
    diff --git a/docs/Documentation/land.html b/docs/Documentation/land.html index e4a3153a4..faf8ff947 100644 --- a/docs/Documentation/land.html +++ b/docs/Documentation/land.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Documentation/routines.html b/docs/Documentation/routines.html index 18dfebc72..d055a38df 100644 --- a/docs/Documentation/routines.html +++ b/docs/Documentation/routines.html @@ -73,6 +73,7 @@
  • Process_JTAC
  • Process_Pickup
  • Radio
  • +
  • Rat
  • Route
  • Scenery
  • ScheduleDispatcher
  • diff --git a/docs/Presentations/RAT/RAT.png b/docs/Presentations/RAT/RAT.png new file mode 100644 index 000000000..1cfd25ca1 Binary files /dev/null and b/docs/Presentations/RAT/RAT.png differ