-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathenv.lua
More file actions
2393 lines (2071 loc) · 135 KB
/
Copy pathenv.lua
File metadata and controls
2393 lines (2071 loc) · 135 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--[[
Script by Tobias00723 ████████
from the TGFB server ████████ ████████
Discord : https://discord.gg/hEHd4A3czx ██████ ██████
any questions? ^^ ████ ▒ ▒ █████
find me on my discord server ^^ ████ ▒▒ ▒▒▒ ███
_________________________________ ████ ▒▒▒ ▒▒▒ ███
███ ▒▒▒▒ ▒▒▒▒ ███
██ ▒▒▒▒ ▒▒▒▒▒ ███
███ ▒▒▒▒▒▒ ▒▒▒▒▒▒ ███
Script as is. ███ ▓▒▒▒▒▒▒ ▒▒▒▒▒▒▒ ███
███ ▒▒▒▒▒▒▒▒ ▓▒▒▒▒▒▒▓ ███
Enjoy The open sauce! ███ ▓▒▒▓▒▒▓▒▓ ▒▒▓▒▒▒▒▒ ███
███ ▓▒▓▓▒▓▓▒▓ ▓▓▒▓▓▓▓▓▓ ███
If used credit, is appreaciated. █ ▓▓▓▒▓ ▓▓▓▒ ▓▓▓▓ ▒▓▒▓▓ █
Happy "borrowing" :) ▓▓▓▓ ▓▓▓ ████ ▓▓▓ ▓▓▓▓
_________________________________ ▓▓▓ ▓▓ ▓▓▓▓ ▓▓ ▓▓▓
▓▓ ▓▓ ▓▓▓▓ ▓▓ ▓▓
▓▓ ▓ ▓▓▓▓ ▓ ▓▓
Copyright (c) 2025 TGFB ▓▓▓▓
All rights reserved. ▓▓▓▓
]]
do
---@meta
--classes
do
--[[MISSION DATA]]
do
---**env.mission.coalition.side.nav_points Class**
do
---@class env.mission.coalition.side.nav_points
---@field type string Type of the navigation point
---@field comment string Comment associated with the navigation point
---@field callsignStr string Callsign string for the navigation point
---@field id number Unique identifier for the navigation point
---@field properties NavigationPoint.Properties Properties of the navigation point
---@field y number Y coordinate of the navigation point
---@field x number X coordinate of the navigation point
---@field callsign number Numeric callsign for the navigation point
do
---@class NavigationPoint.Properties
---@field vnav number Vertical navigation setting
---@field scale number Scale setting
---@field vangle number Vertical angle setting
---@field angle number Angle setting
---@field steer number Steer setting
end
end
---**env.mission.coalition.side.Country Class**
do
---@class env.mission.coalition.side.Country
---@field id number ID of the country
---@field name string Name of the country
---@field plane? Plane_Group_DATA List of all planes in mission
---@field helicopter? Plane_Group_DATA List of all helicopters in mission
---@field ship? table List of all ships in mission
---@field vehicle? Vehicle_Group_DATA List of all vehicles in mission
---@field static? table List of all static objects in mission
end
---Plane Group DATA
do
--- Aircraft data
---@class Plane_Group_DATA
---@field group table<number, Plane_Group_DATA_group>
---@class Plane_Group_DATA_group
---@field frequency? number Frequency of the aircraft
---@field modulation? number Modulation setting of the aircraft
---@field groupId? number Group ID of the aircraft
---@field tasks table List of tasks associated with the aircraft
---@field route Aircraft.Route Details of the flight route
---@field hidden? boolean Whether the aircraft is hidden
---@field units table<number, Aircraft.Unit> List of units in the aircraft
---@field y number Y coordinate of the aircraft
---@field radioSet boolean Whether the radio is set
---@field name string Name of the aircraft
---@field communication? boolean Whether communication is enabled
---@field x number X coordinate of the aircraft
---@field start_time? number Start time of the aircraft's mission
---@field task string Task assigned to the aircraft
---@field uncontrolled? boolean Whether the aircraft is uncontrolled
---@field lateActivation? boolean set late activation
---@field hiddenOnPlanner? boolean if you can see on F10
---@field hiddenOnMFD? boolean can be seen on MFD
---@class Aircraft.Route
---@field points table<number, Aircraft.Route.Point> List of route points
---@class Aircraft.Route.Point
---@field alt number Altitude of the point
---@field action AI.Task.WaypointType Action at the route point
---@field alt_type AI.Task.AltitudeType Altitude type
---@field speed number Speed at the route point
---@field task Task_Wrappers details at the route point
---@field type AI.Task.WaypointType Type of the route point
---@field ETA number
---@field ETA_locked boolean
---@field y number Y coordinate of the point
---@field x number X coordinate of the point
---@field speed_locked boolean
---@field formation_template string Form of the route point
---@field airdromeId? number ID of the airdrome
---@class Aircraft.Unit
---@field alt number Altitude of the unit
---@field hardpoint_racks boolean Whether hardpoint racks are present
---@field alt_type AI.Task.AltitudeType Altitude type
---@field livery_id? string Livery ID of the unit
---@field skill AI.Skill Skill level of the unit
---@field parking? string Parking position Term_Index from :getparking tostring
---@field speed number Speed of the unit
---@field AddPropAircraft? Aircraft.AddPropAircraft Additional properties for the aircraft
---@field Radio? table<number, Aircraft.Radio>
---@field type TypeNames Type of the unit
---@field unitId? number Unit ID
---@field psi? number pressure of location
---@field onboard_num? string Onboard number of the unit
---@field dataCartridge? table
---@field parking_id? string Parking ID
---@field x number X coordinate of the unit
---@field name string Name of the unit
---@field payload? Aircraft.Payload Payload of the unit
---@field y number Y coordinate of the unit
---@field heading number Heading of the unit
---@field callsign table<number|string, number|string> Callsign details of the unit
---@field datalinks? Aircraft.Datalink DL info
---@class Aircraft.AddPropAircraft
---@
---@class Aircraft.Datalink
---@field Link16? Aircraft.Datalink.Link16
---@field IDM? Aircraft.Datalink.IDM
---@field SADL? Aircraft.Datalink.SADL
---@field Link4? table
---@class Aircraft.Datalink.Link16
---@field settings Aircraft.Datalink.Link16.settings
---@field network Aircraft.Datalink.Link16.network
---@class Aircraft.Datalink.Link16.settings
---@field FF1_Channel? number unk
---@field FF2_Channel? number +1 on FF1
---@field transmitPower number
---@field VOCB_Channel? number unk
---@field VOCA_Channel? number unk
---@field AIC_Channel? number unk
---@field flightLead? boolean true if un is 1
---@field specialChannel? number same as fighterChannel and missionChannel unk dough
---@field fighterChannel? number same as missionChannel and specialChannel unk dough
---@field missionChannel? number same as specialChannel and fighterChannel unk dough
---@field AirKey? number
---@field GatewayKey? number
---@class Aircraft.Datalink.Link16.network
---@field teamMembers table<number, Aircraft.Datalink.Link16.network.teamMembers>
---@field donors table seems always empty
---@class Aircraft.Datalink.Link16.network.teamMembers
---@field missionUnitId number UnitID to be linked
---@field TDOA? boolean if in team flight? seems most of the time true
---@class Aircraft.Datalink.IDM
---@
---@class Aircraft.Datalink.SADL
---@
---@class Aircraft.Datalink.Link4
---@
--[[["settings"] =
{
["flightLead"] = true,
["transmitPower"] = 3,
["specialChannel"] = 1,
["fighterChannel"] = 1,
["missionChannel"] = 1,
}, -- end of ["settings"]
["network"] =
{
["teamMembers"] =
{
[1] =
{
["missionUnitId"] = 7254,
["TDOA"] = true,
}, -- end of [1]
}, -- end of ["teamMembers"]
["donors"] = {},
}, -- end of ["network"]
]]
---@class Aircraft.Radio
---@field channels table<number, number>
---@field modulations table<number, radio.modulation>
---@field channelsNames table<number, string>
---@class Aircraft.Payload
---@field pylons table<number, Aircraft.Payload.Pylon>|table List of pylons
---@field fuel number Amount of fuel
---@field flare? number Number of flares
---@field ammo_type? number Ammo type
---@field chaff? number Number of chaff
---@field gun? number Gun amount in %
---@field restricted? table
---@class Aircraft.Payload.Pylon
---@field CLSID string CLSID of the pylon
---@field settings? table
end
---Vehicle Group DATA
do
---@class Vehicle_Group_DATA
---@field group table<number, Vehicle_Group_DATA_group>
---@class Vehicle_Group_DATA_group
---@field visible boolean
---@field tasks table
---@field uncontrollable boolean
---@field task string their 'assignmend' ak 'fac' , 'Ground Nothing'
---@field taskSelected boolean
---@field route Vehicle_Group_DATA_group_route
---@field units table<number, Vehicle_Group_DATA_group_units>
---@field x number
---@field y number
---@field name string
---@field start_time number
---@class Vehicle_Group_DATA_group_route
---@field spans table
---@field points table<number, Vehicle_Group_DATA_group_route_point>
---@class Vehicle_Group_DATA_group_route_point
---@field alt number
---@field type AI.Task.WaypointType
---@field ETA number
---@field alt_type AI.Task.AltitudeType
---@field formation_template string
---@field y number
---@field x number
---@field ETA_locked boolean
---@field speed number
---@field action AI.Task.VehicleFormation
---@field task Task
---@field speed_locked boolean
---@class Vehicle_Group_DATA_group_units
---@field skill AI.Skill
---@field coldAtStart boolean
---@field type TypeNames_Ground
---@field unitId? number
---@field x number
---@field y number
---@field name string
---@field heading number
---@field playerCanDrive boolean
end
---Tasks
do
---@alias Task_Aircraft
---| Task_attackGroup
---| Task_attackUnit
---| Task_Bombing
---| Task_Stafing
---| Task_Carpet_Bombing
---| Task_AttackMapObject
---| Task_BombingRunway
---| Task_Orbit
---| Task_Refueling
---| Task_follow
---| Task_followBigFormation
---| Task_Escord
---| Task_FAC_AttackGroup
---| Task_Recovery_Tanker
---| Enroute_Tasks_engageTargets
---| Enroute_Tasks_engageTargetsInZone
---| Enroute_Tasks_engageGroup
---| Enroute_Tasks_engageUnit
---| Enroute_Tasks_AWACS
---| Enroute_Tasks_Tanker
---| Enroute_Tasks_FAC_engageGroup
---| Enroute_Tasks_FAC
---@alias Task_Aircraft_command
---| Commands_Tasks_Script
---| Commands_Tasks_SetCallsign
---| Commands_Tasks_SetFrequency
---| Commands_Tasks_SetFrequencyForUnit
---| Commands_Tasks_SwitchWaypoint
---| Commands_Tasks_SwitchAction
---| Commands_Tasks_SetInvisible
---| Commands_Tasks_SetImmortal
---| Commands_Tasks_SetUnlimitedFuel
---| Commands_Tasks_ActivateBeacon
---| Commands_Tasks_DeactivateBeacon
---| Commands_Tasks_EPLRS
---| Commands_Tasks_Start
---| Commands_Tasks_TransmitMessage
---| Commands_Tasks_StopTransmission
---| Commands_Tasks_SmokeOnOff
---@alias Task_Heli
---| Task_attackGroup
---| Task_attackUnit
---| Task_Bombing
---| Task_Stafing
---| Task_AttackMapObject
---| Task_BombingRunway
---| Task_Orbit
---| Task_land
---| Task_follow
---| Task_Escord
---| Task_Embarking
---| Task_FAC_AttackGroup
---| Task_disembarkFromTransport
---| Task_CargoTransportation
---| Task_GroundEscord
---| Enroute_Tasks_engageTargets
---| Enroute_Tasks_engageTargetsInZone
---| Enroute_Tasks_engageGroup
---| Enroute_Tasks_engageUnit
---| Enroute_Tasks_AWACS
---| Enroute_Tasks_Tanker
---| Enroute_Tasks_FAC_engageGroup
---| Enroute_Tasks_FAC
---@alias Task_Heli_command
---| Commands_Tasks_Script
---| Commands_Tasks_SetCallsign
---| Commands_Tasks_SetFrequency
---| Commands_Tasks_SetFrequencyForUnit
---| Commands_Tasks_SwitchWaypoint
---| Commands_Tasks_SwitchAction
---| Commands_Tasks_SetInvisible
---| Commands_Tasks_SetImmortal
---| Commands_Tasks_SetUnlimitedFuel
---| Commands_Tasks_ActivateBeacon
---| Commands_Tasks_DeactivateBeacon
---| Commands_Tasks_EPLRS
---| Commands_Tasks_Start
---| Commands_Tasks_TransmitMessage
---| Commands_Tasks_StopTransmission
---| Commands_Tasks_SmokeOnOff
---@alias Task_Ground
---| Task_Embarking
---| Task_FireAtPoint
---| Task_Hold
---| Task_FAC_AttackGroup
---| Task_EmbarkToTransport Infentry only
---| Task_disembarkFromTransport
---| Task_goToWaypoint
---| Enroute_Tasks_EWR
---| Enroute_Tasks_FAC_engageGroup
---| Enroute_Tasks_FAC
---@alias Task_Ground_command
---| Commands_Tasks_Script
---| Commands_Tasks_SetCallsign
---| Commands_Tasks_SetFrequency
---| Commands_Tasks_StopRoute
---| Commands_Tasks_SwitchAction
---| Commands_Tasks_SetInvisible
---| Commands_Tasks_SetImmortal
---| Commands_Tasks_ActivateBeacon
---| Commands_Tasks_DeactivateBeacon
---| Commands_Tasks_EPLRS
---| Commands_Tasks_TransmitMessage
---| Commands_Tasks_StopTransmission
---@alias Task_Ship
---| Task_FireAtPoint
---@alias Task_Ship_command
---| Commands_Tasks_Script
---| Commands_Tasks_SetInvisible
---| Commands_Tasks_SetImmortal
---| Commands_Tasks_ActivateBeacon
---| Commands_Tasks_DeactivateBeacon
---| Commands_Tasks_ActivateICLS
---| Commands_Tasks_DeactivateICLS
---| Commands_Tasks_EPLRS
---| Commands_Tasks_TransmitMessage
---| Commands_Tasks_StopTransmission
---| Commands_Tasks_ActivateLink4
---| Commands_Tasks_DeactivateLink4
---| Commands_Tasks_ActivateACLS
---| Commands_Tasks_DeactivateACLS
---| Commands_Tasks_LoadingShip
---@alias Task_type
---| 'Nothing'
---| 'AFAC'
---| 'AWACS'
---| 'Antiship Strike'
---| 'CAS'
---| 'CAP'
---| 'Escort'
---| 'Fighter Sweep'
---| 'Ground Attack'
---| 'Intercept'
---| 'Pinpoint Strike'
---| 'Reconnaissance'
---| 'Refueling'
---| 'Runway Attack'
---| 'SEAD'
---| 'Transport'
---@alias Task_Wrappers
---| Tasks_TaskWrapper_mission
---| Tasks_TaskWrapper_ComboTask
---| Tasks_TaskWrapper_ControlledTask
---| Tasks_TaskWrapper_WrappedAction
---@alias Task.Cap
---| Task_attackGroup
---| Enroute_Tasks_engageTargets
---| Enroute_Tasks_engageTargetsInZone
---| Enroute_Tasks_engageGroup
---| Enroute_Tasks_engageUnit
---| Task.ALL
---@alias Task.CAS
---| Task_attackGroup
---| Task_GroundEscord
---| Enroute_Tasks_engageTargets
---| Enroute_Tasks_engageTargetsInZone
---| Enroute_Tasks_engageGroup
---| Enroute_Tasks_engageUnit
---| Task.ALL
---@alias Task.Fighter_Sweep
---| Task_attackGroup
---| Enroute_Tasks_engageTargets
---| Enroute_Tasks_engageTargetsInZone
---| Enroute_Tasks_engageGroup
---| Enroute_Tasks_engageUnit
---| Task.ALL
---@alias Task.Intercept
---| Task_attackGroup
---| Task.ALL
---@alias Task.SEAD
---| Task_attackGroup
---| Task_Escord
---| Enroute_Tasks_engageTargets
---| Enroute_Tasks_engageTargetsInZone
---| Enroute_Tasks_engageGroup
---| Enroute_Tasks_engageUnit
---@alias Task.AntiShip
---| Task_attackGroup
---| Enroute_Tasks_engageTargets
---| Enroute_Tasks_engageTargetsInZone
---| Enroute_Tasks_engageGroup
---| Enroute_Tasks_engageUnit
---| Task.ALL
---@alias Task.Ground_Attack
---| Task_Carpet_Bombing
---| Task_AttackMapObject
---| Task_followBigFormation
---| Task_GroundEscord
---| Task.ALL
---@alias Task.Pinpoint_Strike
---| Task_AttackMapObject
---| Task.ALL
---@alias Task.RunwayAttack
---| Task_AttackMapObject
---| Task_BombingRunway
---| Task.ALL
---@alias Task.Escord
---| Task_Escord
---| Task_GroundEscord
---| Task.ALL
---@alias Task.Transport
---| Task_Embarking
---| Task_disembarkFromTransport
---| Task.ALL
---@alias Task.AFAC
---| Task_FAC_AttackGroup
---| Enroute_Tasks_engageTargets
---| Enroute_Tasks_engageTargetsInZone
---| Enroute_Tasks_engageGroup
---| Enroute_Tasks_engageUnit
---| Enroute_Tasks_FAC_engageGroup
---| Enroute_Tasks_FAC
---| Task.ALL
---@alias Task.Tanker
---| Task_Recovery_Tanker
---| Enroute_Tasks_Tanker
---| Task.ALL
---@alias Task.AWACS
---| Enroute_Tasks_AWACS
---| Task.ALL
---@alias Task.ALL
---| Task_attackUnit
---| Task_Bombing
---| Task_Stafing
---| Task_Refueling
---| Task_land
---| Task_follow
---| Task_FireAtPoint
---| Task_Hold
---| Task_EmbarkToTransport
---| Task_CargoTransportation
---| Task_goToWaypoint
---| Enroute_Tasks_EWR
---| Task_Orbit
---@alias Task
---| Task_Wrappers
---| Task.Cap
---| Task.CAS
---| Task.Fighter_Sweep
---| Task.Intercept
---| Task.SEAD
---| Task.AntiShip
---| Task.Ground_Attack
---| Task.Pinpoint_Strike
---| Task.RunwayAttack
---| Task.Escord
---| Task.Transport
---| Task.AFAC
---| Task.Tanker
---| Task.AWACS
---| Task_Commands
---@alias Task_Commands
---| Commands_Tasks_Script
---| Commands_Tasks_SetCallsign
---| Commands_Tasks_SetFrequency
---| Commands_Tasks_SetFrequencyForUnit
---| Commands_Tasks_SwitchWaypoint
---| Commands_Tasks_StopRoute
---| Commands_Tasks_SwitchAction
---| Commands_Tasks_SetInvisible
---| Commands_Tasks_SetImmortal
---| Commands_Tasks_SetUnlimitedFuel
---| Commands_Tasks_ActivateBeacon
---| Commands_Tasks_DeactivateBeacon
---| Commands_Tasks_ActivateICLS
---| Commands_Tasks_DeactivateICLS
---| Commands_Tasks_EPLRS
---| Commands_Tasks_Start
---| Commands_Tasks_TransmitMessage
---| Commands_Tasks_StopTransmission
---| Commands_Tasks_SmokeOnOff
---| Commands_Tasks_ActivateLink4
---| Commands_Tasks_DeactivateLink4
---| Commands_Tasks_ActivateACLS
---| Commands_Tasks_DeactivateACLS
---| Commands_Tasks_LoadingShip
---| Commands_Tasks_Set_Option
--Task wrapper
do
--Tasks_TaskWrapper_mission
do
---The mission task is a collection of waypoints that are assigned to a group. When you create a group in the mission editor and place a route, you are created its mission task. For ground vehicles and ships the mission task is how you can more directly control where ground/ship forces are going.
---https://wiki.hoggitworld.com/view/DCS_task_mission
---@class Tasks_TaskWrapper_mission
---@field id 'Mission' Mission identifier
---@field params Mission.Task_Params_Task_ Parameters for the mission
---@class Mission.Task_Params_Task_
---@field airborne boolean Whether the mission involves airborne units
---@field route Mission.Route Route information for the mission
---@class Mission.Route
---@field points table<number, Mission.Route.Point> List of waypoints
---@class Mission.Route.Point
---@field type AI.Task.WaypointType Type of the waypoint (e.g., TakeOff, Landing)
---@field airdromeId? number ID of the airbase (only for aircraft)
---@field timeReFuAr? number Duration in minutes for a refueling or repair waypoint (only for aircraft)
---@field helipadId? number ID of the helipad (only for helicopters and aircraft)
---@field linkUnit? number ID of the unit to link to (only for helicopters and aircraft)
---@field action AI.Task.TurnMethod Action to be taken at the waypoint (e.g., Turn, Direct)
---@field x number X coordinate of the waypoint
---@field y number Y coordinate of the waypoint
---@field alt number Altitude of the waypoint
---@field alt_type? AI.Task.AltitudeType Type of altitude measurement (e.g., BARO, AGL)
---@field speed number Speed in meters per second
---@field speed_locked? boolean Whether the speed is fixed
---@field ETA? number Estimated Time of Arrival at the waypoint
---@field ETA_locked? boolean Whether the ETA is fixed
---@field name string Name or description of the waypoint
---@field task? Task Task or command assigned to the waypoint
end
--Tasks_TaskWrapper_ComboTask
do
---A list of tasks indexed numerically for when the task will be executed in accordance with the AI task queue rules. This is the task that the DCS mission editor will default to using for groups placed in the editor.
---https://wiki.hoggitworld.com/view/DCS_task_comboTask
---@class Tasks_TaskWrapper_ComboTask
---@field id 'ComboTask' string Identifier for the task type
---@field params Tasks_TaskWrapper_ComboTask_Tasks List of tasks to be executed sequentially
---@class Tasks_TaskWrapper_ComboTask_Tasks
---@field tasks table<number, Task>
end
--Tasks_TaskWrapper_ControlledTask
do
---A controlled task is a task that has start and/or stop conditions that will be used as a condition to start or stop the task. Start conditions are executed only once when the task is reached in the task queue. If the conditions are not met the task will be skipped. Stop Conditions are executed at a high rate Can be used with any task in DCS. Note that options and commands do *NOT* have stopConditions. These tasks are executed immediately and take "no time" to run.
---https://wiki.hoggitworld.com/view/DCS_task_controlledTask
---@class Tasks_TaskWrapper_ControlledTask
---@field id 'ControlledTask' string Identifier for the task type
---@field params table<string, any> Parameters for the controlled task
---@field task Task The task to be executed
---@field condition table<number, string|Tasks_TaskWrapper_ControlledTask.params> Table of start conditions required for the task to execute
---@field stopCondition table<number, string|Tasks_TaskWrapper_ControlledTask.params> Table of stop conditions that will end the task once met
--- Optional parameters for `params`
---@class Tasks_TaskWrapper_ControlledTask.params
---@field time? number Time in seconds since mission start for a start condition
---@field condition? string Lua code executed for start condition (requires `return true` to execute)
---@field userFlag? (string|number) User flag to check for start condition
---@field userFlagValue? boolean Required if checking if the flag is false
---@field probability? number Chance of the task executing (0-100, only checked once for start condition)
---@field lastWaypoint? number Last waypoint that, if reached, will stop the task
---@field duration? number Duration in seconds for which the task will run (stop condition)
end
--Tasks_TaskWrapper_WrappedAction
do
--- Tasking Type: Main task
--- For: Airplanes, Helicopters, Ships, Ground Vehicles
--- Available Under: All
--- Description: Functions as a wrapper for setting commands and options as a task within a mission, comboTask, or controlledTask. This task allows you to encapsulate commands and options within a single task structure.
--- https://wiki.hoggitworld.com/view/DCS_task_wrappedAction
---@class Tasks_TaskWrapper_WrappedAction
---@field id 'WrappedAction' The identifier for the task, should be 'WrappedAction'.
---@field params Tasks_TaskWrapper_WrappedAction.params_command Configuration parameters for the WrappedAction task.
---@class Tasks_TaskWrapper_WrappedAction.params_command
---@field action table<Task_Commands>
end
end
--Tasks
do
--Task_attackGroup
do
---For: Airplanes, Helicopters
---Available Under: CAS, CAP, Fighter Sweep, Intercept, SEAD, AntiShip
---Description: Assigns the controlled group to attack a specified group. The targeted group becomes automatically detected for the controlled group.
---https://wiki.hoggitworld.com/view/DCS_task_attackGroup
---@class Task_attackGroup
---@field id 'AttackGroup' The identifier for the task, should be 'AttackGroup'.
---@field params Task_Params_AttackGroup Configuration parameters for the AttackGroup task.
---@class Task_Params_AttackGroup
---@field groupId number The ID of the target group (required).
---@field weaponType? Weapon.flag The type of weapon to be used (optional).
---@field expend? AI.Task.WeaponExpend The weapon expend type (optional).
---@field directionEnabled? boolean If true, specifies direction; otherwise, false or nil (optional).
---@field direction? number The direction in degrees for the attack (optional).
---@field altitudeEnabled? boolean If true, specifies altitude; otherwise, false or nil (optional).
---@field altitude? number The altitude in meters for the attack (optional).
---@field attackQtyLimit? boolean If true, limits the number of attacks; otherwise, false or nil (optional).
---@field attackQty? number The number of attacks if attackQtyLimit is true (optional).
end
--Task_attackUnit
do
--- For: Airplanes, Helicopters
--- Description: Assigns the controlled group to attack a specified unit. The targeted unit becomes automatically detected for the controlled group.
---https://wiki.hoggitworld.com/view/DCS_task_attackUnit
---@class Task_attackUnit
---@field id 'AttackUnit' The identifier for the task, should be 'AttackUnit'.
---@field params Task_Params_AttackUnit Configuration parameters for the AttackUnit task.
---@class Task_Params_AttackUnit
---@field unitId number The ID of the target unit (required).
---@field weaponType? number The type of weapon to be used (optional).
---@field expend? AI.Task.WeaponExpend The weapon expend type, defining how much munitions the AI will expend per attack run (optional).
---@field direction? number The direction in degrees for the attack (optional).
---@field attackQtyLimit? boolean If true, limits the number of attacks; otherwise, false or nil (optional).
---@field attackQty? number The number of attacks if attackQtyLimit is true (optional).
---@field groupAttack? boolean If true, each aircraft in the group will attack the unit; otherwise, only a single aircraft will attack (optional).
end
--Task_Bombing
do
--- For: Airplanes, Helicopters
--- Description: Assigns a point on the ground for which the AI will attack. Best used for discriminant carpet bombing of a target or having a GBU hit a specific point on the map.
---https://wiki.hoggitworld.com/view/DCS_task_bombing
---@class Task_Bombing
---@field id 'Bombing' The identifier for the task, should be 'Bombing'.
---@field params Task_Params_Bombing Configuration parameters for the Bombing task.
---@class Task_Params_Bombing
---@field point vec2 The point on the ground to be attacked. Can also be specified as x and y values directly in the params table (required).
---@field weaponType? number The type of weapon to be used (optional).
---@field expend? AI.Task.WeaponExpend The weapon expend type, defining how much munitions the AI will expend per attack run (optional).
---@field attackQty? number The number of attacks if `attackQtyLimit` is true (optional).
---@field attackQtyLimit? boolean If true, limits the number of attacks; otherwise, false or nil (optional).
---@field direction? number The direction in degrees for the attack (optional).
---@field groupAttack? boolean If true, each aircraft in the group will attack the point; otherwise, only a single aircraft will attack (optional).
---@field altitude? number The altitude in meters at which to engage (optional).
---@field altitudeEnabled? boolean If true, specifies that the altitude check applies; otherwise, false or nil (optional).
---@field attackType? string The attack profile. Valid entries: "Dive" for dive bombing (optional).
end
--Task_Stafing
do
--- For: Airplanes, Helicopters
--- Description: Assigns a point on the ground for which the AI will do a strafing run with guns or rockets.
---https://wiki.hoggitworld.com/view/DCS_task_strafing
---@class Task_Stafing
---@field id 'Strafing' The identifier for the task, should be 'Strafing'.
---@field params Task_Params_Strafing Configuration parameters for the Strafing task.
---@class Task_Params_Strafing
---@field point vec2 The point on the ground to be strafed. Can also be specified as x and y values directly in the params table (required).
---@field weaponType? number The type of weapon to be used (optional).
---@field expend? AI.Task.WeaponExpend The weapon expend type, defining how much munitions the AI will expend per attack run (optional).
---@field attackQty? number The number of attacks if `attackQtyLimit` is true (optional).
---@field attackQtyLimit? boolean If true, limits the number of attacks; otherwise, false or nil (optional).
---@field direction? number The direction in degrees for the attack (optional).
---@field directionEnabled? boolean If true, specifies that direction is enabled for the attack; otherwise, false or nil (optional).
---@field groupAttack? boolean If true, each aircraft in the group will attack the point; otherwise, only a single aircraft will attack (optional).
---@field length? number The total length of the strafing target (optional).
end
--Task_Carpet_Bombing
do
--- Task: CarpetBombing
--- For: Airplanes
--- Available Under: Ground Attack
--- Description: Assigns a point on the ground for which the AI will attack. Similar to the bombing task, but with more control over the target area. Can be combined with the follow big formation task for all participating aircraft to simultaneously bomb a target. In the mission editor, this task is called "WW2 Carpet Bombing," but it is not limited to WW2 aircraft. Attack direction is assumed to be from the point where the task is assigned.
--- https://wiki.hoggitworld.com/view/DCS_task_carpetBombing
---@class Task_Carpet_Bombing
---@field id 'CarpetBombing' The identifier for the task, should be 'CarpetBombing'.
---@field params Task_Params_CarpetBombing Configuration parameters for the CarpetBombing task.
---@class Task_Params_CarpetBombing
---@field attackType string The type of attack to be performed. For this task, it should be 'Carpet' (required).
---@field carpetLength number The distance in meters the pattern should cover. This value will scale the time between each bomb drop (required).
---@field point vec2 The point on the ground to be bombed. Can also be specified as x and y values directly in the params table (required).
---@field weaponType? number The type of weapon to be used (optional).
---@field expend? AI.Task.WeaponExpend The weapon expend type, defining how much munitions the AI will expend per attack run (optional).
---@field attackQty? number The number of attacks if `attackQtyLimit` is true (optional).
---@field attackQtyLimit? boolean If true, limits the number of attacks; otherwise, false or nil (optional).
---@field groupAttack? boolean If true, each aircraft in the group will attack the point; otherwise, only a single aircraft will attack (optional).
---@field altitude? number The altitude in meters at which to engage (optional).
---@field altitudeEnabled? boolean If true, specifies that the altitude check applies; otherwise, false or nil (optional).
end
--Task_AttackMapObject
do
--- For: Airplanes, Helicopters
--- Available Under: Ground Attack, Pinpoint Strike, RunwayAttack
--- Description: Assigns the nearest world object to the point for AI to attack.
--- https://wiki.hoggitworld.com/view/DCS_task_attackMapObject
---@class Task_AttackMapObject
---@field id 'AttackMapObject' The identifier for the task, should be 'AttackMapObject'.
---@field params Task_Params_AttackMapObject Configuration parameters for the AttackMapObject task.
---@class Task_Params_AttackMapObject
---@field point vec2 The point on the ground where the nearest world object will be attacked (required).
---@field weaponType? number The type of weapon to be used (optional).
---@field expend? AI.Task.WeaponExpend The weapon expend type, defining how much munitions the AI will expend per attack run (optional).
---@field attackQty? number The number of attacks if `attackQtyLimit` is true (optional).
---@field attackQtyLimit? boolean If true, limits the number of attacks to `attackQty`; otherwise, false or nil (optional).
---@field direction? number The direction in degrees for the attack (optional).
---@field groupAttack? boolean If true, each aircraft in the group will attack the target; otherwise, only one aircraft will attack (optional).
end
--Task_BombingRunway
do
--- For: Airplanes, Helicopters
--- Available Under: Runway Attack
--- Description: Assigns the AI a task to bomb an airbase's runway. By default, the AI will line up along the length of the runway and drop its payload.
---https://wiki.hoggitworld.com/view/DCS_task_bombingRunway
---@class Task_BombingRunway
---@field id 'BombingRunway' The identifier for the task, should be 'BombingRunway'.
---@field params Task_Params_BombingRunway Configuration parameters for the BombingRunway task.
---@class Task_Params_BombingRunway
---@field runwayId number The index of the airbase runway to be bombed (required).
---@field weaponType? number The type of weapon to be used (optional).
---@field expend? AI.Task.WeaponExpend The weapon expend type, defining how much munitions the AI will expend per attack run (optional).
---@field attackQty? number The number of attacks if `attackQtyLimit` is true (optional).
---@field attackQtyLimit? boolean If true, limits the number of attacks to `attackQty`; otherwise, false or nil (optional).
---@field direction? number If provided, the AI will attack from this azimuth and ignore bombing along the length of the runway (optional).
---@field groupAttack? boolean If true, each aircraft in the group will attack the runway; otherwise, only one aircraft will attack (optional).
end
--Task_Orbit
do
--- For: Airplanes, Helicopters
--- Available Under: All aircraft tasks
--- Description: Orders an aircraft group to orbit at the waypoint.
---https://wiki.hoggitworld.com/view/DCS_task_orbit
---@class Task_Orbit
---@field id 'Orbit' The identifier for the task, should be 'Orbit'.
---@field params Task_Params_Orbit Configuration parameters for the Orbit task.
---@class Task_Params_Orbit
---@field pattern AI.Task.OrbitPattern The type of orbit pattern the AI will execute (required).
---@field point? vec2 The origin point for the orbit. If not defined, the position of the current waypoint will be used (optional).
---@field point2? vec2 The second point for a Race-Track orbit pattern. If not defined, the next waypoint position will be used (optional).
---@field speed? number The speed in meters per second at which the AI will orbit. If not defined, the AI will orbit at 1.5 times their stall speed (optional).
---@field altitude? number The altitude in meters at which the AI will orbit. If not defined, the altitude of the current waypoint will be used (optional).
end
--Task_Refueling
do
--- For: Airplanes
--- Available Under: Any aircraft type capable of refueling.
--- Description: Assigns the controlled aircraft to refuel from the nearest airborne tanker aircraft. Currently, helicopters can't refuel in mid-air, but this may change in the future.
---https://wiki.hoggitworld.com/view/DCS_task_refueling
---@class Task_Refueling
---@field id 'Refueling' The identifier for the task, should be 'Refueling'.
---@field params table Configuration parameters for the Refueling task (empty table, as no parameters are required or optional).
end
--Task_land
do
--- For: Helicopters
--- Description: Assigns the aircraft to land at a specific point on the ground. Useful for troop transport with helicopters. Currently only applies to Helicopters. For landing at airbases, FARPs, or ships, see the mission task page.
---https://wiki.hoggitworld.com/view/DCS_task_land
---@class Task_land
---@field id 'Land' The identifier for the task, should be 'Land'.
---@field params Task_Params_Land Configuration parameters for the Land task.
---@class Task_Params_Land
---@field point vec2 The point on the ground where the AI will attempt to land (required).
---@field durationFlag? boolean If true, the AI will remain on the ground for a limited period (optional).
---@field duration? number The duration in seconds that the AI will be landed before taking off. `durationFlag` must be true for this to apply (optional).
end
--Task_follow
do
--- Available Under: All air tasks
--- Description: Controlled aircraft will follow the assigned group along their route in formation. If the assigned group is on the ground, the AI will orbit overhead. If assigned to a flight lead or group, its wingmen will stay in their specified formation.
---https://wiki.hoggitworld.com/view/DCS_task_follow
---@class Task_follow
---@field id 'Follow' The identifier for the task, should be 'Follow'.
---@field params Task_Params_Follow Configuration parameters for the Follow task.
---@class Task_Params_Follow
---@field groupId number The unique groupId of the group to be followed (required).
---@field pos vec3 The relative position (in 3D space) that the controlled flight will form up on (required).
---@field lastWptIndexFlag? boolean If true (default: true), the AI will follow the group until it reaches a specified waypoint (optional).
---@field lastWptIndex? number The waypoint index at which the following group will stop its task (default: -1). Must be set if `lastWptIndexFlag` is set to false; otherwise, the AI will immediately abandon the task (optional).
end
--Task_followBigFormation
do
--- For: Airplanes
--- Available Under: Ground Attack
--- Description: Advanced version of the follow task. It is primarily used with the Carpet Bombing task to allow large bomber formations to simultaneously bomb a given target. In the mission editor, this task also provides tools for placing units in historic bomber formations. This task is labeled as "WW2: Big Formation" in the editor but is functional with any aircraft assigned the ground attack task.
---https://wiki.hoggitworld.com/view/DCS_task_followBigFormation
---@class Task_followBigFormation
---@field id 'FollowBigFormation' The identifier for the task, should be 'FollowBigFormation'.
---@field params Task_Params_FollowBigFormation Configuration parameters for the Follow Big Formation task.
---@class Task_Params_FollowBigFormation
---@field groupId number The unique groupId of the group to be followed (required).
---@field pos vec3 The relative position (in 3D space) that the controlled flight will form up on (required).
---@field lastWptIndexFlag? boolean If true, the AI will follow the group until it reaches a specified waypoint (optional).
---@field lastWptIndex? number The waypoint index at which the following group will stop its task. Must be set if `lastWptIndexFlag` is set to false; otherwise, the AI will immediately abandon the task (optional).
end
--Task_Escord
do
--- For: Airplanes, Helicopters
--- Available Under: Escort, SEAD
--- Description: The controlled aircraft will follow the assigned group along their route in formation and engage threats within a defined distance from the followed group. If the assigned group is on the ground, the AI will orbit overhead. If assigned to a flight lead or group, its wingmen will stay in their specified formation.
---https://wiki.hoggitworld.com/view/DCS_task_escort
---@class Task_Escord
---@field id 'Escort' The identifier for the task, should be 'Escort'.
---@field params Task_Params_Escort Configuration parameters for the Escort task.
---@class Task_Params_Escort
---@field groupId number The unique groupId of the group to be escorted (required).
---@field pos vec3 The relative position (in 3D space) that the controlled flight will form up on (required).
---@field engagementDistMax number The maximum distance within which the AI will engage threats from the escorted group (required).
---@field targetTypes table<Attributes> An array of object attributes that the AI will engage (required).
---@field lastWptIndexFlag? boolean If true, the AI will follow the group until it reaches a specified waypoint (optional, default is true).
---@field lastWptIndex? number The waypoint index at which the following group will stop its task. Must be set if lastWptIndexFlag is set to false (optional, default is -1).
end
--Task_Embarking
do
--- For: Helicopters, Ground Vehicles
--- Available Under: Transport
--- Description: Used in conjunction with the EmbarkToTransport task for a ground infantry group, the controlled helicopter flight will land at the specified coordinates, pick up boarding troops, and transport them to that group's DisembarkFromTransport task.
---https://wiki.hoggitworld.com/view/DCS_task_embarking
---@class Task_Embarking
---@field id 'Embarking' The identifier for the task, should be 'Embarking'.
---@field params Task_Params_Embarking Configuration parameters for the Embarking task.
---@class Task_Params_Embarking
---@field x number The x coordinate of the landing point (required).
---@field y number The y coordinate of the landing point (required).
---@field groupsForEmbarking table<number, number> An array of group IDs for the infantry groups set to board the helicopter flight (required).
---@field duration? number Defines the maximum time (in seconds) the helicopter flight will wait for troops to begin the boarding process (optional).
---@field distributionFlag? boolean If true, defines that specific groups need to get into specific helicopters (optional).
---@field distribution? table An array identifying the groups that need to board specific helicopters (optional).
end
--Task_FireAtPoint
do
--- Available Under: Ground Nothing, Ship Nothing (default and unseen tasks for vehicles and ships)
--- Description: Assigns a point on the ground for AI to shoot at. Commonly used with artillery to shell a target. Can also simulate a firefight by making AI shoot in the general direction of other AI but with low accuracy. This is useful for causing AI to expend their ammunition.
--- Note: It takes approximately 3 minutes for artillery positions to prepare and fire at the specified target.
---https://wiki.hoggitworld.com/view/DCS_task_fireAtPoint
---@class Task_FireAtPoint
---@field id 'FireAtPoint' The identifier for the task, should be 'FireAtPoint'.
---@field params Task_Params_FireAtPoint Configuration parameters for the FireAtPoint task.
---@class Task_Params_FireAtPoint
---@field x number The vec2 coordinate or x and y values defining where the AI will aim (required).
---@field y number The vec2 coordinate or x and y values defining where the AI will aim (required).
---@field templateId string unkown
---@field zoneRadius? number Optional radius in meters defining the area AI will attempt to hit.
---@field expendQty? number Specifies the number of shots to be fired (optional).
---@field expendQtyEnabled? boolean If true, the `expendQty` value will be used (optional).
---@field weaponType? Weapon.flag Specifies the weapon type to be used for the task (optional).
---@field altitude? number Specifies the altitude at which the AI will aim (optional).
---@field alt_type? number Determines whether the altitude is defined by AGL (1) or MSL (0) (optional).
---@field counterbattaryRadius? number For ground groups only: Specifies the radius in meters from the group leader within which the group will move in random directions after completing the FireAtPoint task (optional).
end
--Task_Hold
do
--- For: Ground vehicles
--- Available Under: Ground Nothing (default and unseen tasks for vehicles)
--- Description: Stops a ground force in its current position.
---https://wiki.hoggitworld.com/view/DCS_task_hold
---@class Task_Hold
---@field id 'Hold' The identifier for the task, should be 'Hold'.
---@field params table Configuration parameters for the Hold task. (empty)
end
--Task_FAC_AttackGroup
do
--- For: Airplanes, Helicopters, Ground Vehicles
--- Available Under: AFAC, Ground Nothing
--- Description: Assigns the controlled group to act as a Forward Air Controller or JTAC in attacking the specified group. This task adds the group to the JTAC radio menu and interacts with a player to destroy the target.
---https://wiki.hoggitworld.com/view/DCS_task_fac_AttackGroup
---@class Task_FAC_AttackGroup
---@field id 'FAC_AttackGroup' The identifier for the task, should be 'FAC_AttackGroup'.
---@field params Task_Params_FAC_AttackGroup Configuration parameters for the FAC_AttackGroup task.
---@class Task_Params_FAC_AttackGroup
---@field groupId number The ID of the group to be assigned by the JTAC. (Required)
---@field weaponType? Weapon.flag The weapon type enumerator that defines the preferred weapon of choice. (Optional)
---@field designation? AI.Task.Designation Enumerator defining the preferred designation to be used. (Optional)
---@field datalink? boolean Boolean value to determine if the JTAC will send the 9-line via SADL. Defaults to true. (Optional)
---@field frequency? number The frequency for JTAC communication. (Optional)
---@field modulation? radio.modulation Enumerator defining the modulation type for radio communication. (Optional)
---@field callname? number The callsign ID for the JTAC. (Optional)
---@field number? number The callsign number for the JTAC. (Optional)
end
--Task_EmbarkToTransport
do
--- For: Ground Units (Infantry Only)
--- Available Under: Infantry
--- Description: Used in conjunction with the embarking task for a transport helicopter group. The ground units will move to the specified location and wait to be picked up by a helicopter. The helicopter will then fly them to their dropoff point defined by another task for the ground forces; DisembarkFromTransport task.
--- https://wiki.hoggitworld.com/view/DCS_task_embarkToTransport
---@class Task_EmbarkToTransport
---@field id 'EmbarkToTransport' The identifier for the task, should be 'EmbarkToTransport'.
---@field params Task_Params_EmbarkToTransport Configuration parameters for the EmbarkToTransport task.
---@class Task_Params_EmbarkToTransport