-
Notifications
You must be signed in to change notification settings - Fork 1
/
ME5_Master.lua
325 lines (272 loc) · 8.98 KB
/
ME5_Master.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
-----------------------------------------------------------------
-----------------------------------------------------------------
-- MASS EFFECT: UNIFICATION Master Script by Aaron Gilbert
-- Build 40404/06
-- Screen Names: Marth8880, GT-Marth8880, [GT] Marth8880, [GT] Bran
-- E-Mail: [email protected]
-- Apr 4, 2017
-- Copyright (c) 2017, Aaron Gilbert All rights reserved.
--
-- About:
-- This is MEU's master include script. It sets some global variables and loads the other scripts.
--
--
-- 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_Master";
local debug = true
local function PrintLog(...)
if debug == true then
print("["..__SCRIPT_NAME.."]", unpack(arg));
end
end
PrintLog("Entered")
ScriptCB_DoFile("ME5_BuildInfo");
MEU_ReleaseNum = "7"
MEU_VersionNum = "1.4"
PrintLog("Mass Effect: Unification is currently running on Build "..MEU_BuildNum..", Release "..MEU_ReleaseNum..", Version "..MEU_VersionNum)
PrintLog("Performing garbage collection...")
ME5_AIHeroes = nil
ME5_CarnageMode = nil
ME5_CustomGUIEnabled = nil
ME5_CustomHUD = nil
ME5_Difficulty = nil
ME5_FactionVO = nil
ME5_HealthFunc = nil
ME5_HeroClassCOL = nil
ME5_HeroClassEVG = nil
ME5_HeroClassGTH = nil
ME5_HeroClassSSV = nil
ME5_HitMarkerSound = nil
ME5_KillSound = nil
ME5_LowHealthSound = nil
ME5_MapVarEDN = nil
ME5_MapVarVRM = nil
ME5_PlayerDmgSound = nil
ME5_ShepardClass = nil
ME5_ShepardGender = nil
ME5_ShieldFunc = nil
ME5_ShieldRegen = nil
ME5_SideVar = nil
ME5_SolMapMusic = nil
gCurrentMapManager = nil
gVoiceStream = nil
bVoiceStreamKeepClosed = false
-- Set to false if not already set
gLoadCooper = gLoadCooper or false
--mapSize = nil
MEU_GameMode = MEU_GameMode or nil
--environmentType = nil
--onlineSideVar = nil
--onlineHeroSSV = nil
--onlineHeroGTH = nil
--onlineHeroCOL = nil
--onlineHeroEVG = nil
xxs = nil
xs = nil
sm = nil
med = nil
lg = nil
xl = nil
meu_1flag = nil
meu_con = nil
meu_ctf = nil
meu_siege = nil
meu_surv = nil
meu_tdm = nil
meu_campaign = nil
SSVxGTH = nil
SSVxCOL = nil
EVGxGTH = nil
EVGxCOL = nil
shep_soldier = nil
shep_infiltrator = nil
shep_engineer = nil
shep_adept = nil
shep_sentinel = nil
shep_vanguard = nil
coop_soldier = nil
coop_infiltrator = nil
coop_engineer = nil
coop_adept = nil
coop_sentinel = nil
coop_vanguard = nil
gethprime_me2 = nil
gethprime_me3 = nil
colgeneral = nil
ssv_inf_soldier = nil
ssv_inf_infiltrator = nil
ssv_inf_adept = nil
ssv_inf_engineer = nil
ssv_inf_sentinel = nil
ssv_inf_vanguard = nil
gth_inf_trooper = nil
gth_inf_rocketeer = nil
gth_inf_sniper = nil
gth_inf_machinist = nil
gth_inf_hunter = nil
gth_inf_shock = nil
gth_inf_destroyer = nil
gth_inf_juggernaut = nil
col_inf_captain = nil
col_inf_guardian = nil
col_inf_praetorian = nil
gth_ev_inf_trooper = nil
gth_ev_inf_infiltrator = nil
gth_ev_inf_rocketeer = nil
gth_ev_inf_engineer = nil
gth_ev_inf_hunter = nil
gth_ev_inf_pyro = nil
gth_ev_inf_juggernaut = nil
rpr_inf_marauder = nil
rpr_inf_banshee = nil
snd_REP_cpCapture_ally = nil
snd_REP_cpCapture_enemy = nil
snd_REP_cpLost_ally = nil
snd_REP_cpLost_enemy = nil
snd_CIS_cpCapture_ally = nil
snd_CIS_cpCapture_enemy = nil
snd_CIS_cpLost_ally = nil
snd_CIS_cpLost_enemy = nil
snd_SSV_cpCapture_ally = nil
snd_SSV_cpCapture_enemy = nil
snd_SSV_cpLost_ally = nil
snd_SSV_cpLost_enemy = nil
snd_GTH_cpCapture_ally = nil
snd_GTH_cpCapture_enemy = nil
snd_GTH_cpLost_ally = nil
snd_GTH_cpLost_enemy = nil
snd_COL_cpCapture_ally = nil
snd_COL_cpCapture_enemy = nil
snd_COL_cpLost_ally = nil
snd_COL_cpLost_enemy = nil
snd_EVG_cpCapture_ally = nil
snd_EVG_cpCapture_enemy = nil
snd_EVG_cpLost_ally = nil
snd_EVG_cpLost_enemy = nil
shieldDropCnt = nil
team1ticketstring = nil
team2ticketstring = nil
ssvEngCnt = nil
BroShepClass = nil
SSVHeroClass = nil
GTHHeroClass = nil
COLHeroClass = nil
EVGHeroClass = nil
DecidedCOLHeroClass = nil
DecidedEVGHeroClass = nil
DecidedGTHHeroClass = nil
DecidedSSVHeroClass = nil
MusicVariation = nil
DecideMus02StartVar = nil
DecideMus02MidVar = nil
DecideMus02EndVar = nil
DecideMus04Var = nil
DecideMus05Var = nil
DecideMus06Var = nil
-- Declare constants
MAX_FACTION_COUNT = 6 -- Number of factions.
MAX_SSV_HERO_COUNT = 2 -- Number of Systems Alliance heroes.
MAX_GTH_HERO_COUNT = 2 -- Number of Heretic Geth heroes.
MAX_COL_HERO_COUNT = 1 -- Number of Collector heroes.
MAX_EVG_HERO_COUNT = 2 -- Number of Evolved Geth heroes.
MAX_SHEP_CLASS_COUNT = 6 -- Number of Shepard's unit classes.
MAX_SHEP_GENDER_COUNT = 1 -- Number of Shepard's genders.
MAX_FLAG_ITEM_COUNT = 512 -- Number of FlagItem entities.
MAX_PORTABLE_TURRET_COUNT = 150 -- Number of PortableTurret entities.
NUM_RAVAGERS = 0 -- Number of Ravager units. Note: This gets set later on.
BRUTE_KILL_HEALTH_REGEN = 20 -- Amount of health to reheal a Brute by whenever it makes a kill.
CANNIBALIZE_HEALTH_MAX = 800 -- Amount of health to reheal a Cannibal by whenever it Cannibalizes a corpse.
MAX_CANNIBALIZE_CORPSE_COUNT = 10 -- Maximum allowed number of Cannibalize corpses.
CANNIBALIZE_CORPSE_DROP_CHANCE = 0.2 -- Chances of a Cannibalize corpse being dropped.
MAX_RAVAGER_ACID_COUNT = 10 -- Maximum allowed number of Ravager acid turrets.
RAVAGER_ACID_DROP_CHANCE = 1.0 -- Chances of a Ravager acid turret being dropped.
NUM_SWARMERS_PER_RAVAGER = 6 -- Number of Swarmers a Ravager can spawn.
MIN_SHIELDS_DMG_FEEDBACK = 25.0 -- Minimum amount of shields a target unit can have for the shield impact sfx to play.
NUM_SEEKERS_PER_CAPTAIN = 1 -- Number of Seeker Swarms a Collector Captain can spawn.
UNIT_HEALTH_REGEN_RATE = 4.0 -- Regen rate for auto-regenerating health.
-- Declare global enum variables
xxs = 1
xs = 2
sm = 3
med = 4
lg = 5
xl = 6
meu_1flag = 1
meu_con = 2
meu_ctf = 3
meu_siege = 4
meu_surv = 5
meu_tdm = 6
meu_campaign = 7
SSVxGTH = 1
SSVxCOL = 2
EVGxGTH = 3
EVGxCOL = 4
SSVxRPR = 5
EnvTypeDesert = 1
EnvTypeJungle = 2
EnvTypeSnow = 3
EnvTypeUrban = 4
shep_soldier = 1
shep_infiltrator = 2
shep_engineer = 3
shep_adept = 4
shep_sentinel = 5
shep_vanguard = 6
gethprime_me2 = 1
gethprime_me3 = 2
colgeneral = 1
gethprime_me3 = 1
-- CP voice over strings
snd_SSV_cpCapture_ally = "ssv_adm_com_report_captured_commandpost"
snd_SSV_cpCapture_enemy = "ssv_adm_com_report_enemyCaptured_commandpost"
snd_SSV_cpLost_ally = "ssv_adm_com_report_lost_commandpost"
snd_SSV_cpLost_enemy = "ssv_adm_com_report_enemyLost_commandpost"
snd_GTH_cpCapture_ally = "gth_ann_com_report_captured_commandpost"
snd_GTH_cpCapture_enemy = "gth_ann_com_report_enemyCaptured_commandpost"
snd_GTH_cpLost_ally = "gth_ann_com_report_lost_commandpost"
snd_GTH_cpLost_enemy = "gth_ann_com_report_enemyLost_commandpost"
snd_COL_cpCapture_ally = "col_gen_com_report_captured_commandpost"
snd_COL_cpCapture_enemy = "col_gen_com_report_enemyCaptured_commandpost"
snd_COL_cpLost_ally = "col_gen_com_report_lost_commandpost"
snd_COL_cpLost_enemy = "col_gen_com_report_enemyLost_commandpost"
snd_EVG_cpCapture_ally = "evg_prm_com_report_captured_commandpost"
snd_EVG_cpCapture_enemy = "evg_prm_com_report_enemyCaptured_commandpost"
snd_EVG_cpLost_ally = "evg_prm_com_report_lost_commandpost"
snd_EVG_cpLost_enemy = "evg_prm_com_report_enemyLost_commandpost"
-- Load custom scripts, designer-specified globals & player stats points
ScriptCB_DoFile("ME5_Common")
if isLowG == 1 then
ScriptCB_DoFile("ME5_globals_lowg")
else
ScriptCB_DoFile("ME5_globals")
end
ScriptCB_DoFile("ME5_points")
ScriptCB_DoFile("ME5_ConfigCheck")
--ScriptCB_DoFile("ME5_HUD_LowHealth")
ScriptCB_DoFile("ME5_HealthShieldFunc")
ScriptCB_DoFile("ME5_DamageFeedback")
ScriptCB_DoFile("ME5_KillSounds")
ScriptCB_DoFile("ME5_LowHealthFeedback")
ScriptCB_DoFile("ME5_GethJuggernautFunc")
ScriptCB_DoFile("ME5_Weapons")
ScriptCB_DoFile("ME5_MapManager")
ScriptCB_DoFile("ME5_RandomSides")
ScriptCB_DoFile("ME5_AudioFunctions")
ScriptCB_DoFile("ME5_UtilityFunctions")
--ScriptCB_DoFile("ME5_LowHealthIFS")
-- HUD font stuff
if ME5_CustomHUD == 1 then
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\scr_hud_fontfix.lvl")
ReadDataFile("common.lvl")
else
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\scr_hud_stockifs.lvl")
ReadDataFile("common.lvl")
end
PrintLog("Exited")