--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Mos Eisley Hero Deathmatch (uses Space Assault rules)
-- First team to reach 100 kills wins
--
ScriptCB_DoFile("ObjectiveTDM")
ScriptCB_DoFile("setup_teams")
IMP = 1
JED = 2
-- These variables do not change
ATT = 1
DEF = 2
---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
function ScriptPostLoad()
WeatherMode = math.random(1,4)
weather()
-- This is the actual objective setup
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2,
multiplayerScoreLimit = 75,
textATT = "game.modes.tdm",
textDEF = "game.modes.tdm2",
multiplayerRules = true, isCelebrityDeathmatch = true}
TDM:Start()
SetUberMode(1);
end
function weather()
if WeatherMode == 1 then
ReadDataFile("dc:y4p\\sky.lvl", "day")
elseif WeatherMode == 2 then
ReadDataFile("dc:y4p\\sky.lvl", "morning")
elseif WeatherMode == 3 then
ReadDataFile("dc:y4p\\sky.lvl", "night")
elseif WeatherMode == 4 then
ReadDataFile("dc:y4p\\sky.lvl", "stormy")
end
end
---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------
function ScriptInit()
--tell the game to load our loading image
ReadDataFile("dc:load\\common.lvl")
-- Designers, these two lines *MUST* be first!
SetPS2ModelMemory(4049000)
ReadDataFile("ingame.lvl")
SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",70) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",850) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",750) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",8000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",140) -- should be ~1x #combo -- should be ~1x #combo
SetMemoryPoolSize ("SoldierAnimation",1800)
SetMemoryPoolSize ("music",800)
SetMaxFlyHeight(400)
SetMaxPlayerFlyHeight (400)
ReadDataFile("sound\\cor.lvl;cor1cw")
ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_bobafett",
"imp_hover_speederbike",
"imp_hero_darthvader",
"YV-929",
"rep_walk_oneman_atst",
"Tython_inf_cultist",
"imp_fly_destroyer_dome" )
ReadDataFile("dc:SIDE\\jed.lvl",
"jed_knight_01",
"jed_knight_02",
"jed_knight_03",
"jed_knight_04",
"jed_master_01",
"jed_master_02",
"jed_master_03",
"rep_inf_jedi_male_open")
ReadDataFile("SIDE\\jed.lvl",
"jed_knight_01",
"jed_knight_02",
"jed_knight_03",
"jed_knight_04",
"jed_master_01",
"jed_master_02",
"jed_master_03",
"jed_sith_01",
"jed_runner")
SetupTeams{
imp = {
team = IMP,
units = 100,
reinforcements = -1,
soldier = { "imp_inf_rifleman",13, 50},
engineer = { "imp_inf_engineer",3,10},
sniper = { "imp_inf_sniper",2,10},
officer = { "imp_inf_officer",2,5},
special = { "Tython_inf_cultist",2,30},
},
jed = {
team = JED,
units = 70,
reinforcements = -1,
soldier = { "jed_knight_01",4, 20},
assault = { "jed_knight_02",4, 20},
engineer = { "jed_knight_03",3, 10},
sniper = { "jed_knight_04",2, 10},
officer = { "jed_master_01", 1, 10 },
special = { "rep_inf_jedi_male_open", 1, 10 },
},
}
-- Level Stats
ClearWalkers()
local weaponCnt = 96
SetMemoryPoolSize("Aimer", 1)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 320)
SetMemoryPoolSize("ConnectivityGraphFollower", 23)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth",41)
SetMemoryPoolSize("EntityDefenseGridTurret", 0)
SetMemoryPoolSize("EntityDroid", 0)
SetMemoryPoolSize("EntityFlyer", 5) -- to account for 5 chewbaccas
SetMemoryPoolSize("EntityLight", 80, 80) -- stupid trickery to actually set lights to 80
SetMemoryPoolSize("EntityPortableTurret", 0) -- nobody has autoturrets AFAIK - MZ
SetMemoryPoolSize("EntitySoundStream", 2)
SetMemoryPoolSize("EntitySoundStatic", 45)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 120)
SetMemoryPoolSize("MountedTurret", 0)
SetMemoryPoolSize("Navigator", 23)
SetMemoryPoolSize("Obstacle", 667)
SetMemoryPoolSize("Ordnance", 480)
SetMemoryPoolSize("ParticleEmitter", 512)
SetMemoryPoolSize("ParticleEmitterInfoData", 512)
SetMemoryPoolSize("PathFollower", 23)
SetMemoryPoolSize("PathNode", 128)
SetMemoryPoolSize("ShieldEffect", 0)
SetMemoryPoolSize("TentacleSimulator", 24)
SetMemoryPoolSize("TreeGridStack", 290)
SetMemoryPoolSize("UnitAgent", 23)
SetMemoryPoolSize("UnitController", 23)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("SoldierAnimation", 800)
SetMemoryPoolSize("music", 800)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:y4p\\y4p.lvl","y4p_ord66")
SetDenseEnvironment("true")
-- Sound Stats
voiceSlow = OpenAudioStream("sound\\global.lvl", "cor_objective_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "rep_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "all_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
voiceQuick = OpenAudioStream("sound\\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "rep_unit_vo_quick", voiceQuick)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_quick", voiceQuick)
OpenAudioStream("sound\\globallvl", "cw_music")
OpenAudioStream("sound\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
SetOutOfBoundsVoiceOver(1, "repleaving")
SetOutOfBoundsVoiceOver(2, "allleaving")
SetVictoryMusic(REP, "rep_cor_amb_victory")
SetDefeatMusic (REP, "rep_cor_amb_defeat")
SetVictoryMusic(JED, "all_cor_amb_victory")
SetDefeatMusic (JED, "all_cor_amb_defeat")
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")
SetAttackingTeam(ATT)
-- Fishies
SetNumFishTypes(3)
SetFishType(0,1.1,"blackfish")
SetFishType(1,0.5,"laa_fish")
SetFishType(2,0.9,"naboo_mee_fish")
SetFishType(3,0.7,"naboo_gumfish")
-- Camera Stats
--Tat2 Mos Eisley
AddCameraShot(-0.301971, 0.077307, -0.920492, -0.235653, 98.766411, 29.723827, -270.082794);
AddCameraShot(0.621069, -0.589761, -0.374317, -0.355448, -46.866077, 374.140869, 209.88386);
end