Load SWBF1 sounds

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
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:

Load SWBF1 sounds

Post by Marth8880 »

Old: How would I call for the CW general sounds LVL file ("cw.lvl") in my LUA, specifically the one from BF1? I'm trying to load the EMP launcher explosion sounds and the Arc Caster sounds from BF1's CW general sounds LVL file because they don't really exist for BF2, or at least not in the CW era anyways. I know they are in "cw.lvl" because I checked "cw.snd" and they are there. I already have the proper sound names loaded in my weapons' ODF files.

In my LUA, would it look something like this?
Hidden/Spoiler:
ReadDataFile("sound\\yav.lvl;yav1cw") -- ambiance stream & vehicle effects
ReadDataFile("sound\\fel.lvl;fel1cw") -- music stream
ReadDataFile("dc:sound\\cw.lvl;cw") -- 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")
And this?
Hidden/Spoiler:
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\\cw.lvl", "cw") -- 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
Last edited by Marth8880 on Thu May 12, 2011 8:12 pm, edited 2 times in total.
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Call for "cw.lvl"

Post by THEWULFMAN »

Actually no, cw.lvl is where the VO is stored, you want a worlds sounds. Like geo.

You should look at a BF1 mission script for help, here is geo that I glanced at.
Hidden/Spoiler:
---------------------------------------------------------------------------
-- 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()
-- REP Attacking (attacker is always #1)
local REP = 1
local CIS = 2
-- These variables do not change
local ATT = 1
local DEF = 2

AddMissionObjective(CIS, "orange", "level.geo1.objectives.1r");
AddMissionObjective(CIS, "red", "level.geo1.objectives.2r");
AddMissionObjective(CIS, "red", "level.geo1.objectives.3r");
AddMissionObjective(REP, "orange", "level.geo1.objectives.1r");
AddMissionObjective(REP, "red", "level.geo1.objectives.4r");
AddMissionObjective(REP, "red", "level.geo1.objectives.5r");

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

ReadDataFile("sound\\geo.lvl;geo1cw");
ReadDataFile("SIDE\\rep.lvl",
"rep_bldg_forwardcenter",
"rep_fly_assault_dome",
"rep_fly_gunship",
"rep_fly_gunship_dome",
"rep_fly_jedifighter_dome",
"rep_inf_basic",
"rep_inf_jet_trooper",
"rep_inf_macewindu",
"rep_walk_atte")
ReadDataFile("SIDE\\cis.lvl",
"cis_fly_droidfighter_dome",
"cis_fly_fedcoreship_dome",
"cis_fly_geofighter",
"cis_fly_techounion_dome",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka",
"cis_tread_hailfire",
"cis_walk_spider")
ReadDataFile("SIDE\\geo.lvl",
"gen_inf_geonosian")

-- Level Stats

ClearWalkers()
SetMemoryPoolSize("EntityWalker", -2)
AddWalkerType(0, 8) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(2, 2) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 2) -- 2 attes with 3 leg pairs each
SetMemoryPoolSize("CommandWalker", 2)
SetMemoryPoolSize("EntityFlyer", 5)
SetMemoryPoolSize("EntityHover", 3)
-- SetMemoryPoolSize("EntityCarrier", 2)
-- SetMemoryPoolSize("EntityTauntaun", 0)
-- SetMemoryPoolSize("CommandBuildingArmed", 2)
SetMemoryPoolSize("PowerupItem", 25)
SetMemoryPoolSize("MountedTurret", 50)
SetMemoryPoolSize("Aimer", 200)
SetSpawnDelay(10.0, 0.25)


-- Republic Stats
SetTeamName(REP, "Republic")
SetTeamIcon(REP, "rep_icon")
AddUnitClass(REP, "rep_inf_clone_trooper",14)
AddUnitClass(REP, "rep_inf_arc_trooper",4)
AddUnitClass(REP, "rep_inf_clone_pilot",5)
AddUnitClass(REP, "rep_inf_clone_sharpshooter",5)
AddUnitClass(REP, "rep_inf_jet_trooper",4)
SetHeroClass(REP, "rep_inf_macewindu")
-- SetCarrierClass(REP, "rep_fly_vtrans")

-- CIS Stats
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
AddUnitClass(CIS, "cis_inf_battledroid",11)
AddUnitClass(CIS, "cis_inf_assault",3)
AddUnitClass(CIS, "cis_inf_pilotdroid",4)
AddUnitClass(CIS, "cis_inf_assassindroid",4)
AddUnitClass(CIS, "cis_inf_droideka",3)
SetHeroClass(CIS, "cis_inf_countdooku")


-- Attacker Stats
SetUnitCount(ATT, 32)
SetReinforcementCount(ATT, 250)
AddBleedThreshold(ATT, 31, 0.0)
AddBleedThreshold(ATT, 21, 0.75)
AddBleedThreshold(ATT, 11, 2.25)
AddBleedThreshold(ATT, 1, 3.0)
SetTeamAsEnemy(ATT,3)

-- Defender Stats
SetUnitCount(DEF, 25)
SetReinforcementCount(DEF, 250)
AddBleedThreshold(DEF, 31, 0.0)
AddBleedThreshold(DEF, 21, 0.75)
AddBleedThreshold(DEF, 11, 2.25)
AddBleedThreshold(DEF, 1, 3.0)
SetTeamAsFriend(DEF,3)

-- Local Stats
SetTeamName(3, "locals")
AddUnitClass(3, "geo_inf_geonosian", 7)
SetUnitCount(3, 7)
SetTeamAsFriend(3, DEF)
--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")

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



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

-- Sound
OpenAudioStream("sound\\geo.lvl", "geocw_music");
OpenAudioStream("sound\\cw.lvl", "cw_vo");
OpenAudioStream("sound\\cw.lvl", "cw_tac_vo");
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)

SetOutOfBoundsVoiceOver(1, "repleaving");
SetOutOfBoundsVoiceOver(2, "cisleaving");

SetAmbientMusic(REP, 1.0, "rep_GEO_amb_start", 0,1)
SetAmbientMusic(REP, 0.99, "rep_GEO_amb_middle", 1,1)
SetAmbientMusic(REP, 0.1,"rep_GEO_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_GEO_amb_start", 0,1)
SetAmbientMusic(CIS, 0.99, "cis_GEO_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.1,"cis_GEO_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");

SetPlanetaryBonusVoiceOver(CIS, CIS, 0, "CIS_bonus_CIS_medical");
SetPlanetaryBonusVoiceOver(CIS, REP, 0, "CIS_bonus_REP_medical");
SetPlanetaryBonusVoiceOver(CIS, CIS, 1, "");
SetPlanetaryBonusVoiceOver(CIS, REP, 1, "");
SetPlanetaryBonusVoiceOver(CIS, CIS, 2, "CIS_bonus_CIS_sensors");
SetPlanetaryBonusVoiceOver(CIS, REP, 2, "CIS_bonus_REP_sensors");
SetPlanetaryBonusVoiceOver(CIS, CIS, 3, "CIS_bonus_CIS_hero");
SetPlanetaryBonusVoiceOver(CIS, REP, 3, "CIS_bonus_REP_hero");
SetPlanetaryBonusVoiceOver(CIS, CIS, 4, "CIS_bonus_CIS_reserves");
SetPlanetaryBonusVoiceOver(CIS, REP, 4, "CIS_bonus_REP_reserves");
SetPlanetaryBonusVoiceOver(CIS, CIS, 5, "CIS_bonus_CIS_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(CIS, REP, 5, "CIS_bonus_REP_sabotage");
SetPlanetaryBonusVoiceOver(CIS, CIS, 6, "");
SetPlanetaryBonusVoiceOver(CIS, REP, 6, "");
SetPlanetaryBonusVoiceOver(CIS, CIS, 7, "CIS_bonus_CIS_training");--advanced training
SetPlanetaryBonusVoiceOver(CIS, REP, 7, "CIS_bonus_REP_training");--advanced training

SetPlanetaryBonusVoiceOver(REP, REP, 0, "REP_bonus_REP_medical");
SetPlanetaryBonusVoiceOver(REP, CIS, 0, "REP_bonus_CIS_medical");
SetPlanetaryBonusVoiceOver(REP, REP, 1, "");
SetPlanetaryBonusVoiceOver(REP, CIS, 1, "");
SetPlanetaryBonusVoiceOver(REP, REP, 2, "REP_bonus_REP_sensors");
SetPlanetaryBonusVoiceOver(REP, CIS, 2, "REP_bonus_CIS_sensors");
SetPlanetaryBonusVoiceOver(REP, REP, 3, "REP_bonus_REP_hero");
SetPlanetaryBonusVoiceOver(REP, CIS, 3, "REP_bonus_CIS_hero");
SetPlanetaryBonusVoiceOver(REP, REP, 4, "REP_bonus_REP_reserves");
SetPlanetaryBonusVoiceOver(REP, CIS, 4, "REP_bonus_CIS_reserves");
SetPlanetaryBonusVoiceOver(REP, REP, 5, "REP_bonus_REP_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(REP, CIS, 5, "REP_bonus_CIS_sabotage");
SetPlanetaryBonusVoiceOver(REP, REP, 6, "");
SetPlanetaryBonusVoiceOver(REP, CIS, 6, "");
SetPlanetaryBonusVoiceOver(REP, REP, 7, "REP_bonus_REP_training");--advanced training
SetPlanetaryBonusVoiceOver(REP, CIS, 7, "REP_bonus_CIS_training");--advanced training

--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);
end
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: Call for "cw.lvl"

Post by Marth8880 »

THEWULFMAN wrote:Actually no, cw.lvl is where the VO is stored, you want a worlds sounds. Like geo.

You should look at a BF1 mission script for help, here is geo that I glanced at.
Hidden/Spoiler:
---------------------------------------------------------------------------
-- 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()
-- REP Attacking (attacker is always #1)
local REP = 1
local CIS = 2
-- These variables do not change
local ATT = 1
local DEF = 2

AddMissionObjective(CIS, "orange", "level.geo1.objectives.1r");
AddMissionObjective(CIS, "red", "level.geo1.objectives.2r");
AddMissionObjective(CIS, "red", "level.geo1.objectives.3r");
AddMissionObjective(REP, "orange", "level.geo1.objectives.1r");
AddMissionObjective(REP, "red", "level.geo1.objectives.4r");
AddMissionObjective(REP, "red", "level.geo1.objectives.5r");

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

ReadDataFile("sound\\geo.lvl;geo1cw");
ReadDataFile("SIDE\\rep.lvl",
"rep_bldg_forwardcenter",
"rep_fly_assault_dome",
"rep_fly_gunship",
"rep_fly_gunship_dome",
"rep_fly_jedifighter_dome",
"rep_inf_basic",
"rep_inf_jet_trooper",
"rep_inf_macewindu",
"rep_walk_atte")
ReadDataFile("SIDE\\cis.lvl",
"cis_fly_droidfighter_dome",
"cis_fly_fedcoreship_dome",
"cis_fly_geofighter",
"cis_fly_techounion_dome",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka",
"cis_tread_hailfire",
"cis_walk_spider")
ReadDataFile("SIDE\\geo.lvl",
"gen_inf_geonosian")

-- Level Stats

ClearWalkers()
SetMemoryPoolSize("EntityWalker", -2)
AddWalkerType(0, 8) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(2, 2) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 2) -- 2 attes with 3 leg pairs each
SetMemoryPoolSize("CommandWalker", 2)
SetMemoryPoolSize("EntityFlyer", 5)
SetMemoryPoolSize("EntityHover", 3)
-- SetMemoryPoolSize("EntityCarrier", 2)
-- SetMemoryPoolSize("EntityTauntaun", 0)
-- SetMemoryPoolSize("CommandBuildingArmed", 2)
SetMemoryPoolSize("PowerupItem", 25)
SetMemoryPoolSize("MountedTurret", 50)
SetMemoryPoolSize("Aimer", 200)
SetSpawnDelay(10.0, 0.25)


-- Republic Stats
SetTeamName(REP, "Republic")
SetTeamIcon(REP, "rep_icon")
AddUnitClass(REP, "rep_inf_clone_trooper",14)
AddUnitClass(REP, "rep_inf_arc_trooper",4)
AddUnitClass(REP, "rep_inf_clone_pilot",5)
AddUnitClass(REP, "rep_inf_clone_sharpshooter",5)
AddUnitClass(REP, "rep_inf_jet_trooper",4)
SetHeroClass(REP, "rep_inf_macewindu")
-- SetCarrierClass(REP, "rep_fly_vtrans")

-- CIS Stats
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
AddUnitClass(CIS, "cis_inf_battledroid",11)
AddUnitClass(CIS, "cis_inf_assault",3)
AddUnitClass(CIS, "cis_inf_pilotdroid",4)
AddUnitClass(CIS, "cis_inf_assassindroid",4)
AddUnitClass(CIS, "cis_inf_droideka",3)
SetHeroClass(CIS, "cis_inf_countdooku")


-- Attacker Stats
SetUnitCount(ATT, 32)
SetReinforcementCount(ATT, 250)
AddBleedThreshold(ATT, 31, 0.0)
AddBleedThreshold(ATT, 21, 0.75)
AddBleedThreshold(ATT, 11, 2.25)
AddBleedThreshold(ATT, 1, 3.0)
SetTeamAsEnemy(ATT,3)

-- Defender Stats
SetUnitCount(DEF, 25)
SetReinforcementCount(DEF, 250)
AddBleedThreshold(DEF, 31, 0.0)
AddBleedThreshold(DEF, 21, 0.75)
AddBleedThreshold(DEF, 11, 2.25)
AddBleedThreshold(DEF, 1, 3.0)
SetTeamAsFriend(DEF,3)

-- Local Stats
SetTeamName(3, "locals")
AddUnitClass(3, "geo_inf_geonosian", 7)
SetUnitCount(3, 7)
SetTeamAsFriend(3, DEF)
--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")

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



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

-- Sound
OpenAudioStream("sound\\geo.lvl", "geocw_music");
OpenAudioStream("sound\\cw.lvl", "cw_vo");
OpenAudioStream("sound\\cw.lvl", "cw_tac_vo");
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)

SetOutOfBoundsVoiceOver(1, "repleaving");
SetOutOfBoundsVoiceOver(2, "cisleaving");

SetAmbientMusic(REP, 1.0, "rep_GEO_amb_start", 0,1)
SetAmbientMusic(REP, 0.99, "rep_GEO_amb_middle", 1,1)
SetAmbientMusic(REP, 0.1,"rep_GEO_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_GEO_amb_start", 0,1)
SetAmbientMusic(CIS, 0.99, "cis_GEO_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.1,"cis_GEO_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");

SetPlanetaryBonusVoiceOver(CIS, CIS, 0, "CIS_bonus_CIS_medical");
SetPlanetaryBonusVoiceOver(CIS, REP, 0, "CIS_bonus_REP_medical");
SetPlanetaryBonusVoiceOver(CIS, CIS, 1, "");
SetPlanetaryBonusVoiceOver(CIS, REP, 1, "");
SetPlanetaryBonusVoiceOver(CIS, CIS, 2, "CIS_bonus_CIS_sensors");
SetPlanetaryBonusVoiceOver(CIS, REP, 2, "CIS_bonus_REP_sensors");
SetPlanetaryBonusVoiceOver(CIS, CIS, 3, "CIS_bonus_CIS_hero");
SetPlanetaryBonusVoiceOver(CIS, REP, 3, "CIS_bonus_REP_hero");
SetPlanetaryBonusVoiceOver(CIS, CIS, 4, "CIS_bonus_CIS_reserves");
SetPlanetaryBonusVoiceOver(CIS, REP, 4, "CIS_bonus_REP_reserves");
SetPlanetaryBonusVoiceOver(CIS, CIS, 5, "CIS_bonus_CIS_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(CIS, REP, 5, "CIS_bonus_REP_sabotage");
SetPlanetaryBonusVoiceOver(CIS, CIS, 6, "");
SetPlanetaryBonusVoiceOver(CIS, REP, 6, "");
SetPlanetaryBonusVoiceOver(CIS, CIS, 7, "CIS_bonus_CIS_training");--advanced training
SetPlanetaryBonusVoiceOver(CIS, REP, 7, "CIS_bonus_REP_training");--advanced training

SetPlanetaryBonusVoiceOver(REP, REP, 0, "REP_bonus_REP_medical");
SetPlanetaryBonusVoiceOver(REP, CIS, 0, "REP_bonus_CIS_medical");
SetPlanetaryBonusVoiceOver(REP, REP, 1, "");
SetPlanetaryBonusVoiceOver(REP, CIS, 1, "");
SetPlanetaryBonusVoiceOver(REP, REP, 2, "REP_bonus_REP_sensors");
SetPlanetaryBonusVoiceOver(REP, CIS, 2, "REP_bonus_CIS_sensors");
SetPlanetaryBonusVoiceOver(REP, REP, 3, "REP_bonus_REP_hero");
SetPlanetaryBonusVoiceOver(REP, CIS, 3, "REP_bonus_CIS_hero");
SetPlanetaryBonusVoiceOver(REP, REP, 4, "REP_bonus_REP_reserves");
SetPlanetaryBonusVoiceOver(REP, CIS, 4, "REP_bonus_CIS_reserves");
SetPlanetaryBonusVoiceOver(REP, REP, 5, "REP_bonus_REP_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(REP, CIS, 5, "REP_bonus_CIS_sabotage");
SetPlanetaryBonusVoiceOver(REP, REP, 6, "");
SetPlanetaryBonusVoiceOver(REP, CIS, 6, "");
SetPlanetaryBonusVoiceOver(REP, REP, 7, "REP_bonus_REP_training");--advanced training
SetPlanetaryBonusVoiceOver(REP, CIS, 7, "REP_bonus_CIS_training");--advanced training

--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);
end
That was the first thing I tried - with the Rhen Var LUA - and it didn't work. Here is what I had my LUA as:

PIOc_con.lua
Hidden/Spoiler:
--
-- 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
Yes, I copied over the LVL files to the proper spots.
CalvaryCptMike
Captain
Captain
Posts: 476
Joined: Sat Feb 19, 2011 3:10 pm
Projects :: Nothing--absolutely nothing
Location: Freed by alien robots, now living on Mars
Contact:

Re: Load SWBF1 sounds

Post by CalvaryCptMike »

What do you mean "proper spots"? I assume that means addon/yourmapname/data/_lvl_pc/sound.

Secondly you're loading two sound files from the stock sound folder in the actual game. You can only load one or problems will ensue. Copy the smaller one into your addon folder and load it as a dc:.

If the sounds STILL won't work then it probably has to do with the same thing as when you load a second major snd file it overrides all the sounds and makes it mute.
Post Reply