Cannot spawn nor see the CPs [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
[Padawan]Helkaan
Sith
Sith
Posts: 1444
Joined: Mon Aug 16, 2010 3:01 pm
Projects :: Dunno. Maybe making something
Games I'm Playing :: Some.

Cannot spawn nor see the CPs [Solved]

Post by [Padawan]Helkaan »

I decided to restart and relearn everything from scratch, following Fierfek's guide. Textures changes, a few objects added, one new CP plus its region and path, LUA adjusted for the new CP... but when I munge and launch the map:
Image
"OK", I thought. "Just cancel that and munge a test map with the ugly default Yavin terrain".
But here again I get the same thing. Without changing any setting or modifying any line. In the addon/TST/data/lvl_pc folder, there is no TST folder, so the world file wasn't munged...

I'm sure the same thing happened to someone else on the forum at last one time, but I can't find anything relevant. Who can help, please ?

(Munge log gives no error and I'm using Fingerfood's Vista fix btw)
Last edited by [Padawan]Helkaan on Sun Jun 08, 2014 2:37 pm, edited 2 times in total.
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: Cannot spawn nor see the CPs

Post by Noobasaurus »

So the munger doesn't have any of that weird quicktime stuff in it right?

And your world folder still actually has stuff in it right?

And how does it look inside the munged map on the addon folder? Does it look like everything is there?

The only times I had this error is when there was no world.
[Padawan]Helkaan
Sith
Sith
Posts: 1444
Joined: Mon Aug 16, 2010 3:01 pm
Projects :: Dunno. Maybe making something
Games I'm Playing :: Some.

Re: Cannot spawn nor see the CPs

Post by [Padawan]Helkaan »

In the data/LVL_PC folder, I can only see core and mission. The world LVL somehow didn't get munged.
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: Cannot spawn nor see the CPs

Post by Noobasaurus »

Yeah, exactly. Are you sure that you applied the fix correctly?

And have you tried using the batch files for simply munging the world and then copying those over to the addon?
[Padawan]Helkaan
Sith
Sith
Posts: 1444
Joined: Mon Aug 16, 2010 3:01 pm
Projects :: Dunno. Maybe making something
Games I'm Playing :: Some.

Re: Cannot spawn nor see the CPs

Post by [Padawan]Helkaan »

I came across an error when running the munge .bat. When reaching the "Munge Worlds" section in the script, the program returns the error "Invalid argument" - which is weird since the argument given is "PC" and that's valid. The same thing happens when munging the Shell.
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: Cannot spawn nor see the CPs

Post by Noobasaurus »

Here's my munge.bat for the world.
Hidden/Spoiler:
[code]@echo off
setlocal enabledelayedexpansion

set MUNGE_WORLD_DIRS=
if "%MUNGE_PLATFORM%"=="" set MUNGE_PLATFORM=PC

REM see if any of the parameters specify a platform, if so remove it
for %%A in (%*) do (
if /i "%%A"=="PC" (
set MUNGE_PLATFORM=PC
) else if /i "%%A"=="PS2" (
set MUNGE_PLATFORM=PS2
) else if /i "%%A"=="XBOX" (
set MUNGE_PLATFORM=XBOX
) else (
set MUNGE_WORLD_DIRS=%%A !MUNGE_WORLD_DIRS!
)
)

REM see if NOTHING was specified then just exit the script
set FOR_PARAMETER=
for %%A in (%*) do (
if /i "%%A"=="NOTHING" (
goto END
) else if /i "%%A"=="EVERYTHING" (
set MUNGE_WORLD_DIRS=*
set FOR_PARAMETER=/D
)
)

REM Munge common files first
echo munge_world Common %MUNGE_PLATFORM%
call munge_world.bat Common %MUNGE_PLATFORM%
set MUNGED_WORLDS_COMMON=1

REM for each subdirectory
for %FOR_PARAMETER% %%A in (%MUNGE_WORLD_DIRS%) do (

REM check to see if %%A is a directory
set IS_DIRECTORY=%%~aA
if /i "!IS_DIRECTORY:~0,1!" NEQ "d" (
echo "
echo "Error (Invalid Parameter): %%A
echo "
goto PRINT_USAGE_AND_EXIT
)
if NOT "%%A"=="Common" (
REM it is valid directory so munge it
echo munge_world %%A %MUNGE_PLATFORM%
call munge_world.bat %%A %MUNGE_PLATFORM%
)
)

goto END

REM -------------- PRINT SCRIPT USAGE AND EXIT -----------------------
:PRINT_USAGE_AND_EXIT
echo "Usage: munge [PC|PS2|XBOX] [<world1> <world2> ...]

:END

endlocal
[/code]
And here's my munge_world.bat.
Hidden/Spoiler:
[code]@echo off
if "%1" == "" goto ERROR

@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_WORLD_FROM_SUBDIR=
for %%A in (%1) do (
set IS_DIRECTORY=%%~aA
if /i "!IS_DIRECTORY:~0,1!" EQU "d" goto FOUNDDIR
)
for %%A in (..\%1) do (
set IS_DIRECTORY=%%~aA
if /i "!IS_DIRECTORY:~0,1!" EQU "d" (
set MUNGE_WORLD_FROM_SUBDIR=1
goto FOUNDDIR
)
)
goto ERROR
:FOUNDDIR
set MUNGE_WORLD_STARTING_DIR=%CD%
if "%MUNGE_WORLD_FROM_SUBDIR%"=="1" cd ..
if /i "%1"=="Common" (
set MUNGED_WORLDS_COMMON=1
) else if "%MUNGED_WORLDS_COMMON%"=="" (
call munge_world.bat Common %2
set MUNGED_WORLDS_COMMON=1
)
cd %1

set MUNGE_ROOT_DIR=..\..\..
if not "%2"=="" set MUNGE_PLATFORM=%2
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%\%MUNGE_ROOT_DIR%\..\ToolsFL\Bin;%PATH%
REM echo MUNGE_BIN_DIR=!MUNGE_BIN_DIR!
REM )

set MUNGE_ARGS=-checkdate -continue -platform %MUNGE_PLATFORM%
set MUNGE_DIR=MUNGED\%MUNGE_PLATFORM%
set OUTPUT_DIR=%MUNGE_ROOT_DIR%\_LVL_%MUNGE_PLATFORM%\%1

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 munge_world.bat %1 %MUNGE_PLATFORM% >> %MUNGE_LOG%
@rem echo MUNGE_BIN_DIR=%MUNGE_BIN_DIR% >> %MUNGE_LOG%
@rem echo ********************************************************************* >> %MUNGE_LOG%

REM ===== Handle files in Worlds\<worldname>\
set SOURCE_SUBDIR=Worlds\%1
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 any premunged data for this world first
if not exist MUNGED mkdir MUNGED
if not exist %MUNGE_DIR% mkdir %MUNGE_DIR%
if exist %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\MUNGED xcopy %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\MUNGED\*.* %MUNGE_DIR% /D /Q /Y
if exist %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\%MUNGE_DIR% xcopy %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\%MUNGE_DIR%\*.* %MUNGE_DIR% /D /Q /Y

odfmunge -inputfile $*.odf %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
%MUNGE_PLATFORM%_modelmunge -inputfile $*.msh %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%
terrainmunge -inputfile $*.ter %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
worldmunge -inputfile $*.lyr %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
worldmunge -inputfile $*.wld %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%

for /R %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR% %%A in (*.wld) do configmunge -inputfile $%%~nA*.pth %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputfile %%~nA -outputdir %MUNGE_DIR% -ext path -chunkid path 2>>%MUNGE_LOG%

pathplanningmunge -inputfile $*.pln %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%

configmunge -inputfile effects\*.fx %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
move /y configmunge.log configmunge_effects.log
configmunge -inputfile $*.combo %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
move /y configmunge.log configmunge_combo.log

configmunge -inputfile $*.sky %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% -chunkid sky 2>>%MUNGE_LOG%
move /y configmunge.log configmunge_sky.log
@REM FIXME: the following configmunge also unnecessarily remunges effects\*.fx into envfx files...
configmunge -inputfile $*.fx %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% -chunkid fx -ext envfx 2>>%MUNGE_LOG%
move /y configmunge.log configmunge_fx.log
configmunge -inputfile $*.prp %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% -hashstrings -chunkid prp -ext prop 2>>%MUNGE_LOG%
move /y configmunge.log configmunge_prp.log
configmunge -inputfile $*.bnd %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% -hashstrings -chunkid bnd -ext boundary 2>>%MUNGE_LOG%
move /y configmunge.log configmunge_bnd.log

configmunge -inputfile *.snd *.mus *.tsr %MUNGE_ARGS% -sourcedir %SOURCE_DIR%\Sound -outputdir %MUNGE_DIR% -hashstrings 2>>%MUNGE_LOG%
move /y configmunge.log configmunge_sound.log

configmunge -inputfile $*.lgt %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% -ext light -chunkid lght 2>>%MUNGE_LOG%
move /y configmunge.log configmunge_light.log

configmunge -inputfile $*.pvs %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% -ext povs -chunkid PORT 2>>%MUNGE_LOG%
move /y configmunge.log configmunge_povs.log

@REM Old sound munge process
@REM if EXIST %SOURCE_DIR%\Sound\%1_amb.txt soundflmunge -platform %MUNGE_PLATFORM% -banklistinput %SOURCE_DIR%\sound\%1_amb.txt -bankoutput .\%MUNGE_DIR%\%1_amb.str -checkid -checkdate -resample -stream 2>>%MUNGE_LOG%
@REM for %%A in (%SOURCE_DIR%\Sound\*.sfx) do soundflmunge -platform %MUNGE_PLATFORM% -banklistinput %%A -bankoutput .\%MUNGE_DIR%\ -checkid -checkdate -resample -verbose 1>>%MUNGE_ROOT_DIR%\_BUILD\SoundBankLog.txt 2>>%MUNGE_LOG%
@REM for %%A in (%SOURCE_DIR%\Sound\*.stm) do soundflmunge -platform %MUNGE_PLATFORM% -banklistinput %%A -bankoutput .\%MUNGE_DIR%\ -stream -checkid -checkdate -resample -verbose 1>>%MUNGE_ROOT_DIR%\_BUILD\SoundBankLog.txt 2>>%MUNGE_LOG%

set COMMON_MUNGE_DIR=..\..\Common\MUNGED\%MUNGE_PLATFORM%
set WORLDS_COMMON_MUNGE_DIR=..\Common\MUNGED\%MUNGE_PLATFORM%
if /i NOT "%1"=="Common" (
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%\%1 mkdir %MUNGE_ROOT_DIR%\_LVL_%MUNGE_PLATFORM%\%1



@REM Mike Z change below, if you hate it find him
@for /D %%a in (%MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\world*) do (

levelpack -inputfile *.req -common %COMMON_MUNGE_DIR%\core.files %COMMON_MUNGE_DIR%\common.files %COMMON_MUNGE_DIR%\ingame.files -onlyfiles -writefiles %MUNGE_DIR%\MZ.files %MUNGE_ARGS% -sourcedir %%a -inputdir %MUNGE_DIR% %WORLDS_COMMON_MUNGE_DIR% 2>>%MUNGE_LOG%

levelpack -inputfile *.mrq -common %COMMON_MUNGE_DIR%\core.files %COMMON_MUNGE_DIR%\common.files %COMMON_MUNGE_DIR%\ingame.files %MUNGE_DIR%\MZ.files %MUNGE_ARGS% -sourcedir %%a -inputdir %MUNGE_DIR% %WORLDS_COMMON_MUNGE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%

@move /y levelpack.log levelpack_%%a_mode.log

levelpack -inputfile *.req -common %COMMON_MUNGE_DIR%\core.files %COMMON_MUNGE_DIR%\common.files %COMMON_MUNGE_DIR%\ingame.files %MUNGE_ARGS% -sourcedir %%a -outputdir %OUTPUT_DIR% -inputdir %MUNGE_DIR% %WORLDS_COMMON_MUNGE_DIR% 2>>%MUNGE_LOG%

@move /y levelpack.log levelpack_%%a.log
)

@REM pack the sky variations
levelpack -inputfile *.req -common %COMMON_MUNGE_DIR%\core.files %COMMON_MUNGE_DIR%\common.files %COMMON_MUNGE_DIR%\ingame.files %MUNGE_ARGS% -sourcedir %SOURCE_DIR%\sky\REQ -inputdir %MUNGE_DIR% %WORLDS_COMMON_MUNGE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%
move /y levelpack.log levelpack_sky_variations.log

levelpack -inputfile *.req -common %COMMON_MUNGE_DIR%\core.files %COMMON_MUNGE_DIR%\common.files %COMMON_MUNGE_DIR%\ingame.files %MUNGE_ARGS% -sourcedir %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\sky -outputdir %OUTPUT_DIR% -inputdir %MUNGE_DIR% %WORLDS_COMMON_MUNGE_DIR% 2>>%MUNGE_LOG%
@move /y levelpack.log levelpack_sky.log

)

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
cd %MUNGE_WORLD_STARTING_DIR%
endlocal

goto END
:ERROR
echo Usage: munge_world.bat <worldname> [platform]
echo Must be called from Worlds\ or Worlds subdirectory with ..\
:END
[/code]
Just so you can compare them with yours.
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: Cannot spawn nor see the CPs

Post by Marth8880 »

Try munging the world manually. To do so, go into data_***\_BUILD\Worlds\***\ and run munge.bat. The munged LVL should be compiled into data_***\_LVL_PC\***\. If it's not, post the contents of the munge.bat file.
[Padawan]Helkaan
Sith
Sith
Posts: 1444
Joined: Mon Aug 16, 2010 3:01 pm
Projects :: Dunno. Maybe making something
Games I'm Playing :: Some.

Re: Cannot spawn nor see the CPs

Post by [Padawan]Helkaan »

For a reason I ignore (was it me messing with the code ?), my munge bat was completely different from yours, Noobasaurus. I replaced mine with the code you gave, and now everything munges fine. I munged the world manually for a try, it worked. I munged the whole map content, worked like a charm too. :thumbs: Guys I owe you one.
I can consider this solved for now.
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: Cannot spawn nor see the CPs [Solved]

Post by Noobasaurus »

Oh yeah, you said that you also had trouble munging the shell. Here's what I have in my _BUILD folder. Munge fix is applied with the batch in there.

http://www.mediafire.com/download/35cml ... _BUILD.zip
Post Reply