Page 1 of 1

No sound from added vehicles

Posted: Sat Aug 31, 2013 2:44 pm
by SWBF3Petition
I followed this tutorial to add some vehicles to my map. The only problem is, there's no sound for them. For example, if I shoot with a starfighter I added, you can see the animation, but there's no sound with it. Anyone have an idea of what I did wrong?

Re: No sound from added vehicles

Posted: Sat Aug 31, 2013 9:00 pm
by Marth8880
Which vehicles have you added?

Re: No sound from added vehicles

Posted: Sat Aug 31, 2013 9:56 pm
by SWBF3Petition
I'll just list them:
Anakin's Starfighter
Republic Gunship
ARC-170
V-Wing

Grevious Bomber
Tri-Fighter
Droid Starfighter

Re: No sound from added vehicles

Posted: Sat Aug 31, 2013 10:36 pm
by Marth8880
Was this map built with "Space Map" checked in VisualMunge, or is it a normal map and you added them?

Re: No sound from added vehicles

Posted: Sun Sep 01, 2013 12:49 am
by SWBF3Petition
It was stock Mygeeto that I've been modding. So it was a ground map that I added flyers to.

Re: No sound from added vehicles

Posted: Thu Sep 05, 2013 4:49 pm
by Nedarb7
The sounds aren't going to work without the proper sound.lvl file loaded in the LUA, I'm assuming that you're using an edited Mygeeto LUA? Could you post it?

Re: No sound from added vehicles

Posted: Thu Sep 05, 2013 10:57 pm
by SWBF3Petition
That's probably what it is. I'll post it, but be warned, I've been messing around with it, and I'm a noob, so it looks kinda bad, lol!
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

-- Republic Attacking (attacker is always #1)
REP = 1
CIS = 2
-- 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()

DisableBarriers("dropship")
DisableBarriers("shield_03")
DisableBarriers("shield_02")
DisableBarriers("shield_01")
DisableBarriers("ctf")
DisableBarriers("ctf1")
DisableBarriers("ctf2")
DisableBarriers("ctf3")
DisableBarriers("coresh1")

EnableSPHeroRules()

cp1 = CommandPost:New{name = "CP1_CON"}
cp2 = CommandPost:New{name = "CP2_CON"}
--cp3 = CommandPost:New{name = "CP3_CON"}
cp4 = CommandPost:New{name = "CP4_CON"}
cp5 = CommandPost:New{name = "CP5_CON"}
cp7 = CommandPost:New{name = "CP7_CON"}
--cp8 = CommandPost:New{name = "CP8_CON"}

conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, textATT = "game.modes.con", textDEF = "game.modes.con2", multiplayerRules = true}

conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
--conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp7)
--conquest:AddCommandPost(cp8)

conquest:Start()

end


function ScriptInit()
-- Designers, these two lines *MUST* be first!
StealArtistHeap(2048 * 1024)
SetPS2ModelMemory(4000000)
ReadDataFile("ingame.lvl")

ReadDataFile("sound\\myg.lvl;myg1cw")

ReadDataFile("SIDE\\rep.lvl",
--"rep_fly_assault_dome",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_pilot", --To add pilot
"rep_inf_ep3_engineer",
"rep_inf_ep3_jettrooper",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_hover_fightertank",
"rep_hero_kiyadimundi",
"rep_fly_anakinstarfighter_sc",
"rep_fly_gunship",
"rep_fly_vwing",
"rep_fly_arc170fighter_sc")
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_pilot", --To add pilot
"cis_inf_engineer",
"cis_inf_sniper",
"cis_hover_aat",
"cis_fly_gunship_dome",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_grievous",
"cis_fly_droidfighter_sc",
"cis_fly_tridroidfighter",
"cis_fly_greviousfighter")

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


SetupTeams{

rep={
team = REP,
units = 32,
reinforcements = 150,
soldier = {"rep_inf_ep3_rifleman", 9, 25},
assault = {"rep_inf_ep3_rocketeer", 1, 4},
pilot = {"rep_inf_ep3_pilot", 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 = 32,
reinforcements = 150,
soldier = {"cis_inf_rifleman", 9, 25},
assault = {"cis_inf_rocketeer", 1, 4},
pilot = {"cis_inf_pilot", 1, 4},
--engineer = {"cis_inf_engineer", 1, 4},
sniper = {"cis_inf_sniper", 1, 4},
officer = {"cis_inf_officer", 1, 4},
special = {"cis_inf_droideka", 1, 4},
}
}


-- Hero Setup Section --

SetHeroClass(REP, "rep_hero_kiyadimundi")
SetHeroClass(CIS, "cis_hero_grievous")

-- Level Stats
ClearWalkers()
AddWalkerType(0, 4)
AddWalkerType(2, 0)
local weaponCnt = 230
SetMemoryPoolSize("Aimer", 60)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 250)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 19)
SetMemoryPoolSize("EntityHover", 10)
SetMemoryPoolSize("EntityFlyer", 50)
SetMemoryPoolSize("EntitySoundStream", 1)
SetMemoryPoolSize("EntitySoundStatic", 76)
SetMemoryPoolSize("MountedTurret", 16)
SetMemoryPoolSize("Navigator", 50)
SetMemoryPoolSize("Obstacle", 500)
SetMemoryPoolSize("PathNode", 256)
SetMemoryPoolSize("TreeGridStack", 275)
SetMemoryPoolSize("UnitAgent", 50)
SetMemoryPoolSize("UnitController", 50)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:GSM\\myg1.lvl", "myg1_conquest")
SetDenseEnvironment("false")
AddDeathRegion("deathregion")
SetMaxFlyHeight(2000)
SetMaxPlayerFlyHeight(2000)

-- 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")
OpenAudioStream("sound\\myg.lvl", "myg1")
OpenAudioStream("sound\\myg.lvl", "myg1")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\myg.lvl", "myg1_emt")

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_myg_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_myg_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2,"rep_myg_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_myg_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_myg_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2,"cis_myg_amb_end", 2,1)

SetVictoryMusic(REP, "rep_myg_amb_victory")
SetDefeatMusic (REP, "rep_myg_amb_defeat")
SetVictoryMusic(CIS, "cis_myg_amb_victory")
SetDefeatMusic (CIS, "cis_myg_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")


--Camera Shizzle--

-- Collector Shot
AddCameraShot(0.008315, 0.000001, -0.999965, 0.000074, -64.894348, 5.541570, 201.711090);
AddCameraShot(0.633584, -0.048454, -0.769907, -0.058879, -171.257629, 7.728924, 28.249359);
AddCameraShot(-0.001735, -0.000089, -0.998692, 0.051092, -146.093109, 4.418306, -167.739212);
AddCameraShot(0.984182, -0.048488, 0.170190, 0.008385, 1.725611, 8.877428, 88.413887);
AddCameraShot(0.141407, -0.012274, -0.986168, -0.085598, -77.743042, 8.067328, 42.336128);
AddCameraShot(0.797017, 0.029661, 0.602810, -0.022434, -45.726467, 7.754435, -47.544712);
AddCameraShot(0.998764, 0.044818, -0.021459, 0.000963, -71.276566, 4.417432, 221.054550);
end

Re: No sound from added vehicles

Posted: Fri Sep 06, 2013 6:53 am
by DylanRocket
Try putting ReadDataFile("sound\\spa.lvl;spa2cw") above the ReadDataFile("sound\\myg1.lvl;myg1cw"). If that does not work try these faqs:

Add missing sounds without creating a new lvl

Rend's tutorial(You'll have to create a new sound lvl using your mapID)

If you create a new sound lvl, I usually find munging it in BF1 easier but you can download the BF2 fixes(never worked for me though).

Re: No sound from added vehicles

Posted: Fri Sep 06, 2013 10:33 am
by Noobasaurus
DylanRocket wrote:Try putting ReadDataFile("sound\\spa.lvl;spa2cw") above the ReadDataFile("sound\\myg1.lvl;myg1cw").
I'm pretty sure that whichever one is loaded last will over write the other one.

Re: No sound from added vehicles

Posted: Fri Sep 06, 2013 3:32 pm
by DylanRocket
Noobasaurus wrote:
DylanRocket wrote:Try putting ReadDataFile("sound\\spa.lvl;spa2cw") above the ReadDataFile("sound\\myg1.lvl;myg1cw").
I'm pretty sure that whichever one is loaded last will over write the other one.
Really? I've never tried this for BF2 but for BF1 it seemed to work.

Re: No sound from added vehicles

Posted: Fri Sep 06, 2013 5:46 pm
by SWBF3Petition
DylanRocket wrote:
Noobasaurus wrote:
DylanRocket wrote:Try putting ReadDataFile("sound\\spa.lvl;spa2cw") above the ReadDataFile("sound\\myg1.lvl;myg1cw").
I'm pretty sure that whichever one is loaded last will over write the other one.
Really? I've never tried this for BF2 but for BF1 it seemed to work.

No, they're right. It doesn't work. It uses whichever is loaded first. I thought it worked, but then I noticed that there were no lightsaber sounds when I played as a Jedi. Undoing the change fixed that.

EDIT: I've been going through all of the myg1cw.* and spa2cw.* files, and trying some stuff, but so far nothing is working. I'm still not getting any sound from the starfighters.

Re: No sound from added vehicles

Posted: Sat Sep 07, 2013 10:33 am
by Locutus
You made the effort to click on that link?
All you have to do is to put a dc: before it.

Re: No sound from added vehicles

Posted: Sun Sep 08, 2013 7:02 am
by lucasfart
Maybe I'm misreading things, but I don't think its that simple Locotus? Quote from above link (bottom of the page).
Maveritchell wrote:Your problem (and the reason that using sounds like this tutorial suggests will inevitably lead to issues) is that you can't load two of the same sounds from two different .lvl files (like Teancum mentioned in the fourth post). If you want to add missing vehicle sounds, you will almost inevitably need to munge a new sound .lvl file yourself - fortunately Rends made a very easy and clear tutorial on this. Follow it, do what it says, and if you do it correctly your sounds will be heard.
So basically, try the dc:, but it probably won't work as you'll be messing with other sounds you do need which are now loaded twice. In that case, use the tut by Rends that Dylanrocket mentioned. :)
Teancum wrote:So long as a second sound lvl doesn't overwrite existing sounds you can use em. ["dc"s]

Re: No sound from added vehicles

Posted: Sun Sep 08, 2013 3:08 pm
by Marth8880
Just gonna point out right now, the most efficient way of doing this will be to munge all of the vehicles' sounds in your own sound LVL, which is finally possible because of this.

Re: No sound from added vehicles

Posted: Sun Sep 08, 2013 4:06 pm
by Maveritchell
Marth8880 wrote:Just gonna point out right now, the most efficient way of doing this will be to munge all of the vehicles' sounds in your own sound LVL, which is finally possible because of this.
That's maybe an easier way, but not the most efficient. More efficient is to create a sound .lvl file that pulls from the stock sound .lvl files only what you need (so that you don't have overlapping sounds).

Re: No sound from added vehicles

Posted: Sun Sep 08, 2013 4:10 pm
by Marth8880
Right, that's what I meant; I meant to munge all of the vehicles that he was using. :o

Re: No sound from added vehicles

Posted: Sun Sep 08, 2013 5:52 pm
by Maveritchell
Marth8880 wrote:Right, that's what I meant; I meant to munge all of the vehicles that he was using. :o
Except you don't need any sound sources to do that (i.e. the download you pointed to). You can reference stock sound streams (from the .lvl files that install with the base game) in your various config files and end up with a sound .lvl that's a few KB instead of the several MB you'd have if you munged all the actual sound files in with it. We've managed working sound streams without the actual source files for a long time - having the sound files themselves (.wav files) is just a convenience.

Re: No sound from added vehicles

Posted: Sun Sep 08, 2013 6:28 pm
by Marth8880
Well, with the few sounds vehicles use at 22 kHz each, the file size would hardly even really be a megabyte in size, but still. I've also personally never gotten referencing the sounds without the samples themselves to work, and it's really a lot less painful to just include the actual WAV files, but meh, whichever the OP prefers.

Re: No sound from added vehicles

Posted: Mon Sep 09, 2013 4:12 pm
by SWBF3Petition
Whoa, gone for the weekend and all these replies!

Yeah, I've tried the tutorials and without any success. I'll try out some of the other stuff you guys suggested when I get the chance.

EDIT: So, I'm trying to figure out how you munge the sounds into my own .lvl, but I haven't seen a tutorial for it anywhere... Can someone point me to one?

EDIT 2: I've tried copying the sound source files into their respective locations, then calling them in the sfx file. After munging everything, I still had no sound for the vehicles.

Re: No sound from added vehicles

Posted: Thu Sep 12, 2013 6:55 am
by lucasfart
Have you tried THIS tutorial? I've never really tried sound munging, but that looks like the kind of thing. And I'm pretty sure Rends tut goes right through including the munging...