Munge Problem (short munge) (FAQ)

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

SilvaDalek
Sith
Sith
Posts: 1329
Joined: Sun Dec 02, 2007 12:52 pm
Games I'm Playing :: Destiny and FIFA
xbox live or psn: TH3 R0LL3R

Munge Problem (short munge) (FAQ)

Post by SilvaDalek »

I don't know if it is me skrewing up, or if something is wrong.

Munging now takes less than a second. And because I can't actually see the map until later when I hae graphics card installed, I have no idea if it worked. I put my odf, msh, effect, and munged folders in data_###/Worlds/###/.

There's quite a bit of stuff in there, so I'm assuming something went wrong.

Edit: I get this when I munge
Hidden/Spoiler:
Common\clean PC
The system cannot find the path specified.
Shell\clean PC
The system cannot find the path specified.
Load\clean PC
The system cannot find the path specified.
Sides\clean PC
Sides\ALL\clean PC
The system cannot find the path specified.
Sides\CIS\clean PC
The system cannot find the path specified.
Sides\Common\clean PC
The system cannot find the path specified.
Sides\DES\clean PC
The system cannot find the path specified.
Sides\EWK\clean PC
The system cannot find the path specified.
Sides\GAM\clean PC
The system cannot find the path specified.
Sides\GAR\clean PC
The system cannot find the path specified.
Sides\GEO\clean PC
The system cannot find the path specified.
Sides\GUN\clean PC
The system cannot find the path specified.
Sides\IMP\clean PC
The system cannot find the path specified.
Sides\JED\clean PC
The system cannot find the path specified.
Sides\REP\clean PC
The system cannot find the path specified.
Sides\SNW\clean PC
The system cannot find the path specified.
Sides\TUR\clean PC
The system cannot find the path specified.
Sides\WOK\clean PC
The system cannot find the path specified.
Worlds\clean PC
Worlds\AFG\clean PC
The system cannot find the path specified.
Sound\clean PC
The system cannot find the path specified.
Munge process finished
Edit:
I have Vista, so I'm guessing this is Vista related.
obiboba3po
2008 Most Technically Challenging Avatar
Posts: 2376
Joined: Tue Feb 12, 2008 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: NJ, USA

Re: Munge Problem

Post by obiboba3po »

im just gonna take a shot in the dark, i dont think this is vista related. it could be but i doubt it. if you have the right graphics, video, and sound cards modtools works like a charm. (but you said you dont have the right graphic card so...) but based on those errors, it says something about a clean...is it possible that you hit clean instead of munge?
SilvaDalek
Sith
Sith
Posts: 1329
Joined: Sun Dec 02, 2007 12:52 pm
Games I'm Playing :: Destiny and FIFA
xbox live or psn: TH3 R0LL3R

Re: Munge Problem

Post by SilvaDalek »

No, I hit the right buttons lol.

I don't have a graphics card in my comp yet. It's sitting next to me on the floor. Would that effect the munge?
User avatar
RED51
Jedi
Jedi
Posts: 1024
Joined: Sun Sep 07, 2008 6:25 pm
Games I'm Playing :: SWBFII

Re: Munge Problem

Post by RED51 »

SilvaDalek wrote:No, I hit the right buttons lol.

I don't have a graphics card in my comp yet. It's sitting next to me on the floor. Would that effect the munge?
lol :funny2: , I think that might affect your munge, but I'm not so sure. Are your mod tools are installed in your C drive? I read some where that that might affect the munge process.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Munge Problem

Post by [RDH]Zerted »

The graphics and sound cards have nothing to do with VisualMunge. The graphics only matter for ZE startup problems.

Yeah, it does look like you attempted a clean. If not, then why are you trying to munge everything? You should never need to do that.

You did a clean (in which case all that output is normal), you have a space in the folder path where you installed the modtools (in which case you need to install the modtools somewhere without a space), or Vista is putting some of your files in a secured, hidden folder (in which case you need to move them back to their real locations).
SilvaDalek
Sith
Sith
Posts: 1329
Joined: Sun Dec 02, 2007 12:52 pm
Games I'm Playing :: Destiny and FIFA
xbox live or psn: TH3 R0LL3R

Re: Munge Problem

Post by SilvaDalek »

I know, the information in the hide thing is a clean.

The munge looks perfectly fine to me, but when I munged common and localize it does it in less than a second and I don't see any of the stuff it has munged...

Where should I look for these hidden folders then?
User avatar
Thunder
Lieutenant Colonel
Lieutenant Colonel
Posts: 543
Joined: Sun Jul 15, 2007 6:57 pm
Location: Michigan

Re: Munge Problem

Post by Thunder »

the hidden folders can could probeblly be in your C:\Users folder
if not there, Open VisualMunge at click on the toolbar there, select options set your directory to somewhere basic (ex. an easy to retreave folder) and your map will be munged to that location, open the folder and there you are.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Munge Problem

Post by [RDH]Zerted »

Create a new, blank map and try to munge Common on that. If you can, then your first map is messed up. If you can't, then your modtools are messed up.
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Munge Problem

Post by Frisbeetarian »

This speedy munge problem is the same one I have, though the end of the munge looks like this:

Code: Select all

\Common was unexpected at this time.
Munging addme.lua...done.
Copying files to Battlefront II directory:
"C:\ProgramFiles\LucasArts\Star Wars Battlefront II\GameData"
Addon dir exists, continuing...
Mod dir "ABC"exists, continuing...
Copying addme.script to mod dir...done
Copying "mission.lvl" to modDir\data\_LVL_PC\...done
Copying "core.lvl" to modDir\data\_LVL_PC\...done
Copying "ABC" to modDir\data\_LVL_PC\...done
Copying "SIDE" to modDir\data\_LVL_PC\...done
Munge process finished
And yes, this happens on a brand new map.
SilvaDalek
Sith
Sith
Posts: 1329
Joined: Sun Dec 02, 2007 12:52 pm
Games I'm Playing :: Destiny and FIFA
xbox live or psn: TH3 R0LL3R

Re: Munge Problem

Post by SilvaDalek »

That's what my munge looks like with the wierd "Common unexpected at this time" :|
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Munge Problem

Post by [RDH]Zerted »

What folder did you install the mod tools in?
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Munge Problem

Post by Frisbeetarian »

For me it's in C:\.
SilvaDalek
Sith
Sith
Posts: 1329
Joined: Sun Dec 02, 2007 12:52 pm
Games I'm Playing :: Destiny and FIFA
xbox live or psn: TH3 R0LL3R

Re: Munge Problem

Post by SilvaDalek »

It's in C:/ BF2_Modtools
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Munge Problem

Post by Frisbeetarian »

Sorry for the bump, but I have an update that might help someone else help me solve this problem. I have narrowed down the cause of the error "\Common was unexpected at this time." to be in the batch file _BUILD\munge.bat. Specifically, by adding pauses in the code (a pause before this line prompts to continue while a pause after this line won't go as the munge has already crashed). The munge crashes at the highlighted line
Hidden/Spoiler:
REM -------------- SETUP LOGGING -----------------------

set MUNGE_LOG="%CD%\%MUNGE_PLATFORM%_MungeLog.txt"
if exist %MUNGE_LOG% ( del %MUNGE_LOG% )

REM echo ********************************************************************* >> %MUNGE_LOG%
REM echo munge.bat %MUNGE_PLATFORM% %MUNGE_LANGVERSION% >> %MUNGE_LOG%
REM echo MUNGE_BIN_DIR=%MUNGE_BIN_DIR% >> %MUNGE_LOG%
REM echo MUNGE_OVERRIDE_DIR=_SOURCE_%MUNGE_LANGVERSION% >> %MUNGE_LOG%
REM echo MUNGE_LANGDIR=_SOURCE_%MUNGE_LANGDIR% >> %MUNGE_LOG%
REM echo ********************************************************************* >> %MUNGE_LOG%

if "%MUNGE_BIN_DIR%"=="" (
set MUNGE_BIN_DIR=%CD%\..\..\ToolsFL\Bin
REM echo MUNGE_BIN_DIR=%MUNGE_BIN_DIR%
set PATH=%CD%\..\..\ToolsFL\Bin;%PATH%
)
which is about two thirds of the way down the file. The only references to "MUNGE_BIN_DIR" are in this excerpt here.

Just to get through what it's not: I've installed the tools multiple times and the same thing happens, the directory it's installed in is above, and I've compared the files and folder structure to that on another computer that can munge and it's identical.


EDIT:

So I'd still like to figure out what was wrong with the original files, but after working on it for another 10 or 15 minutes, I found a work around. I assumed that since my munge bin directory would always be ToolsFL\Bin, I went ahead and deleted the highlighted line above (and the closing parenthese) to make the file always set the bin directory to this. The munge went on a few lines until it reached the munge common portion, in which case it failed upon running the _BUILD\Common\munge.bat. I looked in this file and I noticed the last five lines quoted above also appeared. After making the same changes, I could run a full munge properly with common checked.

I looked into the other munge.bat files littered about and noticed they had similar lines as well, so all my munges should work. I still don't understand, however, what was wrong in the first place and why the munge on this computer failed when it didn't on my other. Could it be an update to Windows NT that slightly changes how batch files are read?

If anyone can shine some light on this mystery, I would be very appreciative.
User avatar
impspy
Captain
Captain
Posts: 493
Joined: Wed Dec 31, 2008 1:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Pax Empiricae; check WIP

Re: Munge Problem

Post by impspy »

Okay, i deleted the lines but i still get the /common was unexpected line whenever i munge
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Munge Problem

Post by Frisbeetarian »

From what you said in the other thread, you are just trying to munge changes to a shipped world. If this is the case, post (in hide tags please) the contents of your _BUILD\munge.bat and _BUILD\Common\munge.bat. If this is not the case, what are you trying to munge?
User avatar
impspy
Captain
Captain
Posts: 493
Joined: Wed Dec 31, 2008 1:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Pax Empiricae; check WIP

Re: Munge Problem

Post by impspy »

Frisbeetarian wrote:From what you said in the other thread, you are just trying to munge changes to a shipped world. If this is the case, post (in hide tags please) the contents of your _BUILD\munge.bat and _BUILD\Common\munge.bat. If this is not the case, what are you trying to munge?
yeah, I'm trying to edit a shipped map.

_Build/munge.bat
Hidden/Spoiler:
@echo off
setlocal enabledelayedexpansion

REM For a good explanation of delayed variable expansion type set /? at the command prompt
REM it is only explained in the command line help not the windows help

REM -------------- SETUP THE SCRIPT VARIABLES -------------------------

set WORLD_PARAMETERS=
set SIDE_PARAMETERS=
set MUNGE_LOAD=0
set MUNGE_SIDE=0
set MUNGE_COMMON=0
set MUNGE_SHELL=0
set MUNGE_MOVIES=0
set MUNGE_LOCALIZE=0
set MUNGE_SOUND=0
set MUNGE_PLATFORM=PC
set MUNGE_LANGVERSION=ENGLISH
set MUNGE_LANGDIR=ENG
set MUNGE_ALL=1
set DISPLAY_MESSAGES=1
set XBOX_COPY=1

REM -------------- PROCESS COMMAND LINE ARGS -------------------------

:whilescriptparameters
if "%1"=="" goto endscriptparameters

REM **NOTE**
REM the first goto statement inside of the compound conditional seems to help variable
REM expansion. It is needed so it doesn't expand all of the variable inside the
REM conditional before it runs the statements. Unfortunately we can use the delayed
REM expansion operator "!" on the special variables %0-%9

if /i "%1"=="/WORLD" (
REM this goto statement is needed read note above
goto :whileworldparameters
:whileworldparameters
shift
set parameter=%1
if "!parameter!" == "" goto whilescriptparameters
if "!parameter:~0,1!" == "/" goto whilescriptparameters
set WORLD_PARAMETERS=!parameter! !WORLD_PARAMETERS!
set MUNGE_ALL=0
goto whileworldparameters
) else if /i "%1"=="/SIDE" (
REM this goto statement is needed read note above
goto :whilesideparameters
:whilesideparameters
shift
set parameter=%1
if "!parameter!" == "" goto whilescriptparameters
if "!parameter:~0,1!" == "/" goto whilescriptparameters
set SIDE_PARAMETERS=!parameter! !SIDE_PARAMETERS!
set MUNGE_ALL=0
goto whilesideparameters
) else if /i "%1"=="/LOAD" (
set MUNGE_LOAD=1
set MUNGE_ALL=0
) else if /i "%1"=="/NOMESSAGES" (
set DISPLAY_MESSAGES=0
) else if /i "%1"=="/SOUND" (
set MUNGE_SOUND=1
set MUNGE_ALL=0
set MUNGESTREAMS=1
REM this goto statement is needed read note above
goto :whilesoundparameters
:whilesoundparameters
shift
set parameter=%1
if "!parameter!" == "" (
goto whilescriptparameters
) else if /i "!parameter!"=="NOSTREAMS" (
set MUNGESTREAMS=0
) else if "!parameter:~0,1!" == "/" (
goto whilescriptparameters
) else (
set SOUNDLVL=!parameter! !SOUNDLVL!
set MUNGE_ALL=0
)
goto whilesoundparameters
) else if /i "%1"=="/COMMON" (
set MUNGE_COMMON=1
set MUNGE_ALL=0
) else if /i "%1"=="/SHELL" (
set MUNGE_SHELL=1
set MUNGE_ALL=0
) else if /i "%1"=="/MOVIES" (
set MUNGE_MOVIES=1
set MUNGE_ALL=0
) else if /i "%1"=="/LOCALIZE" (
set MUNGE_LOCALIZE=1
set MUNGE_ALL=0
) else if /i "%1"=="/NOXBOXCOPY" (
set XBOX_COPY=0
) else if /i "%1"=="/PLATFORM" (

REM this goto statement is needed read note above
goto :whileplatformparameters
:whileplatformparameters
shift
set parameter=%1

if /i "!parameter!"=="PC" (
set MUNGE_PLATFORM=PC
) else if /i "!parameter!"=="PS2" (
set MUNGE_PLATFORM=PS2
) else if /i "!parameter!"=="XBOX" (
set MUNGE_PLATFORM=XBOX
) else (
echo "
echo "Error (Invalid Platform Parameter): %1
echo "
goto PRINT_USAGE_AND_EXIT
)

shift
goto whilescriptparameters

) else if /i "%1"=="/LANGUAGE" (

REM this goto statement is needed read note above
goto :whilelanguageparameters
:whilelanguageparameters
shift
set parameter=%1

if /i "!parameter!"=="ENGLISH" (
set MUNGE_PLATFORM=ENGLISH
set MUNGE_LANGDIR=ENG
) else if /i "!parameter!"=="UK" (
rem set MUNGE_PLATFORM=UK
set MUNGE_LANGDIR=UK_
set MUNGE_LANGVERSION=UK_
) else if /i "!parameter!"=="FRENCH" (
rem set MUNGE_PLATFORM=FRENCH
set MUNGE_LANGDIR=FRENCH
set MUNGE_LANGVERSION=FRENCH
) else if /i "!parameter!"=="GERMAN" (
rem set MUNGE_PLATFORM=GERMAN
set MUNGE_LANGDIR=GERMAN
set MUNGE_LANGVERSION=GERMAN
) else if /i "!parameter!"=="JAPANESE" (
rem set MUNGE_PLATFORM=JAPANESE
set MUNGE_LANGDIR=JAPANESE
set MUNGE_LANGVERSION=JAPANESE
) else if /i "!parameter!"=="ITALIAN" (
rem set MUNGE_PLATFORM=ITALIAN
set MUNGE_LANGDIR=ITALIAN
set MUNGE_LANGVERSION=ITALIAN
) else if /i "!parameter!"=="SPANISH" (
rem set MUNGE_PLATFORM=SPANISH
set MUNGE_LANGDIR=SPANISH
set MUNGE_LANGVERSION=SPANISH
) else (
echo "
echo "Error (Invalid Language Parameter): %1
echo "
goto PRINT_USAGE_AND_EXIT
)

shift
goto whilescriptparameters

) else (
echo "
echo "Error (Invalid Parameter): %1
echo "
goto PRINT_USAGE_AND_EXIT
)

shift
goto whilescriptparameters
:endscriptparameters

REM ----------- POST PROCESS SOME VARIABLES ---------------

IF /I "%MUNGE_LANGVERSION%"=="ENGLISH" (
set MUNGE_OVERRIDE_DIR=
) else (
set MUNGE_OVERRIDE_DIR=%MUNGE_PLATFORM%_%MUNGE_LANGDIR%
)

if /i "%WORLD_PARAMETERS%"=="" (
set WORLD_PARAMETERS=NOTHING
) else (
REM see if NOTHING then override the variable
for %%A in (%WORLD_PARAMETERS%) do (
if /i "%%A"=="NOTHING" (
set WORLD_PARAMETERS=NOTHING
)
)
)

if /i "%SIDE_PARAMETERS%"=="" (
set SIDE_PARAMETERS=NOTHING
) else (
REM see if NOTHING then override the variable
for %%A in (%SIDE_PARAMETERS%) do (
if /i "%%A"=="NOTHING" (
set SIDE_PARAMETERS=NOTHING
)
)
)

if %MUNGE_ALL% EQU 1 (
set WORLD_PARAMETERS=EVERYTHING
set SIDE_PARAMETERS=EVERYTHING
set MUNGE_LOAD=1
set MUNGE_SIDE=1
set MUNGE_COMMON=1
set MUNGE_SHELL=1
set MUNGE_MOVIES=1
set MUNGE_LOCALIZE=1
set MUNGE_SOUND=1
)


REM -------------- MUNGE COMMON -----------------------

if %MUNGE_COMMON% EQU 1 (
echo Common\munge %MUNGE_PLATFORM%
cd Common
call munge.bat %MUNGE_PLATFORM%
cd ..
)

REM -------------- MUNGE SHELL -----------------------
if %MUNGE_SHELL% EQU 1 (
echo Shell\munge %MUNGE_PLATFORM%
cd Shell
call munge.bat %MUNGE_PLATFORM%
cd ..
)

REM -------------- MUNGE LOAD -----------------------
if %MUNGE_LOAD% EQU 1 (
echo Load\munge %MUNGE_PLATFORM%
cd Load
call munge.bat %MUNGE_PLATFORM%
cd ..
)

REM -------------- MUNGE SIDES -----------------------
if /i "%SIDE_PARAMETERS%" NEQ "NOTHING" (
echo Sides\munge %MUNGE_PLATFORM%
cd Sides
call munge.bat %MUNGE_PLATFORM% %SIDE_PARAMETERS%
cd ..
)

REM -------------- MUNGE WORLDS -----------------------
if /i "%WORLD_PARAMETERS%" NEQ "NOTHING" (
echo Worlds\munge %MUNGE_PLATFORM%
cd Worlds
call munge.bat %MUNGE_PLATFORM% %WORLD_PARAMETERS%
cd ..
)

REM -------------- MUNGE SOUNDS -----------------------
if %MUNGE_SOUND% EQU 1 (
echo Sound\munge %MUNGE_PLATFORM%
cd Sound
call munge.bat %MUNGE_PLATFORM%
cd ..
)

if /I "%MUNGE_PLATFORM%"=="XBOX" (
if %XBOX_COPY% EQU 1 (
echo Copying files to XBOX...
echo on
xbcp -d -y -t -r -f ..\_lvl_xbox\*.lvl xe:\Battlefront2\Data\_lvl_xbox\ 2>>%MUNGE_LOG%
xbcp -d -y -t -r -f ..\_lvl_xbox\*.mvs xe:\Battlefront2\Data\_lvl_xbox\ 2>>%MUNGE_LOG%
xbcp -d -y -t -r -f ..\sound\global\dsstdfx.bin xe:\Battlefront2\Data\ 2>>%MUNGE_LOG%
@echo off
)
)

REM If the munge log has anything in it, view it
if %DISPLAY_MESSAGES% EQU 1 (
for /f %%i in (%MUNGE_LOG%) do (if %%~zi GTR 0 ( start Notepad.exe %MUNGE_LOG% ) else ( if exist %MUNGE_LOG% (del %MUNGE_LOG%) ) )
)

REM pause


goto END


REM -------------- PRINT SCRIPT USAGE AND EXIT -----------------------
:PRINT_USAGE_AND_EXIT
echo "Usage: munge [/PLATFORM [PC|PS2|XBOX]]
echo " [/LANGUAGE [ENGLISH|UK|FRENCH|GERMAN|JAPANESE|ITALIAN|SPANISH]]
echo " [/WORLD [EVERYTHING|NOTHING|<world1> <world2> ...]]
echo " [/SIDE [EVERYTHING|NOTHING|<side1> <side2> ...]]
echo " [/LOAD] [/SOUND] [/COMMON] [/SHELL] [/MOVIES] [/LOCALIZE]
echo "
echo "Options:
echo " If no parameters are specified then everything is munged.
echo " /PLATFORM The platform to munge the data for (default PC)
echo " /LANGUAGE The lanuage used for building (default ENGLISH)
echo " /WORLD Selectively munges world data. If "EVERYTHING" or "NOTHING" is
echo " specified all world data is munged or not respectively
echo " /SIDE Selectively munges side data. If "EVERYTHING" or "NOTHING" is
echo " specified all side data is munged or not respectively
echo " /LOAD If specified munges loading screen data
echo " /SOUND If specified munges sound data
echo " /COMMON If specified munges common data
echo " /SHELL If specified munges shell data
echo " /MOVIES If specified munges movie data
echo " /LOCALIZE If specified munges localization data
echo " /NOXBOXCOPY If specified skips the data copy to the xbox

REM -------------- EXIT SCRIPT -----------------------
:END

endlocal
_Build/Common/munge.bat
Hidden/Spoiler:
@echo off
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_LANGDIR%x==x set MUNGE_LANGDIR=ENG
)

set MUNGE_ARGS=-checkdate -continue -platform %MUNGE_PLATFORM%
set SHADER_MUNGE_ARGS=-continue -platform %MUNGE_PLATFORM%
set MUNGE_DIR=MUNGED\%MUNGE_PLATFORM%
set OUTPUT_DIR=%MUNGE_ROOT_DIR%\_LVL_%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 ===== Handle files in Common\
set SOURCE_SUBDIR=Common
set SOURCE_DIR=
if not %MUNGE_OVERRIDE_DIR%x==x (
for %%a in (%MUNGE_OVERRIDE_DIR%) do @set SOURCE_DIR=!SOURCE_DIR! %MUNGE_ROOT_DIR%\%%a\%SOURCE_SUBDIR%
)
set SOURCE_DIR=%SOURCE_DIR% %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%

REM copy common binary format data from source root \Common
if not exist MUNGED mkdir MUNGED
if not exist %MUNGE_DIR% mkdir %MUNGE_DIR%
echo Copying premunged files from MUNGED...
if exist %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\MUNGED xcopy %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\MUNGED\*.* %MUNGE_DIR% /D /Q /Y
echo Copying premunged files from %MUNGE_DIR%...
if exist %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\%MUNGE_DIR% xcopy %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\%MUNGE_DIR%\*.* %MUNGE_DIR% /D /Q /Y

REM @echo on

odfmunge -inputfile $*.odf %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
configmunge -inputfile $*.fx %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
@move /y configmunge.log configmunge_fx.log
configmunge -inputfile $*.combo %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
@move /y configmunge.log configmunge_combo.log
scriptmunge -inputfile $*.lua %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
configmunge -inputfile $*.mcfg %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% -hashstrings 2>>%MUNGE_LOG%
@move /y configmunge.log configmunge_mcfg.log
configmunge -inputfile $*.sanm %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
@move /y configmunge.log configmunge_sanm.log
configmunge -inputfile $*.hud %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
@move /y configmunge.log configmunge_hud.log

fontmunge -inputfile $*.fff %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
%MUNGE_PLATFORM%_texturemunge -inputfile $*.tga $*.pic %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
%MUNGE_PLATFORM%_modelmunge -inputfile $Effects\*.msh $MSHs\*.msh %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
if /I not "%MUNGE_PLATFORM%"=="PS2" %MUNGE_PLATFORM%_shadermunge -inputfile shaders\*.xml shaders\*.vsfrag %SHADER_MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% -I %SOURCE_DIR%\Shaders\%MUNGE_PLATFORM%\ 2>>%MUNGE_LOG%

@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

@REM Munge global.snd, global.sfx
@if %SOUNDLOG%x==1x ( @set SOUNDOPT=-verbose & @set SOUNDLOGOUT=%LOGDIR%\SoundBankLog.txt ) else ( @set SOUNDOPT= & @set SOUNDLOGOUT=NUL )
configmunge -inputfile *.snd *.mus %MUNGE_ARGS% -sourcedir %SOURCE_DIR%\Sound -outputdir %MUNGE_DIR%\ -hashstrings 2>>%MUNGE_LOG%
for %%A in (%MUNGE_ROOT_DIR%\Common\Sound\*.sfx) do soundflmunge -platform %MUNGE_PLATFORM% -banklistinput %%A -bankoutput %MUNGE_DIR%\ -checkdate -checkid -resample %SOUNDOPT% 2>>%MUNGE_LOG% 1>>%SOUNDLOGOUT%
for %%A in (%MUNGE_ROOT_DIR%\Common\Sound\*.stm) do soundflmunge -platform %MUNGE_PLATFORM% -banklistinput %%A -bankoutput %MUNGE_DIR%\ -stream -checkdate -checkid -resample %SOUNDOPT% 2>>%MUNGE_LOG% 1>>%SOUNDLOGOUT%

@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

REM @echo off

call munge_sprites.bat %MUNGE_PLATFORM%

REM ===== Merge and munge localization files

set InputDir1=%MUNGE_ROOT_DIR%\Common\Localize\%MUNGE_PLATFORM%
set InputDir2=%MUNGE_ROOT_DIR%\Common\Localize
set MungeTemp=MungeTemp
call MergeLocalize.bat %InputDir1% %InputDir2% %MungeTemp%
REM Perform Munging
localizemunge -inputfile *.cfg %MUNGE_ARGS% -sourcedir %MungeTemp% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
REM Delete Merge Temp Dir
del /q %MungeTemp%\*.*
rmdir %MungeTemp%

REM ===== Build LVL files

if not exist %MUNGE_ROOT_DIR%\_LVL_%MUNGE_PLATFORM% mkdir %MUNGE_ROOT_DIR%\_LVL_%MUNGE_PLATFORM%
if not exist %MUNGE_ROOT_DIR%\_LVL_%MUNGE_PLATFORM%\COMMON mkdir %MUNGE_ROOT_DIR%\_LVL_%MUNGE_PLATFORM%\COMMON
rem if not exist %MUNGE_ROOT_DIR%\_LVL_%MUNGE_PLATFORM%\COMMON\%MUNGE_LANGDIR% mkdir %MUNGE_ROOT_DIR%\_LVL_%MUNGE_PLATFORM%\COMMON\%MUNGE_LANGDIR%

@echo on
levelpack -inputfile core.req -writefiles %MUNGE_DIR%\core.files %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -inputdir %MUNGE_DIR% -outputdir %OUTPUT_DIR% 2>>%MUNGE_LOG%
@move /y levelpack.log levelpack_core.log
levelpack -inputfile common.req -writefiles %MUNGE_DIR%\common.files -common %MUNGE_DIR%\core.files %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -inputdir %MUNGE_DIR% -outputdir %OUTPUT_DIR% 2>>%MUNGE_LOG%
@move /y levelpack.log levelpack_common.log
levelpack -inputfile ingame.req -writefiles %MUNGE_DIR%\ingame.files -common %MUNGE_DIR%\core.files %MUNGE_DIR%\common.files %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -inputdir %MUNGE_DIR% -outputdir %OUTPUT_DIR% 2>>%MUNGE_LOG%
@move /y levelpack.log levelpack_ingame.log
levelpack -inputfile inshell.req -writefiles %MUNGE_DIR%\inshell.files -common %MUNGE_DIR%\core.files %MUNGE_DIR%\common.files %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -inputdir %MUNGE_DIR% -outputdir %OUTPUT_DIR% 2>>%MUNGE_LOG%
@move /y levelpack.log levelpack_inshell.log
levelpack -inputfile MISSION\*.req -common %MUNGE_DIR%\core.files %MUNGE_DIR%\common.files %MUNGE_DIR%\ingame.files %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -inputdir %MUNGE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
@move /y levelpack.log levelpack_missions.log
levelpack -inputfile MISSION.req %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -inputdir %MUNGE_DIR% -outputdir %OUTPUT_DIR% 2>>%MUNGE_LOG%
@move /y levelpack.log levelpack_mission.log
@echo off

call munge_fpm.bat %MUNGE_PLATFORM%

@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
endlocal
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Munge Problem

Post by Frisbeetarian »

Woops, looks like I should have caught your mistake when you said "lines." If you read what I said again, you'll notice I only mentioned deleting the highlighted line, not the entire text I quoted (I just quoted it all for a reference point) (I also mentioned deleting the closing parenthese, and since that's on another line, I guess you should delete "lines" :D ).

I've uploaded the fixed _BUILD\munge.bat and _BUILD\Common\munge.bat to Filefront at this link: LINK REMOVED See next page for expanded fix.

All I did for these files was to edit my original files and upload them (I actually commented out the unnecessary sections instead of deleting them). Don't forget to delete the old munge.bat files and rename the new ones to just munge.bat; I included in their file names the folder each should go in.

DISCLAIMER: I am not recommending that you overwrite the orginal files in the BF2_ModTools\data folder. You can do this at your own risk, but heed what the getting started document says, which is "DO NOT MODIFY ANY FILES IN THIS FOLDER." Just modify the files in BF2_ModTools\data_ABC (where ABC is the 3 letter mapID).

Also, if you want to munge more than just common, you have to edit the munge.bat files in each of the respective folders the same way it was edited in these batch files.
Last edited by Frisbeetarian on Wed Jan 21, 2009 12:51 am, edited 1 time in total.
User avatar
phazon_elite
Rebel Colonel
Rebel Colonel
Posts: 597
Joined: Tue Jan 16, 2007 9:10 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: I'm sorry Link, I can't give the location. Come back when you're a little...mmmh...RICHER!
Contact:

Re: Munge Problem

Post by phazon_elite »

My god, THANK YOU!!! I've been having this same problem for a long time now, and I thought I wouldn't be able to mod anymore. Man, what a relief!!

EDIT: It works, although what would you do to edit, say, the batch file that munges sides?
User avatar
impspy
Captain
Captain
Posts: 493
Joined: Wed Dec 31, 2008 1:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Pax Empiricae; check WIP

Re: Munge Problem

Post by impspy »

i installed it and the munge ran longer then it had, but it still didn't create a lvl file :(
Post Reply