Concord Dawn Conquest lua wrote:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")
-- Empire Attacking (attacker is always #1)
local ALL = 2
local IMP = 1
-- These variables do not change
local ATT = 1
local DEF = 2
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"}
--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: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("ingame.lvl")
SetUberMode(1)
SetMaxFlyHeight(160)
SetMaxPlayerFlyHeight(160)
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\\hot.lvl;hot1gcw")
ReadDataFile("sound\\RE3.lvl;RE3gcw")
ReadDataFile("sound\\chainisle.lvl;chainislegcw")
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_inf_wookiee",
"all_hero_hansolo_tat",
"all_fly_snowspeeder")
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",
"imp_walk_atat",
"imp_fly_tiefighter",
"imp_hover_fightertank",
"imp_fly_destroyer_dome")
ReadDataFile("SIDE\\cis.lvl",
"cis_hero_jangofett")
ReadDataFile("SIDE\\vehicles.lvl",
"all_fly_xwing",
"all_hover_combatspeeder_bf1",
"all_hover_hovernaut",
"imp_fly_tiefighter")
ReadDataFile("SIDE\\infantry.lvl",
"all_inf_recon",
"all_inf_commander",
"imp_inf_recon",
"imp_inf_commander_grey",
"imp_inf_commando",
"all_inf_specialops")
SetupTeams{
all = {
team = ALL,
units = 60,
reinforcements = 550,
soldier = { "all_inf_rifleman",9, 50},
assault = { "all_inf_rocketeer",1,25},
engineer = { "all_inf_engineer",1,25},
sniper = { "all_inf_sniper",1,25},
officer = { "all_inf_officer",1,25},
special = { "all_inf_wookiee",1,25},
},
imp = {
team = IMP,
units = 60,
reinforcements = 550,
soldier = { "imp_inf_rifleman",9, 50},
assault = { "imp_inf_rocketeer",1,25},
engineer = { "imp_inf_engineer",1,25},
sniper = { "imp_inf_sniper",1,25},
officer = { "imp_inf_officer",1,25},
special = { "imp_inf_dark_trooper",1,25},
},
}
AddUnitClass(ALL,"all_inf_recon", 1,3)
AddUnitClass(ALL, "all_inf_specialops",1,2)
AddUnitClass(ALL,"all_inf_commander",1,1)
AddUnitClass(IMP,"imp_inf_recon",1,3)
AddUnitClass(IMP, "imp_inf_commando",1,2)
AddUnitClass(IMP,"imp_inf_commander_grey",1,1)
SetHeroClass(ALL, "all_hero_hansolo_tat")
SetHeroClass(IMP, "imp_hero_bobafett")
Of course that's just a snippet, but I know that it works on PC as I have about 20 levels in the pack that use it.