Page 1 of 1

Animation munge fix? [Solved]

Posted: Sun Dec 04, 2016 6:41 pm
by Oceans14
I'm munging a door animation and got the "\common was unexpected at this time" error. Was a fixed munge.bat for animations ever released? I have the munge fix but those files are only for VM to use. I'm going off of FragMe's simple door animation tut, and here's my munge.bat if it helps:
Hidden/Spoiler:
[code]@REM munge.bat
@REM Calls %1\munge.bat for all animation subdirectories

@REM soldier animation banks
//@call munge_subdir.bat SoldierAnimationBank\sitting


@REM first person animation banks


@REM addons


@REM vehicles


@REM props

@call munge_subdir.bat Prop\door01[/code]
That commented line was giving an error too, that's why it's commented. Since there's no log generated, I ran the bat through the terminal and got this:
Hidden/Spoiler:
[code]
E:\Games\SWBF2_ModTools\BF2_ModTools\data_BSV\Animations\Prop\door01>munge.bat
\Common was unexpected at this time.

E:\Games\SWBF2_ModTools\BF2_ModTools\data_BSV\Animations\Prop\door01> @set PAT
H=E:\Games\SWBF2_ModTools\BF2_ModTools\data_BSV\Animations\Prop\door01\..\..\..\
..\ToolsFL\Bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Window
s;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Progra
m Files (x86)\Common Files\Softimage;C:\Program Files\Common Files\Softimage;C:\
Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Microsoft SQL Serve
r\80\Tools\Binn\;E:\Programs\QuickTime\QTSystem\

E:\Games\SWBF2_ModTools\BF2_ModTools\data_BSV\Animations\Prop\door01>munge.bat[/code]

Re: Animation munge fix?

Posted: Sun Dec 04, 2016 11:55 pm
by AceMastermind
The only bat file you need to edit for the "fix" is the munge_animation.bat, you don't even need that bat file you have there.

You can fix it 2 ways:
1. comment out lines 7 and 10 like so:
Hidden/Spoiler:
[code]@REM called from $\Animations\type\subfolder\
@REM all params are passed to zenasset
@REM if there are more than 9 parameters to pass, you can enclose all params in double quotes
@setlocal

@set MUNGE_ROOT_DIR=..\..\..
REM @if "%MUNGE_BIN_DIR%"=="" (
@set MUNGE_BIN_DIR=%CD%\%MUNGE_ROOT_DIR%\..\ToolsFL\Bin
@set "PATH=%CD%\%MUNGE_ROOT_DIR%\..\ToolsFL\Bin;%PATH%"
REM )

zenasset /multimsh /writefiles %~1 > ZenAsset.log

@mkdir %MUNGE_ROOT_DIR%\%2\MUNGED
binmunge -inputfile *.zaa -chunkid zaa_ -ext zaabin -outputdir %MUNGE_ROOT_DIR%\%2\MUNGED\
binmunge -inputfile *.zaf -chunkid zaf_ -ext zafbin -outputdir %MUNGE_ROOT_DIR%\%2\MUNGED\
del *.zaa
del *.zaf
move *.anims %MUNGE_ROOT_DIR%\%2\MUNGED\
@endlocal[/code]
http://www.gametoast.com/viewtopic.php? ... 73#p313081



2. or just add quotation marks around the path on line 9:
Hidden/Spoiler:
[code]@REM called from $\Animations\type\subfolder\
@REM all params are passed to zenasset
@REM if there are more than 9 parameters to pass, you can enclose all params in double quotes
@setlocal

@set MUNGE_ROOT_DIR=..\..\..
@if "%MUNGE_BIN_DIR%"=="" (
@set MUNGE_BIN_DIR=%CD%\%MUNGE_ROOT_DIR%\..\ToolsFL\Bin
@set "PATH=%CD%\%MUNGE_ROOT_DIR%\..\ToolsFL\Bin;%PATH%"
)

zenasset /multimsh /writefiles %~1 > ZenAsset.log

@mkdir %MUNGE_ROOT_DIR%\%2\MUNGED
binmunge -inputfile *.zaa -chunkid zaa_ -ext zaabin -outputdir %MUNGE_ROOT_DIR%\%2\MUNGED\
binmunge -inputfile *.zaf -chunkid zaf_ -ext zafbin -outputdir %MUNGE_ROOT_DIR%\%2\MUNGED\
del *.zaa
del *.zaf
move *.anims %MUNGE_ROOT_DIR%\%2\MUNGED\
@endlocal[/code]
The "Fixed and improved munge files" actually take care of this for you.
viewtopic.php?f=64&t=30415

Re: Animation munge fix?

Posted: Tue Dec 06, 2016 11:50 pm
by Oceans14
Huh, whichever munge fix I dl'd a while back had everything but the animation stuff. Anyway, that did the trick, thanks Ace.