Skip to content

Commit 2247644

Browse files
committed
- EURn_c.lua: added debug parameters
- EURn_c.lua: removed old combat system code - EURn_c.lua: implemented SmartSpawn system - EURn_c.lua: finished adding demo functionality - EURn_c.lua: added more debug commands to Fake Console - kam1n_siege.lua: added 7th CP - kam1n_siege.lua: fixed SoldierAnimation memory pool issue - tat2n_con.lua & tat2n_siege.lua: changed artillery pfx to load new 'sand' variation - yav1n_con.lua: fixed various memory pool issues - yav1n_con.lua: fixed issue with loading two ambient sound streams simultaneously - ME5_CombatManager.lua: implemented SmartSpawn mechanic - ME5_ConfigCheck.lua: added conditions for Player Damage Sounds option - ME5_MiscFunctions.lua: rearranged HUD-loading code - ME5_MiscFunctions.lua: added conditions for loading Conquest-/Siege-unique objective icons - ME5_MiscFunctions.lua: reworked code that loads common/weapon sound lvls - ME5_MiscFunctions.lua: implemented Player Damage Sounds feature - ME5_ObjectiveBFConquest.lua: began reworking ticket bleed mechanic - ME5_ObjectiveBFConquest.lua: added conditions to set starting ticket counts based on map size - ME5_ObjectiveBFConquest.lua: added ability for designers to manually set starting ticket counts - ME5_RandomSides.lua: fixed spawning bug with Alliance units in 'xs' map size - added custom_gc_12.lua that loads alters missionlist.lua script that removes the "Respawn" button from EURn_c
1 parent d1449e3 commit 2247644

18 files changed

Lines changed: 7127 additions & 779 deletions

ME5/EURn_c.lua

Lines changed: 611 additions & 542 deletions
Large diffs are not rendered by default.

ME5/EXAMPLEn_c.lua

Lines changed: 4514 additions & 0 deletions
Large diffs are not rendered by default.

ME5/EXAMPLEn_con.lua

Lines changed: 294 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,294 @@
1+
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\master.lvl")
2+
RandomSide = math.random(1,4)
3+
4+
isModMap = 1
5+
--
6+
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
7+
--
8+
9+
ScriptCB_DoFile("ME5_Master")
10+
ScriptCB_DoFile("ME5_setup_teams")
11+
ScriptCB_DoFile("ME5_ObjectiveConquest")
12+
13+
-- Map-specific data fields
14+
mapSize = sm -- The size of the map. Used for determining unit counts.
15+
EnvironmentType = 2 -- The map's biome (essentially). Used for determining which camo textures to load.
16+
onlineSideVar = SSVxGTH -- The side variation to use in online matches.
17+
onlineHeroSSV = shep_engineer -- The SSV hero to use in online matches.
18+
onlineHeroGTH = gethprime_me2 -- The GTH hero to use in online matches.
19+
onlineHeroCOL = colgeneral -- The COL hero to use in online matches.
20+
onlineHeroEVG = gethprime_me3 -- The EVG hero to use in online matches.
21+
22+
-- Randomize the teams' starting spawns
23+
if not ScriptCB_InMultiplayer() then
24+
CIS = math.random(1,2)
25+
REP = (3 - CIS)
26+
else
27+
REP = 1
28+
CIS = 2
29+
end
30+
31+
HuskTeam = 3
32+
33+
ATT = 1
34+
DEF = 2
35+
36+
37+
function SSVxGTH_PostLoad()
38+
if not ScriptCB_InMultiplayer() then
39+
DecideSSVHeroClass()
40+
DecideGTHHeroClass()
41+
if ME5_AIHeroes == 0 then
42+
SetHeroClass(REP, SSVHeroClass)
43+
SetHeroClass(CIS, GTHHeroClass)
44+
elseif ME5_AIHeroes == 1 then
45+
herosupport = AIHeroSupport:New{AIATTHeroHealth = 3000, AIDEFHeroHealth = 3000, gameMode = "NonConquest",}
46+
herosupport:SetHeroClass(REP, SSVHeroClass)
47+
herosupport:SetHeroClass(CIS, GTHHeroClass)
48+
herosupport:AddSpawnCP("cp1","cp1_spawn")
49+
herosupport:AddSpawnCP("cp2","cp2_spawn")
50+
herosupport:AddSpawnCP("cp3","cp3_spawn")
51+
herosupport:AddSpawnCP("cp4","cp4_spawn")
52+
herosupport:Start()
53+
end
54+
end
55+
end
56+
57+
function SSVxCOL_PostLoad()
58+
if not ScriptCB_InMultiplayer() then
59+
DecideSSVHeroClass()
60+
DecideCOLHeroClass()
61+
if ME5_AIHeroes == 0 then
62+
SetHeroClass(REP, SSVHeroClass)
63+
SetHeroClass(CIS, COLHeroClass)
64+
elseif ME5_AIHeroes == 1 then
65+
herosupport = AIHeroSupport:New{AIATTHeroHealth = 3000, AIDEFHeroHealth = 3000, gameMode = "NonConquest",}
66+
herosupport:SetHeroClass(REP, SSVHeroClass)
67+
herosupport:SetHeroClass(CIS, COLHeroClass)
68+
herosupport:AddSpawnCP("cp1","cp1_spawn")
69+
herosupport:AddSpawnCP("cp2","cp2_spawn")
70+
herosupport:AddSpawnCP("cp3","cp3_spawn")
71+
herosupport:AddSpawnCP("cp4","cp4_spawn")
72+
herosupport:Start()
73+
end
74+
end
75+
end
76+
77+
function EVGxGTH_PostLoad()
78+
if not ScriptCB_InMultiplayer() then
79+
DecideEVGHeroClass()
80+
DecideGTHHeroClass()
81+
if ME5_AIHeroes == 0 then
82+
SetHeroClass(REP, EVGHeroClass)
83+
SetHeroClass(CIS, GTHHeroClass)
84+
elseif ME5_AIHeroes == 1 then
85+
herosupport = AIHeroSupport:New{AIATTHeroHealth = 3000, AIDEFHeroHealth = 3000, gameMode = "NonConquest",}
86+
herosupport:SetHeroClass(REP, EVGHeroClass)
87+
herosupport:SetHeroClass(CIS, GTHHeroClass)
88+
herosupport:AddSpawnCP("cp1","cp1_spawn")
89+
herosupport:AddSpawnCP("cp2","cp2_spawn")
90+
herosupport:AddSpawnCP("cp3","cp3_spawn")
91+
herosupport:AddSpawnCP("cp4","cp4_spawn")
92+
herosupport:Start()
93+
end
94+
end
95+
end
96+
97+
function EVGxCOL_PostLoad()
98+
if not ScriptCB_InMultiplayer() then
99+
DecideEVGHeroClass()
100+
DecideCOLHeroClass()
101+
if ME5_AIHeroes == 0 then
102+
SetHeroClass(REP, EVGHeroClass)
103+
SetHeroClass(CIS, COLHeroClass)
104+
elseif ME5_AIHeroes == 1 then
105+
herosupport = AIHeroSupport:New{AIATTHeroHealth = 3000, AIDEFHeroHealth = 3000, gameMode = "NonConquest",}
106+
herosupport:SetHeroClass(REP, EVGHeroClass)
107+
herosupport:SetHeroClass(CIS, COLHeroClass)
108+
herosupport:AddSpawnCP("cp1","cp1_spawn")
109+
herosupport:AddSpawnCP("cp2","cp2_spawn")
110+
herosupport:AddSpawnCP("cp3","cp3_spawn")
111+
herosupport:AddSpawnCP("cp4","cp4_spawn")
112+
herosupport:Start()
113+
end
114+
end
115+
end
116+
117+
function ScriptPostLoad()
118+
119+
120+
--This defines the CPs. These need to happen first
121+
cp1 = CommandPost:New{name = "cp1"}
122+
cp2 = CommandPost:New{name = "cp2"}
123+
cp3 = CommandPost:New{name = "cp3"}
124+
cp4 = CommandPost:New{name = "cp4"}
125+
126+
127+
128+
--This sets up the actual objective. This needs to happen after cp's are defined
129+
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
130+
textATT = "game.modes.con",
131+
textDEF = "game.modes.con2",
132+
multiplayerRules = true}
133+
134+
--This adds the CPs to the objective. This needs to happen after the objective is set up
135+
conquest:AddCommandPost(cp1)
136+
conquest:AddCommandPost(cp2)
137+
conquest:AddCommandPost(cp3)
138+
conquest:AddCommandPost(cp4)
139+
140+
-- Set up husk spawns
141+
SetProperty("cp1", "AllyPath", "cp1_spawn")
142+
SetProperty("cp2", "AllyPath", "cp2_spawn")
143+
SetProperty("cp3", "AllyPath", "cp3_spawn")
144+
SetProperty("cp4", "AllyPath", "cp4_spawn")
145+
146+
-- Set up goals
147+
ClearAIGoals(1)
148+
ClearAIGoals(2)
149+
AddAIGoal(1, "Conquest", 100)
150+
AddAIGoal(2, "Conquest", 100)
151+
AddAIGoal(HuskTeam, "Deathmatch", 100)
152+
153+
if not ScriptCB_InMultiplayer() then
154+
if ME5_SideVar == 0 then
155+
if RandomSide == 1 then
156+
SSVxGTH_PostLoad()
157+
elseif RandomSide == 2 then
158+
SSVxCOL_PostLoad()
159+
elseif RandomSide == 3 then
160+
EVGxGTH_PostLoad()
161+
elseif RandomSide == 4 then
162+
EVGxCOL_PostLoad()
163+
end
164+
elseif ME5_SideVar == 1 then
165+
SSVxGTH_PostLoad()
166+
elseif ME5_SideVar == 2 then
167+
SSVxCOL_PostLoad()
168+
elseif ME5_SideVar == 3 then
169+
EVGxGTH_PostLoad()
170+
elseif ME5_SideVar == 4 then
171+
EVGxCOL_PostLoad()
172+
end
173+
else
174+
SSVxGTH_PostLoad()
175+
end
176+
177+
conquest:Start()
178+
179+
EnableSPHeroRules()
180+
181+
end
182+
183+
184+
---------------------------------------------------------------------------
185+
-- FUNCTION: ScriptInit
186+
-- PURPOSE: This function is only run once
187+
-- INPUT:
188+
-- OUTPUT:
189+
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
190+
-- mission script must contain a version of this function, as
191+
-- it is called from C to start the mission.
192+
---------------------------------------------------------------------------
193+
function ScriptInit()
194+
-- Load our loadscreen
195+
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\Load\\t4e.lvl")
196+
197+
SetMemoryPoolSize("ParticleTransformer::ColorTrans", 2367)
198+
SetMemoryPoolSize("ParticleTransformer::PositionTr", 1380)
199+
SetMemoryPoolSize("ParticleTransformer::SizeTransf", 1533)
200+
201+
-- Perform various pre-game operations
202+
PreLoadStuff()
203+
204+
SetMaxFlyHeight(30)
205+
SetMaxPlayerFlyHeight(30)
206+
AISnipeSuitabilityDist(35)
207+
SetAttackerSnipeRange(45)
208+
SetDefenderSnipeRange(70)
209+
210+
-- Load the turrets
211+
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\SIDE\\me5tur.lvl",
212+
"tur_bldg_mturret",
213+
"tur_bldg_laser")
214+
215+
-- Load and set up the sides based on RandomSide
216+
Init_SideSetup()
217+
218+
-- Load our map-specific sound lvl
219+
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\sound\\SFL_T4E_Streaming.lvl")
220+
221+
-- Level Stats
222+
-- ClearWalkers()
223+
AddWalkerType(0, 0) -- special -> droidekas
224+
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
225+
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
226+
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
227+
local weaponCnt = 1024
228+
SetMemoryPoolSize("Aimer", 75)
229+
SetMemoryPoolSize("AmmoCounter", weaponCnt)
230+
SetMemoryPoolSize("BaseHint", 1024)
231+
SetMemoryPoolSize("EnergyBar", weaponCnt)
232+
SetMemoryPoolSize("EntityCloth", 32)
233+
SetMemoryPoolSize("EntityFlyer", 32)
234+
SetMemoryPoolSize("EntityHover", 32)
235+
SetMemoryPoolSize("EntityLight", 200)
236+
SetMemoryPoolSize("EntitySoundStream", 4)
237+
SetMemoryPoolSize("EntitySoundStatic", 32)
238+
SetMemoryPoolSize("FlagItem", 512) -- Need to account for shield pickups
239+
SetMemoryPoolSize("MountedTurret", 32)
240+
SetMemoryPoolSize("Navigator", 128)
241+
SetMemoryPoolSize("Obstacle", 1024)
242+
SetMemoryPoolSize("PathNode", 1024)
243+
SetMemoryPoolSize("SoldierAnimation", 417)
244+
SetMemoryPoolSize("SoundSpaceRegion", 64)
245+
SetMemoryPoolSize("TreeGridStack", 1024)
246+
SetMemoryPoolSize("UnitAgent", 128)
247+
SetMemoryPoolSize("UnitController", 128)
248+
SetMemoryPoolSize("Weapon", weaponCnt)
249+
250+
SetSpawnDelay(10.0, 0.25)
251+
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ME5\\T4E.lvl", "T4E_conquest")
252+
SetDenseEnvironment("false")
253+
254+
255+
-- Sound Stats
256+
257+
-- Open our map-specific ambient sound streams
258+
OpenAudioStream("..\\..\\addon\\ME5\\data\\_LVL_PC\\Sound\\SFL_T4E_Streaming.lvl", "T4E_ambiance")
259+
260+
-- Set up music stuff
261+
if not ScriptCB_InMultiplayer() then
262+
if ME5_SideVar == 0 then
263+
if RandomSide == 1 then
264+
Music06()
265+
elseif RandomSide == 2 then
266+
Music02()
267+
elseif RandomSide == 3 then
268+
Music06()
269+
elseif RandomSide == 4 then
270+
Music09()
271+
end
272+
elseif ME5_SideVar == 1 then
273+
Music06()
274+
elseif ME5_SideVar == 2 then
275+
Music02()
276+
elseif ME5_SideVar == 3 then
277+
Music06()
278+
elseif ME5_SideVar == 4 then
279+
Music09()
280+
end
281+
else
282+
Music06()
283+
end
284+
285+
-- Set up common sound stuff
286+
SoundFX()
287+
288+
-- Camera Stats
289+
AddCameraShot(-0.370814, 0.035046, -0.923929, -0.087320, -71.966255, 23.668301, 27.930090);
290+
AddCameraShot(0.991073, 0.002392, 0.133299, -0.000322, 84.069084, 23.668301, -95.802574);
291+
292+
-- Perform various post-load operations
293+
PostLoadStuff()
294+
end

ME5/VRMn_con.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ function ScriptInit()
394394
SetMemoryPoolSize("EnergyBar", weaponCnt)
395395
SetMemoryPoolSize("EntityHover", 32)
396396
SetMemoryPoolSize("EntityLight", 200)
397-
SetMemoryPoolSize("EntitySoundStatic", 64)
397+
SetMemoryPoolSize("EntitySoundStream", 4)
398+
SetMemoryPoolSize("EntitySoundStatic", 25)
398399
SetMemoryPoolSize("FlagItem", 512)
399400
--SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 128)
400401
SetMemoryPoolSize("MountedTurret", 32)

ME5/kam1n_siege.lua

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ function SSVxGTH_PostLoad()
5656
herosupport:AddSpawnCP("cp4","path32")
5757
herosupport:AddSpawnCP("cp5","cp5_spawn")
5858
herosupport:AddSpawnCP("cp6","path31")
59+
herosupport:AddSpawnCP("cp7","cp7_spawn")
5960
herosupport:Start()
6061
end
6162
end
@@ -78,6 +79,7 @@ function SSVxCOL_PostLoad()
7879
herosupport:AddSpawnCP("cp4","path32")
7980
herosupport:AddSpawnCP("cp5","cp5_spawn")
8081
herosupport:AddSpawnCP("cp6","path31")
82+
herosupport:AddSpawnCP("cp7","cp7_spawn")
8183
herosupport:Start()
8284
end
8385
end
@@ -100,6 +102,7 @@ function EVGxGTH_PostLoad()
100102
herosupport:AddSpawnCP("cp4","path32")
101103
herosupport:AddSpawnCP("cp5","cp5_spawn")
102104
herosupport:AddSpawnCP("cp6","path31")
105+
herosupport:AddSpawnCP("cp7","cp7_spawn")
103106
herosupport:Start()
104107
end
105108
end
@@ -122,6 +125,7 @@ function EVGxCOL_PostLoad()
122125
herosupport:AddSpawnCP("cp4","path32")
123126
herosupport:AddSpawnCP("cp5","cp5_spawn")
124127
herosupport:AddSpawnCP("cp6","path31")
128+
herosupport:AddSpawnCP("cp7","cp7_spawn")
125129
herosupport:Start()
126130
end
127131
end
@@ -140,6 +144,7 @@ DisableBarriers("camp")
140144
SetObjectTeam("cp4", 0)
141145
SetObjectTeam("cp5", 0)
142146
SetObjectTeam("cp6", 0)
147+
SetObjectTeam("cp7", 0)
143148
KillObject("cp1")
144149
KillObject("cp2")
145150

@@ -202,6 +207,7 @@ DisableBarriers("camp")
202207
cp4 = CommandPost:New{name = "cp4"}
203208
cp5 = CommandPost:New{name = "cp5"}
204209
cp6 = CommandPost:New{name = "cp6"}
210+
cp7 = CommandPost:New{name = "cp7"}
205211

206212
--This sets up the actual objective. This needs to happen after cp's are defined
207213
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, textATT = "game.modes.siege", textDEF = "game.modes.siege2", multiplayerRules = true}
@@ -213,6 +219,7 @@ DisableBarriers("camp")
213219
conquest:AddCommandPost(cp4)
214220
conquest:AddCommandPost(cp5)
215221
conquest:AddCommandPost(cp6)
222+
conquest:AddCommandPost(cp7)
216223
conquest:Start()
217224

218225
EnableSPHeroRules()
@@ -259,8 +266,8 @@ conquest:Start()
259266
SSVxCOL_PostLoad()
260267
end
261268

262-
SetReinforcementCount(REP, 250)
263-
SetReinforcementCount(CIS, 250)
269+
--SetReinforcementCount(REP, 250)
270+
--SetReinforcementCount(CIS, 250)
264271

265272
end
266273

@@ -307,7 +314,7 @@ function ScriptInit()
307314
SetMemoryPoolSize("Obstacle", 931)
308315
SetMemoryPoolSize("PathFollower", 50)
309316
SetMemoryPoolSize("PathNode", 256)
310-
SetMemoryPoolSize("SoldierAnimation", 345)
317+
SetMemoryPoolSize("SoldierAnimation", 406)
311318
SetMemoryPoolSize("SoundSpaceRegion", 36)
312319
SetMemoryPoolSize("TentacleSimulator", 0)
313320
SetMemoryPoolSize("TreeGridStack", 338)

ME5/tat2n_con.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ function ScriptInit()
252252
SetMemoryPoolSize("ParticleTransformer::SizeTransf", 1645)
253253

254254
PreLoadStuff()
255-
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ME5\\artillery_dirt.lvl")
255+
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ME5\\artillery_sand.lvl")
256256

257257
SetMaxFlyHeight(40)
258258
SetMaxPlayerFlyHeight(40)

ME5/tat2n_siege.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ function ScriptInit()
275275
SetMemoryPoolSize("ParticleTransformer::SizeTransf", 1645)
276276

277277
PreLoadStuff()
278-
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ME5\\artillery_dirt.lvl")
278+
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\ME5\\artillery_sand.lvl")
279279

280280
SetMaxFlyHeight(40)
281281
SetMaxPlayerFlyHeight(40)

0 commit comments

Comments
 (0)