Victory/defeat sound broken [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Victory/defeat sound broken [Solved]

Post by Anakin »

Hi,

i lost my victory/defeat sound, when i added some customs.
So how can i restor it?? Is there a special order, how to load the victory/defeat sound?? Or has someone the sound files, so i can munge it with my custom soundfile??
Last edited by Anakin on Tue Dec 23, 2014 2:57 pm, edited 1 time in total.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: victory/defeat sound broken

Post by Marth8880 »

Please post your mission script.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: victory/defeat sound broken

Post by Anakin »

Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")

ReadDataFile("dc:common.lvl")
ReadDataFile("common.lvl")

-- REP Attacking (attacker is always #1)
REP = 1
CIS = 2
GEONO = 3
CLONEDEA = 4
JEDI = 5
CLONECON = 6
-- These variables do not change
ATT = 1
DEF = 2
---------------------------------------------------------------------------
-- 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 ScriptPostLoad()
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp6 = CommandPost:New{name = "cp6"}
cp7 = CommandPost:New{name = "cp7"}
cp8 = CommandPost:New{name = "cp8"}

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "level.geo1.objectives.conquest", 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(cp6)
conquest:AddCommandPost(cp7)
conquest:AddCommandPost(cp8)

conquest:Start()
SetUberMode(1)
EnableSPHeroRules()

AddDeathRegion("deathregion")
AddDeathRegion("deathregion2")
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")
AddDeathRegion("deathregion5")

SetProperty("cp1", "AllyPath", "cp1_spawn")
SetProperty("cp2", "AllyPath", "cp2_spawn")
SetProperty("cp3", "AllyPath", "cp3_spawn")
SetProperty("cp4", "AllyPath", "cp4_spawn")
SetProperty("cp6", "AllyPath", "cp6_spawn")
SetProperty("cp7", "AllyPath", "cp7_spawn")
SetProperty("cp8", "AllyPath", "cp8_spawn")

end

function ScriptInit()
ReadDataFile("dc:Load\\RCM_Load.lvl")

StealArtistHeap(800*1024)
-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(3500000)

SetMemoryPoolSize("ParticleTransformer::SizeTransf", 2500)
SetMemoryPoolSize("ParticleTransformer::ColorTrans", 3000)
SetMemoryPoolSize("ParticleTransformer::PositionTr", 2500)
SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",30) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",500) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",500) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",500) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",400) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",4000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",88) -- should be ~1x #combo

local screenWidth, screenHeight = ScriptCB_GetScreenInfo()

ReadDataFile("dc:SIDE\\fpanimset.lvl")

if screenHeight == 1080 and screenWidth == 1920 then
ReadDataFile("dc:HUD\\hud1920x1080.lvl")
ReadDataFile("ingame.lvl")
ReadDataFile("dc:HUD\\hudBmpKill.lvl")
else
ReadDataFile("dc:HUD\\hud1024x768.lvl")
ReadDataFile("ingame.lvl")
end



SetTeamAggressiveness(CIS, 1.0)
SetTeamAggressiveness(REP, 0.5)

SetMemoryPoolSize("Music", 40)
ReadDataFile("dc:sound\\rcm.lvl;comSnd")
ReadDataFile("dc:sound\\rcm.lvl")
ReadDataFile("sound\\geo.lvl;geo1cw")

ReadDataFile("SIDE\\jed.lvl",
"jed_knight_01",
"jed_knight_02",
"jed_knight_03",
"jed_master_01",
"jed_master_02")

ReadDataFile("SIDE\\cis.lvl",
"cis_fly_droidfighter_dome",
--"cis_fly_geofighter",
"cis_tread_hailfire",
"cis_hover_stap",
"cis_walk_spider")

ReadDataFile("SIDE\\rep.lvl",
"rep_fly_assault_dome",
"rep_fly_gunship_dome",
"rep_hover_fightertank",
--"rep_fly_gunship",
--"rep_bldg_forwardcenter",
"rep_fly_jedifighter_dome",
"rep_walk_atte")

ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_commando_01_rifleman",
"rep_inf_commando_02_roketeer",
"rep_inf_commando_03_sniper",
"rep_inf_commando_04_engineer",
"rep_inf_commando_05_electronic",
"rep_inf_commando_06_sergeant",
"rep_inf_commando_07_havoc",
"rep_inf_commando_08_elite")

ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_b1_rifleman",
"cis_inf_b1_rocketeer",
"cis_inf_b1_sniper",
"cis_inf_sbd",
"cis_inf_magnaguard",
"cis_inf_droideka")

ReadDataFile("dc:SIDE\\geo.lvl",
"geo_inf_geonosian",
"geo_inf_geonosian_elite")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_geoturret")

ReadDataFile("dc:SIDE\\rrl.lvl",
"rrl_inf_ep2_rifleman",
"rrl_inf_ep2_commander",
"rrl_inf_ep2_jettrooper")

-- GEOS ---------------------------
SetTeamName(3, "locals")
AddUnitClass(3, "geo_inf_geonosian", 7)
AddUnitClass(3, "geo_inf_geonosian_elite", 7)
SetUnitCount(3, 7)
AddAIGoal(GEONO, "Deathmatch", 100)
-----------------------------------

-- Jedi ---------------------------
SetTeamName (5, "jedi")
AddUnitClass(5, "jed_knight_01",4)
AddUnitClass(5, "jed_knight_02",4)
AddUnitClass(5, "jed_knight_03",4)
AddUnitClass(5, "jed_master_01",2)
AddUnitClass(5, "jed_master_02",2)
SetUnitCount (5, 10)
AddAIGoal(JEDI, "Deathmatch", 100)
-----------------------------------

-- Clones -------------------------
SetTeamName (4, "clone")
AddUnitClass (4, "rrl_inf_ep2_rifleman", 15)
AddUnitClass (4, "rrl_inf_ep2_jettrooper", 5)
AddUnitClass(4, "rrl_inf_ep2_commander",3)
SetUnitCount (4, 8)
AddAIGoal(CLONEDEA, "Deathmatch", 100)
-----------------------------------

-- Clones -------------------------
SetTeamName (6, "clone")
AddUnitClass (6, "rrl_inf_ep2_rifleman", 15)
AddUnitClass (6, "rrl_inf_ep2_jettrooper", 5)
AddUnitClass(6, "rrl_inf_ep2_commander",3)
SetUnitCount (6, 7)
AddAIGoal(CLONECON, "Conquest", 100)
-----------------------------------

-- Friends ------------------------
SetTeamAsFriend(REP,JEDI)
SetTeamAsFriend(JEDI,REP)

SetTeamAsFriend(REP,CLONECON)
SetTeamAsFriend(CLONECON,REP)

SetTeamAsFriend(REP,CLONEDEA)
SetTeamAsFriend(CLONEDEA,REP)

SetTeamAsFriend(JEDI,CLONECON)
SetTeamAsFriend(CLONECON,JEDI)

SetTeamAsFriend(JEDI,CLONEDEA)
SetTeamAsFriend(CLONEDEA,JEDI)

SetTeamAsFriend(CLONECON,CLONEDEA)
SetTeamAsFriend(CLONEDEA,CLONECON)

SetTeamAsFriend(CIS,GEONO)
SetTeamAsFriend(GEONO,CIS)
-----------------------------------

-- Enemys -------------------------
SetTeamAsEnemy(REP,GEONO)
SetTeamAsEnemy(GEONO,REP)

SetTeamAsEnemy(GEONO,JEDI)
SetTeamAsEnemy(JEDI,GEONO)

SetTeamAsEnemy(GEONO,CLONECON)
SetTeamAsEnemy(CLONECON,GEONO)

SetTeamAsEnemy(GEONO,CLONEDEA)
SetTeamAsEnemy(CLONEDEA,GEONO)

SetTeamAsEnemy(CIS,JEDI)
SetTeamAsEnemy(JEDI,CIS)

SetTeamAsEnemy(CIS,CLONECON)
SetTeamAsEnemy(CLONECON,CIS)

SetTeamAsEnemy(CIS,CLONEDEA)
SetTeamAsEnemy(CLONEDEA,CIS)
-----------------------------------

-- Level Stats

ClearWalkers()
SetMemoryPoolSize("EntityWalker", -1)
AddWalkerType(0, 3) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(2, 3) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
local weaponcnt = 300
SetMemoryPoolSize("Aimer", 100)
SetMemoryPoolSize("AmmoCounter", weaponcnt)
SetMemoryPoolSize("BaseHint", 100)
SetMemoryPoolSize("CommandWalker", 1)
SetMemoryPoolSize("EnergyBar", weaponcnt)
SetMemoryPoolSize("EntityFlyer", 6)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 50)
SetMemoryPoolSize("EntityCloth", 50)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("MountedTurret", 10)
SetMemoryPoolSize("Navigator", 70)
SetMemoryPoolSize("Obstacle", 450)
SetMemoryPoolSize("PathFollower", 70)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("TreeGridStack", 300)
SetMemoryPoolSize("UnitAgent", 70)
SetMemoryPoolSize("UnitController", 70)
SetMemoryPoolSize("Weapon", weaponcnt)
SetMemoryPoolSize("SoldierAnimation", 580)

SetSpawnDelay(10.0, 0.25)

SetupTeams{
rep = {
team = REP,
units = 16,
reinforcements = 150,
soldier = { "rep_inf_commando_01_rifleman",9, 25},
assault = { "rep_inf_commando_02_roketeer",1,4},
sniper = { "rep_inf_commando_03_sniper",1,4},
engineer= { "rep_inf_commando_04_engineer",1,4},
officer = { "rep_inf_commando_05_electronic",1,4},
special = { "rep_inf_commando_06_sergeant",1,4},
commander={ "rep_inf_commando_07_havoc", 1, 4},
general = { "rep_inf_commando_08_elite", 1, 2}
},
cis = {
team = CIS,
units = 32,
reinforcements = 300,
soldier = {"cis_inf_b1_rifleman",10, 30},
assault = {"cis_inf_b1_rocketeer",1, 4},
sniper = {"cis_inf_b1_sniper",1, 4},
engineer= {"geo_inf_geonosian",1, 6},
officer = {"cis_inf_sbd",1, 2},
special = {"geo_inf_geonosian_elite", 1, 2},
commander={"cis_inf_droideka", 1, 2},
general = {"cis_inf_magnaguard", 1, 2},
}
}




-- Attacker Stats

--teamATT = ConquestTeam:New{team = ATT}
--teamATT:AddBleedThreshold(21, 0.75)
--teamATT:AddBleedThreshold(11, 2.25)
--teamATT:AddBleedThreshold(1, 3.0)
--teamATT:Init()

-- Defender Stats

--teamDEF = ConquestTeam:New{team = DEF}
--teamDEF:AddBleedThreshold(21, 0.75)
--teamDEF:AddBleedThreshold(11, 2.25)
--teamDEF:AddBleedThreshold(1, 3.0)
--teamDEF:Init()

-- Local Stats

--SetTeamName(4, "locals")
--AddUnitClass(4, "rep_inf_jedimale",1)
--AddUnitClass(4, "rep_inf_jedimaleb",1)
--AddUnitClass(4, "rep_inf_jedimaley",1)
--SetUnitCount(4, 3)
--SetTeamAsFriend(4, ATT)

ReadDataFile("GEO\\geo1.lvl", "geo1_conquest")

SetDenseEnvironment("false")
SetMinFlyHeight(-65)
SetMaxFlyHeight(50)
SetMaxPlayerFlyHeight(50)



-- Birdies
--SetNumBirdTypes(1)
--SetBirdType(0.0,10.0,"dragon")
--SetBirdFlockMinHeight(90.0)

-- Sound

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("dc:sound\\rcm.lvl", "rcm_music")
OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\geo.lvl", "geo1cw")
OpenAudioStream("sound\\geo.lvl", "geo1cw")

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(1, "repleaving")
SetOutOfBoundsVoiceOver(2, "cisleaving")

SetAmbientMusic(REP, 1.0, "rep_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_amb_end", 2,1)

SetVictoryMusic(REP, "rep_geo_amb_victory")
SetDefeatMusic (REP, "rep_geo_amb_defeat")
SetVictoryMusic(CIS, "cis_geo_amb_victory")
SetDefeatMusic (CIS, "cis_geo_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")


--ActivateBonus(CIS, "SNEAK_ATTACK")
--ActivateBonus(REP, "SNEAK_ATTACK")

SetAttackingTeam(ATT)

--Opening Satalite Shot
--Geo
--Mountain
AddCameraShot(0.996091, 0.085528, -0.022005, 0.001889, -6.942698, -59.197201, 26.136919)
--Wrecked Ship
AddCameraShot(0.906778, 0.081875, -0.411906, 0.037192, 26.373968, -59.937874, 122.553581)
--War Room
--AddCameraShot(0.994219, 0.074374, 0.077228, -0.005777, 90.939568, -49.293945, -69.571136)


if screenHeight == 1080 and screenWidth == 1920 then
ReadDataFile("dc:SIDE\\1920x1080.lvl")
ReadDataFile("dc:HUD\\hudTxtKill.lvl")
else
ReadDataFile("dc:SIDE\\1024x768.lvl")
end

end

[/code]
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: victory/defeat sound broken

Post by Marth8880 »

Try loading this:

Code: Select all

OpenAudioStream("dc:sound\\rcm.lvl", "rcm_music")
After this:

Code: Select all

OpenAudioStream("sound\\global.lvl",  "cw_music")
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: victory/defeat sound broken

Post by Anakin »

thank you so much it looks like it is working. I'll test if all the other sounds are still there the next day(s).
Post Reply