Page 1 of 1

Door creation: "Step 8". need help!

Posted: Sat Jul 14, 2012 2:44 pm
by sereja2
Sorry, for creating another post, about this door tutorial:

http://www.gametoast.com/forums/viewtop ... 36&t=14540

I think, It is Great, but "Step 8 Creating the anims in BFmodtools", from this tutorial is so complicated, so hard for understanding, and deserve new separate "step by step" tutorial as well.

For example:
1. In which exactly folder, I must put my door.msh, door_open.msh, door_basepose.msh files, before munge?

2. I can't copy from the prop folder, the munge_animation.bat to my prop folder, becouse I do not found such folder. If I just need to create my own prop folder, in what directory it is must be?

3. I can't copy from any prop folder, the munge.bat files to the folder I named my door, becouse I do not have such folder. If I need to create it, in what directory it is must be?

And many, many other "step by step" things...

I am realy need to finish my door, please, help, and complete this tutorial.

Re: Door creation: "Step 8". need help!

Posted: Sat Jul 14, 2012 5:41 pm
by Lephenix
You put door.msh, door_open.msh, door_basepose.msh files, before munge in: C:\BF2_ModTools\data_**\Worlds\***\msh
You need to create the msh folder, you also need to put the odf of the door you create in step 9 in:
C:\BF2_ModTools\data_**\Worlds\***\odf
You also need to create that folder.
From the Assets/Animation folder copy all the .bat files and place them in your animation folder. Next click on the prop folder and copy the munge_animation.bat to your prop folder. And one more click on any prop folder and copy the munge.bat files to the folder you named your door.
Well, go in: C:\BF2_ModTools\assets\Animations
In that directory, copy clean.bat, munge.bat, munge_subdir.bat and paste them in:
C:\BF2_ModTools\data_***\Animations
Next go to:
C:\BF2_ModTools\assets\Animations\Prop
In that directory, copy munge_animation.bat and paste it in: C:\BF2_ModTools\data_***\Animations\Prop
You need to create the Prop folder before
Create a folder with the name of your door in:
C:\BF2_ModTools\data_***\Animations\Prop
Next go to:
C:\BF2_ModTools\assets\Animations\Prop
Go in any folder and copy munge.bat and paste it to the folder you just created with the name of your door in:
C:\BF2_ModTools\data_***\Animations\Prop
Now edit the munge.bat in your doors folder, change it from whatever it says to something like below substituting in the name of your door and the 3 letter name of your world. In my case simpledoor and my world name is BAH. Then save the file.

Code: Select all

@call ..\munge_animation.bat "/keepframe0 /specialquathack /dest simpledoor.zaf" Worlds\BAH
Now edit the munge.bat you just pasted in the folder with the name of the door.
Right click on munge.bat, there'll be something like that:

Code: Select all

@call ..\munge_animation.bat "/keepframe0 /specialquathack /dest ///.zaf" Worlds\***
Just replace /// with the name of your door and *** with the 3 letter name of your world. And save.
Next go to the munge.bat in the animation directory and edit it so it looks like the following (once again using your doors directory name)

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\simpledoor
Now, go in:
C:\BF2_ModTools\data_***\Animations\
And edit munge.bat, erase all, and paste that:

Code: Select all

@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\***
And replace *** with the name of your door.
Before you munge, do that in munge_animation.bat in: C:\BF2_ModTools\data_***\Animations\ :
phazon_elite wrote:Very sorry to bump this, but I have some important information regarding this fix.

If anyone has run into the problem of munge_animation.bat not working in Vista, here's a fix:

Change this:
Hidden/Spoiler:
@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
To this:
Hidden/Spoiler:
@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
I encountered this today, and I hope it helps to anyone who had this problem.
Now just because we all know that visualmunge has it's problems why should animation be any different. VM does not automatically munge animations. What you need to do is manually run the munge.bat that is in the animation root directory. Just double click on it and you'll see a window with a bunch of things scoll by. To check to see if it did its job correctly go to the munged folder in you world directory and you should see three files with your doors name on it.
Step Nine
The ODF
This is the easy bit
Just create and odf that looks like this:

Code:
[GameObjectClass]

ClassLabel = "door"
GeometryName = "simpledoor.msh"


[Properties]

GeometryName = "simpledoor"
AnimationName = "simpledoor"
Animation = "open"

AnimationTrigger = "hp_door 5.0"

OpenSound = "door_open"
CloseSound = "door_close"
LockedSound = "vehicle_equip"
FoleyFXGroup = "metal_foley"



The last bits for sounds etc you can change to suit your needs. The 5.0 in the animation trigger line determines how far away from the door you can be before it opens.
Higher the number the farther away you can be.


Next place it in ZE (you may not see the door msh but you will see the bounding box once you select it so you can move it around, I am still working on the seeing it part)
Just figured it out, in XSI create a lowres version of the door and put in under the dummyroot. It needs to be in this format door_lowres. (the name can be what you like but
the _lowres must be there) Do not hide it, this will allow you to see it in ZE and even though it wasn't hidden it will not show up in game until you get far enough away from
the door.

Munge and play and walk through your door.
It is done!

Re: Door creation: "Step 8". need help!

Posted: Sat Jul 14, 2012 8:20 pm
by AceMastermind
Step #8 should be refined a little, there's a bit of unneeded info there.

When you create a new map project with the BF2_modtools there is no Prop folder in data_ABC\Animations by default, you must copy it from BF2_modtools\Assets\Animations.

Delete everything in that new Prop folder except munge_animation.bat and the dea1_prop_door folder, this folder will serve as your new template.

You can rename the dea1_prop_door folder if you want, it doesn't matter since the folder name is only for organization purposes and has no effect on the munged files.

Go inside the the dea1_prop_door folder and delete everything except the munge.bat

Drop your basepose.msh and open.msh inside the dea1_prop_door folder

Edit the munge.bat file in Notepad and change this:
@call ..\munge_animation.bat "/keepframe0 /specialquathack /dest dea1_prop_door.zaf" Worlds\DEA
to this:
@call ..\munge_animation.bat "/keepframe0 /specialquathack /dest somename.zaf" Worlds\ABC
somename = whatever you want the munged animations to be named
ABC = whatever your 3 character map identifier is

Save your edit then click on the munge.bat and you're done!

Re: Door creation: "Step 8". need help!

Posted: Mon Jul 16, 2012 1:29 am
by sereja2
Thank you all! It was realy helpfull! Now, everything become much more clear.
Still my most important mistake was next: I didn't rename my nar_shadaa_door_basepose.msh, and nar_shadaa_door_open.msh. Only after I rename them in to basepose.msh and open.msh, it start to create animation. Still, when I try it, it crash the game. Here, what I read from ZenAsset:

Code: Select all

-- Processing directory C:\BF2_ModTools\data_ZZZ\Animations\Prop\nar_shadaa_door
	Processing file basepose.msh, will save in .\\\nar_shadaa_door.zaf
*** WARNING: While correcting joint base pose matrices, no skin was found!
*** ERROR: No Skin model in MSH?
.*** WARNING: Animation <nar_shadaa_door> has a framerate <29.970030> that isn't 30fps.  Framerate correction code has not been done yet
.*** WARNING: Animation <open> has a framerate <29.970030> that isn't 30fps.  Framerate correction code has not been done yet

and here the .odf:

Code: Select all

[GameObjectClass]       

ClassLabel  =   "door"
GeometryName    =   "nar_shadaa_door.msh"

[Properties]        

GeometryName   =   "nar_shadaa_door"

AnimationName     = "nar_shadaa_door"

Animation         =     "open"

AnimationTrigger  =     "hp_active 2.0"

OrdnanceCollision = "p_-svbot-dooru1"
OrdnanceCollision = "p_-svbot-dooru2"
OrdnanceCollision = "p_-svbot-dooru3"
OrdnanceCollision = "p_-svbot-dooru4"
OrdnanceCollision = "p_-svbot-dooru5"
OrdnanceCollision = "p_-svbot-dooru6"

OpenSound = "door_open"
CloseSound = "door_close"
FoleyFXGroup    = "metal_foley"
Maybe I create it incorrect with ModTool?

Re: Door creation: "Step 8". need help!

Posted: Mon Jul 16, 2012 8:42 am
by Lephenix
I don't think those errors crash the game, can you show your battlefront 2 log?

Re: Door creation: "Step 8". need help!

Posted: Mon Jul 16, 2012 9:25 am
by sereja2
Well, not sure it is, what you asking, but I found file, named, BFront2:

Code: Select all

Opened logfile BFront2.log  2012-07-07 0206

Re: Door creation: "Step 8". need help!

Posted: Mon Jul 16, 2012 11:17 am
by Lephenix
It is that file but you have to run BF2_modtools.exe before, then you choose your map, it'll crash, and there'll be errors writen in that log. Then post it here.

Re: Door creation: "Step 8". need help!

Posted: Mon Jul 16, 2012 4:17 pm
by sereja2
It is realy strange, but it work's for SWBF2! :shock: But only for SWBF2! :? How it may be? I am sure, all stock doors, from SWBF2 assets, works for SWBF1. May be, I made it too complicated?
Well, anyway, look's like, I can't use my door even for SWBF2 version of my map: it have no any collision... Probably I am realy made it incorrect, with ModTool... :cry:

Re: Door creation: "Step 8". need help!

Posted: Mon Jul 16, 2012 5:22 pm
by ANDEWEGET
You need collision primitives for animated models to have collision. Somewhere in the docs there is an entry about collision primitves. Dunno if there is a tutorial about them here on GT.

Re: Door creation: "Step 8". need help!

Posted: Mon Jul 16, 2012 7:14 pm
by Lephenix
sereja2 wrote:It is realy strange, but it work's for SWBF2! :shock: But only for SWBF2! :? How it may be? I am sure, all stock doors, from SWBF2 assets, works for SWBF1. May be, I made it too complicated?
Well, anyway, look's like, I can't use my door even for SWBF2 version of my map: it have no any collision... Probably I am realy made it incorrect, with ModTool... :cry:
sereja2 wrote:

Code: Select all

[GameObjectClass]       

ClassLabel  =   "door"
GeometryName    =   "nar_shadaa_door.msh"

[Properties]        

GeometryName   =   "nar_shadaa_door"

AnimationName     = "nar_shadaa_door"

Animation         =     "open"

AnimationTrigger  =     "hp_active 2.0"

OrdnanceCollision = "p_-svbot-dooru1"
OrdnanceCollision = "p_-svbot-dooru2"
OrdnanceCollision = "p_-svbot-dooru3"
OrdnanceCollision = "p_-svbot-dooru4"
OrdnanceCollision = "p_-svbot-dooru5"
OrdnanceCollision = "p_-svbot-dooru6"

OpenSound = "door_open"
CloseSound = "door_close"
FoleyFXGroup    = "metal_foley"
Maybe I create it incorrect with ModTool?
Remove from your odf:

OrdnanceCollision = "p_-svbot-dooru1"
OrdnanceCollision = "p_-svbot-dooru2"
OrdnanceCollision = "p_-svbot-dooru3"
OrdnanceCollision = "p_-svbot-dooru4"
OrdnanceCollision = "p_-svbot-dooru5"
OrdnanceCollision = "p_-svbot-dooru6"

It confuses the engine, and i think it is not the name you gave to the collisions when i saw it in XSI. Remove those lines and test.

Re: Door creation: "Step 8". need help!

Posted: Mon Jul 16, 2012 9:27 pm
by FragMe!
Question for you, are you trying to make the door work in SWBF?
The tutorial is mainly written for what is required for SWBFII.

If it is for SWBF then the only real example of an animated object is the carbonforklift.
Same prinicle applies you just have to use the .bat files that are in the Shipped Common Animation folders.

If it is for SWBFII then I suggest trying a really simple door just so you can be sure of the steps required to get it in game and working.

Oh and the real pain thing about animations are that they will crash a map and there will be no error listed.

Re: Door creation: "Step 8". need help!

Posted: Tue Jul 17, 2012 3:00 am
by ANDEWEGET
Jabba's Palace has animated doors. psych0fred had a .emdl of the animated door on his page. Maybe take a look at that. I used it to get a animated door into SWBF I once.

Re: Door creation: "Step 8". need help!

Posted: Tue Jul 17, 2012 8:19 am
by FragMe!
Oh ya that, I was only looking in the common shipped animations. :oops:

Re: Door creation: "Step 8". need help!

Posted: Tue Jul 17, 2012 11:13 am
by sereja2
Well, in this case, you probably may continue this "Step 8", tutorial, specialy for SWBF1.
I try to change "death star door" bat files, to bat, from "bespin forklift", and "Jabba's door", but it seems, bat from SWBF1 can't find directory, and do not create animation files at all. Probably they are too, must be edited some way... I try copy all lines, from edited SWBF2 bat's, but in this case, created animation also crash SWBF1 game. I am not familiar with nature, of bat files, and not sure, is there exist difference, between SWBF2 bat, and SWBF1 bat, with same lines...
I am also try to delete lines with collision, from odf, but this has no effect. Probably I put collision primitive under "wrong null", or make them too many. Here the all list:

Code: Select all

OrdnanceCollision = "p_-svbot-doord"
OrdnanceCollision = "p_-svbot-doorl1"
OrdnanceCollision = "p_-svbot-doorl2"
OrdnanceCollision = "p_-svbot-doorl3"
OrdnanceCollision = "p_-svbot-doorl4"
OrdnanceCollision = "p_-svbot-doorl5"
OrdnanceCollision = "p_-svbot-doorr1"
OrdnanceCollision = "p_-svbot-doorr2"
OrdnanceCollision = "p_-svbot-doorr3"
OrdnanceCollision = "p_-svbot-doorr4"
OrdnanceCollision = "p_-svbot-doorr5"
OrdnanceCollision = "p_-svbot-dooru1"
OrdnanceCollision = "p_-svbot-dooru2"
OrdnanceCollision = "p_-svbot-dooru3"
OrdnanceCollision = "p_-svbot-dooru4"
OrdnanceCollision = "p_-svbot-dooru5"
OrdnanceCollision = "p_-svbot-dooru6"
Or make some other mistake...

Re: Door creation: "Step 8". need help!

Posted: Tue Jul 17, 2012 12:32 pm
by AceMastermind
I don't know much about the SWBF1 tools, but I can't imagine why SWBF2 animations wouldn't work in SWBF1 since it works fine the other way around, unless you made a mistake in the scene setup which we have yet to see. Try munging the animation files with the SWBF1 tools.

BFBuilder\DataMod1\Common\Animations
looks like the equivalent to:
data_ABC\Animations

Edit
Yep, I just successfully munged the carbon forklift animation assets with the SWBF1 tools.

I copied the bes2_carbon_forklift folder from:
  • BFBuilder\Assets\Shipped Common Animations
to:
  • BFBuilder\DataMod1\Common\Animations
Then I edited the munge.bat to input the correct path for the munged files.
I changed this:

Code: Select all

@call ..\munge_animation.bat "/keepframe0 /specialquathack"  ..\..\..\worlds\Bespin
to this:

Code: Select all

@call ..\munge_animation.bat "/keepframe0 /specialquathack"  ..\..\..\worlds\Modification1
The destination for the munged files was here:
BFBuilder\DataMod1\Worlds\Modification1\munged

Re: Door creation: "Step 8". need help!

Posted: Tue Jul 17, 2012 5:02 pm
by sereja2
Interesting! I just try it, and create bespin forklift animation too! But, when I try my door, the munge process is crash after start, and in munge window, I sow again those error lines, about framerate <29.970030> that isn't 30fps. It create some anims, but it also crash in game...

Re: Door creation: "Step 8". need help!

Posted: Tue Jul 17, 2012 8:46 pm
by FragMe!
The only thing I can suggest is make sure the bones have at least 1 keyframe. This goes for the open animation as well as the basepose. Also make sure the base (parent) non moving null whether it is bone_root or dummyroot has a key frame too.

The 29.97 is a normal harmless error. If you want to get rid of it then do this.
Down by the playback controls is a tab labelled Playback. Click on it then click on Playback Options
Now under the Precision heading you will see Format (it will probably show NTSC (29.97 fps) click on the down arrow on the side and select 30 fps. The error will go away.