--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
-- REP Attacking (attacker is always #1)
REP = 2;
CIS = 1;
-- These variables do not change
ATT = REP;
DEF = CIS;
function ScriptPostLoad()
--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}
cp6 = CommandPost:New{name = "cp6"}
cp7 = CommandPost:New{name = "cp7"}
--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}
--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)
conquest:AddCommandPost(cp7)
conquest:Start()
SetUberMode(1);
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("ingame.lvl")
SetMaxFlyHeight(30)
SetMaxPlayerFlyHeight (30)
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\\yav.lvl;yav1cw")
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hero_obiwan",
"rep_hover_barcspeeder")
ReadDataFile("dc:SIDE\\RSF.lvl",
"RSF_Rifleman",
"RSF_Sniper_Scout",
"RSF_Rocketeer",
"RSF_Engineer",
"RSF_Jettrooper",
"RSF_Commander",
"RSF_Support_Trooper",
"RSF_Arc_Trooper",
"RSF_Recon_Trooper",
"rep_inf_commander_fox")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_inf_Jetdroid",
"cis_hero_grievous",
"cis_hover_aat")
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tower")
SetupTeams{
rep = {
team = REP,
units = 60,
reinforcements = 300,
soldier = { "RSF_Rifleman",10, 30},
assault = { "RSF_Rocketeer",3, 10},
engineer = { "RSF_Engineer",5, 10},
sniper = { "RSF_Sniper_Scout",3, 10},
officer = { "RSF_Commander",2, 10},
special = { "RSF_Jettrooper",4, 10},
support = { "RSF_Support_Trooper",5, 10},
heavy = { "RSF_Arc_Trooper",5, 10},
},
cis = {
team = CIS,
units = 75,
reinforcements = 300,
soldier = { "cis_inf_rifleman",15, 40},
assault = { "cis_inf_rocketeer",3, 10},
engineer = { "cis_inf_engineer",3, 10},
sniper = { "cis_inf_sniper",3, 10},
officer = {"cis_inf_officer",3, 7},
special = { "cis_inf_droideka",2, 6},
support = { "cis_inf_Jetdroid",2, 5},
}
}
AddUnitClass(REP, "rep_inf_commander_fox",1, 1)
AddUnitClass(REP, "RSF_Recon_Trooper",6, 10)
SetHeroClass(CIS, "cis_hero_grievous")
SetHeroClass(REP, "rep_hero_obiwan")