--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveCTF")
-- Empire Attacking (attacker is always #1)
ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2
function ScriptPostLoad()
SoundEvent_SetupTeams( IMP, 'imp', ALL, 'all' )
--This is all the flag capture objective stuff
SetProperty("flag1", "GeometryName", "com_icon_alliance_flag")
SetProperty("flag1", "CarriedGeometryName", "com_icon_alliance_flag_carried")
SetProperty("flag2", "GeometryName", "com_icon_imperial_flag")
SetProperty("flag2", "CarriedGeometryName", "com_icon_imperial_flag_carried")
SetClassProperty("com_item_flag", "DroppedColorize", 1)
--This is all the actual ctf objective setup
ctf = ObjectiveCTF:New{teamATT = REP, teamDEF = CIS, captureLimit = 5, textATT = "game.modes.ctf", textDEF = "game.modes.ctf2", hideCPs = true, multiplayerRules = true}
ctf:AddFlag{name = "flag1", homeRegion = "team1_capture", captureRegion = "team2_capture",
capRegionMarker = "hud_objective_icon_circle", capRegionMarkerScale = 3.0,
icon = "", mapIcon = "flag_icon", mapIconScale = 3.0}
ctf:AddFlag{name = "flag2", homeRegion = "team2_capture", captureRegion = "team1_capture",
capRegionMarker = "hud_objective_icon_circle", capRegionMarkerScale = 3.0,
icon = "", mapIcon = "flag_icon", mapIconScale = 3.0}
ctf:Start()
EnableSPHeroRules()
end
---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
ReadDataFile("dc:Load\\common.lvl")
ReadDataFile("dc:Load\\common.lvl")
--Tell game to load our loading image
ReadDataFile("dc:Load\\common.lvl")
ReadDataFile("ingame.lvl")
SetMaxFlyHeight(20)
SetMaxPlayerFlyHeight (20)
SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo
ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_inf_wookiee",
"all_hero_leia")
ReadDataFile("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")
ReadDataFile("DC:SIDE\\heroes.lvl",
"all_hero_ackbar")
SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "all_inf_rifleman",9, 25},
assault = { "all_inf_rocketeer",1,4},
engineer = { "all_inf_engineer",1,4},
sniper = { "all_inf_sniper",1,4},
officer = { "all_inf_officer",1,4},
special = { "all_inf_wookiee",1,4},
},
imp = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { "imp_inf_rifleman",9, 25},
assault = { "imp_inf_rocketeer",1,4},
engineer = { "imp_inf_engineer",1,4},
sniper = { "imp_inf_sniper",1,4},
officer = { "imp_inf_officer",1,4},
special = { "imp_inf_dark_trooper",1,4},
},
}
SetHeroClass(ALL, "all_hero_ackbar")
SetHeroClass(IMP, "imp_hero_bobafett")
-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("FlagItem", 2)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:SAL\\SAL.lvl", "SAL_ctf")
SetDenseEnvironment("false")
-- Sound Stats
voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "des_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", "imp_unit_vo_quick", voiceQuick)
OpenAudioStream("sound\\global.lvl", "gcw_music")
OpenAudioStream("sound\\tat.lvl", "tat2")
OpenAudioStream("sound\\tat.lvl", "tat2")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)
SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)
SetOutOfBoundsVoiceOver(2, "Allleaving")
SetOutOfBoundsVoiceOver(1, "Impleaving")
SetAmbientMusic(ALL, 1.0, "all_tat_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_tat_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2, "all_tat_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_tat_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_tat_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2, "imp_tat_amb_end", 2,1)
SetVictoryMusic(ALL, "all_tat_amb_victory")
SetDefeatMusic (ALL, "all_tat_amb_defeat")
SetVictoryMusic(IMP, "imp_tat_amb_victory")
SetDefeatMusic (IMP, "imp_tat_amb_defeat")
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
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")
-- Camera Stats
AddCameraShot(0.901391, -0.061852, -0.427560, -0.029339, -61.664173, 17.944555, 8.238253);
AddCameraShot(0.148669, -0.006079, -0.988043, -0.040397, -13.304453, 15.213711, -38.896919);
AddCameraShot(-0.204501, -0.001639, -0.978833, 0.007845, 77.053955, 15.213711, -18.844965);
AddCameraShot(0.872585, 0.017622, -0.488045, 0.009856, -6.536069, 2.943680, -96.764313);
AddCameraShot(-0.194349, 0.009613, -0.979688, -0.048457, 27.295074, 16.449509, -0.125231);
end