Page 1 of 1

Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 7:39 am
by Eaol
Hey, I've been trying to make sense of these tutorials so I could change the sounds of (stock weapons) on a custom map. I've been having issues, though.

I'm not sure what the issue is, but I can't seem to have any effect on the sounds I hear in-game. I don't know if I screwed up the .lua or if I don't have a functional munge.bat or what; here's everything:

Munge.bat 1 - this one does stuff but it gives me a ridiculous error log:
Hidden/Spoiler:
@REM WARNING: enabledelayedexpansion means ! is a special character,
@REM which means it isn't available for use as the mungeapp recursive
@REM wildcard character. Use the alternate $ instead.
@setlocal enabledelayedexpansion

@set MUNGE_ROOT_DIR=..\..
@if not "%1"=="" set MUNGE_PLATFORM=%1
@if %MUNGE_PLATFORM%x==x set MUNGE_PLATFORM=PC
REM @if "%MUNGE_BIN_DIR%"=="" (
@set MUNGE_BIN_DIR=%CD%\%MUNGE_ROOT_DIR%\..\ToolsFL\Bin
@set PATH=%CD%\..\..\..\ToolsFL\Bin;%PATH%
REM @echo MUNGE_BIN_DIR=!MUNGE_BIN_DIR!
REM )

@rem convert to lower case
@if %MUNGE_PLATFORM%==PC set MUNGE_PLATFORM=pc
@if %MUNGE_PLATFORM%==XBOX set MUNGE_PLATFORM=xbox
@if %MUNGE_PLATFORM%==PS2 set MUNGE_PLATFORM=ps2

@set MUNGE_DIR=MUNGED\%MUNGE_PLATFORM%

@set LOCAL_MUNGE_LOG="%CD%\%MUNGE_PLATFORM%_MungeLog.txt"
@if "%MUNGE_LOG%"=="" (
@set MUNGE_LOG=%LOCAL_MUNGE_LOG%
@if exist %LOCAL_MUNGE_LOG% ( del %LOCAL_MUNGE_LOG% )
)
@rem echo ********************************************************************* >> %MUNGE_LOG%
@rem echo Sound\munge.bat %MUNGE_PLATFORM% >> %MUNGE_LOG%
@rem echo MUNGE_BIN_DIR=%MUNGE_BIN_DIR% >> %MUNGE_LOG%
@rem echo ********************************************************************* >> %MUNGE_LOG%

@cd ..\..

@if not exist _LVL_%MUNGE_PLATFORM% mkdir _LVL_%MUNGE_PLATFORM%
@if not exist _LVL_%MUNGE_PLATFORM%\Sound mkdir _LVL_%MUNGE_PLATFORM%\Sound

@if /i %MUNGE_PLATFORM%==pc @set BANKOPT=-template

@call soundmunge.bat %MUNGE_PLATFORM%
@if %SOUNDCLEANLVL%x==1x @del /S /Q _BUILD\sound\*.lvl & @call soundmunge.bat %MUNGE_PLATFORM%

@if /i not "%SOUNDLVL%"=="" (
@for %%A in (%SOUNDLVL%) do @if /i "%%A"=="global" @goto buildglobalbank
@goto skipglobalbank
)
:buildglobalbank
@rem Build a global sound bank...
@set BANKLIST=
@for /R %%A in (*.sfx) do @set BANKLIST=!BANKLIST! %%A
@for /R %%A in (*.asfx) do @set BANKLIST=!BANKLIST! %%A
@if %SOUNDLOG%x==1x ( @set SOUNDOPT=-verbose & @set SOUNDLOGOUT=%LOGDIR%\SoundBankLog.txt ) else ( @set SOUNDOPT= & @set SOUNDLOGOUT=NUL )

@if not %MUNGE_PLATFORM%==pc goto skipglobalbank
@echo Munging common.bnk, this could take a while...
@soundflmunge -platform %MUNGE_PLATFORM% -banklistinput %BANKLIST% -bankoutput _LVL_%MUNGE_PLATFORM%\Sound\common.bnk -checkdate -resample -compact nowarning -checkid noabort -relativepath %SOUNDOPT% 2>>%MUNGE_LOG% 1>>%SOUNDLOGOUT%

:skipglobalbank

@cd _BUILD\Sound

@REM If the munge log was created locally and has anything in it, view it
@if not %MUNGE_LOG%x==%LOCAL_MUNGE_LOG%x goto skip_mungelog
@set FILE_CONTENTS_TEST=
@if exist %MUNGE_LOG% for /f %%i in (%MUNGE_LOG:"=%) do @set FILE_CONTENTS_TEST=%%i
@if not "%FILE_CONTENTS_TEST%"=="" ( Notepad.exe %MUNGE_LOG% ) else ( if exist %MUNGE_LOG% (del %MUNGE_LOG%) )

:skip_mungelog

@rem convert to upper case
@if %MUNGE_PLATFORM%==pc set MUNGE_PLATFORM=PC
@if %MUNGE_PLATFORM%==xbox set MUNGE_PLATFORM=XBOX
@if %MUNGE_PLATFORM%==ps2 set MUNGE_PLATFORM=PS2

@endlocal
Munge.bat 2 - the one that I downloaded that supposedly works but doesn't actually do anything:
Hidden/Spoiler:
@REM WARNING: enabledelayedexpansion means ! is a special character,
@REM which means it isn't available for use as the mungeapp recursive
@REM wildcard character. Use the alternate $ instead.
@setlocal enabledelayedexpansion

@set MUNGE_ROOT_DIR=..\..
@if not "%1"=="" set MUNGE_PLATFORM=%1
@if %MUNGE_PLATFORM%x==x set MUNGE_PLATFORM=PC
@if "%MUNGE_BIN_DIR%"=="" (
@set MUNGE_BIN_DIR=%CD%\%MUNGE_ROOT_DIR%\..\ToolsFL\Bin
@set PATH=%CD%\..\..\..\ToolsFL\Bin;%PATH%
@echo MUNGE_BIN_DIR=!MUNGE_BIN_DIR!
)

@rem convert to lower case
@if %MUNGE_PLATFORM%==PC set MUNGE_PLATFORM=pc
@if %MUNGE_PLATFORM%==XBOX set MUNGE_PLATFORM=xbox
@if %MUNGE_PLATFORM%==PS2 set MUNGE_PLATFORM=ps2

@if /i %MUNGE_PLATFORM%==pc @set BANKOPT=-template -stub c:\windows\media\chord.wav
@set MUNGE_DIR=MUNGED\%MUNGE_PLATFORM%

@set LOCAL_MUNGE_LOG="%CD%\%MUNGE_PLATFORM%_MungeLog.txt"
@if "%MUNGE_LOG%"=="" (
@set MUNGE_LOG=%LOCAL_MUNGE_LOG%
@if exist %LOCAL_MUNGE_LOG% ( del %LOCAL_MUNGE_LOG% )
)
@rem echo ********************************************************************* >> %MUNGE_LOG%
@rem echo Sound\munge.bat %MUNGE_PLATFORM% >> %MUNGE_LOG%
@rem echo MUNGE_BIN_DIR=%MUNGE_BIN_DIR% >> %MUNGE_LOG%
@rem echo ********************************************************************* >> %MUNGE_LOG%

@cd ..\..

@if not exist _LVL_%MUNGE_PLATFORM% mkdir _LVL_%MUNGE_PLATFORM%
@if not exist _LVL_%MUNGE_PLATFORM%\Sound mkdir _LVL_%MUNGE_PLATFORM%\Sound


@call soundmunge.bat %MUNGE_PLATFORM%
@if %SOUNDCLEANLVL%x==1x @del /S /Q _BUILD\sound\*.lvl & @call soundmunge.bat %MUNGE_PLATFORM%

@if /i not "%SOUNDLVL%"=="" (
@for %%A in (%SOUNDLVL%) do @if /i "%%A"=="global" @goto buildglobalbank
@goto skipglobalbank
)
:buildglobalbank
@rem Build a global sound bank...
@set BANKLIST=
@for /R %%A in (*.sfx) do @set BANKLIST=!BANKLIST! %%A
@for /R %%A in (*.asfx) do @set BANKLIST=!BANKLIST! %%A
@if %SOUNDLOG%x==1x ( @set SOUNDOPT=-verbose & @set SOUNDLOGOUT=%LOGDIR%\SoundBankLog.txt ) else ( @set SOUNDOPT= & @set SOUNDLOGOUT=NUL )

@if not %MUNGE_PLATFORM%==pc goto skipglobalbank
@echo Munging common.bnk, this could take a while...
@soundflmunge -platform %MUNGE_PLATFORM% -banklistinput %BANKLIST% -bankoutput _LVL_%MUNGE_PLATFORM%\Sound\common.bnk -checkdate -resample -compact nowarning -checkid noabort -relativepath %SOUNDOPT% 2>>%MUNGE_LOG% 1>>%SOUNDLOGOUT%

:skipglobalbank

@cd _BUILD\Sound

@REM If the munge log was created locally and has anything in it, view it
@if not %MUNGE_LOG%x==%LOCAL_MUNGE_LOG%x goto skip_mungelog
@set FILE_CONTENTS_TEST=
@if exist %MUNGE_LOG% for /f %%i in (%MUNGE_LOG:"=%) do @set FILE_CONTENTS_TEST=%%i
@if not "%FILE_CONTENTS_TEST%"=="" ( Notepad.exe %MUNGE_LOG% ) else ( if exist %MUNGE_LOG% (del %MUNGE_LOG%) )

:skip_mungelog

@rem convert to upper case
@if %MUNGE_PLATFORM%==pc set MUNGE_PLATFORM=PC
@if %MUNGE_PLATFORM%==xbox set MUNGE_PLATFORM=XBOX
@if %MUNGE_PLATFORM%==ps2 set MUNGE_PLATFORM=PS2

@endlocal
-----
Here is my .snd file:

SWGchangedeffects.SND
Hidden/Spoiler:
SoundProperties()
{
Name("weapon_template"); // sound name to be called from
Group("weapons"); // sound group
Bus("soundfx"); // audio send bus
Pitch(1.0); // pitch of sound (0.0 to 1.0)
PitchDev(0.08); // variance of pitch (e.g., if Pitch were set to "0.5" and PitchDev to "0.1", sound would play anywhere at pitch of 0.4 to 0.6)
Gain(1.0); // amplification, or volume of sound (0.0 to 1.0)
GainDev(0.1); // variance of gain, see PitchDev
ReverbGain(0.0); //
Pan(0.0); // pan (transition) of sound (-1.0 to 1.0) (e.g., if Pan were set to "0.0", sound would be played at 50% gain through right and left speakers; if Pan were set to "-0.5", sound would be played at 75% gain through left speaker, 25% through right speaker)
RollIn(0.0); //
RollInDistance(1.0); //
MinDistance(1.0); // minimum distance sound gain will begin its drop-off
MuteDistance(50.0); // distance from source the sound will be muted
MaxDistance(50.0); // maximum distance the sound may be heard from its original source
RollOff(0.0); // slope of drop-off point graph of sound
Mode3D(1); // whether or not sound is three-dimensional (0 is disabled, 1 is enabled) (e.g., effects and voice overs are typically three-dimensional, meaning they are played through whichever speaker channels are closest to the sound's source relative to the player's position, whereas music and environmental streams are typically two-dimensional, meaning they are constantly played through the same channel(s))
ModeDoppler(0); // doppler effects toggle (0 is disabled, 1 is enabled)
Bias(0.0001); //
Priority(1.0); //
PlayProbability(1.0); // likelihood that the sound will play (0.0 to 1.0)
PlayInterval(0.0); // amount of time that must elapse before the sound may be played again
PlayIntervalDev(0.0); // variance of PlayInterval, see PitchDev
RandomPlayPos(0); //
CyclePlayback(0); // toggle whether or not sound should cycle through list of samples (0 is disabled, 1 is enabled)
SpaceDistance(8.0); //
}

SoundProperties()
{
Name("rep_weap_inf_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wpn_rep_blaster_fire", 1.0)
}
}

SoundProperties()
{
Name("rep_weap_inf_shotgun_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("RCShotgun", 1.0)
}
}

SoundProperties()
{
Name("rep_weap_inf_sniper_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("republicsniper", 1.0)
}
}

SoundProperties()
{
Name("cis_weap_inf_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wpn_cis_blaster_firex", 1.0)
}
}

SoundProperties()
{
Name("cis_weap_inf_sniper_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("cissniper", 1.0)
}
}

SoundProperties()
{
Name("rep_weap_inf_chaingun_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("chain_wind_lp", 1.0)
}
}

SoundProperties()
{
Name("imp_weap_inf_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wpn_imp_blaster_fire", 1.0)
}
}

SoundProperties()
{
Name("imp_weap_inf_shotgun_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("RCShotgun", 1.0)
}
}

SoundProperties()
{
Name("imp_weap_inf_sniper_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wep_All_sniper_01", 1.0)
}
}

SoundProperties()
{
Name("imp_weap_boba_burst_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wpn_boba_burst", 1.0)
}
}

SoundProperties()
{
Name("all_weap_inf_sniper_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("rebelsniper", 1.0)
}
}

SoundProperties()
{
Name("all_weap_inf_shotgun_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("rcsniper", 1.0)
}
}
My .asfx file:

SWG.asfx
Hidden/Spoiler:
effects\chain_wind_lp.wav -resample xbox 22050 pc 22050
effects\RCShotgun.wav -resample xbox 22050 pc 22050
effects\wep_All_sniper_01.wav -resample xbox 22050 pc 22050
effects\wpn_boba_burst.wav -resample xbox 22050 pc 22050
effects\wpn_cis_blaster_firex.wav -resample xbox 22050 pc 22050
effects\wpn_imp_blaster_fire.wav -resample xbox 22050 pc 22050
effects\wpn_rep_blaster_fire.wav -resample xbox 22050 pc 22050
effects\cissniper.wav -resample xbox 22050 pc 22050
effects\rebelsniper.wav -resample xbox 22050 pc 22050
effects\republicsniper.wav -resample xbox 22050 pc 22050
effects\rcsniper.wav -resample xbox 22050 pc 22050
My REQ files:

swgcw.req
Hidden/Spoiler:
ucft
{
REQN
{
"bnk"
"align=2048"
"SWG"
}

REQN
{
"config"
"global_world"
"exp_obj"
"SWGchangedeffects"
"cw_vo"
"cw"
}
}
swggcw.req
Hidden/Spoiler:
ucft
{
REQN
{
"bnk"
"align=2048"
"SWG"
}

REQN
{
"config"
"global_world"
"exp_obj"
"SWGchangedeffects"
"gcw_vo"
"gcw"
}
}
My lua:

SWGc_con.lua
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;


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"}



--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:Start()

EnableSPHeroRules()

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()

ReadDataFile("ingame.lvl")


SetMaxFlyHeight(50)
SetMaxPlayerFlyHeight (50)

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

ReadDataFile("dc:sound\\SWG.lvl;SWGchangedeffects")
ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("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_hover_fightertank",
"rep_hero_anakin",
"rep_hover_barcspeeder")
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_countdooku",
"cis_hover_aat")


ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tower")

SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
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 = 20,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_rocketeer",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},
}
}

SetHeroClass(CIS, "cis_hero_countdooku")
SetHeroClass(REP, "rep_hero_anakin")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- 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 = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:SWG\\SWG.lvl", "SWG_conquest")
ReadDataFile("dc:SWG\\SWG.lvl", "SWG_conquest")
SetDenseEnvironment("false")




-- Sound

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")

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\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1_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)

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

SetAmbientMusic(REP, 1.0, "rep_yav_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)

SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--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")


--OpeningSateliteShot
AddCameraShot(0.908386, -0.209095, -0.352873, -0.081226, -45.922508, -19.114113, 77.022636);

AddCameraShot(-0.481173, 0.024248, -0.875181, -0.044103, 14.767292, -30.602322, -144.506851);
AddCameraShot(0.999914, -0.012495, -0.004416, -0.000055, 1.143253, -33.602314, -76.884430);
AddCameraShot(0.839161, 0.012048, -0.543698, 0.007806, 19.152437, -49.802273, 24.337317);
AddCameraShot(0.467324, 0.006709, -0.883972, 0.012691, 11.825212, -49.802273, -7.000720);
AddCameraShot(0.861797, 0.001786, -0.507253, 0.001051, -11.986043, -59.702248, 23.263165);
AddCameraShot(0.628546, -0.042609, -0.774831, -0.052525, 20.429928, -48.302277, 9.771714);
AddCameraShot(0.765213, -0.051873, 0.640215, 0.043400, 57.692474, -48.302277, 16.540724);
AddCameraShot(0.264032, -0.015285, -0.962782, -0.055734, -16.681797, -42.902290, 129.553268);
AddCameraShot(-0.382320, 0.022132, -0.922222, -0.053386, 20.670977, -42.902290, 135.513001);
end
SWGg_con
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")

-- Empire Attacking (attacker is always #1)
local ALL = 2
local IMP = 1
-- These variables do not change
local ATT = 1
local DEF = 2

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"}



--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:Start()

EnableSPHeroRules()

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()

ReadDataFile("ingame.lvl")



SetMaxFlyHeight(50)
SetMaxPlayerFlyHeight(50)


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


ReadDataFile("dc:sound\\SWG.lvl;SWGchangedeffects")
ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman_desert",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_inf_wookiee",
"all_hero_luke_jedi")

ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman_desert",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_bobafett",
"imp_fly_destroyer_dome" )

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_tat_barge",
"tur_bldg_laser")

SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "all_inf_rifleman_desert",9, 25},
assault = { "all_inf_rocketeer",1,4},
engineer = { "all_inf_engineer",1,4},
sniper = { "all_inf_sniper",1,4},
officer = { "all_inf_officer",1,4},
special = { "all_inf_wookiee",1,4},

},
imp = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { "imp_inf_rifleman_desert",9, 25},
assault = { "imp_inf_rocketeer",1,4},
engineer = { "imp_inf_engineer",1,4},
sniper = { "imp_inf_sniper",1,4},
officer = { "imp_inf_officer",1,4},
special = { "imp_inf_dark_trooper",1,4},
},
}

SetHeroClass(ALL, "all_hero_luke_jedi")
SetHeroClass(IMP, "imp_hero_bobafett")

-- 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 = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:SWG\\SWG.lvl", "SWG_conquest")
SetDenseEnvironment("false")


-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "des_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(2, "Allleaving")
SetOutOfBoundsVoiceOver(1, "Impleaving")

SetAmbientMusic(ALL, 1.0, "all_tat_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_tat_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2, "all_tat_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_tat_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_tat_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2, "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")

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

Here's the munge log I got with the first Munge.bat:

http://txs.io/67O

I'd appreciate any pointers!

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 8:42 am
by AQT
Are you trying to add completely new sounds, or are you trying to get missing stock sounds to work? The name of your sound .lvl file is SWG, so do you have a sound REQ file also named that? What is the file size of SWG.lvl? Is SWG.lvl located in the proper location in your map's addon directory? In your lua files, you have:

Code: Select all

ReadDataFile("dc:sound\\SWG.lvl;SWGchangedeffects")
The part after the semi-colon is the name of the .snd file you are using, but it should actually be the name of the REQ file that directly references that .snd file instead i.e., swgcw and swggcw, respectively.

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 9:19 am
by Eaol
Well, there's no SWG.lvl in a sound folder in my addon under SWG. I thought the munge process was supposed to create one?
Are you trying to add completely new sounds, or are you trying to get missing stock sounds to work?
I'm trying to add completely new sounds.

The name of your sound .lvl file is SWG, so do you have a sound REQ file also named that?
No.

What is the file size of SWG.lvl? Is SWG.lvl located in the proper location in your map's addon directory?
It doesn't exist, if you mean the sound one.

The sound munge thing I have in my first post which I said "doesn't actually do anything" flashes on the screen too quickly to be read; however, it starts off with something like "NVIDIA was not expected at this time" and then a whole bunch of text I couldn't move my eyes down to quickly enough.

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 9:43 am
by JimmyAngler
Did you fix the sound.bats as mentioned in This Tutorial?

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 9:48 am
by AQT
Eaol wrote:Well, there's no SWG.lvl in a sound folder in my addon under SWG. I thought the munge process was supposed to create one?
When it does create one, it shows up in the data_***\_LVL_PC\data\Sound folder, but it doesn't automatically get moved to your addon directory. You have to do it manually.
Eaol wrote:No.
You're going to need to create one, then. There should be stock examples located in data_***\Sound\worlds for you to follow.

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 9:57 am
by Eaol
@JimmyAngler, that's what gave me the first one with the pile of errors. I just tried it again and I got the same result.

@AQT I do have the file, I don't know how I missed it. I changed the case from "swg" to "SWG"; the munging issues do persist though.

There is no such LVL in the directory you specified; also, I checked the _LVL_PC/Sound folder, as there is no data folder in the _LVL_PC folder.

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 10:05 am
by AQT
Have you followed steps 9 through 12 in this tutorial? http://www.gametoast.com/viewtopic.php?f=27&t=4750

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 10:25 am
by JimmyAngler
Protip from Marth: Don't munge sounds with the visual munger. Instead, click the munge.bat from this location C:\BF2_ModTools\data_HLO\_BUILD\Sound. Then manually copy the sound.lvl from the modtool's LVL_PC to C:\Program Files (x86)\LucasArts\Star Wars Battlefront II\GameData\addon\***\data\_LVL_PC\Sound.

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 10:33 am
by Eaol
Same thing; I got the little temporary flicker of the .bat and it was gone.

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 11:47 am
by AQT
AQT wrote:Have you followed steps 9 through 12 in this tutorial? http://www.gametoast.com/viewtopic.php?f=27&t=4750
Well? Just because it's from a tutorial for adding missing stock sounds doesn't mean it doesn't apply here.

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 11:50 am
by JimmyAngler
Try using this munge.bat.
Hidden/Spoiler:
@REM WARNING: enabledelayedexpansion means ! is a special character,
@REM which means it isn't available for use as the mungeapp recursive
@REM wildcard character. Use the alternate $ instead.
@setlocal enabledelayedexpansion

@set MUNGE_ROOT_DIR=..\..
@if not "%1"=="" set MUNGE_PLATFORM=%1
@if %MUNGE_PLATFORM%x==x set MUNGE_PLATFORM=PC
REM @if "%MUNGE_BIN_DIR%"=="" (
@set MUNGE_BIN_DIR=%CD%\%MUNGE_ROOT_DIR%\..\ToolsFL\Bin
@set PATH=%CD%\..\..\..\ToolsFL\Bin;%PATH%
REM @echo MUNGE_BIN_DIR=!MUNGE_BIN_DIR!
REM )

@rem convert to lower case
@if %MUNGE_PLATFORM%==PC set MUNGE_PLATFORM=pc
@if %MUNGE_PLATFORM%==XBOX set MUNGE_PLATFORM=xbox
@if %MUNGE_PLATFORM%==PS2 set MUNGE_PLATFORM=ps2

@set MUNGE_DIR=MUNGED\%MUNGE_PLATFORM%

@set LOCAL_MUNGE_LOG="%CD%\%MUNGE_PLATFORM%_MungeLog.txt"
@if "%MUNGE_LOG%"=="" (
@set MUNGE_LOG=%LOCAL_MUNGE_LOG%
@if exist %LOCAL_MUNGE_LOG% ( del %LOCAL_MUNGE_LOG% )
)
@rem echo ********************************************************************* >> %MUNGE_LOG%
@rem echo Sound\munge.bat %MUNGE_PLATFORM% >> %MUNGE_LOG%
@rem echo MUNGE_BIN_DIR=%MUNGE_BIN_DIR% >> %MUNGE_LOG%
@rem echo ********************************************************************* >> %MUNGE_LOG%

@cd ..\..

@if not exist _LVL_%MUNGE_PLATFORM% mkdir _LVL_%MUNGE_PLATFORM%
@if not exist _LVL_%MUNGE_PLATFORM%\Sound mkdir _LVL_%MUNGE_PLATFORM%\Sound

@if /i %MUNGE_PLATFORM%==pc @set BANKOPT=-template

@call soundmunge.bat %MUNGE_PLATFORM%
@if %SOUNDCLEANLVL%x==1x @del /S /Q _BUILD\sound\*.lvl & @call soundmunge.bat %MUNGE_PLATFORM%

@if /i not "%SOUNDLVL%"=="" (
@for %%A in (%SOUNDLVL%) do @if /i "%%A"=="global" @goto buildglobalbank
@goto skipglobalbank
)
:buildglobalbank
@rem Build a global sound bank...
@set BANKLIST=
@for /R %%A in (*.sfx) do @set BANKLIST=!BANKLIST! %%A
@if %SOUNDLOG%x==1x ( @set SOUNDOPT=-verbose & @set SOUNDLOGOUT=%LOGDIR%\SoundBankLog.txt ) else ( @set SOUNDOPT= & @set SOUNDLOGOUT=NUL )

@if not %MUNGE_PLATFORM%==pc goto skipglobalbank
@echo Munging common.bnk, this could take a while...
@soundflmunge -platform %MUNGE_PLATFORM% -banklistinput %BANKLIST% -bankoutput _LVL_%MUNGE_PLATFORM%\Sound\common.bnk -checkdate -resample -compact nowarning -checkid noabort -relativepath %SOUNDOPT% 2>>%MUNGE_LOG% 1>>%SOUNDLOGOUT%

:skipglobalbank

@cd _BUILD\Sound

@REM If the munge log was created locally and has anything in it, view it
@if not %MUNGE_LOG%x==%LOCAL_MUNGE_LOG%x goto skip_mungelog
@set FILE_CONTENTS_TEST=
@if exist %MUNGE_LOG% for /f %%i in (%MUNGE_LOG:"=%) do @set FILE_CONTENTS_TEST=%%i
@if not "%FILE_CONTENTS_TEST%"=="" ( Notepad.exe %MUNGE_LOG% ) else ( if exist %MUNGE_LOG% (del %MUNGE_LOG%) )

:skip_mungelog

@rem convert to upper case
@if %MUNGE_PLATFORM%==pc set MUNGE_PLATFORM=PC
@if %MUNGE_PLATFORM%==xbox set MUNGE_PLATFORM=XBOX
@if %MUNGE_PLATFORM%==ps2 set MUNGE_PLATFORM=PS2

@endlocal
I had the same problem and this one worked for me.

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 12:02 pm
by Eaol
AQT wrote:
AQT wrote:Have you followed steps 9 through 12 in this tutorial? http://www.gametoast.com/viewtopic.php?f=27&t=4750
Well? Just because it's from a tutorial for adding missing stock sounds doesn't mean it doesn't apply here.
I was responding to both of you, sorry for not being clear.

@JimmyAngler I tried the munge.bat you sent, it's got the same effect with the avalanche of errors I posted in my first post.

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 12:07 pm
by Marth8880
Replace your soundmunge.bat with this:

Code: Select all

@if %1x==x goto noplatform
@set MUNGE_PLATFORM=%1
@set MUNGE_DIR=MUNGED\%MUNGE_PLATFORM%
@rem EDIT THE LINE BELOW TO POINT TO YOUR BF2 INTSALL PATH
@set BF2_SOUNDPATH="c:\Program Files (x86)\LucasArts\Star Wars Battlefront II\"

@rem Munge world specific sound data
@rem EDIT THE TWO LINES BELOW TO POINT TO YOUR MOD BY REPLACING SND WITH YOUR WORLD ABBREVIATION
@call soundmungedir _BUILD\sound\worlds\SWG\%MUNGE_DIR% sound\worlds\SWG sound\worlds\SWG\%MUNGE_PLATFORM% %MUNGE_PLATFORM% _BUILD _LVL_%MUNGE_PLATFORM%\sound _BUILD\sound SWG
@rem xcopy _LVL_%MUNGE_PLATFORM%\sound\*  %BF2_SOUNDPATH%GameData\addon\SWG\data\_LVL_PC\Sound\ /Y

@goto exit
:noplatform
@echo Platform must be specified as the first argument
:exit

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 12:36 pm
by Maveritchell
I'm adding to the cacophony at this point, but what you'll find here:
http://www.gametoast.com/viewtopic.php?f=27&t=18595

Is my direct setup for munging with the SWBF2 VisualMunge. It addresses all the changes you'd need to make vis a vis Rends/Majin-Revan's tutorials.

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 1:27 pm
by Eaol
Alright. I got a sound LVL munged and in the game. I can tell it did something because most of my sound effects are now missing when I play the map.

Re: Issue with Munging New Sounds

Posted: Wed Feb 26, 2014 5:04 pm
by Marth8880
Make sure you load your custom sound lvl above the stock one in your Lua.

Re: Issue with Munging New Sounds

Posted: Thu Feb 27, 2014 12:00 am
by Eaol
It seems to already be the case. Already did that.

For whatever reason, when I go into the game, some of the sounds I replaced simply don't exist - I get silence. Other places where I replaced the sound, there's only the old sound. And still other places are now lacking their sound effects even though I never changed them (i.e. grenade explosions and blaster impact sounds).

EDIT: I looked at Mav's tutorial and tried something out. I changed my sound .REQs.

SWG.REQ
Hidden/Spoiler:
ucft
{
REQN
{
"str"
"align=2048"
"gcw_vo"
"gcw_tac_vo"
"cw_vo"
"cw_tac_vo"

}
REQN
{
"lvl"
"swggcw"
"swgcw"
}
}
swgcw.REQ
Hidden/Spoiler:
ucft
{
REQN
{
"bnk"
"align=2048"
"SWG"
}

REQN
{
"config"
"SWGchangedeffects"
}
}
swggcw.REQ
Hidden/Spoiler:
ucft
{
REQN
{
"bnk"
"align=2048"
"SWG"
}

REQN
{
"config"
"SWGchangedeffects"
}
}
Now most of the sounds which were missing before seem to be back to normal; the only clearly missing sounds are the things I changed - the grenade explosions, footsteps, etc. are back now.

EDIT: I decided to try a few things. Looking at the .SND files that were in the mod tools directories, I noticed I was apparently missing a bunch of ";"'s. I decided to go to my .SND file and make sure the ones I was missing were in place. I then tried removing the top portion of my .SND file to look more like this:

SWGchangedeffects.SND
Hidden/Spoiler:
SoundProperties()
{
Name("rep_weap_inf_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wpn_rep_blaster_fire", 1.0);
}
}

SoundProperties()
{
Name("rep_weap_inf_shotgun_fire");
Group("weapons");
Inherit("weapon_template");
Gain(1.0)
SampleList()
{
Sample("RCShotgun", 1.0);
}
}

SoundProperties()
{
Name("rep_weap_inf_sniper_rifle_fire");
Group("weapons");
Inherit("weapon_template");
Pitch(1.0);
PitchDev(0.05);
SampleList()
{
Sample("republicsniper", 1.0);
}
}

SoundProperties()
{
Name("cis_weap_inf_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wpn_cis_blaster_firex", 1.0);
}
}

SoundProperties()
{
Name("cis_weap_inf_sniper_rifle_fire");
Group("weapons");
Inherit("weapon_template");
Pitch(1.0);
PitchDev(0.05);
SampleList()
{
Sample("cissniper", 1.0);
}
}

SoundProperties()
{
Name("rep_weap_inf_chaingun_fire");
Group("weapons");
Inherit("weapon_template");
Gain(0.9);
Looping(1);
RollOff(2.0);
SampleList()
{
Sample("chain_wind_lp", 1.0);
}
}

SoundProperties()
{
Name("imp_weap_inf_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wpn_imp_blaster_fire", 1.0);
}
}

SoundProperties()
{
Name("imp_weap_inf_shotgun_fire");
Group("weapons");
Inherit("weapon_template");
Gain(1.0)
SampleList()
{
Sample("RCShotgun", 1.0);
}
}

SoundProperties()
{
Name("imp_weap_inf_sniper_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wep_All_sniper_01", 1.0);
}
}

SoundProperties()
{
Name("imp_weap_boba_burst_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wpn_boba_burst", 1.0);
}
}

SoundProperties()
{
Name("all_weap_inf_sniper_rifle_fire");
Group("weapons");
Inherit("weapon_template");
Pitch(1.0);
PitchDev(0.0);
SampleList()
{
Sample("rebelsniper", 1.0);
}
}

SoundProperties()
{
Name("all_weap_inf_shotgun_fire");
Group("weapons");
Inherit("weapon_template");
Gain(1.0)
SampleList()
{
Sample("rcsniper", 1.0);
}
}
In game, now all the sound was back - except one thing. They're all the shipped default sounds.. So I changed it back to this:

SWGchangedeffects.SND
Hidden/Spoiler:
SoundProperties()
{
Name("weapon_template"); // sound name to be called from
Group("weapons"); // sound group
Bus("soundfx"); // audio send bus
Pitch(1.0); // pitch of sound (0.0 to 1.0)
PitchDev(0.08); // variance of pitch (e.g., if Pitch were set to "0.5" and PitchDev to "0.1", sound would play anywhere at pitch of 0.4 to 0.6)
Gain(1.0); // amplification, or volume of sound (0.0 to 1.0)
GainDev(0.1); // variance of gain, see PitchDev
ReverbGain(0.0); //
Pan(0.0); // pan (transition) of sound (-1.0 to 1.0) (e.g., if Pan were set to "0.0", sound would be played at 50% gain through right and left speakers; if Pan were set to "-0.5", sound would be played at 75% gain through left speaker, 25% through right speaker)
RollIn(0.0); //
RollInDistance(1.0); //
MinDistance(1.0); // minimum distance sound gain will begin its drop-off
MuteDistance(50.0); // distance from source the sound will be muted
MaxDistance(50.0); // maximum distance the sound may be heard from its original source
RollOff(0.0); // slope of drop-off point graph of sound
Mode3D(1); // whether or not sound is three-dimensional (0 is disabled, 1 is enabled) (e.g., effects and voice overs are typically three-dimensional, meaning they are played through whichever speaker channels are closest to the sound's source relative to the player's position, whereas music and environmental streams are typically two-dimensional, meaning they are constantly played through the same channel(s))
ModeDoppler(0); // doppler effects toggle (0 is disabled, 1 is enabled)
Bias(0.0001); //
Priority(1.0); //
PlayProbability(1.0); // likelihood that the sound will play (0.0 to 1.0)
PlayInterval(0.0); // amount of time that must elapse before the sound may be played again
PlayIntervalDev(0.0); // variance of PlayInterval, see PitchDev
RandomPlayPos(0); //
CyclePlayback(0); // toggle whether or not sound should cycle through list of samples (0 is disabled, 1 is enabled)
SpaceDistance(8.0); //
}

SoundProperties()
{
Name("rep_weap_inf_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wpn_rep_blaster_fire", 1.0);
}
}

SoundProperties()
{
Name("rep_weap_inf_shotgun_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("RCShotgun", 1.0);
}
}

SoundProperties()
{
Name("rep_weap_inf_sniper_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("republicsniper", 1.0);
}
}

SoundProperties()
{
Name("cis_weap_inf_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wpn_cis_blaster_firex", 1.0);
}
}

SoundProperties()
{
Name("cis_weap_inf_sniper_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("cissniper", 1.0);
}
}

SoundProperties()
{
Name("rep_weap_inf_chaingun_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("chain_wind_lp", 1.0);
}
}

SoundProperties()
{
Name("imp_weap_inf_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wpn_imp_blaster_fire", 1.0);
}
}

SoundProperties()
{
Name("imp_weap_inf_shotgun_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("RCShotgun", 1.0);
}
}

SoundProperties()
{
Name("imp_weap_inf_sniper_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wep_All_sniper_01", 1.0);
}
}

SoundProperties()
{
Name("imp_weap_boba_burst_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wpn_boba_burst", 1.0);
}
}

SoundProperties()
{
Name("all_weap_inf_sniper_rifle_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("rebelsniper", 1.0);
}
}

SoundProperties()
{
Name("all_weap_inf_shotgun_fire");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("rcsniper", 1.0);
}
}
Munged.

Isn't the same as before - it's as if I never modified the sound in the first place. All the default sounds are there; no sign of the ones I added that are supposedly called up in the .lua.

EDIT:
Is this normal?

Image

Also, the size of my sound lvl, swg.lvl, is 5 kb. Is that right?