--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- stardestroyer001's Common file for Space Coruscant v1.0
-- Common script that shares all setup information
ScriptCB_DoFile("setup_teams")
-- Republic Attacking (attacker is always #1)
REP = 1
CIS = 2
-- These variables do not change
ATT = 1
DEF = 2
AmbushTeam = 4
ATM = AmbushTeam
function SetupUnits()
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_fly_anakinstarfighter_sc",
"rep_fly_arc170fighter_sc",
"rep_fly_gunship_sc",
"rep_fly_vwing",
"rep_hero_anakin",
"rep_hero_obiwan",
"rep_inf_ep3_pilot",
"rep_inf_ep3_marine",
"rep_veh_remote_terminal")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_droideka",
"cis_inf_pilot",
"cis_inf_marine",
"cis_inf_rifleman",
"cis_fly_droidfighter_sc",
"cis_fly_droidgunship",
"cis_fly_greviousfighter",
"cis_hero_grievous",
"cis_hero_countdooku",
"cis_fly_tridroidfighter")
ReadDataFile("dc:SIDE\\imp.lvl",
"imp_fly_ai_trooptrans")
ReadDataFile("dc:SIDE\\jed.lvl",
"jed_knight_04",
"jed_master_01")
ReadDataFile("dc:SIDE\\SC1.lvl",
"cis_inf_magnaguard_ptc",
"rep_fly_obiwanstarfighter_sc")
ReadDataFile("dc:SIDE\\tur.lvl",
"tur_bldg_spa_cis_beam",
"tur_bldg_spa_cis_chaingun",
"tur_bldg_spa_rep_beam",
"tur_bldg_spa_rep_chaingun",
"tur_bldg_chaingun_roof"
)
end
myTeamConfig = {
rep = {
team = REP,
units = 40,
reinforcements = -1,
pilot = { "rep_inf_ep3_pilot",20},
soldier = { "rep_inf_ep3_marine",40},
engineer = { "jed_master_01",1, 3},
sniper = { "jed_knight_04",1, 5},
jedi = { "rep_hero_anakin",0, 1},
jedimajor = { "rep_hero_obiwan",0, 1},
},
cis = {
team = CIS,
units = 30,
reinforcements = -1,
pilot = { "cis_inf_pilot",10},
soldier = { "cis_inf_rifleman",10},
--officer = { "cis_inf_droideka",1, 5},
special = { "cis_inf_magnaguard_ptc",1, 3},
jedi = { "cis_hero_grievous",0, 1},
jedimajor = { "cis_hero_countdooku",0, 1},
marine = { "cis_inf_marine",5},
},
atm = {
team = ATM,
units = 6,
reinforcements = -1,
soldier = { "cis_inf_pilot",6, 6},
},
}
--SetTeamName (3, "jawas")
--AddUnitClass (3, "cis_inf_pilot",10, 15)
--SetUnitCount (3, 15)
--AddAIGoal(3, "Deathmatch", 100)
--SetTeamAsEnemy(ATT,3)
--SetTeamAsEnemy(3,ATT)
--SetTeamAsFriend(DEF,3)
--SetTeamAsFriend(3,DEF)
SetTeamAsEnemy(ATM, REP)
SetTeamAsEnemy(REP, ATM)
SetTeamAsFriend(ATM, CIS)
SetTeamAsFriend(CIS, ATM)
ClearAIGoals(ATM)
AddAIGoal(ATM, "Deathmatch", 100)
SetTeamName(ATM, CIS)
ScriptCB_DoFile("LinkedTurrets")
function SetupTurrets()
--CIS turrets
turretLinkageCIS = LinkedTurrets:New{ team = CIS, mainframe = "cis-defense",
turrets = {"cis_turr_1", "cis_turr_2", "cis_turr_3", "cis_turr_4", "cis_turr_5", "cis_turr_6"} }
turretLinkageCIS:Init()
function turretLinkageCIS:OnDisableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.down", REP)
ShowMessageText("level.spa.hangar.mainframe.def.down", CIS)
BroadcastVoiceOver( "ROSMP_obj_20", REP )
BroadcastVoiceOver( "COSMP_obj_21", CIS )
end
function turretLinkageCIS:OnEnableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.up", REP)
ShowMessageText("level.spa.hangar.mainframe.def.up", CIS)
BroadcastVoiceOver( "ROSMP_obj_22", REP )
BroadcastVoiceOver( "COSMP_obj_23", CIS )
end
--REP turrets
turretLinkageREP = LinkedTurrets:New{ team = REP, mainframe = "rep-defense",
turrets = {"rep_turr_1", "rep_turr_2", "rep_turr_3", "rep_turr_4", "rep_turr_5", "rep_turr_6"} }
turretLinkageREP:Init()
function turretLinkageREP:OnDisableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.down", CIS)
ShowMessageText("level.spa.hangar.mainframe.def.down", REP)
BroadcastVoiceOver( "ROSMP_obj_21", REP )
BroadcastVoiceOver( "COSMP_obj_20", CIS )
end
function turretLinkageREP:OnEnableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.up", CIS)
ShowMessageText("level.spa.hangar.mainframe.def.up", REP)
BroadcastVoiceOver( "ROSMP_obj_23", REP )
BroadcastVoiceOver( "COSMP_obj_22", CIS )
end
end
function ScriptPreInit()
SetWorldExtents(10000)
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")
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",600) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",3000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo -- should be ~1x #combo
-- Designers, this line *MUST* be first!
ReadDataFile("ingame.lvl")
SetMinFlyHeight(-800)
SetMaxFlyHeight(500)
SetMinPlayerFlyHeight(-800)
SetMaxPlayerFlyHeight(500)
SetAIVehicleNotifyRadius(1000)
ReadDataFile("dc:sound\\efx.lvl;efxcw")
ReadDataFile("sound\\spa.lvl;spa2cw")
ReadDataFile("SIDE\\\\cis.lvl",
"cis_inf_pilot")
ScriptCB_SetDopplerFactor(0.4)
ScaleSoundParameter("tur_weapons", "MinDistance", 3.0);
ScaleSoundParameter("tur_weapons", "MaxDistance", 3.0);
ScaleSoundParameter("tur_weapons", "MuteDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MinDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MaxDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MuteDistance", 3.0);
ScaleSoundParameter("explosion", "MaxDistance", 5.0);
ScaleSoundParameter("explosion", "MuteDistance", 5.0);
SetupUnits()
SetupTeams(myTeamConfig)
-- Level Stats
ClearWalkers()
AddWalkerType(0, 5) -- 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 = 380
local guyCnt = 32
local units = 200
SetMemoryPoolSize("Aimer", 350)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 200)
SetMemoryPoolSize("Combo::DamageSample", 2861)
SetMemoryPoolSize("ConnectivityGraphFollower", 30)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityDroideka",5)
SetMemoryPoolSize("EntityDroid",0)
SetMemoryPoolSize("EntityHover", 16)
SetMemoryPoolSize("EntityFlyer", 48)
SetMemoryPoolSize("ParticleTransformer::SizeTransf", 1600)
SetMemoryPoolSize("ParticleTransformer::ColorTrans" , 2100)
SetMemoryPoolSize("ParticleTransformer::PositionTr", 1250)
SetMemoryPoolSize("EntityLight", 170)
SetMemoryPoolSize("EntityRemoteTerminal", 12)
SetMemoryPoolSize("EntitySoldier",guyCnt)
SetMemoryPoolSize("SoldierAnimation", 800)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 120)
SetMemoryPoolSize("MountedTurret", 180)
SetMemoryPoolSize("Music", 35)
SetMemoryPoolSize("Navigator", guyCnt)
SetMemoryPoolSize("Obstacle", 150)
SetMemoryPoolSize("ParticleEmitter", 512)
SetMemoryPoolSize("ParticleEmitterInfoData", 512)
SetMemoryPoolSize("PassengerSlot", 0)
SetMemoryPoolSize("PathFollower", 60)
SetMemoryPoolSize("PathNode", 92)
SetMemoryPoolSize("RedOmniLight", 178)
SetMemoryPoolSize("TentacleSimulator", 10)
SetMemoryPoolSize("TreeGridStack", 270)
SetMemoryPoolSize("UnitAgent", units)
SetMemoryPoolSize("UnitController", units)
SetMemoryPoolSize("Weapon", weaponCnt)
SetSpawnDelay(10.0, 0.25)
-- do any pool allocations, custom loading here
if myScriptInit then
myScriptInit()
myScriptInit = nil
end
ReadDataFile("dc:SC1\\spa_sky.lvl", "cor")
ReadDataFile("dc:SC1\\SC1.lvl", myGameMode)
SetDenseEnvironment("false")
SetParticleLODBias(15000)
-- Sound Stats
local voiceSlow = OpenAudioStream("sound\\global.lvl", "spa1_objective_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "rep_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
local voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
OpenAudioStream("dc:sound\\efx.lvl", "efxcw_music")
OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("sound\\spa.lvl", "spa")
OpenAudioStream("sound\\spa.lvl", "spa")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\tat.lvl", "tat1_emt")
SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)
SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)
SetOutOfBoundsVoiceOver(REP, "Repleaving")
SetOutOfBoundsVoiceOver(CIS, "Cisleaving")
SetAmbientMusic(REP, 1.0, "rep_kam_amb_start", 0,1);
--SetAmbientMusic(REP, 0.99, "rep_kam_amb_middle", 1,1);
--SetAmbientMusic(REP, 0.1,"rep_kam_amb_end", 2,1);
SetAmbientMusic(CIS, 1.0, "cis_kam_amb_start", 0,1);
--SetAmbientMusic(CIS, 0.99, "cis_kam_amb_middle", 1,1);
--SetAmbientMusic(CIS, 0.1,"cis_kam_amb_end", 2,1);
SetVictoryMusic(REP, "rep_kam_amb_victory")
SetDefeatMusic (REP, "all_tat_amb_defeat")
SetVictoryMusic(CIS, "cis_kam_amb_victory")
SetDefeatMusic (CIS, "imp_tat_amb_defeat")
SetAmbientMusic(REP, 1.0, "rep_spa_amb_start", 0,1)
SetAmbientMusic(REP, 0.99, "rep_spa_amb_middle", 1,1)
SetAmbientMusic(REP, 0.1,"rep_spa_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_spa_amb_start", 0,1)
SetAmbientMusic(CIS, 0.99, "cis_spa_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.1,"cis_spa_amb_end", 2,1)
SetVictoryMusic(REP, "rep_spa_amb_victory")
SetDefeatMusic (REP, "rep_spa_amb_defeat")
SetVictoryMusic(CIS, "cis_spa_amb_victory")
SetDefeatMusic (CIS, "cis_spa_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 Battle over Felucia
-- ARC170Carrier Hangar Exterior Shot
AddCameraShot(0.962752, 0.242761, -0.115453, 0.029112, 1190.458984, 130.080994, -1005.170349);
-- Invisible Hand w/Autoturret looking at battle
AddCameraShot(0.999775, 0.007066, -0.019991, 0.000141, -301.363434, 124.240158, 2267.915527);
-- ERASE AND PLACE NEW ONE
AddCameraShot(-0.335210, 0.057062, -0.927078, -0.157814, 1372.964233, 1940.014038, -2266.423828);
-- Overall from left side of map
AddCameraShot(0.911880, -0.246677, -0.316680, -0.085667, -2183.282471, 1940.014038, 2760.666748);
AddDeathRegion("deathregion1")
AddDeathRegion("deathregion4")
AddLandingRegion("rep-CP1Con")
AddLandingRegion("rep-CP2Con")
AddLandingRegion("rep-CP3Con")
AddLandingRegion("cis-CP1Con")
AddLandingRegion("cis-CP2Con")
AddLandingRegion("cis-CP3Con")
AddLandingRegion("cisfighter1_con")
end