Test Sounds don't work [Solved]

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

Moderator: Moderators

Post Reply
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Test Sounds don't work [Solved]

Post by thelegend »

Hey all,
it's me. I have been pausing the development of my mod after I had many bad days and so on. The Sounds are still my biggest issue and as anyone had said I should try testing working sounds than my old sounds. I have made a Sound Test Map. I am going to use this map for all new custom sounds. But it seems nothing wants to work properly when I ordered it to the ModTools. Jokes by the way I watched over and over every single req, bat and lua file.
As a new side I put the stock 'Tusken Animals' into my map. I want to change their sounds. I made a new sound.lvl. Put the names into my tusken rifles's .odf file. But when I shot I don't hear anything. I guess because I didn't get Sounds working for a long time I fogot how to set them properly. Anyway here are all files of my Sound's folder. I will also post the lua+a link to download the .wav file if all the text files are not written or edited wrong.
I really hope you know where the problem is.

Note: For the test sound I was trying to add the Ak-47 Sound Effect to the Tusken Rifles.

sm1.req:
Hidden/Spoiler:
[code]
ucft
{
REQN
{
"str"
"align=2048"


}
REQN
{
"lvl"
"sm1gcw"
}
}
[/code]
sm1gcw.req:
Hidden/Spoiler:
[code]
ucft
{
REQN
{
"bnk"
"sm1"
"align=2048"

}

REQN
{
"config"
"sm1gcw_snd"
}
}
[/code]
sm1gcw_snd.snd:
Hidden/Spoiler:
[code]
SoundProperties()
{
Name("ak47_shot");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("ak47", 1.0);
}
}
[/code]
sm1.asfx:
Hidden/Spoiler:
[code]
effects\ak47.wav -resample xbox 22050 pc 22050
[/code]

And here is the lua file which also reads the sound.lvl.
Hidden/Spoiler:
[code]
--
-- 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"}



--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: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(40)
SetMaxPlayerFlyHeight(40)


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("sound\\tat.lvl;tat2gcw")
ReadDataFile("dc:sound\\sm1.lvl;sm1gcw")


ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_inf_wookiee",
"all_hero_hansolo_tat")

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

ReadDataFile("dc:SIDE\\des.lvl",
"tat_inf_tuskenhunter",
"tat_inf_tuskenraider" )

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

SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "all_inf_rifleman",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 = { "tat_inf_tuskenhunter",9, 25},
assault = { "tat_inf_tuskenraider",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_hansolo_tat")
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)

SetMemoryPoolSize("Aimer", 14)
SetMemoryPoolSize("EntityCloth", 25)
SetMemoryPoolSize("EntityFlyer", 6) -- to account for rocket upgrade
SetMemoryPoolSize("MountedTurret", 14)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 384)
SetMemoryPoolSize("TreeGridStack", 500)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:SM1\\SM1.lvl", "SM1_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

[/code]
And here is the .odf file which reads the sound name:
Hidden/Spoiler:
[code]
[WeaponClass]
ClassParent = "com_weap_inf_rifle"

[Properties]
ScoreForMedalsType = -1
MedalsTypeToLock = -1

GeometryName = "tat_weap_tuskrifle"
AnimationBank = "rifle"

OrdnanceName = "tat_weap_inf_tuskenrifle_ord"


//***********************************************
//*********** WEAPON PERFORMANCE VALUES *********
//***********************************************

RoundsPerClip = "300"
ReloadTime = "1.5"
ShotDelay = "0.25"

FlashColor = "10 127 10 255"
FlashLightColor = "10 127 10 175"

//******************************************************
//*************** SOUND ****************
//******************************************************

FireSound = "ak47_shot"
ReloadSound = "tat_weap_tusken_reload"
FireEmptySound = "com_weap_inf_ammo_empty"



[/code]
And here is a link to download the sound wave file. I made sure that the file is 22kHz, mono, (I have no clue what PCM does mean..but..) it says it's PCM so...

Link: http://www.mediafire.com/download/vga48 ... ndFile.zip

I even made sure the soundmungedir and munge bats also munge .asfx files next to .sfx files.
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: Test Sounds don't work

Post by Marth8880 »

thelegend wrote:And here is a link to download the sound wave file. I made sure that the file is 22kHz, mono, (I have no clue what PCM does mean..but..) it says it's PCM so...
Sound effects don't need to be 22kHz, by the way (they do need to be mono, though) - but you generally shouldn't go over 44kHz. And don't worry about anything regarding PCM, Audacity does all of that automatically.

Your issue might be with the load order of your sound lvls (just like Skyrim! :lol: ). Try swapping these two lines:

Code: Select all

ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("dc:sound\\sm1.lvl;sm1gcw")
Your WAV file looks fine, though.
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Test Sounds don't work

Post by thelegend »

Thanks for your reply but unfortunately I still can't hear anything. :cry:
I have swapped both lines and even if I disable the default sound line I still can't hear any custom sounds.

The only files I didn't post were the .bat files, so.. :|

Soundmunge.bat:
Hidden/Spoiler:
[code]
@if %1x==x goto noplatform
@set MUNGE_PLATFORM=%1
@set MUNGE_DIR=MUNGED\%MUNGE_PLATFORM%

@rem Munge global, shell and side specific sound data
@call soundmungedir _BUILD\sound\cw\%MUNGE_DIR% sound\cw sound\cw\%MUNGE_PLATFORM% %MUNGE_PLATFORM% _BUILD _LVL_%MUNGE_PLATFORM%\sound _BUILD\sound cw
@call soundmungedir _BUILD\sound\gcw\%MUNGE_DIR% sound\gcw sound\gcw\%MUNGE_PLATFORM% %MUNGE_PLATFORM% _BUILD _LVL_%MUNGE_PLATFORM%\sound _BUILD\sound gcw
@call soundmungedir _BUILD\sound\global\%MUNGE_DIR% sound\global sound\global\%MUNGE_PLATFORM% %MUNGE_PLATFORM% _BUILD _LVL_%MUNGE_PLATFORM%\sound _BUILD\sound global nolevelfile
@call soundmungedir _BUILD\sound\shell\%MUNGE_DIR% sound\shell sound\shell\%MUNGE_PLATFORM% %MUNGE_PLATFORM% _BUILD _LVL_%MUNGE_PLATFORM%\sound _BUILD\sound shell
@rem Munge world specific sound data
@call soundmungedir _BUILD\sound\worlds\sm1\%MUNGE_DIR% sound\worlds\sm1 sound\worlds\sm1\%MUNGE_PLATFORM% %MUNGE_PLATFORM% _BUILD _LVL_%MUNGE_PLATFORM%\sound _BUILD\sound sm1


@goto exit
:noplatform
@echo Platform must be specified as the first argument
:exit
[/code]
Soundmungedir.bat:
Hidden/Spoiler:
[code]
@rem Save the starting directory
@for /F %%A in ('cd') do @set STARTDIR=%%A

@if %1x==x goto nomungedir
@if %2x==x goto nosourcedir
@if %3x==x goto nooverridedir
@if %4x==x goto noplatform
@if %5x==x goto nomungelogdir
@if %6x==x goto noleveldir
@if %7x==x goto nolevelsrcdir
@if %8x==x goto nolevelfile

@rem Setup directories
@set MUNGEDIR=%STARTDIR%\%1
@set SOURCEDIR=%STARTDIR%\%2
@set PLATFORMDIR=%STARTDIR%\%3
@set LOGDIR=%STARTDIR%\%5
@set LEVELDIR=%STARTDIR%\%6
@set LEVELFILEREQ=%8%.req
@set LEVELFILELVL=%MUNGEDIR%\%8%.lvl
@set CHECKDATE=-checkdate
@set CHECKID=-checkid
@if %SOUNDNODATECHECK%x==1x @set CHECKDATE=

@rem Build up a list of directories for level pack to search for source files
@Setlocal enabledelayedexpansion
@set LEVELSRCDIR=
@set PATH="%CD%"\..\ToolsFL\Bin;%PATH%

@rem Should we munge this level ?
@if /i not "%SOUNDLVL%"=="" (
@for %%A in (%SOUNDLVL%) do @if /i "%%A"=="%8" @goto mungeit
@goto exit
)
:mungeit

@if "%MUNGE_LOG%"=="" set MUNGE_LOG=%LOGDIR%\%4%_MungeLog.txt

@if not EXIST %SOURCEDIR% (
@echo Unable to munge %SOURCEDIR% as it doesn't exist! 1>> %MUNGE_LOG%
@goto exit
)

@goto nodebug
@echo Current Directory = %CD%
@echo Sound level filter = %SOUNDLVL%
@echo Munge output directory = %MUNGEDIR%
@echo Source directory = %SOURCEDIR%
@echo Platform override directory = %PLATFORMDIR%
@echo Selected platform = %4
@echo Munge logs directory = %LOGDIR%
@echo Level file output directory = %LEVELDIR%
@echo Final req file = %LEVELFILEREQ%
@echo Output level file = %LEVELFILELVL%
@echo Additional stream options = %STREAMOPT%
@pause
:nodebug

@if EXIST %MUNGEDIR% goto skipcreatemungedir
@mkdir %MUNGEDIR%
:skipcreatemungedir

@cd %SOURCEDIR%

@rem Munge configuration files
@rem *.snd - sound library
@rem *.mus - dynamic music configuration
@rem *.ffx - foley effects
@rem *.tsr - sound regions
@configmunge -inputfile *.snd *.mus *.ffx *.tsr -platform %4 -sourcedir %PLATFORMDIR% %SOURCEDIR% -outputdir %MUNGEDIR% -hashstrings %CHECKDATE% -continue 2>>%MUNGE_LOG%

@if %SOUNDLOG%x==1x ( @set SOUNDOPT=-verbose & @set SOUNDLOGOUT=%LOGDIR%\SoundBankLog.txt ) else ( @set SOUNDOPT= & @set SOUNDLOGOUT=NUL )

@rem Munge sound banks
@for /R %%A in (*.sfx) do @echo Munging %%~nA%%~xA & @soundflmunge -platform %4 -banklistinput %%A -bankoutput %MUNGEDIR%\ %CHECKDATE% -resample %CHECKID% noabort %SOUNDOPT% %BANKOPT% 2>>%MUNGE_LOG% 1>>%SOUNDLOGOUT%
@for /R %%A in (*.asfx) do @echo Munging %%~nA%%~xA & @soundflmunge -platform %4 -banklistinput %%A -bankoutput %MUNGEDIR%\ %CHECKDATE% -resample %CHECKID% noabort %SOUNDOPT% %BANKOPT% 2>>%MUNGE_LOG% 1>>%SOUNDLOGOUT%

@rem Munge streams

@rem Localization
@rem Setup the extension of localized stream files (if it's english we'll just use the default extension)
@set LANGVERSION=
@rem @for /F %%A in (%MUNGE_LANGVERSION%) do @set LANGVERSION=%%~A
@set LANGVERSION=%MUNGE_LANGVERSION%
@if /i %LANGVERSION%x==Englishx ( @set LOCALIZEEXT= ) else ( @set LOCALIZEEXT=stm_%LANGVERSION% )

@rem make the directory for language-specific stuff if it doesn't exist - H8 h8 h8!
@if EXIST %MUNGEDIR%\%LANGVERSION% goto skipcreatelangdir
@echo Creating dir %MUNGEDIR%\%LANGVERSION%\
@mkdir %MUNGEDIR%\%LANGVERSION%
:skipcreatelangdir

@rem Munge localized stream files
@if /i not %MUNGESTREAMS%x==0x @if /i not %LANGVERSION%x==Englishx @for /R %%A in (*.%LOCALIZEEXT%) do @echo Munging %%~nA%%~xA to %MUNGEDIR%\%LANGVERSION%\ & soundflmunge -platform %4 -banklistinput %%A -bankoutput %MUNGEDIR%\%LANGVERSION%\%%~nA.str -stream %CHECKDATE% -resample %CHECKID% noabort %SOUNDOPT% %STREAMOPT% 2>>%MUNGE_LOG% 1>>%SOUNDLOGOUT%

@set MUNGE2SUBSTREAMS=0
@if /i %4==XBOX @set MUNGE2SUBSTREAMS=1
@if /i %4==PC @set MUNGE2SUBSTREAMS=1

@rem Build up a list of 1 substream streams to munge,
@rem Filtering the localize streams and if on xbox 4 channel streams
@set MUNGESUBSTREAM1=
@if /i not %MUNGESTREAMS%x==0x @for /R %%A in (*.stm) do @if /i %%~xA==.stm ( @if not EXIST %%~dA%%~pA%%~nA.%LOCALIZEEXT% ( @if /i %MUNGE2SUBSTREAMS%==1 ( @if not EXIST %%~dA%%~pA%%~nA.st4 @set MUNGESUBSTREAM1=!MUNGESUBSTREAM1! %%A ) else ( @set MUNGESUBSTREAM1=!MUNGESUBSTREAM1! %%A ) ) )

@rem Munge 1 substream streams
@if /i not %MUNGESTREAMS%x==0x @for %%A in (%MUNGESUBSTREAM1%) do @echo Munging %%~nA%%~xA & soundflmunge -platform %4 -banklistinput %%A -bankoutput %MUNGEDIR%\ -stream %CHECKDATE% -resample %CHECKID% noabort %SOUNDOPT% %STREAMOPT% 2>>%MUNGE_LOG% 1>>%SOUNDLOGOUT%

@rem Munge 2 substream streams
@if /i not %MUNGESTREAMS%x==0x @if %MUNGE2SUBSTREAMS%==1 @for /R %%A in (*.st4) do @echo Munging %%~nA%%~xA & soundflmunge -platform %4 -banklistinput %%A -bankoutput %MUNGEDIR%\ -stream %CHECKDATE% -resample %CHECKID% noabort %SOUNDOPT% %STREAMOPT% -substream 2 2>>%MUNGE_LOG% 1>>%SOUNDLOGOUT%

@rem Build level files
@if EXIST %LEVELDIR% goto skipcreateleveldir
@mkdir %LEVELDIR%
:skipcreateleveldir

@if %SOUNDNOLVL%x==1x @goto exit

@rem build up a list of include directories for levelpack
@rem language overrides first!
@if %LANGVERSION%x==x goto skiplang
@for /F %%A in ('dir /AD /B %STARTDIR%\%7') do @set LANGSRCDIR=!LANGSRCDIR! %STARTDIR%\%7\%%A\MUNGED\%4\%LANGVERSION%
@for /F %%A in ('dir /AD /B %STARTDIR%\%7\Worlds') do @set LANGSRCDIR=!LANGSRCDIR! %STARTDIR%\%7\Worlds\%%A\MUNGED\%4\%LANGVERSION%
:skiplang

@for /F %%A in ('dir /AD /B %STARTDIR%\%7') do @set LEVELSRCDIR=!LEVELSRCDIR! %STARTDIR%\%7\%%A\MUNGED\%4
@for /F %%A in ('dir /AD /B %STARTDIR%\%7\Worlds') do @set LEVELSRCDIR=!LEVELSRCDIR! %STARTDIR%\%7\Worlds\%%A\MUNGED\%4

@for /R %%A in (*.req) do @if /i not %%A==%SOURCEDIR%\%LEVELFILEREQ% levelpack -inputfile %%~nA%%~xA -platform %4 -sourcedir %SOURCEDIR% %LANGSRCDIR% %PLATFORMDIR% -inputdir %LEVELSRCDIR% -outputdir %MUNGEDIR% -continue %CHECKDATE%

@if EXIST %LEVELFILEREQ% levelpack -inputfile %LEVELFILEREQ% -platform %4 -sourcedir %SOURCEDIR% %LANGSRCDIR% %PLATFORMDIR% -inputdir %LEVELSRCDIR% -outputdir %LEVELDIR% -continue %CHECKDATE%

@goto exit

:nomungedir
@echo Munge directory must be specified as the first argument
@goto exit
:nosourcedir
@echo Source data directory must be specified as the second argument
@goto exit
:nooverridedir
@echo Platform specific source data directory must be specified as the third argument
@goto exit
:noplatform
@echo Platform must be specified as the fourth argument
@goto exit
:nomungelogdir
@echo Munge log directory must be specified as the fifth argument
@goto exit
:noleveldir
@echo Level output directory must be specified as the sixth argument
@goto exit
:nolevelsrcdir
@echo Level source direct must be specified as the seventh argument
@goto exit
:nolevelfile
@echo Final output level file must be specified as the eighth argument
@goto exit
:exit
@endlocal
@cd %STARTDIR%
[/code]
And the munge.bat:
Hidden/Spoiler:
[code]
@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

@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

[/code]
I can't figure out why it's not working. All files are written correctly, the .wav file doesn't cause this problem, the lua now reads my custom .lvl at first then the default one..If the bat files are not the problem too, then...idk. It seems the Sounds (The whole sound part) is against me. It's probably a conspiracy against me.. :runaway:
Redline
2nd Lieutenant
2nd Lieutenant
Posts: 396
Joined: Tue Jan 16, 2007 4:22 pm
Projects :: Space to Ground [reworking]
Games I'm Playing :: Different Games
xbox live or psn: No gamertag set
Location: The left side of the moon
Contact:

Re: Test Sounds don't work

Post by Redline »

Everything looks fine dude. You just need to check if your folder ist written 'effect' with a small 'e'. Sometimes I had problems, because of a big letter in the folder name.
Next is your Sound folder in your ...\addon\abc folder?
I've one tip where you can assess if your sound munge was a success. First, look at the file size. It would be bad if your file had just some bytes. It should have some kilobytes.
Second, look inside your sound file. You can easily differentiate between added missing sounds and new added sounds.

Exsamples:
Added missing sounds/music do look like this:
Hidden/Spoiler:
[code]ucfb¼i lvl_´i ŠÉ›æ¬i snd_´( NAME ŠÉ›æDATA 1‹£L SCOP° DATA
æ½9Þœ„z DATA
Œ¹_n»šÝ DATA
àïÊØV^2 DATA
emo_2¡‘ô DATA
ã䔚™™> DATA ò%ƒ
SCOP DATA æBÃóÞœ„z €? DATA 1‹£L SCOPà DATA
æ½9‹©¢ DATA
Œ¹_n»šÝ DATA
àïÊØV^2 DATA
þ&Tš™? DATA
emo_2¡‘ô DATA
"yÈG HB DATA
ãä” @? DATA ò%ƒ
SCOP DATA æBÃó‹©¢ €? DATA 1‹£L SCOPÈ DATA
æ½9zì>e DATA
Œ¹_n»šÝ DATA
àïÊØV^2 DATA
emo_2¡‘ô DATA
þ&Tff&? DATA
ãä”333? DATA ò%ƒ
SCOP DATA æBÃó‚1 €? DATA hÓ« SCOP8 DATA
æ½9ò"~‰ DATA
}«vV €? DATA
“Zi‰ €? DATA
ÚW³ €? DATA
<‹ `@ DATA
~²Ù€ÍÌÌ= DATA
‰YÆòÍÌÌ> DATA
[/code]
And new added sounds do look like this data structure:
Hidden/Spoiler:
[code]’›9¤˜‘*3ë™™
3 S‘ªû˜Aг;Á:²:#11©1­Ë8 ”¬;è™ ÛX“9±‘ ¹ ¼² 6¨
¬ÙP ðÿ AÚ!‘ ¯ Ë©y¡šRƒê«Q˜(ƒ¼A/ ¹¾AÀ15© ¸BÉqˆ‚’œÉ)s€ ˆË
š˜ B07žÓ©¹‚p”›À+d )# ù0£ž$ʪ"ªR#¨)“ $±œ“u’Šº©€‰ Âÿ
#E“+ë "ŠF#¼é
˜"5Ú±9ð9¡q˜Ž€N ©’ÊS ¹Ÿ
¡›šWˆ!Ú›XÚˆQ’ ¼: )‰£)'˜S¢œ©š4hà˜1Í€"˜ H£¨z
!È €Ÿ)ú0‘(’ ±˜w¨¨‰˜
+¡ ¿"2¸Ù[±P’œ¨¬9…ˆ«ˆ(6€Ñ6À)Ù "›²ºº’#ˆx‚©%‰œ¡2Q‘  FŒ•ºˆÚP ¬ÿ R“›YÑI 2¢º¸{#œA¨š€ÉZé!Š4¢ š ø¹œÉd˜%É
Ɉ˜¬a#Ó ‰¨Y3° ‰€­Ù‹!±A1Gˆ¡žˆ
¡ÊQ˜8„(± S ¨Î‰3ÿ1™‘)‚¬›ù 0BÙ€Š1} ºƒ¿²¤:„¼@À‰Û!2 œ™š˜!sƒ©ð+
"ÿ 2Š2Ë‘Ÿˆ1“í8
) ”¬:7€ÿ $ ‘Œ˜ °
JÓA‰“,‚›U"‹Á+°ú*› š‚Ùÿ Àœœ‚ ` RCɞʉ (Gê( ‹4¹ L Â*ð<£ ,á8( @´œ©HC¼¹™x )%ª‘” )²;˜q¢¿Š¹8 ù±q#ˆˆ©Ý9 4°­  ‰6)Û51¸û ‚C¼ŠÄ§J ñÿ 8€Ü(ƒÐž¢3#º3Ý)‘: ÙŠ0±š
Ýÿ ’¬Pe°¯1"ø ‰ˆR ¨»#œ¿!"¨(€±[ È›tÂ+’±‘h¢ˆ !²2ÌŒ¸»¯5 1àŠŠ±Z  Kÿ t‰ù) 4¹AÀ !Ø
¹k¯¨0Ò;—› ³"™„ω 2˜º™Þ
CèŒ S¸Yº1¿¹þ Q¢«=Ɂ‰Ï€Hª0èˆC°PÒÿ ž€Štš!ªÙ(1؁­»R A„I˜2¨ßŒˆvÿ 7›$¡’Š ú(#1É@“ žËš²z•)ª¢´þ[/code]
Also try the munge.bat fix.
Sometimes it can help you.
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Test Sounds don't work

Post by thelegend »

Thanks but everything is right. The effect folder begins with a small "e", my sound.lvl is 3kb in file size and the content of my sound.lvl looks like this:
Hidden/Spoiler:
[code]
ucfb¸ lvl_° ›—¯¨ V"&^ð Mdšè ´à æ½9äG:™R…¹ Ή¸˜ \Ù #´
ªJi Cq¿Ž§‚ã–àj87<¯£³/"V \Ù #´
ïþHÚ ¶–€ ´Ÿx.¶–€t snd_¨ NAME ÇÌVDATA Åeî SCOP€ DATA
æ½990‹ DATA
Œ¹_¶®{? DATA
àïÊ|P­± DATA ¯¬CA SCOP DATA §‚ã–<¯£ €?
[/code]
Pasted from Notepad++
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: Test Sounds don't work

Post by Anakin »

Don't know the problem. Your posted sound files and the wav file are all fine:
https://www.dropbox.com/s/nb4gaozkk93vchx/sm1.rar?dl=0

What size is your munged sm1.lvl?? My one has 7kb.

Have you swaped the lines as Marth told you??
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Test Sounds don't work

Post by thelegend »

My sound.lvl has a file size of ~3.2Kb.
Anakin wrote:Have you swaped the lines as Marth told you??
I already did that but there are still no sounds.

I tried out a new strategy:

I put one more .wav file into my effect's folder, almost the same lenght as the first .wav file. I wanted to add a second test sound, just to make sure I won't get any munge errors like the last time where all .waves were stereo.
Anyway in my _LVL_PV/Sound folder there is now my sm1.lvl, just ~3.3Kb in file size. There is also a new file: common.bnk 10Kb.
I am going to look for the munge file Anakin had given to me a few months ago.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: Test Sounds don't work

Post by Anakin »

Yes you really should use the munge files i gave your: http://www.gametoast.com/viewtopic.php?f=64&t=30282
Your once are different from my once.
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Test Sounds don't work

Post by thelegend »

It works! I only failed with the right bat files. Thanks Anakin, Marth and Redline for all the help. Now and I promise it I will keep this folder in my hard drive. I only lost it because I moved to an other PC so..Anyways thanks all for help. Now I finally can continue my project.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: Test Sounds don't work

Post by Anakin »

good luck with your project ;)
Post Reply