/
Battlefront2API.doclua
2056 lines (1789 loc) · 96.1 KB
/
Battlefront2API.doclua
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
--------------------------------------------------------------
-- @module Battlefront2API
--------------------------------------------------------------
-- Sets the sound stream to play for the specified team when the other specified team has started/stopped bleeding.
--
-- @param #int playerTeam Player's team number
-- @param #int bleedTeam The team that's started/stopped bleeding
-- @param #string streamSoundName Stream sound to play when the local player is playerTeam and bleedTeam has started/stopped bleeding
-- @param #int bleeding Set to 1 to assign a started bleeding sound, set to 0 to assign a stopped bleeding sound
function SetBleedingVoiceOver(playerTeam, bleedTeam, streamSoundName, bleeding) end
--------------------------------------------------------------
-- Sets the bleeding sound stream repeat time.
--
-- @param #float repeatTime Time between each repetition of the started bleeding voice over
function SetBleedingRepeatTime(repeatTime) end
--------------------------------------------------------------
-- Sets the voice over to play for the specified bonus.
--
-- @param #int playerTeam Player's team number
-- @param #int bonusNum The number of the bonus to be set.
-- `0` - medical regen bonus (played on level load, heard by players team)
-- `1` - surplus supplies bonus (played on level load, heard by players team)
-- `2` - sensor boost bonus (played on level load, heard by players team)
-- `3` - hero is on the battlefield (played on level load, heard by both teams)
-- `4` - our team just got the reserves bonus (played when it happens, heard by players team)
-- `5` - the other team just got reserves bonus (played when it happens, heard by other team)
-- @param #string streamSoundName Stream sound to play when the bonus occurs (or at level load if the bonus is ongoing)
function SetPlanetaryBonusVoiceOver(playerTeam, bonusNum, streamSoundName) end
--------------------------------------------------------------
-- Sets the sound effect to play for the specified sound event.
--
-- @param #string soundEventType Type of event. Can be any of the following...
-- `BirdScatter` - Played when birds are spawned
-- `Bird` - Attached to each bird
-- `LeafFall` - Played when a falling leaf is spawned
-- `ScopeDisplayAmbient` - Played when scope display is active
-- `ScopeDisplayZoomIn` - When scope display zooms in
-- `ScopeDisplayZoomOut` - When scope display zooms out
-- `WeaponUnableSelect` - When the weapon change button is pressed but another weapon is not available
-- `WeaponModeUnableSelect` - When the weapon mode change button is pressed but another mode is not available
-- `SpawnDisplayUnitChange` - When unit is changed in spawn display
-- `SpawnDisplayUnitAccept` - When unit is selected in spawn display
-- `SpawnDisplaySpawnPointChange` - When spawn point is changed in spawn display
-- `SpawnDisplaySpawnPointAccept` - When spawn point is selected in spawn display
-- `SpawnDisplayBack` - When user presses the back button and returns from the map to the unit select screen in
-- the spawn display
-- `LockOn` - Played when player locks onto someone using the targetting display
-- `HeroesUnlocked` - When heroes are unlocked in multiplayer
-- `HeroSpawned` - When a player on Team `teamIndex` spawns in as the hero
-- `HeroDefeated` - When a player on Team `teamIndex` dies in as the hero
-- @param #string soundPropertyName Name of a SoundProperty assigned to the event
-- @param #int teamIndex Only required if `soundEventType` == `"HeroSpawned"` or `"HeroDefeated"`. Index of team that player is on
function SetSoundEffect(soundEventType, soundPropertyName, teamIndex) end
--------------------------------------------------------------
-- Sets the voice over for when the specified team has low reinforcements.
--
-- @param #int playerTeam Player's team number
-- @param #int lowReinforcementTeam Team which has low reinforcements
-- @param #string streamSoundName Sound stream to play when the local player is `playerTeam` and `lowReinforcementTeam`'s reinforcements
-- have dropped below `numReinforcements`
-- @param #int numReinforcements Number of reinforcements which triggers the low reinforcement stream
-- @param #int isPercentage Optional argument which when set to 1 treats `numReinforcements` as a fraction (`0.0..1.0`) of maximum reinforcements
function SetLowReinforcementsVoiceOver(playerTeam, lowReinforcementTeam, streamSoundName, numReinforcements, isPercentage) end
--------------------------------------------------------------
-- Sets the out-of-bounds voice over to play for the specified team.
--
-- @param #int playerTeam Player's team number
-- @param #string streamSoundName Name of the stream to play when the player goes out of bounds
function SetOutOfBoundsVoiceOver(playerTeam, streamSoundName) end
--------------------------------------------------------------
-- Sets the ambient music to play for players on the specified team.
--
-- @param #int playerTeam Player's team number
-- @param #int reinforcementCount Reinforcement count of the player's team which triggers the specified music
-- @param #string musicName Name of the music configuration
-- @param #int gameStage Value from 0 to 2, where 0 = beginning, 1 = middle, and 2 = end
-- @param #int isPercentage Optional argument which when set to 1 treats reinforcementCount as a fraction (`0.0..1.0`) of maximum reinforcements
function SetAmbientMusic(playerTeam, reinforcementCount, musicName, gameStage, isPercentage) end
--------------------------------------------------------------
-- Sets which music and voice overs are heard when in two-player (only?) splitscreen.
--
-- @param #int teamIndex Index of the attacking team
function SetAttackingTeam(teamIndex) end
--------------------------------------------------------------
-- Sets the music to play for players on the specified team when their team is victorious.
--
-- @param #int teamIndex Index of player's team
-- @param #string soundStreamID ID of sound stream properties to play
function SetVictoryMusic(teamIndex, soundStreamID) end
--------------------------------------------------------------
-- Sets the music to play for players on the specified team when their team is defeated.
--
-- @param #int teamIndex Index of player's team
-- @param #string soundStreamID ID of sound stream properties to play
function SetDefeatMusic(teamIndex, soundStreamID) end
--------------------------------------------------------------
-- Plays the specified sound stream segment.
--
-- @param #string streamFilename File containing the audio stream
-- @param #string streamID ID of sound stream properties containing `segmentID`
-- @param #string segmentID ID of segment within the `streamID` to play
-- @param #float gain Initial gain of the stream
-- @param #string busName Bus stream is assigned to (default = "Root")
-- @param #int streamIndex Index of the open stream to play, `streamFilename` can be "" if this is specified. (NOTE : This is an optional argument)
-- @return #int ID of the opened stream, `streamIndex` if it was specified or 0 if the function fails
function PlayAudioStream(streamFilename, streamID, segmentID, gain, busName, streamIndex) end
--------------------------------------------------------------
-- Plays the specified sound stream with the specified properties.
--
-- @param #string streamFilename File containing the audio stream specified in the sound stream properties
-- @param #string soundStreamID ID of the sound stream properties to play
-- @param #int noOpen Set to 1 to play using a previously opened stream. (NOTE : This is an optional argument)
-- @return #int ID of the opened stream (this may not be the stream that's playing)
function PlayAudioStreamUsingProperties(streamFilename, soundStreamID, noOpen) end
--------------------------------------------------------------
-- Stops and optionally closes the specified sound stream.
--
-- @param #int streamIndex Index of the audio stream to stop
-- @param #int close Optional argument. Set to 1 to close the stream, 0 to leave the stream open
function StopAudioStream(streamIndex, close) end
--------------------------------------------------------------
-- Opens the specified sound stream.
--
-- @param #string streamFilename File containing the audio stream
-- @param #string streamID ID of stream within the file
-- @return #int ID of the opened stream or 0 if the function fails
function OpenAudioStream(streamFilename, streamID) end
--------------------------------------------------------------
-- Appends the specified sound stream to another stream. Just like how only one segment in an open audio stream can be
-- played at a time, only one segment in a group of appended segments can be played at a time.
--
-- NOTE: This can ONLY be used with streams that are stored inside the same lvl file!
--
-- @param #string streamFilename File containing the stream to append to the currently open stream
-- @param #string streamID ID of the stream within the file
-- @param #string streamIndex Number returned from `OpenAudioStream()` which is the index of the stream to append segments to
-- @return #int ID of the opened stream or 0 if the function fails
function AudioStreamAppendSegments(streamFilename, streamID, streamIndex) end
--------------------------------------------------------------
-- Returns whether or not a sound stream is currently playing.
--
-- @param #string streamID ID of the stream to query
-- @return #int 1 if the stream has stopped, 0 otherwise
function AudioStreamComplete(streamID) end
--------------------------------------------------------------
-- Plays the specified sound properties.
--
-- @param #string soundID ID of sound properties to play
function ScriptCB_SndPlaySound(soundID) end
--------------------------------------------------------------
-- Fades the specified sound bus.
--
-- @param #string busName Name of the bus to fade
-- @param #float endGain Final gain of the bus
-- @param #float fadeTime Time to fade the bus
-- @param #float startGain Start gain of the bus (NOTE : this is an optional argument)
function ScriptCB_SndBusFade(busName, endGain, fadeTime, startGain) end
--------------------------------------------------------------
-- Scales the specified parameter for the specified sound group.
--
-- @param #string groupID Identifies the group which contains sounds that are changed
-- @param #string parameter Parameter to scale on each sound within the group. Can be one of the following...
-- `Gain`
-- `GainDev`
-- `Pitch`
-- `PitchDev`
-- `PlayProbability`
-- `PlayInterval`
-- `PlayIntervalDev`
-- `ReverbGain`
-- `Pan`
-- `MinDistance`
-- `MuteDistance`
-- `MaxDistance`
-- `RollOff`
-- `RollIn`
-- `RollInDistance`
-- @param #float scale Scale factor for the parameter
function ScaleSoundParameter(groupID, parameter, scale) end
--------------------------------------------------------------
-- Sets the bus that controls movie audio volume.
--
-- @param #string busID ID of bus which controls the movie audio volume
function ScriptCB_SetMovieAudioBus(busID) end
--------------------------------------------------------------
-- Exaggerates or reduces doppler effects.
--
-- @param #float dopplerFactor Default value is 1.0. To reduce doppler effects use values
-- less than 1.0, to exaggerate use values greater than 1.0
function ScriptCB_SetDopplerFactor(dopplerFactor) end
--------------------------------------------------------------
-- Plays the specified music.
--
-- @param #string musicID ID of the music to play in game
function ScriptCB_PlayInGameMusic(musicID) end
--------------------------------------------------------------
-- Stops the music previously played using `ScriptCB_PlayInGameMusic()`.
function ScriptCB_StopInGameMusic() end
--------------------------------------------------------------
-- Enables or disables command post voice overs.
--
-- @param #int enabled Set to 1 to enable command post VO, 0 to disable command post VO
function ScriptCB_EnableCommandPostVO(enabled) end
--------------------------------------------------------------
-- Enables or disables hero music.
--
-- @param #int enabled Set to 1 to enable hero music, 0 to disable hero music
function ScriptCB_EnableHeroMusic(enabled) end
--------------------------------------------------------------
-- Enables or disables hero voice overs.
--
-- @param #int enabled Set to 1 to enable hero voice overs, 0 to disable hero voice overs
function ScriptCB_EnableHeroVO(enabled) end
--------------------------------------------------------------
-- Sets the gain of the ingame bus when the spawn display is visible.
--
-- @param #float gain 0..1 - Gain of the ingame bus when the spawn display is visible (default = 0.2)
-- @param #float fadeTime Time, in seconds, to fade the ingame bus (default = 3.0)
function ScriptCB_SetSpawnDisplayGain(gain, fadeTime) end
--------------------------------------------------------------
-- Enables or disables the specified trigger sound region.
--
-- @param #string groupName Name of the trigger sound region group to enable/disable
-- @param #int enabled 1 to enable, 0 to disable. (default = 1)
function ScriptCB_TriggerSoundRegionEnable(groupName, enabled) end
--------------------------------------------------------------
-- Returns the entity class of the specified class name.
--
-- @param #string entityClassName Name of the entity class
-- @return Entity class
function FindEntityClass(entityClassName) end
--------------------------------------------------------------
-- Sets the amount of extra(?) model memory to allocate for the map on the PS2.
--
-- @param #int bytes Bytes to allocate
function SetPS2ModelMemory(bytes) end
--------------------------------------------------------------
-- For CollisionManager and TreeGrid sizes...
--
-- `SetWorldExtents` and `ScriptPreInit` go hand in hand. When building a Space level, you may notice that when you exit
-- your ship you instantly die. You also might find that running around certain parts of your ship you will die
-- without taking damage. Thats what `SetWorldExtents` is for. If you have this set to 2500, but youre still finding
-- that the world is killing you (and youre not walking into a death region) then bump it up to enlarge the soldier
-- based playable space.
--
-- Might have to go in `ScriptPreInit`.
--
-- @param #int amount New world extents in meters(?)
function SetWorldExtents(amount) end
--------------------------------------------------------------
-- Sets the amount of memory to take from the artist memory pools and reallocate. (Where to, though?)
--
-- @param #int bytes Bytes to reallocate
function StealArtistHeap(bytes) end
--------------------------------------------------------------
-- Loads the specified lvl file. Sub-lvls contained in the lvl file can be loaded in subsequent arguments like so:
-- `ReadDataFile("dc:SIDE\\rep.lvl", "rep_inf_ep3_trooper", "rep_inf_ep3_engineer", "rep_hero_anakin")`
--
-- You can also load a sub-lvl with a semicolon in the `sourceFilename` argument like so:
-- `ReadDataFile("dc:Sound\\abc.lvl;ABCg")`
--
-- @param #string sourceFilename Path of the lvl file to load, a single sub-lvl can be loaded by appending a semicolon followed by the name of the sub-lvl to this
-- @param #string ... Optional. Any additional sub-lvls to load
function ReadDataFile(sourceFilename, ...) end
--------------------------------------------------------------
-- Loads the specified lvl file during run-time (I think?). Sub-lvls contained in the lvl file can be loaded in subsequent arguments like so:
-- `ReadDataFile("dc:SIDE\\rep.lvl", "rep_inf_ep3_trooper", "rep_inf_ep3_engineer", "rep_hero_anakin")`
--
-- You can also load a sub-lvl with a semicolon in the `sourceFilename` argument like so:
-- `ReadDataFile("dc:Sound\\abc.lvl;ABCg")`
--
-- @param #string sourceFilename Path of the lvl file to load, a single sub-lvl can be loaded by appending a semicolon followed by the name of the sub-lvl
-- @param #string ... Optional. Any additional sub-lvls to load
function ReadDataFileInGame(sourceFilename, ...) end
--------------------------------------------------------------
-- Sets the amount of memory to allocate to a temporary pool. Used in galactic conquest. (What for specifically, though?)
--
-- @param #int bytes Bytes to allocate
function SetupTempHeap(bytes) end
--------------------------------------------------------------
-- Clears the temporary memory pool created with `SetupTempHeap`.
function ClearTempHeap() end
--------------------------------------------------------------
-- Adds a shot to the map's set of camera shots. These are the different camera angles that you cycle
-- through while in spectator mode when there's no players to spectate.
-- Use the `DumpCamera` console command to print new ones to the debug log.
--
-- @param #float quatW Quaternion's W value for camera rotation
-- @param #float quatX Quaternion's X value for camera rotation
-- @param #float quatY Quaternion's Y value for camera rotation
-- @param #float quatZ Quaternion's Z value for camera rotation
-- @param #float posX Value of camera's X position
-- @param #float posY Value of camera's Y position
-- @param #float posZ Value of camera's Z position
function AddCameraShot(quatW, quatX, quatY, quatZ, posX, posY, posZ) end
--------------------------------------------------------------
-- Sets the camera's rotation (in quaternions). Note that the camera is immediately reset if the player is controlling a
-- Controllable entity.
--
-- @param #float quatW Quaternion's W value for camera rotation
-- @param #float quatX Quaternion's X value for camera rotation
-- @param #float quatY Quaternion's Y value for camera rotation
-- @param #float quatZ Quaternion's Z value for camera rotation
function SetCameraRotation(quatW, quatX, quatY, quatZ) end
--------------------------------------------------------------
-- Sets the camera's position. Note that the camera is immediately reset if the player is controlling a Controllable entity.
--
-- @param #float posX Value of camera's X position
-- @param #float posY Value of camera's Y position
-- @param #float posZ Value of camera's Z position
function SetCameraPosition(posX, posY, posZ) end
--------------------------------------------------------------
-- Moves the camera to the specified entity. Used in galactic conquest.
--
-- @param entity Entity to move camera to
function MoveCameraToEntity(entity) end
--------------------------------------------------------------
-- Sets the map camera's position. Used in galactic conquest.
--
-- @param #int posX X position
-- @param #int posY Y position
-- @param #int posZ Z position
function SetMapCameraPosition(posX, posY, posZ) end
--------------------------------------------------------------
-- Returns the map camera's position values. Used in galactic conquest.
--
-- @return #int X position
-- @return #int Y position
-- @return #int Z position
function GetMapCameraPosition() end
--------------------------------------------------------------
-- Sets the map camera's position offset for the specified level of zoom. Used in galactic conquest.
--
-- @param #int zoom Level of zoom for which to set camera offset (0 = wide, 1 = normal, 2 = focus)
-- @param #int posX X position offset
-- @param #int posY Y position offset
-- @param #int posZ Z position offset
function SetMapCameraOffset(zoom, posX, posY, posZ) end
--------------------------------------------------------------
-- Sets the map camera's pitch for the specified level of zoom. Used in galactic conquest.
--
-- @param #int zoom Level of zoom for which to set camera pitch
-- @param #float pitch Amount to pitch camera by
function SetMapCameraPitch(zoom, pitch) end
--------------------------------------------------------------
-- Sets the map camera's zoom level. Used in galactic conquest.
--
-- @param #int zoom Level of zoom (0 = wide, 1 = normal, 2 = focus)
-- @param #int dir Optional argument. Direction of zoom (1 = zoom in, 0 = zoom out)
-- @param #float ratio Optional argument. Ratio of the shortest and longest ranges of the zoom lens. For example,
-- an 18-55 mm lens has a ratio of 0.33, or about 1:3, while a 75-300 mm lens ratio is 0.25,
-- or 1:4. Note that the zoom ratios have no connection to field of view, but merely express
-- the range between short and long
function SetMapCameraZoom(zoom, dir, ratio) end
--------------------------------------------------------------
-- Returns the map camera's current zoom values. Used in galactic conquest.
--
-- @return #int Level of zoom (0 = wide, 1 = normal, 2 = focus)
-- @return #int Direction of zoom (1 = zoom in, 0 = zoom out)
-- @return #float Ratio of the shortest and longest ranges of the zoom lens. For example, an 18-55 mm lens
-- has a ratio of 0.33, or about 1:3, while a 75-300 mm lens ratio is 0.25, or 1:4. Note
-- that the zoom ratios have no connection to field of view, but merely express the range
-- between short and long
function GetMapCameraZoom() end
--------------------------------------------------------------
-- Snaps the map camera in place. Used in galactic conquest.
function SnapMapCamera() end
--------------------------------------------------------------
-- Restarts the shell.
--
-- @param #string state Set to "State"
function SetState(state) end
--------------------------------------------------------------
-- Sets the mission as historical, might be related to Galactic Conquest? Obsolete, used in SWBF1.
function SetHistorical() end
--------------------------------------------------------------
-- Sets the name of the specified team. The names "neutral", "neu", "alliance", "all", "empire", "imp", "republic", "rep",
-- and "cis" map to pre-defined team identifiers; anything else maps to locals. (Yes, this is not very general.)
--
-- @param #int teamIndex Index of team
-- @param #string key Localization key (not the full path) of the team name, which must be located in the
-- scope `"level.ABC."` (replacing `ABC` with the map's ID)
function SetTeamName(teamIndex, key) end
--------------------------------------------------------------
-- Sets the aggressiveness of the AI on the specified team.
--
-- @param #int teamIndex Index of team
-- @param #float aggressiveness Aggressiveness value, higher means more aggressive (`0.0..1.0`)
function SetTeamAggressiveness(teamIndex, aggressiveness) end
--------------------------------------------------------------
-- Controls how far downwards from the center of the world the AI can fly. These are used on ground based maps to limit
-- the jet classes and jedi, but is also used to keep flyers from getting too far below the space battlefield. To find
-- an appropriate height, use `PrintPlayerPos` in the console, fly to your desired min height, and punch those numbers
-- in. Its best to keep the MinFlyHeight and the MinPlayerFlyHeight in line with each other to avoid AI doing things
-- that players cant.
--
-- @param #int height Height in meters(?)
function SetMinFlyHeight(height) end
--------------------------------------------------------------
-- Controls how far upwards from the center of the world the AI can fly. These are used on ground based maps to limit
-- the jet classes and jedi, but is also used to keep flyers from getting too far above the space battlefield. To find
-- an appropriate height, use `PrintPlayerPos` in the console, fly to your desired max height, and punch those numbers
-- in. Its best to keep the MaxFlyHeight and the MaxPlayerFlyHeight in line with each other to avoid AI doing things
-- that players cant.
--
-- @param #int height Height in meters(?)
function SetMaxFlyHeight(height) end
--------------------------------------------------------------
-- Controls how far downwards from the center of the world the player can fly. These are used on ground based maps to
-- limit the jet classes and jedi, but is also used to keep flyers from getting too far below the space battlefield. To
-- find an appropriate height, use `PrintPlayerPos` in the console, fly to your desired min height, and punch those
-- numbers in. Its best to keep the MinFlyHeight and the MinPlayerFlyHeight in line with each other to avoid AI doing
-- things that players cant.
--
-- @param #int height Height in meters(?)
function SetMinPlayerFlyHeight(height) end
--------------------------------------------------------------
-- Controls how far upwards from the center of the world the player can fly. These are used on ground based maps to
-- limit the jet classes and jedi, but is also used to keep flyers from getting too far above the space battlefield. To
-- find an appropriate height, use `PrintPlayerPos` in the console, fly to your desired min height, and punch those
-- numbers in. Its best to keep the MaxFlyHeight and the MaxPlayerFlyHeight in line with each other to avoid AI doing
-- things that players cant.
--
-- @param #int height Height in meters(?)
function SetMaxPlayerFlyHeight(height) end
--------------------------------------------------------------
-- Enables uber mode, which allows more than 32 units per team.
--
-- @param #int enabled Set to 1 to enable, or 0 to disable
function SetUberMode(enabled) end
--------------------------------------------------------------
-- Exact functionality unknown, but likely allows AI units to jetjump at will instead of restricting them to JetJump hint nodes. Used in Kamino.
--
-- @param #int allow Set to 1 to allow, or 0 to disallow (default = 1)
function SetAllowBlindJetJumps(allow) end
--------------------------------------------------------------
-- Unused, exact functionality unknown. Might be related to AI planning requests.
--
-- @param #float time Wait time in seconds
function SetStationaryWaitTime(time) end
--------------------------------------------------------------
-- Sets the icon of the specified team to the specified texture. Not sure where exactly this is used.
--
-- @param #int teamnIndex Index of team
-- @param #string icon Name of icon texture
function SetTeamIcon(teamIndex, icon) end
--------------------------------------------------------------
-- Makes the specified `team` regard the `other` team as an enemy. It does not affect how the `other` team regards the specified `team`!
--
-- @param #int team Index of team to set views of
-- @param #int other Index of team that's being viewed as enemy
function SetTeamAsEnemy(team, other) end
--------------------------------------------------------------
-- Makes the specified `team` regard the `other` team as a neutral. It does not affect how the `other` team regards the specified `team`!
--
-- @param #int team Index of team to set views of
-- @param #int other Index of team that's being viewed as neutral
function SetTeamAsNeutral(team, other) end
--------------------------------------------------------------
-- Makes the specified `team` regard the `other` team as an ally. It does not affect how the `other` team regards the specified `team`!
--
-- @param #int team Index of team to set views of
-- @param #int other Index of team that's being viewed as ally
function SetTeamAsFriend(team, other) end
--------------------------------------------------------------
-- Sets the number of units the specified team has.
--
-- @param #int teamIndex Index of team
-- @param #int count Number of units
function SetUnitCount(teamIndex, count) end
--------------------------------------------------------------
-- Returns the number of units the specified team has.
--
-- @param #int teamIndex Index of team
-- @return #int Team's unit count
function GetUnitCount(teamIndex) end
--------------------------------------------------------------
-- Sets the specified team's ticket count.
--
-- @param #int teamIndex Index of team
-- @param #int tickets Number of tickets to set to
function SetReinforcementCount(teamIndex, tickets) end
--------------------------------------------------------------
-- Returns the specified team's current ticket count.
--
-- @param #int teamIndex Index of team
-- @return #int Number of tickets
function GetReinforcementCount(teamIndex) end
--------------------------------------------------------------
-- Adds the specified number of tickets to the specified team's ticket count.
--
-- @param #int teamIndex Index of team
-- @param #int tickets Number of tickets to add, use negative value to subtract tickets
function AddReinforcements(teamIndex, tickets) end
--------------------------------------------------------------
-- Sets the specified team's point count.
--
-- @param #int teamIndex Index of team
-- @param #int points Number of points to set to
function SetTeamPoints(teamIndex, points) end
--------------------------------------------------------------
-- Returns the specified team's current point count.
--
-- @param #int teamIndex Index of team
-- @return #int Number of points
function GetTeamPoints(teamIndex) end
--------------------------------------------------------------
-- Adds the specified number of points to the specified team's point count.
--
-- @param #int teamIndex Index of team
-- @param #int points Number of points to add, use negative value to subtract points
function AddTeamPoints(teamIndex, points) end
--------------------------------------------------------------
-- Gives the specified character unit flag capture points.
--
-- @param #int integerChrIdx Integer index of character unit
function AddFlagCapturePoints(integerChrIdx) end
--------------------------------------------------------------
-- Gives the specified character unit assault destroy points.
--
-- @param #int integerChrIdx Integer index of character unit
function AddAssaultDestroyPoints(integerChrIdx) end
--------------------------------------------------------------
-- Gives the specified character unit space assault destroy points for the specified object.
--
-- @param #int integerChrIdx Integer index of character unit
-- @param #string object ID of object
function AddSpaceAssaultDestroyPoints(integerChrIdx, object) end
--------------------------------------------------------------
-- Returns the faction ID of the specified team. Not sure what this is used for.
--
-- @param #int teamIndex Index of team
-- @return #string Team's faction ID
function GetTeamFactionId(teamIndex) end
--------------------------------------------------------------
-- Adds the specified unit class to the specified team.
--
-- @param #int teamIndex Index of team
-- @param #string unitClass Name of unit class (example: `"imp_inf_trooper"`)
-- @param #int minUnits Minimum number of AI units that can spawn as this class
-- @param #int maxUnits Optional argument. Maximum number of AI units that can spawn as this class. If the unit class has
-- a `PointsToUnlock` value specified in its ODF, this argument acts as the maximum number of AI and
-- player units that can spawn as this class.
function AddUnitClass(teamIndex, unitClass, minUnits, maxUnits) end
-- Hero
--------------------------------------------------------------
-- Sets the hero class for the specified team.
--
-- @param #int teamIndex Index of team
-- @param #string heroClass Name of hero class (example: `"imp_hero_vader"`)
function SetHeroClass(teamIndex, heroClass) end
--------------------------------------------------------------
-- Turns on the hero rules for the game. This should be present in every multiplayer script, unless you do not actually want heroes
-- in your map. Simply omit this line, and you will never get heroes in your game.
function EnableSPHeroRules() end
--------------------------------------------------------------
-- Turns on the campaign hero rules for the game. This should be present in every campaign script for missions that include heroes.
function EnableSPScriptedHeroes() end
--------------------------------------------------------------
-- Unused. Sets the rule by which the hero is unlocked.
--
-- @param #string rule Unlock rule to use, possible options are unknown
function SetHeroUnlockRule(rule) end
--------------------------------------------------------------
-- Unused. Sets the hero player rule (whatever that means).
--
-- @param #string rule Team rule to use, possible options are unknown
function SetHeroTeamRule(rule) end
--------------------------------------------------------------
-- Unused. Sets the hero player rule (whatever that means).
--
-- @param #string rule Player rule to use, possible options are unknown
function SetHeroPlayerRule(rule) end
--------------------------------------------------------------
-- Unused. Sets the rule by which the hero respawns.
--
-- @param #string rule Respawn rule to use, possible options are unknown
function SetHeroRespawnRule(rule) end
--------------------------------------------------------------
-- Unlocks the hero for the specified team.
--
-- @param #int teamIndex Index of team
function UnlockHeroForTeam(teamIndex) end
--------------------------------------------------------------
-- Forces the specified character unit to accept the unlocked hero, automatically bringing them to the spawn screen.
--
-- @param #int integerChrIdx Character unit index returned by GetCharacterUnit
function AcceptHero(integerChrIdx) end
--------------------------------------------------------------
-- Shows all units on the minimap if enabled.
--
-- @param #int enabled Set to 1 to show all units, or 0 to put back to normal
function ShowAllUnitsOnMinimap(enabled) end
--------------------------------------------------------------
-- Shows or hides the CTF points for the specified team.
--
-- @param #int teamIndex Index of team
-- @param #int enabled Set to 1 to show points, or 0 to hide
function ShowTeamPoints(teamIndex, enabled) end
--------------------------------------------------------------
-- Activates a bonus for the specified team.
--
-- @param #int teamIndex Index of team to activate bonus for
-- @param #string bonus Bonus to activate. Allowed values:
-- `MEDICAL_SUPPLIES`
-- `SURPLUS_SUPPLIES`
-- `SENSOR_BOOST`
-- `HERO`
-- `RESERVES`
-- `SABOTAGE`
-- `SNEAK_ATTACK`
-- `TRAINING`
function ActivateBonus(teamIndex, bonus) end
--------------------------------------------------------------
-- Sets the specified team's ticket bleed rate.
--
-- @param #int teamIndex Index of team
-- @param #float rate Bleed rate to set to
function SetBleedRate(teamIndex, rate) end
--------------------------------------------------------------
-- Returns the specified team's current ticket bleed rate.
--
-- @param #int teamIndex Index of team
-- @return #float Team's bleed rate
function GetBleedRate(teamIndex) end
--------------------------------------------------------------
-- Obsolete, from SWBF1. Sets the carrier class for the specified team.
--
-- @param #int teamIndex Index of team
-- @param #string class Name of carrier class (example: `"rep_fly_vtrans"`)
function SetCarrierClass(teamIndex, class) end
--------------------------------------------------------------
-- Specifies an initial spawn delay. All levels use this call. You should never have to modify the values.
--
-- @param #float num1 Unknown, always set to `10.0`
-- @param #float num2 Unknown, always set to `0.25`
function SetSpawnDelay(num1, num2) end
--------------------------------------------------------------
-- Specifies an initial spawn delay for the specified team. All levels use this call. You should never have to modify the values.
--
-- @param #float num1 Unknown, always set to `10.0`
-- @param #float num2 Unknown, always set to `0.25`
-- @param #int teamIndex Index of team
function SetSpawnDelayTeam(num1, num2, teamIndex) end
--------------------------------------------------------------
-- Sets a switch in the code that controls a number of AI behaviors. If this were a very foggy map, with a short view distance,
-- you would set this to "true" which would make the AI see a shorter distance, and other various things to make the AI act
-- more appropriately in an environment with limited visibility.
--
-- Synonymous with `SetUrbanEnvironment()`.
--
-- @param #string enabled Set to "true" to enable, or "false" to disable
function SetDenseEnvironment(enabled) end
--------------------------------------------------------------
-- Sets the distance from which AI scout units can snipe when using 'attack' snipe hint nodes.
--
-- @param #int distance Average distance in meters from which AI can snipe
function SetAttackerSnipeRange(distance) end
--------------------------------------------------------------
-- Sets the distance from which AI scout units can snipe when using 'defend' snipe hint nodes.
--
-- @param #int distance Average distance in meters from which AI can snipe
function SetDefenderSnipeRange(distance) end
--------------------------------------------------------------
-- Makes AI units stay in turrets, but under what conditions, no one knows... Found on Endor.
--
-- @param #int enabled Set to 1 to enable, or 0 to disable
function SetStayInTurrets(enabled) end
--------------------------------------------------------------
-- Sets the maximum collision distance for asteroids. What this does exactly is unclear.
--
-- @param #int distance Maximum collision distance (likely in meters)
function SetMaxCollisionDistance(distance) end
--------------------------------------------------------------
-- Sets the particle LOD bias (probably correlates to particle view distance). Needed for particles in space
-- to work properly, dont delete it!
--
-- @param #int bias LOD bias value, is set to `15000` in stock space maps
function SetParticleLODBias(bias) end
--------------------------------------------------------------
-- Sets the size of the specified memory pool.
--
-- @param #string memoryPool Memory pool to set size of. Possible values:
-- `AcklayData`
-- `ActiveRegion`
-- `Aimer`
-- `AmmoCounter`
-- `Asteroid`
-- `BaseHint`
-- `ClothData` - need 1 per cloth object in the level
-- `Combo` - should be ~ 2x number of jedi classes
-- `Combo::Attack` - should be ~8-12x #Combo
-- `Combo::Condition` - should be a bit bigger than #Combo::State
-- `Combo::DamageSample` - should be ~8-12x #Combo::Attack
-- `Combo::Deflect` - should be ~1x #combo
-- `Combo::State` - should be ~12x #Combo
-- `Combo::Transition` - should be a bit bigger than #Combo::State
-- `CommandFlyer`
-- `CommandHover`
-- `CommandWalker`
-- `ConnectivityGraphFollower`
-- `EnergyBar`
-- `EntityBuildingArmedDynamic`
-- `EntityCarrier`
-- `EntityCloth`
-- `EntityDefenseGridTurret`
-- `EntityDroid`
-- `EntityDroideka`
-- `EntityFlyer` - need 1 per flyer in the level
-- `EntityHover`
-- `EntityLight`
-- `EntityMine`
-- `EntityPortableTurret`
-- `EntityRemoteTerminal`
-- `EntitySoldier`
-- `EntitySoundStatic`
-- `EntitySoundStream`
-- `EntityTauntaun` - need 1 per tauntaun in the level
-- `EntityWalker` - need 1 per walker in the level
-- `FlagItem` - need 1 per flag in the level
-- `FLEffectObject::OffsetMatrix`
-- `LightFlash`
-- `MountedTurret`
-- `Music`
-- `Navigator`
-- `Obstacle`
-- `Ordnance`
-- `OrdnanceTowCable`
-- `ParticleEmitter`
-- `ParticleEmitterInfoData`
-- `ParticleEmitterObject`
-- `ParticleTransformer::ColorTrans` - must go before the stock `ingame.lvl` is loaded
-- `ParticleTransformer::PositionTr` - must go before the stock `ingame.lvl` is loaded
-- `ParticleTransformer::SizeTransf` - must go before the stock `ingame.lvl` is loaded
-- `PassengerSlot`
-- `PathFollower`
-- `PathNode`
-- `PathRequest`
-- `PowerupItem`
-- `RedOmniLight`
-- `ShieldEffect`
-- `SoldierAnimation`
-- `SoundSpaceRegion`
-- `TentacleSimulator`
-- `Timer`
-- `TreeGridStack`
-- `UnitAgent`
-- `UnitController`
-- `Weapon`
-- @param #int size Size of memory pool
function SetMemoryPoolSize(memoryPool, size) end
--------------------------------------------------------------
-- Sets how many types of birds there are in the level.
--
-- @param #int types Number of bird types
function SetNumBirdTypes(types) end
--------------------------------------------------------------
-- Declares a new bird type.
--
-- @param #int disable Exact functionality unknown, seems to disable birds of this type when set to 1
-- @param #float size Size of birds of this type
-- @param #string texture Name of bird texture
function SetBirdType(disable, size, texture) end
--------------------------------------------------------------
-- Sets the lowest height at which flocks of birds can fly.
--
-- @param #int height Minimum flying height
function SetBirdFlockMinHeight(height) end
--------------------------------------------------------------
-- Sets how many types of fish there are in the level.
--
-- @param #int types Number of fish types
function SetNumFishTypes(types) end
--------------------------------------------------------------
-- Declares a new fish type.
--
-- @param #int disable Exact functionality unknown, seems to disable fish of this type when set to 1
-- @param #float size Size of fish of this type
-- @param #string texture Name of fish texture
function SetFishType(disable, size, texture) end
--------------------------------------------------------------
-- Fills the specified region with asteroids. Each asteroid will move in the X, Y, and Z directions at a random velocity within the range
-- of each `minSpeed` and `maxSpeed` argument. Asteroid velocity is probably measured in meters per second. This randomized velocity is
-- different for each asteroid.
--
-- NOTE: Asteroids won't appear unless the "Asteroid" memory pool is filled >= the total number of asteroids that
-- are in the level!
--
-- @param #string region ID of region class
-- @param #string class Name of asteroid class (example: `"spa1_prop_asteroid_03"`)
-- @param #int count Number of asteroids to fill the region with
-- @param #float maxSpeedX Maximum asteroid drift speed in X direction (default = 0)
-- @param #float maxSpeedY Maximum asteroid drift speed in Y direction (default = 0)
-- @param #float maxSpeedZ Maximum asteroid drift speed in Z direction (default = 0)
-- @param #float minSpeedX Minimum asteroid drift speed in X direction (default = 0)
-- @param #float minSpeedY Minimum asteroid drift speed in Y direction (default = 0)
-- @param #float minSpeedZ Minimum asteroid drift speed in Z direction (default = 0)
function FillAsteroidRegion(region, class, count, maxSpeedX, maxSpeedY, maxSpeedZ, minSpeedX, minSpeedY, minSpeedZ) end
--------------------------------------------------------------
-- Fills the specified path with asteroids. The distribution of the asteroids along the path's spline is more-or-less even. However, the
-- position of each asteroid is also offset in a random direction. The distance of this offset is a random value between 0 and `maxOffset`.
-- This randomized offset is different for each asteroid.
--
-- Each asteroid will move in the X, Y, and Z directions at a random velocity within the range of each `minSpeed` and `maxSpeed`
-- argument. Asteroid velocity is probably measured in meters per second. This randomized velocity is different for each asteroid.
--
-- NOTE: Asteroids won't appear unless the "Asteroid" memory pool is filled >= the total number of asteroids that
-- are in the level!
--
-- @param #string path ID of path
-- @param #float maxOffset Maximum distance (probably in meters) to offset each asteroid's position by (default = 0)
-- @param #string class Name of asteroid class (example: `"spa1_prop_asteroid_03"`)
-- @param #int count Number of asteroids to fill the path with
-- @param #float maxSpeedX Maximum asteroid drift speed in X direction (default = 0)
-- @param #float maxSpeedY Maximum asteroid drift speed in Y direction (default = 0)
-- @param #float maxSpeedZ Maximum asteroid drift speed in Z direction (default = 0)
-- @param #float minSpeedX Minimum asteroid drift speed in X direction (default = 0)
-- @param #float minSpeedY Minimum asteroid drift speed in Y direction (default = 0)
-- @param #float minSpeedZ Minimum asteroid drift speed in Z direction (default = 0)
function FillAsteroidPath(path, maxOffset, class, count, maxSpeedX, maxSpeedY, maxSpeedZ, minSpeedX, minSpeedY, minSpeedZ) end
--------------------------------------------------------------
-- Registers the specified region class as a death region. Entities that enter this region will be immediately killed.
--
-- @param #string regionClass ID of region class
function AddDeathRegion(regionClass) end
--------------------------------------------------------------
-- Registers the specified region class as a landing region. Flyers will be able to land when inside of this region.
--
-- @param #string regionClass ID of region class
function AddLandingRegion(regionClass) end
--------------------------------------------------------------
-- Removes the specified region class. Death regions and landing regions removed by RemoveRegion can be re-added
-- with AddDeathRegion or AddLandingRegion.
--
-- @param #string regionClass ID of region class
function RemoveRegion(regionClass) end
--------------------------------------------------------------
-- Returns whether or not the specified character is in the specified region.
--
-- @param #int integerChrIdx Integer index of character
-- @param #string region ID of region class
-- @return #int 1 if character is in region, 0 if not
function IsCharacterInRegion(integerChrIdx, region) end
--------------------------------------------------------------
-- Returns the name of the specified region class.
--
-- @param #string region ID of region class
-- @return #string Name of region
function GetRegionName(region) end
--------------------------------------------------------------
-- Returns the class of the specified region.
--
-- @param #string region Name of region
-- @return #string ID of region class
function GetRegion(region) end
--------------------------------------------------------------
-- Wipes out any allocations that may have been done automatically for walkers. Youll need to have this line in,
-- and uncommented if you want to have walkers in your level.
function ClearWalkers() end
--------------------------------------------------------------
-- Adds walkers to your level.
--
-- The first number inside the parenthesis (numPairs) specifies how many leg pairs the walker type has.
-- Droidekas are set up as a special case, with 0 leg pairs. So as you can see below, we have AddWalkerType(0,4), this
-- specifies that we will have 4 walkers with 0 leg pairs (droidekas). 1 leg pair would specify a walker with one pair
-- of legs, an ATST for example, or a one-man ATST from the Clone Wars era. So for 2 ATSTs, we would have a line that
-- says AddWalkerType(1, 2). 2 leg pairs would be a unit like the CIS spider walker, or an ATAT, and 3 leg pairs would
-- be the 6-legged walker from the Clone Wars era.
--
-- **Examples:**
--
-- `AddWalkerType(0, 4) -- special -> droidekas, 0x4 (4 droidekas)`
-- `AddWalkerType(1, 2) -- 1x2 (2 walkers with 1 pair of legs)`
-- `AddWalkerType(2, 4) -- 2x4 (4 walkers with 2 pairs of legs)`
-- `AddWalkerType(3, 1) -- 3x1 (1 walker with 3 pairs of legs)`
--
-- @param #int numPairs How many leg pairs the walker type has
-- @param #int count Max number of walkers of this type that can exist simultaneously in the level
function AddWalkerType(numPairs, count) end
--------------------------------------------------------------
-- Sets the distance around a waiting vehicle from which AI can be lured in.
--
-- @param #int radius Notify radius in meters (probably)
function SetAIVehicleNotifyRadius(radius) end