-
Notifications
You must be signed in to change notification settings - Fork 1
/
ME5_MapManager.lua
1507 lines (1264 loc) · 64.5 KB
/
ME5_MapManager.lua
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
-----------------------------------------------------------------
-----------------------------------------------------------------
-- MASS EFFECT: UNIFICATION Map Manager Script by Aaron Gilbert
-- Build 31203/06
-- Screen Names: Marth8880, GT-Marth8880, [GT] Marth8880, [GT] Bran
-- E-Mail: [email protected]
-- Dec 3, 2016
-- Copyright (c) 2017, Aaron Gilbert All rights reserved.
--
-- About:
-- TODO: fill this in!
--
--
-- Usage:
-- TODO: fill this in!
--
--
-- Legal:
-- This script is licensed under the BSD 3-Clause License. A copy of this license (as LICENSE.md) should have been included
-- with this script. If it wasn't, it can also be found here: https://www.w3.org/Consortium/Legal/2008/03-bsd-license.html
--
-- THIS SCRIPT IS NOT MADE, DISTRIBUTED, OR SUPPORTED BY LUCASARTS, A DIVISION OF LUCASFILM ENTERTAINMENT COMPANY LTD.
-----------------------------------------------------------------
-----------------------------------------------------------------
local __SCRIPT_NAME = "ME5_MapManager";
local debug = true
local function PrintLog(...)
if debug == true then
print("["..__SCRIPT_NAME.."]", unpack(arg));
end
end
PrintLog("Entered")
--=================================
-- MapManager
--=================================
---
-- This is a constructor for a MapManager object.
-- @param #bool bIsModMap Whether or not this is a mod map (as opposed to a stock map). Used for scaling the gain of the "ambientenv" sound group. (default : `false`)
-- @param #string gameMode Name of this mission's game mode. Possible values:
-- `"conquest"` : Conquest
-- `"1flag"` : 1-Flag CTF
-- `"ctf"` : 2-Flag CTF
-- `"tdm"` : Team Deathmatch
-- `"siege"` : Siege
-- `"survival"` : Survival
-- `"campaign"` : Campaign
-- @param #string mapSize Size of the map. Used for determining unit counts. Possible values:
-- `"xxs"` : Around 7 units per team
-- `"xs"` : Around 13 units per team
-- `"sm"` : Around 15 units per team
-- `"med"` : Around 23 units per team
-- `"lg"` : Around 28 units per team
-- `"xl"` : Around 34 units per team
-- @param #string environmentType Map's biome (essentially). Used for determining which camo textures to load. Possible values:
-- `"desert"` : Light-brown camo
-- `"jungle"` : Dark-green camo
-- `"snow"` : Light-grey camo
-- `"urban"` : Dark-grey camo
-- @param #string musicVariation_SSVxGTH Music variation to use for SSVxGTH matches. Possible values:
-- `"1"` : Various music from ME1 - notably Eden Prime and Therum
-- `"2"` : Collector attack music from ME2
-- `"3"` : Various music from ME1 - notably Noveria and Virmire
-- `"3_nov"` : Only the Noveria music used in `"3"`
-- `"3_vrm"` : Only the Virmire music used in `"3"`
-- `"4"` : Randomly-selected squadmate's music from ME2
-- `"4_1"` or `"4_samara"` : Samara's squadmate music from ME2
-- `"4_2"` or `"4_grunt"` : Grunt's squadmate music from ME2
-- `"4_3"` or `"4_tali"` : Tali's squadmate music from ME2
-- `"4_4"` or `"4_infiltration"` : The infiltration music from ME2
-- `"4_5"` or `"4_thane"` : Thane's squadmate music from ME2
-- `"4_6"` or `"4_jack"` : Jack's squadmate music from ME2
-- `"5"` : Collector music from ME2 and ME3 Leviathan DLC - notably the Horizon, Long Walk, Paragon Lost, and Mahavid Mines suites
-- `"5_1"` or `"5_longwalk"` : The Long Walk suite from ME2
-- `"5_2"` or `"5_horizon"` : Horizon suite from ME2
-- `"5_3"` or `"5_paragon"` : Paragon Lost suite from Mass Effect: Paragon Lost
-- `"5_4"` or `"5_mahavid"` : Mahavid Mines suite from ME3 Leviathan DLC
-- `"6"` : Overlord and Shadow Broker suites from the associated ME2 DLC
-- `"6_1"` or `"6_longwalk"` : Overlord suite from ME2 Overlord DLC
-- `"6_2"` or `"6_horizon"` : Shadow Broker suite from ME2 Lair of the Shadow Broker DLC
-- `"7"` : Randomly-selected Cerberus music from ME3
-- `"7_1"` or `"7_mars"` : Mars music from ME3
-- `"7_2"` or `"7_surkesh"` : Sur'Kesh music from ME3
-- `"7_3"` or `"7_grissom"` : Grissom Academy music from ME3
-- `"8"` : Reaper music from ME3
-- `"9"` : Evolved Geth music, taken from Far Cry 3's OST
-- @param #string musicVariation_SSVxCOL Music variation to use for SSVxCOL matches. Possible values are the same as `musicVariation_SSVxGTH`.
-- @param #string musicVariation_EVGxGTH Music variation to use for EVGxGTH matches. Possible values are the same as `musicVariation_SSVxGTH`.
-- @param #string musicVariation_EVGxCOL Music variation to use for EVGxCOL matches. Possible values are the same as `musicVariation_SSVxGTH`.
-- @param #string onlineSideVar Side variation to use in online matches. Possible values:
-- `"SSVxGTH"` : Systems Alliance vs. Heretic Geth
-- `"SSVxCOL"` : Systems Alliance vs. Collectors
-- `"EVGxGTH"` : Evolved Geth vs. Heretic Geth
-- `"EVGxCOL"` : Evolved Geth vs. Collectors
-- @param #string onlineHeroSSV SSV hero to use in online matches. Possible values:
-- `"shep_soldier"` : Commander Shepard (Soldier)
-- `"shep_infiltrator"` : Commander Shepard (Infiltrator)
-- `"shep_engineer"` : Commander Shepard (Engineer)
-- `"shep_adept"` : Commander Shepard (Adept)
-- `"shep_sentinel"` : Commander Shepard (Sentinel)
-- `"shep_vanguard"` : Commander Shepard (Vanguard)
-- `"jack"` : Jack
-- @param #string onlineHeroGTH GTH hero to use in online matches. Possible values:
-- `"gethprime_me2"` : Geth Prime (ME2)
-- `"gethprime_me3"` : Geth Prime (ME3)
-- @param #string onlineHeroCOL COL hero to use in online matches. Possible values:
-- `"colgeneral"` : Harbinger
-- @param #string onlineHeroEVG EVG hero to use in online matches. Possible values:
-- `"gethprime_me2"` : Geth Prime (ME2)
-- `"gethprime_me3"` : Geth Prime (ME3)
-- @param #table heroSupportCPs 2D table of AI hero spawns. Set to nil or leave blank to disable heroes. First column is CP names, second column is CP spawn path names.
-- @param #table allySpawnCPs 2D table of local ally spawns. Set to nil or leave blank to disable local allies. First column is CP names, second column is CP spawn path names.
-- @param #string artilleryTurObj OPTIONAL: Name of the artillery turret object. Only specify this if you're using a custom artillery turret object.
-- @param #table artilleryNodes OPTIONAL: 2D table listing nodes to strike at. Set to nil or leave blank to disable artillery strikes. First column is path names,
-- second column is path node IDs.
-- @param #float artilleryStrikeInitDelay OPTIONAL: Length of time in seconds to wait before the first strike occurs. Set to 0 to disable initial delay completely. (default value : `60.0`)
-- @param #float artilleryStrikeDelay OPTIONAL: The length of time in seconds to wait before each strike occurs. Value must be >= 10.0. (default value : `35.0`)
-- @param #string terrainType OPTIONAL: Type of terrain in the map. Used for determining which artillery debris textures to load. Possible values:
-- `"dirt"`
-- `"snow"`
-- `"sand"`
-- @param #bool bDebug OPTIONAL: Whether or not to print/display debug messages.
-- @return MapManager object and its values.
MapManager = {
-- Fields that need to be specified on creation
bIsModMap = false, -- Whether or not this is a mod map (as opposed to a stock map). Used for scaling the gain of the "ambientenv" sound group.
gameMode = nil, -- This mission's game mode.
mapSize = nil, -- Size of the map. Used for determining unit counts.
environmentType = nil, -- Map's biome (essentially). Used for determining which camo textures to load.
terrainFoleyGroup = nil, -- Foley group to use for terrain on this map.
musicVariation_SSVxGTH = nil, -- Music variation to use for SSVxGTH matches.
musicVariation_SSVxCOL = nil, -- Music variation to use for SSVxCOL matches.
musicVariation_EVGxGTH = nil, -- Music variation to use for EVGxGTH matches.
musicVariation_EVGxCOL = nil, -- Music variation to use for EVGxCOL matches.
musicVariation_SSVxRPR = nil, -- Music variation to use for SSVxRPR matches.
musicVariation_SSVxCER = nil, -- Music variation to use for SSVxCER matches.
onlineSideVar = nil, -- Side variation to use in online matches.
onlineHeroSSV = nil, -- SSV hero to use in online matches.
onlineHeroGTH = nil, -- GTH hero to use in online matches.
onlineHeroCOL = nil, -- COL hero to use in online matches.
onlineHeroEVG = nil, -- EVG hero to use in online matches.
heroSupportCPs = nil, -- AI hero spawns. First column is CP names, second column is CP spawn path names.
allySpawnCPs = nil, -- Local ally spawns. First column is CP names, second column is CP spawn path names.
-- Optional fields
artilleryTurObj = nil, -- The name of the artillery turret object. Only specify this if you're using a custom artillery turret object.
artilleryNodes = nil, -- Two-dimensional array listing nodes to strike at. Set to nil or leave blank to disable artillery strikes.
-- First column is path names, second column is path node IDs.
artilleryStrikeInitDelay = 60.0, -- The length of time in seconds to wait before the first strike occurs. Set to 0 to disable initial delay completely. Default value: 60.0
artilleryStrikeDelay = 35.0, -- The length of time in seconds to wait before each strike occurs. Value must be >= 10.0. Default value: 35.0
terrainType = nil, -- Type of terrain in the map. Used for determining which artillery debris textures to load.
bDebug = false, -- Whether or not to print/display debug messages.
-- Fields that are handled internally
bAreHeroesEnabled = true, -- Whether or not heroes are enabled.
bAreLocalAlliesEnabled = true, -- Whether or not local allies are enabled.
bIsArtilleryEnabled = false, -- Whether or not artillery strikes are enabled
bIsArtilleryTurObjCustom = false, -- Whether or not a custom artillery turret object has been specified
}
----
-- Creates a new MapManager.
--
function MapManager:New(o)
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end
----
-- Initializes the MapManager's data fields.
--
function MapManager:Init()
-- Map-specific aesthetics
if self.gameMode == nil then
PrintLog("Init(): WARNING: gameMode must be specified! Exiting function")
return end
if self.mapSize == nil then
PrintLog("Init(): WARNING: mapSize must be specified! Exiting function")
return end
if self.environmentType == nil then
PrintLog("Init(): WARNING: environmentType wasn't specified! Defaulting to Urban")
self.environmentType = "urban"
end
if self.terrainFoleyGroup == nil then
PrintLog("Init(): WARNING: terrainFoleyGroup wasn't specified! Defaulting to Dirt")
self.terrainFoleyGroup = "dirt"
end
-- Online multiplayer matches
if self.onlineSideVar == nil then
PrintLog("Init(): WARNING: onlineSideVar wasn't specified! Defaulting to SSVxGTH")
self.onlineSideVar = "SSVxGTH"
end
if self.onlineHeroSSV == nil then
PrintLog("Init(): WARNING: onlineHeroSSV wasn't specified! Defaulting to shep_soldier")
self.onlineHeroSSV = "shep_soldier"
end
if self.onlineHeroGTH == nil then
PrintLog("Init(): WARNING: onlineHeroGTH wasn't specified! Defaulting to gethprime_me2")
self.onlineHeroGTH = "gethprime_me2"
end
if self.onlineHeroCOL == nil then
PrintLog("Init(): WARNING: onlineHeroCOL wasn't specified! Defaulting to colgeneral")
self.onlineHeroCOL = "colgeneral"
end
if self.onlineHeroEVG == nil then
PrintLog("Init(): WARNING: onlineHeroEVG wasn't specified! Defaulting to gethprime_me3")
self.onlineHeroEVG = "gethprime_me3"
end
-- AI heroes and local allies
if self.heroSupportCPs == {} or self.heroSupportCPs == nil then
PrintLog("Init(): WARNING: heroSupportCPs wasn't specified! Heroes will be disabled")
self.bAreHeroesEnabled = false
end
if self.allySpawnCPs == {} or self.allySpawnCPs == nil then
PrintLog("Init(): WARNING: allySpawnCPs wasn't specified! Local allies will be disabled")
self.bAreLocalAlliesEnabled = false
end
-- Auto-fill any empty fields
self.musicVariation_SSVxGTH = self.musicVariation_SSVxGTH or "1"
self.musicVariation_SSVxCOL = self.musicVariation_SSVxCOL or "2"
self.musicVariation_EVGxGTH = self.musicVariation_EVGxGTH or "9"
self.musicVariation_EVGxCOL = self.musicVariation_EVGxCOL or "9"
self.musicVariation_SSVxRPR = self.musicVariation_SSVxRPR or "8"
self.musicVariation_SSVxCER = self.musicVariation_SSVxCER or "7"
self.artilleryTurObj = self.artilleryTurObj or "artillery1"
-- Artillery strikes
if self.artilleryNodes ~= nil then
-- Artillery strikes are a go
self.bIsArtilleryEnabled = true
-- Check if the artillery object is custom
if self.artilleryTurObj ~= "artillery1" then
self.bIsArtilleryTurObjCustom = true
end
end
-- Notify the other scripts that we're the captain now
gCurrentMapManager = self
end
---
-- Call this at the beginning of ScriptInit (but after the loadscreen line and any ParticleTransformer memory pool lines).
--
-- Performs various pre-game operations, such as loading commonly used data files,
-- Carnage mode setup, HUD work, and running event response functions for features such as
-- kill sounds, Evolved Juggernaut's Power Drain, and shield pickups.
--
function MapManager:Proc_ScriptInit_Begin()
PrintLog("Proc_ScriptInit_Begin(): Entered")
-- Load our custom loadscreen elements such as progress bar LEDs, tip box elements, etc.
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\Load\\common.lvl")
--Init_HeroMusic()
-- What is the difficulty set to in the Config Tool?
if not ScriptCB_InMultiplayer() then
if ME5_Difficulty == 1 then
PrintLog("Proc_ScriptInit_Begin(): Initializing difficulty parameters for CASUAL...")
SetAIDifficulty(1, -1)
SetTeamAggressiveness(CIS,(0.63))
SetTeamAggressiveness(REP,(0.63))
elseif ME5_Difficulty == 2 then
PrintLog("Proc_ScriptInit_Begin(): Initializing difficulty parameters for NORMAL...")
SetAIDifficulty(0, 0)
SetTeamAggressiveness(CIS,(0.73))
SetTeamAggressiveness(REP,(0.73))
elseif ME5_Difficulty == 3 then
PrintLog("Proc_ScriptInit_Begin(): Initializing difficulty parameters for VETERAN...")
SetAIDifficulty(-1, 1)
SetTeamAggressiveness(CIS,(0.83))
SetTeamAggressiveness(REP,(0.83))
elseif ME5_Difficulty == 4 then
PrintLog("Proc_ScriptInit_Begin(): Initializing difficulty parameters for HARDCORE...")
SetAIDifficulty(-2, 2)
SetTeamAggressiveness(CIS,(0.93))
SetTeamAggressiveness(REP,(0.93))
elseif ME5_Difficulty == 5 then
PrintLog("Proc_ScriptInit_Begin(): Initializing difficulty parameters for INSANITY...")
SetAIDifficulty(-3, 3)
SetTeamAggressiveness(CIS,(1.0))
SetTeamAggressiveness(REP,(1.0))
else
PrintLog("Proc_ScriptInit_Begin(): Error! ME5_Difficulty setting is invalid! Defaulting to difficulty parameters for HARDCORE")
SetAIDifficulty(-2, 2)
SetTeamAggressiveness(CIS,(0.93))
SetTeamAggressiveness(REP,(0.93))
end
else
PrintLog("Proc_ScriptInit_Begin(): Initializing difficulty parameters for MULTIPLAYER...")
-- NOTE: Apply a difficulty setting located between Hardcore and Insanity
SetAIDifficulty(-2, 2)
SetTeamAggressiveness(CIS,(0.95))
SetTeamAggressiveness(REP,(0.95))
end
-- What is Carnage Mode set to in the Config Tool?
if not ScriptCB_InMultiplayer() then
if ME5_CarnageMode == 0 then
PrintLog("Proc_ScriptInit_Begin(): Carnage Mode is DISABLED, deactivating weapon modifiers...")
elseif ME5_CarnageMode == 1 then
PrintLog("Proc_ScriptInit_Begin(): Carnage Mode is ENABLED, activating weapon modifiers...")
ActivateBonus(REP, "team_bonus_advanced_blasters")
ActivateBonus(CIS, "team_bonus_advanced_blasters")
else
PrintLog("Proc_ScriptInit_Begin(): Error! ME5_CarnageMode setting is invalid! Defaulting Carnage Mode setting to DISABLED")
end
else
PrintLog("Proc_ScriptInit_Begin(): Carnage Mode is ENABLED (MULTIPLAYER), activating weapon modifiers...")
ActivateBonus(REP, "team_bonus_advanced_blasters")
ActivateBonus(CIS, "team_bonus_advanced_blasters")
end
-- Load the appropriate faction CP icons
-- Which faction variation is active?
if not ScriptCB_InMultiplayer() then
if ME5_SideVar == 1 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamessv.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamegth.lvl")
elseif ME5_SideVar == 2 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamessv.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamecol.lvl")
elseif ME5_SideVar == 3 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingameevg.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamegth.lvl")
elseif ME5_SideVar == 4 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingameevg.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamecol.lvl")
elseif ME5_SideVar == 5 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamessv.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamecol.lvl")
elseif ME5_SideVar == 6 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamessv.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamegth.lvl")
-- ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamecer.lvl")
end
else
if self.onlineSideVar == "SSVxGTH" or self.onlineSideVar == 1 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamessv.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamegth.lvl")
elseif self.onlineSideVar == "SSVxCOL" or self.onlineSideVar == 2 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamessv.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamecol.lvl")
elseif self.onlineSideVar == "EVGxGTH" or self.onlineSideVar == 3 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingameevg.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamegth.lvl")
elseif self.onlineSideVar == "EVGxCOL" or self.onlineSideVar == 4 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingameevg.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamecol.lvl")
elseif self.onlineSideVar == "SSVxRPR" or self.onlineSideVar == 5 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamessv.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamecol.lvl")
elseif self.onlineSideVar == "SSVxCER" or self.onlineSideVar == 6 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamessv.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamegth.lvl")
-- ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamecer.lvl")
end
end
-- Load our custom shell stuff
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\common.lvl")
-- What is the shell style set to in the Config Tool?
if ME5_CustomGUIEnabled == 1 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\me5shell.lvl")
elseif ME5_CustomGUIEnabled == 2 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\me3shell.lvl")
end
-- Load localization
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\core.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\corebase.lvl")
-- Get the player's aspect ratio so we can load the proper sniperscope sizes
local screenWidth, screenHeight = ScriptCB_GetScreenInfo()
local aspectRatio = screenWidth / screenHeight
PrintLog("Proc_ScriptInit_Begin():", "Width: "..screenWidth, "Height: "..screenHeight..", Aspect Ratio: "..aspectRatio)
--==========================
-- START HUD WORK
--==========================
-- Is the custom HUD enabled in the Config Tool?
if ME5_CustomHUD == 1 then
PrintLog("Proc_ScriptInit_Begin(): Loading custom HUD")
-- Load the Myriad Pro fonts
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_font.lvl")
-- Load the Korataki fonts
-- Is the player screen's width greater than or equal to 1440?
if screenWidth >= 1440 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_font_large.lvl")
else
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_font_small.lvl")
end
-- Load MEU's ingame.lvl
if not ScriptCB_InMultiplayer() then
if ME5_SideVar == 1 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxGTH.lvl")
elseif ME5_SideVar == 2 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxCOL.lvl")
elseif ME5_SideVar == 3 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_EVGxGTH.lvl")
elseif ME5_SideVar == 4 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_EVGxCOL.lvl")
elseif ME5_SideVar == 5 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxRPR.lvl")
SetClassProperty("rpr_bldg_cannibalize_unbuilt", "Team", CIS)
elseif ME5_SideVar == 6 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxCER.lvl")
end
else
if self.onlineSideVar == "SSVxGTH" or self.onlineSideVar == 1 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxGTH.lvl")
elseif self.onlineSideVar == "SSVxCOL" or self.onlineSideVar == 2 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxCOL.lvl")
elseif self.onlineSideVar == "EVGxGTH" or self.onlineSideVar == 3 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_EVGxGTH.lvl")
elseif self.onlineSideVar == "EVGxCOL" or self.onlineSideVar == 4 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_EVGxCOL.lvl")
elseif self.onlineSideVar == "SSVxRPR" or self.onlineSideVar == 5 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxRPR.lvl")
SetClassProperty("rpr_bldg_cannibalize_unbuilt", "Team", CIS)
elseif self.onlineSideVar == "SSVxCER" or self.onlineSideVar == 6 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxCER.lvl")
end
end
-- Purge the stock HUD mshs
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_purge_msh.lvl")
-- Load the stock ingame.lvl
ReadDataFile("ingame.lvl")
-- Purge the stock HUD textures
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_purge_bmp.lvl")
-- Purge the stock objective markers
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_purge_obj_marker.lvl;stock")
-- Load the new custom HUD and the objective screen text based on the game mode
-- What is the active game mode? (NOTE: This is set near the beginning of each game mode's objective script)
if self.gameMode == "1flag" then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_mode_1flag.lvl")
elseif self.gameMode == "conquest" then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_mode_con.lvl")
elseif self.gameMode == "ctf" then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_mode_ctf.lvl")
elseif self.gameMode == "siege" then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_mode_siege.lvl")
elseif self.gameMode == "survival" then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_mode_surv.lvl")
elseif self.gameMode == "tdm" then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_mode_tdm.lvl")
elseif self.gameMode == "campaign" then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_mode_campaign.lvl")
else
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud.lvl")
end
-- Load weapons.lvl for the MEU HUD
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\weapons.lvl;hud_meu")
-- Hotfix that overrides the stock fonts with a "blank font"
--ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_purge_text.lvl")
else
-- Load MEU's ingame.lvl
if not ScriptCB_InMultiplayer() then
if ME5_SideVar == 1 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxGTH.lvl")
elseif ME5_SideVar == 2 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxCOL.lvl")
elseif ME5_SideVar == 3 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_EVGxGTH.lvl")
elseif ME5_SideVar == 4 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_EVGxCOL.lvl")
elseif ME5_SideVar == 5 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxRPR.lvl")
elseif ME5_SideVar == 6 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxCER.lvl")
end
else
if self.onlineSideVar == "SSVxGTH" or self.onlineSideVar == 1 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxGTH.lvl")
elseif self.onlineSideVar == "SSVxCOL" or self.onlineSideVar == 2 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxCOL.lvl")
elseif self.onlineSideVar == "EVGxGTH" or self.onlineSideVar == 3 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_EVGxGTH.lvl")
elseif self.onlineSideVar == "EVGxCOL" or self.onlineSideVar == 4 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_EVGxCOL.lvl")
elseif self.onlineSideVar == "SSVxRPR" or self.onlineSideVar == 5 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxRPR.lvl")
elseif self.onlineSideVar == "SSVxCER" or self.onlineSideVar == 6 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingame_SSVxCER.lvl")
end
end
-- Load the stock ingame.lvl
ReadDataFile("ingame.lvl")
-- Load weapons.lvl for the stock HUD
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\weapons.lvl;hud_stock")
-- Load the new onscreen pointer textures
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ingamehud.lvl")
-- Is the game mode conquest or siege?
if self.gameMode == "conquest" or self.gameMode == "siege" then
-- Purge the stock objective markers
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_purge_obj_marker.lvl;stock")
-- Load the Conquest objective markers
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_stock_conquest.lvl")
end
end
-- Calculate the aspect ratio
if aspectRatio <= 1.4 then
aspectRatioStr = "4:3"
elseif aspectRatio <= 1.63 and aspectRatio >= 1.5 then
aspectRatioStr = "16:10"
elseif aspectRatio <= 1.9 and aspectRatio >= 1.63 then
aspectRatioStr = "16:9"
end
-- What is the aspect ratio of the player's display?
if aspectRatioStr == "4:3" then
PrintLog("Proc_ScriptInit_Begin(): Aspect Ratio is 4:3, loading scopes as such")
if self.gameMode == "conquest" or self.gameMode == "siege" then
PrintLog("Proc_ScriptInit_Begin(): Game mode is Conquest or Siege ("..self.gameMode.."), also loading CP objective markers")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar43\\ar.lvl;conquest")
else
PrintLog("Proc_ScriptInit_Begin(): Game mode is not Conquest or Siege")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar43\\ar.lvl")
end
elseif aspectRatioStr == "16:10" then
PrintLog("Proc_ScriptInit_Begin(): Aspect Ratio is 16:10, loading scopes as such")
if self.gameMode == "conquest" or self.gameMode == "siege" then
PrintLog("Proc_ScriptInit_Begin(): Game mode is Conquest or Siege ("..self.gameMode.."), also loading CP objective markers")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar1610\\ar.lvl;conquest")
else
PrintLog("Proc_ScriptInit_Begin(): Game mode is not Conquest or Siege")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar1610\\ar.lvl")
end
elseif aspectRatioStr == "16:9" then
PrintLog("Proc_ScriptInit_Begin(): Aspect Ratio is 16:9, loading scopes as such")
if self.gameMode == "conquest" or self.gameMode == "siege" then
PrintLog("Proc_ScriptInit_Begin(): Game mode is Conquest or Siege ("..self.gameMode.."), also loading CP objective markers")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar169\\ar.lvl;conquest")
else
PrintLog("Proc_ScriptInit_Begin(): Game mode is not Conquest or Siege")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar169\\ar.lvl")
end
else
PrintLog("Proc_ScriptInit_Begin(): Error! Invalid aspect ratio ("..aspectRatio..")! Defaulting to workaround")
if self.gameMode == "conquest" or self.gameMode == "siege" then
PrintLog("Proc_ScriptInit_Begin(): Game mode is Conquest or Siege ("..self.gameMode.."), also loading CP objective markers")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar.lvl;conquest")
else
PrintLog("Proc_ScriptInit_Begin(): Game mode is not Conquest or Siege")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ar\\ar.lvl")
end
end
-- Is this a non-conquest/non-siege match?
if self.gameMode ~= "conquest" and self.gameMode ~= "siege" then
-- Purge the Conquest objective marker icons
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_purge_obj_marker.lvl")
-- Load the normal objective marker icons
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\hud_obj_marker_stock.lvl")
end
--==========================
-- END HUD WORK
--==========================
--==========================
-- START SOUND WORK
--==========================
-- Load master sound LVL, includes sound property templates, buses, etc.
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\ME5.lvl")
-- [DEPRECATED 31-OCT-2013] Load music sound LVL, includes all music stuff
--ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_MUS_Streaming.lvl")
-- Load hero music sound LVL, includes all hero music
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_MUS_h_Streaming.lvl")
-- Load voice over sound LVL, includes all streamable voice overs, excludes pain/death chatter
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_vo_Streaming.lvl")
---
-- Loads common sound LVL, includes many common sounds such as foley, explosions, prop sfx, etc. Also loads weapon sound LVL, includes all weapon sounds.
-- @param factionVariation The name or ID of the faction variation whose sounds we're loading.
local function LoadFactionSounds(factionVariation) -- TODO: finish setting up hero sounds
-- ===============================
-- ALLIANCE VS. HERETIC GETH
-- ===============================
if factionVariation == 1 or factionVariation == "SSVxGTH" then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Faction combination is SSVxGTH, loading associated common/wpn sound files")
if string.find(SSVHeroClass, "shepard") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading SHEPARD data files...")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_Shepard_NonStreaming.lvl")
elseif (string.find(SSVHeroClass, "cooper") or (gLoadCooper and gLoadCooper == true)) then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading COOPER data files...")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_Cooper_NonStreaming.lvl")
elseif string.find(SSVHeroClass, "jack") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading JACK data files...")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_Jack_NonStreaming.lvl")
elseif string.find(SSVHeroClass, "legion") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading LEGION data files...")
elseif string.find(SSVHeroClass, "samara") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading SAMARA data files...")
else
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading normal data files...")
end
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_GTH_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_SSV_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Foley_NonStreaming.lvl", "terrain_"..self.terrainFoleyGroup)
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_GTH_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_NonStreaming.lvl")
-- ===============================
-- ALLIANCE VS. COLLECTORS
-- ===============================
elseif factionVariation == 2 or factionVariation == "SSVxCOL" then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Faction combination is SSVxCOL, loading associated common/wpn sound files")
if string.find(SSVHeroClass, "shepard") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading SHEPARD data files...")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_Shepard_NonStreaming.lvl")
elseif (string.find(SSVHeroClass, "cooper") or (gLoadCooper and gLoadCooper == true)) then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading COOPER data files...")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_Cooper_NonStreaming.lvl")
elseif string.find(SSVHeroClass, "jack") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading JACK data files...")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_Jack_NonStreaming.lvl")
elseif string.find(SSVHeroClass, "legion") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading LEGION data files...")
elseif string.find(SSVHeroClass, "samara") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading SAMARA data files...")
else
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading normal data files...")
end
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_COL_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_SSV_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Foley_NonStreaming.lvl", "terrain_"..self.terrainFoleyGroup)
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_COL_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_NonStreaming.lvl")
-- ===============================
-- EVOLVED GETH VS. HERETIC GETH
-- ===============================
elseif factionVariation == 3 or factionVariation == "EVGxGTH" then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Faction combination is EVGxGTH, loading associated common/wpn sound files")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_GTH_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Foley_NonStreaming.lvl", "terrain_"..self.terrainFoleyGroup)
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_GTH_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_NonStreaming.lvl")
-- ===============================
-- EVOLVED GETH VS. COLLECTORS
-- ===============================
elseif factionVariation == 4 or factionVariation == "EVGxCOL" then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Faction combination is EVGxCOL, loading associated common/wpn sound files")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_COL_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_GTH_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Foley_NonStreaming.lvl", "terrain_"..self.terrainFoleyGroup)
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_COL_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_GTH_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_NonStreaming.lvl")
-- ===============================
-- ALLIANCE VS. REAPERS
-- ===============================
elseif factionVariation == 5 or factionVariation == "SSVxRPR" then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Faction combination is SSVxRPR, loading associated common/wpn sound files")
if string.find(SSVHeroClass, "shepard") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading SHEPARD data files...")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_Shepard_NonStreaming.lvl")
elseif (string.find(SSVHeroClass, "cooper") or (gLoadCooper and gLoadCooper == true)) then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading COOPER data files...")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_Cooper_NonStreaming.lvl")
elseif string.find(SSVHeroClass, "jack") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading JACK data files...")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_Jack_NonStreaming.lvl")
elseif string.find(SSVHeroClass, "legion") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading LEGION data files...")
elseif string.find(SSVHeroClass, "samara") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading SAMARA data files...")
else
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading normal data files...")
end
-- ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_RPR_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_SSV_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_RPR_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Foley_NonStreaming.lvl", "terrain_"..self.terrainFoleyGroup)
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_RPR_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_NonStreaming.lvl")
-- ===============================
-- ALLIANCE VS. CERBERUS
-- ===============================
elseif factionVariation == 6 or factionVariation == "SSVxCER" then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Faction combination is SSVxCER, loading associated common/wpn sound files")
if string.find(SSVHeroClass, "shepard") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading SHEPARD data files...")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_Shepard_NonStreaming.lvl")
elseif (string.find(SSVHeroClass, "cooper") or (gLoadCooper and gLoadCooper == true)) then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading COOPER data files...")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_Cooper_NonStreaming.lvl")
elseif string.find(SSVHeroClass, "jack") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading JACK data files...")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_Jack_NonStreaming.lvl")
elseif string.find(SSVHeroClass, "legion") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading LEGION data files...")
elseif string.find(SSVHeroClass, "samara") then
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading SAMARA data files...")
else
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Loading normal data files...")
end
-- ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_CER_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_SSV_SSV_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_CER_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Foley_NonStreaming.lvl", "terrain_"..self.terrainFoleyGroup)
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_CER_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_NonStreaming.lvl")
else
PrintLog("Proc_ScriptInit_Begin.LoadFactionSounds(): Faction combination is invalid, loading common/wpn sound files for EVGxCOL as workaround")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_COL_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_GTH_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Common_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_Foley_NonStreaming.lvl", "terrain_"..self.terrainFoleyGroup)
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_COL_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_GTH_NonStreaming.lvl")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_WPN_NonStreaming.lvl")
end
end
if not ScriptCB_InMultiplayer() then
LoadFactionSounds(ME5_SideVar)
else
LoadFactionSounds(self.onlineSideVar)
end
--==========================
-- END SOUND WORK
--==========================
-- Call exterior functions
Init_HealthFunc()
Init_ShieldFunc()
Init_DeferredShieldRegen()
Init_BruteHealthRegen()
Init_KillSounds()
--Init_LowHealthFeedback()
Init_EvolvedJuggernautPowerDrain()
Init_Weapon_Charge()
Init_Weapon_DOT()
Init_Weapon_DispenseSeekers()
Init_Weapon_SeekerSuicide()
Init_Weapon_DispenseSwarmers()
Init_Weapon_SwarmerSuicide()
Init_Weapon_ShieldPylon()
if self.bIsArtilleryEnabled == true then
if self.terrainType == "dirt" then
PrintLog("Proc_ScriptInit_Begin(): Loading artillery textures for dirt")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ME5\\artillery_dirt.lvl")
elseif self.terrainType == "snow" then
PrintLog("Proc_ScriptInit_Begin(): Loading artillery textures for snow")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ME5\\artillery_snow.lvl")
elseif self.terrainType == "sand" then -- it gets everywhere
PrintLog("Proc_ScriptInit_Begin(): Loading artillery textures for sand")
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ME5\\artillery_sand.lvl")
end
end
end
---
-- Call this where the normal side setup stuff is called in ScriptInit.
--
-- Calls the functions necessary for the chosen faction combination (based on int var, ME5_SideVar). No params required.
--
function MapManager:Proc_ScriptInit_SideSetup()
if not ScriptCB_InMultiplayer() then
if ME5_SideVar == 1 then
Setup_SSVxGTH()
elseif ME5_SideVar == 2 then
Setup_SSVxCOL()
elseif ME5_SideVar == 3 then
Setup_EVGxGTH()
elseif ME5_SideVar == 4 then
Setup_EVGxCOL()
elseif ME5_SideVar == 5 then
Setup_SSVxRPR()
Init_Weapon_Cannibalize() -- This needs to be called here because of the class initialization
Init_Weapon_AcidDrop()
elseif ME5_SideVar == 6 then
Setup_SSVxCER()
end
else
if self.onlineSideVar == "SSVxGTH" or self.onlineSideVar == 1 then
Setup_SSVxGTH()
elseif self.onlineSideVar == "SSVxCOL" or self.onlineSideVar == 2 then
Setup_SSVxCOL()
elseif self.onlineSideVar == "EVGxGTH" or self.onlineSideVar == 3 then
Setup_EVGxGTH()
elseif self.onlineSideVar == "EVGxCOL" or self.onlineSideVar == 4 then
Setup_EVGxCOL()
elseif self.onlineSideVar == "SSVxRPR" or self.onlineSideVar == 5 then
Setup_SSVxRPR()
Init_Weapon_Cannibalize()
Init_Weapon_AcidDrop()
elseif self.onlineSideVar == "SSVxCER" or self.onlineSideVar == 6 then
Setup_SSVxCER()
end
end
end
---
-- Call this directly after the memory pools are set.
--
-- Sets "global" memory pools such as `FlagItem`, `EntityPortableTurret`, and `MountedTurret`.
--
function MapManager:Proc_ScriptInit_MemoryPoolInit()
PrintLog("Proc_ScriptInit_MemoryPoolInit(): Entered")
AddWalkerType(0, NUM_RAVAGERS) -- number of ravagers
-- Need to account for (carried) flags
if self.gameMode == "1flag" or self.gameMode == "ctf" then
SetMemoryPoolSize("EntityCloth", 4)
end
SetMemoryPoolSize("FlagItem", MAX_FLAG_ITEM_COUNT)
SetMemoryPoolSize("EntityPortableTurret", MAX_PORTABLE_TURRET_COUNT)
SetMemoryPoolSize("MountedTurret", MAX_PORTABLE_TURRET_COUNT)
end
---
-- Call this where the normal music setup stuff is called in ScriptInit.
--
-- Calls the functions that load the music.
--
function MapManager:Proc_ScriptInit_MusicSetup()
PrintLog("Proc_ScriptInit_MusicSetup(): Entered")
-- The music variation to set up
local variation = nil
-- What's the faction combination for this map?
if ME5_SideVar == 1 or (ScriptCB_InMultiplayer() and self.onlineSideVar == "SSVxGTH") then
PrintLog("Proc_ScriptInit_MusicSetup(): Variation is SSVxGTH")
variation = self.musicVariation_SSVxGTH
elseif ME5_SideVar == 2 or (ScriptCB_InMultiplayer() and self.onlineSideVar == "SSVxCOL") then
PrintLog("Proc_ScriptInit_MusicSetup(): Variation is SSVxCOL")
variation = self.musicVariation_SSVxCOL
elseif ME5_SideVar == 3 or (ScriptCB_InMultiplayer() and self.onlineSideVar == "EVGxGTH") then
PrintLog("Proc_ScriptInit_MusicSetup(): Variation is EVGxGTH")