Page 1 of 1

Sound troubles

Posted: Thu Apr 05, 2012 7:38 pm
by brant777
i have recently put vehicles in my map but when i got in and moved, no sound came out :runaway:. is there something i have to add to my sound folder?

Re: sound troubles

Posted: Thu Apr 05, 2012 8:05 pm
by mostimpresive
brant777 wrote:i have recently put vehicles in my map but when i got in and moved, no sound came out :runaway:. is there something i have to add to my sound folder?
I think so, although I've never heard of this type of problem happening.

Re: sound troubles

Posted: Thu Apr 05, 2012 8:19 pm
by Marth8880
Which vehicles did you add? Could you please post your LUA?

Re: sound troubles

Posted: Thu Apr 05, 2012 8:20 pm
by ARCTroopaNate
What vehicle(s) are you trying to add?

EDIT: Ninja'd :P

Re: sound troubles

Posted: Thu Apr 05, 2012 8:22 pm
by mostimpresive
Guys, this is my friend on xfire, so I know this, he tried to add those speeders from Ender.

Re: sound troubles

Posted: Thu Apr 05, 2012 8:39 pm
by brant777
i added the imperial speederbike and the anakins starfighter

here is my lua
Hidden/Spoiler:
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Mos Eisley Hero Deathmatch (uses Space Assault rules)
-- First team to reach 100 kills wins
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveTDM")

---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
function ScriptPostLoad()
EnableSPHeroRules()
-- This is the actual objective setup
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2,
multiplayerScoreLimit = 100,
textATT = "game.modes.tdm",
textDEF = "game.modes.tdm2", multiplayerRules = true, isCelebrityDeathmatch = true}
TDM:Start()

AddAIGoal(1, "Deathmatch", 100)
AddAIGoal(2, "Deathmatch", 100)
end


---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------
function ScriptInit()



SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",70) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",850) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",750) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",8000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",140) -- should be ~1x #combo -- should be ~1x #combo
--tell the game to load our loading image
ReadDataFile("dc:Load\\common.lvl")
ReadDataFile("ingame.lvl")

ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2

SetMaxFlyHeight(800)
SetMaxPlayerFlyHeight(800)

ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("SIDE\\all.lvl",
"all_hero_luke_jedi")

ReadDataFile("SIDE\\jed.lvl",
"jed_master_03",
"jed_sith_01")
ReadDataFile("SIDE\\imp.lvl",
"imp_hero_darthvader",
"imp_hero_emperor",
"imp_hero_bobafett",
"imp_hover_speederbike")

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_yoda",
"rep_hero_macewindu",
"rep_hero_cloakedanakin",
"rep_hero_aalya",
"rep_hero_kiyadimundi",
"rep_hero_obiwan",
"rep_fly_anakinstarfighter_sc")

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_grievous",
"cis_hero_darthmaul",
"cis_hero_countdooku")

--[[ Turrets disabled
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_chaingun_roof",
"tur_weap_built_gunturret")
SetMemoryPoolSize("MountedTurret", 15)
--]]

--ReadDataFile("SIDE\\snw.lvl", "snw_inf_wampa")

SetupTeams{
hero = {
team = ALL,
units = 20,
reinforcements = -1,
soldier = { "all_hero_hansolo_tat",1,2},
assault = { "all_hero_chewbacca", 1,2},
engineer= { "all_hero_luke_jedi", 1,2},
sniper = { "rep_hero_obiwan", 1,2},
officer = { "rep_hero_yoda", 1,2},
special = { "rep_hero_macewindu", 1,2},
},
}

AddUnitClass(ALL,"jed_master_03", 1,2)
AddUnitClass(ALL,"rep_hero_aalya", 1,2)
AddUnitClass(ALL,"rep_hero_kiyadimundi",1,2)


SetupTeams{
villain = {
team = IMP,
units = 20,
reinforcements = -1,
soldier = { "imp_hero_bobafett", 1,2},
assault = { "imp_hero_darthvader",1,2},
engineer= { "cis_hero_darthmaul", 1,2},
sniper = { "cis_hero_jangofett", 1,2},
officer = { "cis_hero_grievous", 1,2},
special = { "imp_hero_emperor", 1,2},

},
}
AddUnitClass(IMP, "jed_sith_01",1,2)
AddUnitClass(IMP, "rep_hero_cloakedanakin",1,2)
AddUnitClass(IMP, "cis_hero_countdooku",1,2)

-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)

local weaponCnt = 96
SetMemoryPoolSize("Aimer", 1)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 320)
SetMemoryPoolSize("ConnectivityGraphFollower", 23)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth",41)
SetMemoryPoolSize("EntityDefenseGridTurret", 0)
SetMemoryPoolSize("EntityDroid", 0)
SetMemoryPoolSize("EntityFlyer", 32) -- to account for 5 chewbaccas
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 80, 80) -- stupid trickery to actually set lights to 80
SetMemoryPoolSize("EntityPortableTurret", 0) -- nobody has autoturrets AFAIK - MZ
SetMemoryPoolSize("EntitySoundStream", 2)
SetMemoryPoolSize("EntitySoundStatic", 45)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 120)
SetMemoryPoolSize("MountedTurret", 0)
SetMemoryPoolSize("Navigator", 23)
SetMemoryPoolSize("Obstacle", 667)
SetMemoryPoolSize("Ordnance", 80) -- not much ordnance going on in the level
SetMemoryPoolSize("ParticleEmitter", 512)
SetMemoryPoolSize("ParticleEmitterInfoData", 512)
SetMemoryPoolSize("PathFollower", 23)
SetMemoryPoolSize("PathNode", 128)
SetMemoryPoolSize("ShieldEffect", 0)
SetMemoryPoolSize ("SoldierAnimation",500)
SetMemoryPoolSize("TentacleSimulator", 24)
SetMemoryPoolSize("TreeGridStack", 290)
SetMemoryPoolSize("UnitAgent", 23)
SetMemoryPoolSize("UnitController", 23)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:JAM\\JAM.lvl", "JAM_eli")
SetDenseEnvironment("false")

-- Sound Stats

ScriptCB_EnableHeroMusic(0)
ScriptCB_EnableHeroVO(0)

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "gcw_music")
OpenAudioStream("sound\\tat.lvl", "tat2")
OpenAudioStream("sound\\tat.lvl", "tat2")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")

SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(1, "Allleaving")
SetOutOfBoundsVoiceOver(2, "Impleaving")

SetAmbientMusic(ALL, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(ALL, 0.9, "all_tat_amb_middle", 1,1)
-- SetAmbientMusic(ALL, 0.1, "all_tat_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(IMP, 0.9, "imp_tat_amb_middle", 1,1)
-- SetAmbientMusic(IMP, 0.1, "imp_tat_amb_end", 2,1)

SetVictoryMusic(ALL, "all_tat_amb_victory")
SetDefeatMusic (ALL, "all_tat_amb_defeat")
SetVictoryMusic(IMP, "imp_tat_amb_victory")
SetDefeatMusic (IMP, "imp_tat_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")

SetAttackingTeam(ATT)

-- Camera Stats
--Tat2 Mos Eisley
AddCameraShot(0.974338, -0.222180, 0.035172, 0.008020, -82.664650, 23.668301, 43.955681);
AddCameraShot(0.390197, -0.089729, -0.893040, -0.205362, 23.563562, 12.914885, -101.465561);
AddCameraShot(0.169759, 0.002225, -0.985398, 0.012916, 126.972809, 4.039628, -22.020613);
AddCameraShot(0.677453, -0.041535, 0.733016, 0.044942, 97.517807, 4.039628, 36.853477);
AddCameraShot(0.866029, -0.156506, 0.467299, 0.084449, 7.685640, 7.130688, -10.895234);
end

Re: sound troubles

Posted: Thu Apr 05, 2012 9:52 pm
by AceMastermind
brant777 wrote:ReadDataFile("sound\\tat.lvl;tat2gcw")
That lvl file probably doesn't have the sounds you need.
You'll likely need to create a custom sound lvl or load another which calls the sounds for the vehicles you want to use.

How to add missing shipped sounds

Re: sound troubles

Posted: Thu Apr 05, 2012 9:58 pm
by Marth8880
  1. Create a new side with the Imperial speeder bike and Anakin's Starfighter in it. Then, load them in your LUA like you would with any other custom side.
  2. In the ODF for the starfighter, find this:

    Code: Select all

    EngineSound             = "rep_fly_anakinfighter_engine_parameterized"
    TakeoffSound            = "rep_fly_anakinfighter_take_off"
    LandSound               = "rep_fly_anakinfighter_land"
    And replace it with this:

    Code: Select all

    EngineSound         = "all_fly_snowspeeder_engine_parameterized"
    TakeoffSound        = "all_fly_snowspeeder_takeoff"
    LandSound           = "all_fly_snowspeeder_land"
    And save and close that ODF file.
  3. In the starfighter's "cannon" weapon ODF, find this:

    Code: Select all

    FireSound = "rep_weap_fly_anakinfighter_cannon_fire"
    FireSoundStop   = "0"
    And replace it with this:

    Code: Select all

    FireSound           = "all_weap_fly_snowspeeder_cannon_fire"
    FireSoundStop       = "1"
    Save and close that ODF.
  4. In the same vehicle's "missile" weapon ODF, find this:

    Code: Select all

    FireSound = "rep_weap_fly_anakinfighter_missle_fire"
    FireSoundStop   = "0"
    And replace it with this:

    Code: Select all

    FireSound           = "imp_weap_inf_rocket_launcher_fire"
    Now save and close that file too.
    ____________________________________________
  5. In the speeder bike's ODF, find this:

    Code: Select all

    EngineSound 			= "speederbike_engine_parameterized"
    And replace it with this:

    Code: Select all

    EngineSound         = "all_fly_snowspeeder_engine_parameterized"
    Save and close that ODF file.
  6. In the speeder bike's "cannon" weapon ODF file, find this:

    Code: Select all

    FireSound       		= "imp_weap_hover_speederbike_cannon_fire"
    And replace it with this:

    Code: Select all

    FireSound       		= "imp_weap_walk_atst_cannon_head_fire"
    And save and close that file.
    ____________________________________________
  7. Now, open up your LUA.

    Above this:

    Code: Select all

    ReadDataFile("sound\\tat.lvl;tat2gcw")
    Add this:

    Code: Select all

    ReadDataFile("dc:sound\\hot.lvl;hot1gcw")
    So it looks like this:

    Code: Select all

    ReadDataFile("dc:sound\\hot.lvl;hot1gcw")
    ReadDataFile("sound\\tat.lvl;tat2gcw")
    Save and close your LUA. Open up Visual Munge, make sure "Common" is checked and your side that you created is selected in the list of sides, and click "Munge"! 8D
  8. Finally, go into \GameData\data\_lvl_pc\sound\, copy hot.lvl, and paste it into your map's sound folder in the addon directory. (e.g., \addon\ABC\data\_LVL_PC\sound\)

Basically, what we just did here is we loaded the Hoth sound file into our LUA and replaced both vehicles' sounds with the Snowspeeder and AT-ST sounds since they both fit well enough and there is no sound LVL with the sounds from both Anakin's Starfighter and the Imperial Speeder Bike. One other way to fix the vehicles' sounds is to do some complicated, painful work with compiling stock sounds into a custom sound LVL, but that really isn't worth it. Another alternative is to simply use your own custom sounds, but most people don't seem to know where to find their own custom sounds/know how to create custom sounds from scratch by themselves and pack it all into a custom sound LVL.

By the way, you do not know how thankful I am that at least somebody actually cares about resolving missing (vehicle) sounds even though it's a problem that really isn't all too difficult to fix. (No offense to anybody and I don't mean to sound "snobby" or anything :lol: ; quality sound design just means a lot to me and it's just as important as a mod's visuals, and the lack of good sound design results in empty atmosphere. This is something that I cannot stress enough in maps and mods.)


EDIT:

Oh, and what Ace said. :P

Re: sound troubles

Posted: Thu Apr 05, 2012 10:04 pm
by brant777
where do i go to create a new side and what should i name it?

Re: sound troubles

Posted: Thu Apr 05, 2012 10:42 pm
by Marth8880
Custom Side: How To

Just name the side VEH or something.

Re: sound troubles

Posted: Fri Apr 06, 2012 4:26 pm
by brant777
could i just add the worlds that have the vehicles i want? like what you said about adding hoth to the lua.

Re: sound troubles

Posted: Fri Apr 06, 2012 4:31 pm
by Marth8880
Typically, only really two stock world sound LVLs can be loaded successfully due to annoying conflicts with multiple .snd files and just a bunch of stuff that conflicts with each other.

Re: sound troubles

Posted: Sat Apr 07, 2012 9:45 am
by brant777
is there an easier way to do this? i have added a gunship, arc170, and a snowspeeder to my map. Btw thanks for the tut. but i was just wandering if there is an easier way to do add sound into my map. :cpu:

Re: sound troubles

Posted: Sat Apr 07, 2012 4:50 pm
by Marth8880
Not really, no, unless you enjoy picking at custom sound LVLs. Honestly, the way I described isn't all that difficult, but instead, time-consuming and a bit tedious. And either way, I pretty much gave you all the tools you need to do it, so all you need to really do is just piece it all together.