-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScenarioFramework.code-snippets
1361 lines (1361 loc) · 46.1 KB
/
ScenarioFramework.code-snippets
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
{
"EndGameWaitThread": {
"prefix": [
"EndGameWaitThread"
],
"body": [
"ScenarioFramework.EndGameWaitThread(${1:callback})"
],
"description": ""
},
"GenerateOffMapAreas": {
"prefix": [
"GenerateOffMapAreas"
],
"body": [
"ScenarioFramework.GenerateOffMapAreas()"
],
"description": "Below is for anti-off mapping function"
},
"CreateUnitPercentageBuiltTrigger": {
"prefix": [
"CreateUnitPercentageBuiltTrigger"
],
"body": [
"ScenarioFramework.CreateUnitPercentageBuiltTrigger(${1:callbackFunction}, ${2:aiBrain}, ${3:category}, ${4:percent})"
],
"description": ""
},
"SetCybranEvilColor": {
"prefix": [
"SetCybranEvilColor"
],
"body": [
"ScenarioFramework.SetCybranEvilColor(${1:number})"
],
"description": ""
},
"PlayUnlockDialogue": {
"prefix": [
"PlayUnlockDialogue"
],
"body": [
"ScenarioFramework.PlayUnlockDialogue()"
],
"description": ""
},
"MidOperationCamera": {
"prefix": [
"MidOperationCamera"
],
"body": [
"ScenarioFramework.MidOperationCamera(${1:unit}, ${2:track}, ${3:time})"
],
"description": ""
},
"GetFactories": {
"prefix": [
"GetFactories"
],
"body": [
"ScenarioFramework.GetFactories(${1:brain}, ${2:point}, ${3:radius})"
],
"description": "Returns lists of factories by category\r\n<point> and <radius> are optional\r\nthis allows you to know which factories can build and which can't\r\nuseful if you want to track what factories can do what"
},
"UnflagUnkillable": {
"prefix": [
"UnflagUnkillable"
],
"body": [
"ScenarioFramework.UnflagUnkillable(${1:armyNumber})"
],
"description": ""
},
"PlayDialogue": {
"prefix": [
"PlayDialogue"
],
"body": [
"ScenarioFramework.PlayDialogue()"
],
"description": "The actual thread used by Dialogue"
},
"SetAeonEvilColor": {
"prefix": [
"SetAeonEvilColor"
],
"body": [
"ScenarioFramework.SetAeonEvilColor(${1:number})"
],
"description": ""
},
"CreateUnitVeterancyTrigger": {
"prefix": [
"CreateUnitVeterancyTrigger"
],
"body": [
"ScenarioFramework.CreateUnitVeterancyTrigger(${1:cb}, ${2:unit})"
],
"description": "Single line unit veterancy trigger creation\r\nWhen <unit> achieves veterancy, <cb> is called with parameters of the unit then level achieved"
},
"CreateEnhancements": {
"prefix": [
"CreateEnhancements"
],
"body": [
"ScenarioFramework.CreateEnhancements(${1:unit}, ${2:enhancements}, ${3:delay})"
],
"description": ""
},
"AMPlatoonCounter": {
"prefix": [
"AMPlatoonCounter"
],
"body": [
"ScenarioFramework.AMPlatoonCounter(${1:aiBrain}, ${2:name})"
],
"description": ""
},
"PlatoonMoveRoute": {
"prefix": [
"PlatoonMoveRoute"
],
"body": [
"ScenarioFramework.PlatoonMoveRoute(${1:platoon}, ${2:route}, ${3:squad})"
],
"description": "tells platoon to move along table of coordinates"
},
"MissionNISCameraThread": {
"prefix": [
"MissionNISCameraThread"
],
"body": [
"ScenarioFramework.MissionNISCameraThread(${1:unit}, ${2:blendtime}, ${3:holdtime}, ${4:orientationoffset}, ${5:positionoffset}, ${6:zoomval})"
],
"description": ""
},
"GateInEffect": {
"prefix": [
"GateInEffect"
],
"body": [
"ScenarioFramework.GateInEffect(${1:unit}, ${2:effect}, ${3:bonesToHide})"
],
"description": ""
},
"FlagUnkillableSelect": {
"prefix": [
"FlagUnkillableSelect"
],
"body": [
"ScenarioFramework.FlagUnkillableSelect(${1:armyNumber}, ${2:units})"
],
"description": ""
},
"FakeGateInUnit": {
"prefix": [
"FakeGateInUnit"
],
"body": [
"ScenarioFramework.FakeGateInUnit(${1:unit}, ${2:callbackFunction}, ${3:bonesToHide})"
],
"description": ""
},
"OverrideKilled": {
"prefix": [
"OverrideKilled"
],
"body": [
"ScenarioFramework.OverrideKilled(${1:self}, ${2:instigator}, ${3:type}, ${4:overkillRatio})"
],
"description": ""
},
"CreatePlatoonDeathTrigger": {
"prefix": [
"CreatePlatoonDeathTrigger"
],
"body": [
"ScenarioFramework.CreatePlatoonDeathTrigger(${1:cb}, ${2:platoon})"
],
"description": "Single line Platoon Death Trigger creation\r\nWhen all units in <platoon> are destroyed, <cb> function will be called"
},
"OnPostLoad": {
"prefix": [
"OnPostLoad"
],
"body": [
"ScenarioFramework.OnPostLoad()"
],
"description": ""
},
"CreateUnitStopReclaimTrigger": {
"prefix": [
"CreateUnitStopReclaimTrigger"
],
"body": [
"ScenarioFramework.CreateUnitStopReclaimTrigger(${1:cb}, ${2:unit})"
],
"description": "Single line unit finished reclaiming trigger creation\r\nWhen <unit> finishes reclaiming the <cb> function provided is called"
},
"EndOperation": {
"prefix": [
"EndOperation"
],
"body": [
"ScenarioFramework.EndOperation(${1:success}, ${2:allPrimary}, ${3:allSecondary}, ${4:allBonus})"
],
"description": "Call to end an operation\r\nbool _success - instructs UI which dialog to show\r\nbool _allPrimary - true if all primary objectives completed, otherwise, false\r\nbool _allSecondary - true if all secondary objectives completed, otherwise, false\r\nbool _allBonus - true if all bonus objectives completed, otherwise, false"
},
"SetCybranColor": {
"prefix": [
"SetCybranColor"
],
"body": [
"ScenarioFramework.SetCybranColor(${1:number})"
],
"description": "Cybran"
},
"SetNeutralColor": {
"prefix": [
"SetNeutralColor"
],
"body": [
"ScenarioFramework.SetNeutralColor(${1:number})"
],
"description": "Neutral"
},
"SetCybranAllyColor": {
"prefix": [
"SetCybranAllyColor"
],
"body": [
"ScenarioFramework.SetCybranAllyColor(${1:number})"
],
"description": ""
},
"PlatoonPatrolRoute": {
"prefix": [
"PlatoonPatrolRoute"
],
"body": [
"ScenarioFramework.PlatoonPatrolRoute(${1:platoon}, ${2:route}, ${3:squad})"
],
"description": "commands platoon to patrol a route"
},
"SetAeonAllyColor": {
"prefix": [
"SetAeonAllyColor"
],
"body": [
"ScenarioFramework.SetAeonAllyColor(${1:number})"
],
"description": ""
},
"PlatoonAttackChain": {
"prefix": [
"PlatoonAttackChain"
],
"body": [
"ScenarioFramework.PlatoonAttackChain(${1:platoon}, ${2:chain}, ${3:squad})"
],
"description": "Orders a platoon to attack move through a chain"
},
"SetAeonColor": {
"prefix": [
"SetAeonColor"
],
"body": [
"ScenarioFramework.SetAeonColor(${1:number})"
],
"description": "Sets an army color to a factional, or factional-ally, color given by art\r\nAeon"
},
"IAmABadUnit": {
"prefix": [
"IAmABadUnit"
],
"body": [
"ScenarioFramework.IAmABadUnit(${1:self})"
],
"description": ""
},
"NumCatUnitsInArea": {
"prefix": [
"NumCatUnitsInArea"
],
"body": [
"ScenarioFramework.NumCatUnitsInArea(${1:cat}, ${2:area}, ${3:brain})"
],
"description": "Returns the number of <cat> units in <area> belonging to <brain>"
},
"CreateUnitStopBeingCapturedTrigger": {
"prefix": [
"CreateUnitStopBeingCapturedTrigger"
],
"body": [
"ScenarioFramework.CreateUnitStopBeingCapturedTrigger(${1:cb}, ${2:unit})"
],
"description": "Single line unit stop being captured trigger\r\nwhen <unit> stops being captured, the function is called"
},
"GroupProgressTimer": {
"prefix": [
"GroupProgressTimer"
],
"body": [
"ScenarioFramework.GroupProgressTimer(${1:group}, ${2:time})"
],
"description": ""
},
"GroupDeathCheck": {
"prefix": [
"GroupDeathCheck"
],
"body": [
"ScenarioFramework.GroupDeathCheck(${1:group})"
],
"description": "Returns true if all units in group are dead"
},
"GetCatUnitsInArea": {
"prefix": [
"GetCatUnitsInArea"
],
"body": [
"ScenarioFramework.GetCatUnitsInArea(${1:cat}, ${2:area}, ${3:brain})"
],
"description": "Returns the units in <area> of <cat> belonging to <brain>"
},
"FlushDialogueQueue": {
"prefix": [
"FlushDialogueQueue"
],
"body": [
"ScenarioFramework.FlushDialogueQueue()"
],
"description": ""
},
"PlayEndGameMovie": {
"prefix": [
"PlayEndGameMovie"
],
"body": [
"ScenarioFramework.PlayEndGameMovie(${1:faction}, ${2:callback})"
],
"description": ""
},
"HelpPrompt": {
"prefix": [
"HelpPrompt"
],
"body": [
"ScenarioFramework.HelpPrompt(${1:show})"
],
"description": "Triggers a help text prompt to appear in the UI\r\nSee /modules/ui/help/helpstrings.lua for a list of valid Help Prompt IDs"
},
"CreateVisibleArea": {
"prefix": [
"CreateVisibleArea"
],
"body": [
"ScenarioFramework.CreateVisibleArea(${1:vizRadius}, ${2:vizX}, ${3:vizZ}, ${4:vizLifetime}, ${5:vizArmy})"
],
"description": "Similar to the above function except it takes in an {X, Z} location rather\r\nThan an {X, Y, Z} position"
},
"PlayNIS": {
"prefix": [
"PlayNIS"
],
"body": [
"ScenarioFramework.PlayNIS(${1:pathToMovie})"
],
"description": "Play an NIS"
},
"GroupFormPatrolChain": {
"prefix": [
"GroupFormPatrolChain"
],
"body": [
"ScenarioFramework.GroupFormPatrolChain(${1:group}, ${2:chain}, ${3:formation})"
],
"description": "orders group to patrol a route in formation"
},
"CreateThreatTriggerAroundPosition": {
"prefix": [
"CreateThreatTriggerAroundPosition"
],
"body": [
"ScenarioFramework.CreateThreatTriggerAroundPosition(${1:callbackFunction}, ${2:aiBrain}, ${3:posVector}, ${4:rings}, ${5:onceOnly}, ${6:value}, ${7:greater})"
],
"description": "Fires when the threat level of <position> of size <rings> is related to <value>\r\nif <greater> is true it will fire if the threat is greater than <value>"
},
"CreateArmyUnitCategoryVeterancyTrigger": {
"prefix": [
"CreateArmyUnitCategoryVeterancyTrigger"
],
"body": [
"ScenarioFramework.CreateArmyUnitCategoryVeterancyTrigger(${1:callbackFunction}, ${2:aiBrain}, ${3:category}, ${4:level})"
],
"description": ""
},
"WaitForDialogue": {
"prefix": [
"WaitForDialogue"
],
"body": [
"ScenarioFramework.WaitForDialogue(${1:name})"
],
"description": ""
},
"OperationNISCamera": {
"prefix": [
"OperationNISCamera"
],
"body": [
"ScenarioFramework.OperationNISCamera(${1:unit}, ${2:camInfo})"
],
"description": "NIS Garbage"
},
"Dialogue": {
"prefix": [
"Dialogue"
],
"body": [
"ScenarioFramework.Dialogue(${1:dialogueTable}, ${2:callback}, ${3:critical}, ${4:speaker})"
],
"description": "dialogueTable format\r\nit's a table of 4 variables - vid, cue, text, and duration\r\nex. Hello = {\r\n{vid=video, cue=false, bank=false, text='Hello World', duration = 5 },\r\n}\r\nbank = audio bank\r\ncue = audio cue\r\nvid = video cue\r\ntext: text to be displayed on the screen\r\ndelay: time before begin next dialogue in table in second"
},
"PauseUnitDeath": {
"prefix": [
"PauseUnitDeath"
],
"body": [
"ScenarioFramework.PauseUnitDeath(${1:unit})"
],
"description": ""
},
"CreateVisibleAreaLocation": {
"prefix": [
"CreateVisibleAreaLocation"
],
"body": [
"ScenarioFramework.CreateVisibleAreaLocation(${1:vizRadius}, ${2:vizLocation}, ${3:vizLifetime}, ${4:vizArmy})"
],
"description": "Creates a visible area for <vizArmy> at <vizLocation> of <vizRadius> size.\r\nIf vizLifetime is 0, the entity lasts forever. Otherwise for <vizLifetime> seconds.\r\nFunction returns an entity so you can destroy it later if you want"
},
"SetAeonAlly2Color": {
"prefix": [
"SetAeonAlly2Color"
],
"body": [
"ScenarioFramework.SetAeonAlly2Color(${1:number})"
],
"description": ""
},
"SetUEFAlly1Color": {
"prefix": [
"SetUEFAlly1Color"
],
"body": [
"ScenarioFramework.SetUEFAlly1Color(${1:number})"
],
"description": ""
},
"UnitsInAreaCheck": {
"prefix": [
"UnitsInAreaCheck"
],
"body": [
"ScenarioFramework.UnitsInAreaCheck(${1:Cat}, ${2:Rectangle})"
],
"description": "Checks if units of Cat are within the provided rectangle\r\nChecks the <Rectangle> to see if any units of <Cat> category are in it"
},
"SetUEFAlly2Color": {
"prefix": [
"SetUEFAlly2Color"
],
"body": [
"ScenarioFramework.SetUEFAlly2Color(${1:number})"
],
"description": ""
},
"ClearIntel": {
"prefix": [
"ClearIntel"
],
"body": [
"ScenarioFramework.ClearIntel(${1:position}, ${2:radius})"
],
"description": ""
},
"IsHumanUnit": {
"prefix": [
"IsHumanUnit"
],
"body": [
"ScenarioFramework.IsHumanUnit(${1:self})"
],
"description": ""
},
"GroupMoveChain": {
"prefix": [
"GroupMoveChain"
],
"body": [
"ScenarioFramework.GroupMoveChain(${1:group}, ${2:chain})"
],
"description": ""
},
"GroupProgressTimerThread": {
"prefix": [
"GroupProgressTimerThread"
],
"body": [
"ScenarioFramework.GroupProgressTimerThread(${1:group}, ${2:time})"
],
"description": ""
},
"SetAeonAlly1Color": {
"prefix": [
"SetAeonAlly1Color"
],
"body": [
"ScenarioFramework.SetAeonAlly1Color(${1:number})"
],
"description": ""
},
"EndOperationCameraLocation": {
"prefix": [
"EndOperationCameraLocation"
],
"body": [
"ScenarioFramework.EndOperationCameraLocation(${1:location})"
],
"description": ""
},
"EndOperationSafety": {
"prefix": [
"EndOperationSafety"
],
"body": [
"ScenarioFramework.EndOperationSafety(${1:units})"
],
"description": ""
},
"ResetUITimer": {
"prefix": [
"ResetUITimer"
],
"body": [
"ScenarioFramework.ResetUITimer()"
],
"description": ""
},
"AddObjective": {
"prefix": [
"AddObjective"
],
"body": [
"ScenarioFramework.AddObjective(${1:Type}, ${2:Complete}, ${3:Title}, ${4:Description}, ${5:Image}, ${6:Progress}, ${7:Target})"
],
"description": "TODO: Stop mission scripts from using this function, then remove it."
},
"ExitGame": {
"prefix": [
"ExitGame"
],
"body": [
"ScenarioFramework.ExitGame()"
],
"description": "Cause the game to exit immediately"
},
"CreateUnitDeathTrigger": {
"prefix": [
"CreateUnitDeathTrigger"
],
"body": [
"ScenarioFramework.CreateUnitDeathTrigger(${1:cb}, ${2:unit}, ${3:camera})"
],
"description": "Single Line unit death trigger creation\r\nWhen <unit> dies it will call the <cb> function provided"
},
"CreateUnitReclaimedTrigger": {
"prefix": [
"CreateUnitReclaimedTrigger"
],
"body": [
"ScenarioFramework.CreateUnitReclaimedTrigger(${1:cb}, ${2:unit})"
],
"description": "Single line unit has been reclaimed trigger creation\r\nWhen <unit> has been reclaimed the <cb> function provided is called"
},
"EndOperationT": {
"prefix": [
"EndOperationT"
],
"body": [
"ScenarioFramework.EndOperationT(${1:opData})"
],
"description": "Call to end an operation where the data is already provided in table form (just a wrapper for sync"
},
"PlayTaunt": {
"prefix": [
"PlayTaunt"
],
"body": [
"ScenarioFramework.PlayTaunt(${1:head}, ${2:taunt})"
],
"description": "Given a head and taunt number, tells the UI to play the relating taunt"
},
"CreateUnitStopCaptureTrigger": {
"prefix": [
"CreateUnitStopCaptureTrigger"
],
"body": [
"ScenarioFramework.CreateUnitStopCaptureTrigger(${1:cb}, ${2:unit})"
],
"description": "Single line unit finished capturing trigger creation\r\nWhen <unit> finishes capturing the <cb> function provided is called"
},
"IAmOffMap": {
"prefix": [
"IAmOffMap"
],
"body": [
"ScenarioFramework.IAmOffMap(${1:self})"
],
"description": "This is for bad units who choose to go off map, shame on them"
},
"PlatoonPatrolChain": {
"prefix": [
"PlatoonPatrolChain"
],
"body": [
"ScenarioFramework.PlatoonPatrolChain(${1:platoon}, ${2:chain}, ${3:squad})"
],
"description": "orders a platoon to patrol all the points in a chain"
},
"GetRandomEntry": {
"prefix": [
"GetRandomEntry"
],
"body": [
"ScenarioFramework.GetRandomEntry(${1:tableOfData})"
],
"description": "Returns a random entry from a table.\r\nex: takeoff_Spot = ScenarioFramework.GetRandomEntry(ScenarioUtils.ChainToPositions('Offscreen_Launch_Points'))"
},
"UnlockAndKillUnitThread": {
"prefix": [
"UnlockAndKillUnitThread"
],
"body": [
"ScenarioFramework.UnlockAndKillUnitThread(${1:self}, ${2:instigator}, ${3:damageType}, ${4:excessDamageRatio})"
],
"description": ""
},
"CreateUnitGivenTrigger": {
"prefix": [
"CreateUnitGivenTrigger"
],
"body": [
"ScenarioFramework.CreateUnitGivenTrigger(${1:cb}, ${2:unit})"
],
"description": "Single Line unit given trigger creation\r\nWhen <unit> is given it will call the <cb> function provided"
},
"MissionNISCamera": {
"prefix": [
"MissionNISCamera"
],
"body": [
"ScenarioFramework.MissionNISCamera(${1:unit}, ${2:blendtime}, ${3:holdtime}, ${4:orientationoffset}, ${5:positionoffset}, ${6:zoomval})"
],
"description": "For mid-operation NISs"
},
"GetTimeIAmAllowedToBeOffMap": {
"prefix": [
"GetTimeIAmAllowedToBeOffMap"
],
"body": [
"ScenarioFramework.GetTimeIAmAllowedToBeOffMap(${1:self})"
],
"description": ""
},
"SetCybranPlayerColor": {
"prefix": [
"SetCybranPlayerColor"
],
"body": [
"ScenarioFramework.SetCybranPlayerColor(${1:number})"
],
"description": "Cybran"
},
"SetAeonPlayerColor": {
"prefix": [
"SetAeonPlayerColor"
],
"body": [
"ScenarioFramework.SetAeonPlayerColor(${1:number})"
],
"description": "SC:FA colors\r\nAeon"
},
"OnFactionSelect": {
"prefix": [
"OnFactionSelect"
],
"body": [
"ScenarioFramework.OnFactionSelect(${1:data})"
],
"description": "Hook for player requested faction\r\n\"data\" is a table containing field \"Faction\" which can be \"cybran\", \"uef\", or \"aeon\""
},
"CreateArmyStatTrigger": {
"prefix": [
"CreateArmyStatTrigger"
],
"body": [
"ScenarioFramework.CreateArmyStatTrigger(${1:callbackFunction}, ${2:aiBrain}, ${3:name}, ${4:triggerTable})"
],
"description": "Stat trigger creation\r\ntriggerTable spec\r\n{\r\n{StatType = string, -- Examples: Units_Active, Units_Killed, Enemies_Killed, Economy_Trend_Mass, Economy_TotalConsumed_Energy\r\nCompareType = string, -- GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual\r\nValue = integer,\r\nCategory = category, -- Only used with \"Units\" triggers\r\n},\r\n}\r\nCOMPLETE LIST OF STAT TYPES\r\n\"Units_Active\",\r\n\"Units_Killed\",\r\n\"Units_History\",\r\n\"Enemies_Killed\",\r\n\"Economy_TotalProduced_Energy\",\r\n\"Economy_TotalConsumed_Energy\",\r\n\"Economy_Income_Energy\",\r\n\"Economy_Output_Energy\",\r\n\"Economy_Stored_Energy\",\r\n\"Economy_Reclaimed_Energy\",\r\n\"Economy_MaxStorage_Energy\",\r\n\"Economy_PeakStorage_Energy\",\r\n\"Economy_TotalProduced_Mass\",\r\n\"Economy_TotalConsumed_Mass\",\r\n\"Economy_Income_Mass\",\r\n\"Economy_Output_Mass\",\r\n\"Economy_Stored_Mass\",\r\n\"Economy_Reclaimed_Mass\",\r\n\"Economy_MaxStorage_Mass\",\r\n\"Economy_PeakStorage_Mass\","
},
"OverrideDoDamage": {
"prefix": [
"OverrideDoDamage"
],
"body": [
"ScenarioFramework.OverrideDoDamage(${1:self}, ${2:instigator}, ${3:amount}, ${4:vector}, ${5:damageType})"
],
"description": ""
},
"AntiOffMapMainThread": {
"prefix": [
"AntiOffMapMainThread"
],
"body": [
"ScenarioFramework.AntiOffMapMainThread()"
],
"description": ""
},
"CreateUnitBuiltTrigger": {
"prefix": [
"CreateUnitBuiltTrigger"
],
"body": [
"ScenarioFramework.CreateUnitBuiltTrigger(${1:cb}, ${2:unit}, ${3:category})"
],
"description": "Single Line Unit built trigger\r\nTests when <unit> builds a unit of type <category> calls <cb>"
},
"PlayVoiceOver": {
"prefix": [
"PlayVoiceOver"
],
"body": [
"ScenarioFramework.PlayVoiceOver(${1:voSound})"
],
"description": "Plays an XACT sound if needed - currently all VOs are videos"
},
"CDRDeathNISCamera": {
"prefix": [
"CDRDeathNISCamera"
],
"body": [
"ScenarioFramework.CDRDeathNISCamera(${1:unit}, ${2:hold})"
],
"description": "CDR Death (pass hold only if it's a mid-operation death)"
},
"SetUEFNeutralColor": {
"prefix": [
"SetUEFNeutralColor"
],
"body": [
"ScenarioFramework.SetUEFNeutralColor(${1:number})"
],
"description": ""
},
"SetAeonNeutralColor": {
"prefix": [
"SetAeonNeutralColor"
],
"body": [
"ScenarioFramework.SetAeonNeutralColor(${1:number})"
],
"description": ""
},
"CreateThreatTriggerAroundUnit": {
"prefix": [
"CreateThreatTriggerAroundUnit"
],
"body": [
"ScenarioFramework.CreateThreatTriggerAroundUnit(${1:callbackFunction}, ${2:aiBrain}, ${3:unit}, ${4:rings}, ${5:onceOnly}, ${6:value}, ${7:greater})"
],
"description": "Fires when the threat level of <unit> of size <rings> is related to <value>"
},
"AddTransmissionData": {
"prefix": [
"AddTransmissionData"
],
"body": [
"ScenarioFramework.AddTransmissionData(${1:entryData})"
],
"description": ""
},
"IgnoreRestrictions": {
"prefix": [
"IgnoreRestrictions"
],
"body": [
"ScenarioFramework.IgnoreRestrictions(${1:isIgnored})"
],
"description": "Toggles whether or not to ignore all restrictions\r\nthis function is useful when trying to transfer restricted units between armies\r\ne.g.\r\nScenarioFramework.IgnoreRestrictions(true)\r\nScenarioFramework.GiveUnitToArmy(unit, armyIndex)\r\nScenarioFramework.IgnoreRestrictions(false)"
},
"SetupMFDSync": {
"prefix": [
"SetupMFDSync"
],
"body": [
"ScenarioFramework.SetupMFDSync(${1:movieTable}, ${2:text})"
],
"description": "This function sends movie data to the sync table and saves it off for reloading in save games"
},
"CreateUnitStartReclaimTrigger": {
"prefix": [
"CreateUnitStartReclaimTrigger"
],
"body": [
"ScenarioFramework.CreateUnitStartReclaimTrigger(${1:cb}, ${2:unit})"
],
"description": "Single line unit started reclaiming trigger creation\r\nWhen <unit> starts reclaiming the <cb> function provided is called"
},
"GiveUnitToArmy": {
"prefix": [
"GiveUnitToArmy"
],
"body": [
"ScenarioFramework.GiveUnitToArmy(${1:unit}, ${2:newArmyIndex}, ${3:triggerOnGiven})"
],
"description": ""
},
"FlagUnkillable": {
"prefix": [
"FlagUnkillable"
],
"body": [
"ScenarioFramework.FlagUnkillable(${1:armyNumber}, ${2:exceptions})"
],
"description": ""
},
"KillBaseInArea": {
"prefix": [
"KillBaseInArea"
],
"body": [
"ScenarioFramework.KillBaseInArea(${1:brain}, ${2:area}, ${3:category})"
],
"description": ""
},
"SetCybranNeutralColor": {
"prefix": [
"SetCybranNeutralColor"
],
"body": [
"ScenarioFramework.SetCybranNeutralColor(${1:number})"
],
"description": ""
},
"RestrictEnhancements": {
"prefix": [
"RestrictEnhancements"
],
"body": [
"ScenarioFramework.RestrictEnhancements(${1:table})"
],
"description": "Set enhancement restrictions\r\nSupply a table of the names of enhancements you do not want the player to build\r\nExample: {\"Teleport\", \"ResourceAllocation\"}"
},
"CreateGroupDeathTrigger": {
"prefix": [
"CreateGroupDeathTrigger"
],
"body": [
"ScenarioFramework.CreateGroupDeathTrigger(${1:cb}, ${2:group})"
],
"description": "Single line Group Death Trigger creation\r\nWhen all units in <group> are destroyed, <cb> function will be called"
},
"IsUnitInPlayableArea": {
"prefix": [
"IsUnitInPlayableArea"
],
"body": [
"ScenarioFramework.IsUnitInPlayableArea(${1:unit})"
],
"description": ""
},
"SetUEFPlayerColor": {
"prefix": [
"SetUEFPlayerColor"
],
"body": [
"ScenarioFramework.SetUEFPlayerColor(${1:number})"
],
"description": "UEF"
},
"KillIAmOffMapThread": {
"prefix": [
"KillIAmOffMapThread"
],
"body": [
"ScenarioFramework.KillIAmOffMapThread(${1:self})"
],
"description": ""
},
"GroupPatrolRoute": {
"prefix": [
"GroupPatrolRoute"
],
"body": [
"ScenarioFramework.GroupPatrolRoute(${1:group}, ${2:route})"
],
"description": "orders group to patrol a route"
},
"CheckObjectives": {
"prefix": [
"CheckObjectives"
],
"body": [
"ScenarioFramework.CheckObjectives(${1:list})"
],
"description": "Iterates through objects in list. if any in list are not true ... returns false"
},
"CreateUnitNearTypeTrigger": {
"prefix": [
"CreateUnitNearTypeTrigger"
],
"body": [
"ScenarioFramework.CreateUnitNearTypeTrigger(${1:callbackFunction}, ${2:unit}, ${3:brain}, ${4:category}, ${5:distance})"
],
"description": "Function that fires when <unit> is near any unit of type <category> belonging to <brain> withing <distance>"
},
"GroupAttackChain": {
"prefix": [
"GroupAttackChain"
],
"body": [
"ScenarioFramework.GroupAttackChain(${1:group}, ${2:chain})"
],
"description": "order group to attack a chain"
},
"CreateUnitCapturedTrigger": {
"prefix": [
"CreateUnitCapturedTrigger"
],
"body": [
"ScenarioFramework.CreateUnitCapturedTrigger(${1:cbOldUnit}, ${2:cbNewUnit}, ${3:unit})"
],
"description": "Single line unit captured trigger creation\r\nWhen <unit> is captured cbOldUnit is called passing the old unit BEFORE it has switched armies,\r\ncbNewUnit is called passing in the unit AFTER it has switched armies"
},
"RequestPlayerFaction": {
"prefix": [
"RequestPlayerFaction"
],
"body": [
"ScenarioFramework.RequestPlayerFaction(${1:callback})"
],
"description": ""
},
"RemoveRestriction": {
"prefix": [
"RemoveRestriction"
],
"body": [
"ScenarioFramework.RemoveRestriction(${1:army}, ${2:categories}, ${3:isSilent})"
],
"description": "Removes scenario restriction for specified army and notify the UI/sim\r\ne.g. RemoveRestriction('ARMY_1', categories.TECH2) -> removes T2 units restriction for army 1"
},
"OperationCameraThread": {
"prefix": [
"OperationCameraThread"
],
"body": [
"ScenarioFramework.OperationCameraThread(${1:location}, ${2:heading}, ${3:faction}, ${4:track}, ${5:unit}, ${6:unlock}, ${7:time})"
],
"description": ""
},
"AddRestriction": {
"prefix": [
"AddRestriction"
],
"body": [
"ScenarioFramework.AddRestriction(${1:army}, ${2:categories})"
],
"description": "Adds scenario restriction for specified army and notify the UI/sim\r\ne.g. AddRestriction(1, categories.TECH2) -> restricts all T2 units for army 1\r\ne.g. AddRestriction('ARMY_1', categories.TECH2) -> restricts all T2 units for army 1"
},
"PlatoonAttackWithTransports": {
"prefix": [
"PlatoonAttackWithTransports"
],
"body": [
"ScenarioFramework.PlatoonAttackWithTransports(${1:platoon}, ${2:landingChain}, ${3:attackChain}, ${4:instant}, ${5:moveChain})"
],
"description": ""
},
"DestroyGroup": {
"prefix": [
"DestroyGroup"
],
"body": [
"ScenarioFramework.DestroyGroup(${1:group})"
],
"description": "Destroys a group\r\nGoes through every unit in <group> and destroys them without explosions"
},