--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
-- CIS Attacking (attacker is always #1)
REP = 2;
CIS = 1;
-- These variables do not change
ATT = 1;
DEF = 2;
--DroidTeam = 3
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()
EnableSPHeroRules()
-- This disables AI auto-balance
--DisableAIAutoBalance()
-- This sets the difficulty of the AI.
SetAIDifficulty(1, 3)
-- These display strings for CP captures
OnFinishCaptureTeam(
function(cPost)
local pName = GetEntityName(cPost) -- Gets the name of the post that was captured
ShowMessageText("level.PIO." .. pName .. "_cis") -- Show this string to all teams
end,
1 -- Team number for the strings
)
-- the ".." is Lua's concatenate, ie connecting two strings together
-- If the post's name was "cp1" then the line above should create "level.VNV.cp1_r"
-- Just make sure you have a localized string for each side and CP otherwise it will show as "NULL"
OnFinishCaptureTeam(
function(cPost)
local pName = GetEntityName(cPost) -- Gets the name of the post that was captured
ShowMessageText("level.PIO." .. pName .. "_rep") -- Show this string to all teams
end,
2 -- Team number for the strings
)
-- the ".." is Lua's concatenate, ie connecting two strings together
-- If the post's name was "cp1" then the line above should create "level.VNV.cp1_r"
-- Just make sure you have a localized string for each side and CP otherwise it will show as "NULL"
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()
-- This sets the agressiveness for each team.
SetTeamAggressiveness(CIS,(0.99))
SetTeamAggressiveness(REP,(0.98))
AISnipeSuitabilityDist(33)
-- Tell the game to load our loading image.
ReadDataFile("dc:Load\\common.lvl")
ReadDataFile("ingame.lvl")
SetMaxFlyHeight(30)
SetMaxPlayerFlyHeight (30)
-- Combo Memory Pools
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
-- Side Definitions
ReadDataFile("sound\\yav.lvl;yav1cw") -- ambiance stream & vehicle effects
ReadDataFile("sound\\fel.lvl;fel1cw") -- music stream
ReadDataFile("dc:sound\\rhn.lvl;rhn1cw") -- lightning ordnance & explosion sound effects
ReadDataFile("dc:sound\\TEV.lvl;TEVgcw") -- ordnance sound effects
ReadDataFile("dc: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_hero_aalya",
"rep_hover_fightertank",
"rep_hover_barcspeeder",
"rep_walk_oneman_atst")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_bdroid",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_rifleman",
"drd_inf_jettrooper",
"cis_hero_jangofett",
"cis_hover_aat",
"cis_hover_stap")
ReadDataFile("dc:SIDE\\tur.lvl",
"tur_bldg_laser")
SetupTeams{
rep = {
team = REP,
units = 30,
reinforcements = 200,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},
},
cis = {
team = CIS,
units = 28,
reinforcements = 200,
soldier = { "cis_inf_bdroid",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_rifleman",1, 4},
jetdrd = { "drd_inf_jettrooper",1, 4},
}
}
AddUnitClass(CIS, "cis_inf_bdroid")
AddUnitClass(CIS, "drd_inf_jettrooper")
SetHeroClass(CIS, "cis_hero_jangofett")
SetHeroClass(REP, "rep_hero_aalya")
--SetTeamName(3, "droid")
--SetTeamIcon(3, "cis_icon")
--AddUnitClass(3, "drd_inf_bdroid", 5)
--SetUnitCount(3, 5)
--AddAIGoal(3, "Deathmatch", 100)
--SetTeamAsFriend(ATT,3)
--SetTeamAsFriend(3,ATT)
--SetTeamAsEnemy(DEF,3)
--SetTeamAsEnemy(3,DEF)
-- Memory Pools
-- Level Stats
-- ClearWalkers()
SetMemoryPoolSize("EntityWalker", -1)
AddWalkerType(0, 0) -- special -> droidekas
AddWalkerType(1, 6) -- 3 oneman AT-STs with 1 leg pair each
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("CommandWalker", 7)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 45)
SetMemoryPoolSize("Music", 108)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoldierAnimation", 1000)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 2048)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)
SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:PIO\\PIO.lvl", "PIO_conquest")
ReadDataFile("dc:PIO\\PIO.lvl", "PIO_conquest")
SetDenseEnvironment("false")
-- Birdies
SetNumBirdTypes(1)
SetBirdType(0,1.0,"bird")
-- Fishies
SetNumFishTypes(1)
SetFishType(0,0.8,"fish")
-- Sound Stats
voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
OpenAudioStream("sound\\global.lvl", "cw_music") -- global music stream
OpenAudioStream("sound\\yav.lvl", "yav1") -- ambiance & vehicle & emitter streams start
OpenAudioStream("sound\\yav.lvl", "yav1") -- ambiance & vehicle & emitter streams end
--OpenAudioStream("dc:sound\\pio.lvl", "pio") -- lightning ordnance & explosion sounds
OpenAudioStream("sound\\fel.lvl", "fel1") -- music stream
OpenAudioStream("dc:sound\\rhn.lvl", "rhn") -- lightning ordnance & explosion sounds
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\uta.lvl", "uta1_emt")
OpenAudioStream("dc:sound\\TEV.lvl", "TEV") -- ordnance effects
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(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")
SetAmbientMusic(REP, 1.0, "rep_fel_amb_start", 0,1);
SetAmbientMusic(REP, 0.8, "rep_fel_amb_middle", 1,1);
SetAmbientMusic(REP, 0.3, "rep_fel_amb_end", 2,1);
SetAmbientMusic(CIS, 1.0, "cis_fel_amb_start", 0,1);
SetAmbientMusic(CIS, 0.8, "cis_fel_amb_middle", 1,1);
SetAmbientMusic(CIS, 0.3, "cis_fel_amb_end", 2,1);
SetVictoryMusic(REP, "rep_fel_amb_victory")
SetDefeatMusic (REP, "rep_fel_amb_defeat")
SetVictoryMusic(CIS, "cis_fel_amb_victory")
SetDefeatMusic (CIS, "cis_fel_amb_defeat")
SetSoundEffect("BirdScatter", "birdsFlySeq1")
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")
--OpeningSatelliteShot
AddCameraShot(0.931925, -0.108715, 0.343641, 0.040088, -5.782282, 13.685349, 221.953949);
AddCameraShot(0.358358, -0.010894, -0.933090, -0.028365, -44.763466, 2.160791, 153.530457);
AddCameraShot(0.755659, -0.094642, 0.643067, 0.080541, 162.549301, 19.342003, 249.039520);
AddCameraShot(0.558064, -0.040028, -0.826708, -0.059298, -197.403259, 8.593826, 157.532486);
AddCameraShot(0.995680, -0.092814, 0.002568, 0.000239, -51.045925, 19.905941, 308.196655);
end