How does one edit a mod with given assets?

Started by LBmyBB, May 19, 2018, 07:07:03 PM

Previous topic - Next topic
So I looove Sereja's city of theed, especially the totally new sides for rebels.  One thing thats a pet peeve (or maybe im just too picky lol) is that the handmaiden elg3a blaster shot sounds like it was taken directly from the movie.  That being the case, there is some unneeded sound effects within the wav.  Thankfully since he is kind enough to give us his assets  :wub: , I was able to replace that file with the one from lego star wars WAV files with a simple rename.  So my question - how am I able to implement the change into the actual mod?

I believe you will need to do what is called a "sound munge". 

There may be a tutorial here.  From what I recall though, it has trouble on 64-bit systems, meaning you will need to do this on windows XP.

Let's see if someone here has more experience and can help.
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

windows XP? what is that? Do I have it? Could someone do it for me?

see http://www.swbfgamers.com/index.php?topic=12915.0 for what i mean

I don't have windows XP so can someone just do it for me :wave:

You can munge on a 64-bit but you need the fixed munge files. They can be found here:

http://www.gametoast.com/viewtopic.php?f=64&t=30415

Sound files are a much bigger animal than that - the sound munging just doesn't work right in 64-bit. I haven't ever actually done completed any sound munging because I've always had a 64-bit machine while modding and never tried modding on a 32-bit machine.

Windows 7 can be 32-bit, but after that, good luck finding a machine that can do it.  Windows XP is your best bet, but also beware that there is a 64-bit version of that floating around too.
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

I've never had any issue with sound munging on 64-bit. Works just fine on all of my 64-bit PCs (Windows 7, 8, and 10) and with both games' mod tools. The bat files had to be modified a bit but aside from that, it works fine.

I would be curious to see the modifications because when I tried in the past I received errors - and as far as I know, I'm in the majority.  I have no doubt that people have gotten it to work, but I don't remember it being posted.
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

I think I just downloaded it off Gametoast. Here's the munge.bat that's located in BF2_ModTools\data\_BUILD\Sound:

[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
[/spoiler]

Judging from the modification dates, that seems to be the only .bat file related to sound that was modified in any way.